@allstak/wizard 0.1.3
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/CHANGELOG.md +90 -0
- package/README.md +79 -0
- package/dist/api/auth-client.d.ts +22 -0
- package/dist/api/auth-client.d.ts.map +1 -0
- package/dist/api/auth-client.js +65 -0
- package/dist/api/auth-client.js.map +1 -0
- package/dist/api/auth.d.ts +39 -0
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +69 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/client.d.ts +15 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +19 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/http.d.ts +44 -0
- package/dist/api/http.d.ts.map +1 -0
- package/dist/api/http.js +130 -0
- package/dist/api/http.js.map +1 -0
- package/dist/api/index.d.ts +12 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +12 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/orgs-client.d.ts +16 -0
- package/dist/api/orgs-client.d.ts.map +1 -0
- package/dist/api/orgs-client.js +36 -0
- package/dist/api/orgs-client.js.map +1 -0
- package/dist/api/projects-client.d.ts +27 -0
- package/dist/api/projects-client.d.ts.map +1 -0
- package/dist/api/projects-client.js +58 -0
- package/dist/api/projects-client.js.map +1 -0
- package/dist/api/setup-doctor-client.d.ts +31 -0
- package/dist/api/setup-doctor-client.d.ts.map +1 -0
- package/dist/api/setup-doctor-client.js +68 -0
- package/dist/api/setup-doctor-client.js.map +1 -0
- package/dist/api/types.d.ts +92 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +9 -0
- package/dist/api/types.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +303 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/_context.d.ts +37 -0
- package/dist/commands/_context.d.ts.map +1 -0
- package/dist/commands/_context.js +61 -0
- package/dist/commands/_context.js.map +1 -0
- package/dist/commands/config-cmd.d.ts +24 -0
- package/dist/commands/config-cmd.d.ts.map +1 -0
- package/dist/commands/config-cmd.js +137 -0
- package/dist/commands/config-cmd.js.map +1 -0
- package/dist/commands/doctor.d.ts +58 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +389 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +28 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +157 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +14 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/login.d.ts +27 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +116 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +15 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +36 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/orgs.d.ts +14 -0
- package/dist/commands/orgs.d.ts.map +1 -0
- package/dist/commands/orgs.js +39 -0
- package/dist/commands/orgs.js.map +1 -0
- package/dist/commands/projects.d.ts +21 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +86 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/repair.d.ts +12 -0
- package/dist/commands/repair.d.ts.map +1 -0
- package/dist/commands/repair.js +45 -0
- package/dist/commands/repair.js.map +1 -0
- package/dist/commands/restore.d.ts +32 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +120 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/uninstall.d.ts +13 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +53 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/whoami.d.ts +13 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +54 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/compat/engine.d.ts +31 -0
- package/dist/compat/engine.d.ts.map +1 -0
- package/dist/compat/engine.js +82 -0
- package/dist/compat/engine.js.map +1 -0
- package/dist/config/define.d.ts +21 -0
- package/dist/config/define.d.ts.map +1 -0
- package/dist/config/define.js +22 -0
- package/dist/config/define.js.map +1 -0
- package/dist/config/index.d.ts +6 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +6 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/loader.d.ts +26 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +84 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/migrations.d.ts +64 -0
- package/dist/config/migrations.d.ts.map +1 -0
- package/dist/config/migrations.js +66 -0
- package/dist/config/migrations.js.map +1 -0
- package/dist/config/precedence.d.ts +24 -0
- package/dist/config/precedence.d.ts.map +1 -0
- package/dist/config/precedence.js +55 -0
- package/dist/config/precedence.js.map +1 -0
- package/dist/config/schema.d.ts +10 -0
- package/dist/config/schema.d.ts.map +1 -0
- package/dist/config/schema.js +140 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/config/types.d.ts +80 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +23 -0
- package/dist/config/types.js.map +1 -0
- package/dist/credentials/encrypted-file.d.ts +3 -0
- package/dist/credentials/encrypted-file.d.ts.map +1 -0
- package/dist/credentials/encrypted-file.js +139 -0
- package/dist/credentials/encrypted-file.js.map +1 -0
- package/dist/credentials/error.d.ts +11 -0
- package/dist/credentials/error.d.ts.map +1 -0
- package/dist/credentials/error.js +14 -0
- package/dist/credentials/error.js.map +1 -0
- package/dist/credentials/index.d.ts +20 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +56 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/credentials/keychain-darwin.d.ts +11 -0
- package/dist/credentials/keychain-darwin.d.ts.map +1 -0
- package/dist/credentials/keychain-darwin.js +88 -0
- package/dist/credentials/keychain-darwin.js.map +1 -0
- package/dist/credentials/keychain-linux.d.ts +13 -0
- package/dist/credentials/keychain-linux.d.ts.map +1 -0
- package/dist/credentials/keychain-linux.js +88 -0
- package/dist/credentials/keychain-linux.js.map +1 -0
- package/dist/credentials/keychain-win.d.ts +13 -0
- package/dist/credentials/keychain-win.d.ts.map +1 -0
- package/dist/credentials/keychain-win.js +31 -0
- package/dist/credentials/keychain-win.js.map +1 -0
- package/dist/credentials/types.d.ts +38 -0
- package/dist/credentials/types.d.ts.map +1 -0
- package/dist/credentials/types.js +5 -0
- package/dist/credentials/types.js.map +1 -0
- package/dist/detect/framework.d.ts +28 -0
- package/dist/detect/framework.d.ts.map +1 -0
- package/dist/detect/framework.js +131 -0
- package/dist/detect/framework.js.map +1 -0
- package/dist/detect/index.d.ts +4 -0
- package/dist/detect/index.d.ts.map +1 -0
- package/dist/detect/index.js +4 -0
- package/dist/detect/index.js.map +1 -0
- package/dist/detect/monorepo.d.ts +10 -0
- package/dist/detect/monorepo.d.ts.map +1 -0
- package/dist/detect/monorepo.js +42 -0
- package/dist/detect/monorepo.js.map +1 -0
- package/dist/detect/package-manager.d.ts +18 -0
- package/dist/detect/package-manager.d.ts.map +1 -0
- package/dist/detect/package-manager.js +60 -0
- package/dist/detect/package-manager.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/_scaffold.d.ts +23 -0
- package/dist/integrations/_scaffold.d.ts.map +1 -0
- package/dist/integrations/_scaffold.js +62 -0
- package/dist/integrations/_scaffold.js.map +1 -0
- package/dist/integrations/_shared.d.ts +18 -0
- package/dist/integrations/_shared.d.ts.map +1 -0
- package/dist/integrations/_shared.js +73 -0
- package/dist/integrations/_shared.js.map +1 -0
- package/dist/integrations/_simple-scaffold.d.ts +19 -0
- package/dist/integrations/_simple-scaffold.d.ts.map +1 -0
- package/dist/integrations/_simple-scaffold.js +23 -0
- package/dist/integrations/_simple-scaffold.js.map +1 -0
- package/dist/integrations/dotnet.d.ts +2 -0
- package/dist/integrations/dotnet.d.ts.map +1 -0
- package/dist/integrations/dotnet.js +9 -0
- package/dist/integrations/dotnet.js.map +1 -0
- package/dist/integrations/expo.d.ts +2 -0
- package/dist/integrations/expo.d.ts.map +1 -0
- package/dist/integrations/expo.js +12 -0
- package/dist/integrations/expo.js.map +1 -0
- package/dist/integrations/fastify.d.ts +2 -0
- package/dist/integrations/fastify.d.ts.map +1 -0
- package/dist/integrations/fastify.js +10 -0
- package/dist/integrations/fastify.js.map +1 -0
- package/dist/integrations/flutter.d.ts +2 -0
- package/dist/integrations/flutter.d.ts.map +1 -0
- package/dist/integrations/flutter.js +9 -0
- package/dist/integrations/flutter.js.map +1 -0
- package/dist/integrations/go.d.ts +2 -0
- package/dist/integrations/go.d.ts.map +1 -0
- package/dist/integrations/go.js +9 -0
- package/dist/integrations/go.js.map +1 -0
- package/dist/integrations/java.d.ts +2 -0
- package/dist/integrations/java.d.ts.map +1 -0
- package/dist/integrations/java.js +9 -0
- package/dist/integrations/java.js.map +1 -0
- package/dist/integrations/js/detect.d.ts +3 -0
- package/dist/integrations/js/detect.d.ts.map +1 -0
- package/dist/integrations/js/detect.js +7 -0
- package/dist/integrations/js/detect.js.map +1 -0
- package/dist/integrations/js/doctor.d.ts +3 -0
- package/dist/integrations/js/doctor.d.ts.map +1 -0
- package/dist/integrations/js/doctor.js +38 -0
- package/dist/integrations/js/doctor.js.map +1 -0
- package/dist/integrations/js/files.d.ts +3 -0
- package/dist/integrations/js/files.d.ts.map +1 -0
- package/dist/integrations/js/files.js +19 -0
- package/dist/integrations/js/files.js.map +1 -0
- package/dist/integrations/js/index.d.ts +3 -0
- package/dist/integrations/js/index.d.ts.map +1 -0
- package/dist/integrations/js/index.js +25 -0
- package/dist/integrations/js/index.js.map +1 -0
- package/dist/integrations/js/manifest.d.ts +3 -0
- package/dist/integrations/js/manifest.d.ts.map +1 -0
- package/dist/integrations/js/manifest.js +19 -0
- package/dist/integrations/js/manifest.js.map +1 -0
- package/dist/integrations/js/patch.d.ts +4 -0
- package/dist/integrations/js/patch.d.ts.map +1 -0
- package/dist/integrations/js/patch.js +24 -0
- package/dist/integrations/js/patch.js.map +1 -0
- package/dist/integrations/js/uninstall.d.ts +4 -0
- package/dist/integrations/js/uninstall.d.ts.map +1 -0
- package/dist/integrations/js/uninstall.js +16 -0
- package/dist/integrations/js/uninstall.js.map +1 -0
- package/dist/integrations/nestjs.d.ts +2 -0
- package/dist/integrations/nestjs.d.ts.map +1 -0
- package/dist/integrations/nestjs.js +10 -0
- package/dist/integrations/nestjs.js.map +1 -0
- package/dist/integrations/next/detect.d.ts +3 -0
- package/dist/integrations/next/detect.d.ts.map +1 -0
- package/dist/integrations/next/detect.js +11 -0
- package/dist/integrations/next/detect.js.map +1 -0
- package/dist/integrations/next/doctor.d.ts +3 -0
- package/dist/integrations/next/doctor.d.ts.map +1 -0
- package/dist/integrations/next/doctor.js +46 -0
- package/dist/integrations/next/doctor.js.map +1 -0
- package/dist/integrations/next/files.d.ts +3 -0
- package/dist/integrations/next/files.d.ts.map +1 -0
- package/dist/integrations/next/files.js +19 -0
- package/dist/integrations/next/files.js.map +1 -0
- package/dist/integrations/next/index.d.ts +3 -0
- package/dist/integrations/next/index.d.ts.map +1 -0
- package/dist/integrations/next/index.js +44 -0
- package/dist/integrations/next/index.js.map +1 -0
- package/dist/integrations/next/manifest.d.ts +3 -0
- package/dist/integrations/next/manifest.d.ts.map +1 -0
- package/dist/integrations/next/manifest.js +29 -0
- package/dist/integrations/next/manifest.js.map +1 -0
- package/dist/integrations/next/patch.d.ts +4 -0
- package/dist/integrations/next/patch.d.ts.map +1 -0
- package/dist/integrations/next/patch.js +49 -0
- package/dist/integrations/next/patch.js.map +1 -0
- package/dist/integrations/next/uninstall.d.ts +4 -0
- package/dist/integrations/next/uninstall.d.ts.map +1 -0
- package/dist/integrations/next/uninstall.js +22 -0
- package/dist/integrations/next/uninstall.js.map +1 -0
- package/dist/integrations/otel.d.ts +2 -0
- package/dist/integrations/otel.d.ts.map +1 -0
- package/dist/integrations/otel.js +10 -0
- package/dist/integrations/otel.js.map +1 -0
- package/dist/integrations/php.d.ts +2 -0
- package/dist/integrations/php.d.ts.map +1 -0
- package/dist/integrations/php.js +9 -0
- package/dist/integrations/php.js.map +1 -0
- package/dist/integrations/python.d.ts +2 -0
- package/dist/integrations/python.d.ts.map +1 -0
- package/dist/integrations/python.js +9 -0
- package/dist/integrations/python.js.map +1 -0
- package/dist/integrations/react/detect.d.ts +3 -0
- package/dist/integrations/react/detect.d.ts.map +1 -0
- package/dist/integrations/react/detect.js +11 -0
- package/dist/integrations/react/detect.js.map +1 -0
- package/dist/integrations/react/doctor.d.ts +3 -0
- package/dist/integrations/react/doctor.d.ts.map +1 -0
- package/dist/integrations/react/doctor.js +65 -0
- package/dist/integrations/react/doctor.js.map +1 -0
- package/dist/integrations/react/files.d.ts +4 -0
- package/dist/integrations/react/files.d.ts.map +1 -0
- package/dist/integrations/react/files.js +24 -0
- package/dist/integrations/react/files.js.map +1 -0
- package/dist/integrations/react/index.d.ts +17 -0
- package/dist/integrations/react/index.d.ts.map +1 -0
- package/dist/integrations/react/index.js +62 -0
- package/dist/integrations/react/index.js.map +1 -0
- package/dist/integrations/react/manifest.d.ts +3 -0
- package/dist/integrations/react/manifest.d.ts.map +1 -0
- package/dist/integrations/react/manifest.js +31 -0
- package/dist/integrations/react/manifest.js.map +1 -0
- package/dist/integrations/react/patch.d.ts +4 -0
- package/dist/integrations/react/patch.d.ts.map +1 -0
- package/dist/integrations/react/patch.js +39 -0
- package/dist/integrations/react/patch.js.map +1 -0
- package/dist/integrations/react/uninstall.d.ts +4 -0
- package/dist/integrations/react/uninstall.d.ts.map +1 -0
- package/dist/integrations/react/uninstall.js +21 -0
- package/dist/integrations/react/uninstall.js.map +1 -0
- package/dist/integrations/react-native.d.ts +10 -0
- package/dist/integrations/react-native.d.ts.map +1 -0
- package/dist/integrations/react-native.js +57 -0
- package/dist/integrations/react-native.js.map +1 -0
- package/dist/integrations/ruby.d.ts +2 -0
- package/dist/integrations/ruby.d.ts.map +1 -0
- package/dist/integrations/ruby.js +9 -0
- package/dist/integrations/ruby.js.map +1 -0
- package/dist/lifecycle/hooks.d.ts +42 -0
- package/dist/lifecycle/hooks.d.ts.map +1 -0
- package/dist/lifecycle/hooks.js +43 -0
- package/dist/lifecycle/hooks.js.map +1 -0
- package/dist/migrations/builtin/dsn-to-api-key.d.ts +3 -0
- package/dist/migrations/builtin/dsn-to-api-key.d.ts.map +1 -0
- package/dist/migrations/builtin/dsn-to-api-key.js +59 -0
- package/dist/migrations/builtin/dsn-to-api-key.js.map +1 -0
- package/dist/migrations/engine.d.ts +52 -0
- package/dist/migrations/engine.d.ts.map +1 -0
- package/dist/migrations/engine.js +46 -0
- package/dist/migrations/engine.js.map +1 -0
- package/dist/migrations/index.d.ts +3 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +11 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/output/human.d.ts +20 -0
- package/dist/output/human.d.ts.map +1 -0
- package/dist/output/human.js +77 -0
- package/dist/output/human.js.map +1 -0
- package/dist/output/index.d.ts +6 -0
- package/dist/output/index.d.ts.map +1 -0
- package/dist/output/index.js +8 -0
- package/dist/output/index.js.map +1 -0
- package/dist/output/json.d.ts +20 -0
- package/dist/output/json.d.ts.map +1 -0
- package/dist/output/json.js +60 -0
- package/dist/output/json.js.map +1 -0
- package/dist/output/types.d.ts +36 -0
- package/dist/output/types.d.ts.map +1 -0
- package/dist/output/types.js +2 -0
- package/dist/output/types.js.map +1 -0
- package/dist/patchers/env-file.d.ts +21 -0
- package/dist/patchers/env-file.d.ts.map +1 -0
- package/dist/patchers/env-file.js +77 -0
- package/dist/patchers/env-file.js.map +1 -0
- package/dist/patchers/js-ast.d.ts +29 -0
- package/dist/patchers/js-ast.d.ts.map +1 -0
- package/dist/patchers/js-ast.js +71 -0
- package/dist/patchers/js-ast.js.map +1 -0
- package/dist/patchers/json-file.d.ts +19 -0
- package/dist/patchers/json-file.d.ts.map +1 -0
- package/dist/patchers/json-file.js +41 -0
- package/dist/patchers/json-file.js.map +1 -0
- package/dist/patchers/markers.d.ts +28 -0
- package/dist/patchers/markers.d.ts.map +1 -0
- package/dist/patchers/markers.js +49 -0
- package/dist/patchers/markers.js.map +1 -0
- package/dist/patchers/source-block.d.ts +24 -0
- package/dist/patchers/source-block.d.ts.map +1 -0
- package/dist/patchers/source-block.js +40 -0
- package/dist/patchers/source-block.js.map +1 -0
- package/dist/registry/index.d.ts +5 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +42 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/manifest.d.ts +78 -0
- package/dist/registry/manifest.d.ts.map +1 -0
- package/dist/registry/manifest.js +2 -0
- package/dist/registry/manifest.js.map +1 -0
- package/dist/registry/registry.d.ts +14 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +29 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/registry/types.d.ts +78 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +2 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/snapshot/restore.d.ts +41 -0
- package/dist/snapshot/restore.d.ts.map +1 -0
- package/dist/snapshot/restore.js +110 -0
- package/dist/snapshot/restore.js.map +1 -0
- package/dist/snapshot/store.d.ts +105 -0
- package/dist/snapshot/store.d.ts.map +1 -0
- package/dist/snapshot/store.js +162 -0
- package/dist/snapshot/store.js.map +1 -0
- package/dist/sourcemaps/index.d.ts +3 -0
- package/dist/sourcemaps/index.d.ts.map +1 -0
- package/dist/sourcemaps/index.js +17 -0
- package/dist/sourcemaps/index.js.map +1 -0
- package/dist/sourcemaps/metro.d.ts +11 -0
- package/dist/sourcemaps/metro.d.ts.map +1 -0
- package/dist/sourcemaps/metro.js +31 -0
- package/dist/sourcemaps/metro.js.map +1 -0
- package/dist/sourcemaps/next.d.ts +3 -0
- package/dist/sourcemaps/next.d.ts.map +1 -0
- package/dist/sourcemaps/next.js +46 -0
- package/dist/sourcemaps/next.js.map +1 -0
- package/dist/sourcemaps/provider.d.ts +51 -0
- package/dist/sourcemaps/provider.d.ts.map +1 -0
- package/dist/sourcemaps/provider.js +29 -0
- package/dist/sourcemaps/provider.js.map +1 -0
- package/dist/sourcemaps/vite.d.ts +3 -0
- package/dist/sourcemaps/vite.d.ts.map +1 -0
- package/dist/sourcemaps/vite.js +60 -0
- package/dist/sourcemaps/vite.js.map +1 -0
- package/dist/sourcemaps/webpack.d.ts +8 -0
- package/dist/sourcemaps/webpack.d.ts.map +1 -0
- package/dist/sourcemaps/webpack.js +52 -0
- package/dist/sourcemaps/webpack.js.map +1 -0
- package/dist/telemetry/cli-wrap.d.ts +22 -0
- package/dist/telemetry/cli-wrap.d.ts.map +1 -0
- package/dist/telemetry/cli-wrap.js +53 -0
- package/dist/telemetry/cli-wrap.js.map +1 -0
- package/dist/telemetry/http-provider.d.ts +28 -0
- package/dist/telemetry/http-provider.d.ts.map +1 -0
- package/dist/telemetry/http-provider.js +24 -0
- package/dist/telemetry/http-provider.js.map +1 -0
- package/dist/telemetry/index.d.ts +7 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +6 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/install-id.d.ts +3 -0
- package/dist/telemetry/install-id.d.ts.map +1 -0
- package/dist/telemetry/install-id.js +46 -0
- package/dist/telemetry/install-id.js.map +1 -0
- package/dist/telemetry/payload.d.ts +82 -0
- package/dist/telemetry/payload.d.ts.map +1 -0
- package/dist/telemetry/payload.js +82 -0
- package/dist/telemetry/payload.js.map +1 -0
- package/dist/telemetry/provider.d.ts +32 -0
- package/dist/telemetry/provider.d.ts.map +1 -0
- package/dist/telemetry/provider.js +30 -0
- package/dist/telemetry/provider.js.map +1 -0
- package/dist/telemetry/runtime.d.ts +29 -0
- package/dist/telemetry/runtime.d.ts.map +1 -0
- package/dist/telemetry/runtime.js +44 -0
- package/dist/telemetry/runtime.js.map +1 -0
- package/dist/transaction/tx.d.ts +58 -0
- package/dist/transaction/tx.d.ts.map +1 -0
- package/dist/transaction/tx.js +170 -0
- package/dist/transaction/tx.js.map +1 -0
- package/dist/util/error-codes.d.ts +29 -0
- package/dist/util/error-codes.d.ts.map +1 -0
- package/dist/util/error-codes.js +192 -0
- package/dist/util/error-codes.js.map +1 -0
- package/dist/util/errors.d.ts +83 -0
- package/dist/util/errors.d.ts.map +1 -0
- package/dist/util/errors.js +110 -0
- package/dist/util/errors.js.map +1 -0
- package/dist/util/log.d.ts +11 -0
- package/dist/util/log.d.ts.map +1 -0
- package/dist/util/log.js +18 -0
- package/dist/util/log.js.map +1 -0
- package/dist/util/paths.d.ts +3 -0
- package/dist/util/paths.d.ts.map +1 -0
- package/dist/util/paths.js +31 -0
- package/dist/util/paths.js.map +1 -0
- package/dist/util/version.d.ts +15 -0
- package/dist/util/version.d.ts.map +1 -0
- package/dist/util/version.js +40 -0
- package/dist/util/version.js.map +1 -0
- package/dist/util/wizard-version.d.ts +6 -0
- package/dist/util/wizard-version.d.ts.map +1 -0
- package/dist/util/wizard-version.js +6 -0
- package/dist/util/wizard-version.js.map +1 -0
- package/docs/architecture/README.md +58 -0
- package/docs/architecture/dry-run.md +34 -0
- package/docs/architecture/integration-lifecycle.md +77 -0
- package/docs/architecture/patch-pipeline.md +58 -0
- package/docs/architecture/registry.md +52 -0
- package/docs/architecture/rollback.md +47 -0
- package/docs/architecture/sourcemaps.md +53 -0
- package/docs/architecture/stability-levels.md +35 -0
- package/docs/architecture/transaction.md +51 -0
- package/docs/architecture/v02-bare-react-native-spec.md +92 -0
- package/docs/architecture/v02-java-host-fix-spec.md +125 -0
- package/docs/architecture/v02-sourcemaps-e2e-spec.md +157 -0
- package/package.json +98 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { runInit } from './commands/init.js';
|
|
4
|
+
import { runDoctor } from './commands/doctor.js';
|
|
5
|
+
import { runRepair } from './commands/repair.js';
|
|
6
|
+
import { runUninstall } from './commands/uninstall.js';
|
|
7
|
+
import { runList } from './commands/list.js';
|
|
8
|
+
import { runLogin } from './commands/login.js';
|
|
9
|
+
import { runLogout } from './commands/logout.js';
|
|
10
|
+
import { runWhoami } from './commands/whoami.js';
|
|
11
|
+
import { runOrgsList } from './commands/orgs.js';
|
|
12
|
+
import { runProjectsList, runProjectsCreate } from './commands/projects.js';
|
|
13
|
+
import { restoreList, restoreShow, restoreApply, restoreDiff } from './commands/restore.js';
|
|
14
|
+
import { runConfigValidate, runConfigMigrate } from './commands/config-cmd.js';
|
|
15
|
+
import { setDebug, log } from './util/log.js';
|
|
16
|
+
import { toWizardError } from './util/errors.js';
|
|
17
|
+
import { createReporter } from './output/index.js';
|
|
18
|
+
import { WIZARD_VERSION } from './util/wizard-version.js';
|
|
19
|
+
import { DEFAULT_API_HOST } from './config/index.js';
|
|
20
|
+
import { withTelemetry } from './telemetry/cli-wrap.js';
|
|
21
|
+
function telemetryFlagsFor(parent) {
|
|
22
|
+
const opts = parent.optsWithGlobals();
|
|
23
|
+
return {
|
|
24
|
+
cliDisabled: opts.noTelemetry === true || opts.telemetry === false,
|
|
25
|
+
debug: opts.telemetryDebug === true,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const program = new Command();
|
|
29
|
+
program
|
|
30
|
+
.name('allstak-wizard')
|
|
31
|
+
.description('AllStak unified SDK installation and configuration wizard')
|
|
32
|
+
.version(WIZARD_VERSION)
|
|
33
|
+
.option('--debug', 'enable verbose debug logging')
|
|
34
|
+
.option('--json', 'emit machine-readable JSON output on stdout (status text goes to stderr)')
|
|
35
|
+
.option('--no-telemetry', 'disable anonymous usage telemetry for this run')
|
|
36
|
+
.option('--telemetry-debug', 'print the telemetry payload to stderr without sending it')
|
|
37
|
+
.hook('preAction', (thisCommand) => {
|
|
38
|
+
if (thisCommand.opts().debug)
|
|
39
|
+
setDebug(true);
|
|
40
|
+
});
|
|
41
|
+
function reporterFor(parent) {
|
|
42
|
+
const json = parent.optsWithGlobals().json === true || parent.opts().json === true;
|
|
43
|
+
return createReporter(json ? 'json' : 'human');
|
|
44
|
+
}
|
|
45
|
+
// ─── init / doctor / repair / uninstall (project-level commands) ────────────
|
|
46
|
+
program
|
|
47
|
+
.command('init', { isDefault: true })
|
|
48
|
+
.description('Install and configure an AllStak SDK in the current project')
|
|
49
|
+
.option('-i, --integration <id>', 'integration id (react, next, js, expo, ...)')
|
|
50
|
+
.option('--api-key <key>', 'AllStak project API key (overrides ALLSTAK_API_KEY)')
|
|
51
|
+
.option('--org <slug>', 'AllStak organisation slug')
|
|
52
|
+
.option('--project <slug>', 'AllStak project slug')
|
|
53
|
+
.option('--environment <env>', 'environment name (default: production)')
|
|
54
|
+
.option('--release <release>', 'release identifier')
|
|
55
|
+
.option('--host <url>', 'AllStak control-plane API host (default: https://api.allstak.sa)')
|
|
56
|
+
.option('--dashboard-host <url>', 'AllStak dashboard host')
|
|
57
|
+
.option('--ingest-host <url>', 'AllStak ingest endpoint')
|
|
58
|
+
.option('--dry-run', 'show planned changes without writing anything', false)
|
|
59
|
+
.option('--experimental', 'allow experimental integrations to run', false)
|
|
60
|
+
.option('--skip-deps', 'skip package install (config-only run)', false)
|
|
61
|
+
.option('--skip-source-maps', 'skip source-map plugin wiring', false)
|
|
62
|
+
.option('-y, --yes', 'skip interactive confirmation', false)
|
|
63
|
+
.option('--snapshot-keep <n>', 'persistent snapshot retention count', '10')
|
|
64
|
+
.action(async (opts, cmd) => {
|
|
65
|
+
await withTelemetry({ command: 'init', integration: opts.integration ?? null, ...telemetryFlagsFor(cmd.parent) }, () => runInit({
|
|
66
|
+
integration: opts.integration,
|
|
67
|
+
apiKey: opts.apiKey,
|
|
68
|
+
org: opts.org,
|
|
69
|
+
project: opts.project,
|
|
70
|
+
environment: opts.environment,
|
|
71
|
+
release: opts.release ?? null,
|
|
72
|
+
host: opts.host,
|
|
73
|
+
dashboardHost: opts.dashboardHost,
|
|
74
|
+
ingestHost: opts.ingestHost,
|
|
75
|
+
dryRun: opts.dryRun,
|
|
76
|
+
experimental: opts.experimental,
|
|
77
|
+
skipDeps: opts.skipDeps,
|
|
78
|
+
skipSourceMaps: opts.skipSourceMaps,
|
|
79
|
+
yes: opts.yes,
|
|
80
|
+
snapshotKeep: Number(opts.snapshotKeep),
|
|
81
|
+
reporter: reporterFor(cmd.parent),
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
program
|
|
85
|
+
.command('doctor')
|
|
86
|
+
.description('Diagnose the current AllStak setup (read-only with optional --live-probe)')
|
|
87
|
+
.option('-i, --integration <id>', 'integration id to check')
|
|
88
|
+
.option('--api-key <key>', 'AllStak API key (required for --live-probe)')
|
|
89
|
+
.option('--host <url>', 'AllStak host')
|
|
90
|
+
.option('--live-probe', 'send a real test event and verify ingestion', false)
|
|
91
|
+
.option('--project-id <uuid>', 'project UUID (required for --live-probe)')
|
|
92
|
+
.option('--live-probe-timeout <ms>', 'live-probe poll timeout in ms', '60000')
|
|
93
|
+
.action(async (opts, cmd) => {
|
|
94
|
+
await withTelemetry({ command: 'doctor', integration: opts.integration ?? null, ...telemetryFlagsFor(cmd.parent) }, () => runDoctor({
|
|
95
|
+
integration: opts.integration,
|
|
96
|
+
apiKey: opts.apiKey,
|
|
97
|
+
host: opts.host,
|
|
98
|
+
liveProbe: opts.liveProbe,
|
|
99
|
+
projectId: opts.projectId,
|
|
100
|
+
liveProbeTimeoutMs: Number(opts.liveProbeTimeout),
|
|
101
|
+
reporter: reporterFor(cmd.parent),
|
|
102
|
+
}));
|
|
103
|
+
});
|
|
104
|
+
program
|
|
105
|
+
.command('repair')
|
|
106
|
+
.description('Re-apply patches idempotently to fix drift')
|
|
107
|
+
.option('-i, --integration <id>', 'integration id to repair', 'react')
|
|
108
|
+
.option('--api-key <key>', 'AllStak API key (optional)')
|
|
109
|
+
.option('--host <url>', 'AllStak host')
|
|
110
|
+
.option('--dry-run', 'show planned changes only', false)
|
|
111
|
+
.action(async (opts, cmd) => {
|
|
112
|
+
await withTelemetry({ command: 'repair', integration: opts.integration, ...telemetryFlagsFor(cmd.parent) }, () => runRepair({
|
|
113
|
+
integration: opts.integration,
|
|
114
|
+
apiKey: opts.apiKey,
|
|
115
|
+
host: opts.host,
|
|
116
|
+
dryRun: opts.dryRun,
|
|
117
|
+
reporter: reporterFor(cmd.parent),
|
|
118
|
+
}));
|
|
119
|
+
});
|
|
120
|
+
program
|
|
121
|
+
.command('uninstall')
|
|
122
|
+
.description('Remove an AllStak integration cleanly')
|
|
123
|
+
.requiredOption('-i, --integration <id>', 'integration id to remove')
|
|
124
|
+
.option('-y, --yes', 'skip confirmation', false)
|
|
125
|
+
.option('--dry-run', 'show planned changes only', false)
|
|
126
|
+
.option('--skip-deps', 'do not run package-manager uninstall', false)
|
|
127
|
+
.action(async (opts, cmd) => {
|
|
128
|
+
await withTelemetry({ command: 'uninstall', integration: opts.integration, ...telemetryFlagsFor(cmd.parent) }, () => runUninstall({
|
|
129
|
+
integration: opts.integration,
|
|
130
|
+
yes: opts.yes,
|
|
131
|
+
dryRun: opts.dryRun,
|
|
132
|
+
skipDeps: opts.skipDeps,
|
|
133
|
+
reporter: reporterFor(cmd.parent),
|
|
134
|
+
}));
|
|
135
|
+
});
|
|
136
|
+
program
|
|
137
|
+
.command('list')
|
|
138
|
+
.description('List all registered integrations and their manifests')
|
|
139
|
+
.action(async (_opts, cmd) => {
|
|
140
|
+
await withTelemetry({ command: 'list', integration: null, ...telemetryFlagsFor(cmd.parent) }, async () => runList(reporterFor(cmd.parent)));
|
|
141
|
+
});
|
|
142
|
+
// ─── auth / user-level commands ─────────────────────────────────────────────
|
|
143
|
+
program
|
|
144
|
+
.command('login')
|
|
145
|
+
.description('Authenticate with AllStak (email OTP)')
|
|
146
|
+
.option('--host <url>', 'AllStak API host', DEFAULT_API_HOST)
|
|
147
|
+
.option('--email <email>', 'skip the email prompt')
|
|
148
|
+
.option('--code <code>', 'skip the OTP prompt (must be paired with --email)')
|
|
149
|
+
.option('--totp <code>', 'TOTP second-factor code')
|
|
150
|
+
.action(async (opts, cmd) => {
|
|
151
|
+
await withTelemetry({ command: 'login', integration: null, ...telemetryFlagsFor(cmd.parent) }, () => runLogin({
|
|
152
|
+
host: opts.host,
|
|
153
|
+
email: opts.email,
|
|
154
|
+
code: opts.code,
|
|
155
|
+
totp: opts.totp,
|
|
156
|
+
reporter: reporterFor(cmd.parent),
|
|
157
|
+
}));
|
|
158
|
+
});
|
|
159
|
+
program
|
|
160
|
+
.command('logout')
|
|
161
|
+
.description('Revoke the current session and clear local credentials')
|
|
162
|
+
.option('--host <url>', 'AllStak API host', DEFAULT_API_HOST)
|
|
163
|
+
.option('--local-only', 'skip the backend revocation call', false)
|
|
164
|
+
.action(async (opts, cmd) => {
|
|
165
|
+
await withTelemetry({ command: 'logout', integration: null, ...telemetryFlagsFor(cmd.parent) }, () => runLogout({
|
|
166
|
+
host: opts.host,
|
|
167
|
+
localOnly: opts.localOnly,
|
|
168
|
+
reporter: reporterFor(cmd.parent),
|
|
169
|
+
}));
|
|
170
|
+
});
|
|
171
|
+
program
|
|
172
|
+
.command('whoami')
|
|
173
|
+
.description('Show the currently logged-in user')
|
|
174
|
+
.option('--host <url>', 'AllStak API host', DEFAULT_API_HOST)
|
|
175
|
+
.option('--verify', 'round-trip the JWT through /auth/me', false)
|
|
176
|
+
.action(async (opts, cmd) => {
|
|
177
|
+
await withTelemetry({ command: 'whoami', integration: null, ...telemetryFlagsFor(cmd.parent) }, () => runWhoami({
|
|
178
|
+
host: opts.host,
|
|
179
|
+
verify: opts.verify,
|
|
180
|
+
reporter: reporterFor(cmd.parent),
|
|
181
|
+
}));
|
|
182
|
+
});
|
|
183
|
+
// ─── orgs / projects ────────────────────────────────────────────────────────
|
|
184
|
+
const orgsCmd = program.command('orgs').description('Manage organizations');
|
|
185
|
+
orgsCmd
|
|
186
|
+
.command('list')
|
|
187
|
+
.description('List organizations the current user belongs to')
|
|
188
|
+
.option('--host <url>', 'AllStak API host', DEFAULT_API_HOST)
|
|
189
|
+
.action(async (opts, cmd) => {
|
|
190
|
+
await withTelemetry({ command: 'orgs-list', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => runOrgsList({ host: opts.host, reporter: reporterFor(cmd.parent.parent) }));
|
|
191
|
+
});
|
|
192
|
+
const projectsCmd = program.command('projects').description('Manage projects');
|
|
193
|
+
projectsCmd
|
|
194
|
+
.command('list')
|
|
195
|
+
.description('List projects (optionally scoped to --org)')
|
|
196
|
+
.option('--host <url>', 'AllStak API host', DEFAULT_API_HOST)
|
|
197
|
+
.option('--org <orgId>', 'filter by organization id')
|
|
198
|
+
.action(async (opts, cmd) => {
|
|
199
|
+
await withTelemetry({ command: 'projects-list', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => runProjectsList({ host: opts.host, org: opts.org, reporter: reporterFor(cmd.parent.parent) }));
|
|
200
|
+
});
|
|
201
|
+
projectsCmd
|
|
202
|
+
.command('create')
|
|
203
|
+
.description('Create a project, optionally minting an API key')
|
|
204
|
+
.option('--host <url>', 'AllStak API host', DEFAULT_API_HOST)
|
|
205
|
+
.option('--org <orgId>', 'organization id (omit for personal workspace)')
|
|
206
|
+
.option('--name <name>', 'project name')
|
|
207
|
+
.option('--slug <slug>', 'URL-safe slug')
|
|
208
|
+
.option('--platform <platform>', 'platform tag (web, mobile, backend)')
|
|
209
|
+
.option('--with-api-key', 'mint an API key after creation', false)
|
|
210
|
+
.option('--api-key-name <name>', 'name for the minted key', 'wizard-default')
|
|
211
|
+
.action(async (opts, cmd) => {
|
|
212
|
+
await withTelemetry({ command: 'projects-create', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => runProjectsCreate({
|
|
213
|
+
host: opts.host,
|
|
214
|
+
org: opts.org,
|
|
215
|
+
name: opts.name,
|
|
216
|
+
slug: opts.slug,
|
|
217
|
+
platform: opts.platform,
|
|
218
|
+
withApiKey: opts.withApiKey,
|
|
219
|
+
apiKeyName: opts.apiKeyName,
|
|
220
|
+
reporter: reporterFor(cmd.parent.parent),
|
|
221
|
+
}));
|
|
222
|
+
});
|
|
223
|
+
// ─── restore ────────────────────────────────────────────────────────────────
|
|
224
|
+
const restoreCmd = program.command('restore').description('Manage persistent snapshots');
|
|
225
|
+
restoreCmd
|
|
226
|
+
.command('list')
|
|
227
|
+
.description('List all snapshots in .allstak-wizard/backups')
|
|
228
|
+
.action(async (_opts, cmd) => {
|
|
229
|
+
await withTelemetry({ command: 'restore-list', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => restoreList({ reporter: reporterFor(cmd.parent.parent) }));
|
|
230
|
+
});
|
|
231
|
+
restoreCmd
|
|
232
|
+
.command('show <id>')
|
|
233
|
+
.description('Show a snapshot manifest + diff vs current working tree (id is the slug or `latest`)')
|
|
234
|
+
.action(async (id, _opts, cmd) => {
|
|
235
|
+
await withTelemetry({ command: 'restore-show', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => restoreShow({ id, reporter: reporterFor(cmd.parent.parent) }));
|
|
236
|
+
});
|
|
237
|
+
restoreCmd
|
|
238
|
+
.command('apply <id>')
|
|
239
|
+
.description('Restore an entire snapshot (or specific files via --files)')
|
|
240
|
+
.option('--files <paths>', 'comma-separated project-relative paths to restore')
|
|
241
|
+
.option('--dry-run', 'show planned restore without writing', false)
|
|
242
|
+
.option('-y, --yes', 'skip confirmation', false)
|
|
243
|
+
.action(async (id, opts, cmd) => {
|
|
244
|
+
await withTelemetry({ command: 'restore-apply', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => restoreApply({
|
|
245
|
+
id,
|
|
246
|
+
files: opts.files ? String(opts.files).split(',').map((s) => s.trim()).filter(Boolean) : undefined,
|
|
247
|
+
dryRun: opts.dryRun,
|
|
248
|
+
yes: opts.yes,
|
|
249
|
+
reporter: reporterFor(cmd.parent.parent),
|
|
250
|
+
}));
|
|
251
|
+
});
|
|
252
|
+
restoreCmd
|
|
253
|
+
.command('diff <id>')
|
|
254
|
+
.description('Diff a snapshot against the current working tree')
|
|
255
|
+
.action(async (id, _opts, cmd) => {
|
|
256
|
+
await withTelemetry({ command: 'restore-diff', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => restoreDiff({ id, reporter: reporterFor(cmd.parent.parent) }));
|
|
257
|
+
});
|
|
258
|
+
// ─── config ─────────────────────────────────────────────────────────────────
|
|
259
|
+
const configCmd = program.command('config').description('Manage allstak.config.* schema');
|
|
260
|
+
configCmd
|
|
261
|
+
.command('validate')
|
|
262
|
+
.description('Validate the discovered allstak.config.* against the current schema')
|
|
263
|
+
.action(async (_opts, cmd) => {
|
|
264
|
+
await withTelemetry({ command: 'config-validate', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => runConfigValidate({ reporter: reporterFor(cmd.parent.parent) }));
|
|
265
|
+
});
|
|
266
|
+
configCmd
|
|
267
|
+
.command('migrate')
|
|
268
|
+
.description('Migrate an old config to the current schemaVersion (.json rewritten in place)')
|
|
269
|
+
.option('--dry-run', 'show planned changes without writing', false)
|
|
270
|
+
.action(async (opts, cmd) => {
|
|
271
|
+
await withTelemetry({ command: 'config-migrate', integration: null, ...telemetryFlagsFor(cmd.parent.parent) }, () => runConfigMigrate({ dryRun: opts.dryRun, reporter: reporterFor(cmd.parent.parent) }));
|
|
272
|
+
});
|
|
273
|
+
program.parseAsync(process.argv).catch((rawErr) => {
|
|
274
|
+
const wizErr = toWizardError(rawErr);
|
|
275
|
+
const wantJson = process.argv.includes('--json');
|
|
276
|
+
if (wantJson) {
|
|
277
|
+
const reporter = createReporter('json');
|
|
278
|
+
reporter.error(wizErr.code, wizErr.message);
|
|
279
|
+
reporter.finalize({
|
|
280
|
+
command: deriveCommandName(),
|
|
281
|
+
outcome: wizErr.code === 'E_USER_CANCELLED' ? 'cancelled' : 'failure',
|
|
282
|
+
durationMs: 0,
|
|
283
|
+
errorCode: wizErr.code,
|
|
284
|
+
data: { error: wizErr.toPublicJSON() },
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
log.error(`${wizErr.code}: ${wizErr.message}`);
|
|
289
|
+
if (wizErr.hint)
|
|
290
|
+
log.info(wizErr.hint);
|
|
291
|
+
if (wizErr.subcode && process.env.ALLSTAK_WIZARD_DEBUG === '1') {
|
|
292
|
+
log.debug(`subcode=${wizErr.subcode}`);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
process.exit(wizErr.code === 'E_USER_CANCELLED' ? 130 : 2);
|
|
296
|
+
});
|
|
297
|
+
function deriveCommandName() {
|
|
298
|
+
// Best-effort: the second positional argv (after the binary path) is the
|
|
299
|
+
// command, unless `init` was used as default.
|
|
300
|
+
const args = process.argv.slice(2).filter((a) => !a.startsWith('-'));
|
|
301
|
+
return args[0] ?? 'init';
|
|
302
|
+
}
|
|
303
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OA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ACb,SAAS,EAAE,MAAM,CAAC,IAAI;YACtB,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,IAAI;YAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,GAAG,EAAE,CAAC;YAC/D,GAAG,CAAC,KAAK,CAAC,WAAW,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC;AAEH,SAAS,iBAAiB;IACxB,yEAAyE;IACzE,8CAA8C;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { WizardContext } from '../registry/types.js';
|
|
2
|
+
import { type ResolvedWizardConfig } from '../config/index.js';
|
|
3
|
+
export interface BuildContextOptions {
|
|
4
|
+
cwd?: string;
|
|
5
|
+
apiKey?: string;
|
|
6
|
+
apiKeyOptional?: boolean;
|
|
7
|
+
org?: string;
|
|
8
|
+
project?: string;
|
|
9
|
+
environment?: string;
|
|
10
|
+
release?: string | null;
|
|
11
|
+
/** Maps to selfHosted.apiHost — control-plane API. */
|
|
12
|
+
host?: string;
|
|
13
|
+
dashboardHost?: string;
|
|
14
|
+
ingestHost?: string;
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
experimental?: boolean;
|
|
17
|
+
skipDeps?: boolean;
|
|
18
|
+
skipSourceMaps?: boolean;
|
|
19
|
+
snapshotKeep?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface BuiltContext {
|
|
22
|
+
ctx: WizardContext;
|
|
23
|
+
resolvedConfig: ResolvedWizardConfig;
|
|
24
|
+
/** Path of the loaded config file, or null if defaults / env / CLI only. */
|
|
25
|
+
configSource: string | null;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Shared context factory used by every command. Centralises:
|
|
29
|
+
* - project-root detection
|
|
30
|
+
* - framework detection
|
|
31
|
+
* - allstak.config.* discovery + load
|
|
32
|
+
* - precedence resolution: CLI > env > config > defaults
|
|
33
|
+
* - api-key resolution (with apiKeyOptional for read-only commands)
|
|
34
|
+
* - lifecycle emitter creation
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildContext(opts: BuildContextOptions): Promise<BuiltContext>;
|
|
37
|
+
//# sourceMappingURL=_context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_context.d.ts","sourceRoot":"","sources":["../../src/commands/_context.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAA6B,KAAK,oBAAoB,EAAkB,MAAM,oBAAoB,CAAC;AAE1G,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,aAAa,CAAC;IACnB,cAAc,EAAE,oBAAoB,CAAC;IACrC,4EAA4E;IAC5E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CA8CnF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { findProjectRoot } from '../util/paths.js';
|
|
2
|
+
import { detectFramework } from '../detect/index.js';
|
|
3
|
+
import { LifecycleEmitter } from '../lifecycle/hooks.js';
|
|
4
|
+
import { resolveApiKey } from '../api/auth.js';
|
|
5
|
+
import { loadConfig, resolveConfig } from '../config/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Shared context factory used by every command. Centralises:
|
|
8
|
+
* - project-root detection
|
|
9
|
+
* - framework detection
|
|
10
|
+
* - allstak.config.* discovery + load
|
|
11
|
+
* - precedence resolution: CLI > env > config > defaults
|
|
12
|
+
* - api-key resolution (with apiKeyOptional for read-only commands)
|
|
13
|
+
* - lifecycle emitter creation
|
|
14
|
+
*/
|
|
15
|
+
export async function buildContext(opts) {
|
|
16
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
17
|
+
const projectRoot = findProjectRoot(cwd);
|
|
18
|
+
const detected = detectFramework(projectRoot);
|
|
19
|
+
const loaded = await loadConfig(projectRoot);
|
|
20
|
+
const cliInputs = {
|
|
21
|
+
organization: opts.org,
|
|
22
|
+
project: opts.project,
|
|
23
|
+
environment: opts.environment,
|
|
24
|
+
release: opts.release ?? undefined,
|
|
25
|
+
apiHost: opts.host,
|
|
26
|
+
ingestHost: opts.ingestHost,
|
|
27
|
+
dashboardHost: opts.dashboardHost,
|
|
28
|
+
snapshotKeep: opts.snapshotKeep,
|
|
29
|
+
skipSourceMaps: opts.skipSourceMaps,
|
|
30
|
+
};
|
|
31
|
+
const resolvedConfig = resolveConfig(loaded?.config ?? null, cliInputs);
|
|
32
|
+
let apiKey = '';
|
|
33
|
+
try {
|
|
34
|
+
apiKey = resolveApiKey({ apiKey: opts.apiKey });
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
if (!opts.apiKeyOptional)
|
|
38
|
+
throw err;
|
|
39
|
+
}
|
|
40
|
+
const ctx = {
|
|
41
|
+
projectRoot,
|
|
42
|
+
cwd,
|
|
43
|
+
apiKey,
|
|
44
|
+
org: resolvedConfig.organization ?? 'unknown',
|
|
45
|
+
project: resolvedConfig.project ?? 'unknown',
|
|
46
|
+
environment: resolvedConfig.environment,
|
|
47
|
+
release: resolvedConfig.release,
|
|
48
|
+
host: resolvedConfig.hosts.api,
|
|
49
|
+
dashboardHost: resolvedConfig.hosts.dashboard,
|
|
50
|
+
ingestHost: resolvedConfig.hosts.ingest,
|
|
51
|
+
pm: detected.pm,
|
|
52
|
+
detected,
|
|
53
|
+
dryRun: opts.dryRun ?? false,
|
|
54
|
+
experimental: opts.experimental ?? false,
|
|
55
|
+
skipDeps: opts.skipDeps ?? false,
|
|
56
|
+
skipSourceMaps: !resolvedConfig.sourceMaps.enabled,
|
|
57
|
+
lifecycle: new LifecycleEmitter(),
|
|
58
|
+
};
|
|
59
|
+
return { ctx, resolvedConfig, configSource: loaded?.source ?? null };
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=_context.js.map
|
|
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AAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAClD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE,MAAM,GAAG,CAAC;IACtC,CAAC;IAED,MAAM,GAAG,GAAkB;QACzB,WAAW;QACX,GAAG;QACH,MAAM;QACN,GAAG,EAAE,cAAc,CAAC,YAAY,IAAI,SAAS;QAC7C,OAAO,EAAE,cAAc,CAAC,OAAO,IAAI,SAAS;QAC5C,WAAW,EAAE,cAAc,CAAC,WAAW;QACvC,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;QAC9B,aAAa,EAAE,cAAc,CAAC,KAAK,CAAC,SAAS;QAC7C,UAAU,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM;QACvC,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,QAAQ;QACR,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;QAC5B,YAAY,EAAE,IAAI,CAAC,YAAY,IAAI,KAAK;QACxC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;QAChC,cAAc,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO;QAClD,SAAS,EAAE,IAAI,gBAAgB,EAAE;KAClC,CAAC;IACF,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,IAAI,IAAI,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Reporter } from '../output/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* `allstak config validate` — run the schema validator against the discovered
|
|
4
|
+
* config file and report success/failure with a structured stage. Read-only.
|
|
5
|
+
*/
|
|
6
|
+
export interface ConfigValidateOptions {
|
|
7
|
+
cwd?: string;
|
|
8
|
+
reporter: Reporter;
|
|
9
|
+
}
|
|
10
|
+
export declare function runConfigValidate(opts: ConfigValidateOptions): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* `allstak config migrate` — bring an old config up to the current schema
|
|
13
|
+
* version. Re-uses the migration runner from `src/config/migrations.ts`. JSON
|
|
14
|
+
* configs are rewritten in place; .ts/.mjs/.js configs print the migrated
|
|
15
|
+
* shape and refuse to overwrite (we can't faithfully preserve user comments
|
|
16
|
+
* + imports without an AST roundtrip).
|
|
17
|
+
*/
|
|
18
|
+
export interface ConfigMigrateOptions {
|
|
19
|
+
cwd?: string;
|
|
20
|
+
dryRun?: boolean;
|
|
21
|
+
reporter: Reporter;
|
|
22
|
+
}
|
|
23
|
+
export declare function runConfigMigrate(opts: ConfigMigrateOptions): Promise<void>;
|
|
24
|
+
//# sourceMappingURL=config-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-cmd.d.ts","sourceRoot":"","sources":["../../src/commands/config-cmd.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;GAGG;AAEH,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqClF;AAED;;;;;;GAMG;AAEH,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkGhF"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { findConfig, loadConfig } from '../config/index.js';
|
|
4
|
+
import { runConfigMigrations } from '../config/migrations.js';
|
|
5
|
+
import { CURRENT_CONFIG_SCHEMA_VERSION } from '../config/types.js';
|
|
6
|
+
import { WizardError } from '../util/errors.js';
|
|
7
|
+
import { findProjectRoot } from '../util/paths.js';
|
|
8
|
+
export async function runConfigValidate(opts) {
|
|
9
|
+
const start = Date.now();
|
|
10
|
+
const r = opts.reporter;
|
|
11
|
+
const projectRoot = findProjectRoot(opts.cwd ?? process.cwd());
|
|
12
|
+
const found = findConfig(projectRoot);
|
|
13
|
+
if (!found) {
|
|
14
|
+
r.info('No allstak.config.* found.', `searched from ${projectRoot}`);
|
|
15
|
+
r.finalize({ command: 'config-validate', outcome: 'noop', durationMs: Date.now() - start });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const loaded = await loadConfig(projectRoot);
|
|
19
|
+
if (!loaded) {
|
|
20
|
+
// findConfig returned a path but loadConfig did not — that means the file
|
|
21
|
+
// failed validation. loadConfig already throws in that case, so reaching
|
|
22
|
+
// here means an empty config object was returned.
|
|
23
|
+
r.warn('Config loader returned empty result.', `path=${found}`);
|
|
24
|
+
r.finalize({ command: 'config-validate', outcome: 'noop', durationMs: Date.now() - start });
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const declaredVersion = loaded.config.schemaVersion ?? 1;
|
|
28
|
+
r.success('Config is valid.', `${loaded.source} (schemaVersion=${declaredVersion})`);
|
|
29
|
+
if (declaredVersion < CURRENT_CONFIG_SCHEMA_VERSION) {
|
|
30
|
+
r.warn(`Config is on schemaVersion ${declaredVersion}; current is ${CURRENT_CONFIG_SCHEMA_VERSION}.`, `Run \`allstak config migrate\` to upgrade.`);
|
|
31
|
+
}
|
|
32
|
+
r.finalize({
|
|
33
|
+
command: 'config-validate',
|
|
34
|
+
outcome: 'success',
|
|
35
|
+
durationMs: Date.now() - start,
|
|
36
|
+
data: {
|
|
37
|
+
path: loaded.source,
|
|
38
|
+
schemaVersion: declaredVersion,
|
|
39
|
+
currentSchemaVersion: CURRENT_CONFIG_SCHEMA_VERSION,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export async function runConfigMigrate(opts) {
|
|
44
|
+
const start = Date.now();
|
|
45
|
+
const r = opts.reporter;
|
|
46
|
+
const projectRoot = findProjectRoot(opts.cwd ?? process.cwd());
|
|
47
|
+
const found = findConfig(projectRoot);
|
|
48
|
+
if (!found) {
|
|
49
|
+
throw new WizardError('E_CONFIG_INVALID', 'No allstak.config.* file found to migrate.', {
|
|
50
|
+
subcode: 'E_CONFIG_NOT_FOUND',
|
|
51
|
+
hint: 'Create an allstak.config.json (or .ts/.mjs) at the project root.',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const loaded = await loadConfig(projectRoot);
|
|
55
|
+
if (!loaded) {
|
|
56
|
+
throw new WizardError('E_CONFIG_INVALID', `Could not load ${found}.`, { subcode: 'E_CONFIG_LOAD' });
|
|
57
|
+
}
|
|
58
|
+
const result = runConfigMigrations(loaded.config);
|
|
59
|
+
if (result.applied.length === 0) {
|
|
60
|
+
r.info('Config is already at the current schemaVersion.', `${loaded.source} (v${CURRENT_CONFIG_SCHEMA_VERSION})`);
|
|
61
|
+
if (result.warnings.length > 0) {
|
|
62
|
+
for (const w of result.warnings)
|
|
63
|
+
r.warn(w);
|
|
64
|
+
}
|
|
65
|
+
r.finalize({
|
|
66
|
+
command: 'config-migrate',
|
|
67
|
+
outcome: 'noop',
|
|
68
|
+
durationMs: Date.now() - start,
|
|
69
|
+
data: { path: loaded.source, applied: [], warnings: result.warnings },
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
r.step('Pending migrations:');
|
|
74
|
+
for (const a of result.applied)
|
|
75
|
+
r.info(a.id, a.description);
|
|
76
|
+
if (opts.dryRun) {
|
|
77
|
+
r.info('Dry-run — config not modified.');
|
|
78
|
+
r.finalize({
|
|
79
|
+
command: 'config-migrate',
|
|
80
|
+
outcome: 'noop',
|
|
81
|
+
durationMs: Date.now() - start,
|
|
82
|
+
data: {
|
|
83
|
+
path: loaded.source,
|
|
84
|
+
applied: result.applied,
|
|
85
|
+
warnings: result.warnings,
|
|
86
|
+
wouldWrite: serialiseIfJson(loaded.source, result.config),
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (!loaded.source.endsWith('.json')) {
|
|
92
|
+
r.warn(`Cannot rewrite ${loaded.source} automatically.`, 'Only .json configs can be migrated in-place; for .ts/.mjs/.js, copy the migrated shape printed below into your file.');
|
|
93
|
+
r.info('Migrated config:', JSON.stringify(result.config, null, 2));
|
|
94
|
+
r.finalize({
|
|
95
|
+
command: 'config-migrate',
|
|
96
|
+
outcome: 'success',
|
|
97
|
+
durationMs: Date.now() - start,
|
|
98
|
+
data: {
|
|
99
|
+
path: loaded.source,
|
|
100
|
+
applied: result.applied,
|
|
101
|
+
warnings: result.warnings,
|
|
102
|
+
rewritten: false,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
// JSON: rewrite in place.
|
|
108
|
+
const path = resolve(loaded.source);
|
|
109
|
+
if (!existsSync(path)) {
|
|
110
|
+
throw new WizardError('E_CONFIG_MIGRATION_FAILED', `Config disappeared during migration: ${path}`);
|
|
111
|
+
}
|
|
112
|
+
// Preserve trailing newline if the original had one.
|
|
113
|
+
const orig = readFileSync(path, 'utf8');
|
|
114
|
+
const trailing = orig.endsWith('\n') ? '\n' : '';
|
|
115
|
+
writeFileSync(path, JSON.stringify(result.config, null, 2) + trailing, 'utf8');
|
|
116
|
+
r.success(`Migrated ${loaded.source} to schemaVersion=${CURRENT_CONFIG_SCHEMA_VERSION}.`);
|
|
117
|
+
if (result.warnings.length > 0)
|
|
118
|
+
for (const w of result.warnings)
|
|
119
|
+
r.warn(w);
|
|
120
|
+
r.finalize({
|
|
121
|
+
command: 'config-migrate',
|
|
122
|
+
outcome: 'success',
|
|
123
|
+
durationMs: Date.now() - start,
|
|
124
|
+
data: {
|
|
125
|
+
path: loaded.source,
|
|
126
|
+
applied: result.applied,
|
|
127
|
+
warnings: result.warnings,
|
|
128
|
+
rewritten: true,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function serialiseIfJson(path, cfg) {
|
|
133
|
+
if (!path.endsWith('.json'))
|
|
134
|
+
return null;
|
|
135
|
+
return JSON.stringify(cfg, null, 2);
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=config-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-cmd.js","sourceRoot":"","sources":["../../src/commands/config-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAanD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAA2B;IACjE,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACzB,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;IACxB,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,CAAC,CAAC,IAAI,CA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