@servicetitan/startup 32.1.0 → 32.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/build.d.ts +36 -7
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +35 -10
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +9 -10
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +6 -22
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/clean.d.ts +2 -2
- package/dist/cli/commands/clean.d.ts.map +1 -1
- package/dist/cli/commands/clean.js +16 -4
- package/dist/cli/commands/clean.js.map +1 -1
- package/dist/cli/commands/convert-eslint-config.d.ts +2 -2
- package/dist/cli/commands/convert-eslint-config.d.ts.map +1 -1
- package/dist/cli/commands/convert-eslint-config.js +3 -4
- package/dist/cli/commands/convert-eslint-config.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts +3 -5
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +2 -18
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/get-command.d.ts.map +1 -1
- package/dist/cli/commands/get-command.js +2 -0
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/index.d.ts +0 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +0 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +10 -6
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +9 -8
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +21 -7
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +33 -11
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.d.ts +3 -3
- package/dist/cli/commands/kendo-ui-license.d.ts.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +17 -5
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +31 -12
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +34 -13
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-list.d.ts +46 -0
- package/dist/cli/commands/mfe-list.d.ts.map +1 -0
- package/dist/cli/commands/mfe-list.js +200 -0
- package/dist/cli/commands/mfe-list.js.map +1 -0
- package/dist/cli/commands/mfe-package-clean.d.ts +29 -5
- package/dist/cli/commands/mfe-package-clean.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +28 -5
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +37 -5
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +36 -5
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts +17 -4
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +37 -7
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +3 -5
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +2 -18
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/review.d.ts +14 -6
- package/dist/cli/commands/review/review.d.ts.map +1 -1
- package/dist/cli/commands/review/review.js +27 -23
- package/dist/cli/commands/review/review.js.map +1 -1
- package/dist/cli/commands/run-task.d.ts +10 -6
- package/dist/cli/commands/run-task.d.ts.map +1 -1
- package/dist/cli/commands/run-task.js +16 -13
- package/dist/cli/commands/run-task.js.map +1 -1
- package/dist/cli/commands/start.d.ts +28 -7
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +27 -10
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/styles-check.d.ts +2 -2
- package/dist/cli/commands/styles-check.d.ts.map +1 -1
- package/dist/cli/commands/styles-check.js +2 -1
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/test/runners/vitest.js +2 -1
- package/dist/cli/commands/test/runners/vitest.js.map +1 -1
- package/dist/cli/commands/test/tests.d.ts +14 -5
- package/dist/cli/commands/test/tests.d.ts.map +1 -1
- package/dist/cli/commands/test/tests.js +26 -13
- package/dist/cli/commands/test/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +13 -4
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/types.js +28 -0
- package/dist/cli/commands/types.js.map +1 -1
- package/dist/cli/commands/upload-sourcemaps.d.ts +3 -5
- package/dist/cli/commands/upload-sourcemaps.d.ts.map +1 -1
- package/dist/cli/commands/upload-sourcemaps.js +5 -20
- package/dist/cli/commands/upload-sourcemaps.js.map +1 -1
- package/dist/cli/index.js +48 -39
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/swc-compile-package.d.ts +2 -2
- package/dist/cli/tasks/swc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/swc-compile-package.js.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts +2 -2
- package/dist/cli/tasks/tsc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.js +1 -1
- package/dist/cli/tasks/tsc-compile-package.js.map +1 -1
- package/dist/cli/tasks/tsc-compile.d.ts +2 -2
- package/dist/cli/tasks/tsc-compile.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile.js.map +1 -1
- package/dist/cli/utils/bundle.js +2 -2
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/cli-npm.d.ts +14 -0
- package/dist/cli/utils/cli-npm.d.ts.map +1 -1
- package/dist/cli/utils/cli-npm.js +44 -0
- package/dist/cli/utils/cli-npm.js.map +1 -1
- package/dist/cli/utils/cli-os.d.ts +2 -2
- package/dist/cli/utils/cli-os.d.ts.map +1 -1
- package/dist/cli/utils/cli-os.js +13 -9
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/cli/utils/eslint.d.ts +2 -1
- package/dist/cli/utils/eslint.d.ts.map +1 -1
- package/dist/cli/utils/eslint.js.map +1 -1
- package/dist/cli/utils/index.d.ts +1 -0
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +1 -0
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/is-tty.d.ts +2 -0
- package/dist/cli/utils/is-tty.d.ts.map +1 -0
- package/dist/cli/utils/is-tty.js +15 -0
- package/dist/cli/utils/is-tty.js.map +1 -0
- package/dist/cli/utils/maybe-create-git-folder.d.ts +1 -1
- package/dist/cli/utils/maybe-create-git-folder.d.ts.map +1 -1
- package/dist/cli/utils/maybe-create-git-folder.js +12 -6
- package/dist/cli/utils/maybe-create-git-folder.js.map +1 -1
- package/dist/cli/utils/process-tree.d.ts.map +1 -1
- package/dist/cli/utils/process-tree.js +2 -2
- package/dist/cli/utils/process-tree.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js +2 -1
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/utils/find-packages.d.ts +1 -0
- package/dist/utils/find-packages.d.ts.map +1 -1
- package/dist/utils/find-packages.js.map +1 -1
- package/dist/utils/format-relative-date.d.ts +2 -0
- package/dist/utils/format-relative-date.d.ts.map +1 -0
- package/dist/utils/format-relative-date.js +60 -0
- package/dist/utils/format-relative-date.js.map +1 -0
- package/dist/utils/get-configuration.d.ts +10 -3
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +1 -0
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-jest-config.d.ts.map +1 -1
- package/dist/utils/get-jest-config.js +20 -9
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/utils/get-packages.d.ts +3 -5
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +1 -4
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/get-startup-version.d.ts.map +1 -1
- package/dist/utils/get-startup-version.js +1 -1
- package/dist/utils/get-startup-version.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/omit.d.ts +2 -0
- package/dist/utils/omit.d.ts.map +1 -0
- package/dist/utils/omit.js +28 -0
- package/dist/utils/omit.js.map +1 -0
- package/dist/webpack/configs/loaders/style-loader.d.ts +1 -1
- package/dist/webpack/configs/loaders/style-loader.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +2 -2
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/optimization-config.js +5 -5
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.d.ts.map +1 -1
- package/dist/webpack/configs/output-config.js +14 -7
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +10 -3
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/package.json +26 -20
- package/src/cli/commands/__tests__/build.test.ts +1 -1
- package/src/cli/commands/__tests__/bundle-package.test.ts +22 -2
- package/src/cli/commands/__tests__/install.test.ts +42 -4
- package/src/cli/commands/__tests__/lint.test.ts +1 -1
- package/src/cli/commands/__tests__/mfe-list.test.ts +394 -0
- package/src/cli/commands/__tests__/mfe-publish.test.ts +25 -0
- package/src/cli/commands/__tests__/start.test.ts +1 -1
- package/src/cli/commands/build.ts +14 -10
- package/src/cli/commands/bundle-package.ts +19 -13
- package/src/cli/commands/clean.ts +2 -4
- package/src/cli/commands/convert-eslint-config.ts +3 -5
- package/src/cli/commands/eslint.ts +3 -5
- package/src/cli/commands/get-command.ts +2 -0
- package/src/cli/commands/index.ts +0 -1
- package/src/cli/commands/init.ts +7 -8
- package/src/cli/commands/install.ts +24 -11
- package/src/cli/commands/kendo-ui-license.ts +4 -6
- package/src/cli/commands/lint.ts +19 -19
- package/src/cli/commands/mfe-list.ts +173 -0
- package/src/cli/commands/mfe-package-clean.ts +25 -4
- package/src/cli/commands/mfe-package-publish.ts +33 -4
- package/src/cli/commands/mfe-publish.ts +37 -6
- package/src/cli/commands/prepare-package.ts +3 -5
- package/src/cli/commands/review/review.ts +9 -9
- package/src/cli/commands/run-task.ts +15 -11
- package/src/cli/commands/start.ts +12 -10
- package/src/cli/commands/styles-check.ts +2 -2
- package/src/cli/commands/test/__tests__/tests.test.ts +1 -1
- package/src/cli/commands/test/runners/__tests__/vitest.test.ts +82 -13
- package/src/cli/commands/test/runners/vitest.ts +4 -2
- package/src/cli/commands/test/tests.ts +20 -10
- package/src/cli/commands/types.ts +14 -4
- package/src/cli/commands/upload-sourcemaps.ts +3 -5
- package/src/cli/index.ts +59 -36
- package/src/cli/tasks/swc-compile-package.ts +2 -2
- package/src/cli/tasks/tsc-compile-package.ts +4 -3
- package/src/cli/tasks/tsc-compile.ts +2 -2
- package/src/cli/utils/__tests__/bundle.test.ts +13 -0
- package/src/cli/utils/__tests__/cli-npm.test.ts +89 -0
- package/src/cli/utils/__tests__/is-tty.test.ts +17 -0
- package/src/cli/utils/__tests__/maybe-create-git-folder.test.ts +10 -17
- package/src/cli/utils/__tests__/set-node-options.test.ts +10 -10
- package/src/cli/utils/bundle.ts +2 -2
- package/src/cli/utils/cli-npm.ts +34 -0
- package/src/cli/utils/cli-os.ts +12 -25
- package/src/cli/utils/eslint.ts +2 -1
- package/src/cli/utils/index.ts +1 -0
- package/src/cli/utils/is-tty.ts +3 -0
- package/src/cli/utils/maybe-create-git-folder.ts +10 -8
- package/src/cli/utils/process-tree.ts +4 -2
- package/src/cli/utils/set-node-options.ts +2 -1
- package/src/utils/__tests__/format-relative-date.test.ts +61 -0
- package/src/utils/__tests__/get-jest-config.test.ts +44 -0
- package/src/utils/__tests__/get-packages.test.ts +3 -0
- package/src/utils/find-packages.ts +1 -0
- package/src/utils/format-relative-date.ts +33 -0
- package/src/utils/get-configuration.ts +7 -2
- package/src/utils/get-jest-config.ts +36 -18
- package/src/utils/get-packages.ts +3 -9
- package/src/utils/get-startup-version.ts +1 -3
- package/src/utils/index.ts +2 -0
- package/src/utils/omit.ts +12 -0
- package/src/webpack/__mocks__/style-rules.ts +3 -3
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +6 -14
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +52 -29
- package/src/webpack/configs/loaders/style-loader.ts +5 -2
- package/src/webpack/configs/optimization-config.ts +5 -5
- package/src/webpack/configs/output-config.ts +10 -5
- package/src/webpack/configs/plugins/assets-manifest-plugin.ts +11 -4
- package/dist/cli/commands/get-user-commands.d.ts +0 -7
- package/dist/cli/commands/get-user-commands.d.ts.map +0 -1
- package/dist/cli/commands/get-user-commands.js +0 -27
- package/dist/cli/commands/get-user-commands.js.map +0 -1
- package/src/cli/commands/__tests__/get-user-commands.test.ts +0 -27
- package/src/cli/commands/get-user-commands.ts +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/index.ts"],"sourcesContent":["export * from './build';\nexport * from './bundle-package';\nexport * from './eslint';\nexport * from './get-command';\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/index.ts"],"sourcesContent":["export * from './build';\nexport * from './bundle-package';\nexport * from './eslint';\nexport * from './get-command';\nexport * from './init';\nexport * from './install';\nexport * from './kendo-ui-license';\nexport * from './lint';\nexport * from './prepare-package';\nexport * from './start';\nexport * from './test';\nexport * from './styles-check';\nexport * from './mfe-publish';\nexport type * from './types';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { Command } from './types';
|
|
2
|
-
interface Args {
|
|
1
|
+
import { Command, CommandArgs } from './types';
|
|
2
|
+
interface Args extends CommandArgs {
|
|
3
3
|
output?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare class Init
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export declare class Init extends Command<Args> {
|
|
6
|
+
static readonly description = "Create example project";
|
|
7
|
+
static readonly options: {
|
|
8
|
+
output: {
|
|
9
|
+
string: boolean;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
9
13
|
execute(): Promise<void>;
|
|
10
14
|
cloneRepo(destination: string): Promise<boolean>;
|
|
11
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/C,UAAU,IAAK,SAAQ,WAAW;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,qBAAa,IAAK,SAAQ,OAAO,CAAC,IAAI,CAAC;IACnC,MAAM,CAAC,QAAQ,CAAC,WAAW,4BAA4B;IACvD,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;MAErB;IAGI,OAAO;IAoBP,SAAS,CAAC,WAAW,EAAE,MAAM;CAWtC"}
|
|
@@ -12,6 +12,7 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
|
12
12
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
13
13
|
const _utils = require("../../utils");
|
|
14
14
|
const _utils1 = require("../utils");
|
|
15
|
+
const _types = require("./types");
|
|
15
16
|
function _define_property(obj, key, value) {
|
|
16
17
|
if (key in obj) {
|
|
17
18
|
Object.defineProperty(obj, key, {
|
|
@@ -40,10 +41,7 @@ function _ts_metadata(k, v) {
|
|
|
40
41
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
41
42
|
}
|
|
42
43
|
const REPO_NAME = 'frontend-example';
|
|
43
|
-
class Init {
|
|
44
|
-
description() {
|
|
45
|
-
return 'create example project';
|
|
46
|
-
}
|
|
44
|
+
class Init extends _types.Command {
|
|
47
45
|
async execute() {
|
|
48
46
|
var _this_args_output;
|
|
49
47
|
const destination = _path.default.resolve((_this_args_output = this.args.output) !== null && _this_args_output !== void 0 ? _this_args_output : '.');
|
|
@@ -82,11 +80,14 @@ class Init {
|
|
|
82
80
|
_fs.default.rmSync(_path.default.join(destination, 'package-lock.json'));
|
|
83
81
|
return true;
|
|
84
82
|
}
|
|
85
|
-
constructor(args){
|
|
86
|
-
_define_property(this, "args", void 0);
|
|
87
|
-
this.args = args;
|
|
88
|
-
}
|
|
89
83
|
}
|
|
84
|
+
_define_property(Init, "description", 'Create example project');
|
|
85
|
+
_define_property(Init, "options", {
|
|
86
|
+
output: {
|
|
87
|
+
string: true,
|
|
88
|
+
description: 'Output path'
|
|
89
|
+
}
|
|
90
|
+
});
|
|
90
91
|
_ts_decorate([
|
|
91
92
|
_utils.logErrors,
|
|
92
93
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/init.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport { log, logErrors } from '../../utils';\nimport { gitCloneRepo, gitIsReachable } from '../utils';\nimport { Command } from './types';\n\ninterface Args {\n output?: string;\n}\n\nconst REPO_NAME = 'frontend-example';\n\nexport class Init
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/init.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\n\nimport { log, logErrors } from '../../utils';\nimport { gitCloneRepo, gitIsReachable } from '../utils';\nimport { Command, CommandArgs } from './types';\n\ninterface Args extends CommandArgs {\n output?: string;\n}\n\nconst REPO_NAME = 'frontend-example';\n\nexport class Init extends Command<Args> {\n static readonly description = 'Create example project';\n static readonly options = {\n output: { string: true, description: 'Output path' },\n };\n\n @logErrors\n async execute() {\n const destination = path.resolve(this.args.output ?? '.');\n if (!fs.existsSync(destination)) {\n fs.mkdirSync(destination, { recursive: true });\n } else if (!fs.lstatSync(destination).isDirectory()) {\n throw new Error(`${destination} is not a directory`);\n } else if (fs.readdirSync(destination).length !== 0) {\n throw new Error(`${destination} is not an empty directory`);\n }\n\n if (await this.cloneRepo(destination)) {\n log.info(`copied example project to ${destination}`);\n return;\n }\n\n if (!gitIsReachable({ name: REPO_NAME })) {\n throw new Error(`could not read servicetitan/${REPO_NAME} repository`);\n }\n }\n\n async cloneRepo(destination: string) {\n const ok = await gitCloneRepo({ destination, name: REPO_NAME });\n if (!ok) {\n return false;\n }\n\n fs.rmSync(path.join(destination, '.git'), { recursive: true, force: true });\n fs.rmSync(path.join(destination, '.github', 'CODEOWNERS'));\n fs.rmSync(path.join(destination, 'package-lock.json'));\n return true;\n }\n}\n"],"names":["Init","REPO_NAME","Command","execute","destination","path","resolve","args","output","fs","existsSync","mkdirSync","recursive","lstatSync","isDirectory","Error","readdirSync","length","cloneRepo","log","info","gitIsReachable","name","ok","gitCloneRepo","rmSync","join","force","description","options","string"],"mappings":";;;;+BAaaA;;;eAAAA;;;2DAbE;6DACE;uBAEc;wBACc;uBACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMrC,MAAMC,YAAY;AAEX,MAAMD,aAAaE,cAAO;IAM7B,MACMC,UAAU;YACqB;QAAjC,MAAMC,cAAcC,aAAI,CAACC,OAAO,CAAC,CAAA,oBAAA,IAAI,CAACC,IAAI,CAACC,MAAM,cAAhB,+BAAA,oBAAoB;QACr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
|
3
|
-
quiet?: boolean;
|
|
1
|
+
import { Command, CommandArgs } from './types';
|
|
2
|
+
interface Args extends CommandArgs {
|
|
4
3
|
fix?: boolean;
|
|
4
|
+
quiet?: boolean;
|
|
5
5
|
token?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare class Install
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export declare class Install extends Command<Args> {
|
|
8
|
+
static readonly description = "Install project dependencies";
|
|
9
|
+
static readonly options: {
|
|
10
|
+
fix: {
|
|
11
|
+
boolean: boolean;
|
|
12
|
+
describe: string;
|
|
13
|
+
hidden: boolean;
|
|
14
|
+
};
|
|
15
|
+
quite: {
|
|
16
|
+
boolean: boolean;
|
|
17
|
+
describe: string;
|
|
18
|
+
hidden: boolean;
|
|
19
|
+
};
|
|
20
|
+
token: {
|
|
21
|
+
boolean: boolean;
|
|
22
|
+
describe: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
11
25
|
execute(): Promise<void>;
|
|
12
26
|
private configureNpmToken;
|
|
13
27
|
private fetchNpmToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG/C,UAAU,IAAK,SAAQ,WAAW;IAC9B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAMD,qBAAa,OAAQ,SAAQ,OAAO,CAAC,IAAI,CAAC;IACtC,MAAM,CAAC,QAAQ,CAAC,WAAW,kCAAkC;IAC7D,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;MAIrB;IAGI,OAAO;YAcC,iBAAiB;YAsCjB,aAAa;IAqC3B,OAAO,CAAC,eAAe;CAyB1B"}
|
|
@@ -13,6 +13,7 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
|
13
13
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
14
14
|
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
|
15
15
|
const _utils = require("../../utils");
|
|
16
|
+
const _types = require("./types");
|
|
16
17
|
const _utils1 = require("../utils");
|
|
17
18
|
function _define_property(obj, key, value) {
|
|
18
19
|
if (key in obj) {
|
|
@@ -44,27 +45,35 @@ function _ts_metadata(k, v) {
|
|
|
44
45
|
const REPO_NAME = 'frontend-dev-config';
|
|
45
46
|
const AUTH_TOKEN_KEY = '//registry.npmjs.org/:_authToken';
|
|
46
47
|
const AUTH_TOKEN_REGEX = /^\/\/registry\.npmjs\.org\/:_authToken=\s*\${([^}]+)}/m;
|
|
47
|
-
class Install {
|
|
48
|
-
description() {
|
|
49
|
-
return 'install project dependencies';
|
|
50
|
-
}
|
|
48
|
+
class Install extends _types.Command {
|
|
51
49
|
async execute() {
|
|
52
|
-
var _this_args;
|
|
50
|
+
var _this_args, _this_args1;
|
|
53
51
|
if (!((_this_args = this.args) === null || _this_args === void 0 ? void 0 : _this_args.quiet)) {
|
|
54
52
|
_utils.log.info(`startup cli v${(0, _utils.getStartupVersion)()}`);
|
|
55
53
|
}
|
|
56
54
|
const env = await this.configureNpmToken();
|
|
57
|
-
this.
|
|
55
|
+
if (((_this_args1 = this.args) === null || _this_args1 === void 0 ? void 0 : _this_args1.token) !== true) {
|
|
56
|
+
this.installPackages(env);
|
|
57
|
+
}
|
|
58
58
|
return Promise.resolve(); // stops "async method has no 'await' expression" lint error
|
|
59
59
|
}
|
|
60
60
|
async configureNpmToken() {
|
|
61
|
-
var _this_args, _this_args1, _this_args2;
|
|
61
|
+
var _this_args, _this_args1, _this_args2, _this_args3;
|
|
62
62
|
if ((0, _utils1.isCI)() || ((_this_args = this.args) === null || _this_args === void 0 ? void 0 : _this_args.fix) || ((_this_args1 = this.args) === null || _this_args1 === void 0 ? void 0 : _this_args1.token) === false) {
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
if (!((_this_args2 = this.args) === null || _this_args2 === void 0 ? void 0 : _this_args2.quiet)) {
|
|
66
66
|
_utils.log.info('Configuring NPM token ...');
|
|
67
67
|
}
|
|
68
|
+
if (((_this_args3 = this.args) === null || _this_args3 === void 0 ? void 0 : _this_args3.token) !== true) {
|
|
69
|
+
const npmUser = (0, _utils1.npmWhoAmI)();
|
|
70
|
+
/* istanbul ignore next: debug only */ _utils.log.debug('install:npm-user', ()=>JSON.stringify({
|
|
71
|
+
npmUser
|
|
72
|
+
}));
|
|
73
|
+
if (npmUser === 'st-team') {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
68
77
|
const token = await this.fetchNpmToken();
|
|
69
78
|
if (!token) {
|
|
70
79
|
return;
|
|
@@ -148,11 +157,24 @@ class Install {
|
|
|
148
157
|
stdio: 'inherit'
|
|
149
158
|
});
|
|
150
159
|
}
|
|
151
|
-
constructor(args){
|
|
152
|
-
_define_property(this, "args", void 0);
|
|
153
|
-
this.args = args;
|
|
154
|
-
}
|
|
155
160
|
}
|
|
161
|
+
_define_property(Install, "description", 'Install project dependencies');
|
|
162
|
+
_define_property(Install, "options", {
|
|
163
|
+
fix: {
|
|
164
|
+
boolean: true,
|
|
165
|
+
describe: 'Update and dedupe package-lock.json',
|
|
166
|
+
hidden: true
|
|
167
|
+
},
|
|
168
|
+
quite: {
|
|
169
|
+
boolean: true,
|
|
170
|
+
describe: 'Suppress output',
|
|
171
|
+
hidden: true
|
|
172
|
+
},
|
|
173
|
+
token: {
|
|
174
|
+
boolean: true,
|
|
175
|
+
describe: 'Configure npm token'
|
|
176
|
+
}
|
|
177
|
+
});
|
|
156
178
|
_ts_decorate([
|
|
157
179
|
_utils.logErrors,
|
|
158
180
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/install.ts"],"sourcesContent":["import { execSync } from 'child_process';\nimport fs from 'fs';\nimport path from 'path';\nimport os from 'os';\nimport { log, logErrors, getStartupVersion, readJsonSafe } from '../../utils';\nimport { Command } from './types';\nimport { gitCloneRepo, isCI } from '../utils';\n\ninterface Args {\n
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/install.ts"],"sourcesContent":["import { execSync } from 'child_process';\nimport fs from 'fs';\nimport path from 'path';\nimport os from 'os';\nimport { log, logErrors, getStartupVersion, readJsonSafe } from '../../utils';\nimport { Command, CommandArgs } from './types';\nimport { gitCloneRepo, isCI, npmWhoAmI } from '../utils';\n\ninterface Args extends CommandArgs {\n fix?: boolean;\n quiet?: boolean;\n token?: boolean;\n}\n\nconst REPO_NAME = 'frontend-dev-config';\nconst AUTH_TOKEN_KEY = '//registry.npmjs.org/:_authToken';\nconst AUTH_TOKEN_REGEX = /^\\/\\/registry\\.npmjs\\.org\\/:_authToken=\\s*\\${([^}]+)}/m;\n\nexport class Install extends Command<Args> {\n static readonly description = 'Install project dependencies';\n static readonly options = {\n fix: { boolean: true, describe: 'Update and dedupe package-lock.json', hidden: true },\n quite: { boolean: true, describe: 'Suppress output', hidden: true },\n token: { boolean: true, describe: 'Configure npm token' },\n };\n\n @logErrors\n async execute() {\n if (!this.args?.quiet) {\n log.info(`startup cli v${getStartupVersion()}`);\n }\n\n const env = await this.configureNpmToken();\n\n if (this.args?.token !== true) {\n this.installPackages(env);\n }\n\n return Promise.resolve(); // stops \"async method has no 'await' expression\" lint error\n }\n\n private async configureNpmToken() {\n if (isCI() || this.args?.fix || this.args?.token === false) {\n return;\n }\n\n if (!this.args?.quiet) {\n log.info('Configuring NPM token ...');\n }\n\n if (this.args?.token !== true) {\n const npmUser = npmWhoAmI();\n /* istanbul ignore next: debug only */\n log.debug('install:npm-user', () => JSON.stringify({ npmUser }));\n if (npmUser === 'st-team') {\n return;\n }\n }\n\n const token = await this.fetchNpmToken();\n if (!token) {\n return;\n }\n\n execSync(`npm config set \"${AUTH_TOKEN_KEY}\"=\"${token}\"`);\n\n if (!fs.existsSync('.npmrc')) {\n return;\n }\n\n const npmrc = fs.readFileSync('.npmrc', 'utf-8');\n const match = AUTH_TOKEN_REGEX.exec(npmrc);\n if (match) {\n return { [match[1]]: token };\n }\n\n execSync(`npm config delete --location=project \"${AUTH_TOKEN_KEY}\"`);\n }\n\n private async fetchNpmToken() {\n const tempDirPath = fs.mkdtempSync(path.join(os.tmpdir(), 'st-install-'));\n try {\n if (!(await gitCloneRepo({ destination: tempDirPath, name: REPO_NAME }))) {\n throw new Error(`could not clone servicetitan/${REPO_NAME}`);\n }\n\n const npmJson = readJsonSafe(path.join(tempDirPath, '.npm.json'));\n\n /* istanbul ignore next: debug only */\n log.debug('install:fetch-token', () => JSON.stringify(npmJson, null, 2));\n\n if (!((npmJson && typeof npmJson === 'object') || Array.isArray(npmJson))) {\n throw new Error('.npm.json is not an object');\n }\n\n const { readOnlyToken: authToken } = npmJson;\n if (!authToken) {\n throw new Error('.npm.json does not contain auth token');\n }\n\n if (typeof authToken !== 'string') {\n throw new Error('.npm.json auth token is not a string');\n }\n\n return Buffer.from(authToken, 'base64').toString('utf-8');\n } catch (e) {\n log.warning(String(e));\n } finally {\n try {\n fs.rmSync(tempDirPath, { recursive: true, force: true });\n } catch {\n // ignore\n }\n }\n }\n\n private installPackages(env?: Record<string, string>) {\n /* istanbul ignore next: debug only */\n log.debug('install:install-packages', () => JSON.stringify({ env }));\n\n /**\n * Note, if these are changed, update bootstrap.js to match\n * @see {@link file://./../../../../../bootstrap.js}\n */\n const npmArguments = [\n isCI() ? 'ci' : 'i',\n '--audit=false',\n '--fund=false',\n '--legacy-peer-deps',\n ...(this.args?.fix ? ['--package-lock-only', '--prefer-dedupe'] : []),\n ].join(' ');\n\n if (!this.args?.quiet) {\n log.info(`Running npm ${npmArguments} ...`);\n }\n\n execSync(`npm ${npmArguments}`, {\n ...(env ? { env: { ...process.env, ...env } } : {}),\n stdio: 'inherit',\n });\n }\n}\n"],"names":["Install","REPO_NAME","AUTH_TOKEN_KEY","AUTH_TOKEN_REGEX","Command","execute","args","quiet","log","info","getStartupVersion","env","configureNpmToken","token","installPackages","Promise","resolve","isCI","fix","npmUser","npmWhoAmI","debug","JSON","stringify","fetchNpmToken","execSync","fs","existsSync","npmrc","readFileSync","match","exec","tempDirPath","mkdtempSync","path","join","os","tmpdir","gitCloneRepo","destination","name","Error","npmJson","readJsonSafe","Array","isArray","readOnlyToken","authToken","Buffer","from","toString","e","warning","String","rmSync","recursive","force","npmArguments","process","stdio","description","options","boolean","describe","hidden","quite"],"mappings":";;;;+BAkBaA;;;eAAAA;;;+BAlBY;2DACV;6DACE;2DACF;uBACiD;uBAC3B;wBACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQ9C,MAAMC,YAAY;AAClB,MAAMC,iBAAiB;AACvB,MAAMC,mBAAmB;AAElB,MAAMH,gBAAgBI,cAAO;IAQhC,MACMC,UAAU;YACP,YAMD;QANJ,IAAI,GAAC,aAAA,IAAI,CAACC,IAAI,cAAT,iCAAA,WAAWC,KAAK,GAAE;YACnBC,UAAG,CAACC,IAAI,CAAC,CAAC,aAAa,EAAEC,IAAAA,wBAAiB,KAAI;QAClD;QAEA,MAAMC,MAAM,MAAM,IAAI,CAACC,iBAAiB;QAExC,IAAI,EAAA,cAAA,IAAI,CAACN,IAAI,cAAT,kCAAA,YAAWO,KAAK,MAAK,MAAM;YAC3B,IAAI,CAACC,eAAe,CAACH;QACzB;QAEA,OAAOI,QAAQC,OAAO,IAAI,4DAA4D;IAC1F;IAEA,MAAcJ,oBAAoB;YAChB,YAAkB,aAI3B,aAID;QARJ,IAAIK,IAAAA,YAAI,SAAM,aAAA,IAAI,CAACX,IAAI,cAAT,iCAAA,WAAWY,GAAG,KAAI,EAAA,cAAA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,IAAAA,uBAAQ,EAAC,CAAC,IAAI,EAAEgC,cAAc,EAAE;YAC5B,GAAI9C,MAAM;gBAAEA,KAAK;oBAAE,GAAG+C,QAAQ/C,GAAG;oBAAE,GAAGA,GAAG;gBAAC;YAAE,IAAI,CAAC,CAAC;YAClDgD,OAAO;QACX;IACJ;AACJ;AA1HI,iBADS3D,SACO4D,eAAc;AAC9B,iBAFS5D,SAEO6D,WAAU;IACtB3C,KAAK;QAAE4C,SAAS;QAAMC,UAAU;QAAuCC,QAAQ;IAAK;IACpFC,OAAO;QAAEH,SAAS;QAAMC,UAAU;QAAmBC,QAAQ;IAAK;IAClEnD,OAAO;QAAEiD,SAAS;QAAMC,UAAU;IAAsB;AAC5D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Command } from '
|
|
2
|
-
export declare class KendoUILicense
|
|
3
|
-
description
|
|
1
|
+
import { Command } from './types';
|
|
2
|
+
export declare class KendoUILicense extends Command {
|
|
3
|
+
static readonly description = "Install KendoReact license key";
|
|
4
4
|
execute(): Promise<void>;
|
|
5
5
|
private activateLicense;
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kendo-ui-license.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/kendo-ui-license.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"kendo-ui-license.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/kendo-ui-license.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA2BlC,qBAAa,cAAe,SAAQ,OAAO;IACvC,MAAM,CAAC,QAAQ,CAAC,WAAW,oCAAoC;IAEzD,OAAO;YASC,eAAe;CAoBhC;AAED,wBAAsB,cAAc,kBAEnC"}
|
|
@@ -19,6 +19,20 @@ _export(exports, {
|
|
|
19
19
|
const _execa = /*#__PURE__*/ _interop_require_default(require("execa"));
|
|
20
20
|
const _utils = require("../../utils");
|
|
21
21
|
const _utils1 = require("../utils");
|
|
22
|
+
const _types = require("./types");
|
|
23
|
+
function _define_property(obj, key, value) {
|
|
24
|
+
if (key in obj) {
|
|
25
|
+
Object.defineProperty(obj, key, {
|
|
26
|
+
value: value,
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
obj[key] = value;
|
|
33
|
+
}
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
22
36
|
function _interop_require_default(obj) {
|
|
23
37
|
return obj && obj.__esModule ? obj : {
|
|
24
38
|
default: obj
|
|
@@ -57,10 +71,7 @@ const ENCODED_LICENSE = `
|
|
|
57
71
|
const ENVIRONMENT_VARIABLE = 'KENDO_UI_LICENSE';
|
|
58
72
|
const LICENSE = Buffer.from(ENCODED_LICENSE, 'base64').toString('ascii');
|
|
59
73
|
const LICENSING_PACKAGE = '@progress/kendo-licensing';
|
|
60
|
-
class KendoUILicense {
|
|
61
|
-
description() {
|
|
62
|
-
return 'install KendoReact license key';
|
|
63
|
-
}
|
|
74
|
+
class KendoUILicense extends _types.Command {
|
|
64
75
|
async execute() {
|
|
65
76
|
if (!(0, _utils1.isModuleInstalled)(LICENSING_PACKAGE)) {
|
|
66
77
|
return;
|
|
@@ -86,6 +97,7 @@ class KendoUILicense {
|
|
|
86
97
|
}
|
|
87
98
|
}
|
|
88
99
|
}
|
|
100
|
+
_define_property(KendoUILicense, "description", 'Install KendoReact license key');
|
|
89
101
|
_ts_decorate([
|
|
90
102
|
_utils.logErrors,
|
|
91
103
|
_ts_metadata("design:type", Function),
|
|
@@ -93,7 +105,7 @@ _ts_decorate([
|
|
|
93
105
|
_ts_metadata("design:returntype", Promise)
|
|
94
106
|
], KendoUILicense.prototype, "activateLicense", null);
|
|
95
107
|
async function kendoUILicense() {
|
|
96
|
-
return new KendoUILicense().execute();
|
|
108
|
+
return new KendoUILicense({}).execute();
|
|
97
109
|
}
|
|
98
110
|
|
|
99
111
|
//# sourceMappingURL=kendo-ui-license.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/kendo-ui-license.ts"],"sourcesContent":["import execa from 'execa';\n\nimport { log, logErrors } from '../../utils';\nimport { isModuleInstalled } from '../utils';\nimport { Command } from '
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/kendo-ui-license.ts"],"sourcesContent":["import execa from 'execa';\n\nimport { log, logErrors } from '../../utils';\nimport { isModuleInstalled } from '../utils';\nimport { Command } from './types';\n\nconst ENCODED_LICENSE = `\n ZXlKaGJHY2lPaUpTVXpJMU5pSXNJblI1Y0NJNklreEpReUo5LmV5SndjbTlrZFdOMGN5STZXM3Np\n ZEhKcFlXd2lPbVpoYkhObExDSmpiMlJsSWpvaVMwVk9SRTlWU1ZKRlFVTlVJaXdpYkdsalpXNXpa\n VVY0Y0dseVlYUnBiMjVFWVhSbElqb3hOelEwT1RneU1USXdmU3g3SW5SeWFXRnNJanBtWVd4elpT\n d2lZMjlrWlNJNklrdEZUa1JQVlVsRFQwMVFURVZVUlNJc0lteHBZMlZ1YzJWRmVIQnBjbUYwYVc5\n dVJHRjBaU0k2TVRjME5EazRNakV5TUgwc2V5SjBjbWxoYkNJNlptRnNjMlVzSW1OdlpHVWlPaUpM\n UlU1RVQxVkpWbFZGSWl3aWJHbGpaVzV6WlVWNGNHbHlZWFJwYjI1RVlYUmxJam94TnpRME9UZ3lN\n VEl3ZlN4N0luUnlhV0ZzSWpwbVlXeHpaU3dpWTI5a1pTSTZJa3RGVGtSUFZVbEJUa2RWVEVGU0lp\n d2liR2xqWlc1elpVVjRjR2x5WVhScGIyNUVZWFJsSWpveE56UTBPVGd5TVRJd2ZWMHNJbWx1ZEdW\n bmNtbDBlU0k2SWxFNFpEVkdkMnR2Y1dsdWRGTkZiVXhYTTNwSVVuaDZiVTU1UVQwaUxDSnNhV05s\n Ym5ObFNHOXNaR1Z5SWpvaVlXTm9hWFpwWTJoNVlXNUFjMlZ5ZG1salpYUnBkR0Z1TG1OdmJTSXNJ\n bWxoZENJNk1UY3hPVFV5T0RnNU1pd2lZWFZrSWpvaVlXTm9hWFpwWTJoNVlXNUFjMlZ5ZG1salpY\n UnBkR0Z1TG1OdmJTSXNJblZ6WlhKSlpDSTZJalUxWXpsak1tSXpMVE5rWkRVdE5ETTVZeTA0Tm1V\n eUxXRTBNV0V6T0RReE5HSXdZaUo5LlE5Yi10em9CNXFFRVV0QXZudTJGVFdULVBram0yeFFxVGll\n T29rWjA3dmd6VFJVLXVnRHoxb2l3VTUzNTNzajhaQ2FQUFUzdTZqWnhsOWU0dXVJdkxpV05ManFW\n N29pR2FoVHhXbm0ydTAzZkxZUWhxbUg2T3dmYjBxcWs0TnFwbWRfZDhwZmtJa3J4YXRlY3FCdjBl\n UVk1N3Zjd3FOLVRqZm0td0FxMmt6RXRZd3NFT0JlMGtyLTFqVzBjYzBudHJadmZEcEVYLUFGZVE1\n cF95MzhxQkJucFBvVjlOYXB0Mi1aN0JMdTZhdEVDUUIxd3FDSjdCdUlpZERBWVlxdGhvU0gxOEZE\n V29BdUhQNU9DbjM3ZENBQU1PVFlqOEJUdDdLNWlyNHR6R0ZVNTdxY2VKeTNRQUhjWlNURGxpZnU5\n cXVKMjkyQnJuS3FveGlLUDA3UXIxUQ==\n`.replace(/\\s/g, '');\nconst ENVIRONMENT_VARIABLE = 'KENDO_UI_LICENSE';\nconst LICENSE = Buffer.from(ENCODED_LICENSE, 'base64').toString('ascii');\nconst LICENSING_PACKAGE = '@progress/kendo-licensing';\n\nexport class KendoUILicense extends Command {\n static readonly description = 'Install KendoReact license key';\n\n async execute() {\n if (!isModuleInstalled(LICENSING_PACKAGE)) {\n return;\n }\n\n await this.activateLicense();\n }\n\n @logErrors\n private async activateLicense() {\n const env = !process.env[ENVIRONMENT_VARIABLE]\n ? { [ENVIRONMENT_VARIABLE]: LICENSE }\n : undefined;\n\n log.info(\n env\n ? 'Activating Kendo UI with embedded license...'\n : `Activating Kendo UI with license from environment...`\n );\n\n try {\n await execa('npx', ['kendo-ui-license', 'activate', '--no-install'], {\n env,\n stdio: 'inherit',\n });\n } catch (error: any) {\n throw new Error(`command failed with exit code ${error.exitCode}`);\n }\n }\n}\n\nexport async function kendoUILicense() {\n return new KendoUILicense({}).execute();\n}\n"],"names":["KendoUILicense","kendoUILicense","ENCODED_LICENSE","replace","ENVIRONMENT_VARIABLE","LICENSE","Buffer","from","toString","LICENSING_PACKAGE","Command","execute","isModuleInstalled","activateLicense","env","process","undefined","log","info","execa","stdio","error","Error","exitCode","description"],"mappings":";;;;;;;;;;;QA+BaA;eAAAA;;QAkCSC;eAAAA;;;8DAjEJ;uBAEa;wBACG;uBACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExB,MAAMC,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;AAoBzB,CAAC,CAACC,OAAO,CAAC,OAAO;AACjB,MAAMC,uBAAuB;AAC7B,MAAMC,UAAUC,OAAOC,IAAI,CAACL,iBAAiB,UAAUM,QAAQ,CAAC;AAChE,MAAMC,oBAAoB;AAEnB,MAAMT,uBAAuBU,cAAO;IAGvC,MAAMC,UAAU;QACZ,IAAI,CAACC,IAAAA,yBAAiB,EAACH,oBAAoB;YACvC;QACJ;QAEA,MAAM,IAAI,CAACI,eAAe;IAC9B;IAEA,MACcA,kBAAkB;QAC5B,MAAMC,MAAM,CAACC,QAAQD,GAAG,CAACV,qBAAqB,GACxC;YAAE,CAACA,qBAAqB,EAAEC;QAAQ,IAClCW;QAENC,UAAG,CAACC,IAAI,CACJJ,MACM,iDACA,CAAC,oDAAoD,CAAC;QAGhE,IAAI;YACA,MAAMK,IAAAA,cAAK,EAAC,OAAO;gBAAC;gBAAoB;gBAAY;aAAe,EAAE;gBACjEL;gBACAM,OAAO;YACX;QACJ,EAAE,OAAOC,OAAY;YACjB,MAAM,IAAIC,MAAM,CAAC,8BAA8B,EAAED,MAAME,QAAQ,EAAE;QACrE;IACJ;AACJ;AA/BI,iBADSvB,gBACOwB,eAAc;;;;;;;AAiC3B,eAAevB;IAClB,OAAO,IAAID,eAAe,CAAC,GAAGW,OAAO;AACzC"}
|
|
@@ -1,26 +1,45 @@
|
|
|
1
|
-
import { Command } from '
|
|
2
|
-
interface Args {
|
|
1
|
+
import { Command, CommandArgs } from './types';
|
|
2
|
+
interface Args extends CommandArgs {
|
|
3
3
|
_: string[];
|
|
4
|
-
/** Apply fixes for issues? */
|
|
5
4
|
fix?: boolean;
|
|
6
|
-
/** Packages to lint */
|
|
7
5
|
scope?: string | string[];
|
|
8
|
-
/** Packages to skip */
|
|
9
6
|
ignore?: string | string[];
|
|
10
|
-
/** Run eslint separately for each package? */
|
|
11
7
|
parallel?: boolean;
|
|
8
|
+
paths?: string[];
|
|
12
9
|
}
|
|
13
|
-
export declare class Lint
|
|
14
|
-
|
|
15
|
-
readonly greedy = true;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
export declare class Lint extends Command<Args> {
|
|
11
|
+
static readonly description = "Run eslint and stylelint";
|
|
12
|
+
static readonly greedy = true;
|
|
13
|
+
static readonly options: {
|
|
14
|
+
_: {
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
fix: {
|
|
18
|
+
boolean: boolean;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
scope: {
|
|
22
|
+
array: boolean;
|
|
23
|
+
hidden: boolean;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
ignore: {
|
|
27
|
+
array: boolean;
|
|
28
|
+
hidden: boolean;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
parallel: {
|
|
32
|
+
boolean: boolean;
|
|
33
|
+
hidden: boolean;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
19
37
|
execute(): Promise<void>;
|
|
20
38
|
private eslint;
|
|
21
39
|
private stylelint;
|
|
22
40
|
private checkStyles;
|
|
23
41
|
private useParallelESLint;
|
|
42
|
+
private get paths();
|
|
24
43
|
}
|
|
25
44
|
export {};
|
|
26
45
|
//# sourceMappingURL=lint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/lint.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG/C,UAAU,IAAK,SAAQ,WAAW;IAC9B,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,qBAAa,IAAK,SAAQ,OAAO,CAAC,IAAI,CAAC;IACnC,MAAM,CAAC,QAAQ,CAAC,WAAW,8BAA8B;IACzD,MAAM,CAAC,QAAQ,CAAC,MAAM,QAAQ;IAC9B,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;MAMrB;IAEI,OAAO;YAOC,MAAM;YAoBN,SAAS;YA6CT,WAAW;IAYzB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,KAAK,KAAK,GAGhB;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */ "use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "Lint", {
|
|
|
11
11
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
12
|
const _stylelint = /*#__PURE__*/ _interop_require_default(require("stylelint"));
|
|
13
13
|
const _utils = require("../../utils");
|
|
14
|
+
const _types = require("./types");
|
|
14
15
|
const _utils1 = require("../utils");
|
|
15
16
|
function _define_property(obj, key, value) {
|
|
16
17
|
if (key in obj) {
|
|
@@ -39,10 +40,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
39
40
|
function _ts_metadata(k, v) {
|
|
40
41
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
41
42
|
}
|
|
42
|
-
class Lint {
|
|
43
|
-
description() {
|
|
44
|
-
return 'run eslint and stylelint';
|
|
45
|
-
}
|
|
43
|
+
class Lint extends _types.Command {
|
|
46
44
|
async execute() {
|
|
47
45
|
await this.checkStyles();
|
|
48
46
|
await this.eslint();
|
|
@@ -135,17 +133,40 @@ class Lint {
|
|
|
135
133
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
136
134
|
return !this.paths.length && (parallel || (scope === null || scope === void 0 ? void 0 : scope.length) || (ignore === null || ignore === void 0 ? void 0 : ignore.length));
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
this.greedy = true;
|
|
144
|
-
this.paths = [
|
|
145
|
-
...args._
|
|
136
|
+
get paths() {
|
|
137
|
+
const { _, paths = [] } = this.args;
|
|
138
|
+
return [
|
|
139
|
+
..._,
|
|
140
|
+
...paths
|
|
146
141
|
];
|
|
147
142
|
}
|
|
148
143
|
}
|
|
144
|
+
_define_property(Lint, "description", 'Run eslint and stylelint');
|
|
145
|
+
_define_property(Lint, "greedy", true);
|
|
146
|
+
_define_property(Lint, "options", {
|
|
147
|
+
_: {
|
|
148
|
+
description: '[paths...]'
|
|
149
|
+
},
|
|
150
|
+
fix: {
|
|
151
|
+
boolean: true,
|
|
152
|
+
description: 'Apply fixes for issues?'
|
|
153
|
+
},
|
|
154
|
+
scope: {
|
|
155
|
+
array: true,
|
|
156
|
+
hidden: true,
|
|
157
|
+
description: 'Packages to lint'
|
|
158
|
+
},
|
|
159
|
+
ignore: {
|
|
160
|
+
array: true,
|
|
161
|
+
hidden: true,
|
|
162
|
+
description: 'Packages to skip'
|
|
163
|
+
},
|
|
164
|
+
parallel: {
|
|
165
|
+
boolean: true,
|
|
166
|
+
hidden: true,
|
|
167
|
+
description: 'Lint each package separately'
|
|
168
|
+
}
|
|
169
|
+
});
|
|
149
170
|
_ts_decorate([
|
|
150
171
|
_utils.logErrors,
|
|
151
172
|
_ts_metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/commands/lint.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/commands/lint.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport path from 'path';\n\nimport stylelint from 'stylelint';\n\nimport {\n getDestinationFolders,\n getPackages,\n getStylelintConfiguration,\n log,\n logErrors,\n} from '../../utils';\nimport { Command, CommandArgs } from './types';\nimport { eslint, lernaExec } from '../utils';\n\ninterface Args extends CommandArgs {\n _: string[];\n fix?: boolean;\n scope?: string | string[];\n ignore?: string | string[];\n parallel?: boolean;\n paths?: string[];\n}\n\nexport class Lint extends Command<Args> {\n static readonly description = 'Run eslint and stylelint';\n static readonly greedy = true;\n static readonly options = {\n _: { description: '[paths...]' },\n fix: { boolean: true, description: 'Apply fixes for issues?' },\n scope: { array: true, hidden: true, description: 'Packages to lint' },\n ignore: { array: true, hidden: true, description: 'Packages to skip' },\n parallel: { boolean: true, hidden: true, description: 'Lint each package separately' },\n };\n\n async execute() {\n await this.checkStyles();\n await this.eslint();\n await this.stylelint();\n }\n\n @logErrors\n private async eslint() {\n if (this.useParallelESLint()) {\n const { fix, ignore, scope } = this.args;\n const packages = getPackages({ scope, ignore });\n const args = fix ? ['--fix'] : [];\n\n await lernaExec({\n 'cmd': 'startup eslint',\n 'scope': packages.map(({ name }) => name),\n 'bail': false,\n '--': args,\n });\n return;\n }\n\n log.info('Running eslint...');\n await eslint({ fix: this.args.fix, paths: this.paths });\n }\n\n @logErrors\n private async stylelint() {\n const { disabled, ...config } = getStylelintConfiguration();\n if (disabled) {\n return;\n }\n\n const { fix } = this.args;\n const { paths } = this;\n\n log.info('Running stylelint...');\n const allowedExtensions = ['css', 'scss', 'less'];\n const glob = `**/*.{${allowedExtensions.join(',')}}`;\n let files = paths.reduce((result, path) => {\n const extension = path.split('.').pop();\n if (extension) {\n if (allowedExtensions.includes(extension.toLowerCase())) {\n result.push(path);\n }\n } else {\n result.push(pathUniJoin(path, glob));\n }\n return result;\n }, new Array<string>());\n\n if (!files.length) {\n files = [glob];\n }\n\n const { report, errored } = await stylelint.lint({\n files,\n ignorePattern: ['node_modules', ...getDestinationFolders()],\n formatter: 'string',\n fix,\n quietDeprecationWarnings: true,\n ...config,\n });\n\n process.stdout.write(report);\n\n if (errored) {\n process.exitCode = 1;\n }\n }\n\n @logErrors\n private async checkStyles() {\n const { ignore, scope } = this.args;\n\n const packages = getPackages({ ignore, scope });\n\n await lernaExec({\n cmd: 'startup styles-check',\n scope: packages.map(({ name }) => name),\n stream: true,\n });\n }\n\n private useParallelESLint() {\n const { parallel, scope, ignore } = this.args;\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n return !this.paths.length && (parallel || scope?.length || ignore?.length);\n }\n\n private get paths() {\n const { _, paths = [] } = this.args;\n return [..._, ...paths];\n }\n}\n\nfunction pathUniJoin(...chunks: string[]) {\n return path.join(...chunks).replace(/\\\\/g, '/');\n}\n"],"names":["Lint","Command","execute","checkStyles","eslint","stylelint","useParallelESLint","fix","ignore","scope","args","packages","getPackages","lernaExec","map","name","log","info","paths","disabled","config","getStylelintConfiguration","allowedExtensions","glob","join","files","reduce","result","path","extension","split","pop","includes","toLowerCase","push","pathUniJoin","Array","length","report","errored","lint","ignorePattern","getDestinationFolders","formatter","quietDeprecationWarnings","process","stdout","write","exitCode","cmd","stream","parallel","_","description","greedy","options","boolean","array","hidden","chunks","replace"],"mappings":"AAAA,uDAAuD;;;;+BAwB1CA;;;eAAAA;;;6DAvBI;kEAEK;uBAQf;uBAC8B;wBACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAW3B,MAAMA,aAAaC,cAAO;IAW7B,MAAMC,UAAU;QACZ,MAAM,IAAI,CAACC,WAAW;QACtB,MAAM,IAAI,CAACC,MAAM;QACjB,MAAM,IAAI,CAACC,SAAS;IACxB;IAEA,MACcD,SAAS;QACnB,IAAI,IAAI,CAACE,iBAAiB,IAAI;YAC1B,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAG,IAAI,CAACC,IAAI;YACxC,MAAMC,WAAWC,IAAAA,kBAAW,EAAC;gBAAEH;gBAAOD;YAAO;YAC7C,MAAME,OAAOH,MAAM;gBAAC;aAAQ,GAAG,EAAE;YAEjC,MAAMM,IAAAA,iBAAS,EAAC;gBACZ,OAAO;gBACP,SAASF,SAASG,GAAG,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA;gBACpC,QAAQ;gBACR,MAAML;YACV;YACA;QACJ;QAEAM,UAAG,CAACC,IAAI,CAAC;QACT,MAAMb,IAAAA,cAAM,EAAC;YAAEG,KAAK,IAAI,CAACG,IAAI,CAACH,GAAG;YAAEW,OAAO,IAAI,CAACA,KAAK;QAAC;IACzD;IAEA,MACcb,YAAY;QACtB,MAAM,EAAEc,QAAQ,EAAE,GAAGC,QAAQ,GAAGC,IAAAA,gCAAyB;QACzD,IAAIF,UAAU;YACV;QACJ;QAEA,MAAM,EAAEZ,GAAG,EAAE,GAAG,IAAI,CAACG,IAAI;QACzB,MAAM,EAAEQ,KAAK,EAAE,GAAG,IAAI;QAEtBF,UAAG,CAACC,IAAI,CAAC;QACT,MAAMK,oBAAoB;YAAC;YAAO;YAAQ;SAAO;QACjD,MAAMC,OAAO,CAA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BAAAA,MAAO4B,MAAM,MAAI7B,mBAAAA,6BAAAA,OAAQ6B,MAAM,CAAD;IAC5E;IAEA,IAAYnB,QAAQ;QAChB,MAAM,EAAEkC,CAAC,EAAElC,QAAQ,EAAE,EAAE,GAAG,IAAI,CAACR,IAAI;QACnC,OAAO;eAAI0C;eAAMlC;SAAM;IAC3B;AACJ;AAxGI,iBADSlB,MACOqD,eAAc;AAC9B,iBAFSrD,MAEOsD,UAAS;AACzB,iBAHStD,MAGOuD,WAAU;IACtBH,GAAG;QAAEC,aAAa;IAAa;IAC/B9C,KAAK;QAAEiD,SAAS;QAAMH,aAAa;IAA0B;IAC7D5C,OAAO;QAAEgD,OAAO;QAAMC,QAAQ;QAAML,aAAa;IAAmB;IACpE7C,QAAQ;QAAEiD,OAAO;QAAMC,QAAQ;QAAML,aAAa;IAAmB;IACrEF,UAAU;QAAEK,SAAS;QAAME,QAAQ;QAAML,aAAa;IAA+B;AACzF;;;;;;;;;;;;;;;;;;;AAkGJ,SAASlB,YAAY,GAAGwB,MAAgB;IACpC,OAAO/B,aAAI,CAACJ,IAAI,IAAImC,QAAQC,OAAO,CAAC,OAAO;AAC/C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command, CommandArgs } from './types';
|
|
2
|
+
interface Args extends CommandArgs {
|
|
3
|
+
_: string[];
|
|
4
|
+
all?: boolean;
|
|
5
|
+
ignore?: string | string[];
|
|
6
|
+
limit?: number;
|
|
7
|
+
packageNames?: string[];
|
|
8
|
+
registry?: string;
|
|
9
|
+
tagged?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class MFEList extends Command<Args> {
|
|
12
|
+
static readonly description = "List published MFE packages";
|
|
13
|
+
static readonly options: {
|
|
14
|
+
_: {
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
all: {
|
|
18
|
+
boolean: boolean;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
ignore: {
|
|
22
|
+
array: boolean;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
limit: {
|
|
26
|
+
number: boolean;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
tagged: {
|
|
30
|
+
boolean: boolean;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
execute(): Promise<void>;
|
|
35
|
+
private getCaption;
|
|
36
|
+
private getTable;
|
|
37
|
+
private getTime;
|
|
38
|
+
private getVersionTags;
|
|
39
|
+
private ask;
|
|
40
|
+
private login;
|
|
41
|
+
private get limit();
|
|
42
|
+
private get packageNames();
|
|
43
|
+
private get registry();
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=mfe-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mfe-list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mfe-list.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG/C,UAAU,IAAK,SAAQ,WAAW;IAC9B,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAMD,qBAAa,OAAQ,SAAQ,OAAO,CAAC,IAAI,CAAC;IACtC,MAAM,CAAC,QAAQ,CAAC,WAAW,iCAAiC;IAC5D,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;MAYrB;IAGI,OAAO;IAmBb,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,QAAQ;IAgChB,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,cAAc;YAWR,GAAG;YAOH,KAAK;IAoBnB,OAAO,KAAK,KAAK,GAKhB;IAED,OAAO,KAAK,YAAY,GAUvB;IAED,OAAO,KAAK,QAAQ,GAEnB;CACJ"}
|