@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,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.helpText = void 0;
|
|
4
|
+
const install_source_1 = require("./install-source");
|
|
5
|
+
const versions_1 = require("./versions");
|
|
6
|
+
function helpText(version) {
|
|
7
|
+
return `
|
|
8
|
+
pstack — @mouryaamit/nx-polystack CLI v${version}
|
|
9
|
+
|
|
10
|
+
USAGE
|
|
11
|
+
pstack <command> [options]
|
|
12
|
+
|
|
13
|
+
COMMANDS
|
|
14
|
+
new <dir> Create a new polystack workspace in <dir> (installs deps, initialises git)
|
|
15
|
+
update Upgrade this workspace's nx-polystack version and run its migrations
|
|
16
|
+
preset Bootstrap a workspace root skeleton in the current directory
|
|
17
|
+
app Scaffold a new application into an existing workspace
|
|
18
|
+
lib Scaffold a shared library (ts, angular, ionic, flutter, assets, styles,
|
|
19
|
+
state, design-tokens, session, pii)
|
|
20
|
+
env Add an environment to some or all apps later, copied from an existing one
|
|
21
|
+
(env file, build/serve/release configurations, Flutter env, npm scripts)
|
|
22
|
+
llm Write or refresh the generated workspace block in CLAUDE.md, AGENTS.md and
|
|
23
|
+
.github/copilot-instructions.md (app/lib/env refresh it automatically)
|
|
24
|
+
migrate Copy an existing project into the workspace, source never modified: a standalone
|
|
25
|
+
Angular CLI, Ionic/Capacitor or Flutter app (apps/<name>), the apps and libraries
|
|
26
|
+
of a multi-project Angular CLI repo (apps/, libs/), the Angular, Ionic and
|
|
27
|
+
Flutter projects of an Nx 15-17 workspace (same paths, names and aliases), or the
|
|
28
|
+
app and TypeScript library packages of an npm, Yarn or pnpm workspaces repo
|
|
29
|
+
(apps/, libs/)
|
|
30
|
+
encryption Show or change the env encryption settings of release builds (nx.json
|
|
31
|
+
pstack.envEncryption)
|
|
32
|
+
build Build every app (or some) for one environment: release targets of Angular/Ionic
|
|
33
|
+
apps and Flutter build targets, one at a time or --parallel, with a summary
|
|
34
|
+
release Show or change an app's base href per release configuration
|
|
35
|
+
csp Edit an app's csp-allowlist.json and write its .htaccess and nginx.conf from it
|
|
36
|
+
(strict CSP with a per-request nonce)
|
|
37
|
+
shared Wire the shared assets and styles folders (libs/shared/assets, libs/shared/styles)
|
|
38
|
+
into existing Angular/Ionic apps; new apps get them automatically
|
|
39
|
+
hardening Show or change an app's release hardening (leak check, source maps, comment and
|
|
40
|
+
console stripping, obfuscation, SRI for every chunk)
|
|
41
|
+
infra Add repo docs, CI gates (affected lint/test/build, dependency cycles), quality
|
|
42
|
+
checks (knip, pre-push audit + secret scan) and a dependency-upgrade workflow
|
|
43
|
+
|
|
44
|
+
OPTIONS — new / preset
|
|
45
|
+
--npmScope=<scope> npm scope for the workspace (default: mouryaamit)
|
|
46
|
+
--baseBranch=<branch> Default git branch (default: master)
|
|
47
|
+
--infra=<parts> Run pstack infra with these parts: docs,ci,quality,upgrades | all |
|
|
48
|
+
none (default: all)
|
|
49
|
+
--ci=<providers> CI for the infra ci part: github-actions | jenkins (comma-separated;
|
|
50
|
+
default: github-actions)
|
|
51
|
+
--ci-cache, --flutter=<mode>, --upgrade-schedule=<s>, --upgrade-scope=<s>
|
|
52
|
+
passed to pstack infra
|
|
53
|
+
--llm=<tools> AI-assistant files, as pstack llm: claude | agents | copilot
|
|
54
|
+
(codex, openai-gpt → agents; comma-separated)
|
|
55
|
+
--projectDescription=<text> Short project description
|
|
56
|
+
--skipFormat Skip Prettier format pass
|
|
57
|
+
--skip-install new only — do not run npm install
|
|
58
|
+
--skip-git new only — do not initialise git
|
|
59
|
+
--force new only — allow creating inside another Nx workspace
|
|
60
|
+
|
|
61
|
+
OPTIONS — update
|
|
62
|
+
--to=<version> Target version (default: this CLI's version)
|
|
63
|
+
--allow-dirty Run with uncommitted changes
|
|
64
|
+
--force Allow downgrading
|
|
65
|
+
|
|
66
|
+
OPTIONS — app
|
|
67
|
+
--type=<type> App type: angular | ionic | flutter (required)
|
|
68
|
+
--name=<name> Application name (required)
|
|
69
|
+
--dir=<path> Put the app in apps/<path>/<name> (v0.17.0+)
|
|
70
|
+
--tags=<tags> Comma-separated Nx tags
|
|
71
|
+
--cspConnectSrc=<url> Angular/Ionic — pre-fill CSP connect-src in csp-allowlist.json
|
|
72
|
+
--appId=<id> Ionic only — Capacitor appId (default: com.example.<name>)
|
|
73
|
+
--base-href=<path> Base href of the uat and prod release configurations, e.g. /portal/
|
|
74
|
+
--port=<n> Dev-server port (default: the lowest free port from 4200)
|
|
75
|
+
--env-layout=<layout> Angular/Ionic — default (environment.ts for dev) | per-env
|
|
76
|
+
(environment.dev|uat|prod.ts replacing environments/environment.ts)
|
|
77
|
+
|
|
78
|
+
OPTIONS — shared (--app or --all required)
|
|
79
|
+
--app=<a,b> Angular/Ionic apps to wire
|
|
80
|
+
--all Every Angular/Ionic app
|
|
81
|
+
|
|
82
|
+
OPTIONS — lib
|
|
83
|
+
--type=<type> Lib type (required): ts | angular | ionic | flutter | assets | styles |
|
|
84
|
+
state | design-tokens | session (idle/session timeout) |
|
|
85
|
+
pii (masking pipe and directive)
|
|
86
|
+
--name=<name> Library name, kebab-case (required)
|
|
87
|
+
--scope=<scope> Folder under libs/ and project-name prefix
|
|
88
|
+
(default: shared; ionic → ionic; flutter → flutter)
|
|
89
|
+
--dir=<path> Put the lib in libs/<scope>/<path>/<name> (at most 2 folders; v0.19.0+)
|
|
90
|
+
--variant=<variant> angular/ionic: internal | buildable | publishable
|
|
91
|
+
(default: buildable)
|
|
92
|
+
state: simple-service | ngrx (default: simple-service; always buildable)
|
|
93
|
+
--prefix=<prefix> angular/ionic: component selector prefix (default: lib)
|
|
94
|
+
--tags=<tags> Comma-separated extra Nx tags
|
|
95
|
+
|
|
96
|
+
OPTIONS — env
|
|
97
|
+
--name=<name> Environment slug, e.g. qa, sit, staging (required)
|
|
98
|
+
--app=<a,b> | --all Apps to add it to (one of them is required)
|
|
99
|
+
--from=<env> Environment to copy (default uat); secret values become
|
|
100
|
+
\${APP_ENV_KEY} placeholders filled at build time
|
|
101
|
+
--api-url=<url> API base URL of the new environment
|
|
102
|
+
--production[=false] production flag of the new Angular env file (default: as --from)
|
|
103
|
+
--base-href=<path> Base href of the new configuration (default: as --from)
|
|
104
|
+
--domains=<hosts> aes-gcm domain lock of the new release configuration
|
|
105
|
+
|
|
106
|
+
OPTIONS — encryption (no options: show the settings)
|
|
107
|
+
--mode=<mode> listed (encrypt the listed keys) | all (every field except publicKeys)
|
|
108
|
+
--add-key=<keys> Add keys to encrypt in listed mode (comma-separated)
|
|
109
|
+
--remove-key=<keys> Remove keys
|
|
110
|
+
--project=<env project> Keys of this env project (default: default)
|
|
111
|
+
--add-public=<keys> Keys kept in plain text in mode all
|
|
112
|
+
--remove-public=<keys> Remove public keys
|
|
113
|
+
--format=<format> raw | enc (values written as ENC(…), read by runtime/env-secret)
|
|
114
|
+
--profile-files=<files> Files next to the env file whose sensitive fields are encrypted
|
|
115
|
+
(e.g. app.profile.ts; empty value clears)
|
|
116
|
+
--meta-name=<name> Meta tag carrying the build info and key (default: x-build)
|
|
117
|
+
--timezone=<tz> Build stamp time zone, e.g. Asia/Kolkata (default: UTC)
|
|
118
|
+
--stamp-format=<format> Build stamp format (default: DD MMM YYYY hh:mm:ss A z)
|
|
119
|
+
--cipher=<cipher> cryptojs (default) | aes-gcm (Web Crypto; main.ts awaits envReady)
|
|
120
|
+
--key-sources=<list> aes-gcm key factors besides the internal per-build key: commit,
|
|
121
|
+
salt, env (PSTACK_ENV_KEY), custom (PSTACK_CUSTOM_KEY + getKey).
|
|
122
|
+
salt and env values ship in the bundle like the commit: use a
|
|
123
|
+
dedicated random value, never a real secret; only custom stays out
|
|
124
|
+
--rotate-salt New tools/config/env-salt
|
|
125
|
+
--app=<project> App whose release target gets the options below
|
|
126
|
+
--key-split=<split> meta-bundle (default) | meta-bundle-asset
|
|
127
|
+
--domains=<conf>=<hosts> Hosts the build may run on, per configuration, separated by ;
|
|
128
|
+
e.g. uat=a.com,b.in;prod=a.com (uat= removes the list)
|
|
129
|
+
--include-www=<bool> example.com also allows www.example.com (default: true)
|
|
130
|
+
--on-mismatch=<mode> block (default) | warn
|
|
131
|
+
|
|
132
|
+
OPTIONS — llm
|
|
133
|
+
--providers=<list> claude | agents | copilot, comma-separated (default: all three;
|
|
134
|
+
codex, openai-gpt → agents). Only the text between the
|
|
135
|
+
nx-polystack markers is managed; the rest of each file is kept.
|
|
136
|
+
|
|
137
|
+
OPTIONS — migrate
|
|
138
|
+
--source=<path> Project to migrate: its repo root (required unless --rollback;
|
|
139
|
+
read only)
|
|
140
|
+
--name=<name> App name, kebab-case (default: the Angular project name or
|
|
141
|
+
the pubspec name); for workspace sources the report name
|
|
142
|
+
--adapter=<id> Skip detection: angular-cli | flutter | nx-workspace | angular-workspace | ionic |
|
|
143
|
+
npm-workspaces, or an adapter listed in nx.json
|
|
144
|
+
--min-confidence=<n> Use the best adapter when it reaches n (0.50 to 1.00; default 0.80; v0.15.0+)
|
|
145
|
+
--dir=<path> Single-app sources: put the app in apps/<path>/<name> (v0.16.0+)
|
|
146
|
+
--detect Print the detection table (adapter, confidence, reasons) and
|
|
147
|
+
exit; writes nothing, works outside a workspace
|
|
148
|
+
--projects=<a,b> Workspace sources: projects to migrate (default: every supported one)
|
|
149
|
+
--no-deps Workspace sources: only the --projects named, not the libs they import
|
|
150
|
+
--prefix=<p> Workspace sources: rename projects to <p>-<name> (aliases kept)
|
|
151
|
+
--force-angular Migrate even when the workspace and the source use different
|
|
152
|
+
Angular majors (the report flags it)
|
|
153
|
+
--max-files=<n> Fail when more than n files would be copied (default: 20000)
|
|
154
|
+
--no-rewrite-imports Keep the copied imports as they were (v0.21.0+). By default,
|
|
155
|
+
relative imports into another moved project, imports through the
|
|
156
|
+
source baseUrl, @nrwl/* packages and relative SCSS paths are
|
|
157
|
+
rewritten in the copies; the report lists each one
|
|
158
|
+
--new-adapter=<id> Write a starter adapter tools/migrate/<id>.adapter.ts (with a
|
|
159
|
+
spec) and list it in nx.json "pstack.migrateAdapters" (v0.22.0+).
|
|
160
|
+
Listed adapters join detection, --adapter and --config; write
|
|
161
|
+
them with @mouryaamit/nx-polystack/migrate
|
|
162
|
+
--rollback=<name> Undo migration <name> (v0.13.0+): removes the files it created and
|
|
163
|
+
reverts its package.json/tsconfig/nx.json changes; anything edited
|
|
164
|
+
since is kept and listed in docs/migrations/<name>.rollback.md
|
|
165
|
+
--force With --rollback: remove or restore the edited items too
|
|
166
|
+
--config=<file> Run the migrations listed in a JSON batch file (v0.14.0+), all or
|
|
167
|
+
nothing: { "defaults": {...}, "migrations": [ { "source": ... } ] };
|
|
168
|
+
relative sources are resolved from the file's folder; values in
|
|
169
|
+
the file win over --force-angular / --max-files
|
|
170
|
+
Writes docs/migrations/<name>.md and <name>.manifest.json (for --rollback). Without
|
|
171
|
+
--adapter the most confident adapter is used if its confidence is at least 0.80.
|
|
172
|
+
|
|
173
|
+
OPTIONS — infra
|
|
174
|
+
--with=<parts> docs | ci | quality | upgrades, comma-separated, or all | none
|
|
175
|
+
(default: all)
|
|
176
|
+
--ci=<providers> github-actions | jenkins, comma-separated (default: github-actions);
|
|
177
|
+
the upgrade workflow is GitHub Actions only
|
|
178
|
+
--ci-cache GitHub Actions: cache the Nx cache directory between runs
|
|
179
|
+
--flutter=<mode> Set up Flutter in CI: auto (when a pubspec.yaml is under apps/ or
|
|
180
|
+
libs/) | on | off; default auto
|
|
181
|
+
--upgrade-schedule=<when> weekly (Monday 03:17 UTC) | monthly (1st, 03:17 UTC); default weekly
|
|
182
|
+
--upgrade-scope=<scope> polystack (pstack update) | nx-minor (also nx migrate within the
|
|
183
|
+
current Nx major); default polystack
|
|
184
|
+
--lint-staged=warn|block ESLint on commit: report without blocking (warn, the default of new
|
|
185
|
+
workspaces) or block on errors
|
|
186
|
+
--force Overwrite files that already exist (.husky/pre-push is always
|
|
187
|
+
appended to, never replaced)
|
|
188
|
+
The quality part also adds typecheck targets (tsc --noEmit) and the import/no-unresolved and
|
|
189
|
+
unused-imports ESLint rules (warnings).
|
|
190
|
+
Existing files are kept and listed; npm scripts and dependencies are only added when missing.
|
|
191
|
+
|
|
192
|
+
OPTIONS — build
|
|
193
|
+
--env=<env> Environment, e.g. uat (configuration name or its env option)
|
|
194
|
+
--all | --projects=<a,b> Every app, or these
|
|
195
|
+
--exclude=<a,b> Leave these out
|
|
196
|
+
--parallel=<n> Builds at once, 1-8 (default 1)
|
|
197
|
+
--continue Keep going after a failed build (default: stop)
|
|
198
|
+
--flutter-platforms=<list> web,android,ios (default web)
|
|
199
|
+
--report=<file.json> Also write the summary as JSON
|
|
200
|
+
--dry-run Show the plan only
|
|
201
|
+
|
|
202
|
+
OPTIONS — release (--app required; no other options: show the base hrefs)
|
|
203
|
+
--app=<project> App whose release configurations are shown or changed
|
|
204
|
+
--configuration=<name> Only this configuration (default: every non-DEV configuration)
|
|
205
|
+
--base-href=<path>|none Base href, starting and ending with / (none: remove)
|
|
206
|
+
|
|
207
|
+
OPTIONS — csp (--app required; writes the server files that are missing or were written by it)
|
|
208
|
+
--app=<project> Angular/Ionic app
|
|
209
|
+
--add=<dir>:<src>[,…] Add sources, e.g. script-src:https://www.googletagmanager.com
|
|
210
|
+
--remove=<dir>:<src>[,…] Remove sources
|
|
211
|
+
--import=<file|policy> Merge an existing policy into csp-allowlist.json: a CSP header value,
|
|
212
|
+
.htaccess / nginx.conf, or JSON (directive → sources); refused
|
|
213
|
+
sources ('unsafe-inline', 'unsafe-eval', http:, …) are listed, not
|
|
214
|
+
imported; paths covered by a host entry are dropped
|
|
215
|
+
--force Also replace hand-written .htaccess / nginx.conf
|
|
216
|
+
--dry-run Show what would change
|
|
217
|
+
|
|
218
|
+
OPTIONS — hardening (--app required; no other options: show the settings)
|
|
219
|
+
--app=<project> App whose release target is shown or changed
|
|
220
|
+
--configuration=<name> Only this configuration (default: every non-DEV configuration)
|
|
221
|
+
--obfuscate=<level> off | light (≈ +20% gzip) | medium (≈ +67%) | strong (also rc4
|
|
222
|
+
and control-flow flattening on the decrypt chunk); adds
|
|
223
|
+
javascript-obfuscator
|
|
224
|
+
--obfuscate-options=<json> javascript-obfuscator overrides on top of the level, e.g.
|
|
225
|
+
'{"stringArrayThreshold":0.3}' (none: clear)
|
|
226
|
+
--sri[=false] Integrity for every chunk; aes-gcm decrypts nothing without it
|
|
227
|
+
--leak-check=fail|warn|off Plaintext of encrypted env values in the output
|
|
228
|
+
--source-maps=fail|warn|off .map files or sourceMappingURL comments in the output
|
|
229
|
+
--strip-comments[=false] Remove comments from the built JS, CSS and index.html
|
|
230
|
+
--drop-console=<methods> Console calls removed, e.g. log,debug,warn (none: keep all)
|
|
231
|
+
|
|
232
|
+
GLOBAL FLAGS
|
|
233
|
+
--dry-run, -d Preview changes without writing files
|
|
234
|
+
--verbose Verbose output
|
|
235
|
+
--help, -h Show this help
|
|
236
|
+
--version, -v Print version
|
|
237
|
+
Flag values must use --flag=value (a space-separated value is read as an argument).
|
|
238
|
+
|
|
239
|
+
Inside a workspace that has its own nx-polystack installed, pstack hands app/lib/env/llm/encryption/hardening/build/release/csp/shared/preset/migrate/infra
|
|
240
|
+
to that pinned copy so generated files always match the workspace's plugin version.
|
|
241
|
+
|
|
242
|
+
INSTALL${(0, install_source_1.installSource)().kind === 'github' ? ' (needs the GitHub CLI, signed in: gh auth login)' : ''}
|
|
243
|
+
${(0, versions_1.globalInstallCommand)(version)}
|
|
244
|
+
|
|
245
|
+
EXAMPLES
|
|
246
|
+
pstack new my-workspace --npmScope=acme --ci=github-actions --llm=claude
|
|
247
|
+
pstack app --type=angular --name=portal
|
|
248
|
+
pstack app --type=ionic --name=field-ops --appId=com.acme.fieldops
|
|
249
|
+
pstack app --type=flutter --name=mobile-app --tags=platform:mobile
|
|
250
|
+
pstack app --type=angular --name=portal --dir=legacy
|
|
251
|
+
pstack lib --type=angular --name=ui --variant=publishable
|
|
252
|
+
pstack lib --type=flutter --name=shared-core
|
|
253
|
+
pstack lib --type=state --name=orders --variant=ngrx
|
|
254
|
+
pstack lib --type=design-tokens --name=brand
|
|
255
|
+
pstack lib --type=session --name=session
|
|
256
|
+
pstack lib --type=pii --name=pii-mask
|
|
257
|
+
pstack lib --type=angular --name=ui --dir=forms
|
|
258
|
+
pstack env --name=qa --app=portal --api-url=https://qa.example.com/api
|
|
259
|
+
pstack env --name=sit --all --from=prod --production=false
|
|
260
|
+
pstack llm
|
|
261
|
+
pstack llm --providers=claude,agents
|
|
262
|
+
pstack migrate --source=../legacy-portal --detect
|
|
263
|
+
pstack migrate --source=../legacy-portal --min-confidence=0.6
|
|
264
|
+
pstack migrate --source=../legacy-portal --name=portal --dir=legacy
|
|
265
|
+
pstack migrate --source=../legacy-portal --name=portal
|
|
266
|
+
pstack migrate --source=../field_notes --adapter=flutter --dry-run
|
|
267
|
+
pstack migrate --source=../nx-repo --projects=portal --prefix=legacy
|
|
268
|
+
pstack migrate --rollback=portal --dry-run
|
|
269
|
+
pstack migrate --config=tools/migrations.json --dry-run
|
|
270
|
+
pstack infra
|
|
271
|
+
pstack infra --with=docs,ci --ci=jenkins
|
|
272
|
+
pstack infra --with=upgrades --upgrade-schedule=monthly --upgrade-scope=nx-minor
|
|
273
|
+
pstack infra --with=none --lint-staged=block
|
|
274
|
+
pstack new my-workspace --infra=docs,ci
|
|
275
|
+
pstack build --env=uat --all
|
|
276
|
+
pstack build --env=prod --projects=portal,admin --parallel=2 --continue --report=dist/build.json
|
|
277
|
+
pstack release --app=portal --base-href=/portal/
|
|
278
|
+
pstack app --type=angular --name=portal --base-href=/portal/
|
|
279
|
+
pstack app --type=angular --name=admin --port=4300 --env-layout=per-env
|
|
280
|
+
pstack shared --all
|
|
281
|
+
nx run portal:clean
|
|
282
|
+
pstack csp --app=portal --add=connect-src:https://api.example.com
|
|
283
|
+
pstack csp --app=portal --import=apps/portal/src/.htaccess --dry-run
|
|
284
|
+
pstack hardening --app=portal
|
|
285
|
+
pstack hardening --app=portal --configuration=uat --obfuscate=light --sri
|
|
286
|
+
pstack update
|
|
287
|
+
pstack update --to=0.3.0 --dry-run
|
|
288
|
+
`.trimStart();
|
|
289
|
+
}
|
|
290
|
+
exports.helpText = helpText;
|
|
291
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../../src/cli/help.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AACjD,yCAAkD;AAElD,SAAgB,QAAQ,CAAC,OAAe;IACtC,OAAO;yCACgC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA2O5C,IAAA,8BAAa,GAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,mDAAmD,CAAC,CAAC,CAAC,EAC5F;IACE,IAAA,+BAAoB,EAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ChC,CAAC,SAAS,EAAE,CAAC;AACd,CAAC;AA7RD,4BA6RC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Where the plugin is installed from: a GitHub repo (git tags + release assets) or npm. */
|
|
2
|
+
export type InstallSource = {
|
|
3
|
+
kind: 'github';
|
|
4
|
+
repo: string;
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'npm';
|
|
7
|
+
};
|
|
8
|
+
/** The private development repo; also the source when package.json does not say. */
|
|
9
|
+
export declare const DEV_GITHUB_REPO = "example-org/private-plugin";
|
|
10
|
+
/** `"npm"` or `"github:<owner>/<repo>"` (package.json `pstack.installSource`). */
|
|
11
|
+
export declare function parseInstallSource(value: unknown): InstallSource;
|
|
12
|
+
/** pstack.installSource from the plugin's own package.json (the first one above `from`). */
|
|
13
|
+
export declare function readInstallSource(from?: string): InstallSource;
|
|
14
|
+
export declare function installSource(): InstallSource;
|
|
15
|
+
/** Tests only: pretend to be a build with another install source (undefined: read it again). */
|
|
16
|
+
export declare function setInstallSourceForTests(source: InstallSource | undefined): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setInstallSourceForTests = exports.installSource = exports.readInstallSource = exports.parseInstallSource = exports.DEV_GITHUB_REPO = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
+
const path = tslib_1.__importStar(require("path"));
|
|
7
|
+
const PACKAGE = '@mouryaamit/nx-polystack';
|
|
8
|
+
/** The private development repo; also the source when package.json does not say. */
|
|
9
|
+
exports.DEV_GITHUB_REPO = 'example-org/private-plugin';
|
|
10
|
+
const DEFAULT = { kind: 'github', repo: exports.DEV_GITHUB_REPO };
|
|
11
|
+
/** `"npm"` or `"github:<owner>/<repo>"` (package.json `pstack.installSource`). */
|
|
12
|
+
function parseInstallSource(value) {
|
|
13
|
+
if (value === undefined)
|
|
14
|
+
return DEFAULT;
|
|
15
|
+
if (value === 'npm')
|
|
16
|
+
return { kind: 'npm' };
|
|
17
|
+
const m = typeof value === 'string' ? /^github:([\w.-]+\/[\w.-]+)$/.exec(value) : null;
|
|
18
|
+
if (m)
|
|
19
|
+
return { kind: 'github', repo: m[1] };
|
|
20
|
+
throw new Error(`${PACKAGE}: package.json pstack.installSource must be "npm" or "github:<owner>/<repo>", not ${JSON.stringify(value)}.`);
|
|
21
|
+
}
|
|
22
|
+
exports.parseInstallSource = parseInstallSource;
|
|
23
|
+
/** pstack.installSource from the plugin's own package.json (the first one above `from`). */
|
|
24
|
+
function readInstallSource(from = __dirname) {
|
|
25
|
+
for (let dir = from;;) {
|
|
26
|
+
const file = path.join(dir, 'package.json');
|
|
27
|
+
if (fs.existsSync(file)) {
|
|
28
|
+
const pkg = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
29
|
+
if (pkg.name === PACKAGE)
|
|
30
|
+
return parseInstallSource(pkg.pstack?.installSource);
|
|
31
|
+
}
|
|
32
|
+
const parent = path.dirname(dir);
|
|
33
|
+
if (parent === dir)
|
|
34
|
+
return DEFAULT;
|
|
35
|
+
dir = parent;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.readInstallSource = readInstallSource;
|
|
39
|
+
let current;
|
|
40
|
+
function installSource() {
|
|
41
|
+
return (current ??= readInstallSource());
|
|
42
|
+
}
|
|
43
|
+
exports.installSource = installSource;
|
|
44
|
+
/** Tests only: pretend to be a build with another install source (undefined: read it again). */
|
|
45
|
+
function setInstallSourceForTests(source) {
|
|
46
|
+
current = source;
|
|
47
|
+
}
|
|
48
|
+
exports.setInstallSourceForTests = setInstallSourceForTests;
|
|
49
|
+
//# sourceMappingURL=install-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-source.js","sourceRoot":"","sources":["../../../src/cli/install-source.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AACzB,mDAA6B;AAK7B,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAC3C,oFAAoF;AACvE,QAAA,eAAe,GAAG,4BAA4B,CAAC;AAC5D,MAAM,OAAO,GAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAe,EAAE,CAAC;AAEzE,kFAAkF;AAClF,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IACxC,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAC5C,MAAM,CAAC,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,6BAA6B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACvF,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7C,MAAM,IAAI,KAAK,CACb,GAAG,OAAO,qFAAqF,IAAI,CAAC,SAAS,CAC3G,KAAK,CACN,GAAG,CACL,CAAC;AACJ,CAAC;AAVD,gDAUC;AAED,4FAA4F;AAC5F,SAAgB,iBAAiB,CAAC,OAAe,SAAS;IACxD,KAAK,IAAI,GAAG,GAAG,IAAI,IAAM;QACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC5C,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;YACvB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;YACtD,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAO,kBAAkB,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;SAChF;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,OAAO,CAAC;QACnC,GAAG,GAAG,MAAM,CAAC;KACd;AACH,CAAC;AAXD,8CAWC;AAED,IAAI,OAAkC,CAAC;AAEvC,SAAgB,aAAa;IAC3B,OAAO,CAAC,OAAO,KAAK,iBAAiB,EAAE,CAAC,CAAC;AAC3C,CAAC;AAFD,sCAEC;AAED,gGAAgG;AAChG,SAAgB,wBAAwB,CAAC,MAAiC;IACxE,OAAO,GAAG,MAAM,CAAC;AACnB,CAAC;AAFD,4DAEC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Flags } from './args';
|
|
3
|
+
import type { LocalPlugin } from './context';
|
|
4
|
+
/** Commands the global CLI always runs itself. */
|
|
5
|
+
export declare const NEVER_DELEGATE: Set<string>;
|
|
6
|
+
/** Generator commands that act on the workspace (run from its root when delegated). */
|
|
7
|
+
export declare const WORKSPACE_COMMANDS: Set<string>;
|
|
8
|
+
/** First plugin version whose CLI has each command; older pinned copies cannot run them. */
|
|
9
|
+
export declare const MIN_LOCAL_VERSION: Readonly<Record<string, string>>;
|
|
10
|
+
/** First plugin version that understands a flag of a command (checked when the flag is given). */
|
|
11
|
+
export declare const MIN_LOCAL_FLAG_VERSION: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
12
|
+
/**
|
|
13
|
+
* argv for the delegated CLI: relative path flags (e.g. migrate --source) made absolute when
|
|
14
|
+
* the delegate runs in a different directory than the caller.
|
|
15
|
+
*/
|
|
16
|
+
export declare function delegationArgs(command: string, argv: string[], cwd: string, delegateCwd: string): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Throws when the workspace's pinned plugin is too old for `command` (it would only print
|
|
19
|
+
* "Unknown command"). Unreadable versions are let through.
|
|
20
|
+
*/
|
|
21
|
+
export declare function assertLocalSupports(command: string, localVersion: string, flags?: Flags): void;
|
|
22
|
+
export interface DelegationInput {
|
|
23
|
+
command: string;
|
|
24
|
+
flags: Flags;
|
|
25
|
+
env: NodeJS.ProcessEnv;
|
|
26
|
+
selfRoot: string;
|
|
27
|
+
local: LocalPlugin | null;
|
|
28
|
+
}
|
|
29
|
+
export declare function shouldDelegate(i: DelegationInput): boolean;
|
|
30
|
+
/** Run another pstack CLI with the given args; returns its exit code. */
|
|
31
|
+
export declare function delegate(cliPath: string, args: string[], cwd: string): number;
|
|
32
|
+
export declare function upgradeHint(localVersion: string, selfVersion: string): string | null;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.upgradeHint = exports.delegate = exports.shouldDelegate = exports.assertLocalSupports = exports.delegationArgs = exports.MIN_LOCAL_FLAG_VERSION = exports.MIN_LOCAL_VERSION = exports.WORKSPACE_COMMANDS = exports.NEVER_DELEGATE = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const child_process_1 = require("child_process");
|
|
6
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
|
+
const types_1 = require("./types");
|
|
9
|
+
const versions_1 = require("./versions");
|
|
10
|
+
/** Commands the global CLI always runs itself. */
|
|
11
|
+
exports.NEVER_DELEGATE = new Set(['', 'help', 'new', 'update', '_migrate']);
|
|
12
|
+
/** Generator commands that act on the workspace (run from its root when delegated). */
|
|
13
|
+
exports.WORKSPACE_COMMANDS = new Set([
|
|
14
|
+
'app',
|
|
15
|
+
'env',
|
|
16
|
+
'lib',
|
|
17
|
+
'llm',
|
|
18
|
+
'migrate',
|
|
19
|
+
'infra',
|
|
20
|
+
'encryption',
|
|
21
|
+
'hardening',
|
|
22
|
+
'build',
|
|
23
|
+
'release',
|
|
24
|
+
'csp',
|
|
25
|
+
'shared',
|
|
26
|
+
]);
|
|
27
|
+
/** First plugin version whose CLI has each command; older pinned copies cannot run them. */
|
|
28
|
+
exports.MIN_LOCAL_VERSION = {
|
|
29
|
+
lib: '0.6.0',
|
|
30
|
+
llm: '0.7.0',
|
|
31
|
+
migrate: '0.12.0',
|
|
32
|
+
infra: '0.9.0',
|
|
33
|
+
encryption: '0.25.0',
|
|
34
|
+
hardening: '0.30.0',
|
|
35
|
+
build: '0.32.0',
|
|
36
|
+
release: '0.32.0',
|
|
37
|
+
csp: '0.33.0',
|
|
38
|
+
shared: '0.35.0',
|
|
39
|
+
};
|
|
40
|
+
/** First plugin version that understands a flag of a command (checked when the flag is given). */
|
|
41
|
+
exports.MIN_LOCAL_FLAG_VERSION = {
|
|
42
|
+
app: { dir: '0.17.0', baseHref: '0.32.0', port: '0.35.0', envLayout: '0.35.0' },
|
|
43
|
+
env: { app: '0.34.0', all: '0.34.0', from: '0.34.0', baseHref: '0.34.0', domains: '0.34.0' },
|
|
44
|
+
lib: { dir: '0.19.0' },
|
|
45
|
+
csp: { import: '0.38.0' },
|
|
46
|
+
infra: { lintStaged: '0.36.0' },
|
|
47
|
+
migrate: {
|
|
48
|
+
rollback: '0.13.0',
|
|
49
|
+
config: '0.14.0',
|
|
50
|
+
minConfidence: '0.15.0',
|
|
51
|
+
dir: '0.16.0',
|
|
52
|
+
noRewriteImports: '0.21.0',
|
|
53
|
+
rewriteImports: '0.21.0',
|
|
54
|
+
newAdapter: '0.22.0',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
/** Path flags resolved against the caller's cwd, so they survive delegating from another cwd. */
|
|
58
|
+
const PATH_FLAGS = {
|
|
59
|
+
migrate: ['source', 'config'],
|
|
60
|
+
build: ['report'],
|
|
61
|
+
csp: ['import'],
|
|
62
|
+
};
|
|
63
|
+
/** Path flags that may also hold plain text: made absolute only when the file exists. */
|
|
64
|
+
const PATH_FLAGS_IF_FILE = {
|
|
65
|
+
csp: ['import'],
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* argv for the delegated CLI: relative path flags (e.g. migrate --source) made absolute when
|
|
69
|
+
* the delegate runs in a different directory than the caller.
|
|
70
|
+
*/
|
|
71
|
+
function delegationArgs(command, argv, cwd, delegateCwd) {
|
|
72
|
+
const flags = PATH_FLAGS[command];
|
|
73
|
+
if (!flags || path.resolve(cwd) === path.resolve(delegateCwd))
|
|
74
|
+
return argv;
|
|
75
|
+
return argv.map((arg) => {
|
|
76
|
+
for (const flag of flags) {
|
|
77
|
+
const prefix = `--${flag}=`;
|
|
78
|
+
if (arg.startsWith(prefix)) {
|
|
79
|
+
const value = arg.slice(prefix.length);
|
|
80
|
+
if (!value || path.isAbsolute(value))
|
|
81
|
+
return arg;
|
|
82
|
+
const resolved = path.resolve(cwd, value);
|
|
83
|
+
if (PATH_FLAGS_IF_FILE[command]?.includes(flag) && !fs.existsSync(resolved))
|
|
84
|
+
return arg;
|
|
85
|
+
return `${prefix}${resolved}`;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return arg;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
exports.delegationArgs = delegationArgs;
|
|
92
|
+
/**
|
|
93
|
+
* Throws when the workspace's pinned plugin is too old for `command` (it would only print
|
|
94
|
+
* "Unknown command"). Unreadable versions are let through.
|
|
95
|
+
*/
|
|
96
|
+
function assertLocalSupports(command, localVersion, flags) {
|
|
97
|
+
const needs = [];
|
|
98
|
+
const min = exports.MIN_LOCAL_VERSION[command];
|
|
99
|
+
if (min)
|
|
100
|
+
needs.push([`pstack ${command}`, min]);
|
|
101
|
+
for (const [flag, v] of Object.entries(exports.MIN_LOCAL_FLAG_VERSION[command] ?? {})) {
|
|
102
|
+
if (flags && flags[flag] !== undefined && flags[flag] !== false) {
|
|
103
|
+
const kebab = flag.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
|
|
104
|
+
needs.push([`pstack ${command} --${kebab}`, v]);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
for (const [what, version] of needs) {
|
|
108
|
+
let cmp;
|
|
109
|
+
try {
|
|
110
|
+
cmp = (0, versions_1.compareVersions)(localVersion, version);
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (cmp < 0) {
|
|
116
|
+
throw new types_1.CliError(`${what} needs nx-polystack >= ${version} in this workspace (found ${localVersion}). ` +
|
|
117
|
+
'Run "pstack update" first.');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.assertLocalSupports = assertLocalSupports;
|
|
122
|
+
function real(p) {
|
|
123
|
+
try {
|
|
124
|
+
return fs.realpathSync(p);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return path.resolve(p);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function shouldDelegate(i) {
|
|
131
|
+
if (!i.local)
|
|
132
|
+
return false;
|
|
133
|
+
if (i.env['PSTACK_DELEGATED'] === '1')
|
|
134
|
+
return false;
|
|
135
|
+
if (exports.NEVER_DELEGATE.has(i.command))
|
|
136
|
+
return false;
|
|
137
|
+
if (i.flags['help'] || i.flags['h'] || i.flags['version'] || i.flags['v'])
|
|
138
|
+
return false;
|
|
139
|
+
return real(i.local.root) !== real(i.selfRoot);
|
|
140
|
+
}
|
|
141
|
+
exports.shouldDelegate = shouldDelegate;
|
|
142
|
+
/** Run another pstack CLI with the given args; returns its exit code. */
|
|
143
|
+
function delegate(cliPath, args, cwd) {
|
|
144
|
+
const r = (0, child_process_1.spawnSync)(process.execPath, [cliPath, ...args], {
|
|
145
|
+
cwd,
|
|
146
|
+
stdio: 'inherit',
|
|
147
|
+
env: { ...process.env, PSTACK_DELEGATED: '1' },
|
|
148
|
+
});
|
|
149
|
+
if (r.error)
|
|
150
|
+
throw r.error;
|
|
151
|
+
return r.status ?? 1;
|
|
152
|
+
}
|
|
153
|
+
exports.delegate = delegate;
|
|
154
|
+
function upgradeHint(localVersion, selfVersion) {
|
|
155
|
+
let cmp;
|
|
156
|
+
try {
|
|
157
|
+
cmp = (0, versions_1.compareVersions)(localVersion, selfVersion);
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
if (cmp >= 0)
|
|
163
|
+
return null;
|
|
164
|
+
return (`pstack: workspace uses nx-polystack v${localVersion}, global CLI is v${selfVersion} — ` +
|
|
165
|
+
`run "pstack update" to upgrade.`);
|
|
166
|
+
}
|
|
167
|
+
exports.upgradeHint = upgradeHint;
|
|
168
|
+
//# sourceMappingURL=launcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher.js","sourceRoot":"","sources":["../../../src/cli/launcher.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface ManifestEntry {
|
|
2
|
+
version: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
implementation?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MigrationsManifest {
|
|
7
|
+
generators?: Record<string, ManifestEntry>;
|
|
8
|
+
}
|
|
9
|
+
export interface MigrationEntry {
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Path relative to the manifest directory. */
|
|
14
|
+
implementation: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MigrationResult {
|
|
17
|
+
applied: string[];
|
|
18
|
+
failed?: {
|
|
19
|
+
name: string;
|
|
20
|
+
error: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare function selectMigrations(manifest: MigrationsManifest, from: string, to: string): MigrationEntry[];
|
|
24
|
+
export declare function runMigrations(entries: MigrationEntry[], runOne: (e: MigrationEntry) => Promise<void>): Promise<MigrationResult>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runMigrations = exports.selectMigrations = void 0;
|
|
4
|
+
const versions_1 = require("./versions");
|
|
5
|
+
function selectMigrations(manifest, from, to) {
|
|
6
|
+
return Object.entries(manifest.generators ?? {})
|
|
7
|
+
.filter(([, e]) => !!e.implementation)
|
|
8
|
+
.filter(([, e]) => (0, versions_1.compareVersions)(e.version, from) > 0 && (0, versions_1.compareVersions)(e.version, to) <= 0)
|
|
9
|
+
.map(([name, e]) => ({
|
|
10
|
+
name,
|
|
11
|
+
version: e.version,
|
|
12
|
+
description: e.description,
|
|
13
|
+
implementation: e.implementation,
|
|
14
|
+
}))
|
|
15
|
+
.sort((a, b) => (0, versions_1.compareVersions)(a.version, b.version) || a.name.localeCompare(b.name));
|
|
16
|
+
}
|
|
17
|
+
exports.selectMigrations = selectMigrations;
|
|
18
|
+
async function runMigrations(entries, runOne) {
|
|
19
|
+
const applied = [];
|
|
20
|
+
for (const e of entries) {
|
|
21
|
+
try {
|
|
22
|
+
await runOne(e);
|
|
23
|
+
applied.push(e.name);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
return {
|
|
27
|
+
applied,
|
|
28
|
+
failed: { name: e.name, error: err instanceof Error ? err.message : String(err) },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return { applied };
|
|
33
|
+
}
|
|
34
|
+
exports.runMigrations = runMigrations;
|
|
35
|
+
//# sourceMappingURL=migrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/cli/migrations.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAyB7C,SAAgB,gBAAgB,CAC9B,QAA4B,EAC5B,IAAY,EACZ,EAAU;IAEV,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC;SAC7C,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;SACrC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,0BAAe,EAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,IAAA,0BAAe,EAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;SAC9F,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnB,IAAI;QACJ,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,cAAc,EAAE,CAAC,CAAC,cAAwB;KAC3C,CAAC,CAAC;SACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,0BAAe,EAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3F,CAAC;AAfD,4CAeC;AAEM,KAAK,UAAU,aAAa,CACjC,OAAyB,EACzB,MAA4C;IAE5C,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI;YACF,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC;YAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACtB;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO;gBACL,OAAO;gBACP,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;aAClF,CAAC;SACH;KACF;IACD,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC;AAjBD,sCAiBC"}
|