Skip to content
Snippets Groups Projects
Commit 566c734a authored by michael.minelli's avatar michael.minelli
Browse files

Update import to add .js extensions

parent 705d2d17
No related branches found
No related tags found
No related merge requests found
Showing
with 705 additions and 380 deletions
Subproject commit f572bf3afa0a98675247df85c599b5d1e5a62d0d
Subproject commit ef5c7bd49a57bc28db77bad797de4980133d6523
This diff is collapsed.
......@@ -29,7 +29,7 @@
"lint" : "npx eslint .",
"genversion" : "npx genversion -s -e src/config/Version.ts",
"build" : "npm run genversion; npx tsc",
"start:dev" : "npm run genversion; npm run lint; npx ts-node src/app.ts",
"start:dev" : "npm run genversion; npm run lint; tsc --noEmit && npx tsx dist/app.js",
"test" : "echo \"Error: no test specified\" && exit 1"
},
"dependencies" : {
......@@ -71,8 +71,7 @@
"dotenv-vault" : "^1.25.0",
"genversion" : "^3.2.0",
"pkg" : "^5.8.1",
"tiny-typed-emitter" : "^2.1.0",
"ts-node" : "^10.9.2",
"typescript" : "^5.3.3"
"tsx" : "^4.7.1",
"typescript" : "^5.4.2"
}
}
// Read from the .env file
// ATTENTION : These lines MUST be the first of this file (except for the path import)
import path = require('node:path');
import myEnv = require('dotenv');
import dotenvExpand = require('dotenv-expand');
dotenvExpand.expand(myEnv.config({
path : path.join(__dirname, '../.env'),
DOTENV_KEY: 'dotenv://:key_fc323d8e0a02349342f1c6a119bb38495958ce3a43a87d19a3f674b7e2896dcb@dotenv.local/vault/.env.vault?environment=development'
}));
require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST be the second of this file
import CommanderApp from './commander/CommanderApp';
import HttpManager from './managers/HttpManager';
// ATTENTION : This line MUST be the first of this file
import './init.js';
import CommanderApp from './commander/CommanderApp.js';
import HttpManager from './managers/HttpManager.js';
HttpManager.registerAxiosInterceptor();
......
import { Command, Option } from 'commander';
import ClientsSharedConfig from '../sharedByClients/config/ClientsSharedConfig';
import AssignmentCommand from './assignment/AssignmentCommand';
import ExerciseCommand from './exercise/ExerciseCommand';
import SharedConfig from '../shared/config/SharedConfig';
import ClientsSharedConfig from '../sharedByClients/config/ClientsSharedConfig.js';
import AssignmentCommand from './assignment/AssignmentCommand.js';
import ExerciseCommand from './exercise/ExerciseCommand.js';
import SharedConfig from '../shared/config/SharedConfig.js';
import boxen from 'boxen';
import { stateConfigFile } from '../config/ConfigFiles';
import semver from 'semver/preload';
import { version } from '../config/Version';
import Config from '../config/Config';
import CompletionCommand from './completion/CompletionCommand';
import AuthCommand from './auth/AuthCommand';
import SessionCommand from './auth/SessionCommand';
import UpgradeCommand from './UpgradeCommand';
import TextStyle from '../types/TextStyle';
import { stateConfigFile } from '../config/ConfigFiles.js';
import semver from 'semver/preload.js';
import { version } from '../config/Version.js';
import Config from '../config/Config.js';
import CompletionCommand from './completion/CompletionCommand.js';
import AuthCommand from './auth/AuthCommand.js';
import SessionCommand from './auth/SessionCommand.js';
import UpgradeCommand from './UpgradeCommand.js';
import TextStyle from '../types/TextStyle.js';
class CommanderApp {
......
import CommanderCommand from './CommanderCommand';
import CommanderCommand from './CommanderCommand.js';
import ora from 'ora';
import Config from '../config/Config';
import TextStyle from '../types/TextStyle';
import Config from '../config/Config.js';
import TextStyle from '../types/TextStyle.js';
import os from 'os';
import { spawn } from 'child_process';
......
import CommanderCommand from '../CommanderCommand';
import AssignmentCreateCommand from './subcommands/AssignmentCreateCommand';
import AssignmentPublishCommand from './subcommands/AssignmentPublishCommand';
import AssignmentUnpublishCommand from './subcommands/AssignmentUnpublishCommand';
import AssignmentCheckCommand from './subcommands/AssignmentCheckCommand';
import AssignmentRunCommand from './subcommands/AssignmentRunCommand';
import AssignmentCorrectionCommand from './subcommands/correction/AssignmentCorrectionCommand';
import CommanderCommand from '../CommanderCommand.js';
import AssignmentCreateCommand from './subcommands/AssignmentCreateCommand.js';
import AssignmentPublishCommand from './subcommands/AssignmentPublishCommand.js';
import AssignmentUnpublishCommand from './subcommands/AssignmentUnpublishCommand.js';
import AssignmentCheckCommand from './subcommands/AssignmentCheckCommand.js';
import AssignmentRunCommand from './subcommands/AssignmentRunCommand.js';
import AssignmentCorrectionCommand from './subcommands/correction/AssignmentCorrectionCommand.js';
class AssignmentCommand extends CommanderCommand {
......
import CommanderCommand from '../../CommanderCommand';
import Config from '../../../config/Config';
import CommanderCommand from '../../CommanderCommand.js';
import Config from '../../../config/Config.js';
import ora from 'ora';
import chalk from 'chalk';
import AssignmentValidator from '../../../sharedByClients/helpers/Dojo/AssignmentValidator';
import ClientsSharedAssignmentHelper from '../../../sharedByClients/helpers/Dojo/ClientsSharedAssignmentHelper';
import SharedConfig from '../../../shared/config/SharedConfig';
import GlobalHelper from '../../../helpers/GlobalHelper';
import AssignmentValidator from '../../../sharedByClients/helpers/Dojo/AssignmentValidator.js';
import ClientsSharedAssignmentHelper from '../../../sharedByClients/helpers/Dojo/ClientsSharedAssignmentHelper.js';
import SharedConfig from '../../../shared/config/SharedConfig.js';
import GlobalHelper from '../../../helpers/GlobalHelper.js';
class AssignmentCheckCommand extends CommanderCommand {
......
import CommanderCommand from '../../CommanderCommand';
import CommanderCommand from '../../CommanderCommand.js';
import ora from 'ora';
import AccessesHelper from '../../../helpers/AccessesHelper';
import Assignment from '../../../sharedByClients/models/Assignment';
import DojoBackendManager from '../../../managers/DojoBackendManager';
import Toolbox from '../../../shared/helpers/Toolbox';
import AccessesHelper from '../../../helpers/AccessesHelper.js';
import Assignment from '../../../sharedByClients/models/Assignment.js';
import DojoBackendManager from '../../../managers/DojoBackendManager.js';
import Toolbox from '../../../shared/helpers/Toolbox.js';
import * as Gitlab from '@gitbeaker/rest';
import TextStyle from '../../../types/TextStyle';
import GitlabManager from '../../../managers/GitlabManager';
import TextStyle from '../../../types/TextStyle.js';
import GitlabManager from '../../../managers/GitlabManager.js';
type CommandOptions = { name: string, template?: string, members_id?: Array<number>, members_username?: Array<string>, clone?: string | boolean }
......
import AssignmentPublishUnpublishCommandBase from './AssignmentPublishUnpublishCommandBase';
import AssignmentPublishUnpublishCommandBase from './AssignmentPublishUnpublishCommandBase.js';
class AssignmentPublishCommand extends AssignmentPublishUnpublishCommandBase {
......
import CommanderCommand from '../../CommanderCommand';
import CommanderCommand from '../../CommanderCommand.js';
import inquirer from 'inquirer';
import SessionManager from '../../../managers/SessionManager';
import SessionManager from '../../../managers/SessionManager.js';
import ora from 'ora';
import DojoBackendManager from '../../../managers/DojoBackendManager';
import Assignment from '../../../sharedByClients/models/Assignment';
import SharedAssignmentHelper from '../../../shared/helpers/Dojo/SharedAssignmentHelper';
import TextStyle from '../../../types/TextStyle';
import DojoBackendManager from '../../../managers/DojoBackendManager.js';
import Assignment from '../../../sharedByClients/models/Assignment.js';
import SharedAssignmentHelper from '../../../shared/helpers/Dojo/SharedAssignmentHelper.js';
import TextStyle from '../../../types/TextStyle.js';
abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand {
......
import CommanderCommand from '../../CommanderCommand';
import ExerciseRunHelper from '../../../helpers/Dojo/ExerciseRunHelper';
import GlobalHelper from '../../../helpers/GlobalHelper';
import CommanderCommand from '../../CommanderCommand.js';
import ExerciseRunHelper from '../../../helpers/Dojo/ExerciseRunHelper.js';
import GlobalHelper from '../../../helpers/GlobalHelper.js';
class AssignmentRunCommand extends CommanderCommand {
......
import AssignmentPublishUnpublishCommandBase from './AssignmentPublishUnpublishCommandBase';
import AssignmentPublishUnpublishCommandBase from './AssignmentPublishUnpublishCommandBase.js';
class AssignmentUnpublishCommand extends AssignmentPublishUnpublishCommandBase {
......
import CommanderCommand from '../../../CommanderCommand';
import AssignmentCorrectionLinkCommand from './subcommands/AssignmentCorrectionLinkCommand';
import AssignmentCorrectionUpdateCommand from './subcommands/AssignmentCorrectionUpdateCommand';
import CommanderCommand from '../../../CommanderCommand.js';
import AssignmentCorrectionLinkCommand from './subcommands/AssignmentCorrectionLinkCommand.js';
import AssignmentCorrectionUpdateCommand from './subcommands/AssignmentCorrectionUpdateCommand.js';
class AssignmentCorrectionCommand extends CommanderCommand {
......
import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand';
import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand.js';
class AssignmentCorrectionLinkCommand extends AssignmentCorrectionLinkUpdateCommand {
......
import CommanderCommand from '../../../../CommanderCommand';
import CommanderCommand from '../../../../CommanderCommand.js';
import ora from 'ora';
import DojoBackendManager from '../../../../../managers/DojoBackendManager';
import SessionManager from '../../../../../managers/SessionManager';
import Assignment from '../../../../../sharedByClients/models/Assignment';
import TextStyle from '../../../../../types/TextStyle';
import DojoBackendManager from '../../../../../managers/DojoBackendManager.js';
import SessionManager from '../../../../../managers/SessionManager.js';
import Assignment from '../../../../../sharedByClients/models/Assignment.js';
import TextStyle from '../../../../../types/TextStyle.js';
abstract class AssignmentCorrectionLinkUpdateCommand extends CommanderCommand {
......
import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand';
import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand.js';
class AssignmentCorrectionUpdateCommand extends AssignmentCorrectionLinkUpdateCommand {
......
import CommanderCommand from '../CommanderCommand';
import SessionTestCommand from './subcommands/AuthTestCommand';
import SessionLoginCommand from './subcommands/AuthLoginCommand';
import SessionLogoutCommand from './subcommands/AuthLogoutCommand';
import CommanderCommand from '../CommanderCommand.js';
import SessionTestCommand from './subcommands/AuthTestCommand.js';
import SessionLoginCommand from './subcommands/AuthLoginCommand.js';
import SessionLogoutCommand from './subcommands/AuthLogoutCommand.js';
class AuthCommand extends CommanderCommand {
......
import AuthCommand from './AuthCommand';
import AuthCommand from './AuthCommand.js';
import { CommandOptions } from 'commander';
......
import CommanderCommand from '../../CommanderCommand';
import SessionManager from '../../../managers/SessionManager';
import TextStyle from '../../../types/TextStyle';
import CommanderCommand from '../../CommanderCommand.js';
import SessionManager from '../../../managers/SessionManager.js';
import TextStyle from '../../../types/TextStyle.js';
class AuthLoginCommand extends CommanderCommand {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment