primitive-admin 1.1.0-alpha.6 → 1.1.0-alpha.61
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/README.md +389 -71
- package/assets/skill/skills/primitive-platform/SKILL.md +670 -0
- package/dist/bin/primitive.d.ts +2 -0
- package/dist/bin/primitive.js +287 -17
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.d.ts +2 -0
- package/dist/src/commands/admins.js +138 -19
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/analytics.d.ts +2 -0
- package/dist/src/commands/analytics.js +554 -55
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps.d.ts +2 -0
- package/dist/src/commands/apps.js +27 -80
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth.d.ts +2 -0
- package/dist/src/commands/auth.js +177 -7
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.d.ts +2 -0
- package/dist/src/commands/blob-buckets.js +330 -0
- package/dist/src/commands/blob-buckets.js.map +1 -0
- package/dist/src/commands/catalog.d.ts +2 -0
- package/dist/src/commands/catalog.js +37 -38
- package/dist/src/commands/catalog.js.map +1 -1
- package/dist/src/commands/collection-type-configs.d.ts +2 -0
- package/dist/src/commands/collection-type-configs.js +92 -0
- package/dist/src/commands/collection-type-configs.js.map +1 -0
- package/dist/src/commands/collections.d.ts +2 -0
- package/dist/src/commands/collections.js +526 -0
- package/dist/src/commands/collections.js.map +1 -0
- package/dist/src/commands/comparisons.d.ts +2 -0
- package/dist/src/commands/comparisons.js +6 -6
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.d.ts +35 -0
- package/dist/src/commands/config.js +437 -0
- package/dist/src/commands/config.js.map +1 -0
- package/dist/src/commands/connections.d.ts +2 -0
- package/dist/src/commands/connections.js +100 -0
- package/dist/src/commands/connections.js.map +1 -0
- package/dist/src/commands/cron-triggers.d.ts +2 -0
- package/dist/src/commands/cron-triggers.js +204 -0
- package/dist/src/commands/cron-triggers.js.map +1 -0
- package/dist/src/commands/database-types.d.ts +2 -0
- package/dist/src/commands/database-types.js +171 -0
- package/dist/src/commands/database-types.js.map +1 -0
- package/dist/src/commands/databases.d.ts +65 -0
- package/dist/src/commands/databases.js +2153 -96
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.d.ts +2 -0
- package/dist/src/commands/documents.js +1230 -19
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.d.ts +2 -0
- package/dist/src/commands/email-templates.js +174 -0
- package/dist/src/commands/email-templates.js.map +1 -0
- package/dist/src/commands/env.d.ts +12 -0
- package/dist/src/commands/env.js +260 -0
- package/dist/src/commands/env.js.map +1 -0
- package/dist/src/commands/group-type-configs.d.ts +2 -0
- package/dist/src/commands/group-type-configs.js +86 -0
- package/dist/src/commands/group-type-configs.js.map +1 -0
- package/dist/src/commands/groups.d.ts +2 -0
- package/dist/src/commands/groups.js +38 -99
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.d.ts +223 -0
- package/dist/src/commands/guides.js +617 -65
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/init.d.ts +17 -0
- package/dist/src/commands/init.js +964 -202
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.d.ts +2 -0
- package/dist/src/commands/integrations.js +484 -205
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/llm.d.ts +2 -0
- package/dist/src/commands/llm.js +13 -8
- package/dist/src/commands/llm.js.map +1 -1
- package/dist/src/commands/locks.d.ts +8 -0
- package/dist/src/commands/locks.js +160 -0
- package/dist/src/commands/locks.js.map +1 -0
- package/dist/src/commands/metadata.d.ts +2 -0
- package/dist/src/commands/metadata.js +406 -0
- package/dist/src/commands/metadata.js.map +1 -0
- package/dist/src/commands/prompts.d.ts +2 -0
- package/dist/src/commands/prompts.js +135 -355
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.d.ts +3 -0
- package/dist/src/commands/rule-sets.js +271 -0
- package/dist/src/commands/rule-sets.js.map +1 -0
- package/dist/src/commands/scripts.d.ts +20 -0
- package/dist/src/commands/scripts.js +739 -0
- package/dist/src/commands/scripts.js.map +1 -0
- package/dist/src/commands/secrets.d.ts +2 -0
- package/dist/src/commands/secrets.js +108 -0
- package/dist/src/commands/secrets.js.map +1 -0
- package/dist/src/commands/sessions.d.ts +2 -0
- package/dist/src/commands/sessions.js +75 -0
- package/dist/src/commands/sessions.js.map +1 -0
- package/dist/src/commands/settings.d.ts +18 -0
- package/dist/src/commands/settings.js +54 -0
- package/dist/src/commands/settings.js.map +1 -0
- package/dist/src/commands/skill.d.ts +2 -0
- package/dist/src/commands/skill.js +29 -0
- package/dist/src/commands/skill.js.map +1 -0
- package/dist/src/commands/sync-app-settings.d.ts +125 -0
- package/dist/src/commands/sync-app-settings.js +380 -0
- package/dist/src/commands/sync-app-settings.js.map +1 -0
- package/dist/src/commands/sync.d.ts +958 -0
- package/dist/src/commands/sync.js +8954 -812
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.d.ts +2 -0
- package/dist/src/commands/tokens.js +130 -21
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/users.d.ts +2 -0
- package/dist/src/commands/users.js +440 -22
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.d.ts +8 -0
- package/dist/src/commands/vars.js +96 -0
- package/dist/src/commands/vars.js.map +1 -0
- package/dist/src/commands/waitlist.d.ts +2 -0
- package/dist/src/commands/waitlist.js +10 -10
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/webhooks.d.ts +2 -0
- package/dist/src/commands/webhooks.js +442 -0
- package/dist/src/commands/webhooks.js.map +1 -0
- package/dist/src/commands/workflows.d.ts +94 -0
- package/dist/src/commands/workflows.js +1581 -448
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +1814 -0
- package/dist/src/lib/api-client.js +1655 -103
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +130 -0
- package/dist/src/lib/app-settings-descriptor.js +262 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -0
- package/dist/src/lib/auth-flow.d.ts +8 -0
- package/dist/src/lib/batch.d.ts +26 -0
- package/dist/src/lib/batch.js +32 -0
- package/dist/src/lib/batch.js.map +1 -0
- package/dist/src/lib/block-layout.d.ts +160 -0
- package/dist/src/lib/block-layout.js +451 -0
- package/dist/src/lib/block-layout.js.map +1 -0
- package/dist/src/lib/canonical-json.d.ts +12 -0
- package/dist/src/lib/canonical-json.js +35 -0
- package/dist/src/lib/canonical-json.js.map +1 -0
- package/dist/src/lib/channel.d.ts +30 -0
- package/dist/src/lib/channel.js +68 -0
- package/dist/src/lib/channel.js.map +1 -0
- package/dist/src/lib/cli-manifest.d.ts +68 -0
- package/dist/src/lib/cli-manifest.js +71 -0
- package/dist/src/lib/cli-manifest.js.map +1 -0
- package/dist/src/lib/codegen-shared/generatedFiles.d.ts +97 -0
- package/dist/src/lib/codegen-shared/generatedFiles.js +184 -0
- package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +262 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +610 -0
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +68 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +168 -0
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +108 -0
- package/dist/src/lib/config-object-descriptor.js +607 -0
- package/dist/src/lib/config-object-descriptor.js.map +1 -0
- package/dist/src/lib/config-payload.d.ts +85 -0
- package/dist/src/lib/config-payload.js +105 -0
- package/dist/src/lib/config-payload.js.map +1 -0
- package/dist/src/lib/config-surface.d.ts +93 -0
- package/dist/src/lib/config-surface.js +178 -0
- package/dist/src/lib/config-surface.js.map +1 -0
- package/dist/src/lib/config-toml.d.ts +10 -0
- package/dist/src/lib/config-toml.js +42 -0
- package/dist/src/lib/config-toml.js.map +1 -0
- package/dist/src/lib/config.d.ts +53 -0
- package/dist/src/lib/config.js +92 -53
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/confirm-prompt.d.ts +83 -0
- package/dist/src/lib/confirm-prompt.js +110 -0
- package/dist/src/lib/confirm-prompt.js.map +1 -0
- package/dist/src/lib/constants.d.ts +11 -0
- package/dist/src/lib/constants.js +12 -0
- package/dist/src/lib/constants.js.map +1 -0
- package/dist/src/lib/crash-handlers.d.ts +20 -0
- package/dist/src/lib/crash-handlers.js +49 -0
- package/dist/src/lib/crash-handlers.js.map +1 -0
- package/dist/src/lib/credentials-store.d.ts +89 -0
- package/dist/src/lib/credentials-store.js +330 -0
- package/dist/src/lib/credentials-store.js.map +1 -0
- package/dist/src/lib/csv.d.ts +47 -0
- package/dist/src/lib/csv.js +172 -0
- package/dist/src/lib/csv.js.map +1 -0
- package/dist/src/lib/data-input.d.ts +23 -0
- package/dist/src/lib/data-input.js +50 -0
- package/dist/src/lib/data-input.js.map +1 -0
- package/dist/src/lib/db-codegen/dbFingerprint.d.ts +10 -0
- package/dist/src/lib/db-codegen/dbFingerprint.js +17 -0
- package/dist/src/lib/db-codegen/dbFingerprint.js.map +1 -0
- package/dist/src/lib/db-codegen/dbGenerator.d.ts +67 -0
- package/dist/src/lib/db-codegen/dbGenerator.js +170 -0
- package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -0
- package/dist/src/lib/db-codegen/dbNaming.d.ts +87 -0
- package/dist/src/lib/db-codegen/dbNaming.js +180 -0
- package/dist/src/lib/db-codegen/dbNaming.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTemplates.d.ts +272 -0
- package/dist/src/lib/db-codegen/dbTemplates.js +480 -0
- package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +73 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js +139 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -0
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +146 -0
- package/dist/src/lib/db-codegen/dbTypeIR.js +517 -0
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -0
- package/dist/src/lib/db-codegen/generated-operation-def-descriptor.d.ts +112 -0
- package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js +211 -0
- package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js.map +1 -0
- package/dist/src/lib/env-resolver.d.ts +62 -0
- package/dist/src/lib/env-resolver.js +121 -0
- package/dist/src/lib/env-resolver.js.map +1 -0
- package/dist/src/lib/fetch.d.ts +5 -0
- package/dist/src/lib/generated-allowlist.d.ts +28 -0
- package/dist/src/lib/generated-allowlist.js +266 -0
- package/dist/src/lib/generated-allowlist.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +578 -0
- package/dist/src/lib/generated-config-surfaces.js +3630 -0
- package/dist/src/lib/generated-config-surfaces.js.map +1 -0
- package/dist/src/lib/generated-template-lint.d.ts +206 -0
- package/dist/src/lib/generated-template-lint.js +589 -0
- package/dist/src/lib/generated-template-lint.js.map +1 -0
- package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
- package/dist/src/lib/generated-workflow-model-fields.js +53 -0
- package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
- package/dist/src/lib/google-client-secret-status.d.ts +35 -0
- package/dist/src/lib/google-client-secret-status.js +56 -0
- package/dist/src/lib/google-client-secret-status.js.map +1 -0
- package/dist/src/lib/init-config.d.ts +81 -0
- package/dist/src/lib/init-config.js +149 -0
- package/dist/src/lib/init-config.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +568 -0
- package/dist/src/lib/log-inspection.js +639 -0
- package/dist/src/lib/log-inspection.js.map +1 -0
- package/dist/src/lib/migration-nag.d.ts +49 -0
- package/dist/src/lib/migration-nag.js +163 -0
- package/dist/src/lib/migration-nag.js.map +1 -0
- package/dist/src/lib/output.d.ts +109 -0
- package/dist/src/lib/output.js +191 -8
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/package-manager.d.ts +140 -0
- package/dist/src/lib/package-manager.js +305 -0
- package/dist/src/lib/package-manager.js.map +1 -0
- package/dist/src/lib/paginate.d.ts +83 -0
- package/dist/src/lib/paginate.js +95 -0
- package/dist/src/lib/paginate.js.map +1 -0
- package/dist/src/lib/platform-owned.d.ts +51 -0
- package/dist/src/lib/platform-owned.js +64 -0
- package/dist/src/lib/platform-owned.js.map +1 -0
- package/dist/src/lib/project-config.d.ts +97 -0
- package/dist/src/lib/project-config.js +219 -0
- package/dist/src/lib/project-config.js.map +1 -0
- package/dist/src/lib/query-operators.d.ts +43 -0
- package/dist/src/lib/query-operators.js +80 -0
- package/dist/src/lib/query-operators.js.map +1 -0
- package/dist/src/lib/record-filter.d.ts +18 -0
- package/dist/src/lib/record-filter.js +55 -0
- package/dist/src/lib/record-filter.js.map +1 -0
- package/dist/src/lib/refresh-admin-credentials.d.ts +65 -0
- package/dist/src/lib/refresh-admin-credentials.js +103 -0
- package/dist/src/lib/refresh-admin-credentials.js.map +1 -0
- package/dist/src/lib/resolve-init-dev-port.d.ts +56 -0
- package/dist/src/lib/resolve-init-dev-port.js +55 -0
- package/dist/src/lib/resolve-init-dev-port.js.map +1 -0
- package/dist/src/lib/resolve-init-server.d.ts +71 -0
- package/dist/src/lib/resolve-init-server.js +94 -0
- package/dist/src/lib/resolve-init-server.js.map +1 -0
- package/dist/src/lib/resolve-platform.d.ts +45 -0
- package/dist/src/lib/resolve-platform.js +43 -0
- package/dist/src/lib/resolve-platform.js.map +1 -0
- package/dist/src/lib/run-status.d.ts +19 -0
- package/dist/src/lib/run-status.generated.d.ts +39 -0
- package/dist/src/lib/run-status.generated.js +66 -0
- package/dist/src/lib/run-status.generated.js.map +1 -0
- package/dist/src/lib/run-status.js +19 -0
- package/dist/src/lib/run-status.js.map +1 -0
- package/dist/src/lib/signing-secret-status.d.ts +81 -0
- package/dist/src/lib/signing-secret-status.js +116 -0
- package/dist/src/lib/signing-secret-status.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +25 -0
- package/dist/src/lib/skill-installer.js +266 -0
- package/dist/src/lib/skill-installer.js.map +1 -0
- package/dist/src/lib/snapshots.d.ts +99 -0
- package/dist/src/lib/snapshots.js +357 -0
- package/dist/src/lib/snapshots.js.map +1 -0
- package/dist/src/lib/swift-codegen/dbGenerator.d.ts +100 -0
- package/dist/src/lib/swift-codegen/dbGenerator.js +682 -0
- package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/dbSwiftTypes.d.ts +42 -0
- package/dist/src/lib/swift-codegen/dbSwiftTypes.js +100 -0
- package/dist/src/lib/swift-codegen/dbSwiftTypes.js.map +1 -0
- package/dist/src/lib/swift-codegen/generator.d.ts +85 -0
- package/dist/src/lib/swift-codegen/generator.js +266 -0
- package/dist/src/lib/swift-codegen/generator.js.map +1 -0
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +72 -0
- package/dist/src/lib/swift-codegen/schemaToSwift.js +644 -0
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.d.ts +90 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.js +152 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.js.map +1 -0
- package/dist/src/lib/swift-codegen/swiftNaming.d.ts +85 -0
- package/dist/src/lib/swift-codegen/swiftNaming.js +198 -0
- package/dist/src/lib/swift-codegen/swiftNaming.js.map +1 -0
- package/dist/src/lib/sync-paths.d.ts +72 -0
- package/dist/src/lib/sync-paths.js +130 -0
- package/dist/src/lib/sync-paths.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +445 -0
- package/dist/src/lib/sync-resource-types.js +812 -0
- package/dist/src/lib/sync-resource-types.js.map +1 -0
- package/dist/src/lib/sync-selectors.d.ts +95 -0
- package/dist/src/lib/sync-selectors.js +228 -0
- package/dist/src/lib/sync-selectors.js.map +1 -0
- package/dist/src/lib/template.d.ts +121 -0
- package/dist/src/lib/template.js +447 -67
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/token-inject.d.ts +56 -0
- package/dist/src/lib/token-inject.js +204 -0
- package/dist/src/lib/token-inject.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +123 -0
- package/dist/src/lib/toml-database-config.js +527 -0
- package/dist/src/lib/toml-database-config.js.map +1 -0
- package/dist/src/lib/toml-metadata-config.d.ts +151 -0
- package/dist/src/lib/toml-metadata-config.js +476 -0
- package/dist/src/lib/toml-metadata-config.js.map +1 -0
- package/dist/src/lib/toml-native-form.d.ts +46 -0
- package/dist/src/lib/toml-native-form.js +78 -0
- package/dist/src/lib/toml-native-form.js.map +1 -0
- package/dist/src/lib/toml-params-validator.d.ts +129 -0
- package/dist/src/lib/toml-params-validator.js +298 -0
- package/dist/src/lib/toml-params-validator.js.map +1 -0
- package/dist/src/lib/toml-scalar-edit.d.ts +43 -0
- package/dist/src/lib/toml-scalar-edit.js +283 -0
- package/dist/src/lib/toml-scalar-edit.js.map +1 -0
- package/dist/src/lib/user-selector.d.ts +24 -0
- package/dist/src/lib/user-selector.js +33 -0
- package/dist/src/lib/user-selector.js.map +1 -0
- package/dist/src/lib/version-check.d.ts +35 -0
- package/dist/src/lib/version-check.js +241 -0
- package/dist/src/lib/version-check.js.map +1 -0
- package/dist/src/lib/watch.d.ts +121 -0
- package/dist/src/lib/watch.js +169 -0
- package/dist/src/lib/watch.js.map +1 -0
- package/dist/src/lib/workflow-apply.d.ts +51 -0
- package/dist/src/lib/workflow-apply.js +89 -0
- package/dist/src/lib/workflow-apply.js.map +1 -0
- package/dist/src/lib/workflow-codegen/generated-schema-descriptor.d.ts +129 -0
- package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js +269 -0
- package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js.map +1 -0
- package/dist/src/lib/workflow-codegen/generator.d.ts +96 -0
- package/dist/src/lib/workflow-codegen/generator.js +361 -0
- package/dist/src/lib/workflow-codegen/generator.js.map +1 -0
- package/dist/src/lib/workflow-codegen/invokerIR.d.ts +83 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js +71 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -0
- package/dist/src/lib/workflow-codegen/naming.d.ts +33 -0
- package/dist/src/lib/workflow-codegen/naming.js +81 -0
- package/dist/src/lib/workflow-codegen/naming.js.map +1 -0
- package/dist/src/lib/workflow-codegen/schemaToTs.d.ts +80 -0
- package/dist/src/lib/workflow-codegen/schemaToTs.js +303 -0
- package/dist/src/lib/workflow-codegen/schemaToTs.js.map +1 -0
- package/dist/src/lib/workflow-config-apply.d.ts +70 -0
- package/dist/src/lib/workflow-config-apply.js +137 -0
- package/dist/src/lib/workflow-config-apply.js.map +1 -0
- package/dist/src/lib/workflow-config-sidecar.d.ts +63 -0
- package/dist/src/lib/workflow-config-sidecar.js +96 -0
- package/dist/src/lib/workflow-config-sidecar.js.map +1 -0
- package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
- package/dist/src/lib/workflow-field-descriptor.js +153 -0
- package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
- package/dist/src/lib/workflow-fragments.d.ts +64 -0
- package/dist/src/lib/workflow-fragments.js +342 -0
- package/dist/src/lib/workflow-fragments.js.map +1 -0
- package/dist/src/lib/workflow-include-preserve.d.ts +71 -0
- package/dist/src/lib/workflow-include-preserve.js +153 -0
- package/dist/src/lib/workflow-include-preserve.js.map +1 -0
- package/dist/src/lib/workflow-payload.d.ts +86 -0
- package/dist/src/lib/workflow-payload.js +168 -0
- package/dist/src/lib/workflow-payload.js.map +1 -0
- package/dist/src/lib/workflow-toml-validator.d.ts +199 -0
- package/dist/src/lib/workflow-toml-validator.js +754 -0
- package/dist/src/lib/workflow-toml-validator.js.map +1 -0
- package/dist/src/types/index.d.ts +533 -0
- package/dist/src/validators.d.ts +65 -0
- package/dist/src/validators.js +64 -0
- package/dist/src/validators.js.map +1 -0
- package/package.json +32 -6
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared app-settings helpers (issue #1033, Phase 2; narrowed by #2645).
|
|
3
|
+
*
|
|
4
|
+
* The descriptor-driven `app.toml` round-trip (issue #1033, Phase 1) was born
|
|
5
|
+
* inside the big `sync pull` / `sync push` command flow. Phase 2 lifted the
|
|
6
|
+
* app-settings-specific pieces here so both surfaces could drive them. #2645
|
|
7
|
+
* then removed the second surface: `app.toml` is authored like every other
|
|
8
|
+
* configuration file and applied by `sync push`, so what is left here is what
|
|
9
|
+
* `sync` calls (`serializeAppSettings`, `writePulledAppSettings`,
|
|
10
|
+
* `collectAppSettingsPushErrors`, `diffAppSettings` for `sync diff --only app`)
|
|
11
|
+
* plus the one thing the file cannot answer — `showAppSettings`, the
|
|
12
|
+
* server-effective view behind `settings get`.
|
|
13
|
+
*
|
|
14
|
+
* `googleClientSecret` is an ordinary `[auth]` key here (#2256): it holds a whole
|
|
15
|
+
* `{{secrets.KEY}}` reference, not the secret itself, so it pulls, pushes, diffs
|
|
16
|
+
* and shows like any other string setting. The secret's value lives only in the
|
|
17
|
+
* app secret store (`primitive secrets set`).
|
|
18
|
+
*/
|
|
19
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
20
|
+
import { join } from "path";
|
|
21
|
+
import { createHash } from "crypto";
|
|
22
|
+
import { parseConfigToml, stringifyConfigToml } from "../lib/config-toml.js";
|
|
23
|
+
import { APP_SETTINGS_DESCRIPTOR, APP_SETTINGS_SECTIONS, serializeAppSettingsToToml, parseTomlToAppSettings, } from "../lib/app-settings-descriptor.js";
|
|
24
|
+
import { getServerUrl } from "../lib/config.js";
|
|
25
|
+
import { googleClientSecretStatusWarning } from "../lib/google-client-secret-status.js";
|
|
26
|
+
import { success, error, info, warn, json, result as printResult, divider, } from "../lib/output.js";
|
|
27
|
+
/** The app-settings file name inside a sync directory. */
|
|
28
|
+
export const APP_TOML_FILENAME = "app.toml";
|
|
29
|
+
/** Absolute path to `app.toml` inside a sync directory. */
|
|
30
|
+
export function appTomlPath(configDir) {
|
|
31
|
+
return join(configDir, APP_TOML_FILENAME);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Serialize server settings into the `app.toml` string (pull direction).
|
|
35
|
+
* Descriptor-driven; this is the single serializer both `sync pull` and
|
|
36
|
+
* `sync pull` use.
|
|
37
|
+
*/
|
|
38
|
+
export function serializeAppSettings(settings) {
|
|
39
|
+
return stringifyConfigToml(serializeAppSettingsToToml(settings));
|
|
40
|
+
}
|
|
41
|
+
/** SHA-256 of a file's bytes — the per-file content hash tracked in sync state. */
|
|
42
|
+
function contentHashOfFile(filePath) {
|
|
43
|
+
return createHash("sha256").update(readFileSync(filePath)).digest("hex");
|
|
44
|
+
}
|
|
45
|
+
function ensureDir(dirPath) {
|
|
46
|
+
if (!existsSync(dirPath))
|
|
47
|
+
mkdirSync(dirPath, { recursive: true });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Write `app.toml` from server settings and return its content hash. Shared by
|
|
51
|
+
* `sync pull` (whole-tree and `--only app`), so the file and the hash have one
|
|
52
|
+
* producer.
|
|
53
|
+
*/
|
|
54
|
+
export function writeAppSettingsToml(configDir, settings) {
|
|
55
|
+
const path = appTomlPath(configDir);
|
|
56
|
+
writeFileSync(path, serializeAppSettings(settings));
|
|
57
|
+
return contentHashOfFile(path);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The pull-time warning for a `googleClientSecret` the server withheld, or
|
|
61
|
+
* `null` when the stored value is a reference (or unset).
|
|
62
|
+
*
|
|
63
|
+
* Reported by `sync pull` wherever it writes `app.toml` — no pull said
|
|
64
|
+
* anything at all before (#2307). A withheld value is
|
|
65
|
+
* absent from the `app.toml` they just wrote AND absent from a push built out
|
|
66
|
+
* of that file, and a settings write that does not carry a `googleClientSecret`
|
|
67
|
+
* is exactly what the server rejects while the stored value is unmigrated
|
|
68
|
+
* (`validateGoogleClientSecretMigration`). So the pulled file is not pushable
|
|
69
|
+
* until the field is migrated, and pull is where the operator can still act on
|
|
70
|
+
* that.
|
|
71
|
+
*
|
|
72
|
+
* `subject` lets `sync pull` name the file and match the indentation of its
|
|
73
|
+
* other per-entity lines.
|
|
74
|
+
*/
|
|
75
|
+
export function pulledGoogleClientSecretWarning(settings, options = {}) {
|
|
76
|
+
return googleClientSecretStatusWarning(settings?.googleClientSecretStatus, {
|
|
77
|
+
subject: options.subject ?? "googleClientSecret",
|
|
78
|
+
withheldFrom: "the app.toml just written",
|
|
79
|
+
blocks: "pushing this app.toml back is rejected",
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Validate a parsed `app.toml` for push and return the fatal errors (a type
|
|
84
|
+
* mismatch). An empty array means the push may proceed. Warnings (unrecognized
|
|
85
|
+
* keys) are intentionally not returned here — the caller surfaces those at apply
|
|
86
|
+
* time. Shared by the `sync push` preflight and `settings push`.
|
|
87
|
+
*/
|
|
88
|
+
export function collectAppSettingsPushErrors(tomlData, options = {}) {
|
|
89
|
+
return parseTomlToAppSettings(tomlData, options).errors;
|
|
90
|
+
}
|
|
91
|
+
// --- Shared single sync-state entry (entities.app) -------------------------
|
|
92
|
+
// These read and write the SAME `.primitive-sync.json` that
|
|
93
|
+
// `sync` maintains, touching only `entities.app` and preserving every other
|
|
94
|
+
// entity. Kept as small local load/save helpers (rather than importing
|
|
95
|
+
// `sync.ts`) to avoid an import cycle — `sync.ts` imports the serializer above.
|
|
96
|
+
function syncStatePath(configDir) {
|
|
97
|
+
return join(configDir, ".primitive-sync.json");
|
|
98
|
+
}
|
|
99
|
+
function loadSyncState(configDir) {
|
|
100
|
+
const p = syncStatePath(configDir);
|
|
101
|
+
if (!existsSync(p))
|
|
102
|
+
return null;
|
|
103
|
+
try {
|
|
104
|
+
return JSON.parse(readFileSync(p, "utf-8"));
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function saveSyncState(configDir, state) {
|
|
111
|
+
writeFileSync(syncStatePath(configDir), JSON.stringify(state, null, 2));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Update `entities.app.contentHash`, preserving all other entities.
|
|
115
|
+
*
|
|
116
|
+
* On a cross-app stamp (the loaded state belongs to a different app than the
|
|
117
|
+
* one we just pulled from / pushed to) this mirrors `sync push` (see
|
|
118
|
+
* `sync.ts`): it rebinds the sync state to the target app with fresh entities,
|
|
119
|
+
* then records the app-settings hash. Without the rebind the stored
|
|
120
|
+
* `state.appId` would stay pointing at the source app, so every later
|
|
121
|
+
* `settings push <target>` would keep computing `isCrossAppPush` as true — it
|
|
122
|
+
* would ignore the stored hash and keep stripping `[app].name`, making it
|
|
123
|
+
* impossible to rename the target app via `app.toml`.
|
|
124
|
+
*/
|
|
125
|
+
function stampAppContentHash(configDir, appId, contentHash) {
|
|
126
|
+
const now = new Date().toISOString();
|
|
127
|
+
const existing = loadSyncState(configDir);
|
|
128
|
+
const isCrossAppStamp = !!(existing && existing.appId !== appId);
|
|
129
|
+
const state = existing && !isCrossAppStamp
|
|
130
|
+
? existing
|
|
131
|
+
: {
|
|
132
|
+
appId,
|
|
133
|
+
serverUrl: existing?.serverUrl ?? getServerUrl(),
|
|
134
|
+
lastSyncedAt: now,
|
|
135
|
+
entities: {},
|
|
136
|
+
};
|
|
137
|
+
state.entities.app = { modifiedAt: now, contentHash };
|
|
138
|
+
saveSyncState(configDir, state);
|
|
139
|
+
}
|
|
140
|
+
// --- Display helpers -------------------------------------------------------
|
|
141
|
+
function formatValue(value) {
|
|
142
|
+
if (value === undefined)
|
|
143
|
+
return "(not set)";
|
|
144
|
+
if (value === null)
|
|
145
|
+
return "(null)";
|
|
146
|
+
if (Array.isArray(value))
|
|
147
|
+
return value.length === 0 ? "[]" : `[${value.join(", ")}]`;
|
|
148
|
+
if (typeof value === "object")
|
|
149
|
+
return JSON.stringify(value);
|
|
150
|
+
return String(value);
|
|
151
|
+
}
|
|
152
|
+
/** Order-insensitive-free deep equality good enough for settings scalars/arrays. */
|
|
153
|
+
function settingsEqual(a, b) {
|
|
154
|
+
return JSON.stringify(a ?? null) === JSON.stringify(b ?? null);
|
|
155
|
+
}
|
|
156
|
+
// --- Command orchestrators (used by cli/src/commands/settings.ts) ----------
|
|
157
|
+
/**
|
|
158
|
+
* `settings get` — render the current server-effective settings grouped by
|
|
159
|
+
* `app.toml` section. `--json` emits the server response as-is.
|
|
160
|
+
*
|
|
161
|
+
* Nothing is redacted (#2256): `googleClientSecret` is the only credential-shaped
|
|
162
|
+
* setting and the server only ever sends it when it holds a `{{secrets.KEY}}`
|
|
163
|
+
* reference, so printing it tells the operator which secret is in use rather
|
|
164
|
+
* than leaking one. An app still holding a pre-reference-only literal sends no
|
|
165
|
+
* value at all (`googleClientSecretStatus: "legacy-literal"`), so the literal
|
|
166
|
+
* cannot reach the terminal or `app.toml` through this path either — the
|
|
167
|
+
* withheld value is reported as a remediation note instead, the same way
|
|
168
|
+
* `primitive webhooks get` reports a legacy `signingSecret`. Without it the
|
|
169
|
+
* operator sees a blank `googleClientSecret` and no reason for it.
|
|
170
|
+
*/
|
|
171
|
+
export async function showAppSettings(client, appId, options = {}) {
|
|
172
|
+
try {
|
|
173
|
+
const settings = (await client.getAppSettings(appId)) ?? {};
|
|
174
|
+
if (options.json) {
|
|
175
|
+
json(settings);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
for (const section of APP_SETTINGS_SECTIONS) {
|
|
179
|
+
const descriptors = APP_SETTINGS_DESCRIPTOR.filter((d) => d.section === section);
|
|
180
|
+
divider();
|
|
181
|
+
info(`[${section}]`);
|
|
182
|
+
for (const d of descriptors) {
|
|
183
|
+
printResult(` ${d.key}`, formatValue(settings[d.field]));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// `googleClientSecretStatus` is not a descriptor field (it is derived, and
|
|
187
|
+
// never written back), so it prints here rather than in a section.
|
|
188
|
+
const statusWarning = googleClientSecretStatusWarning(settings.googleClientSecretStatus, {
|
|
189
|
+
subject: "googleClientSecret",
|
|
190
|
+
withheldFrom: "this output",
|
|
191
|
+
blocks: "the next settings write will be rejected",
|
|
192
|
+
});
|
|
193
|
+
if (statusWarning) {
|
|
194
|
+
divider();
|
|
195
|
+
warn(statusWarning);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
catch (err) {
|
|
199
|
+
error(err.message);
|
|
200
|
+
process.exit(1);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Write the pulled `app.toml` and report what the file cannot carry.
|
|
205
|
+
*
|
|
206
|
+
* The one place a pull turns server settings into the local file, so both the
|
|
207
|
+
* write and the withheld-`googleClientSecret` warning stay together: a file
|
|
208
|
+
* written without that warning looks complete and is not pushable (#2307).
|
|
209
|
+
* `sync pull` calls this for `app.toml`, whether the pull is whole-tree or
|
|
210
|
+
* `--only app` — the `settings pull` that used to share it is gone.
|
|
211
|
+
*/
|
|
212
|
+
export function writePulledAppSettings(configDir, settings, options = {}) {
|
|
213
|
+
ensureDir(configDir);
|
|
214
|
+
const contentHash = writeAppSettingsToml(configDir, settings);
|
|
215
|
+
const statusWarning = pulledGoogleClientSecretWarning(settings, {
|
|
216
|
+
subject: options.subject,
|
|
217
|
+
});
|
|
218
|
+
if (statusWarning)
|
|
219
|
+
warn(statusWarning);
|
|
220
|
+
options.log?.(`Wrote ${appTomlPath(configDir)}`);
|
|
221
|
+
return { path: appTomlPath(configDir), contentHash };
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* `settings push` — read `app.toml`, validate (abort before any PUT on a type
|
|
225
|
+
* mismatch), skip when unchanged since the last sync unless `--force`, then
|
|
226
|
+
* apply via `PUT /settings` and re-stamp the shared content hash. Cross-app
|
|
227
|
+
* pushes (state's app differs from the target) always apply and strip `name`,
|
|
228
|
+
* matching `sync push`.
|
|
229
|
+
*/
|
|
230
|
+
export async function pushAppSettings(client, appId, configDir, options = {}) {
|
|
231
|
+
try {
|
|
232
|
+
const path = appTomlPath(configDir);
|
|
233
|
+
if (!existsSync(path)) {
|
|
234
|
+
error(`No ${APP_TOML_FILENAME} found at ${path}. Run 'primitive sync pull --only app' first.`);
|
|
235
|
+
process.exit(1);
|
|
236
|
+
}
|
|
237
|
+
const state = loadSyncState(configDir);
|
|
238
|
+
const isCrossAppPush = !!(state && state.appId !== appId);
|
|
239
|
+
let tomlData;
|
|
240
|
+
try {
|
|
241
|
+
tomlData = parseConfigToml(readFileSync(path, "utf-8"));
|
|
242
|
+
}
|
|
243
|
+
catch (err) {
|
|
244
|
+
error(`Aborting push: could not parse ${APP_TOML_FILENAME}: ${err?.message || String(err)}`);
|
|
245
|
+
process.exit(1);
|
|
246
|
+
}
|
|
247
|
+
const { settings, warnings, errors } = parseTomlToAppSettings(tomlData, {
|
|
248
|
+
isCrossAppPush,
|
|
249
|
+
});
|
|
250
|
+
// Fail before any mutation on a type mismatch.
|
|
251
|
+
if (errors.length > 0) {
|
|
252
|
+
error(`Aborting push: ${errors.length} validation error(s) in ${APP_TOML_FILENAME} — no changes were applied.`);
|
|
253
|
+
for (const e of errors)
|
|
254
|
+
error(` ${e}`);
|
|
255
|
+
process.exit(1);
|
|
256
|
+
}
|
|
257
|
+
// Skip when nothing changed since the last sync (shared content hash).
|
|
258
|
+
const storedHash = isCrossAppPush
|
|
259
|
+
? undefined
|
|
260
|
+
: state?.entities?.app?.contentHash;
|
|
261
|
+
const changed = options.force || !storedHash || contentHashOfFile(path) !== storedHash;
|
|
262
|
+
if (!changed) {
|
|
263
|
+
if (options.json) {
|
|
264
|
+
json({ applied: false, skipped: true, reason: "unchanged" });
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
info("Skipped app settings (unchanged). Use --force to push anyway.");
|
|
268
|
+
}
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
for (const w of warnings)
|
|
272
|
+
warn(` ${w}`);
|
|
273
|
+
if (options.dryRun) {
|
|
274
|
+
if (options.json) {
|
|
275
|
+
json({ applied: false, dryRun: true, settings });
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
info("[dry-run] Would update app settings.");
|
|
279
|
+
}
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
await client.updateAppSettings(appId, settings);
|
|
283
|
+
stampAppContentHash(configDir, appId, contentHashOfFile(path));
|
|
284
|
+
if (options.json) {
|
|
285
|
+
json({ applied: true, fields: Object.keys(settings) });
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
success("Updated app settings.");
|
|
289
|
+
}
|
|
290
|
+
catch (err) {
|
|
291
|
+
// Surface the server's machine-readable code alongside the message when it
|
|
292
|
+
// sends one (e.g. `GOOGLE_CLIENT_SECRET_MUST_BE_SECRET_REF`, #2256) — it is
|
|
293
|
+
// the stable identifier to search for or report, where the prose is not.
|
|
294
|
+
error(err?.code ? `${err.message} (${err.code})` : err.message);
|
|
295
|
+
process.exit(1);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* `sync diff --only app` — report per-field differences between the local `app.toml`
|
|
300
|
+
* push payload and the current server settings. Only keys present in the TOML
|
|
301
|
+
* are compared, so a server value that equals a descriptor default (and is
|
|
302
|
+
* therefore omitted from `app.toml`) is never flagged as a spurious difference.
|
|
303
|
+
*/
|
|
304
|
+
export async function diffAppSettings(client, appId, configDir, options = {}) {
|
|
305
|
+
try {
|
|
306
|
+
const path = appTomlPath(configDir);
|
|
307
|
+
if (!existsSync(path)) {
|
|
308
|
+
error(`No ${APP_TOML_FILENAME} found at ${path}. Run 'primitive sync pull --only app' first.`);
|
|
309
|
+
process.exit(1);
|
|
310
|
+
}
|
|
311
|
+
// Local-parse-first, mirroring `settings push`: validate the file before
|
|
312
|
+
// touching the server so an unpushable file never issues `GET /settings`.
|
|
313
|
+
let tomlData;
|
|
314
|
+
try {
|
|
315
|
+
tomlData = parseConfigToml(readFileSync(path, "utf-8"));
|
|
316
|
+
}
|
|
317
|
+
catch (err) {
|
|
318
|
+
error(`Aborting diff: could not parse ${APP_TOML_FILENAME}: ${err?.message || String(err)}`);
|
|
319
|
+
process.exit(1);
|
|
320
|
+
}
|
|
321
|
+
// Mirror push's cross-app determination (pushAppSettings above): when the
|
|
322
|
+
// sync state belongs to a different app, the push parse strips `[app].name`
|
|
323
|
+
// before validating, so diff must strip it too — otherwise a malformed
|
|
324
|
+
// local `name` would abort diff on a file push would accept and ignore.
|
|
325
|
+
const state = loadSyncState(configDir);
|
|
326
|
+
const isCrossAppPush = !!(state && state.appId !== appId);
|
|
327
|
+
// Present-only push payload — omitted keys are absent, so they can't be
|
|
328
|
+
// flagged against a server default.
|
|
329
|
+
const { settings: local, errors } = parseTomlToAppSettings(tomlData, {
|
|
330
|
+
isCrossAppPush,
|
|
331
|
+
});
|
|
332
|
+
// Mirror the push preflight (pushAppSettings above): a file with validation
|
|
333
|
+
// errors is unpushable, so diff must not present its surviving values as
|
|
334
|
+
// clean (or as a partial diff) — that would advertise changes push will
|
|
335
|
+
// never apply. `--json` is ignored on this path, exactly as push does.
|
|
336
|
+
if (errors.length > 0) {
|
|
337
|
+
error(`Aborting diff: ${errors.length} validation error(s) in ${APP_TOML_FILENAME} — this file cannot be pushed.`);
|
|
338
|
+
for (const e of errors)
|
|
339
|
+
error(` ${e}`);
|
|
340
|
+
process.exit(1);
|
|
341
|
+
}
|
|
342
|
+
const remote = (await client.getAppSettings(appId)) ?? {};
|
|
343
|
+
const diffs = [];
|
|
344
|
+
for (const d of APP_SETTINGS_DESCRIPTOR) {
|
|
345
|
+
if (!(d.field in local))
|
|
346
|
+
continue;
|
|
347
|
+
const localVal = local[d.field];
|
|
348
|
+
const remoteVal = remote[d.field];
|
|
349
|
+
if (!settingsEqual(localVal, remoteVal)) {
|
|
350
|
+
diffs.push({
|
|
351
|
+
field: d.field,
|
|
352
|
+
section: d.section,
|
|
353
|
+
key: d.key,
|
|
354
|
+
local: localVal,
|
|
355
|
+
remote: remoteVal,
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
if (options.json) {
|
|
360
|
+
json({ diffs });
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
if (diffs.length === 0) {
|
|
364
|
+
success(`No differences — ${APP_TOML_FILENAME} matches server settings.`);
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
info(`${diffs.length} field(s) differ between ${APP_TOML_FILENAME} and the server:`);
|
|
368
|
+
for (const df of diffs) {
|
|
369
|
+
divider();
|
|
370
|
+
info(`[${df.section}].${df.key}`);
|
|
371
|
+
printResult(" local", formatValue(df.local));
|
|
372
|
+
printResult(" remote", formatValue(df.remote));
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
catch (err) {
|
|
376
|
+
error(err.message);
|
|
377
|
+
process.exit(1);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
//# sourceMappingURL=sync-app-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-app-settings.js","sourceRoot":"","sources":["../../../src/commands/sync-app-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,GAEvB,MAAM,mCA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