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
Branches
Tags
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 @@ ...@@ -29,7 +29,7 @@
"lint" : "npx eslint .", "lint" : "npx eslint .",
"genversion" : "npx genversion -s -e src/config/Version.ts", "genversion" : "npx genversion -s -e src/config/Version.ts",
"build" : "npm run genversion; npx tsc", "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" "test" : "echo \"Error: no test specified\" && exit 1"
}, },
"dependencies" : { "dependencies" : {
...@@ -71,8 +71,7 @@ ...@@ -71,8 +71,7 @@
"dotenv-vault" : "^1.25.0", "dotenv-vault" : "^1.25.0",
"genversion" : "^3.2.0", "genversion" : "^3.2.0",
"pkg" : "^5.8.1", "pkg" : "^5.8.1",
"tiny-typed-emitter" : "^2.1.0", "tsx" : "^4.7.1",
"ts-node" : "^10.9.2", "typescript" : "^5.4.2"
"typescript" : "^5.3.3"
} }
} }
// Read from the .env file // ATTENTION : This line MUST be the first of this file
// ATTENTION : These lines MUST be the first of this file (except for the path import) import './init.js';
import path = require('node:path'); import CommanderApp from './commander/CommanderApp.js';
import myEnv = require('dotenv'); import HttpManager from './managers/HttpManager.js';
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';
HttpManager.registerAxiosInterceptor(); HttpManager.registerAxiosInterceptor();
......
import { Command, Option } from 'commander'; import { Command, Option } from 'commander';
import ClientsSharedConfig from '../sharedByClients/config/ClientsSharedConfig'; import ClientsSharedConfig from '../sharedByClients/config/ClientsSharedConfig.js';
import AssignmentCommand from './assignment/AssignmentCommand'; import AssignmentCommand from './assignment/AssignmentCommand.js';
import ExerciseCommand from './exercise/ExerciseCommand'; import ExerciseCommand from './exercise/ExerciseCommand.js';
import SharedConfig from '../shared/config/SharedConfig'; import SharedConfig from '../shared/config/SharedConfig.js';
import boxen from 'boxen'; import boxen from 'boxen';
import { stateConfigFile } from '../config/ConfigFiles'; import { stateConfigFile } from '../config/ConfigFiles.js';
import semver from 'semver/preload'; import semver from 'semver/preload.js';
import { version } from '../config/Version'; import { version } from '../config/Version.js';
import Config from '../config/Config'; import Config from '../config/Config.js';
import CompletionCommand from './completion/CompletionCommand'; import CompletionCommand from './completion/CompletionCommand.js';
import AuthCommand from './auth/AuthCommand'; import AuthCommand from './auth/AuthCommand.js';
import SessionCommand from './auth/SessionCommand'; import SessionCommand from './auth/SessionCommand.js';
import UpgradeCommand from './UpgradeCommand'; import UpgradeCommand from './UpgradeCommand.js';
import TextStyle from '../types/TextStyle'; import TextStyle from '../types/TextStyle.js';
class CommanderApp { class CommanderApp {
......
import CommanderCommand from './CommanderCommand'; import CommanderCommand from './CommanderCommand.js';
import ora from 'ora'; import ora from 'ora';
import Config from '../config/Config'; import Config from '../config/Config.js';
import TextStyle from '../types/TextStyle'; import TextStyle from '../types/TextStyle.js';
import os from 'os'; import os from 'os';
import { spawn } from 'child_process'; import { spawn } from 'child_process';
......
import CommanderCommand from '../CommanderCommand'; import CommanderCommand from '../CommanderCommand.js';
import AssignmentCreateCommand from './subcommands/AssignmentCreateCommand'; import AssignmentCreateCommand from './subcommands/AssignmentCreateCommand.js';
import AssignmentPublishCommand from './subcommands/AssignmentPublishCommand'; import AssignmentPublishCommand from './subcommands/AssignmentPublishCommand.js';
import AssignmentUnpublishCommand from './subcommands/AssignmentUnpublishCommand'; import AssignmentUnpublishCommand from './subcommands/AssignmentUnpublishCommand.js';
import AssignmentCheckCommand from './subcommands/AssignmentCheckCommand'; import AssignmentCheckCommand from './subcommands/AssignmentCheckCommand.js';
import AssignmentRunCommand from './subcommands/AssignmentRunCommand'; import AssignmentRunCommand from './subcommands/AssignmentRunCommand.js';
import AssignmentCorrectionCommand from './subcommands/correction/AssignmentCorrectionCommand'; import AssignmentCorrectionCommand from './subcommands/correction/AssignmentCorrectionCommand.js';
class AssignmentCommand extends CommanderCommand { class AssignmentCommand extends CommanderCommand {
......
import CommanderCommand from '../../CommanderCommand'; import CommanderCommand from '../../CommanderCommand.js';
import Config from '../../../config/Config'; import Config from '../../../config/Config.js';
import ora from 'ora'; import ora from 'ora';
import chalk from 'chalk'; import chalk from 'chalk';
import AssignmentValidator from '../../../sharedByClients/helpers/Dojo/AssignmentValidator'; import AssignmentValidator from '../../../sharedByClients/helpers/Dojo/AssignmentValidator.js';
import ClientsSharedAssignmentHelper from '../../../sharedByClients/helpers/Dojo/ClientsSharedAssignmentHelper'; import ClientsSharedAssignmentHelper from '../../../sharedByClients/helpers/Dojo/ClientsSharedAssignmentHelper.js';
import SharedConfig from '../../../shared/config/SharedConfig'; import SharedConfig from '../../../shared/config/SharedConfig.js';
import GlobalHelper from '../../../helpers/GlobalHelper'; import GlobalHelper from '../../../helpers/GlobalHelper.js';
class AssignmentCheckCommand extends CommanderCommand { class AssignmentCheckCommand extends CommanderCommand {
......
import CommanderCommand from '../../CommanderCommand'; import CommanderCommand from '../../CommanderCommand.js';
import ora from 'ora'; import ora from 'ora';
import AccessesHelper from '../../../helpers/AccessesHelper'; import AccessesHelper from '../../../helpers/AccessesHelper.js';
import Assignment from '../../../sharedByClients/models/Assignment'; import Assignment from '../../../sharedByClients/models/Assignment.js';
import DojoBackendManager from '../../../managers/DojoBackendManager'; import DojoBackendManager from '../../../managers/DojoBackendManager.js';
import Toolbox from '../../../shared/helpers/Toolbox'; import Toolbox from '../../../shared/helpers/Toolbox.js';
import * as Gitlab from '@gitbeaker/rest'; import * as Gitlab from '@gitbeaker/rest';
import TextStyle from '../../../types/TextStyle'; import TextStyle from '../../../types/TextStyle.js';
import GitlabManager from '../../../managers/GitlabManager'; import GitlabManager from '../../../managers/GitlabManager.js';
type CommandOptions = { name: string, template?: string, members_id?: Array<number>, members_username?: Array<string>, clone?: string | boolean } 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 { class AssignmentPublishCommand extends AssignmentPublishUnpublishCommandBase {
......
import CommanderCommand from '../../CommanderCommand'; import CommanderCommand from '../../CommanderCommand.js';
import inquirer from 'inquirer'; import inquirer from 'inquirer';
import SessionManager from '../../../managers/SessionManager'; import SessionManager from '../../../managers/SessionManager.js';
import ora from 'ora'; import ora from 'ora';
import DojoBackendManager from '../../../managers/DojoBackendManager'; import DojoBackendManager from '../../../managers/DojoBackendManager.js';
import Assignment from '../../../sharedByClients/models/Assignment'; import Assignment from '../../../sharedByClients/models/Assignment.js';
import SharedAssignmentHelper from '../../../shared/helpers/Dojo/SharedAssignmentHelper'; import SharedAssignmentHelper from '../../../shared/helpers/Dojo/SharedAssignmentHelper.js';
import TextStyle from '../../../types/TextStyle'; import TextStyle from '../../../types/TextStyle.js';
abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand { abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand {
......
import CommanderCommand from '../../CommanderCommand'; import CommanderCommand from '../../CommanderCommand.js';
import ExerciseRunHelper from '../../../helpers/Dojo/ExerciseRunHelper'; import ExerciseRunHelper from '../../../helpers/Dojo/ExerciseRunHelper.js';
import GlobalHelper from '../../../helpers/GlobalHelper'; import GlobalHelper from '../../../helpers/GlobalHelper.js';
class AssignmentRunCommand extends CommanderCommand { class AssignmentRunCommand extends CommanderCommand {
......
import AssignmentPublishUnpublishCommandBase from './AssignmentPublishUnpublishCommandBase'; import AssignmentPublishUnpublishCommandBase from './AssignmentPublishUnpublishCommandBase.js';
class AssignmentUnpublishCommand extends AssignmentPublishUnpublishCommandBase { class AssignmentUnpublishCommand extends AssignmentPublishUnpublishCommandBase {
......
import CommanderCommand from '../../../CommanderCommand'; import CommanderCommand from '../../../CommanderCommand.js';
import AssignmentCorrectionLinkCommand from './subcommands/AssignmentCorrectionLinkCommand'; import AssignmentCorrectionLinkCommand from './subcommands/AssignmentCorrectionLinkCommand.js';
import AssignmentCorrectionUpdateCommand from './subcommands/AssignmentCorrectionUpdateCommand'; import AssignmentCorrectionUpdateCommand from './subcommands/AssignmentCorrectionUpdateCommand.js';
class AssignmentCorrectionCommand extends CommanderCommand { class AssignmentCorrectionCommand extends CommanderCommand {
......
import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand'; import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand.js';
class AssignmentCorrectionLinkCommand extends AssignmentCorrectionLinkUpdateCommand { class AssignmentCorrectionLinkCommand extends AssignmentCorrectionLinkUpdateCommand {
......
import CommanderCommand from '../../../../CommanderCommand'; import CommanderCommand from '../../../../CommanderCommand.js';
import ora from 'ora'; import ora from 'ora';
import DojoBackendManager from '../../../../../managers/DojoBackendManager'; import DojoBackendManager from '../../../../../managers/DojoBackendManager.js';
import SessionManager from '../../../../../managers/SessionManager'; import SessionManager from '../../../../../managers/SessionManager.js';
import Assignment from '../../../../../sharedByClients/models/Assignment'; import Assignment from '../../../../../sharedByClients/models/Assignment.js';
import TextStyle from '../../../../../types/TextStyle'; import TextStyle from '../../../../../types/TextStyle.js';
abstract class AssignmentCorrectionLinkUpdateCommand extends CommanderCommand { abstract class AssignmentCorrectionLinkUpdateCommand extends CommanderCommand {
......
import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand'; import AssignmentCorrectionLinkUpdateCommand from './AssignmentCorrectionLinkUpdateCommand.js';
class AssignmentCorrectionUpdateCommand extends AssignmentCorrectionLinkUpdateCommand { class AssignmentCorrectionUpdateCommand extends AssignmentCorrectionLinkUpdateCommand {
......
import CommanderCommand from '../CommanderCommand'; import CommanderCommand from '../CommanderCommand.js';
import SessionTestCommand from './subcommands/AuthTestCommand'; import SessionTestCommand from './subcommands/AuthTestCommand.js';
import SessionLoginCommand from './subcommands/AuthLoginCommand'; import SessionLoginCommand from './subcommands/AuthLoginCommand.js';
import SessionLogoutCommand from './subcommands/AuthLogoutCommand'; import SessionLogoutCommand from './subcommands/AuthLogoutCommand.js';
class AuthCommand extends CommanderCommand { class AuthCommand extends CommanderCommand {
......
import AuthCommand from './AuthCommand'; import AuthCommand from './AuthCommand.js';
import { CommandOptions } from 'commander'; import { CommandOptions } from 'commander';
......
import CommanderCommand from '../../CommanderCommand'; import CommanderCommand from '../../CommanderCommand.js';
import SessionManager from '../../../managers/SessionManager'; import SessionManager from '../../../managers/SessionManager.js';
import TextStyle from '../../../types/TextStyle'; import TextStyle from '../../../types/TextStyle.js';
class AuthLoginCommand extends CommanderCommand { 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