@servicetitan/startup 30.3.0 → 31.0.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/bin/index.js +5 -6
- package/dist/cli/commands/build.d.ts +10 -3
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +124 -48
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +0 -2
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +54 -36
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/clean.d.ts +6 -0
- package/dist/cli/commands/clean.d.ts.map +1 -0
- package/dist/cli/commands/clean.js +55 -0
- package/dist/cli/commands/clean.js.map +1 -0
- package/dist/cli/commands/convert-eslint-config.js +163 -107
- package/dist/cli/commands/convert-eslint-config.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +43 -24
- 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 +50 -53
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/get-user-commands.js +21 -11
- package/dist/cli/commands/get-user-commands.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +31 -30
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +74 -48
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +8 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +61 -23
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +48 -31
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +3 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +112 -73
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +80 -57
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts +1 -0
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +124 -70
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +83 -48
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +3 -2
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +44 -32
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts +23 -0
- package/dist/cli/commands/review/__mocks__/expect-calls.d.ts.map +1 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts +2 -0
- package/dist/cli/commands/review/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.d.ts +3 -0
- package/dist/cli/commands/review/index.d.ts.map +1 -0
- package/dist/cli/commands/review/index.js +20 -0
- package/dist/cli/commands/review/index.js.map +1 -0
- package/dist/cli/commands/review/review.d.ts +28 -0
- package/dist/cli/commands/review/review.d.ts.map +1 -0
- package/dist/cli/commands/review/review.js +239 -0
- package/dist/cli/commands/review/review.js.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts +4 -0
- package/dist/cli/commands/review/rules/__mocks__/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts +7 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-config.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts +21 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-packages.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts +3 -0
- package/dist/cli/commands/review/rules/__mocks__/mock-project.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.d.ts +3 -0
- package/dist/cli/commands/review/rules/index.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/index.js +30 -0
- package/dist/cli/commands/review/rules/index.js.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts +14 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js +89 -0
- package/dist/cli/commands/review/rules/no-typescript-entry-point.js.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js +37 -0
- package/dist/cli/commands/review/rules/require-explicit-side-effects.js.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-npmrc.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-npmrc.js +38 -0
- package/dist/cli/commands/review/rules/require-npmrc.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js +33 -0
- package/dist/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts +45 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js +140 -0
- package/dist/cli/commands/review/rules/require-one-collection-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts +20 -0
- package/dist/cli/commands/review/rules/require-one-package-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js +70 -0
- package/dist/cli/commands/review/rules/require-one-package-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js +40 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts +19 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js +103 -0
- package/dist/cli/commands/review/rules/require-project-version-in-root-node-modules.js.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts +7 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js +37 -0
- package/dist/cli/commands/review/rules/require-servicetitan-scope.js.map +1 -0
- package/dist/cli/commands/review/types.d.ts +72 -0
- package/dist/cli/commands/review/types.d.ts.map +1 -0
- package/dist/cli/commands/review/types.js +36 -0
- package/dist/cli/commands/review/types.js.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts +3 -0
- package/dist/cli/commands/review/utils/apply-filter.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/apply-filter.js +20 -0
- package/dist/cli/commands/review/utils/apply-filter.js.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts +29 -0
- package/dist/cli/commands/review/utils/collate-dependencies.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js +31 -0
- package/dist/cli/commands/review/utils/collate-dependencies.js.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts +9 -0
- package/dist/cli/commands/review/utils/compare-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/compare-version.js +137 -0
- package/dist/cli/commands/review/utils/compare-version.js.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.js +21 -0
- package/dist/cli/commands/review/utils/format-depends-on.js.map +1 -0
- package/dist/cli/commands/review/utils/format-location.d.ts +2 -0
- package/dist/cli/commands/review/utils/format-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/format-location.js +25 -0
- package/dist/cli/commands/review/utils/format-location.js.map +1 -0
- package/dist/cli/commands/review/utils/get-key.d.ts +3 -0
- package/dist/cli/commands/review/utils/get-key.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-key.js +20 -0
- package/dist/cli/commands/review/utils/get-key.js.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts +2 -0
- package/dist/cli/commands/review/utils/get-max-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/get-max-version.js +16 -0
- package/dist/cli/commands/review/utils/get-max-version.js.map +1 -0
- package/dist/cli/commands/review/utils/indent.d.ts +2 -0
- package/dist/cli/commands/review/utils/indent.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/indent.js +17 -0
- package/dist/cli/commands/review/utils/indent.js.map +1 -0
- package/dist/cli/commands/review/utils/index.d.ts +14 -0
- package/dist/cli/commands/review/utils/index.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/index.js +32 -0
- package/dist/cli/commands/review/utils/index.js.map +1 -0
- package/dist/cli/commands/review/utils/is-library.d.ts +3 -0
- package/dist/cli/commands/review/utils/is-library.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/is-library.js +15 -0
- package/dist/cli/commands/review/utils/is-library.js.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts +3 -0
- package/dist/cli/commands/review/utils/name-to-location.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/name-to-location.js +18 -0
- package/dist/cli/commands/review/utils/name-to-location.js.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts +2 -0
- package/dist/cli/commands/review/utils/pluralize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/pluralize.js +15 -0
- package/dist/cli/commands/review/utils/pluralize.js.map +1 -0
- package/dist/cli/commands/review/utils/set-version.d.ts +10 -0
- package/dist/cli/commands/review/utils/set-version.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/set-version.js +33 -0
- package/dist/cli/commands/review/utils/set-version.js.map +1 -0
- package/dist/cli/commands/review/utils/summarize.d.ts +11 -0
- package/dist/cli/commands/review/utils/summarize.d.ts.map +1 -0
- package/dist/cli/commands/review/utils/summarize.js +30 -0
- package/dist/cli/commands/review/utils/summarize.js.map +1 -0
- package/dist/cli/commands/run-task.js +50 -31
- package/dist/cli/commands/run-task.js.map +1 -1
- package/dist/cli/commands/run-task.test.d.ts +2 -0
- package/dist/cli/commands/run-task.test.d.ts.map +1 -0
- package/dist/cli/commands/start.d.ts +11 -3
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +166 -69
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/styles-check.js +73 -59
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/tests.d.ts +1 -0
- package/dist/cli/commands/tests.d.ts.map +1 -1
- package/dist/cli/commands/tests.js +45 -28
- package/dist/cli/commands/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +1 -0
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/commands/types.js +4 -1
- package/dist/cli/commands/types.js.map +1 -1
- package/dist/cli/index.js +43 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tasks/cli-task.d.ts +0 -1
- package/dist/cli/tasks/cli-task.d.ts.map +1 -1
- package/dist/cli/tasks/cli-task.js +52 -41
- package/dist/cli/tasks/cli-task.js.map +1 -1
- package/dist/cli/tasks/swc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/swc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/swc-compile-package.js +75 -34
- package/dist/cli/tasks/swc-compile-package.js.map +1 -1
- package/dist/cli/tasks/task.d.ts +0 -2
- package/dist/cli/tasks/task.d.ts.map +1 -1
- package/dist/cli/tasks/task.js +60 -65
- package/dist/cli/tasks/task.js.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts +0 -1
- package/dist/cli/tasks/tsc-compile-package.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile-package.js +26 -22
- package/dist/cli/tasks/tsc-compile-package.js.map +1 -1
- package/dist/cli/tasks/tsc-compile.d.ts +0 -2
- package/dist/cli/tasks/tsc-compile.d.ts.map +1 -1
- package/dist/cli/tasks/tsc-compile.js +51 -31
- package/dist/cli/tasks/tsc-compile.js.map +1 -1
- package/dist/cli/utils/bundle.d.ts +0 -2
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +118 -70
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/check-args.d.ts +6 -0
- package/dist/cli/utils/check-args.d.ts.map +1 -0
- package/dist/cli/utils/check-args.js +20 -0
- package/dist/cli/utils/check-args.js.map +1 -0
- package/dist/cli/utils/cli-git.js +23 -9
- package/dist/cli/utils/cli-git.js.map +1 -1
- package/dist/cli/utils/cli-npm.js +62 -23
- package/dist/cli/utils/cli-npm.js.map +1 -1
- package/dist/cli/utils/cli-os.js +34 -33
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/cli/utils/compile-less.d.ts.map +1 -1
- package/dist/cli/utils/compile-less.js +27 -11
- package/dist/cli/utils/compile-less.js.map +1 -1
- package/dist/cli/utils/compile-sass.d.ts.map +1 -1
- package/dist/cli/utils/compile-sass.js +25 -9
- package/dist/cli/utils/compile-sass.js.map +1 -1
- package/dist/cli/utils/compile.d.ts +6 -0
- package/dist/cli/utils/compile.d.ts.map +1 -0
- package/dist/cli/utils/compile.js +33 -0
- package/dist/cli/utils/compile.js.map +1 -0
- package/dist/cli/utils/copy-files.d.ts +8 -0
- package/dist/cli/utils/copy-files.d.ts.map +1 -0
- package/dist/cli/utils/copy-files.js +112 -0
- package/dist/cli/utils/copy-files.js.map +1 -0
- package/dist/cli/utils/eslint.d.ts.map +1 -1
- package/dist/cli/utils/eslint.js +22 -12
- package/dist/cli/utils/eslint.js.map +1 -1
- package/dist/cli/utils/get-module-type.d.ts.map +1 -1
- package/dist/cli/utils/get-module-type.js +21 -13
- package/dist/cli/utils/get-module-type.js.map +1 -1
- package/dist/cli/utils/index.d.ts +7 -5
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +33 -30
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/is-module-installed.js +11 -4
- package/dist/cli/utils/is-module-installed.js.map +1 -1
- package/dist/cli/utils/lerna-exec.d.ts +4 -3
- package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
- package/dist/cli/utils/lerna-exec.js +40 -19
- package/dist/cli/utils/lerna-exec.js.map +1 -1
- package/dist/cli/utils/maybe-create-git-folder.js +20 -18
- package/dist/cli/utils/maybe-create-git-folder.js.map +1 -1
- package/dist/cli/utils/pipe-stdout.d.ts +3 -0
- package/dist/cli/utils/pipe-stdout.d.ts.map +1 -0
- package/dist/cli/utils/pipe-stdout.js +19 -0
- package/dist/cli/utils/pipe-stdout.js.map +1 -0
- package/dist/cli/utils/process-tree.d.ts +14 -0
- package/dist/cli/utils/process-tree.d.ts.map +1 -0
- package/dist/cli/utils/process-tree.js +78 -0
- package/dist/cli/utils/process-tree.js.map +1 -0
- package/dist/cli/utils/publish.js +12 -6
- package/dist/cli/utils/publish.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts +2 -1
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js +39 -30
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/cli/utils/style-extensions.d.ts +2 -0
- package/dist/cli/utils/style-extensions.d.ts.map +1 -0
- package/dist/cli/utils/style-extensions.js +17 -0
- package/dist/cli/utils/style-extensions.js.map +1 -0
- package/dist/cli/utils/tcm.d.ts +5 -2
- package/dist/cli/utils/tcm.d.ts.map +1 -1
- package/dist/cli/utils/tcm.js +51 -46
- package/dist/cli/utils/tcm.js.map +1 -1
- package/dist/cli/utils/type-check.d.ts +7 -0
- package/dist/cli/utils/type-check.d.ts.map +1 -0
- package/dist/cli/utils/type-check.js +33 -0
- package/dist/cli/utils/type-check.js.map +1 -0
- package/dist/cli/utils/watch-stdout.d.ts +3 -0
- package/dist/cli/utils/watch-stdout.d.ts.map +1 -0
- package/dist/cli/utils/watch-stdout.js +26 -0
- package/dist/cli/utils/watch-stdout.js.map +1 -0
- package/dist/index.js +20 -18
- package/dist/index.js.map +1 -1
- package/dist/jest/index.js +12 -4
- package/dist/jest/index.js.map +1 -1
- package/dist/utils/debug.js +23 -11
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/find-packages.d.ts.map +1 -1
- package/dist/utils/find-packages.js +46 -34
- package/dist/utils/find-packages.js.map +1 -1
- package/dist/utils/format-duration.d.ts +2 -0
- package/dist/utils/format-duration.d.ts.map +1 -0
- package/dist/utils/format-duration.js +24 -0
- package/dist/utils/format-duration.js.map +1 -0
- package/dist/utils/get-branch-configs.js +24 -8
- package/dist/utils/get-branch-configs.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +10 -2
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +120 -52
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-destination-folders.js +25 -18
- package/dist/utils/get-destination-folders.js.map +1 -1
- package/dist/utils/get-folders.d.ts +2 -2
- package/dist/utils/get-folders.d.ts.map +1 -1
- package/dist/utils/get-folders.js +20 -13
- package/dist/utils/get-folders.js.map +1 -1
- package/dist/utils/get-jest-config.js +65 -38
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/utils/get-package-data.js +26 -12
- package/dist/utils/get-package-data.js.map +1 -1
- package/dist/utils/get-package-name.js +18 -8
- package/dist/utils/get-package-name.js.map +1 -1
- package/dist/utils/get-packages.d.ts +1 -1
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +72 -57
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/get-startup-version.js +18 -8
- package/dist/utils/get-startup-version.js.map +1 -1
- package/dist/utils/get-tsconfig.js +19 -12
- package/dist/utils/get-tsconfig.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +34 -29
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/load-shared-dependencies.js +23 -17
- package/dist/utils/load-shared-dependencies.js.map +1 -1
- package/dist/utils/log-errors.d.ts +2 -0
- package/dist/utils/log-errors.d.ts.map +1 -0
- package/dist/utils/log-errors.js +36 -0
- package/dist/utils/log-errors.js.map +1 -0
- package/dist/utils/log.d.ts +0 -1
- package/dist/utils/log.d.ts.map +1 -1
- package/dist/utils/log.js +38 -43
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/pick.js +11 -3
- package/dist/utils/pick.js.map +1 -1
- package/dist/utils/read-json.js +27 -11
- package/dist/utils/read-json.js.map +1 -1
- package/dist/utils/to-array.js +13 -3
- package/dist/utils/to-array.js.map +1 -1
- package/dist/webpack/__mocks__/file-rules.d.ts.map +1 -1
- package/dist/webpack/configs/amd-config.js +13 -3
- package/dist/webpack/configs/amd-config.js.map +1 -1
- package/dist/webpack/configs/cache-config.js +20 -9
- package/dist/webpack/configs/cache-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +47 -45
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.js +16 -7
- package/dist/webpack/configs/devtool-config.js.map +1 -1
- package/dist/webpack/configs/entry.config.d.ts.map +1 -1
- package/dist/webpack/configs/entry.config.js +28 -7
- package/dist/webpack/configs/entry.config.js.map +1 -1
- package/dist/webpack/configs/externals-config.js +17 -7
- package/dist/webpack/configs/externals-config.js.map +1 -1
- package/dist/webpack/configs/index.d.ts +2 -1
- package/dist/webpack/configs/index.d.ts.map +1 -1
- package/dist/webpack/configs/index.js +30 -28
- package/dist/webpack/configs/index.js.map +1 -1
- package/dist/webpack/configs/loaders/css-loader.js +22 -14
- package/dist/webpack/configs/loaders/css-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/index.d.ts +1 -1
- package/dist/webpack/configs/loaders/index.d.ts.map +1 -1
- package/dist/webpack/configs/loaders/index.js +20 -19
- package/dist/webpack/configs/loaders/index.js.map +1 -1
- package/dist/webpack/configs/loaders/less-loader.js +18 -3
- package/dist/webpack/configs/loaders/less-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/style-loader.js +23 -8
- package/dist/webpack/configs/loaders/style-loader.js.map +1 -1
- package/dist/webpack/configs/loaders/types.js +4 -1
- package/dist/webpack/configs/loaders/types.js.map +1 -1
- package/dist/webpack/configs/module-config.js +17 -5
- package/dist/webpack/configs/module-config.js.map +1 -1
- package/dist/webpack/configs/optimization-config.js +54 -28
- package/dist/webpack/configs/optimization-config.js.map +1 -1
- package/dist/webpack/configs/output-config.js +26 -12
- package/dist/webpack/configs/output-config.js.map +1 -1
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +23 -14
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +19 -9
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +19 -11
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js +17 -7
- package/dist/webpack/configs/plugins/define-exposed-instance-dependencies-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +13 -5
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +11 -3
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/html-plugin.js +28 -20
- package/dist/webpack/configs/plugins/html-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +24 -13
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js +26 -16
- package/dist/webpack/configs/plugins/ignore-plugin/get-package-json.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +15 -6
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/index.js +18 -16
- package/dist/webpack/configs/plugins/ignore-plugin/index.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +22 -12
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js +11 -4
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-react-dom-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/index.d.ts +0 -2
- package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/index.js +29 -29
- package/dist/webpack/configs/plugins/index.js.map +1 -1
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +23 -12
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/moment-locales-plugin.js +18 -8
- package/dist/webpack/configs/plugins/moment-locales-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +32 -22
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.js +23 -15
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js +27 -21
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/resolve-config.js +16 -4
- package/dist/webpack/configs/resolve-config.js.map +1 -1
- package/dist/webpack/configs/rules/css-rules.js +43 -18
- package/dist/webpack/configs/rules/css-rules.js.map +1 -1
- package/dist/webpack/configs/rules/font-rules.js +13 -5
- package/dist/webpack/configs/rules/font-rules.js.map +1 -1
- package/dist/webpack/configs/rules/image-rules.js +13 -5
- package/dist/webpack/configs/rules/image-rules.js.map +1 -1
- package/dist/webpack/configs/rules/index.d.ts +0 -1
- package/dist/webpack/configs/rules/index.d.ts.map +1 -1
- package/dist/webpack/configs/rules/index.js +24 -23
- package/dist/webpack/configs/rules/index.js.map +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts +1 -1
- package/dist/webpack/configs/rules/js-rules.d.ts.map +1 -1
- package/dist/webpack/configs/rules/js-rules.js +47 -7
- package/dist/webpack/configs/rules/js-rules.js.map +1 -1
- package/dist/webpack/configs/rules/less-rules.js +25 -9
- package/dist/webpack/configs/rules/less-rules.js.map +1 -1
- package/dist/webpack/configs/rules/scss-rules.js +25 -9
- package/dist/webpack/configs/rules/scss-rules.js.map +1 -1
- package/dist/webpack/configs/rules/svg-rules.js +40 -20
- package/dist/webpack/configs/rules/svg-rules.js.map +1 -1
- package/dist/webpack/configs/rules-config.d.ts.map +1 -1
- package/dist/webpack/configs/rules-config.js +34 -19
- package/dist/webpack/configs/rules-config.js.map +1 -1
- package/dist/webpack/configs/stats-config.js +14 -4
- package/dist/webpack/configs/stats-config.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +1 -3
- package/dist/webpack/configs/types.d.ts.map +1 -1
- package/dist/webpack/configs/types.js +4 -1
- package/dist/webpack/configs/types.js.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.js +40 -22
- package/dist/webpack/configs/utils/generate-metadata.js.map +1 -1
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js +20 -11
- package/dist/webpack/configs/utils/get-launchdarkly-sdk-version.js.map +1 -1
- package/dist/webpack/configs/utils/get-web-components-version.js +18 -8
- package/dist/webpack/configs/utils/get-web-components-version.js.map +1 -1
- package/dist/webpack/configs/utils/index.js +18 -16
- package/dist/webpack/configs/utils/index.js.map +1 -1
- package/dist/webpack/configs/watch-options-config.d.ts +6 -0
- package/dist/webpack/configs/watch-options-config.d.ts.map +1 -0
- package/dist/webpack/configs/watch-options-config.js +24 -0
- package/dist/webpack/configs/watch-options-config.js.map +1 -0
- package/dist/webpack/create-webpack-config.d.ts.map +1 -1
- package/dist/webpack/create-webpack-config.js +62 -50
- package/dist/webpack/create-webpack-config.js.map +1 -1
- package/dist/webpack/index.d.ts +1 -1
- package/dist/webpack/index.d.ts.map +1 -1
- package/dist/webpack/index.js +18 -17
- package/dist/webpack/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/index.js +15 -15
- package/dist/webpack/loaders/expose-loader/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +5 -6
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +20 -13
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +22 -11
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/index.js +20 -18
- package/dist/webpack/loaders/expose-loader/utils/index.js.map +1 -1
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +20 -12
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js.map +1 -1
- package/dist/webpack/types.d.ts +0 -4
- package/dist/webpack/types.d.ts.map +1 -1
- package/dist/webpack/types.js +4 -1
- package/dist/webpack/types.js.map +1 -1
- package/dist/webpack/utils/feature-cohort.js +17 -12
- package/dist/webpack/utils/feature-cohort.js.map +1 -1
- package/dist/webpack/utils/get-caller-filename.js +14 -7
- package/dist/webpack/utils/get-caller-filename.js.map +1 -1
- package/dist/webpack/utils/{bundle.d.ts → get-module-entry-path.d.ts} +1 -1
- package/dist/webpack/utils/get-module-entry-path.d.ts.map +1 -0
- package/dist/webpack/utils/get-module-entry-path.js +21 -0
- package/dist/webpack/utils/get-module-entry-path.js.map +1 -0
- package/dist/webpack/utils/hash-mod.js +16 -11
- package/dist/webpack/utils/hash-mod.js.map +1 -1
- package/dist/webpack/utils/index.d.ts +1 -1
- package/dist/webpack/utils/index.d.ts.map +1 -1
- package/dist/webpack/utils/index.js +21 -19
- package/dist/webpack/utils/index.js.map +1 -1
- package/dist/webpack/utils/split-by-entry.js +17 -7
- package/dist/webpack/utils/split-by-entry.js.map +1 -1
- package/dist/webpack/utils/testing/compile.js +12 -4
- package/dist/webpack/utils/testing/compile.js.map +1 -1
- package/dist/webpack/utils/testing/execute.js +26 -13
- package/dist/webpack/utils/testing/execute.js.map +1 -1
- package/dist/webpack/utils/testing/get-compiler.js +34 -24
- package/dist/webpack/utils/testing/get-compiler.js.map +1 -1
- package/dist/webpack/utils/testing/get-errors.js +12 -4
- package/dist/webpack/utils/testing/get-errors.js.map +1 -1
- package/dist/webpack/utils/testing/get-module-source.js +18 -5
- package/dist/webpack/utils/testing/get-module-source.js.map +1 -1
- package/dist/webpack/utils/testing/get-warnings.js +12 -4
- package/dist/webpack/utils/testing/get-warnings.js.map +1 -1
- package/dist/webpack/utils/testing/index.js +28 -20
- package/dist/webpack/utils/testing/index.js.map +1 -1
- package/dist/webpack/utils/testing/normalize-errors.js +11 -3
- package/dist/webpack/utils/testing/normalize-errors.js.map +1 -1
- package/dist/webpack/utils/testing/read-asset.js +20 -11
- package/dist/webpack/utils/testing/read-asset.js.map +1 -1
- package/dist/webpack/utils/testing/read-assets.js +13 -5
- package/dist/webpack/utils/testing/read-assets.js.map +1 -1
- package/package.json +20 -20
- package/src/cli/commands/__tests__/build.test.ts +69 -44
- package/src/cli/commands/__tests__/clean.test.ts +32 -0
- package/src/cli/commands/__tests__/install.test.ts +50 -8
- package/src/cli/commands/__tests__/kendo-ui-license.test.ts +5 -5
- package/src/cli/commands/__tests__/lint.test.ts +4 -0
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +21 -2
- package/src/cli/commands/__tests__/mfe-publish.test.ts +19 -23
- package/src/cli/commands/__tests__/prepare-package.test.ts +17 -36
- package/src/cli/commands/__tests__/start.test.ts +81 -44
- package/src/cli/commands/__tests__/tests.test.ts +4 -0
- package/src/cli/commands/build.ts +73 -35
- package/src/cli/commands/bundle-package.ts +0 -4
- package/src/cli/commands/clean.ts +24 -0
- package/src/cli/commands/eslint.ts +1 -1
- package/src/cli/commands/get-command.ts +25 -35
- package/src/cli/commands/index.ts +1 -1
- package/src/cli/commands/install.ts +29 -8
- package/src/cli/commands/lint.ts +22 -17
- package/src/cli/commands/mfe-package-publish.ts +22 -5
- package/src/cli/commands/mfe-publish.ts +5 -18
- package/src/cli/commands/prepare-package.ts +8 -12
- package/src/cli/commands/review/__mocks__/expect-calls.ts +48 -0
- package/src/cli/commands/review/__mocks__/index.ts +1 -0
- package/src/cli/commands/review/__tests__/review.test.ts +483 -0
- package/src/cli/commands/review/index.ts +3 -0
- package/src/cli/commands/review/review.ts +247 -0
- package/src/cli/commands/review/rules/__mocks__/index.ts +3 -0
- package/src/cli/commands/review/rules/__mocks__/mock-config.ts +14 -0
- package/src/cli/commands/review/rules/__mocks__/mock-packages.ts +41 -0
- package/src/cli/commands/review/rules/__mocks__/mock-project.ts +11 -0
- package/src/cli/commands/review/rules/__tests__/no-typescript-entry-point.test.ts +166 -0
- package/src/cli/commands/review/rules/__tests__/require-explicit-side-effects.test.ts +113 -0
- package/src/cli/commands/review/rules/__tests__/require-npmrc.test.ts +71 -0
- package/src/cli/commands/review/rules/__tests__/require-one-anvil-uikit-contrib-version.test.ts +33 -0
- package/src/cli/commands/review/rules/__tests__/require-one-collection-version.test.ts +155 -0
- package/src/cli/commands/review/rules/__tests__/require-one-package-version.test.ts +135 -0
- package/src/cli/commands/review/rules/__tests__/require-one-uikit-version.ts +40 -0
- package/src/cli/commands/review/rules/__tests__/require-project-version-in-root-node-modules.test.ts +186 -0
- package/src/cli/commands/review/rules/__tests__/require-servicetitan-scope.test.ts +83 -0
- package/src/cli/commands/review/rules/index.ts +20 -0
- package/src/cli/commands/review/rules/no-typescript-entry-point.ts +78 -0
- package/src/cli/commands/review/rules/require-explicit-side-effects.ts +31 -0
- package/src/cli/commands/review/rules/require-npmrc.ts +27 -0
- package/src/cli/commands/review/rules/require-one-anvil-uikit-contrib-version.ts +20 -0
- package/src/cli/commands/review/rules/require-one-collection-version.ts +169 -0
- package/src/cli/commands/review/rules/require-one-package-version.ts +76 -0
- package/src/cli/commands/review/rules/require-one-uikit-version.ts +27 -0
- package/src/cli/commands/review/rules/require-project-version-in-root-node-modules.ts +104 -0
- package/src/cli/commands/review/rules/require-servicetitan-scope.ts +27 -0
- package/src/cli/commands/review/types.ts +72 -0
- package/src/cli/commands/review/utils/__tests__/compare-version.test.ts +73 -0
- package/src/cli/commands/review/utils/__tests__/get-max-version.test.ts +17 -0
- package/src/cli/commands/review/utils/__tests__/indent.test.ts +41 -0
- package/src/cli/commands/review/utils/__tests__/name-to-location.test.ts +39 -0
- package/src/cli/commands/review/utils/__tests__/set-version.test.ts +84 -0
- package/src/cli/commands/review/utils/apply-filter.ts +14 -0
- package/src/cli/commands/review/utils/collate-dependencies.ts +46 -0
- package/src/cli/commands/review/utils/compare-version.ts +82 -0
- package/src/cli/commands/review/utils/format-depends-on.ts +11 -0
- package/src/cli/commands/review/utils/format-location.ts +8 -0
- package/src/cli/commands/review/utils/get-key.ts +10 -0
- package/src/cli/commands/review/utils/get-max-version.ts +5 -0
- package/src/cli/commands/review/utils/indent.ts +8 -0
- package/src/cli/commands/review/utils/index.ts +13 -0
- package/src/cli/commands/review/utils/is-library.ts +5 -0
- package/src/cli/commands/review/utils/name-to-location.ts +7 -0
- package/src/cli/commands/review/utils/pluralize.ts +3 -0
- package/src/cli/commands/review/utils/set-version.ts +26 -0
- package/src/cli/commands/review/utils/summarize.ts +21 -0
- package/src/cli/commands/run-task.test.ts +60 -0
- package/src/cli/commands/start.ts +130 -55
- package/src/cli/commands/tests.ts +2 -0
- package/src/cli/commands/types.ts +1 -0
- package/src/cli/index.ts +4 -4
- package/src/cli/tasks/__tests__/cli-task.test.ts +16 -4
- package/src/cli/tasks/__tests__/{swc-compile.test.ts → swc-compile-package.test.ts} +75 -36
- package/src/cli/tasks/__tests__/tsc-compile-package.test.ts +1 -0
- package/src/cli/tasks/__tests__/tsc-compile.test.ts +12 -23
- package/src/cli/tasks/cli-task.ts +12 -18
- package/src/cli/tasks/swc-cli.d.ts +12 -1
- package/src/cli/tasks/swc-compile-package.ts +71 -45
- package/src/cli/tasks/task.ts +2 -11
- package/src/cli/tasks/tsc-compile-package.ts +0 -4
- package/src/cli/tasks/tsc-compile.ts +14 -17
- package/src/cli/types/cpx2.d.ts +8 -1
- package/src/cli/utils/__tests__/bundle.test.ts +1 -1
- package/src/cli/utils/__tests__/check-args.test.ts +34 -0
- package/src/cli/utils/__tests__/compile.test.ts +59 -0
- package/src/cli/utils/__tests__/copy-files.test.ts +157 -0
- package/src/cli/utils/__tests__/get-module-type.test.ts +19 -0
- package/src/cli/utils/__tests__/lerna-exec.test.ts +58 -11
- package/src/cli/utils/__tests__/pipe-stdout.test.ts +39 -0
- package/src/cli/utils/__tests__/process-tree.test.ts +175 -0
- package/src/cli/utils/__tests__/set-node-options.test.ts +51 -6
- package/src/cli/utils/__tests__/tcm.test.ts +90 -86
- package/src/cli/utils/__tests__/type-check.test.ts +47 -0
- package/src/cli/utils/__tests__/watch-stdout.test.ts +68 -0
- package/src/cli/utils/bundle.ts +5 -18
- package/src/cli/utils/check-args.ts +13 -0
- package/src/cli/utils/compile-less.ts +0 -1
- package/src/cli/utils/compile-sass.ts +0 -1
- package/src/cli/utils/compile.ts +22 -0
- package/src/cli/utils/copy-files.ts +76 -0
- package/src/cli/utils/eslint.ts +1 -0
- package/src/cli/utils/get-module-type.ts +4 -6
- package/src/cli/utils/index.ts +7 -6
- package/src/cli/utils/lerna-exec.ts +17 -10
- package/src/cli/utils/pipe-stdout.ts +10 -0
- package/src/cli/utils/process-tree.ts +57 -0
- package/src/cli/utils/set-node-options.ts +15 -12
- package/src/cli/utils/style-extensions.ts +1 -0
- package/src/cli/utils/tcm.ts +22 -32
- package/src/cli/utils/type-check.ts +19 -0
- package/src/cli/utils/watch-stdout.ts +24 -0
- package/src/utils/__tests__/format-duration.test.ts +22 -0
- package/src/utils/__tests__/get-configuration.test.ts +44 -2
- package/src/utils/__tests__/get-packages.test.ts +58 -49
- package/src/utils/__tests__/log-errors.test.ts +102 -0
- package/src/utils/__tests__/log.test.ts +1 -86
- package/src/utils/find-packages.ts +12 -6
- package/src/utils/format-duration.ts +13 -0
- package/src/utils/get-configuration.ts +19 -5
- package/src/utils/get-folders.ts +3 -1
- package/src/utils/get-packages.ts +9 -16
- package/src/utils/index.ts +3 -0
- package/src/utils/log-errors.ts +29 -0
- package/src/utils/log.ts +0 -26
- package/src/webpack/__mocks__/file-rules.ts +0 -5
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +4 -5
- package/src/webpack/__tests__/create-webpack-config.test.ts +33 -112
- package/src/webpack/configs/dev-server-config.ts +4 -27
- package/src/webpack/configs/devtool-config.ts +2 -2
- package/src/webpack/configs/entry.config.ts +7 -2
- package/src/webpack/configs/index.ts +2 -1
- package/src/webpack/configs/loaders/index.ts +1 -1
- package/src/webpack/configs/optimization-config.ts +2 -2
- package/src/webpack/configs/plugins/index.ts +0 -2
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +3 -3
- package/src/webpack/configs/plugins-config.ts +0 -4
- package/src/webpack/configs/resolve-config.ts +1 -1
- package/src/webpack/configs/rules/index.ts +0 -1
- package/src/webpack/configs/rules/js-rules.ts +27 -2
- package/src/webpack/configs/rules-config.ts +1 -11
- package/src/webpack/configs/types.ts +1 -3
- package/src/webpack/configs/watch-options-config.ts +17 -0
- package/src/webpack/create-webpack-config.ts +3 -4
- package/src/webpack/index.ts +1 -1
- package/src/webpack/types.ts +0 -4
- package/src/webpack/utils/index.ts +1 -1
- package/dist/__mocks__/create-package.js +0 -17
- package/dist/__mocks__/create-package.js.map +0 -1
- package/dist/__mocks__/index.js +0 -18
- package/dist/__mocks__/index.js.map +0 -1
- package/dist/cli/utils/assets-copy.d.ts +0 -3
- package/dist/cli/utils/assets-copy.d.ts.map +0 -1
- package/dist/cli/utils/assets-copy.js +0 -25
- package/dist/cli/utils/assets-copy.js.map +0 -1
- package/dist/cli/utils/styles-copy.d.ts +0 -3
- package/dist/cli/utils/styles-copy.d.ts.map +0 -1
- package/dist/cli/utils/styles-copy.js +0 -25
- package/dist/cli/utils/styles-copy.js.map +0 -1
- package/dist/cli/utils/tsc.d.ts +0 -5
- package/dist/cli/utils/tsc.d.ts.map +0 -1
- package/dist/cli/utils/tsc.js +0 -37
- package/dist/cli/utils/tsc.js.map +0 -1
- package/dist/webpack/__mocks__/file-rules.js +0 -79
- package/dist/webpack/__mocks__/file-rules.js.map +0 -1
- package/dist/webpack/__mocks__/index.js +0 -19
- package/dist/webpack/__mocks__/index.js.map +0 -1
- package/dist/webpack/__mocks__/style-rules.js +0 -124
- package/dist/webpack/__mocks__/style-rules.js.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/provide-react-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/provide-react-plugin.js +0 -13
- package/dist/webpack/configs/plugins/provide-react-plugin.js.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts +0 -4
- package/dist/webpack/configs/plugins/ts-checker-plugin.d.ts.map +0 -1
- package/dist/webpack/configs/plugins/ts-checker-plugin.js +0 -30
- package/dist/webpack/configs/plugins/ts-checker-plugin.js.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.d.ts +0 -4
- package/dist/webpack/configs/rules/tsx-rules.d.ts.map +0 -1
- package/dist/webpack/configs/rules/tsx-rules.js +0 -44
- package/dist/webpack/configs/rules/tsx-rules.js.map +0 -1
- package/dist/webpack/utils/bundle.d.ts.map +0 -1
- package/dist/webpack/utils/bundle.js +0 -19
- package/dist/webpack/utils/bundle.js.map +0 -1
- package/src/cli/utils/__tests__/assets-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/styles-copy.test.ts +0 -52
- package/src/cli/utils/__tests__/tsc.test.ts +0 -63
- package/src/cli/utils/assets-copy.ts +0 -23
- package/src/cli/utils/styles-copy.ts +0 -23
- package/src/cli/utils/tsc.ts +0 -38
- package/src/webpack/configs/plugins/provide-react-plugin.ts +0 -12
- package/src/webpack/configs/plugins/ts-checker-plugin.ts +0 -33
- package/src/webpack/configs/rules/tsx-rules.ts +0 -48
- /package/src/webpack/utils/{bundle.ts → get-module-entry-path.ts} +0 -0
package/dist/cli/utils/bundle.js
CHANGED
|
@@ -1,113 +1,160 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get bundle () {
|
|
13
|
+
return bundle;
|
|
14
|
+
},
|
|
15
|
+
get bundleWatch () {
|
|
16
|
+
return bundleWatch;
|
|
17
|
+
},
|
|
18
|
+
get webpackDevConfigFileName () {
|
|
19
|
+
return webpackDevConfigFileName;
|
|
20
|
+
},
|
|
21
|
+
get webpackProdConfigFileName () {
|
|
22
|
+
return webpackProdConfigFileName;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
26
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
27
|
+
const _crypto = /*#__PURE__*/ _interop_require_default(require("crypto"));
|
|
28
|
+
const _portfinder = require("portfinder");
|
|
29
|
+
const _webpack = /*#__PURE__*/ _interop_require_default(require("webpack"));
|
|
30
|
+
const _webpackdevserver = /*#__PURE__*/ _interop_require_default(require("webpack-dev-server"));
|
|
31
|
+
const _utils = require("../../utils");
|
|
32
|
+
const _webpack1 = require("../../webpack");
|
|
33
|
+
function _interop_require_default(obj) {
|
|
34
|
+
return obj && obj.__esModule ? obj : {
|
|
35
|
+
default: obj
|
|
36
|
+
};
|
|
37
|
+
}
|
|
17
38
|
function getName() {
|
|
18
|
-
const packageName = (0,
|
|
19
|
-
|
|
20
|
-
.replace(/[^\w-]/g, '');
|
|
21
|
-
const hash = crypto_1.default.randomBytes(4).toString('hex');
|
|
39
|
+
const packageName = (0, _utils.getPackageName)().replace(/\//g, '-').replace(/[^\w-]/g, '');
|
|
40
|
+
const hash = _crypto.default.randomBytes(4).toString('hex');
|
|
22
41
|
return `${packageName}-${hash}`;
|
|
23
42
|
}
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
const webpackDevConfigFileName = 'webpack.dev.config.js';
|
|
44
|
+
const webpackProdConfigFileName = 'webpack.prod.config.js';
|
|
26
45
|
async function bundle(options = {}) {
|
|
27
|
-
|
|
46
|
+
_utils.log.info('Bundling the package...');
|
|
28
47
|
const name = getName();
|
|
29
48
|
const mode = 'production';
|
|
30
|
-
const fallback = `./${
|
|
31
|
-
const config = readWebpackConfig({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
const fallback = `./${webpackProdConfigFileName}`;
|
|
50
|
+
const config = readWebpackConfig({
|
|
51
|
+
...options,
|
|
52
|
+
fallback
|
|
53
|
+
});
|
|
54
|
+
const { buildStat, codeCoverage } = options;
|
|
55
|
+
const webpackOptions = {
|
|
56
|
+
name,
|
|
57
|
+
buildStat,
|
|
58
|
+
codeCoverage
|
|
59
|
+
};
|
|
60
|
+
if ((0, _utils.isWebComponent)()) {
|
|
35
61
|
const webpackConfig = {
|
|
36
|
-
configuration: {
|
|
37
|
-
|
|
62
|
+
configuration: {
|
|
63
|
+
...config === null || config === void 0 ? void 0 : config.configuration,
|
|
64
|
+
mode
|
|
65
|
+
},
|
|
66
|
+
plugins: config === null || config === void 0 ? void 0 : config.plugins
|
|
38
67
|
};
|
|
39
68
|
return Promise.all([
|
|
40
|
-
run((0,
|
|
41
|
-
|
|
69
|
+
run((0, _webpack1.createWebpackConfig)(webpackConfig, {
|
|
70
|
+
embed: true,
|
|
71
|
+
...webpackOptions
|
|
72
|
+
})),
|
|
73
|
+
run((0, _webpack1.createWebpackConfig)(webpackConfig, webpackOptions))
|
|
42
74
|
]);
|
|
43
75
|
}
|
|
44
|
-
return run(config !== null && config !== void 0 ? config : (0,
|
|
76
|
+
return run(config !== null && config !== void 0 ? config : (0, _webpack1.createWebpackConfig)({
|
|
77
|
+
configuration: {
|
|
78
|
+
mode
|
|
79
|
+
}
|
|
80
|
+
}, webpackOptions));
|
|
45
81
|
}
|
|
46
82
|
async function bundleWatch(options = {}) {
|
|
47
|
-
|
|
83
|
+
_utils.log.info('Bundling the package...');
|
|
48
84
|
const name = getName();
|
|
49
85
|
const mode = 'development';
|
|
50
|
-
const config = readWebpackConfig({
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
86
|
+
const config = readWebpackConfig({
|
|
87
|
+
...options,
|
|
88
|
+
fallback: `./${webpackDevConfigFileName}`
|
|
89
|
+
});
|
|
90
|
+
const configOverrides = {
|
|
91
|
+
codeCoverage: options.codeCoverage,
|
|
92
|
+
name
|
|
93
|
+
};
|
|
94
|
+
if ((0, _utils.isWebComponent)()) {
|
|
54
95
|
const webpackConfig = {
|
|
55
|
-
configuration: {
|
|
56
|
-
|
|
96
|
+
configuration: {
|
|
97
|
+
...config === null || config === void 0 ? void 0 : config.configuration,
|
|
98
|
+
mode
|
|
99
|
+
},
|
|
100
|
+
plugins: config === null || config === void 0 ? void 0 : config.plugins
|
|
57
101
|
};
|
|
58
102
|
return Promise.all([
|
|
59
|
-
runWatch((0,
|
|
103
|
+
runWatch((0, _webpack1.createWebpackConfig)(webpackConfig, {
|
|
60
104
|
embed: true,
|
|
61
|
-
...configOverrides
|
|
105
|
+
...configOverrides
|
|
62
106
|
})),
|
|
63
|
-
(0,
|
|
64
|
-
? runWatch((0, webpack_2.createWebpackConfig)(webpackConfig, configOverrides))
|
|
65
|
-
: runServe((0, webpack_2.createWebpackConfig)(webpackConfig, configOverrides)),
|
|
107
|
+
(0, _utils.isDevServerDisabled)() ? runWatch((0, _webpack1.createWebpackConfig)(webpackConfig, configOverrides)) : runServe((0, _webpack1.createWebpackConfig)(webpackConfig, configOverrides))
|
|
66
108
|
]);
|
|
67
109
|
}
|
|
68
|
-
const webpackConfig = config !== null && config !== void 0 ? config : (0,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
110
|
+
const webpackConfig = config !== null && config !== void 0 ? config : (0, _webpack1.createWebpackConfig)({
|
|
111
|
+
configuration: {
|
|
112
|
+
mode
|
|
113
|
+
}
|
|
114
|
+
}, configOverrides);
|
|
115
|
+
return (0, _utils.isDevServerDisabled)() ? runWatch(webpackConfig) : runServe(webpackConfig);
|
|
73
116
|
}
|
|
74
117
|
function readWebpackConfig({ config, fallback }) {
|
|
75
|
-
var
|
|
76
|
-
return (
|
|
118
|
+
var _readConfig;
|
|
119
|
+
return (_readConfig = readConfig(config)) !== null && _readConfig !== void 0 ? _readConfig : readConfig(fallback);
|
|
77
120
|
}
|
|
78
121
|
function readConfig(relativePath) {
|
|
79
|
-
if (relativePath &&
|
|
80
|
-
return require(
|
|
122
|
+
if (relativePath && _fs.default.existsSync(relativePath)) {
|
|
123
|
+
return require(_path.default.resolve(relativePath));
|
|
81
124
|
}
|
|
82
125
|
}
|
|
83
126
|
async function run(config) {
|
|
84
|
-
const compiler = (0,
|
|
85
|
-
const stats = await new Promise((resolve, reject)
|
|
86
|
-
compiler.run((error, stats)
|
|
127
|
+
const compiler = (0, _webpack.default)(config);
|
|
128
|
+
const stats = await new Promise((resolve, reject)=>{
|
|
129
|
+
compiler.run((error, stats)=>{
|
|
87
130
|
if (!stats || error) {
|
|
88
131
|
return reject(error !== null && error !== void 0 ? error : new Error('Something went wrong.'));
|
|
89
132
|
}
|
|
90
133
|
if (stats.hasErrors()) {
|
|
91
134
|
return reject(new Error(stats.toString('errors-only')));
|
|
92
135
|
}
|
|
93
|
-
compiler.close(()
|
|
136
|
+
compiler.close(()=>resolve(stats));
|
|
94
137
|
});
|
|
95
138
|
});
|
|
96
139
|
process.stdout.write(stats.toString(config.stats) + '\n');
|
|
97
140
|
}
|
|
98
141
|
async function runServe({ devServer = {}, ...config }) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const host = (
|
|
102
|
-
const port = await (0,
|
|
142
|
+
const compiler = (0, _webpack.default)(config);
|
|
143
|
+
var _devServer_host;
|
|
144
|
+
const host = (_devServer_host = devServer.host) !== null && _devServer_host !== void 0 ? _devServer_host : 'localhost';
|
|
145
|
+
const port = await (0, _portfinder.getPortPromise)({
|
|
103
146
|
port: Number(devServer.port) || 8080,
|
|
104
|
-
host
|
|
147
|
+
host
|
|
105
148
|
});
|
|
106
|
-
return new Promise((_0, reject)
|
|
107
|
-
const server = new
|
|
108
|
-
|
|
149
|
+
return new Promise((_0, reject)=>{
|
|
150
|
+
const server = new _webpackdevserver.default({
|
|
151
|
+
...devServer,
|
|
152
|
+
host,
|
|
153
|
+
port
|
|
154
|
+
}, compiler);
|
|
155
|
+
server.startCallback((e)=>{
|
|
109
156
|
if (e) {
|
|
110
|
-
server.stopCallback(()
|
|
157
|
+
server.stopCallback(()=>{
|
|
111
158
|
reject(e);
|
|
112
159
|
});
|
|
113
160
|
}
|
|
@@ -115,15 +162,16 @@ async function runServe({ devServer = {}, ...config }) {
|
|
|
115
162
|
});
|
|
116
163
|
}
|
|
117
164
|
async function runWatch(config) {
|
|
118
|
-
const compiler = (0,
|
|
119
|
-
return new Promise((_0, reject)
|
|
120
|
-
const watching = compiler.watch({}, e
|
|
165
|
+
const compiler = (0, _webpack.default)(config);
|
|
166
|
+
return new Promise((_0, reject)=>{
|
|
167
|
+
const watching = compiler.watch({}, (e)=>{
|
|
121
168
|
if (e) {
|
|
122
|
-
watching.close(()
|
|
169
|
+
watching.close(()=>{
|
|
123
170
|
reject(e);
|
|
124
171
|
});
|
|
125
172
|
}
|
|
126
173
|
});
|
|
127
174
|
});
|
|
128
175
|
}
|
|
176
|
+
|
|
129
177
|
//# sourceMappingURL=bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/bundle.ts"],"sourcesContent":["import fs from 'fs';\nimport path from 'path';\nimport crypto from 'crypto';\nimport { getPortPromise } from 'portfinder';\n\nimport webpack, { Configuration } from 'webpack';\nimport WebpackDevServer from 'webpack-dev-server';\n\nimport { getPackageName, isDevServerDisabled, isWebComponent, log } from '../../utils';\nimport { Overrides, createWebpackConfig } from '../../webpack';\n\ninterface Options {\n buildStat?: boolean;\n codeCoverage?: boolean;\n config?: string;\n}\n\nfunction getName() {\n const packageName = getPackageName()\n .replace(/\\//g, '-')\n .replace(/[^\\w-]/g, '');\n const hash = crypto.randomBytes(4).toString('hex');\n\n return `${packageName}-${hash}`;\n}\n\nexport const webpackDevConfigFileName = 'webpack.dev.config.js';\nexport const webpackProdConfigFileName = 'webpack.prod.config.js';\n\nexport async function bundle(options: Options = {}) {\n log.info('Bundling the package...');\n\n const name = getName();\n const mode = 'production';\n const fallback = `./${webpackProdConfigFileName}`;\n const config = readWebpackConfig({ ...options, fallback });\n const { buildStat, codeCoverage } = options;\n const webpackOptions = { name, buildStat, codeCoverage };\n\n if (isWebComponent()) {\n const webpackConfig: Overrides = {\n configuration: { ...config?.configuration, mode },\n plugins: config?.plugins,\n };\n\n return Promise.all([\n run(createWebpackConfig(webpackConfig, { embed: true, ...webpackOptions })),\n run(createWebpackConfig(webpackConfig, webpackOptions)),\n ]);\n }\n\n return run(config ?? createWebpackConfig({ configuration: { mode } }, webpackOptions));\n}\n\nexport async function bundleWatch(options: Options = {}) {\n log.info('Bundling the package...');\n\n const name = getName();\n const mode = 'development';\n const config = readWebpackConfig({ ...options, fallback: `./${webpackDevConfigFileName}` });\n const configOverrides = { codeCoverage: options.codeCoverage, name };\n\n if (isWebComponent()) {\n const webpackConfig: Overrides = {\n configuration: { ...config?.configuration, mode },\n plugins: config?.plugins,\n };\n\n return Promise.all([\n runWatch(createWebpackConfig(webpackConfig, { embed: true, ...configOverrides })),\n isDevServerDisabled()\n ? runWatch(createWebpackConfig(webpackConfig, configOverrides))\n : runServe(createWebpackConfig(webpackConfig, configOverrides)),\n ]);\n }\n\n const webpackConfig =\n config ?? createWebpackConfig({ configuration: { mode } }, configOverrides);\n\n return isDevServerDisabled() ? runWatch(webpackConfig) : runServe(webpackConfig);\n}\n\nfunction readWebpackConfig({ config, fallback }: Options & { fallback: string }) {\n return readConfig(config) ?? readConfig(fallback);\n}\n\nfunction readConfig(relativePath?: string): Record<string, any> | undefined {\n if (relativePath && fs.existsSync(relativePath)) {\n return require(path.resolve(relativePath));\n }\n}\n\nasync function run(config: Configuration) {\n const compiler = webpack(config);\n\n const stats = await new Promise<webpack.Stats>((resolve, reject) => {\n compiler.run((error, stats) => {\n if (!stats || error) {\n return reject(error ?? new Error('Something went wrong.'));\n }\n\n if (stats.hasErrors()) {\n return reject(new Error(stats.toString('errors-only')));\n }\n\n compiler.close(() => resolve(stats));\n });\n });\n\n process.stdout.write(stats.toString(config.stats) + '\\n');\n}\n\nasync function runServe({ devServer = {}, ...config }: Configuration) {\n const compiler = webpack(config);\n const host = devServer.host ?? 'localhost';\n const port = await getPortPromise({\n port: Number(devServer.port) || 8080,\n host,\n });\n\n return new Promise<void>((_0, reject) => {\n const server = new WebpackDevServer({ ...devServer, host, port }, compiler);\n server.startCallback(e => {\n if (e) {\n server.stopCallback(() => {\n reject(e);\n });\n }\n });\n });\n}\n\nasync function runWatch(config: Configuration) {\n const compiler = webpack(config);\n return new Promise<void>((_0, reject) => {\n const watching = compiler.watch({}, e => {\n if (e) {\n watching.close(() => {\n reject(e);\n });\n }\n });\n });\n}\n"],"names":["bundle","bundleWatch","webpackDevConfigFileName","webpackProdConfigFileName","getName","packageName","getPackageName","replace","hash","crypto","randomBytes","toString","options","log","info","name","mode","fallback","config","readWebpackConfig","buildStat","codeCoverage","webpackOptions","isWebComponent","webpackConfig","configuration","plugins","Promise","all","run","createWebpackConfig","embed","configOverrides","runWatch","isDevServerDisabled","runServe","readConfig","relativePath","fs","existsSync","require","path","resolve","compiler","webpack","stats","reject","error","Error","hasErrors","close","process","stdout","write","devServer","host","port","getPortPromise","Number","_0","server","WebpackDevServer","startCallback","e","stopCallback","watching","watch"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-args.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/check-args.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,OAAO,QAMzE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "checkArgs", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return checkArgs;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _utils = require("../../utils");
|
|
12
|
+
function checkArgs(args, { obsolete }) {
|
|
13
|
+
obsolete === null || obsolete === void 0 ? void 0 : obsolete.forEach((arg)=>{
|
|
14
|
+
if (args[arg.replace(/^--/, '')]) {
|
|
15
|
+
_utils.log.warning(`WARNING: ${arg} option is obsolete and is ignored`);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=check-args.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/check-args.ts"],"sourcesContent":["import { log } from '../../utils';\n\ninterface Options {\n obsolete?: string[];\n}\n\nexport function checkArgs(args: Record<string, any>, { obsolete }: Options) {\n obsolete?.forEach(arg => {\n if (args[arg.replace(/^--/, '')]) {\n log.warning(`WARNING: ${arg} option is obsolete and is ignored`);\n }\n });\n}\n"],"names":["checkArgs","args","obsolete","forEach","arg","replace","log","warning"],"mappings":";;;;+BAMgBA;;;eAAAA;;;uBANI;AAMb,SAASA,UAAUC,IAAyB,EAAE,EAAEC,QAAQ,EAAW;IACtEA,qBAAAA,+BAAAA,SAAUC,OAAO,CAACC,CAAAA;QACd,IAAIH,IAAI,CAACG,IAAIC,OAAO,CAAC,OAAO,IAAI,EAAE;YAC9BC,UAAG,CAACC,OAAO,CAAC,CAAC,SAAS,EAAEH,IAAI,kCAAkC,CAAC;QACnE;IACJ;AACJ"}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get gitGetBranch () {
|
|
13
|
+
return gitGetBranch;
|
|
14
|
+
},
|
|
15
|
+
get gitGetCommitHash () {
|
|
16
|
+
return gitGetCommitHash;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _clios = require("./cli-os");
|
|
20
|
+
const gitGetBranch = ()=>{
|
|
21
|
+
return (0, _clios.runCommandOutput)('git rev-parse --abbrev-ref HEAD').trim();
|
|
7
22
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (0, cli_os_1.runCommandOutput)('git rev-parse --short HEAD').trim();
|
|
23
|
+
const gitGetCommitHash = ()=>{
|
|
24
|
+
return (0, _clios.runCommandOutput)('git rev-parse --short HEAD').trim();
|
|
11
25
|
};
|
|
12
|
-
|
|
26
|
+
|
|
13
27
|
//# sourceMappingURL=cli-git.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/cli-git.ts"],"sourcesContent":["import { runCommandOutput } from './cli-os';\n\nexport const gitGetBranch = (): string => {\n return runCommandOutput('git rev-parse --abbrev-ref HEAD').trim();\n};\n\nexport const gitGetCommitHash = (): string => {\n return runCommandOutput('git rev-parse --short HEAD').trim();\n};\n"],"names":["gitGetBranch","gitGetCommitHash","runCommandOutput","trim"],"mappings":";;;;;;;;;;;QAEaA;eAAAA;;QAIAC;eAAAA;;;uBANoB;AAE1B,MAAMD,eAAe;IACxB,OAAOE,IAAAA,uBAAgB,EAAC,mCAAmCC,IAAI;AACnE;AAEO,MAAMF,mBAAmB;IAC5B,OAAOC,IAAAA,uBAAgB,EAAC,8BAA8BC,IAAI;AAC9D"}
|
|
@@ -1,47 +1,86 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get npmGetPackageVersions () {
|
|
13
|
+
return npmGetPackageVersions;
|
|
14
|
+
},
|
|
15
|
+
get npmGetPackageVersionsDetails () {
|
|
16
|
+
return npmGetPackageVersionsDetails;
|
|
17
|
+
},
|
|
18
|
+
get npmPackageSet () {
|
|
19
|
+
return npmPackageSet;
|
|
20
|
+
},
|
|
21
|
+
get npmPublish () {
|
|
22
|
+
return npmPublish;
|
|
23
|
+
},
|
|
24
|
+
get npmTagVersion () {
|
|
25
|
+
return npmTagVersion;
|
|
26
|
+
},
|
|
27
|
+
get npmUnpublish () {
|
|
28
|
+
return npmUnpublish;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const _clios = require("./cli-os");
|
|
10
32
|
const NPM_TIMEOUT = 10000;
|
|
11
33
|
function npmGetPackageVersions(registry, packageName) {
|
|
12
34
|
try {
|
|
13
|
-
const v = (0,
|
|
35
|
+
const v = (0, _clios.runCommandOutput)(`npm show ${packageName} versions --registry ${registry} --json`, {
|
|
36
|
+
timeout: NPM_TIMEOUT
|
|
37
|
+
});
|
|
14
38
|
return JSON.parse(v);
|
|
15
|
-
}
|
|
16
|
-
catch (_a) {
|
|
39
|
+
} catch (e) {
|
|
17
40
|
return [];
|
|
18
41
|
}
|
|
19
42
|
}
|
|
20
43
|
function npmGetPackageVersionsDetails(registry, packageName) {
|
|
21
44
|
try {
|
|
22
|
-
const result = (0,
|
|
45
|
+
const result = (0, _clios.runCommandOutput)(`npm view ${packageName} time dist-tags --registry ${registry} --json`, {
|
|
46
|
+
timeout: NPM_TIMEOUT
|
|
47
|
+
});
|
|
23
48
|
const { time, 'dist-tags': distTags } = JSON.parse(result);
|
|
24
|
-
const tags = Object.fromEntries(Object.entries(distTags).map(([tag, version])
|
|
25
|
-
|
|
26
|
-
|
|
49
|
+
const tags = Object.fromEntries(Object.entries(distTags).map(([tag, version])=>[
|
|
50
|
+
version,
|
|
51
|
+
tag
|
|
52
|
+
]));
|
|
53
|
+
return Object.keys(time).reduce((out, version)=>{
|
|
54
|
+
return [
|
|
55
|
+
...out,
|
|
56
|
+
{
|
|
57
|
+
name: version,
|
|
58
|
+
date: new Date(time[version]),
|
|
59
|
+
tag: tags[version]
|
|
60
|
+
}
|
|
61
|
+
];
|
|
27
62
|
}, []);
|
|
28
|
-
}
|
|
29
|
-
catch (_a) {
|
|
63
|
+
} catch (e) {
|
|
30
64
|
return [];
|
|
31
65
|
}
|
|
32
66
|
}
|
|
33
67
|
async function npmUnpublish(registry, packageName, packageVersion) {
|
|
34
|
-
await (0,
|
|
35
|
-
timeout: NPM_TIMEOUT
|
|
68
|
+
await (0, _clios.runCommand)(`npm unpublish ${packageName}@${packageVersion} --registry ${registry}`, {
|
|
69
|
+
timeout: NPM_TIMEOUT
|
|
36
70
|
});
|
|
37
71
|
}
|
|
38
72
|
async function npmPublish({ dry, tag }) {
|
|
39
|
-
await (0,
|
|
73
|
+
await (0, _clios.runCommand)([
|
|
74
|
+
'npm publish',
|
|
75
|
+
!!tag && `--tag ${tag}`,
|
|
76
|
+
!!dry && `--dry-run`
|
|
77
|
+
]);
|
|
40
78
|
}
|
|
41
79
|
async function npmPackageSet(key, value) {
|
|
42
|
-
await (0,
|
|
80
|
+
await (0, _clios.runCommand)(`npm pkg set ${key}=${value}`);
|
|
43
81
|
}
|
|
44
|
-
async function npmTagVersion({ packageName, packageVersion, registry, tag
|
|
45
|
-
await (0,
|
|
82
|
+
async function npmTagVersion({ packageName, packageVersion, registry, tag }) {
|
|
83
|
+
await (0, _clios.runCommand)(`npm dist-tag ${registry ? `--registry=${registry} ` : ''}add ${packageName}@${packageVersion} ${tag}`);
|
|
46
84
|
}
|
|
85
|
+
|
|
47
86
|
//# sourceMappingURL=cli-npm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/cli-npm.ts"],"sourcesContent":["import { runCommand, runCommandOutput } from './cli-os';\n\nexport interface Version {\n name: string;\n date: Date;\n tag?: string;\n}\n\nconst NPM_TIMEOUT = 10000;\n\nexport function npmGetPackageVersions(registry: string, packageName: string): string[] {\n try {\n const v = runCommandOutput(\n `npm show ${packageName} versions --registry ${registry} --json`,\n { timeout: NPM_TIMEOUT }\n );\n\n return JSON.parse(v);\n } catch {\n return [];\n }\n}\n\nexport function npmGetPackageVersionsDetails(registry: string, packageName: string): Version[] {\n try {\n const result = runCommandOutput(\n `npm view ${packageName} time dist-tags --registry ${registry} --json`,\n { timeout: NPM_TIMEOUT }\n );\n\n const { time, 'dist-tags': distTags } = JSON.parse(result);\n\n const tags = Object.fromEntries(\n Object.entries(distTags).map(([tag, version]) => [version, tag])\n );\n\n return Object.keys(time).reduce((out, version) => {\n return [...out, { name: version, date: new Date(time[version]), tag: tags[version] }];\n }, []);\n } catch {\n return [];\n }\n}\n\nexport async function npmUnpublish(registry: string, packageName: string, packageVersion: string) {\n await runCommand(`npm unpublish ${packageName}@${packageVersion} --registry ${registry}`, {\n timeout: NPM_TIMEOUT,\n });\n}\n\nexport async function npmPublish({ dry, tag }: { dry?: boolean; tag?: string }) {\n await runCommand(['npm publish', !!tag && `--tag ${tag}`, !!dry && `--dry-run`]);\n}\n\nexport async function npmPackageSet(key: string, value: string) {\n await runCommand(`npm pkg set ${key}=${value}`);\n}\n\nexport async function npmTagVersion({\n packageName,\n packageVersion,\n registry,\n tag,\n}: {\n packageName: string;\n packageVersion: string;\n registry?: string;\n tag: string;\n}) {\n await runCommand(\n `npm dist-tag ${\n registry ? `--registry=${registry} ` : ''\n }add ${packageName}@${packageVersion} ${tag}`\n );\n}\n"],"names":["npmGetPackageVersions","npmGetPackageVersionsDetails","npmPackageSet","npmPublish","npmTagVersion","npmUnpublish","NPM_TIMEOUT","registry","packageName","v","runCommandOutput","timeout","JSON","parse","result","time","distTags","tags","Object","fromEntries","entries","map","tag","version","keys","reduce","out","name","date","Date","packageVersion","runCommand","dry","key","value"],"mappings":";;;;;;;;;;;QAUgBA;eAAAA;;QAaAC;eAAAA;;QA+BMC;eAAAA;;QAJAC;eAAAA;;QAQAC;eAAAA;;QAdAC;eAAAA;;;uBA5CuB;AAQ7C,MAAMC,cAAc;AAEb,SAASN,sBAAsBO,QAAgB,EAAEC,WAAmB;IACvE,IAAI;QACA,MAAMC,IAAIC,IAAAA,uBAAgB,EACtB,CAAC,SAAS,EAAEF,YAAY,qBAAqB,EAAED,SAAS,OAAO,CAAC,EAChE;YAAEI,SAASL;QAAY;QAG3B,OAAOM,KAAKC,KAAK,CAACJ;IACtB,EAAE,UAAM;QACJ,OAAO,EAAE;IACb;AACJ;AAEO,SAASR,6BAA6BM,QAAgB,EAAEC,WAAmB;IAC9E,IAAI;QACA,MAAMM,SAASJ,IAAAA,uBAAgB,EAC3B,CAAC,SAAS,EAAEF,YAAY,2BAA2B,EAAED,SAAS,OAAO,CAAC,EACtE;YAAEI,SAASL;QAAY;QAG3B,MAAM,EAAES,IAAI,EAAE,aAAaC,QAAQ,EAAE,GAAGJ,KAAKC,KAAK,CAACC;QAEnD,MAAMG,OAAOC,OAAOC,WAAW,CAC3BD,OAAOE,OAAO,CAACJ,UAAUK,GAAG,CAAC,CAAC,CAACC,KAAKC,QAAQ,GAAK;gBAACA;gBAASD;aAAI;QAGnE,OAAOJ,OAAOM,IAAI,CAACT,MAAMU,MAAM,CAAC,CAACC,KAAKH;YAClC,OAAO;mBAAIG;gBAAK;oBAAEC,MAAMJ;oBAASK,MAAM,IAAIC,KAAKd,IAAI,CAACQ,QAAQ;oBAAGD,KAAKL,IAAI,CAACM,QAAQ;gBAAC;aAAE;QACzF,GAAG,EAAE;IACT,EAAE,UAAM;QACJ,OAAO,EAAE;IACb;AACJ;AAEO,eAAelB,aAAaE,QAAgB,EAAEC,WAAmB,EAAEsB,cAAsB;IAC5F,MAAMC,IAAAA,iBAAU,EAAC,CAAC,cAAc,EAAEvB,YAAY,CAAC,EAAEsB,eAAe,YAAY,EAAEvB,UAAU,EAAE;QACtFI,SAASL;IACb;AACJ;AAEO,eAAeH,WAAW,EAAE6B,GAAG,EAAEV,GAAG,EAAmC;IAC1E,MAAMS,IAAAA,iBAAU,EAAC;QAAC;QAAe,CAAC,CAACT,OAAO,CAAC,MAAM,EAAEA,KAAK;QAAE,CAAC,CAACU,OAAO,CAAC,SAAS,CAAC;KAAC;AACnF;AAEO,eAAe9B,cAAc+B,GAAW,EAAEC,KAAa;IAC1D,MAAMH,IAAAA,iBAAU,EAAC,CAAC,YAAY,EAAEE,IAAI,CAAC,EAAEC,OAAO;AAClD;AAEO,eAAe9B,cAAc,EAChCI,WAAW,EACXsB,cAAc,EACdvB,QAAQ,EACRe,GAAG,EAMN;IACG,MAAMS,IAAAA,iBAAU,EACZ,CAAC,aAAa,EACVxB,WAAW,CAAC,WAAW,EAAEA,SAAS,CAAC,CAAC,GAAG,GAC1C,IAAI,EAAEC,YAAY,CAAC,EAAEsB,eAAe,CAAC,EAAER,KAAK;AAErD"}
|
package/dist/cli/utils/cli-os.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get runCommand () {
|
|
13
|
+
return runCommand;
|
|
14
|
+
},
|
|
15
|
+
get runCommandOutput () {
|
|
16
|
+
return runCommandOutput;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _child_process = require("child_process");
|
|
20
|
+
const _utils = require("../../utils");
|
|
21
|
+
const runCommand = (command, { quiet, ...spawnOptions } = {})=>{
|
|
22
|
+
return new Promise((resolve, reject)=>{
|
|
23
|
+
const commandArray = Array.isArray(command) ? command.filter((c)=>!!c).map((c)=>c.toString()).join(' ').split(' ') : command.split(' ');
|
|
15
24
|
const fullCommand = commandArray.join(' ');
|
|
16
25
|
const commandName = commandArray.shift();
|
|
17
26
|
if (!commandName) {
|
|
@@ -19,49 +28,41 @@ const runCommand = (command, { quiet, ...spawnOptions } = {}) => {
|
|
|
19
28
|
return;
|
|
20
29
|
}
|
|
21
30
|
if (!quiet) {
|
|
22
|
-
|
|
31
|
+
_utils.log.info(`run command ${fullCommand}`);
|
|
23
32
|
}
|
|
24
|
-
const proc = (0,
|
|
33
|
+
const proc = (0, _child_process.spawn)(commandName, commandArray, {
|
|
25
34
|
shell: process.platform === 'win32',
|
|
26
|
-
...spawnOptions
|
|
35
|
+
...spawnOptions
|
|
27
36
|
});
|
|
28
37
|
proc.stdout.pipe(process.stdout);
|
|
29
38
|
proc.stderr.pipe(process.stderr);
|
|
30
|
-
proc.on('exit', function
|
|
39
|
+
proc.on('exit', function(code) {
|
|
31
40
|
if (!quiet) {
|
|
32
|
-
|
|
41
|
+
_utils.log.info(`command finished with code ${code}`, fullCommand);
|
|
33
42
|
}
|
|
34
43
|
if (code) {
|
|
35
44
|
reject(new Error(`command exited with code: ${code}`));
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
45
|
+
} else {
|
|
38
46
|
resolve();
|
|
39
47
|
}
|
|
40
48
|
});
|
|
41
49
|
});
|
|
42
50
|
};
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const commandArray = Array.isArray(command)
|
|
46
|
-
? command
|
|
47
|
-
.filter(c => !!c)
|
|
48
|
-
.map(c => c.toString())
|
|
49
|
-
.join(' ')
|
|
50
|
-
.split(' ')
|
|
51
|
-
: command.split(' ');
|
|
51
|
+
const runCommandOutput = (command, { quiet, ...execSyncOptions } = {})=>{
|
|
52
|
+
const commandArray = Array.isArray(command) ? command.filter((c)=>!!c).map((c)=>c.toString()).join(' ').split(' ') : command.split(' ');
|
|
52
53
|
const fullCommand = commandArray.join(' ');
|
|
53
54
|
const commandName = commandArray.shift();
|
|
54
55
|
if (!commandName) {
|
|
55
56
|
throw new Error();
|
|
56
57
|
}
|
|
57
58
|
if (!quiet) {
|
|
58
|
-
|
|
59
|
+
_utils.log.info(`run command ${fullCommand}`);
|
|
59
60
|
}
|
|
60
|
-
const result = (0,
|
|
61
|
+
const result = (0, _child_process.execSync)(fullCommand, execSyncOptions).toString();
|
|
61
62
|
if (!quiet) {
|
|
62
|
-
|
|
63
|
+
_utils.log.info('command finished', result);
|
|
63
64
|
}
|
|
64
65
|
return result;
|
|
65
66
|
};
|
|
66
|
-
|
|
67
|
+
|
|
67
68
|
//# sourceMappingURL=cli-os.js.map
|