@mouryaamit/nx-polystack 0.0.0-stage → 1.0.1
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/LICENSE +21 -0
- package/README.md +77 -2
- package/USER-MANUAL.md +1968 -0
- package/dist/bin/cli.d.ts +1 -0
- package/dist/bin/cli.js +92 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/executors.json +32 -0
- package/dist/generators.json +47 -0
- package/dist/migrations.json +87 -0
- package/dist/runtime/env-secret.cjs +736 -0
- package/dist/src/cli/args.d.ts +18 -0
- package/dist/src/cli/args.js +67 -0
- package/dist/src/cli/args.js.map +1 -0
- package/dist/src/cli/commands/app.d.ts +3 -0
- package/dist/src/cli/commands/app.js +108 -0
- package/dist/src/cli/commands/app.js.map +1 -0
- package/dist/src/cli/commands/build.d.ts +8 -0
- package/dist/src/cli/commands/build.js +132 -0
- package/dist/src/cli/commands/build.js.map +1 -0
- package/dist/src/cli/commands/csp.d.ts +19 -0
- package/dist/src/cli/commands/csp.js +238 -0
- package/dist/src/cli/commands/csp.js.map +1 -0
- package/dist/src/cli/commands/encryption.d.ts +4 -0
- package/dist/src/cli/commands/encryption.js +261 -0
- package/dist/src/cli/commands/encryption.js.map +1 -0
- package/dist/src/cli/commands/env.d.ts +2 -0
- package/dist/src/cli/commands/env.js +74 -0
- package/dist/src/cli/commands/env.js.map +1 -0
- package/dist/src/cli/commands/hardening.d.ts +2 -0
- package/dist/src/cli/commands/hardening.js +176 -0
- package/dist/src/cli/commands/hardening.js.map +1 -0
- package/dist/src/cli/commands/index.d.ts +3 -0
- package/dist/src/cli/commands/index.js +45 -0
- package/dist/src/cli/commands/index.js.map +1 -0
- package/dist/src/cli/commands/infra.d.ts +25 -0
- package/dist/src/cli/commands/infra.js +85 -0
- package/dist/src/cli/commands/infra.js.map +1 -0
- package/dist/src/cli/commands/internal-migrate.d.ts +3 -0
- package/dist/src/cli/commands/internal-migrate.js +65 -0
- package/dist/src/cli/commands/internal-migrate.js.map +1 -0
- package/dist/src/cli/commands/lib.d.ts +2 -0
- package/dist/src/cli/commands/lib.js +70 -0
- package/dist/src/cli/commands/lib.js.map +1 -0
- package/dist/src/cli/commands/llm.d.ts +2 -0
- package/dist/src/cli/commands/llm.js +46 -0
- package/dist/src/cli/commands/llm.js.map +1 -0
- package/dist/src/cli/commands/migrate.d.ts +2 -0
- package/dist/src/cli/commands/migrate.js +230 -0
- package/dist/src/cli/commands/migrate.js.map +1 -0
- package/dist/src/cli/commands/new.d.ts +6 -0
- package/dist/src/cli/commands/new.js +97 -0
- package/dist/src/cli/commands/new.js.map +1 -0
- package/dist/src/cli/commands/preset.d.ts +2 -0
- package/dist/src/cli/commands/preset.js +47 -0
- package/dist/src/cli/commands/preset.js.map +1 -0
- package/dist/src/cli/commands/release.d.ts +3 -0
- package/dist/src/cli/commands/release.js +83 -0
- package/dist/src/cli/commands/release.js.map +1 -0
- package/dist/src/cli/commands/shared.d.ts +3 -0
- package/dist/src/cli/commands/shared.js +55 -0
- package/dist/src/cli/commands/shared.js.map +1 -0
- package/dist/src/cli/commands/update.d.ts +11 -0
- package/dist/src/cli/commands/update.js +120 -0
- package/dist/src/cli/commands/update.js.map +1 -0
- package/dist/src/cli/context.d.ts +18 -0
- package/dist/src/cli/context.js +66 -0
- package/dist/src/cli/context.js.map +1 -0
- package/dist/src/cli/exec.d.ts +9 -0
- package/dist/src/cli/exec.js +34 -0
- package/dist/src/cli/exec.js.map +1 -0
- package/dist/src/cli/help.d.ts +1 -0
- package/dist/src/cli/help.js +291 -0
- package/dist/src/cli/help.js.map +1 -0
- package/dist/src/cli/install-source.d.ts +16 -0
- package/dist/src/cli/install-source.js +49 -0
- package/dist/src/cli/install-source.js.map +1 -0
- package/dist/src/cli/launcher.d.ts +32 -0
- package/dist/src/cli/launcher.js +168 -0
- package/dist/src/cli/launcher.js.map +1 -0
- package/dist/src/cli/migrations.d.ts +25 -0
- package/dist/src/cli/migrations.js +35 -0
- package/dist/src/cli/migrations.js.map +1 -0
- package/dist/src/cli/run-tree.d.ts +9 -0
- package/dist/src/cli/run-tree.js +32 -0
- package/dist/src/cli/run-tree.js.map +1 -0
- package/dist/src/cli/types.d.ts +18 -0
- package/dist/src/cli/types.js +12 -0
- package/dist/src/cli/types.js.map +1 -0
- package/dist/src/cli/update-plan.d.ts +15 -0
- package/dist/src/cli/update-plan.js +40 -0
- package/dist/src/cli/update-plan.js.map +1 -0
- package/dist/src/cli/versions.d.ts +26 -0
- package/dist/src/cli/versions.js +83 -0
- package/dist/src/cli/versions.js.map +1 -0
- package/dist/src/executors/build/executor.d.ts +19 -0
- package/dist/src/executors/build/executor.js +251 -0
- package/dist/src/executors/build/executor.js.map +1 -0
- package/dist/src/executors/build/schema.d.ts +42 -0
- package/dist/src/executors/build/schema.json +104 -0
- package/dist/src/executors/capacitor/executor.d.ts +8 -0
- package/dist/src/executors/capacitor/executor.js +45 -0
- package/dist/src/executors/capacitor/executor.js.map +1 -0
- package/dist/src/executors/capacitor/schema.d.ts +10 -0
- package/dist/src/executors/capacitor/schema.json +24 -0
- package/dist/src/executors/clean/executor.d.ts +19 -0
- package/dist/src/executors/clean/executor.js +134 -0
- package/dist/src/executors/clean/executor.js.map +1 -0
- package/dist/src/executors/clean/schema.d.ts +6 -0
- package/dist/src/executors/clean/schema.json +21 -0
- package/dist/src/executors/flutter-build/executor.d.ts +8 -0
- package/dist/src/executors/flutter-build/executor.js +70 -0
- package/dist/src/executors/flutter-build/executor.js.map +1 -0
- package/dist/src/executors/flutter-build/schema.d.ts +10 -0
- package/dist/src/executors/flutter-build/schema.json +44 -0
- package/dist/src/executors/flutter-export/executor.d.ts +8 -0
- package/dist/src/executors/flutter-export/executor.js +36 -0
- package/dist/src/executors/flutter-export/executor.js.map +1 -0
- package/dist/src/executors/flutter-export/schema.d.ts +6 -0
- package/dist/src/executors/flutter-export/schema.json +28 -0
- package/dist/src/generators/app/files/angular/.eslintrc.json__template__ +28 -0
- package/dist/src/generators/app/files/angular/csp-allowlist.json__template__ +1 -0
- package/dist/src/generators/app/files/angular/server/README.md__template__ +31 -0
- package/dist/src/generators/app/files/angular/src/app/app-routing.module.ts__template__ +10 -0
- package/dist/src/generators/app/files/angular/src/app/app.component.html__template__ +4 -0
- package/dist/src/generators/app/files/angular/src/app/app.component.scss__template__ +1 -0
- package/dist/src/generators/app/files/angular/src/app/app.component.ts__template__ +9 -0
- package/dist/src/generators/app/files/angular/src/app/app.module.ts__template__ +13 -0
- package/dist/src/generators/app/files/angular/src/index.html__template__ +12 -0
- package/dist/src/generators/app/files/angular/src/main.ts__template__ +16 -0
- package/dist/src/generators/app/files/angular/src/styles.scss__template__ +1 -0
- package/dist/src/generators/app/files/angular/tsconfig.app.json__template__ +10 -0
- package/dist/src/generators/app/files/angular/tsconfig.json__template__ +25 -0
- package/dist/src/generators/app/files/angular/tsconfig.spec.json__template__ +8 -0
- package/dist/src/generators/app/files/flutter/.gitignore__template__ +10 -0
- package/dist/src/generators/app/files/flutter/analysis_options.yaml__template__ +8 -0
- package/dist/src/generators/app/files/flutter/lib/main.dart__template__ +23 -0
- package/dist/src/generators/app/files/flutter/pubspec.yaml__template__ +26 -0
- package/dist/src/generators/app/files/flutter/server/nginx.conf__template__ +35 -0
- package/dist/src/generators/app/files/ionic/.gitignore__template__ +7 -0
- package/dist/src/generators/app/files/ionic/capacitor.config.ts__template__ +19 -0
- package/dist/src/generators/app/files/ionic/package.json__template__ +14 -0
- package/dist/src/generators/app/files/ionic/src/app/app.component.html__template__ +3 -0
- package/dist/src/generators/app/files/ionic/src/app/app.component.scss__template__ +0 -0
- package/dist/src/generators/app/files/ionic/src/app/app.module.ts__template__ +16 -0
- package/dist/src/generators/app/files/ionic/src/index.html__template__ +17 -0
- package/dist/src/generators/app/files/ionic/src/styles.scss__template__ +12 -0
- package/dist/src/generators/app/generator.d.ts +15 -0
- package/dist/src/generators/app/generator.js +363 -0
- package/dist/src/generators/app/generator.js.map +1 -0
- package/dist/src/generators/app/schema.d.ts +19 -0
- package/dist/src/generators/app/schema.json +77 -0
- package/dist/src/generators/env/generator.d.ts +3 -0
- package/dist/src/generators/env/generator.js +454 -0
- package/dist/src/generators/env/generator.js.map +1 -0
- package/dist/src/generators/env/schema.d.ts +18 -0
- package/dist/src/generators/env/schema.json +47 -0
- package/dist/src/generators/infra/files/ci/commitlint/commitlint.config.js__template__ +6 -0
- package/dist/src/generators/infra/files/ci/common/tools/config/allowed-cycles.json__template__ +1 -0
- package/dist/src/generators/infra/files/ci/common/tools/scripts/check-cycles.js__template__ +201 -0
- package/dist/src/generators/infra/files/ci/github-actions/.github/workflows/ci.yml__template__ +68 -0
- package/dist/src/generators/infra/files/ci/github-actions/.github/workflows/pr-title.yml__template__ +36 -0
- package/dist/src/generators/infra/files/ci/jenkins/Jenkinsfile__template__ +45 -0
- package/dist/src/generators/infra/files/docs/.github/ISSUE_TEMPLATE/bug.yml__template__ +39 -0
- package/dist/src/generators/infra/files/docs/.github/ISSUE_TEMPLATE/config.yml__template__ +1 -0
- package/dist/src/generators/infra/files/docs/.github/ISSUE_TEMPLATE/feature.yml__template__ +23 -0
- package/dist/src/generators/infra/files/docs/.github/PULL_REQUEST_TEMPLATE.md__template__ +23 -0
- package/dist/src/generators/infra/files/docs/CODE_OF_CONDUCT.md__template__ +18 -0
- package/dist/src/generators/infra/files/docs/CONTRIBUTING.md__template__ +61 -0
- package/dist/src/generators/infra/files/docs/SECURITY.md__template__ +25 -0
- package/dist/src/generators/infra/files/quality/.husky/pre-push__template__ +2 -0
- package/dist/src/generators/infra/files/quality/.secretlintignore__template__ +7 -0
- package/dist/src/generators/infra/files/quality/.secretlintrc.json__template__ +7 -0
- package/dist/src/generators/infra/files/quality/knip.json__template__ +9 -0
- package/dist/src/generators/infra/files/upgrades/.github/workflows/dependency-upgrade.yml__template__ +80 -0
- package/dist/src/generators/infra/generator.d.ts +60 -0
- package/dist/src/generators/infra/generator.js +356 -0
- package/dist/src/generators/infra/generator.js.map +1 -0
- package/dist/src/generators/infra/options.d.ts +28 -0
- package/dist/src/generators/infra/options.js +80 -0
- package/dist/src/generators/infra/options.js.map +1 -0
- package/dist/src/generators/infra/schema.d.ts +19 -0
- package/dist/src/generators/infra/schema.json +59 -0
- package/dist/src/generators/lib/angular-lib.d.ts +27 -0
- package/dist/src/generators/lib/angular-lib.js +85 -0
- package/dist/src/generators/lib/angular-lib.js.map +1 -0
- package/dist/src/generators/lib/files/angular/component/src/index.ts__template__ +2 -0
- package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__/__fileName__.component.html__template__ +1 -0
- package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__/__fileName__.component.scss__template__ +3 -0
- package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__/__fileName__.component.ts__template__ +9 -0
- package/dist/src/generators/lib/files/angular/component/src/lib/__fileName__.module.ts__template__ +11 -0
- package/dist/src/generators/lib/files/angular/config/.eslintrc.json__template__ +32 -0
- package/dist/src/generators/lib/files/angular/config/tsconfig.json__template__ +22 -0
- package/dist/src/generators/lib/files/angular/config/tsconfig.lib.json__template__ +12 -0
- package/dist/src/generators/lib/files/assets/README.md__template__ +13 -0
- package/dist/src/generators/lib/files/design-tokens/README.md__template__ +90 -0
- package/dist/src/generators/lib/files/design-tokens/generated/dart/pubspec.yaml__template__ +11 -0
- package/dist/src/generators/lib/files/design-tokens/src/index.ts__template__ +1 -0
- package/dist/src/generators/lib/files/design-tokens/style-dictionary.config.js__template__ +41 -0
- package/dist/src/generators/lib/files/flutter/.gitignore__template__ +7 -0
- package/dist/src/generators/lib/files/flutter/analysis_options.yaml__template__ +6 -0
- package/dist/src/generators/lib/files/flutter/lib/__snakeName__.dart__template__ +1 -0
- package/dist/src/generators/lib/files/flutter/lib/src/__snakeName__.dart__template__ +6 -0
- package/dist/src/generators/lib/files/flutter/pubspec.yaml__template__ +18 -0
- package/dist/src/generators/lib/files/flutter/test/__snakeName___test.dart__template__ +8 -0
- package/dist/src/generators/lib/files/ionic/src/index.ts__template__ +2 -0
- package/dist/src/generators/lib/files/ionic/src/lib/__fileName__/__fileName__.page.html__template__ +9 -0
- package/dist/src/generators/lib/files/ionic/src/lib/__fileName__/__fileName__.page.scss__template__ +3 -0
- package/dist/src/generators/lib/files/ionic/src/lib/__fileName__/__fileName__.page.ts__template__ +9 -0
- package/dist/src/generators/lib/files/ionic/src/lib/__fileName__.module.ts__template__ +12 -0
- package/dist/src/generators/lib/files/pii/README.md__template__ +35 -0
- package/dist/src/generators/lib/files/pii/src/index.ts__template__ +5 -0
- package/dist/src/generators/lib/files/pii/src/lib/pii-mask.directive.ts__template__ +30 -0
- package/dist/src/generators/lib/files/pii/src/lib/pii-mask.module.ts__template__ +17 -0
- package/dist/src/generators/lib/files/pii/src/lib/pii-mask.options.ts__template__ +6 -0
- package/dist/src/generators/lib/files/pii/src/lib/pii-mask.pipe.ts__template__ +14 -0
- package/dist/src/generators/lib/files/pii/src/lib/pii-mask.ts__template__ +117 -0
- package/dist/src/generators/lib/files/session/README.md__template__ +39 -0
- package/dist/src/generators/lib/files/session/src/index.ts__template__ +5 -0
- package/dist/src/generators/lib/files/session/src/lib/session-clock.ts__template__ +113 -0
- package/dist/src/generators/lib/files/session/src/lib/session-timeout.config.ts__template__ +8 -0
- package/dist/src/generators/lib/files/session/src/lib/session-timeout.module.ts__template__ +23 -0
- package/dist/src/generators/lib/files/session/src/lib/session-timeout.service.ts__template__ +289 -0
- package/dist/src/generators/lib/files/session/src/lib/session-warning/session-warning.component.html__template__ +21 -0
- package/dist/src/generators/lib/files/session/src/lib/session-warning/session-warning.component.scss__template__ +40 -0
- package/dist/src/generators/lib/files/session/src/lib/session-warning/session-warning.component.ts__template__ +105 -0
- package/dist/src/generators/lib/files/state/ngrx/README.md__template__ +33 -0
- package/dist/src/generators/lib/files/state/ngrx/src/index.ts__template__ +6 -0
- package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__-state.module.ts__template__ +18 -0
- package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.actions.ts__template__ +12 -0
- package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.effects.ts__template__ +26 -0
- package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.models.ts__template__ +4 -0
- package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.reducer.ts__template__ +33 -0
- package/dist/src/generators/lib/files/state/ngrx/src/lib/__fileName__.selectors.ts__template__ +14 -0
- package/dist/src/generators/lib/files/state/simple-service/README.md__template__ +20 -0
- package/dist/src/generators/lib/files/state/simple-service/src/index.ts__template__ +2 -0
- package/dist/src/generators/lib/files/state/simple-service/src/lib/__fileName__.store.ts__template__ +58 -0
- package/dist/src/generators/lib/files/state/simple-service/src/lib/store.ts__template__ +34 -0
- package/dist/src/generators/lib/files/styles/README.md__template__ +39 -0
- package/dist/src/generators/lib/files/styles/src/_index.scss__template__ +3 -0
- package/dist/src/generators/lib/files/styles/src/mixins/_index.scss__template__ +13 -0
- package/dist/src/generators/lib/files/styles/src/themes/_index.scss__template__ +20 -0
- package/dist/src/generators/lib/files/styles/src/tokens/_index.scss__template__ +27 -0
- package/dist/src/generators/lib/files/ts/config/.eslintrc.json__template__ +10 -0
- package/dist/src/generators/lib/files/ts/config/tsconfig.json__template__ +14 -0
- package/dist/src/generators/lib/files/ts/config/tsconfig.lib.json__template__ +10 -0
- package/dist/src/generators/lib/files/ts/sample/src/index.ts__template__ +1 -0
- package/dist/src/generators/lib/files/ts/sample/src/lib/__fileName__.ts__template__ +4 -0
- package/dist/src/generators/lib/generator.d.ts +3 -0
- package/dist/src/generators/lib/generator.js +53 -0
- package/dist/src/generators/lib/generator.js.map +1 -0
- package/dist/src/generators/lib/lib-utils.d.ts +72 -0
- package/dist/src/generators/lib/lib-utils.js +170 -0
- package/dist/src/generators/lib/lib-utils.js.map +1 -0
- package/dist/src/generators/lib/schema.d.ts +31 -0
- package/dist/src/generators/lib/schema.json +63 -0
- package/dist/src/generators/lib/style-dictionary.d.ts +36 -0
- package/dist/src/generators/lib/style-dictionary.js +183 -0
- package/dist/src/generators/lib/style-dictionary.js.map +1 -0
- package/dist/src/generators/lib/types/angular.d.ts +2 -0
- package/dist/src/generators/lib/types/angular.js +20 -0
- package/dist/src/generators/lib/types/angular.js.map +1 -0
- package/dist/src/generators/lib/types/assets.d.ts +2 -0
- package/dist/src/generators/lib/types/assets.js +20 -0
- package/dist/src/generators/lib/types/assets.js.map +1 -0
- package/dist/src/generators/lib/types/design-tokens.d.ts +10 -0
- package/dist/src/generators/lib/types/design-tokens.js +78 -0
- package/dist/src/generators/lib/types/design-tokens.js.map +1 -0
- package/dist/src/generators/lib/types/flutter.d.ts +2 -0
- package/dist/src/generators/lib/types/flutter.js +28 -0
- package/dist/src/generators/lib/types/flutter.js.map +1 -0
- package/dist/src/generators/lib/types/index.d.ts +8 -0
- package/dist/src/generators/lib/types/index.js +31 -0
- package/dist/src/generators/lib/types/index.js.map +1 -0
- package/dist/src/generators/lib/types/ionic.d.ts +4 -0
- package/dist/src/generators/lib/types/ionic.js +35 -0
- package/dist/src/generators/lib/types/ionic.js.map +1 -0
- package/dist/src/generators/lib/types/pii.d.ts +3 -0
- package/dist/src/generators/lib/types/pii.js +19 -0
- package/dist/src/generators/lib/types/pii.js.map +1 -0
- package/dist/src/generators/lib/types/session.d.ts +3 -0
- package/dist/src/generators/lib/types/session.js +21 -0
- package/dist/src/generators/lib/types/session.js.map +1 -0
- package/dist/src/generators/lib/types/state.d.ts +5 -0
- package/dist/src/generators/lib/types/state.js +48 -0
- package/dist/src/generators/lib/types/state.js.map +1 -0
- package/dist/src/generators/lib/types/styles.d.ts +2 -0
- package/dist/src/generators/lib/types/styles.js +19 -0
- package/dist/src/generators/lib/types/styles.js.map +1 -0
- package/dist/src/generators/lib/types/ts.d.ts +5 -0
- package/dist/src/generators/lib/types/ts.js +30 -0
- package/dist/src/generators/lib/types/ts.js.map +1 -0
- package/dist/src/generators/llm/generator.d.ts +8 -0
- package/dist/src/generators/llm/generator.js +13 -0
- package/dist/src/generators/llm/generator.js.map +1 -0
- package/dist/src/generators/llm/schema.d.ts +4 -0
- package/dist/src/generators/llm/schema.json +16 -0
- package/dist/src/generators/migrate/adapters/angular-cli.d.ts +82 -0
- package/dist/src/generators/migrate/adapters/angular-cli.js +439 -0
- package/dist/src/generators/migrate/adapters/angular-cli.js.map +1 -0
- package/dist/src/generators/migrate/adapters/angular-workspace.d.ts +28 -0
- package/dist/src/generators/migrate/adapters/angular-workspace.js +397 -0
- package/dist/src/generators/migrate/adapters/angular-workspace.js.map +1 -0
- package/dist/src/generators/migrate/adapters/external.d.ts +23 -0
- package/dist/src/generators/migrate/adapters/external.js +230 -0
- package/dist/src/generators/migrate/adapters/external.js.map +1 -0
- package/dist/src/generators/migrate/adapters/flutter.d.ts +26 -0
- package/dist/src/generators/migrate/adapters/flutter.js +176 -0
- package/dist/src/generators/migrate/adapters/flutter.js.map +1 -0
- package/dist/src/generators/migrate/adapters/index.d.ts +34 -0
- package/dist/src/generators/migrate/adapters/index.js +136 -0
- package/dist/src/generators/migrate/adapters/index.js.map +1 -0
- package/dist/src/generators/migrate/adapters/ionic.d.ts +17 -0
- package/dist/src/generators/migrate/adapters/ionic.js +137 -0
- package/dist/src/generators/migrate/adapters/ionic.js.map +1 -0
- package/dist/src/generators/migrate/adapters/npm-workspaces.d.ts +23 -0
- package/dist/src/generators/migrate/adapters/npm-workspaces.js +734 -0
- package/dist/src/generators/migrate/adapters/npm-workspaces.js.map +1 -0
- package/dist/src/generators/migrate/adapters/nx-workspace.d.ts +47 -0
- package/dist/src/generators/migrate/adapters/nx-workspace.js +1037 -0
- package/dist/src/generators/migrate/adapters/nx-workspace.js.map +1 -0
- package/dist/src/generators/migrate/adapters/scaffold.d.ts +2 -0
- package/dist/src/generators/migrate/adapters/scaffold.js +200 -0
- package/dist/src/generators/migrate/adapters/scaffold.js.map +1 -0
- package/dist/src/generators/migrate/adapters/types.d.ts +184 -0
- package/dist/src/generators/migrate/adapters/types.js +63 -0
- package/dist/src/generators/migrate/adapters/types.js.map +1 -0
- package/dist/src/generators/migrate/angular-code-scan.d.ts +6 -0
- package/dist/src/generators/migrate/angular-code-scan.js +150 -0
- package/dist/src/generators/migrate/angular-code-scan.js.map +1 -0
- package/dist/src/generators/migrate/angular-config-files.d.ts +49 -0
- package/dist/src/generators/migrate/angular-config-files.js +158 -0
- package/dist/src/generators/migrate/angular-config-files.js.map +1 -0
- package/dist/src/generators/migrate/angular-project-json.d.ts +73 -0
- package/dist/src/generators/migrate/angular-project-json.js +352 -0
- package/dist/src/generators/migrate/angular-project-json.js.map +1 -0
- package/dist/src/generators/migrate/angular-workspace/aliases.d.ts +30 -0
- package/dist/src/generators/migrate/angular-workspace/aliases.js +73 -0
- package/dist/src/generators/migrate/angular-workspace/aliases.js.map +1 -0
- package/dist/src/generators/migrate/angular-workspace/eslint.d.ts +8 -0
- package/dist/src/generators/migrate/angular-workspace/eslint.js +38 -0
- package/dist/src/generators/migrate/angular-workspace/eslint.js.map +1 -0
- package/dist/src/generators/migrate/angular-workspace/ng-package.d.ts +4 -0
- package/dist/src/generators/migrate/angular-workspace/ng-package.js +16 -0
- package/dist/src/generators/migrate/angular-workspace/ng-package.js.map +1 -0
- package/dist/src/generators/migrate/angular-workspace/source.d.ts +15 -0
- package/dist/src/generators/migrate/angular-workspace/source.js +108 -0
- package/dist/src/generators/migrate/angular-workspace/source.js.map +1 -0
- package/dist/src/generators/migrate/angular17.d.ts +45 -0
- package/dist/src/generators/migrate/angular17.js +495 -0
- package/dist/src/generators/migrate/angular17.js.map +1 -0
- package/dist/src/generators/migrate/batch.d.ts +29 -0
- package/dist/src/generators/migrate/batch.js +211 -0
- package/dist/src/generators/migrate/batch.js.map +1 -0
- package/dist/src/generators/migrate/copy.d.ts +60 -0
- package/dist/src/generators/migrate/copy.js +224 -0
- package/dist/src/generators/migrate/copy.js.map +1 -0
- package/dist/src/generators/migrate/dependencies.d.ts +38 -0
- package/dist/src/generators/migrate/dependencies.js +196 -0
- package/dist/src/generators/migrate/dependencies.js.map +1 -0
- package/dist/src/generators/migrate/generator.d.ts +9 -0
- package/dist/src/generators/migrate/generator.js +347 -0
- package/dist/src/generators/migrate/generator.js.map +1 -0
- package/dist/src/generators/migrate/imports/rewrite.d.ts +46 -0
- package/dist/src/generators/migrate/imports/rewrite.js +382 -0
- package/dist/src/generators/migrate/imports/rewrite.js.map +1 -0
- package/dist/src/generators/migrate/ionic/capacitor-config.d.ts +24 -0
- package/dist/src/generators/migrate/ionic/capacitor-config.js +113 -0
- package/dist/src/generators/migrate/ionic/capacitor-config.js.map +1 -0
- package/dist/src/generators/migrate/ionic/packages.d.ts +34 -0
- package/dist/src/generators/migrate/ionic/packages.js +92 -0
- package/dist/src/generators/migrate/ionic/packages.js.map +1 -0
- package/dist/src/generators/migrate/ionic/shape.d.ts +32 -0
- package/dist/src/generators/migrate/ionic/shape.js +221 -0
- package/dist/src/generators/migrate/ionic/shape.js.map +1 -0
- package/dist/src/generators/migrate/ionic/skip.d.ts +3 -0
- package/dist/src/generators/migrate/ionic/skip.js +25 -0
- package/dist/src/generators/migrate/ionic/skip.js.map +1 -0
- package/dist/src/generators/migrate/names.d.ts +3 -0
- package/dist/src/generators/migrate/names.js +21 -0
- package/dist/src/generators/migrate/names.js.map +1 -0
- package/dist/src/generators/migrate/npm-deps.d.ts +28 -0
- package/dist/src/generators/migrate/npm-deps.js +63 -0
- package/dist/src/generators/migrate/npm-deps.js.map +1 -0
- package/dist/src/generators/migrate/npm-workspaces/pnpm-yaml.d.ts +10 -0
- package/dist/src/generators/migrate/npm-workspaces/pnpm-yaml.js +246 -0
- package/dist/src/generators/migrate/npm-workspaces/pnpm-yaml.js.map +1 -0
- package/dist/src/generators/migrate/npm-workspaces/source.d.ts +46 -0
- package/dist/src/generators/migrate/npm-workspaces/source.js +253 -0
- package/dist/src/generators/migrate/npm-workspaces/source.js.map +1 -0
- package/dist/src/generators/migrate/nx/build-scripts.d.ts +22 -0
- package/dist/src/generators/migrate/nx/build-scripts.js +147 -0
- package/dist/src/generators/migrate/nx/build-scripts.js.map +1 -0
- package/dist/src/generators/migrate/nx/detect.d.ts +3 -0
- package/dist/src/generators/migrate/nx/detect.js +43 -0
- package/dist/src/generators/migrate/nx/detect.js.map +1 -0
- package/dist/src/generators/migrate/nx/env-encryption.d.ts +35 -0
- package/dist/src/generators/migrate/nx/env-encryption.js +423 -0
- package/dist/src/generators/migrate/nx/env-encryption.js.map +1 -0
- package/dist/src/generators/migrate/nx/rewrite.d.ts +27 -0
- package/dist/src/generators/migrate/nx/rewrite.js +223 -0
- package/dist/src/generators/migrate/nx/rewrite.js.map +1 -0
- package/dist/src/generators/migrate/nx/selection.d.ts +25 -0
- package/dist/src/generators/migrate/nx/selection.js +173 -0
- package/dist/src/generators/migrate/nx/selection.js.map +1 -0
- package/dist/src/generators/migrate/nx/shared-folders.d.ts +58 -0
- package/dist/src/generators/migrate/nx/shared-folders.js +239 -0
- package/dist/src/generators/migrate/nx/shared-folders.js.map +1 -0
- package/dist/src/generators/migrate/nx/workspace-source.d.ts +58 -0
- package/dist/src/generators/migrate/nx/workspace-source.js +275 -0
- package/dist/src/generators/migrate/nx/workspace-source.js.map +1 -0
- package/dist/src/generators/migrate/pnpm.d.ts +42 -0
- package/dist/src/generators/migrate/pnpm.js +132 -0
- package/dist/src/generators/migrate/pnpm.js.map +1 -0
- package/dist/src/generators/migrate/report.d.ts +21 -0
- package/dist/src/generators/migrate/report.js +243 -0
- package/dist/src/generators/migrate/report.js.map +1 -0
- package/dist/src/generators/migrate/rollback/manifest.d.ts +84 -0
- package/dist/src/generators/migrate/rollback/manifest.js +162 -0
- package/dist/src/generators/migrate/rollback/manifest.js.map +1 -0
- package/dist/src/generators/migrate/rollback/recording-tree.d.ts +19 -0
- package/dist/src/generators/migrate/rollback/recording-tree.js +87 -0
- package/dist/src/generators/migrate/rollback/recording-tree.js.map +1 -0
- package/dist/src/generators/migrate/rollback/rollback.d.ts +29 -0
- package/dist/src/generators/migrate/rollback/rollback.js +271 -0
- package/dist/src/generators/migrate/rollback/rollback.js.map +1 -0
- package/dist/src/generators/migrate/schema.d.ts +41 -0
- package/dist/src/generators/migrate/schema.json +85 -0
- package/dist/src/generators/migrate/source.d.ts +26 -0
- package/dist/src/generators/migrate/source.js +70 -0
- package/dist/src/generators/migrate/source.js.map +1 -0
- package/dist/src/generators/preset/files/root/.editorconfig__template__ +15 -0
- package/dist/src/generators/preset/files/root/.eslintignore__template__ +2 -0
- package/dist/src/generators/preset/files/root/.eslintrc.json__template__ +38 -0
- package/dist/src/generators/preset/files/root/.gitattributes__template__ +12 -0
- package/dist/src/generators/preset/files/root/.gitignore__template__ +9 -0
- package/dist/src/generators/preset/files/root/.husky/commit-msg__template__ +1 -0
- package/dist/src/generators/preset/files/root/.husky/pre-commit__template__ +1 -0
- package/dist/src/generators/preset/files/root/.npmrc__template__ +4 -0
- package/dist/src/generators/preset/files/root/.nvmrc__template__ +1 -0
- package/dist/src/generators/preset/files/root/.prettierignore__template__ +6 -0
- package/dist/src/generators/preset/files/root/.prettierrc__template__ +7 -0
- package/dist/src/generators/preset/files/root/commitlint.config.js__template__ +6 -0
- package/dist/src/generators/preset/files/root/nx.json__template__ +30 -0
- package/dist/src/generators/preset/files/root/package.json__template__ +34 -0
- package/dist/src/generators/preset/files/root/tools/config/sri-cdn-allowlist.json__template__ +1 -0
- package/dist/src/generators/preset/files/root/tsconfig.base.json__template__ +18 -0
- package/dist/src/generators/preset/generator.d.ts +11 -0
- package/dist/src/generators/preset/generator.js +91 -0
- package/dist/src/generators/preset/generator.js.map +1 -0
- package/dist/src/generators/preset/schema.d.ts +20 -0
- package/dist/src/generators/preset/schema.json +86 -0
- package/dist/src/generators/shared-libs/generator.d.ts +4 -0
- package/dist/src/generators/shared-libs/generator.js +60 -0
- package/dist/src/generators/shared-libs/generator.js.map +1 -0
- package/dist/src/generators/shared-libs/schema.d.ts +6 -0
- package/dist/src/generators/shared-libs/schema.json +21 -0
- package/dist/src/index.d.ts +16 -0
- package/dist/src/index.js +20 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/csp/allowlist.d.ts +64 -0
- package/dist/src/lib/csp/allowlist.js +126 -0
- package/dist/src/lib/csp/allowlist.js.map +1 -0
- package/dist/src/lib/csp/import.d.ts +52 -0
- package/dist/src/lib/csp/import.js +291 -0
- package/dist/src/lib/csp/import.js.map +1 -0
- package/dist/src/lib/csp/render.d.ts +19 -0
- package/dist/src/lib/csp/render.js +116 -0
- package/dist/src/lib/csp/render.js.map +1 -0
- package/dist/src/lib/env/derive.d.ts +38 -0
- package/dist/src/lib/env/derive.js +115 -0
- package/dist/src/lib/env/derive.js.map +1 -0
- package/dist/src/lib/env-encryption/backup.d.ts +40 -0
- package/dist/src/lib/env-encryption/backup.js +234 -0
- package/dist/src/lib/env-encryption/backup.js.map +1 -0
- package/dist/src/lib/env-encryption/config.d.ts +50 -0
- package/dist/src/lib/env-encryption/config.js +173 -0
- package/dist/src/lib/env-encryption/config.js.map +1 -0
- package/dist/src/lib/env-encryption/domains.d.ts +9 -0
- package/dist/src/lib/env-encryption/domains.js +52 -0
- package/dist/src/lib/env-encryption/domains.js.map +1 -0
- package/dist/src/lib/env-encryption/encrypt.d.ts +48 -0
- package/dist/src/lib/env-encryption/encrypt.js +407 -0
- package/dist/src/lib/env-encryption/encrypt.js.map +1 -0
- package/dist/src/lib/env-encryption/env-file.d.ts +72 -0
- package/dist/src/lib/env-encryption/env-file.js +395 -0
- package/dist/src/lib/env-encryption/env-file.js.map +1 -0
- package/dist/src/lib/env-encryption/gcm.d.ts +51 -0
- package/dist/src/lib/env-encryption/gcm.js +76 -0
- package/dist/src/lib/env-encryption/gcm.js.map +1 -0
- package/dist/src/lib/env-encryption/key-material.d.ts +53 -0
- package/dist/src/lib/env-encryption/key-material.js +148 -0
- package/dist/src/lib/env-encryption/key-material.js.map +1 -0
- package/dist/src/lib/env-encryption/placeholders.d.ts +15 -0
- package/dist/src/lib/env-encryption/placeholders.js +93 -0
- package/dist/src/lib/env-encryption/placeholders.js.map +1 -0
- package/dist/src/lib/env-encryption/prepare.d.ts +43 -0
- package/dist/src/lib/env-encryption/prepare.js +245 -0
- package/dist/src/lib/env-encryption/prepare.js.map +1 -0
- package/dist/src/lib/env-encryption/sensitive.d.ts +2 -0
- package/dist/src/lib/env-encryption/sensitive.js +180 -0
- package/dist/src/lib/env-encryption/sensitive.js.map +1 -0
- package/dist/src/lib/env-encryption/stamp.d.ts +2 -0
- package/dist/src/lib/env-encryption/stamp.js +52 -0
- package/dist/src/lib/env-encryption/stamp.js.map +1 -0
- package/dist/src/lib/env-encryption/switch-gcm.d.ts +43 -0
- package/dist/src/lib/env-encryption/switch-gcm.js +371 -0
- package/dist/src/lib/env-encryption/switch-gcm.js.map +1 -0
- package/dist/src/lib/env-encryption/workspace.d.ts +10 -0
- package/dist/src/lib/env-encryption/workspace.js +48 -0
- package/dist/src/lib/env-encryption/workspace.js.map +1 -0
- package/dist/src/lib/hardening/files.d.ts +17 -0
- package/dist/src/lib/hardening/files.js +43 -0
- package/dist/src/lib/hardening/files.js.map +1 -0
- package/dist/src/lib/hardening/integrity.d.ts +24 -0
- package/dist/src/lib/hardening/integrity.js +112 -0
- package/dist/src/lib/hardening/integrity.js.map +1 -0
- package/dist/src/lib/hardening/leak-check.d.ts +15 -0
- package/dist/src/lib/hardening/leak-check.js +100 -0
- package/dist/src/lib/hardening/leak-check.js.map +1 -0
- package/dist/src/lib/hardening/ngsw.d.ts +7 -0
- package/dist/src/lib/hardening/ngsw.js +55 -0
- package/dist/src/lib/hardening/ngsw.js.map +1 -0
- package/dist/src/lib/hardening/obfuscate.d.ts +36 -0
- package/dist/src/lib/hardening/obfuscate.js +153 -0
- package/dist/src/lib/hardening/obfuscate.js.map +1 -0
- package/dist/src/lib/hardening/options.d.ts +36 -0
- package/dist/src/lib/hardening/options.js +143 -0
- package/dist/src/lib/hardening/options.js.map +1 -0
- package/dist/src/lib/hardening/source-maps.d.ts +7 -0
- package/dist/src/lib/hardening/source-maps.js +37 -0
- package/dist/src/lib/hardening/source-maps.js.map +1 -0
- package/dist/src/lib/hardening/strip.d.ts +55 -0
- package/dist/src/lib/hardening/strip.js +178 -0
- package/dist/src/lib/hardening/strip.js.map +1 -0
- package/dist/src/lib/helpers/encrypt-env.d.ts +13 -0
- package/dist/src/lib/helpers/encrypt-env.js +33 -0
- package/dist/src/lib/helpers/encrypt-env.js.map +1 -0
- package/dist/src/lib/helpers/inject-meta.d.ts +14 -0
- package/dist/src/lib/helpers/inject-meta.js +49 -0
- package/dist/src/lib/helpers/inject-meta.js.map +1 -0
- package/dist/src/lib/helpers/inject-nonce.d.ts +7 -0
- package/dist/src/lib/helpers/inject-nonce.js +59 -0
- package/dist/src/lib/helpers/inject-nonce.js.map +1 -0
- package/dist/src/lib/helpers/inject-sri.d.ts +11 -0
- package/dist/src/lib/helpers/inject-sri.js +92 -0
- package/dist/src/lib/helpers/inject-sri.js.map +1 -0
- package/dist/src/lib/helpers/strip-exif.d.ts +9 -0
- package/dist/src/lib/helpers/strip-exif.js +52 -0
- package/dist/src/lib/helpers/strip-exif.js.map +1 -0
- package/dist/src/lib/release/plan.d.ts +45 -0
- package/dist/src/lib/release/plan.js +76 -0
- package/dist/src/lib/release/plan.js.map +1 -0
- package/dist/src/lib/release/run.d.ts +46 -0
- package/dist/src/lib/release/run.js +160 -0
- package/dist/src/lib/release/run.js.map +1 -0
- package/dist/src/lib/utils/angular-deps.d.ts +22 -0
- package/dist/src/lib/utils/angular-deps.js +108 -0
- package/dist/src/lib/utils/angular-deps.js.map +1 -0
- package/dist/src/lib/utils/angular-project.d.ts +52 -0
- package/dist/src/lib/utils/angular-project.js +168 -0
- package/dist/src/lib/utils/angular-project.js.map +1 -0
- package/dist/src/lib/utils/app-dir.d.ts +17 -0
- package/dist/src/lib/utils/app-dir.js +52 -0
- package/dist/src/lib/utils/app-dir.js.map +1 -0
- package/dist/src/lib/utils/base-href.d.ts +26 -0
- package/dist/src/lib/utils/base-href.js +60 -0
- package/dist/src/lib/utils/base-href.js.map +1 -0
- package/dist/src/lib/utils/ci-resolve.d.ts +10 -0
- package/dist/src/lib/utils/ci-resolve.js +50 -0
- package/dist/src/lib/utils/ci-resolve.js.map +1 -0
- package/dist/src/lib/utils/csp-nonce.d.ts +34 -0
- package/dist/src/lib/utils/csp-nonce.js +142 -0
- package/dist/src/lib/utils/csp-nonce.js.map +1 -0
- package/dist/src/lib/utils/dependencies.d.ts +25 -0
- package/dist/src/lib/utils/dependencies.js +71 -0
- package/dist/src/lib/utils/dependencies.js.map +1 -0
- package/dist/src/lib/utils/devkit-deps.d.ts +19 -0
- package/dist/src/lib/utils/devkit-deps.js +34 -0
- package/dist/src/lib/utils/devkit-deps.js.map +1 -0
- package/dist/src/lib/utils/env-files.d.ts +18 -0
- package/dist/src/lib/utils/env-files.js +41 -0
- package/dist/src/lib/utils/env-files.js.map +1 -0
- package/dist/src/lib/utils/filesystem.d.ts +7 -0
- package/dist/src/lib/utils/filesystem.js +20 -0
- package/dist/src/lib/utils/filesystem.js.map +1 -0
- package/dist/src/lib/utils/flutter-web.d.ts +7 -0
- package/dist/src/lib/utils/flutter-web.js +56 -0
- package/dist/src/lib/utils/flutter-web.js.map +1 -0
- package/dist/src/lib/utils/knip.d.ts +16 -0
- package/dist/src/lib/utils/knip.js +71 -0
- package/dist/src/lib/utils/knip.js.map +1 -0
- package/dist/src/lib/utils/lint-staged.d.ts +5 -0
- package/dist/src/lib/utils/lint-staged.js +34 -0
- package/dist/src/lib/utils/lint-staged.js.map +1 -0
- package/dist/src/lib/utils/llm-block.d.ts +88 -0
- package/dist/src/lib/utils/llm-block.js +457 -0
- package/dist/src/lib/utils/llm-block.js.map +1 -0
- package/dist/src/lib/utils/node-engine.d.ts +9 -0
- package/dist/src/lib/utils/node-engine.js +63 -0
- package/dist/src/lib/utils/node-engine.js.map +1 -0
- package/dist/src/lib/utils/npm-scripts.d.ts +7 -0
- package/dist/src/lib/utils/npm-scripts.js +28 -0
- package/dist/src/lib/utils/npm-scripts.js.map +1 -0
- package/dist/src/lib/utils/nx-targets.d.ts +3 -0
- package/dist/src/lib/utils/nx-targets.js +25 -0
- package/dist/src/lib/utils/nx-targets.js.map +1 -0
- package/dist/src/lib/utils/project-json-files.d.ts +23 -0
- package/dist/src/lib/utils/project-json-files.js +73 -0
- package/dist/src/lib/utils/project-json-files.js.map +1 -0
- package/dist/src/lib/utils/quality.d.ts +71 -0
- package/dist/src/lib/utils/quality.js +295 -0
- package/dist/src/lib/utils/quality.js.map +1 -0
- package/dist/src/lib/utils/serve-port.d.ts +28 -0
- package/dist/src/lib/utils/serve-port.js +73 -0
- package/dist/src/lib/utils/serve-port.js.map +1 -0
- package/dist/src/lib/utils/shared-libs.d.ts +37 -0
- package/dist/src/lib/utils/shared-libs.js +152 -0
- package/dist/src/lib/utils/shared-libs.js.map +1 -0
- package/dist/src/lib/utils/ts-paths.d.ts +3 -0
- package/dist/src/lib/utils/ts-paths.js +31 -0
- package/dist/src/lib/utils/ts-paths.js.map +1 -0
- package/dist/src/lib/utils/workspace.d.ts +3 -0
- package/dist/src/lib/utils/workspace.js +15 -0
- package/dist/src/lib/utils/workspace.js.map +1 -0
- package/dist/src/migrate-sdk.d.ts +31 -0
- package/dist/src/migrate-sdk.js +35 -0
- package/dist/src/migrate-sdk.js.map +1 -0
- package/dist/src/migrations/add-csp-nonce-import/add-csp-nonce-import.d.ts +2 -0
- package/dist/src/migrations/add-csp-nonce-import/add-csp-nonce-import.js +40 -0
- package/dist/src/migrations/add-csp-nonce-import/add-csp-nonce-import.js.map +1 -0
- package/dist/src/migrations/add-executor-peers/add-executor-peers.d.ts +6 -0
- package/dist/src/migrations/add-executor-peers/add-executor-peers.js +21 -0
- package/dist/src/migrations/add-executor-peers/add-executor-peers.js.map +1 -0
- package/dist/src/migrations/add-lib-build-dependencies/add-lib-build-dependencies.d.ts +7 -0
- package/dist/src/migrations/add-lib-build-dependencies/add-lib-build-dependencies.js +47 -0
- package/dist/src/migrations/add-lib-build-dependencies/add-lib-build-dependencies.js.map +1 -0
- package/dist/src/migrations/add-lint-dependencies/add-lint-dependencies.d.ts +6 -0
- package/dist/src/migrations/add-lint-dependencies/add-lint-dependencies.js +27 -0
- package/dist/src/migrations/add-lint-dependencies/add-lint-dependencies.js.map +1 -0
- package/dist/src/migrations/add-lint-staged-config/add-lint-staged-config.d.ts +7 -0
- package/dist/src/migrations/add-lint-staged-config/add-lint-staged-config.js +22 -0
- package/dist/src/migrations/add-lint-staged-config/add-lint-staged-config.js.map +1 -0
- package/dist/src/migrations/angular-release-target/angular-release-target.d.ts +3 -0
- package/dist/src/migrations/angular-release-target/angular-release-target.js +80 -0
- package/dist/src/migrations/angular-release-target/angular-release-target.js.map +1 -0
- package/dist/src/migrations/app-clean-and-port/app-clean-and-port.d.ts +7 -0
- package/dist/src/migrations/app-clean-and-port/app-clean-and-port.js +89 -0
- package/dist/src/migrations/app-clean-and-port/app-clean-and-port.js.map +1 -0
- package/dist/src/migrations/env-encryption-config/env-encryption-config.d.ts +7 -0
- package/dist/src/migrations/env-encryption-config/env-encryption-config.js +42 -0
- package/dist/src/migrations/env-encryption-config/env-encryption-config.js.map +1 -0
- package/dist/src/migrations/env-encryption-key-sources/env-encryption-key-sources.d.ts +3 -0
- package/dist/src/migrations/env-encryption-key-sources/env-encryption-key-sources.js +15 -0
- package/dist/src/migrations/env-encryption-key-sources/env-encryption-key-sources.js.map +1 -0
- package/dist/src/migrations/fix-lint-script/fix-lint-script.d.ts +7 -0
- package/dist/src/migrations/fix-lint-script/fix-lint-script.js +27 -0
- package/dist/src/migrations/fix-lint-script/fix-lint-script.js.map +1 -0
- package/dist/src/migrations/flutter-web-platform/flutter-web-platform.d.ts +8 -0
- package/dist/src/migrations/flutter-web-platform/flutter-web-platform.js +35 -0
- package/dist/src/migrations/flutter-web-platform/flutter-web-platform.js.map +1 -0
- package/dist/src/migrations/plugin-repo-dev/plugin-repo-dev.d.ts +9 -0
- package/dist/src/migrations/plugin-repo-dev/plugin-repo-dev.js +42 -0
- package/dist/src/migrations/plugin-repo-dev/plugin-repo-dev.js.map +1 -0
- package/dist/src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.d.ts +8 -0
- package/dist/src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.js +30 -0
- package/dist/src/migrations/prepush-audit-warn-only/prepush-audit-warn-only.js.map +1 -0
- package/dist/src/migrations/quality-checks/quality-checks.d.ts +7 -0
- package/dist/src/migrations/quality-checks/quality-checks.js +46 -0
- package/dist/src/migrations/quality-checks/quality-checks.js.map +1 -0
- package/dist/src/migrations/release-hardening/release-hardening.d.ts +8 -0
- package/dist/src/migrations/release-hardening/release-hardening.js +98 -0
- package/dist/src/migrations/release-hardening/release-hardening.js.map +1 -0
- package/dist/src/migrations/sharp-security-update/sharp-security-update.d.ts +10 -0
- package/dist/src/migrations/sharp-security-update/sharp-security-update.js +40 -0
- package/dist/src/migrations/sharp-security-update/sharp-security-update.js.map +1 -0
- package/migrate/package.json +5 -0
- package/package.json +120 -4
- package/runtime/csp-nonce.js +109 -0
- package/runtime/env-secret.d.ts +63 -0
- package/runtime/env-secret.mjs +698 -0
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.npmWorkspacesAdapter = exports.planNpmWorkspaces = exports.detectNpmWorkspaces = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
7
|
+
const dependencies_1 = require("../../../lib/utils/dependencies");
|
|
8
|
+
const nx_targets_1 = require("../../../lib/utils/nx-targets");
|
|
9
|
+
const angular_config_files_1 = require("../angular-config-files");
|
|
10
|
+
const copy_1 = require("../copy");
|
|
11
|
+
const dependencies_2 = require("../dependencies");
|
|
12
|
+
const names_1 = require("../names");
|
|
13
|
+
const npm_deps_1 = require("../npm-deps");
|
|
14
|
+
const source_1 = require("../npm-workspaces/source");
|
|
15
|
+
const selection_1 = require("../nx/selection");
|
|
16
|
+
const workspace_source_1 = require("../nx/workspace-source");
|
|
17
|
+
const pnpm_1 = require("../pnpm");
|
|
18
|
+
const source_2 = require("../source");
|
|
19
|
+
const angular_cli_1 = require("./angular-cli");
|
|
20
|
+
const ionic_1 = require("./ionic");
|
|
21
|
+
const nx_workspace_1 = require("./nx-workspace");
|
|
22
|
+
const types_1 = require("./types");
|
|
23
|
+
const code = (s) => `\`${s}\``;
|
|
24
|
+
const writeJson = (tree, file, value) => tree.write(file, JSON.stringify(value, null, 2) + '\n');
|
|
25
|
+
const abs = (sourceDir, root) => path.join(sourceDir, ...root.split('/'));
|
|
26
|
+
function detectNpmWorkspaces(sourceDir) {
|
|
27
|
+
const pnpmFile = (0, source_2.sourceExists)(sourceDir, 'pnpm-workspace.yaml');
|
|
28
|
+
const listed = pnpmFile ||
|
|
29
|
+
(0, source_1.workspaceGlobs)((0, source_2.readSourceJson)(sourceDir, 'package.json')) !== undefined;
|
|
30
|
+
if (!listed)
|
|
31
|
+
return { confidence: 0, reasons: ['no "workspaces" in package.json'] };
|
|
32
|
+
if ((0, source_2.sourceExists)(sourceDir, 'nx.json')) {
|
|
33
|
+
return { confidence: 0, reasons: ['nx.json: the nx-workspace adapter handles it'] };
|
|
34
|
+
}
|
|
35
|
+
if ((0, source_2.sourceExists)(sourceDir, 'angular.json')) {
|
|
36
|
+
return { confidence: 0, reasons: ['angular.json at the root: an Angular adapter handles it'] };
|
|
37
|
+
}
|
|
38
|
+
if (pnpmFile) {
|
|
39
|
+
try {
|
|
40
|
+
(0, source_1.readPnpmWorkspace)(sourceDir);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
const why = err.message.replace(/^migrate: /, '').replace(/\. Simplify.*$/, '');
|
|
44
|
+
return { confidence: 0.3, reasons: [why] };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const globs = (0, source_1.sourceWorkspaceGlobs)(sourceDir);
|
|
48
|
+
if (!globs) {
|
|
49
|
+
return { confidence: 0.3, reasons: ['pnpm-workspace.yaml lists no `packages`'] };
|
|
50
|
+
}
|
|
51
|
+
const manager = (0, source_1.packageManager)(sourceDir);
|
|
52
|
+
const packages = (0, source_1.discoverPackages)(sourceDir);
|
|
53
|
+
if (packages.length === 0) {
|
|
54
|
+
return {
|
|
55
|
+
confidence: 0.3,
|
|
56
|
+
reasons: [`${manager} workspaces, but no package folder matches ${globs.join(', ')}`],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const counts = new Map();
|
|
60
|
+
for (const p of packages)
|
|
61
|
+
counts.set(p.kind, (counts.get(p.kind) ?? 0) + 1);
|
|
62
|
+
const summary = [...counts].sort(([a], [b]) => (a < b ? -1 : 1)).map(([k, n]) => `${n} ${k}`);
|
|
63
|
+
const reasons = [
|
|
64
|
+
`${manager} workspaces with ${packages.length} package${packages.length > 1 ? 's' : ''}: ` +
|
|
65
|
+
summary.join(', '),
|
|
66
|
+
];
|
|
67
|
+
return packages.some((p) => (0, workspace_source_1.isSupportedKind)(p.kind))
|
|
68
|
+
? { confidence: 0.95, reasons }
|
|
69
|
+
: { confidence: 0.3, reasons: [...reasons, 'no package nx-polystack can migrate yet'] };
|
|
70
|
+
}
|
|
71
|
+
exports.detectNpmWorkspaces = detectNpmWorkspaces;
|
|
72
|
+
/** Selection, names, aliases and every check; throws (writing nothing) when something is in the way. */
|
|
73
|
+
function planNpmWorkspaces(tree, ctx) {
|
|
74
|
+
const { sourceDir } = ctx;
|
|
75
|
+
// Throws (naming the file) when pnpm-workspace.yaml cannot be read.
|
|
76
|
+
(0, source_1.readPnpmWorkspace)(sourceDir);
|
|
77
|
+
const all = (0, source_1.discoverPackages)(sourceDir);
|
|
78
|
+
const byPackageName = new Map(all.map((p) => [p.packageName, p.name]));
|
|
79
|
+
// Imports of a package name (or a path under it) belong to that package.
|
|
80
|
+
const sourceAliases = {};
|
|
81
|
+
for (const p of all) {
|
|
82
|
+
sourceAliases[p.packageName] = [p.entry ? `${p.root}/${p.entry}` : p.root];
|
|
83
|
+
sourceAliases[`${p.packageName}/*`] = [`${p.root}/*`];
|
|
84
|
+
}
|
|
85
|
+
const chosen = (0, selection_1.selectProjects)({
|
|
86
|
+
sourceDir,
|
|
87
|
+
projects: all,
|
|
88
|
+
requested: ctx.projects?.map((r) => byPackageName.get(r) ?? r),
|
|
89
|
+
noDeps: ctx.noDeps,
|
|
90
|
+
aliases: sourceAliases,
|
|
91
|
+
});
|
|
92
|
+
const byName = new Map(all.map((p) => [p.name, p]));
|
|
93
|
+
const projects = [...chosen]
|
|
94
|
+
.map(([n, neededBy]) => {
|
|
95
|
+
const source = byName.get(n);
|
|
96
|
+
const name = (0, names_1.kebabName)(ctx.prefix ? `${ctx.prefix}-${n}` : n);
|
|
97
|
+
const folder = source.kind === 'lib' ? 'libs' : 'apps';
|
|
98
|
+
return { source, name, newRoot: `${folder}/${name}`, neededBy };
|
|
99
|
+
})
|
|
100
|
+
.sort((a, b) => (a.name < b.name ? -1 : 1));
|
|
101
|
+
const aliases = {};
|
|
102
|
+
for (const p of projects) {
|
|
103
|
+
if (p.source.kind === 'lib' && p.source.entry) {
|
|
104
|
+
aliases[p.source.packageName] = [`${p.newRoot}/${p.source.entry}`];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const errors = [];
|
|
108
|
+
const existing = new Set((0, nx_workspace_1.treeProjectNames)(tree));
|
|
109
|
+
const names = new Set();
|
|
110
|
+
for (const p of projects) {
|
|
111
|
+
if (names.has(p.name)) {
|
|
112
|
+
errors.push(`two source packages become "${p.name}"; rename one with --prefix.`);
|
|
113
|
+
}
|
|
114
|
+
names.add(p.name);
|
|
115
|
+
if (tree.exists(p.newRoot)) {
|
|
116
|
+
errors.push(`${code(p.newRoot)} already exists in the workspace (source package ${p.source.packageName}).`);
|
|
117
|
+
}
|
|
118
|
+
if (existing.has(p.name)) {
|
|
119
|
+
errors.push(`a project named "${p.name}" already exists in the workspace.` +
|
|
120
|
+
(ctx.prefix ? '' : ' Rename the migrated projects with --prefix=<p>.'));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const wsPaths = (0, nx_workspace_1.workspacePaths)(tree);
|
|
124
|
+
for (const [alias, targets] of Object.entries(aliases)) {
|
|
125
|
+
const current = wsPaths[alias];
|
|
126
|
+
if (current && JSON.stringify(current) !== JSON.stringify(targets)) {
|
|
127
|
+
errors.push(`the path alias "${alias}" maps to ${current.join(', ')} in the workspace but to ` +
|
|
128
|
+
`${targets.join(', ')} after the import; imports would resolve to the wrong code.`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const root = (0, source_1.sourceRootPackage)(sourceDir);
|
|
132
|
+
const catalogMisses = [
|
|
133
|
+
['the source root package.json', root.unresolved],
|
|
134
|
+
...projects.map((p) => [p.source.packageName, p.source.unresolvedCatalogs]),
|
|
135
|
+
];
|
|
136
|
+
for (const [owner, misses] of catalogMisses) {
|
|
137
|
+
if (misses.length > 0)
|
|
138
|
+
errors.push((0, pnpm_1.catalogMissMessage)(owner, misses));
|
|
139
|
+
}
|
|
140
|
+
if (!ctx.forceAngular) {
|
|
141
|
+
const pkgs = [
|
|
142
|
+
['the source root', root.pkg],
|
|
143
|
+
...projects
|
|
144
|
+
.filter((p) => p.source.kind !== 'lib')
|
|
145
|
+
.map((p) => [p.source.packageName, p.source.pkg]),
|
|
146
|
+
];
|
|
147
|
+
for (const [, pkg] of pkgs) {
|
|
148
|
+
const mismatch = (0, dependencies_2.angularMismatch)(tree, pkg);
|
|
149
|
+
if (mismatch) {
|
|
150
|
+
errors.push((0, dependencies_2.angularMismatchMessage)(mismatch));
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (errors.length > 0) {
|
|
156
|
+
throw new Error([
|
|
157
|
+
`migrate: cannot import from ${sourceDir}. Nothing was written.`,
|
|
158
|
+
...errors.map((e) => `- ${e}`),
|
|
159
|
+
].join('\n'));
|
|
160
|
+
}
|
|
161
|
+
return { all, projects, aliases };
|
|
162
|
+
}
|
|
163
|
+
exports.planNpmWorkspaces = planNpmWorkspaces;
|
|
164
|
+
/** Not copied from a library package (its package.json is merged into the root one). */
|
|
165
|
+
const LIB_SKIP = {
|
|
166
|
+
anyDepth: ['node_modules', '.git'],
|
|
167
|
+
topLevel: [
|
|
168
|
+
'dist',
|
|
169
|
+
'coverage',
|
|
170
|
+
'out-tsc',
|
|
171
|
+
'tmp',
|
|
172
|
+
'.turbo',
|
|
173
|
+
'package.json',
|
|
174
|
+
'tsconfig.json',
|
|
175
|
+
'package-lock.json',
|
|
176
|
+
'yarn.lock',
|
|
177
|
+
'pnpm-lock.yaml',
|
|
178
|
+
],
|
|
179
|
+
};
|
|
180
|
+
const TOO_MANY = 'migrate: the source has more than';
|
|
181
|
+
/** Other package folders inside this one (relative to it): they are imported on their own. */
|
|
182
|
+
function nestedPackages(plan, p) {
|
|
183
|
+
const root = p.source.root;
|
|
184
|
+
return plan.all
|
|
185
|
+
.map((o) => o.root)
|
|
186
|
+
.filter((r) => r !== root && r.startsWith(`${root}/`))
|
|
187
|
+
.map((r) => r.slice(root.length + 1));
|
|
188
|
+
}
|
|
189
|
+
/** Runs a copy; a --max-files overflow names the whole import's limit. */
|
|
190
|
+
function withFileLimit(ctx, copy) {
|
|
191
|
+
const maxFiles = ctx.maxFiles ?? copy_1.DEFAULT_MAX_FILES;
|
|
192
|
+
try {
|
|
193
|
+
return copy();
|
|
194
|
+
}
|
|
195
|
+
catch (err) {
|
|
196
|
+
if (err instanceof Error && err.message.startsWith(TOO_MANY)) {
|
|
197
|
+
throw new Error(`migrate: the selected packages have more than ${maxFiles} files to copy after the skip ` +
|
|
198
|
+
'lists. Narrow --projects, clean up the source, or raise --max-files.');
|
|
199
|
+
}
|
|
200
|
+
throw err;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function copyPackage(tree, ctx, plan, p, alreadyCopied) {
|
|
204
|
+
const maxFiles = ctx.maxFiles ?? copy_1.DEFAULT_MAX_FILES;
|
|
205
|
+
return withFileLimit(ctx, () => (0, copy_1.copyIntoTree)(tree, abs(ctx.sourceDir, p.source.root), p.newRoot, { ...LIB_SKIP, paths: nestedPackages(plan, p) }, { maxFiles: maxFiles - alreadyCopied, ignoreFrom: ctx.sourceDir }));
|
|
206
|
+
}
|
|
207
|
+
/** A TypeScript library package → libs/<name>: tsconfig, ESLint config and project.json. */
|
|
208
|
+
function migrateLib(tree, ctx, plan, p, data) {
|
|
209
|
+
const pkgDir = abs(ctx.sourceDir, p.source.root);
|
|
210
|
+
const copy = copyPackage(tree, ctx, plan, p, data.copied);
|
|
211
|
+
(0, types_1.recordCopy)(data, copy, p.source.root);
|
|
212
|
+
const up = (0, names_1.upTo)(p.newRoot);
|
|
213
|
+
const mapper = {
|
|
214
|
+
sourceRoot: '',
|
|
215
|
+
projectRoot: p.newRoot,
|
|
216
|
+
name: p.name,
|
|
217
|
+
exists: (rel) => (0, source_2.sourceExists)(pkgDir, rel),
|
|
218
|
+
warnings: [],
|
|
219
|
+
};
|
|
220
|
+
const pctx = {
|
|
221
|
+
sourceDir: pkgDir,
|
|
222
|
+
name: p.name,
|
|
223
|
+
projectRoot: p.newRoot,
|
|
224
|
+
forceAngular: ctx.forceAngular,
|
|
225
|
+
rewriteImports: ctx.rewriteImports,
|
|
226
|
+
};
|
|
227
|
+
(0, angular_cli_1.migrateProjectTsconfigs)(tree, pctx, '', copy.copied, mapper, data);
|
|
228
|
+
if ((0, source_2.sourceExists)(pkgDir, 'tsconfig.json')) {
|
|
229
|
+
// Apps compile the library source through its alias; project references and composite
|
|
230
|
+
// builds pointed at the old package layout.
|
|
231
|
+
(0, devkit_1.updateJson)(tree, `${p.newRoot}/tsconfig.json`, (json) => {
|
|
232
|
+
const dropped = [];
|
|
233
|
+
if (json.references !== undefined) {
|
|
234
|
+
delete json.references;
|
|
235
|
+
dropped.push('`references`');
|
|
236
|
+
}
|
|
237
|
+
for (const o of ['composite', 'tsBuildInfoFile']) {
|
|
238
|
+
if (json.compilerOptions?.[o] !== undefined) {
|
|
239
|
+
delete json.compilerOptions[o];
|
|
240
|
+
dropped.push(`\`${o}\``);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (dropped.length > 0) {
|
|
244
|
+
data.notes.push(`${code(p.name)}: ${dropped.join(', ')} removed from tsconfig.json (apps build the ` +
|
|
245
|
+
'library source through its path alias).');
|
|
246
|
+
}
|
|
247
|
+
return json;
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
// No tsconfig of its own: the `pstack lib --type=ts` pair.
|
|
252
|
+
writeJson(tree, `${p.newRoot}/tsconfig.json`, {
|
|
253
|
+
extends: `${up}tsconfig.base.json`,
|
|
254
|
+
compilerOptions: { forceConsistentCasingInFileNames: true, strict: true },
|
|
255
|
+
files: [],
|
|
256
|
+
include: [],
|
|
257
|
+
references: [{ path: './tsconfig.lib.json' }],
|
|
258
|
+
});
|
|
259
|
+
if (!tree.exists(`${p.newRoot}/tsconfig.lib.json`)) {
|
|
260
|
+
writeJson(tree, `${p.newRoot}/tsconfig.lib.json`, {
|
|
261
|
+
extends: './tsconfig.json',
|
|
262
|
+
compilerOptions: { outDir: `${up}dist/out-tsc`, declaration: true, types: [] },
|
|
263
|
+
include: ['**/*.ts'],
|
|
264
|
+
exclude: ['**/*.spec.ts', '**/*.test.ts'],
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const ownEslint = copy.copied.filter((f) => /^(\.eslintrc(\.[a-z]+)?|eslint\.config\.[a-z]+)$/.test(f));
|
|
269
|
+
if (ownEslint.length === 0) {
|
|
270
|
+
writeJson(tree, `${p.newRoot}/.eslintrc.json`, {
|
|
271
|
+
extends: [`${up}.eslintrc.json`],
|
|
272
|
+
ignorePatterns: ['!**/*'],
|
|
273
|
+
overrides: [{ files: ['*.ts'], rules: {} }],
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
else if (ownEslint.length === 1 && ownEslint[0] === '.eslintrc.json') {
|
|
277
|
+
const file = `${p.newRoot}/.eslintrc.json`;
|
|
278
|
+
const config = (0, angular_config_files_1.extendRootEslintConfig)((0, source_2.parseJsonStrict)(tree.read(file, 'utf8') ?? '', file), mapper);
|
|
279
|
+
const outside = config['extends'].filter((e, i) => i > 0 && e.startsWith('../'));
|
|
280
|
+
config['extends'] = config['extends'].filter((e) => !outside.includes(e));
|
|
281
|
+
writeJson(tree, file, config);
|
|
282
|
+
if (outside.length > 0) {
|
|
283
|
+
data.notes.push(`${code(p.name)}: ESLint extends ${outside.map(code).join(', ')} pointed outside the ` +
|
|
284
|
+
'package and were removed; the workspace root config is extended instead.');
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
data.notes.push(`${code(p.name)} kept its own ESLint config (${ownEslint.map(code).join(', ')}); make it ` +
|
|
289
|
+
`extend ${code(`${up}.eslintrc.json`)} so \`nx lint\` uses the workspace rules.`);
|
|
290
|
+
}
|
|
291
|
+
const sourceRoot = (0, source_2.sourceExists)(pkgDir, 'src') ? `${p.newRoot}/src` : p.newRoot;
|
|
292
|
+
writeJson(tree, `${p.newRoot}/project.json`, {
|
|
293
|
+
name: p.name,
|
|
294
|
+
$schema: `${up}node_modules/nx/schemas/project-schema.json`,
|
|
295
|
+
sourceRoot,
|
|
296
|
+
projectType: 'library',
|
|
297
|
+
tags: [],
|
|
298
|
+
targets: {
|
|
299
|
+
lint: {
|
|
300
|
+
executor: '@nx/eslint:lint',
|
|
301
|
+
outputs: ['{options.outputFile}'],
|
|
302
|
+
options: { lintFilePatterns: [`${p.newRoot}/**/*.ts`] },
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
(0, nx_targets_1.setProjectTags)(tree, p.newRoot, ['scope:shared', 'type:lib']);
|
|
307
|
+
return (0, dependencies_1.ensureLintDependencies)(tree);
|
|
308
|
+
}
|
|
309
|
+
/** Adds one package's report data (paths relative to its folder) to the import's. */
|
|
310
|
+
function absorb(into, from, p) {
|
|
311
|
+
const at = (s) => `${p.source.root}/${s}`;
|
|
312
|
+
into.copied += from.copied;
|
|
313
|
+
into.skipped.push(...from.skipped.map(at));
|
|
314
|
+
into.secrets.push(...from.secrets.map(at));
|
|
315
|
+
into.gitListed = into.gitListed || from.gitListed;
|
|
316
|
+
into.gitignoreUsed = into.gitignoreUsed || from.gitignoreUsed;
|
|
317
|
+
into.dependencyClashes.push(...from.dependencyClashes.filter((c) => !into.dependencyClashes.some((d) => d.name === c.name)));
|
|
318
|
+
into.tsPathsAdded.push(...from.tsPathsAdded.filter((a) => !into.tsPathsAdded.includes(a)));
|
|
319
|
+
into.tsPathClashes.push(...from.tsPathClashes);
|
|
320
|
+
into.packageFields.push(...from.packageFields);
|
|
321
|
+
into.angularNotes.push(...from.angularNotes.filter((n) => !into.angularNotes.includes(n)));
|
|
322
|
+
into.notes.push(...from.notes.map((n) => `${code(p.name)}: ${n}`));
|
|
323
|
+
into.nextSteps.push(...from.nextSteps.filter((s) => !into.nextSteps.includes(s)));
|
|
324
|
+
if (from.ionic)
|
|
325
|
+
into.ionic = [...(into.ionic ?? []), ...from.ionic];
|
|
326
|
+
if (from.moves)
|
|
327
|
+
into.moves = [...(into.moves ?? []), ...from.moves];
|
|
328
|
+
}
|
|
329
|
+
/** Root merge specs: a local path inside an imported package follows it to its new folder. */
|
|
330
|
+
function classifyMovedSpec(spec, sourceDir, plan) {
|
|
331
|
+
const kind = (0, npm_deps_1.classifyDependencySpec)(spec, { sourceDir, copiedDir: sourceDir, projectRoot: '' });
|
|
332
|
+
if (kind.kind !== 'rebased')
|
|
333
|
+
return kind;
|
|
334
|
+
const rel = kind.spec.slice('file:'.length);
|
|
335
|
+
const p = plan.projects.find((x) => rel === x.source.root || rel.startsWith(`${x.source.root}/`));
|
|
336
|
+
return p
|
|
337
|
+
? { kind: 'rebased', spec: `file:${p.newRoot}${rel.slice(p.source.root.length)}` }
|
|
338
|
+
: { kind: 'outside', target: path.join(sourceDir, rel) };
|
|
339
|
+
}
|
|
340
|
+
/** Root and library dependencies as one package.json for the root merge (root wins). */
|
|
341
|
+
function combinedDependencies(sourceDir, libs, internal, data) {
|
|
342
|
+
const root = (0, source_1.sourceRootPackage)(sourceDir).pkg ?? {};
|
|
343
|
+
const out = {
|
|
344
|
+
dependencies: { ...(root.dependencies ?? {}) },
|
|
345
|
+
devDependencies: { ...(root.devDependencies ?? {}) },
|
|
346
|
+
optionalDependencies: { ...(root.optionalDependencies ?? {}) },
|
|
347
|
+
overrides: root.overrides,
|
|
348
|
+
resolutions: root.resolutions,
|
|
349
|
+
};
|
|
350
|
+
const declared = (n) => out.dependencies?.[n] ?? out.devDependencies?.[n] ?? out.optionalDependencies?.[n];
|
|
351
|
+
const differing = [];
|
|
352
|
+
for (const p of libs) {
|
|
353
|
+
for (const field of ['dependencies', 'devDependencies', 'optionalDependencies']) {
|
|
354
|
+
for (const [n, raw] of Object.entries(p.source.pkg[field] ?? {})) {
|
|
355
|
+
if (internal.has(n) || typeof raw !== 'string')
|
|
356
|
+
continue;
|
|
357
|
+
// Local paths are relative to the library's package.json; the merge reads them from the
|
|
358
|
+
// source root.
|
|
359
|
+
const local = (0, npm_deps_1.localPath)(raw);
|
|
360
|
+
const spec = local !== undefined && !local.startsWith('/') && !local.startsWith('~/')
|
|
361
|
+
? `file:${path.posix.normalize(path.posix.join(p.source.root, local))}`
|
|
362
|
+
: raw;
|
|
363
|
+
const current = declared(n);
|
|
364
|
+
if (current === undefined)
|
|
365
|
+
out[field][n] = spec;
|
|
366
|
+
else if (current !== spec)
|
|
367
|
+
differing.push(`${code(n)} (${p.source.packageName}: ${code(spec)})`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (differing.length > 0) {
|
|
372
|
+
data.notes.push('Library packages declare other versions than the one carried over (the source root or ' +
|
|
373
|
+
`the first package wins): ${differing.join(', ')}.`);
|
|
374
|
+
}
|
|
375
|
+
return out;
|
|
376
|
+
}
|
|
377
|
+
function migrateNpmWorkspaces(tree, ctx) {
|
|
378
|
+
const plan = planNpmWorkspaces(tree, ctx);
|
|
379
|
+
const { sourceDir } = ctx;
|
|
380
|
+
const data = {
|
|
381
|
+
...(0, types_1.emptyReportData)(),
|
|
382
|
+
projects: [],
|
|
383
|
+
unsupported: [],
|
|
384
|
+
layout: 'apps-libs',
|
|
385
|
+
};
|
|
386
|
+
if (!tree.exists('package.json'))
|
|
387
|
+
writeJson(tree, 'package.json', {});
|
|
388
|
+
const namesBefore = (0, dependencies_2.packageNames)(tree);
|
|
389
|
+
const internal = new Set(plan.all.map((p) => p.packageName));
|
|
390
|
+
const skipInternal = {
|
|
391
|
+
test: (n) => internal.has(n),
|
|
392
|
+
reason: 'packages of the source workspace; imported libraries are path aliases in tsconfig.base.json',
|
|
393
|
+
};
|
|
394
|
+
const libs = plan.projects.filter((p) => p.source.kind === 'lib');
|
|
395
|
+
const tasks = [];
|
|
396
|
+
// Root and library dependencies first: the app merges then see what the workspace has.
|
|
397
|
+
const rootData = (0, types_1.emptyReportData)();
|
|
398
|
+
const rootTask = (0, dependencies_2.mergeDependencies)(tree, {
|
|
399
|
+
sourceDir,
|
|
400
|
+
sourcePkg: combinedDependencies(sourceDir, libs, internal, data),
|
|
401
|
+
classify: (spec) => classifyMovedSpec(spec, sourceDir, plan),
|
|
402
|
+
copiedLabel: 'imported packages',
|
|
403
|
+
// The app packages hold the Angular versions; their own merges fill in the build packages.
|
|
404
|
+
angular: false,
|
|
405
|
+
skip: skipInternal,
|
|
406
|
+
}, rootData);
|
|
407
|
+
if (rootTask)
|
|
408
|
+
tasks.push(rootTask);
|
|
409
|
+
data.dependencyClashes.push(...rootData.dependencyClashes);
|
|
410
|
+
data.packageFields.push(...rootData.packageFields);
|
|
411
|
+
data.angularNotes.push(...rootData.angularNotes);
|
|
412
|
+
data.notes.push(...rootData.notes);
|
|
413
|
+
// tsconfig.base.json: each library's package name → its entry, before the apps merge their
|
|
414
|
+
// own tsconfig paths (a source alias like "../utils/src" then clashes instead of winning).
|
|
415
|
+
const aliasNames = Object.keys(plan.aliases);
|
|
416
|
+
if (aliasNames.length > 0) {
|
|
417
|
+
if (!tree.exists('tsconfig.base.json'))
|
|
418
|
+
writeJson(tree, 'tsconfig.base.json', { compilerOptions: {} });
|
|
419
|
+
(0, devkit_1.updateJson)(tree, 'tsconfig.base.json', (json) => {
|
|
420
|
+
const co = json.compilerOptions ?? {};
|
|
421
|
+
const paths = { ...(co.paths ?? {}) };
|
|
422
|
+
for (const alias of aliasNames) {
|
|
423
|
+
if (paths[alias] !== undefined)
|
|
424
|
+
continue;
|
|
425
|
+
paths[alias] = plan.aliases[alias];
|
|
426
|
+
if (!data.tsPathsAdded.includes(alias))
|
|
427
|
+
data.tsPathsAdded.push(alias);
|
|
428
|
+
}
|
|
429
|
+
json.compilerOptions = { ...co, paths };
|
|
430
|
+
return json;
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
const nameOf = (sourceName) => plan.projects.find((x) => x.source.name === sourceName)?.name ?? sourceName;
|
|
434
|
+
for (const p of plan.projects) {
|
|
435
|
+
if (p.source.kind === 'lib') {
|
|
436
|
+
const task = migrateLib(tree, ctx, plan, p, data);
|
|
437
|
+
if (task)
|
|
438
|
+
tasks.push(task);
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
const pctx = {
|
|
442
|
+
sourceDir: abs(sourceDir, p.source.root),
|
|
443
|
+
name: p.name,
|
|
444
|
+
projectRoot: p.newRoot,
|
|
445
|
+
forceAngular: ctx.forceAngular,
|
|
446
|
+
maxFiles: (ctx.maxFiles ?? copy_1.DEFAULT_MAX_FILES) - data.copied,
|
|
447
|
+
rewriteImports: ctx.rewriteImports,
|
|
448
|
+
};
|
|
449
|
+
const opts = {
|
|
450
|
+
ignoreFrom: sourceDir,
|
|
451
|
+
skipPaths: nestedPackages(plan, p),
|
|
452
|
+
sourcePkg: p.source.pkg,
|
|
453
|
+
notesLabel: code(p.name),
|
|
454
|
+
};
|
|
455
|
+
const appData = withFileLimit(ctx, () => p.source.kind === 'ionic-app'
|
|
456
|
+
? (0, ionic_1.migrateIonic)(tree, pctx, { ...opts, extraSkip: [skipInternal] })
|
|
457
|
+
: (0, angular_cli_1.migrateAngularApp)(tree, pctx, { ...opts, dependencySkip: skipInternal }).data);
|
|
458
|
+
// The package's own tsconfig alias for a library imported here is replaced, not a clash.
|
|
459
|
+
appData.tsPathClashes = appData.tsPathClashes.filter((c) => !plan.aliases[c.alias]);
|
|
460
|
+
absorb(data, appData, p);
|
|
461
|
+
if (appData.installTask)
|
|
462
|
+
tasks.push(appData.installTask);
|
|
463
|
+
}
|
|
464
|
+
for (const [k, v] of Object.entries(p.source.pkg.scripts ?? {})) {
|
|
465
|
+
data.sourceScripts[`${p.source.packageName}: ${k}`] = v;
|
|
466
|
+
}
|
|
467
|
+
data.projects.push({
|
|
468
|
+
name: p.name,
|
|
469
|
+
sourceName: p.source.packageName,
|
|
470
|
+
kind: p.source.kind,
|
|
471
|
+
root: p.newRoot,
|
|
472
|
+
why: p.neededBy.length === 0 ? 'selected' : `needed by ${p.neededBy.map(nameOf).join(', ')}`,
|
|
473
|
+
});
|
|
474
|
+
if (p.source.kind === 'lib')
|
|
475
|
+
data.nextSteps.push(`\`npx nx lint ${p.name}\``);
|
|
476
|
+
}
|
|
477
|
+
for (const [k, v] of Object.entries((0, source_2.readSourceJson)(sourceDir, 'package.json')?.scripts ?? {})) {
|
|
478
|
+
data.sourceScripts[k] = v;
|
|
479
|
+
}
|
|
480
|
+
data.unsupported = plan.all
|
|
481
|
+
.filter((p) => !(0, workspace_source_1.isSupportedKind)(p.kind))
|
|
482
|
+
.map((p) => ({ name: p.packageName, kind: p.kind, root: p.root }));
|
|
483
|
+
if ((0, source_1.packageManager)(sourceDir) === 'pnpm')
|
|
484
|
+
pnpmSettings(tree, sourceDir, data, namesBefore);
|
|
485
|
+
const subpaths = librarySubpathImports(sourceDir, plan);
|
|
486
|
+
const subpathAliases = ctx.rewriteImports
|
|
487
|
+
? addSubpathAliases(tree, plan, subpaths, data)
|
|
488
|
+
: { added: [], kept: [] };
|
|
489
|
+
notes(ctx, plan, data, subpaths, subpathAliases);
|
|
490
|
+
data.dependenciesAdded = [...(0, dependencies_2.packageNames)(tree)].filter((n) => !namesBefore.has(n)).sort();
|
|
491
|
+
data.installTask =
|
|
492
|
+
tasks.length > 0
|
|
493
|
+
? async () => {
|
|
494
|
+
for (const t of tasks)
|
|
495
|
+
await t();
|
|
496
|
+
}
|
|
497
|
+
: undefined;
|
|
498
|
+
return data;
|
|
499
|
+
}
|
|
500
|
+
/** Report notes about what an npm/Yarn workspaces import leaves behind. */
|
|
501
|
+
function notes(ctx, plan, data, subpaths, subpathAliases) {
|
|
502
|
+
const { sourceDir } = ctx;
|
|
503
|
+
const manager = (0, source_1.packageManager)(sourceDir);
|
|
504
|
+
const managerFiles = manager === 'pnpm'
|
|
505
|
+
? 'pnpm files (`pnpm-workspace.yaml`, `.pnpmfile.cjs`)'
|
|
506
|
+
: 'Yarn files (`.yarnrc.yml`, `.yarn/`, `.pnp.*`)';
|
|
507
|
+
data.notes.unshift(`The source used ${manager} workspaces. Only the package folders were copied: lockfiles, ` +
|
|
508
|
+
`${managerFiles} and other root files were not; the workspace installs with npm.`);
|
|
509
|
+
if ((0, source_2.sourceExists)(sourceDir, '.npmrc')) {
|
|
510
|
+
data.notes.push(`The source root \`.npmrc\` was not copied. Carry its registry and auth settings over to the ` +
|
|
511
|
+
"workspace's `.npmrc` by hand if the imported packages need them" +
|
|
512
|
+
(manager === 'pnpm' ? '; its pnpm settings do not apply to npm.' : '.'));
|
|
513
|
+
}
|
|
514
|
+
const baseFile = ['tsconfig.base.json', 'tsconfig.json'].find((f) => (0, source_2.sourceExists)(sourceDir, f));
|
|
515
|
+
const base = baseFile ? (0, source_2.readSourceJson)(sourceDir, baseFile) : undefined;
|
|
516
|
+
const co = base?.['compilerOptions'];
|
|
517
|
+
if (co &&
|
|
518
|
+
typeof co === 'object' &&
|
|
519
|
+
Object.keys(co).some((k) => k !== 'paths' && k !== 'baseUrl')) {
|
|
520
|
+
data.notes.push(`The source root ${code(baseFile)} compilerOptions were not carried over; the ` +
|
|
521
|
+
'projects extend the workspace `tsconfig.base.json` now. Compare the two if the build ' +
|
|
522
|
+
'or type checks behave differently.');
|
|
523
|
+
}
|
|
524
|
+
const importedPackages = new Set(plan.projects.map((p) => p.source.packageName));
|
|
525
|
+
for (const p of plan.projects) {
|
|
526
|
+
const deps = p.source.workspaceDependencies.filter((d) => !importedPackages.has(d));
|
|
527
|
+
if (deps.length > 0) {
|
|
528
|
+
data.notes.push(`${code(p.name)} depends on workspace package${deps.length > 1 ? 's' : ''} ` +
|
|
529
|
+
`${deps.map(code).join(', ')}, which ${deps.length > 1 ? 'were' : 'was'} not imported.`);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
if (subpaths.length === 0)
|
|
533
|
+
return;
|
|
534
|
+
if (!ctx.rewriteImports) {
|
|
535
|
+
data.notes.push('These imports reach into a library package below its entry and have no path alias: ' +
|
|
536
|
+
`${subpaths.map(code).join(', ')}. Export what they need from the entry, or ` +
|
|
537
|
+
'add a `<package>/*` alias to tsconfig.base.json.');
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
const { added, kept } = subpathAliases;
|
|
541
|
+
data.notes.push(`These imports reach into a library package below its entry: ${subpaths
|
|
542
|
+
.map(code)
|
|
543
|
+
.join(', ')}. ` +
|
|
544
|
+
(added.length > 0
|
|
545
|
+
? `They resolve through the added ${added.map(code).join(', ')} alias${added.length > 1 ? 'es' : ''} (the package folder); check them against the package's \`exports\`. `
|
|
546
|
+
: '') +
|
|
547
|
+
(kept.length > 0
|
|
548
|
+
? `The workspace already maps ${kept.map(code).join(', ')}; check where it points. `
|
|
549
|
+
: '') +
|
|
550
|
+
'Exporting what they need from the entry is the cleaner fix.');
|
|
551
|
+
}
|
|
552
|
+
/** Imports of a library package below its entry (`@acme/utils/x`) in the imported packages. */
|
|
553
|
+
function librarySubpathImports(sourceDir, plan) {
|
|
554
|
+
const libNames = plan.projects
|
|
555
|
+
.filter((p) => p.source.kind === 'lib')
|
|
556
|
+
.map((p) => p.source.packageName);
|
|
557
|
+
const subpaths = new Set();
|
|
558
|
+
for (const p of plan.projects) {
|
|
559
|
+
for (const file of (0, workspace_source_1.listProjectFiles)(sourceDir, p.source.root)) {
|
|
560
|
+
if (!/\.(ts|tsx|mts|js|mjs)$/.test(file) || file.endsWith('.d.ts'))
|
|
561
|
+
continue;
|
|
562
|
+
const text = (0, source_2.readSourceText)(sourceDir, `${p.source.root}/${file}`) ?? '';
|
|
563
|
+
for (const spec of (0, selection_1.importSpecifiers)(text)) {
|
|
564
|
+
if (libNames.some((n) => spec.startsWith(`${n}/`)))
|
|
565
|
+
subpaths.add(spec);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return [...subpaths].sort();
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* With import rewriting on: a `<package>/*` alias to the library folder for each library whose
|
|
573
|
+
* subpaths are imported (package subpaths resolve inside the package folder).
|
|
574
|
+
*/
|
|
575
|
+
function addSubpathAliases(tree, plan, subpaths, data) {
|
|
576
|
+
const used = plan.projects.filter((p) => p.source.kind === 'lib' && subpaths.some((sp) => sp.startsWith(`${p.source.packageName}/`)));
|
|
577
|
+
const added = [];
|
|
578
|
+
const kept = [];
|
|
579
|
+
if (used.length === 0)
|
|
580
|
+
return { added, kept };
|
|
581
|
+
if (!tree.exists('tsconfig.base.json'))
|
|
582
|
+
writeJson(tree, 'tsconfig.base.json', { compilerOptions: {} });
|
|
583
|
+
(0, devkit_1.updateJson)(tree, 'tsconfig.base.json', (json) => {
|
|
584
|
+
const co = json.compilerOptions ?? {};
|
|
585
|
+
const paths = { ...(co.paths ?? {}) };
|
|
586
|
+
for (const p of used) {
|
|
587
|
+
const alias = `${p.source.packageName}/*`;
|
|
588
|
+
if (paths[alias] === undefined) {
|
|
589
|
+
paths[alias] = [`${p.newRoot}/*`];
|
|
590
|
+
added.push(alias);
|
|
591
|
+
if (!data.tsPathsAdded.includes(alias))
|
|
592
|
+
data.tsPathsAdded.push(alias);
|
|
593
|
+
}
|
|
594
|
+
else
|
|
595
|
+
kept.push(alias);
|
|
596
|
+
}
|
|
597
|
+
json.compilerOptions = { ...co, paths };
|
|
598
|
+
return json;
|
|
599
|
+
});
|
|
600
|
+
return { added, kept };
|
|
601
|
+
}
|
|
602
|
+
/** An npm overrides key: a package name, without pnpm's "a>b" or "pkg@<range" selectors. */
|
|
603
|
+
const FLAT_OVERRIDE = /^(@[^/@>\s]+\/)?[^/@>\s]+$/;
|
|
604
|
+
/**
|
|
605
|
+
* pnpm overrides → npm overrides (flat package → version entries only), and report notes for the
|
|
606
|
+
* pnpm settings that are not carried over.
|
|
607
|
+
*/
|
|
608
|
+
function pnpmSettings(tree, sourceDir, data, namesBefore) {
|
|
609
|
+
const ws = (0, source_1.readPnpmWorkspace)(sourceDir);
|
|
610
|
+
const rootPkg = (0, source_2.readSourceJson)(sourceDir, 'package.json') ?? {};
|
|
611
|
+
const pnpmField = rootPkg['pnpm'] && typeof rootPkg['pnpm'] === 'object'
|
|
612
|
+
? rootPkg['pnpm']
|
|
613
|
+
: {};
|
|
614
|
+
const fieldOverrides = pnpmField['overrides'] && typeof pnpmField['overrides'] === 'object'
|
|
615
|
+
? pnpmField['overrides']
|
|
616
|
+
: {};
|
|
617
|
+
// pnpm-workspace.yaml settings take precedence over the package.json "pnpm" field.
|
|
618
|
+
const overrides = { ...fieldOverrides, ...(ws?.overrides ?? {}) };
|
|
619
|
+
const catalogs = ws?.catalogs ?? {};
|
|
620
|
+
const carried = {};
|
|
621
|
+
const notCarried = [];
|
|
622
|
+
for (const [key, raw] of Object.entries(overrides)) {
|
|
623
|
+
let value = typeof raw === 'string' ? raw.trim() : undefined;
|
|
624
|
+
const cat = value !== undefined ? /^catalog:(.*)$/.exec(value) : null;
|
|
625
|
+
if (cat)
|
|
626
|
+
value = catalogs[cat[1].trim() || 'default']?.[key];
|
|
627
|
+
// Removals, protocols npm cannot install from an overrides entry or that point at source
|
|
628
|
+
// paths, and pnpm-only key syntax are reported instead.
|
|
629
|
+
const portable = value !== undefined &&
|
|
630
|
+
value !== '-' &&
|
|
631
|
+
!/^(catalog|workspace|link|file|portal):/.test(value) &&
|
|
632
|
+
(0, npm_deps_1.localPath)(value) === undefined &&
|
|
633
|
+
FLAT_OVERRIDE.test(key);
|
|
634
|
+
if (portable)
|
|
635
|
+
carried[key] = value;
|
|
636
|
+
else
|
|
637
|
+
notCarried.push(`${code(key)}: ${code(typeof raw === 'string' ? raw : JSON.stringify(raw))}`);
|
|
638
|
+
}
|
|
639
|
+
if (Object.keys(carried).length > 0) {
|
|
640
|
+
const differing = [];
|
|
641
|
+
const added = [];
|
|
642
|
+
const direct = [];
|
|
643
|
+
const workspaceOwn = [];
|
|
644
|
+
(0, devkit_1.updateJson)(tree, 'package.json', (json) => {
|
|
645
|
+
const current = { ...(json.overrides ?? {}) };
|
|
646
|
+
for (const [k, v] of Object.entries(carried)) {
|
|
647
|
+
if (current[k] !== undefined) {
|
|
648
|
+
if (current[k] !== v) {
|
|
649
|
+
const was = typeof current[k] === 'string' ? current[k] : JSON.stringify(current[k]);
|
|
650
|
+
differing.push(`${code(k)} (workspace ${code(was)}, source ${code(v)})`);
|
|
651
|
+
}
|
|
652
|
+
continue;
|
|
653
|
+
}
|
|
654
|
+
// npm refuses an override that differs from a direct dependency's spec (EOVERRIDE); as in
|
|
655
|
+
// pnpm, a dependency this import added takes the overridden version instead. The
|
|
656
|
+
// workspace's own dependencies are left alone.
|
|
657
|
+
const field = ['dependencies', 'devDependencies', 'optionalDependencies'].find((f) => json[f]?.[k] !== undefined);
|
|
658
|
+
if (field && json[field][k] !== v) {
|
|
659
|
+
if (namesBefore.has(k)) {
|
|
660
|
+
workspaceOwn.push(`${code(k)} (workspace ${code(json[field][k])}, override ${code(v)})`);
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
direct.push(`${code(k)} ${code(json[field][k])} → ${code(v)}`);
|
|
664
|
+
json[field][k] = v;
|
|
665
|
+
}
|
|
666
|
+
// The override still applies to the copies other packages pull in.
|
|
667
|
+
current[k] = v;
|
|
668
|
+
added.push(k);
|
|
669
|
+
}
|
|
670
|
+
if (Object.keys(current).length > 0)
|
|
671
|
+
json.overrides = current;
|
|
672
|
+
return json;
|
|
673
|
+
});
|
|
674
|
+
if (added.length > 0) {
|
|
675
|
+
data.notes.push(`pnpm overrides became npm \`overrides\` in package.json: ${added
|
|
676
|
+
.sort()
|
|
677
|
+
.map((k) => `${code(k)} → ${code(carried[k])}`)
|
|
678
|
+
.join(', ')}.`);
|
|
679
|
+
}
|
|
680
|
+
if (direct.length > 0) {
|
|
681
|
+
data.notes.push('pnpm overrides of packages the import added as direct dependencies also changed those ' +
|
|
682
|
+
'dependencies (npm refuses an override that differs from a direct dependency): ' +
|
|
683
|
+
`${direct.join(', ')}.`);
|
|
684
|
+
}
|
|
685
|
+
if (differing.length > 0) {
|
|
686
|
+
data.notes.push(`pnpm overrides the workspace already overrides differently (kept): ${differing.join(', ')}.`);
|
|
687
|
+
}
|
|
688
|
+
if (workspaceOwn.length > 0) {
|
|
689
|
+
data.notes.push('pnpm overrides not carried over because the workspace depends on the package directly ' +
|
|
690
|
+
`at another version (npm would refuse the override): ${workspaceOwn.join(', ')}.`);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
if (notCarried.length > 0) {
|
|
694
|
+
data.notes.push('pnpm overrides not carried over automatically (selectors, version ranges, removals, local ' +
|
|
695
|
+
`or workspace specs): ${notCarried.join(', ')}. Rewrite them as npm \`overrides\` ` +
|
|
696
|
+
'(nested for `a>b`) if they are still needed.');
|
|
697
|
+
}
|
|
698
|
+
const fieldPatches = pnpmField['patchedDependencies'];
|
|
699
|
+
const patches = {
|
|
700
|
+
...(fieldPatches && typeof fieldPatches === 'object'
|
|
701
|
+
? fieldPatches
|
|
702
|
+
: {}),
|
|
703
|
+
...(ws?.patchedDependencies ?? {}),
|
|
704
|
+
};
|
|
705
|
+
if (Object.keys(patches).length > 0) {
|
|
706
|
+
data.notes.push(`pnpm patches were not applied or copied: ${Object.entries(patches)
|
|
707
|
+
.map(([k, v]) => `${code(k)} (${code(String(v))})`)
|
|
708
|
+
.join(', ')}. Re-create them with \`patch-package\` if the packages still need them.`);
|
|
709
|
+
}
|
|
710
|
+
if ((0, source_2.sourceExists)(sourceDir, '.pnpmfile.cjs')) {
|
|
711
|
+
data.notes.push('The source `.pnpmfile.cjs` hooks did not run and were not copied; check what they changed.');
|
|
712
|
+
}
|
|
713
|
+
const other = [
|
|
714
|
+
...(ws?.otherKeys ?? []).map((k) => `pnpm-workspace.yaml \`${k}\``),
|
|
715
|
+
...Object.keys(pnpmField)
|
|
716
|
+
.filter((k) => k !== 'overrides' && k !== 'patchedDependencies')
|
|
717
|
+
.map((k) => `package.json \`pnpm.${k}\``),
|
|
718
|
+
];
|
|
719
|
+
if (other.length > 0) {
|
|
720
|
+
data.notes.push(`pnpm settings not carried over: ${other.join(', ')}.`);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
exports.npmWorkspacesAdapter = {
|
|
724
|
+
kind: 'workspace',
|
|
725
|
+
id: 'npm-workspaces',
|
|
726
|
+
label: 'npm, Yarn or pnpm workspaces repo',
|
|
727
|
+
detect: detectNpmWorkspaces,
|
|
728
|
+
defaultName: (sourceDir) => (0, source_2.readSourceJson)(sourceDir, 'package.json')?.name,
|
|
729
|
+
preflight: (tree, ctx) => {
|
|
730
|
+
planNpmWorkspaces(tree, ctx);
|
|
731
|
+
},
|
|
732
|
+
migrate: migrateNpmWorkspaces,
|
|
733
|
+
};
|
|
734
|
+
//# sourceMappingURL=npm-workspaces.js.map
|