@nrwl/workspace 16.0.0-beta.0 → 16.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/executors.json +3 -27
- package/generators.d.ts +1 -6
- package/generators.js +2 -13
- package/generators.js.map +1 -1
- package/generators.json +2 -106
- package/index.d.ts +1 -24
- package/index.js +1 -54
- package/index.js.map +1 -1
- package/package.json +7 -53
- package/tasks-runners/default.d.ts +1 -1
- package/tasks-runners/default.js +2 -3
- package/tasks-runners/default.js.map +1 -1
- package/testing.d.ts +1 -2
- package/testing.js +2 -8
- package/testing.js.map +1 -1
- package/README.md +0 -61
- package/migrations.json +0 -159
- package/src/core/file-utils.d.ts +0 -1
- package/src/core/file-utils.js +0 -5
- package/src/core/file-utils.js.map +0 -1
- package/src/core/project-graph.d.ts +0 -1
- package/src/core/project-graph.js +0 -5
- package/src/core/project-graph.js.map +0 -1
- package/src/executors/counter/counter.impl.d.ts +0 -12
- package/src/executors/counter/counter.impl.js +0 -48
- package/src/executors/counter/counter.impl.js.map +0 -1
- package/src/executors/counter/schema.json +0 -20
- package/src/executors/run-commands/compat.d.ts +0 -2
- package/src/executors/run-commands/compat.js +0 -6
- package/src/executors/run-commands/compat.js.map +0 -1
- package/src/executors/run-commands/run-commands.impl.d.ts +0 -3
- package/src/executors/run-commands/run-commands.impl.js +0 -7
- package/src/executors/run-commands/run-commands.impl.js.map +0 -1
- package/src/executors/run-commands/schema.json +0 -150
- package/src/executors/run-script/compat.d.ts +0 -2
- package/src/executors/run-script/compat.js +0 -6
- package/src/executors/run-script/compat.js.map +0 -1
- package/src/executors/run-script/run-script.impl.d.ts +0 -3
- package/src/executors/run-script/run-script.impl.js +0 -7
- package/src/executors/run-script/run-script.impl.js.map +0 -1
- package/src/executors/run-script/schema.json +0 -27
- package/src/generators/ci-workflow/ci-workflow.d.ts +0 -6
- package/src/generators/ci-workflow/ci-workflow.js +0 -46
- package/src/generators/ci-workflow/ci-workflow.js.map +0 -1
- package/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ +0 -58
- package/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ +0 -36
- package/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ +0 -73
- package/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ +0 -29
- package/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ +0 -47
- package/src/generators/ci-workflow/schema.json +0 -38
- package/src/generators/convert-to-nx-project/convert-to-nx-project.d.ts +0 -6
- package/src/generators/convert-to-nx-project/convert-to-nx-project.js +0 -86
- package/src/generators/convert-to-nx-project/convert-to-nx-project.js.map +0 -1
- package/src/generators/convert-to-nx-project/schema.d.ts +0 -7
- package/src/generators/convert-to-nx-project/schema.json +0 -38
- package/src/generators/library/files/lib/README.md +0 -14
- package/src/generators/library/files/lib/__dot__babelrc__tmpl__ +0 -3
- package/src/generators/library/files/lib/package.json__tmpl__ +0 -4
- package/src/generators/library/files/lib/src/index.ts__tmpl__ +0 -1
- package/src/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +0 -7
- package/src/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +0 -3
- package/src/generators/library/files/lib/tsconfig.json +0 -13
- package/src/generators/library/files/lib/tsconfig.lib.json +0 -10
- package/src/generators/library/files/root/tsconfig.base.json +0 -20
- package/src/generators/library/library.d.ts +0 -15
- package/src/generators/library/library.js +0 -170
- package/src/generators/library/library.js.map +0 -1
- package/src/generators/library/schema.d.ts +0 -23
- package/src/generators/library/schema.json +0 -112
- package/src/generators/move/lib/check-destination.d.ts +0 -11
- package/src/generators/move/lib/check-destination.js +0 -24
- package/src/generators/move/lib/check-destination.js.map +0 -1
- package/src/generators/move/lib/create-project-configuration-in-new-destination.d.ts +0 -3
- package/src/generators/move/lib/create-project-configuration-in-new-destination.js +0 -17
- package/src/generators/move/lib/create-project-configuration-in-new-destination.js.map +0 -1
- package/src/generators/move/lib/move-project-files.d.ts +0 -8
- package/src/generators/move/lib/move-project-files.js +0 -22
- package/src/generators/move/lib/move-project-files.js.map +0 -1
- package/src/generators/move/lib/normalize-schema.d.ts +0 -3
- package/src/generators/move/lib/normalize-schema.js +0 -17
- package/src/generators/move/lib/normalize-schema.js.map +0 -1
- package/src/generators/move/lib/update-build-targets.d.ts +0 -6
- package/src/generators/move/lib/update-build-targets.js +0 -54
- package/src/generators/move/lib/update-build-targets.js.map +0 -1
- package/src/generators/move/lib/update-cypress-config.d.ts +0 -10
- package/src/generators/move/lib/update-cypress-config.js +0 -39
- package/src/generators/move/lib/update-cypress-config.js.map +0 -1
- package/src/generators/move/lib/update-default-project.d.ts +0 -10
- package/src/generators/move/lib/update-default-project.js +0 -21
- package/src/generators/move/lib/update-default-project.js.map +0 -1
- package/src/generators/move/lib/update-eslintrc-json.d.ts +0 -8
- package/src/generators/move/lib/update-eslintrc-json.js +0 -44
- package/src/generators/move/lib/update-eslintrc-json.js.map +0 -1
- package/src/generators/move/lib/update-implicit-dependencies.d.ts +0 -6
- package/src/generators/move/lib/update-implicit-dependencies.js +0 -20
- package/src/generators/move/lib/update-implicit-dependencies.js.map +0 -1
- package/src/generators/move/lib/update-imports.d.ts +0 -8
- package/src/generators/move/lib/update-imports.js +0 -159
- package/src/generators/move/lib/update-imports.js.map +0 -1
- package/src/generators/move/lib/update-jest-config.d.ts +0 -10
- package/src/generators/move/lib/update-jest-config.js +0 -35
- package/src/generators/move/lib/update-jest-config.js.map +0 -1
- package/src/generators/move/lib/update-package-json.d.ts +0 -8
- package/src/generators/move/lib/update-package-json.js +0 -22
- package/src/generators/move/lib/update-package-json.js.map +0 -1
- package/src/generators/move/lib/update-project-root-files.d.ts +0 -10
- package/src/generators/move/lib/update-project-root-files.js +0 -44
- package/src/generators/move/lib/update-project-root-files.js.map +0 -1
- package/src/generators/move/lib/update-readme.d.ts +0 -8
- package/src/generators/move/lib/update-readme.js +0 -22
- package/src/generators/move/lib/update-readme.js.map +0 -1
- package/src/generators/move/lib/update-storybook-config.d.ts +0 -10
- package/src/generators/move/lib/update-storybook-config.js +0 -44
- package/src/generators/move/lib/update-storybook-config.js.map +0 -1
- package/src/generators/move/lib/utils.d.ts +0 -22
- package/src/generators/move/lib/utils.js +0 -43
- package/src/generators/move/lib/utils.js.map +0 -1
- package/src/generators/move/move.d.ts +0 -5
- package/src/generators/move/move.js +0 -48
- package/src/generators/move/move.js.map +0 -1
- package/src/generators/move/schema.d.ts +0 -13
- package/src/generators/move/schema.json +0 -47
- package/src/generators/new/files-integrated-repo/__dot__editorconfig +0 -13
- package/src/generators/new/files-integrated-repo/__dot__gitignore +0 -39
- package/src/generators/new/files-integrated-repo/__dot__vscode/extensions.json__tmpl__ +0 -9
- package/src/generators/new/files-integrated-repo/package.json__tmpl__ +0 -14
- package/src/generators/new/files-integrated-repo/tools/generators/.gitkeep +0 -0
- package/src/generators/new/files-integrated-repo/tools/tsconfig.tools.json +0 -12
- package/src/generators/new/files-package-based-repo/__dot__gitignore +0 -39
- package/src/generators/new/files-package-based-repo/__dot__vscode/extensions.json__tmpl__ +0 -8
- package/src/generators/new/files-package-based-repo/package.json__tmpl__ +0 -13
- package/src/generators/new/files-readme/README.md.template +0 -21
- package/src/generators/new/files-root-app/__dot__gitignore +0 -39
- package/src/generators/new/files-root-app/__dot__vscode/extensions.json__tmpl__ +0 -6
- package/src/generators/new/files-root-app/package.json__tmpl__ +0 -14
- package/src/generators/new/generate-preset.d.ts +0 -4
- package/src/generators/new/generate-preset.js +0 -129
- package/src/generators/new/generate-preset.js.map +0 -1
- package/src/generators/new/generate-workspace-files.d.ts +0 -3
- package/src/generators/new/generate-workspace-files.js +0 -170
- package/src/generators/new/generate-workspace-files.js.map +0 -1
- package/src/generators/new/new.d.ts +0 -26
- package/src/generators/new/new.js +0 -73
- package/src/generators/new/new.js.map +0 -1
- package/src/generators/new/schema.json +0 -77
- package/src/generators/npm-package/files/index.js.template +0 -1
- package/src/generators/npm-package/npm-package.d.ts +0 -6
- package/src/generators/npm-package/npm-package.js +0 -42
- package/src/generators/npm-package/npm-package.js.map +0 -1
- package/src/generators/npm-package/schema.json +0 -21
- package/src/generators/preset/files/angular/app.module.d.ts +0 -0
- package/src/generators/preset/files/angular/app.module.js +0 -1
- package/src/generators/preset/files/angular/app.module.js.map +0 -1
- package/src/generators/preset/files/angular/app.module.ts +0 -0
- package/src/generators/preset/preset.d.ts +0 -4
- package/src/generators/preset/preset.js +0 -150
- package/src/generators/preset/preset.js.map +0 -1
- package/src/generators/preset/schema.d.ts +0 -17
- package/src/generators/preset/schema.json +0 -92
- package/src/generators/remove/lib/__fixtures__/jest-project.config.d.ts +0 -14
- package/src/generators/remove/lib/__fixtures__/jest-project.config.js +0 -18
- package/src/generators/remove/lib/__fixtures__/jest-project.config.js.map +0 -1
- package/src/generators/remove/lib/__fixtures__/jest.config.d.ts +0 -0
- package/src/generators/remove/lib/__fixtures__/jest.config.js +0 -9
- package/src/generators/remove/lib/__fixtures__/jest.config.js.map +0 -1
- package/src/generators/remove/lib/check-dependencies.d.ts +0 -7
- package/src/generators/remove/lib/check-dependencies.js +0 -27
- package/src/generators/remove/lib/check-dependencies.js.map +0 -1
- package/src/generators/remove/lib/check-project-is-safe-to-remove.d.ts +0 -3
- package/src/generators/remove/lib/check-project-is-safe-to-remove.js +0 -26
- package/src/generators/remove/lib/check-project-is-safe-to-remove.js.map +0 -1
- package/src/generators/remove/lib/check-targets.d.ts +0 -10
- package/src/generators/remove/lib/check-targets.js +0 -72
- package/src/generators/remove/lib/check-targets.js.map +0 -1
- package/src/generators/remove/lib/remove-project-references-in-config.d.ts +0 -3
- package/src/generators/remove/lib/remove-project-references-in-config.js +0 -22
- package/src/generators/remove/lib/remove-project-references-in-config.js.map +0 -1
- package/src/generators/remove/lib/remove-project.d.ts +0 -5
- package/src/generators/remove/lib/remove-project.js +0 -15
- package/src/generators/remove/lib/remove-project.js.map +0 -1
- package/src/generators/remove/lib/update-jest-config.d.ts +0 -6
- package/src/generators/remove/lib/update-jest-config.js +0 -64
- package/src/generators/remove/lib/update-jest-config.js.map +0 -1
- package/src/generators/remove/lib/update-tsconfig.d.ts +0 -8
- package/src/generators/remove/lib/update-tsconfig.js +0 -35
- package/src/generators/remove/lib/update-tsconfig.js.map +0 -1
- package/src/generators/remove/remove.d.ts +0 -5
- package/src/generators/remove/remove.js +0 -31
- package/src/generators/remove/remove.js.map +0 -1
- package/src/generators/remove/schema.d.ts +0 -10
- package/src/generators/remove/schema.json +0 -47
- package/src/generators/run-commands/run-commands.d.ts +0 -5
- package/src/generators/run-commands/run-commands.js +0 -30
- package/src/generators/run-commands/run-commands.js.map +0 -1
- package/src/generators/run-commands/schema.d.ts +0 -8
- package/src/generators/run-commands/schema.json +0 -49
- package/src/generators/utils/get-npm-package-version.d.ts +0 -1
- package/src/generators/utils/get-npm-package-version.js +0 -18
- package/src/generators/utils/get-npm-package-version.js.map +0 -1
- package/src/generators/utils/insert-import.d.ts +0 -2
- package/src/generators/utils/insert-import.js +0 -48
- package/src/generators/utils/insert-import.js.map +0 -1
- package/src/generators/utils/insert-statement.d.ts +0 -5
- package/src/generators/utils/insert-statement.js +0 -34
- package/src/generators/utils/insert-statement.js.map +0 -1
- package/src/generators/utils/presets.d.ts +0 -18
- package/src/generators/utils/presets.js +0 -23
- package/src/generators/utils/presets.js.map +0 -1
- package/src/generators/workspace-generator/files/index.ts__tmpl__ +0 -10
- package/src/generators/workspace-generator/files/schema.json__tmpl__ +0 -17
- package/src/generators/workspace-generator/schema.d.ts +0 -4
- package/src/generators/workspace-generator/schema.json +0 -25
- package/src/generators/workspace-generator/workspace-generator.d.ts +0 -3
- package/src/generators/workspace-generator/workspace-generator.js +0 -27
- package/src/generators/workspace-generator/workspace-generator.js.map +0 -1
- package/src/migrations/update-12-5-0/add-target-dependencies.d.ts +0 -3
- package/src/migrations/update-12-5-0/add-target-dependencies.js +0 -39
- package/src/migrations/update-12-5-0/add-target-dependencies.js.map +0 -1
- package/src/migrations/update-13-0-0/config-locations/config-locations.d.ts +0 -2
- package/src/migrations/update-13-0-0/config-locations/config-locations.js +0 -34
- package/src/migrations/update-13-0-0/config-locations/config-locations.js.map +0 -1
- package/src/migrations/update-13-0-0/set-default-base-if-not-set.d.ts +0 -3
- package/src/migrations/update-13-0-0/set-default-base-if-not-set.js +0 -30
- package/src/migrations/update-13-0-0/set-default-base-if-not-set.js.map +0 -1
- package/src/migrations/update-13-10-0/update-decorate-cli.d.ts +0 -3
- package/src/migrations/update-13-10-0/update-decorate-cli.js +0 -14
- package/src/migrations/update-13-10-0/update-decorate-cli.js.map +0 -1
- package/src/migrations/update-13-10-0/update-tasks-runner.d.ts +0 -3
- package/src/migrations/update-13-10-0/update-tasks-runner.js +0 -17
- package/src/migrations/update-13-10-0/update-tasks-runner.js.map +0 -1
- package/src/migrations/update-13-2-0/set-parallel-default.d.ts +0 -3
- package/src/migrations/update-13-2-0/set-parallel-default.js +0 -27
- package/src/migrations/update-13-2-0/set-parallel-default.js.map +0 -1
- package/src/migrations/update-13-3-0/update-tsc-executor-location.d.ts +0 -3
- package/src/migrations/update-13-3-0/update-tsc-executor-location.js +0 -31
- package/src/migrations/update-13-3-0/update-tsc-executor-location.js.map +0 -1
- package/src/migrations/update-13-6-0/remove-old-task-runner-options.d.ts +0 -3
- package/src/migrations/update-13-6-0/remove-old-task-runner-options.js +0 -17
- package/src/migrations/update-13-6-0/remove-old-task-runner-options.js.map +0 -1
- package/src/migrations/update-13-9-0/replace-tao-with-nx.d.ts +0 -3
- package/src/migrations/update-13-9-0/replace-tao-with-nx.js +0 -28
- package/src/migrations/update-13-9-0/replace-tao-with-nx.js.map +0 -1
- package/src/migrations/update-13-9-0/update-decorate-cli.d.ts +0 -3
- package/src/migrations/update-13-9-0/update-decorate-cli.js +0 -13
- package/src/migrations/update-13-9-0/update-decorate-cli.js.map +0 -1
- package/src/migrations/update-14-0-0/change-npm-script-executor.d.ts +0 -3
- package/src/migrations/update-14-0-0/change-npm-script-executor.js +0 -20
- package/src/migrations/update-14-0-0/change-npm-script-executor.js.map +0 -1
- package/src/migrations/update-14-0-0/change-nx-json-presets.d.ts +0 -3
- package/src/migrations/update-14-0-0/change-nx-json-presets.js +0 -21
- package/src/migrations/update-14-0-0/change-nx-json-presets.js.map +0 -1
- package/src/migrations/update-14-2-0/enable-source-analysis.d.ts +0 -3
- package/src/migrations/update-14-2-0/enable-source-analysis.js +0 -28
- package/src/migrations/update-14-2-0/enable-source-analysis.js.map +0 -1
- package/src/migrations/update-14-8-0/change-run-commands-executor.d.ts +0 -3
- package/src/migrations/update-14-8-0/change-run-commands-executor.js +0 -20
- package/src/migrations/update-14-8-0/change-run-commands-executor.js.map +0 -1
- package/src/migrations/update-15-7-0/split-configuration-into-project-json-files.d.ts +0 -3
- package/src/migrations/update-15-7-0/split-configuration-into-project-json-files.js +0 -15
- package/src/migrations/update-15-7-0/split-configuration-into-project-json-files.js.map +0 -1
- package/src/tasks-runner/cache.d.ts +0 -1
- package/src/tasks-runner/cache.js +0 -6
- package/src/tasks-runner/cache.js.map +0 -1
- package/src/tasks-runner/default-tasks-runner.d.ts +0 -1
- package/src/tasks-runner/default-tasks-runner.js +0 -5
- package/src/tasks-runner/default-tasks-runner.js.map +0 -1
- package/src/tasks-runner/life-cycle.d.ts +0 -1
- package/src/tasks-runner/life-cycle.js +0 -6
- package/src/tasks-runner/life-cycle.js.map +0 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +0 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +0 -5
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js.map +0 -1
- package/src/tasks-runner/tasks-runner-v2.d.ts +0 -1
- package/src/tasks-runner/tasks-runner-v2.js +0 -7
- package/src/tasks-runner/tasks-runner-v2.js.map +0 -1
- package/src/tasks-runner/tasks-runner.d.ts +0 -2
- package/src/tasks-runner/tasks-runner.js +0 -5
- package/src/tasks-runner/tasks-runner.js.map +0 -1
- package/src/tasks-runner/utils.d.ts +0 -1
- package/src/tasks-runner/utils.js +0 -5
- package/src/tasks-runner/utils.js.map +0 -1
- package/src/utilities/app-root.d.ts +0 -1
- package/src/utilities/app-root.js +0 -5
- package/src/utilities/app-root.js.map +0 -1
- package/src/utilities/buildable-libs-utils.d.ts +0 -41
- package/src/utilities/buildable-libs-utils.js +0 -316
- package/src/utilities/buildable-libs-utils.js.map +0 -1
- package/src/utilities/default-base.d.ts +0 -1
- package/src/utilities/default-base.js +0 -16
- package/src/utilities/default-base.js.map +0 -1
- package/src/utilities/fileutils.d.ts +0 -13
- package/src/utilities/fileutils.js +0 -52
- package/src/utilities/fileutils.js.map +0 -1
- package/src/utilities/output.d.ts +0 -1
- package/src/utilities/output.js +0 -5
- package/src/utilities/output.js.map +0 -1
- package/src/utilities/project-type.d.ts +0 -2
- package/src/utilities/project-type.js +0 -10
- package/src/utilities/project-type.js.map +0 -1
- package/src/utilities/run-tasks-in-serial.d.ts +0 -8
- package/src/utilities/run-tasks-in-serial.js +0 -19
- package/src/utilities/run-tasks-in-serial.js.map +0 -1
- package/src/utilities/set-default-collection.d.ts +0 -11
- package/src/utilities/set-default-collection.js +0 -24
- package/src/utilities/set-default-collection.js.map +0 -1
- package/src/utilities/ts-config.d.ts +0 -5
- package/src/utilities/ts-config.js +0 -40
- package/src/utilities/ts-config.js.map +0 -1
- package/src/utilities/typescript/compilation.d.ts +0 -22
- package/src/utilities/typescript/compilation.js +0 -120
- package/src/utilities/typescript/compilation.js.map +0 -1
- package/src/utilities/typescript/find-nodes.d.ts +0 -5
- package/src/utilities/typescript/find-nodes.js +0 -14
- package/src/utilities/typescript/find-nodes.js.map +0 -1
- package/src/utilities/typescript/get-source-nodes.d.ts +0 -5
- package/src/utilities/typescript/get-source-nodes.js +0 -22
- package/src/utilities/typescript/get-source-nodes.js.map +0 -1
- package/src/utilities/typescript.d.ts +0 -23
- package/src/utilities/typescript.js +0 -73
- package/src/utilities/typescript.js.map +0 -1
- package/src/utilities/version-utils.d.ts +0 -4
- package/src/utilities/version-utils.js +0 -14
- package/src/utilities/version-utils.js.map +0 -1
- package/src/utils/ast-utils.d.ts +0 -2
- package/src/utils/ast-utils.js +0 -8
- package/src/utils/ast-utils.js.map +0 -1
- package/src/utils/cli-config-utils.d.ts +0 -16
- package/src/utils/cli-config-utils.js +0 -30
- package/src/utils/cli-config-utils.js.map +0 -1
- package/src/utils/fileutils.d.ts +0 -14
- package/src/utils/fileutils.js +0 -57
- package/src/utils/fileutils.js.map +0 -1
- package/src/utils/lint.d.ts +0 -4
- package/src/utils/lint.js +0 -3
- package/src/utils/lint.js.map +0 -1
- package/src/utils/output.d.ts +0 -52
- package/src/utils/output.js +0 -134
- package/src/utils/output.js.map +0 -1
- package/src/utils/perf-logging.d.ts +0 -1
- package/src/utils/perf-logging.js +0 -11
- package/src/utils/perf-logging.js.map +0 -1
- package/src/utils/project-type.d.ts +0 -6
- package/src/utils/project-type.js +0 -29
- package/src/utils/project-type.js.map +0 -1
- package/src/utils/rules/add-install-task.d.ts +0 -4
- package/src/utils/rules/add-install-task.js +0 -15
- package/src/utils/rules/add-install-task.js.map +0 -1
- package/src/utils/rules/deleteFile.d.ts +0 -5
- package/src/utils/rules/deleteFile.js +0 -11
- package/src/utils/rules/deleteFile.js.map +0 -1
- package/src/utils/rules/format-files.d.ts +0 -4
- package/src/utils/rules/format-files.js +0 -55
- package/src/utils/rules/format-files.js.map +0 -1
- package/src/utils/rules/ng-add.d.ts +0 -8
- package/src/utils/rules/ng-add.js +0 -12
- package/src/utils/rules/ng-add.js.map +0 -1
- package/src/utils/rules/visit-not-ignored-files.d.ts +0 -3
- package/src/utils/rules/visit-not-ignored-files.js +0 -36
- package/src/utils/rules/visit-not-ignored-files.js.map +0 -1
- package/src/utils/rules/workspace.d.ts +0 -8
- package/src/utils/rules/workspace.js +0 -23
- package/src/utils/rules/workspace.js.map +0 -1
- package/src/utils/strings.d.ts +0 -107
- package/src/utils/strings.js +0 -160
- package/src/utils/strings.js.map +0 -1
- package/src/utils/testing-utils.d.ts +0 -47
- package/src/utils/testing-utils.js +0 -140
- package/src/utils/testing-utils.js.map +0 -1
- package/src/utils/testing.d.ts +0 -11
- package/src/utils/testing.js +0 -85
- package/src/utils/testing.js.map +0 -1
- package/src/utils/version-utils.d.ts +0 -1
- package/src/utils/version-utils.js +0 -5
- package/src/utils/version-utils.js.map +0 -1
- package/src/utils/versions.d.ts +0 -7
- package/src/utils/versions.js +0 -13
- package/src/utils/versions.js.map +0 -1
- package/src/utils/workspace.d.ts +0 -10
- package/src/utils/workspace.js +0 -90
- package/src/utils/workspace.js.map +0 -1
@@ -1,112 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
3
|
-
"$id": "NxTypescriptLibrary",
|
4
|
-
"cli": "nx",
|
5
|
-
"title": "Create a TypeScript Library",
|
6
|
-
"description": "Create a TypeScript Library.",
|
7
|
-
"type": "object",
|
8
|
-
"examples": [
|
9
|
-
{
|
10
|
-
"command": "nx g lib mylib --directory=myapp",
|
11
|
-
"description": "Generate `libs/myapp/mylib`"
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"properties": {
|
15
|
-
"name": {
|
16
|
-
"type": "string",
|
17
|
-
"description": "Library name.",
|
18
|
-
"$default": {
|
19
|
-
"$source": "argv",
|
20
|
-
"index": 0
|
21
|
-
},
|
22
|
-
"x-prompt": "What name would you like to use for the library?",
|
23
|
-
"pattern": "^[a-zA-Z].*$"
|
24
|
-
},
|
25
|
-
"directory": {
|
26
|
-
"type": "string",
|
27
|
-
"description": "A directory where the lib is placed.",
|
28
|
-
"x-priority": "important"
|
29
|
-
},
|
30
|
-
"linter": {
|
31
|
-
"description": "The tool to use for running lint checks.",
|
32
|
-
"type": "string",
|
33
|
-
"enum": ["eslint"],
|
34
|
-
"default": "eslint"
|
35
|
-
},
|
36
|
-
"unitTestRunner": {
|
37
|
-
"type": "string",
|
38
|
-
"enum": ["jest", "none"],
|
39
|
-
"description": "Test runner to use for unit tests.",
|
40
|
-
"default": "jest"
|
41
|
-
},
|
42
|
-
"tags": {
|
43
|
-
"type": "string",
|
44
|
-
"description": "Add tags to the library (used for linting)."
|
45
|
-
},
|
46
|
-
"skipFormat": {
|
47
|
-
"description": "Skip formatting files.",
|
48
|
-
"type": "boolean",
|
49
|
-
"default": false,
|
50
|
-
"x-priority": "internal"
|
51
|
-
},
|
52
|
-
"skipTsConfig": {
|
53
|
-
"type": "boolean",
|
54
|
-
"description": "Do not update `tsconfig.json` for development experience.",
|
55
|
-
"default": false
|
56
|
-
},
|
57
|
-
"testEnvironment": {
|
58
|
-
"type": "string",
|
59
|
-
"enum": ["jsdom", "node"],
|
60
|
-
"description": "The test environment to use if `unitTestRunner` is set to `jest`.",
|
61
|
-
"default": "jsdom"
|
62
|
-
},
|
63
|
-
"importPath": {
|
64
|
-
"type": "string",
|
65
|
-
"description": "The library name used to import it, like `@myorg/my-awesome-lib`.",
|
66
|
-
"x-priority": "important"
|
67
|
-
},
|
68
|
-
"babelJest": {
|
69
|
-
"type": "boolean",
|
70
|
-
"description": "Use `babel` instead `ts-jest`.",
|
71
|
-
"default": false
|
72
|
-
},
|
73
|
-
"pascalCaseFiles": {
|
74
|
-
"type": "boolean",
|
75
|
-
"description": "Use pascal case file names.",
|
76
|
-
"alias": "P",
|
77
|
-
"default": false
|
78
|
-
},
|
79
|
-
"js": {
|
80
|
-
"type": "boolean",
|
81
|
-
"description": "Generate JavaScript files rather than TypeScript files.",
|
82
|
-
"default": false
|
83
|
-
},
|
84
|
-
"strict": {
|
85
|
-
"type": "boolean",
|
86
|
-
"description": "Whether to enable `tsconfig` strict mode or not.",
|
87
|
-
"default": true
|
88
|
-
},
|
89
|
-
"skipBabelrc": {
|
90
|
-
"type": "boolean",
|
91
|
-
"description": "Do not generate `.babelrc` file. Useful for Node libraries that are not compiled by Babel.",
|
92
|
-
"default": false
|
93
|
-
},
|
94
|
-
"buildable": {
|
95
|
-
"type": "boolean",
|
96
|
-
"default": false,
|
97
|
-
"description": "Generate a buildable library."
|
98
|
-
},
|
99
|
-
"setParserOptionsProject": {
|
100
|
-
"type": "boolean",
|
101
|
-
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
102
|
-
"default": false
|
103
|
-
},
|
104
|
-
"standaloneConfig": {
|
105
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
106
|
-
"type": "boolean",
|
107
|
-
"default": true,
|
108
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
109
|
-
}
|
110
|
-
},
|
111
|
-
"required": ["name"]
|
112
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nrwl/devkit';
|
2
|
-
import { Schema } from '../schema';
|
3
|
-
/**
|
4
|
-
* Checks whether the destination folder is valid
|
5
|
-
*
|
6
|
-
* - must not be outside the workspace
|
7
|
-
* - must be a new folder
|
8
|
-
*
|
9
|
-
* @param schema The options provided to the schematic
|
10
|
-
*/
|
11
|
-
export declare function checkDestination(tree: Tree, schema: Schema, projectConfig: ProjectConfiguration): void;
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.checkDestination = void 0;
|
4
|
-
const utils_1 = require("./utils");
|
5
|
-
/**
|
6
|
-
* Checks whether the destination folder is valid
|
7
|
-
*
|
8
|
-
* - must not be outside the workspace
|
9
|
-
* - must be a new folder
|
10
|
-
*
|
11
|
-
* @param schema The options provided to the schematic
|
12
|
-
*/
|
13
|
-
function checkDestination(tree, schema, projectConfig) {
|
14
|
-
const INVALID_DESTINATION = `Invalid destination: [${schema.destination}]`;
|
15
|
-
if (schema.destination.includes('..')) {
|
16
|
-
throw new Error(`${INVALID_DESTINATION} - Please specify explicit path.`);
|
17
|
-
}
|
18
|
-
const destination = (0, utils_1.getDestination)(tree, schema, projectConfig);
|
19
|
-
if (tree.children(destination).length > 0) {
|
20
|
-
throw new Error(`${INVALID_DESTINATION} - Path is not empty.`);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
exports.checkDestination = checkDestination;
|
24
|
-
//# sourceMappingURL=check-destination.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"check-destination.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/check-destination.ts"],"names":[],"mappings":";;;AAEA,mCAAyC;AAEzC;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAC9B,IAAU,EACV,MAAc,EACd,aAAmC;IAEnC,MAAM,mBAAmB,GAAG,yBAAyB,MAAM,CAAC,WAAW,GAAG,CAAC;IAE3E,IAAI,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAmB,kCAAkC,CAAC,CAAC;KAC3E;IAED,MAAM,WAAW,GAAG,IAAA,sBAAc,EAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IAEhE,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,GAAG,mBAAmB,uBAAuB,CAAC,CAAC;KAChE;AACH,CAAC;AAhBD,4CAgBC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.createProjectConfigurationInNewDestination = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
function createProjectConfigurationInNewDestination(tree, schema, projectConfig) {
|
6
|
-
if (projectConfig.name) {
|
7
|
-
projectConfig.name = schema.newProjectName;
|
8
|
-
}
|
9
|
-
// replace old root path with new one
|
10
|
-
const projectString = JSON.stringify(projectConfig);
|
11
|
-
const newProjectString = projectString.replace(new RegExp(projectConfig.root, 'g'), schema.relativeToRootDestination);
|
12
|
-
const newProject = JSON.parse(newProjectString);
|
13
|
-
// Create a new project with the root replaced
|
14
|
-
(0, devkit_1.addProjectConfiguration)(tree, schema.newProjectName, newProject);
|
15
|
-
}
|
16
|
-
exports.createProjectConfigurationInNewDestination = createProjectConfigurationInNewDestination;
|
17
|
-
//# sourceMappingURL=create-project-configuration-in-new-destination.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"create-project-configuration-in-new-destination.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/create-project-configuration-in-new-destination.ts"],"names":[],"mappings":";;;AAAA,yCAIsB;AAGtB,SAAgB,0CAA0C,CACxD,IAAU,EACV,MAAwB,EACxB,aAAmC;IAEnC,IAAI,aAAa,CAAC,IAAI,EAAE;QACtB,aAAa,CAAC,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC;KAC5C;IAED,qCAAqC;IACrC,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IACpD,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAC5C,IAAI,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,EACnC,MAAM,CAAC,yBAAyB,CACjC,CAAC;IACF,MAAM,UAAU,GAAyB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAEtE,8CAA8C;IAC9C,IAAA,gCAAuB,EAAC,IAAI,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AACnE,CAAC;AAnBD,gGAmBC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nrwl/devkit';
|
2
|
-
import { NormalizedSchema } from '../schema';
|
3
|
-
/**
|
4
|
-
* Moves a project to the given destination path
|
5
|
-
*
|
6
|
-
* @param schema The options provided to the schematic
|
7
|
-
*/
|
8
|
-
export declare function moveProjectFiles(tree: Tree, schema: NormalizedSchema, project: ProjectConfiguration): void;
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.moveProjectFiles = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
const path_1 = require("path");
|
6
|
-
/**
|
7
|
-
* Moves a project to the given destination path
|
8
|
-
*
|
9
|
-
* @param schema The options provided to the schematic
|
10
|
-
*/
|
11
|
-
function moveProjectFiles(tree, schema, project) {
|
12
|
-
(0, devkit_1.visitNotIgnoredFiles)(tree, project.root, (file) => {
|
13
|
-
// This is a rename but Angular Devkit isn't capable of writing to a file after it's renamed so this is a workaround
|
14
|
-
const content = tree.read(file);
|
15
|
-
const relativeFromOriginalSource = (0, path_1.relative)(project.root, file);
|
16
|
-
const newFilePath = (0, path_1.join)(schema.relativeToRootDestination, relativeFromOriginalSource);
|
17
|
-
tree.write(newFilePath, content);
|
18
|
-
tree.delete(file);
|
19
|
-
});
|
20
|
-
}
|
21
|
-
exports.moveProjectFiles = moveProjectFiles;
|
22
|
-
//# sourceMappingURL=move-project-files.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"move-project-files.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/move-project-files.ts"],"names":[],"mappings":";;;AAAA,yCAAgF;AAChF,+BAAsC;AAGtC;;;;GAIG;AACH,SAAgB,gBAAgB,CAC9B,IAAU,EACV,MAAwB,EACxB,OAA6B;IAE7B,IAAA,6BAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;QAChD,oHAAoH;QACpH,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,0BAA0B,GAAG,IAAA,eAAQ,EAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChE,MAAM,WAAW,GAAG,IAAA,WAAI,EACtB,MAAM,CAAC,yBAAyB,EAChC,0BAA0B,CAC3B,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,4CAgBC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.normalizeSchema = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
const path_1 = require("nx/src/utils/path");
|
6
|
-
const utils_1 = require("./utils");
|
7
|
-
function normalizeSchema(tree, schema, projectConfiguration) {
|
8
|
-
var _a;
|
9
|
-
const destination = schema.destination.startsWith('/')
|
10
|
-
? (0, utils_1.normalizeSlashes)(schema.destination.slice(1))
|
11
|
-
: schema.destination;
|
12
|
-
const newProjectName = (0, utils_1.getNewProjectName)(destination);
|
13
|
-
const { npmScope } = (0, devkit_1.getWorkspaceLayout)(tree);
|
14
|
-
return Object.assign(Object.assign({}, schema), { destination, importPath: (_a = schema.importPath) !== null && _a !== void 0 ? _a : (0, utils_1.normalizeSlashes)((0, path_1.getImportPath)(npmScope, destination)), newProjectName, relativeToRootDestination: (0, utils_1.getDestination)(tree, schema, projectConfiguration) });
|
15
|
-
}
|
16
|
-
exports.normalizeSchema = normalizeSchema;
|
17
|
-
//# sourceMappingURL=normalize-schema.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"normalize-schema.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/normalize-schema.ts"],"names":[],"mappings":";;;AAAA,yCAA8E;AAC9E,4CAAkD;AAElD,mCAA8E;AAE9E,SAAgB,eAAe,CAC7B,IAAU,EACV,MAAc,EACd,oBAA0C;;IAE1C,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC;QACpD,CAAC,CAAC,IAAA,wBAAgB,EAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;IACvB,MAAM,cAAc,GAAG,IAAA,yBAAiB,EAAC,WAAW,CAAC,CAAC;IACtD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAE9C,uCACK,MAAM,KACT,WAAW,EACX,UAAU,EACR,MAAA,MAAM,CAAC,UAAU,mCACjB,IAAA,wBAAgB,EAAC,IAAA,oBAAa,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,EACxD,cAAc,EACd,yBAAyB,EAAE,IAAA,sBAAc,EACvC,IAAI,EACJ,MAAM,EACN,oBAAoB,CACrB,IACD;AACJ,CAAC;AAxBD,0CAwBC"}
|
@@ -1,54 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateBuildTargets = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
/**
|
6
|
-
* Update other references to the source project's targets
|
7
|
-
*/
|
8
|
-
function updateBuildTargets(tree, schema) {
|
9
|
-
(0, devkit_1.getProjects)(tree).forEach((projectConfig, project) => {
|
10
|
-
let changed = false;
|
11
|
-
Object.entries(projectConfig.targets || {}).forEach(([target, targetConfig]) => {
|
12
|
-
changed =
|
13
|
-
updateJsonValue(targetConfig, (value) => {
|
14
|
-
const [project, target, configuration] = value.split(':');
|
15
|
-
if (project === schema.projectName && target) {
|
16
|
-
return configuration
|
17
|
-
? `${schema.newProjectName}:${target}:${configuration}`
|
18
|
-
: `${schema.newProjectName}:${target}`;
|
19
|
-
}
|
20
|
-
}) || changed;
|
21
|
-
});
|
22
|
-
if (changed) {
|
23
|
-
(0, devkit_1.updateProjectConfiguration)(tree, project, projectConfig);
|
24
|
-
}
|
25
|
-
});
|
26
|
-
}
|
27
|
-
exports.updateBuildTargets = updateBuildTargets;
|
28
|
-
function updateJsonValue(config, callback) {
|
29
|
-
function recur(obj, key, value) {
|
30
|
-
let changed = false;
|
31
|
-
if (typeof value === 'string') {
|
32
|
-
const result = callback(value);
|
33
|
-
if (result && obj[key] !== result) {
|
34
|
-
obj[key] = result;
|
35
|
-
changed = true;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
else if (Array.isArray(value)) {
|
39
|
-
value.forEach((x, idx) => recur(value, idx, x));
|
40
|
-
}
|
41
|
-
else if (typeof value === 'object') {
|
42
|
-
Object.entries(value).forEach(([k, v]) => {
|
43
|
-
changed = recur(value, k, v) || changed;
|
44
|
-
});
|
45
|
-
}
|
46
|
-
return changed;
|
47
|
-
}
|
48
|
-
let changed = false;
|
49
|
-
Object.entries(config).forEach(([k, v]) => {
|
50
|
-
changed = recur(config, k, v) || changed;
|
51
|
-
});
|
52
|
-
return changed;
|
53
|
-
}
|
54
|
-
//# sourceMappingURL=update-build-targets.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update-build-targets.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-build-targets.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAGtB;;GAEG;AACH,SAAgB,kBAAkB,CAAC,IAAU,EAAE,MAAwB;IACrE,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,OAAO,EAAE,EAAE;QACnD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CACjD,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,EAAE;YACzB,OAAO;gBACL,eAAe,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;oBACtC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAC1D,IAAI,OAAO,KAAK,MAAM,CAAC,WAAW,IAAI,MAAM,EAAE;wBAC5C,OAAO,aAAa;4BAClB,CAAC,CAAC,GAAG,MAAM,CAAC,cAAc,IAAI,MAAM,IAAI,aAAa,EAAE;4BACvD,CAAC,CAAC,GAAG,MAAM,CAAC,cAAc,IAAI,MAAM,EAAE,CAAC;qBAC1C;gBACH,CAAC,CAAC,IAAI,OAAO,CAAC;QAClB,CAAC,CACF,CAAC;QACF,IAAI,OAAO,EAAE;YACX,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;SAC1D;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AApBD,gDAoBC;AAED,SAAS,eAAe,CACtB,MAA2B,EAC3B,QAAsC;IAEtC,SAAS,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK;QAC5B,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC/B,IAAI,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;gBACjC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;gBAClB,OAAO,GAAG,IAAI,CAAC;aAChB;SACF;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAC/B,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;SACjD;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACpC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;gBACvC,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC;YAC1C,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;QACxC,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nrwl/devkit';
|
2
|
-
import { NormalizedSchema } from '../schema';
|
3
|
-
/**
|
4
|
-
* Updates the videos and screenshots folders in the cypress.json/cypress.config.ts if it exists (i.e. we're moving an e2e project)
|
5
|
-
*
|
6
|
-
* (assume relative paths have been updated previously)
|
7
|
-
*
|
8
|
-
* @param schema The options provided to the schematic
|
9
|
-
*/
|
10
|
-
export declare function updateCypressConfig(tree: Tree, schema: NormalizedSchema, project: ProjectConfiguration): Tree;
|
@@ -1,39 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateCypressConfig = void 0;
|
4
|
-
const path = require("path");
|
5
|
-
/**
|
6
|
-
* Updates the videos and screenshots folders in the cypress.json/cypress.config.ts if it exists (i.e. we're moving an e2e project)
|
7
|
-
*
|
8
|
-
* (assume relative paths have been updated previously)
|
9
|
-
*
|
10
|
-
* @param schema The options provided to the schematic
|
11
|
-
*/
|
12
|
-
function updateCypressConfig(tree, schema, project) {
|
13
|
-
const cypressJsonPath = path.join(schema.relativeToRootDestination, 'cypress.json');
|
14
|
-
if (tree.exists(cypressJsonPath)) {
|
15
|
-
const cypressJson = JSON.parse(tree.read(cypressJsonPath).toString('utf-8'));
|
16
|
-
// videosFolder is not required because videos can be turned off - it also has a default
|
17
|
-
if (cypressJson.videosFolder) {
|
18
|
-
cypressJson.videosFolder = cypressJson.videosFolder.replace(project.root, schema.relativeToRootDestination);
|
19
|
-
}
|
20
|
-
// screenshotsFolder is not required as it has a default
|
21
|
-
if (cypressJson.screenshotsFolder) {
|
22
|
-
cypressJson.screenshotsFolder = cypressJson.screenshotsFolder.replace(project.root, schema.relativeToRootDestination);
|
23
|
-
}
|
24
|
-
tree.write(cypressJsonPath, JSON.stringify(cypressJson));
|
25
|
-
return tree;
|
26
|
-
}
|
27
|
-
const cypressConfigPath = path.join(schema.relativeToRootDestination, 'cypress.config.ts');
|
28
|
-
if (tree.exists(cypressConfigPath)) {
|
29
|
-
const oldContent = tree.read(cypressConfigPath, 'utf-8');
|
30
|
-
const findName = new RegExp(`'${schema.projectName}'`, 'g');
|
31
|
-
const findDir = new RegExp(project.root, 'g');
|
32
|
-
const newContent = oldContent
|
33
|
-
.replace(findName, `'${schema.newProjectName}'`)
|
34
|
-
.replace(findDir, schema.relativeToRootDestination);
|
35
|
-
tree.write(cypressConfigPath, newContent);
|
36
|
-
}
|
37
|
-
}
|
38
|
-
exports.updateCypressConfig = updateCypressConfig;
|
39
|
-
//# sourceMappingURL=update-cypress-config.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update-cypress-config.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-cypress-config.ts"],"names":[],"mappings":";;;AACA,6BAA6B;AAQ7B;;;;;;GAMG;AACH,SAAgB,mBAAmB,CACjC,IAAU,EACV,MAAwB,EACxB,OAA6B;IAE7B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAC/B,MAAM,CAAC,yBAAyB,EAChC,cAAc,CACf,CAAC;IAEF,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;QAChC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CACvB,CAAC;QACxB,wFAAwF;QACxF,IAAI,WAAW,CAAC,YAAY,EAAE;YAC5B,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,CACzD,OAAO,CAAC,IAAI,EACZ,MAAM,CAAC,yBAAyB,CACjC,CAAC;SACH;QACD,wDAAwD;QACxD,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC,OAAO,CACnE,OAAO,CAAC,IAAI,EACZ,MAAM,CAAC,yBAAyB,CACjC,CAAC;SACH;QAED,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC;KACb;IAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,IAAI,CACjC,MAAM,CAAC,yBAAyB,EAChC,mBAAmB,CACpB,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE;QAClC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,IAAI,MAAM,CAAC,WAAW,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5D,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC9C,MAAM,UAAU,GAAG,UAAU;aAC1B,OAAO,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,cAAc,GAAG,CAAC;aAC/C,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,yBAAyB,CAAC,CAAC;QAEtD,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;KAC3C;AACH,CAAC;AA/CD,kDA+CC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { Tree } from '@nrwl/devkit';
|
2
|
-
import { NormalizedSchema } from '../schema';
|
3
|
-
/**
|
4
|
-
* Updates the project in the workspace file
|
5
|
-
*
|
6
|
-
* - update all references to the old root path
|
7
|
-
* - change the project name
|
8
|
-
* - change target references
|
9
|
-
*/
|
10
|
-
export declare function updateDefaultProject(tree: Tree, schema: NormalizedSchema): void;
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateDefaultProject = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
/**
|
6
|
-
* Updates the project in the workspace file
|
7
|
-
*
|
8
|
-
* - update all references to the old root path
|
9
|
-
* - change the project name
|
10
|
-
* - change target references
|
11
|
-
*/
|
12
|
-
function updateDefaultProject(tree, schema) {
|
13
|
-
const nxJson = (0, devkit_1.readNxJson)(tree);
|
14
|
-
// update default project (if necessary)
|
15
|
-
if (nxJson.defaultProject && nxJson.defaultProject === schema.projectName) {
|
16
|
-
nxJson.defaultProject = schema.newProjectName;
|
17
|
-
(0, devkit_1.updateNxJson)(tree, nxJson);
|
18
|
-
}
|
19
|
-
}
|
20
|
-
exports.updateDefaultProject = updateDefaultProject;
|
21
|
-
//# sourceMappingURL=update-default-project.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update-default-project.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-default-project.ts"],"names":[],"mappings":";;;AAAA,yCAA8D;AAG9D;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAU,EAAE,MAAwB;IACvE,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;IAEhC,wCAAwC;IACxC,IAAI,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,KAAK,MAAM,CAAC,WAAW,EAAE;QACzE,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC9C,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KAC5B;AACH,CAAC;AARD,oDAQC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nrwl/devkit';
|
2
|
-
import { NormalizedSchema } from '../schema';
|
3
|
-
/**
|
4
|
-
* Update the .eslintrc file of the project if it exists.
|
5
|
-
*
|
6
|
-
* @param schema The options provided to the schematic
|
7
|
-
*/
|
8
|
-
export declare function updateEslintrcJson(tree: Tree, schema: NormalizedSchema, project: ProjectConfiguration): void;
|
@@ -1,44 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateEslintrcJson = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
const path_1 = require("path");
|
6
|
-
function offsetFilePath(project, pathToFile, offset) {
|
7
|
-
if (!pathToFile.startsWith('..')) {
|
8
|
-
// not a relative path
|
9
|
-
return pathToFile;
|
10
|
-
}
|
11
|
-
const pathFromRoot = (0, path_1.join)(project.root, pathToFile);
|
12
|
-
return (0, devkit_1.joinPathFragments)(offset, pathFromRoot);
|
13
|
-
}
|
14
|
-
/**
|
15
|
-
* Update the .eslintrc file of the project if it exists.
|
16
|
-
*
|
17
|
-
* @param schema The options provided to the schematic
|
18
|
-
*/
|
19
|
-
function updateEslintrcJson(tree, schema, project) {
|
20
|
-
const eslintRcPath = (0, path_1.join)(schema.relativeToRootDestination, '.eslintrc.json');
|
21
|
-
if (!tree.exists(eslintRcPath)) {
|
22
|
-
// no .eslintrc found. nothing to do
|
23
|
-
return;
|
24
|
-
}
|
25
|
-
const offset = (0, devkit_1.offsetFromRoot)(schema.relativeToRootDestination);
|
26
|
-
(0, devkit_1.updateJson)(tree, eslintRcPath, (eslintRcJson) => {
|
27
|
-
var _a;
|
28
|
-
if (typeof eslintRcJson.extends === 'string') {
|
29
|
-
eslintRcJson.extends = offsetFilePath(project, eslintRcJson.extends, offset);
|
30
|
-
}
|
31
|
-
else {
|
32
|
-
eslintRcJson.extends = eslintRcJson.extends.map((extend) => offsetFilePath(project, extend, offset));
|
33
|
-
}
|
34
|
-
(_a = eslintRcJson.overrides) === null || _a === void 0 ? void 0 : _a.forEach((o) => {
|
35
|
-
var _a;
|
36
|
-
if ((_a = o.parserOptions) === null || _a === void 0 ? void 0 : _a.project) {
|
37
|
-
o.parserOptions.project = o.parserOptions.project.map((p) => p.replace(project.root, schema.relativeToRootDestination));
|
38
|
-
}
|
39
|
-
});
|
40
|
-
return eslintRcJson;
|
41
|
-
});
|
42
|
-
}
|
43
|
-
exports.updateEslintrcJson = updateEslintrcJson;
|
44
|
-
//# sourceMappingURL=update-eslintrc-json.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update-eslintrc-json.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-eslintrc-json.ts"],"names":[],"mappings":";;;AAAA,yCAMsB;AACtB,+BAA4B;AAc5B,SAAS,cAAc,CACrB,OAA6B,EAC7B,UAAkB,EAClB,MAAc;IAEd,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;QAChC,sBAAsB;QACtB,OAAO,UAAU,CAAC;KACnB;IACD,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACpD,OAAO,IAAA,0BAAiB,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AACjD,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAChC,IAAU,EACV,MAAwB,EACxB,OAA6B;IAE7B,MAAM,YAAY,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,CAAC;IAE9E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE;QAC9B,oCAAoC;QACpC,OAAO;KACR;IAED,MAAM,MAAM,GAAG,IAAA,uBAAc,EAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAEhE,IAAA,mBAAU,EAAsB,IAAI,EAAE,YAAY,EAAE,CAAC,YAAY,EAAE,EAAE;;QACnE,IAAI,OAAO,YAAY,CAAC,OAAO,KAAK,QAAQ,EAAE;YAC5C,YAAY,CAAC,OAAO,GAAG,cAAc,CACnC,OAAO,EACP,YAAY,CAAC,OAAO,EACpB,MAAM,CACP,CAAC;SACH;aAAM;YACL,YAAY,CAAC,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CACjE,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CACxC,CAAC;SACH;QAED,MAAA,YAAY,CAAC,SAAS,0CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;;YACpC,IAAI,MAAA,CAAC,CAAC,aAAa,0CAAE,OAAO,EAAE;gBAC5B,CAAC,CAAC,aAAa,CAAC,OAAO,GAAG,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1D,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,yBAAyB,CAAC,CAC1D,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,YAAY,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC;AArCD,gDAqCC"}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.updateImplicitDependencies = void 0;
|
4
|
-
const devkit_1 = require("@nrwl/devkit");
|
5
|
-
/**
|
6
|
-
* @param schema The options provided to the schematic
|
7
|
-
*/
|
8
|
-
function updateImplicitDependencies(tree, schema) {
|
9
|
-
for (const [projectName, project] of (0, devkit_1.getProjects)(tree)) {
|
10
|
-
if (project.implicitDependencies) {
|
11
|
-
const index = project.implicitDependencies.indexOf(schema.projectName);
|
12
|
-
if (index !== -1) {
|
13
|
-
project.implicitDependencies[index] = schema.newProjectName;
|
14
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
18
|
-
}
|
19
|
-
exports.updateImplicitDependencies = updateImplicitDependencies;
|
20
|
-
//# sourceMappingURL=update-implicit-dependencies.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"update-implicit-dependencies.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/move/lib/update-implicit-dependencies.ts"],"names":[],"mappings":";;;AACA,yCAAuE;AAGvE;;GAEG;AACH,SAAgB,0BAA0B,CACxC,IAAU,EACV,MAAwB;IAExB,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,EAAE;QACtD,IAAI,OAAO,CAAC,oBAAoB,EAAE;YAChC,MAAM,KAAK,GAAG,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACvE,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBAChB,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC;gBAC5D,IAAA,mCAA0B,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;aACxD;SACF;KACF;AACH,CAAC;AAbD,gEAaC"}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { ProjectConfiguration, Tree } from '@nrwl/devkit';
|
2
|
-
import { NormalizedSchema } from '../schema';
|
3
|
-
/**
|
4
|
-
* Updates all the imports in the workspace and modifies the tsconfig appropriately.
|
5
|
-
*
|
6
|
-
* @param schema The options provided to the schematic
|
7
|
-
*/
|
8
|
-
export declare function updateImports(tree: Tree, schema: NormalizedSchema, project: ProjectConfiguration): void;
|