primitive-admin 1.1.0-alpha.7 → 1.1.0-alpha.71
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 +404 -80
- package/assets/skill/skills/primitive-platform/SKILL.md +808 -0
- package/dist/bin/primitive.d.ts +2 -0
- package/dist/bin/primitive.js +294 -21
- 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 +544 -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 +51 -96
- 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 +565 -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 +46 -0
- package/dist/src/commands/config.js +479 -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 +265 -0
- package/dist/src/commands/cron-triggers.js.map +1 -0
- package/dist/src/commands/database-type-configs.d.ts +2 -0
- package/dist/src/commands/database-type-configs.js +171 -0
- package/dist/src/commands/database-type-configs.js.map +1 -0
- package/dist/src/commands/database-types.d.ts +2 -0
- package/dist/src/commands/database-types.js +471 -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 +2140 -112
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.d.ts +2 -0
- package/dist/src/commands/documents.js +1357 -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 +23 -0
- package/dist/src/commands/env.js +333 -0
- package/dist/src/commands/env.js.map +1 -0
- package/dist/src/commands/feature-flags.d.ts +14 -0
- package/dist/src/commands/feature-flags.js +116 -0
- package/dist/src/commands/feature-flags.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 +25 -0
- package/dist/src/commands/init.js +1605 -208
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.d.ts +2 -0
- package/dist/src/commands/integrations.js +380 -178
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/llm.d.ts +2 -0
- package/dist/src/commands/llm.js +4 -2
- 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-category-configs.d.ts +12 -0
- package/dist/src/commands/metadata-category-configs.js +112 -0
- package/dist/src/commands/metadata-category-configs.js.map +1 -0
- package/dist/src/commands/metadata.d.ts +2 -0
- package/dist/src/commands/metadata.js +281 -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 +225 -584
- 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 +272 -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 +554 -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/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 +158 -0
- package/dist/src/commands/sync-app-settings.js +330 -0
- package/dist/src/commands/sync-app-settings.js.map +1 -0
- package/dist/src/commands/sync.d.ts +2323 -0
- package/dist/src/commands/sync.js +15065 -843
- 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 +532 -23
- 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 +562 -0
- package/dist/src/commands/webhooks.js.map +1 -0
- package/dist/src/commands/workflows.d.ts +116 -0
- package/dist/src/commands/workflows.js +1583 -681
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/access-rule-display.d.ts +21 -0
- package/dist/src/lib/access-rule-display.js +34 -0
- package/dist/src/lib/access-rule-display.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +1936 -0
- package/dist/src/lib/api-client.js +1826 -138
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +263 -0
- package/dist/src/lib/app-settings-descriptor.js +575 -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 +101 -0
- package/dist/src/lib/codegen-shared/generatedFiles.js +191 -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 +127 -0
- package/dist/src/lib/config-object-descriptor.js +658 -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 +116 -0
- package/dist/src/lib/config-payload.js.map +1 -0
- package/dist/src/lib/config-surface.d.ts +130 -0
- package/dist/src/lib/config-surface.js +300 -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-core.d.ts +147 -0
- package/dist/src/lib/env-resolver-core.js +265 -0
- package/dist/src/lib/env-resolver-core.js.map +1 -0
- package/dist/src/lib/env-resolver.d.ts +84 -0
- package/dist/src/lib/env-resolver.js +133 -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 +277 -0
- package/dist/src/lib/generated-allowlist.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +682 -0
- package/dist/src/lib/generated-config-surfaces.js +4058 -0
- package/dist/src/lib/generated-config-surfaces.js.map +1 -0
- package/dist/src/lib/generated-template-lint.d.ts +212 -0
- package/dist/src/lib/generated-template-lint.js +624 -0
- package/dist/src/lib/generated-template-lint.js.map +1 -0
- package/dist/src/lib/init-adopt.d.ts +16 -0
- package/dist/src/lib/init-adopt.js +34 -0
- package/dist/src/lib/init-adopt.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +39 -0
- package/dist/src/lib/init-assets.js +97 -0
- package/dist/src/lib/init-assets.js.map +1 -0
- package/dist/src/lib/init-config.d.ts +98 -0
- package/dist/src/lib/init-config.js +186 -0
- package/dist/src/lib/init-config.js.map +1 -0
- package/dist/src/lib/init-ios-links.d.ts +50 -0
- package/dist/src/lib/init-ios-links.js +153 -0
- package/dist/src/lib/init-ios-links.js.map +1 -0
- package/dist/src/lib/init-plan.d.ts +80 -0
- package/dist/src/lib/init-plan.js +95 -0
- package/dist/src/lib/init-plan.js.map +1 -0
- package/dist/src/lib/init-production-env.d.ts +48 -0
- package/dist/src/lib/init-production-env.js +59 -0
- package/dist/src/lib/init-production-env.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +74 -0
- package/dist/src/lib/init-schema.js +358 -0
- package/dist/src/lib/init-schema.js.map +1 -0
- package/dist/src/lib/init-xcode.d.ts +33 -0
- package/dist/src/lib/init-xcode.js +114 -0
- package/dist/src/lib/init-xcode.js.map +1 -0
- package/dist/src/lib/integration-request-config.d.ts +30 -0
- package/dist/src/lib/integration-request-config.js +145 -0
- package/dist/src/lib/integration-request-config.js.map +1 -0
- package/dist/src/lib/local-state.d.ts +55 -0
- package/dist/src/lib/local-state.js +167 -0
- package/dist/src/lib/local-state.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/object-status-filter.d.ts +22 -0
- package/dist/src/lib/object-status-filter.js +45 -0
- package/dist/src/lib/object-status-filter.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 +63 -0
- package/dist/src/lib/platform-owned.js +85 -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 +217 -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 +64 -0
- package/dist/src/lib/resolve-init-server.js +77 -0
- package/dist/src/lib/resolve-init-server.js.map +1 -0
- package/dist/src/lib/resolve-platform.d.ts +74 -0
- package/dist/src/lib/resolve-platform.js +105 -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/server-text-normalization.d.ts +51 -0
- package/dist/src/lib/server-text-normalization.js +90 -0
- package/dist/src/lib/server-text-normalization.js.map +1 -0
- package/dist/src/lib/server-url.d.ts +22 -0
- package/dist/src/lib/server-url.js +33 -0
- package/dist/src/lib/server-url.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 +113 -0
- package/dist/src/lib/swift-codegen/dbGenerator.js +914 -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 +94 -0
- package/dist/src/lib/swift-codegen/generator.js +440 -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 +94 -0
- package/dist/src/lib/swift-codegen/siblingSymbols.js +155 -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-dir-selector.d.ts +21 -0
- package/dist/src/lib/sync-dir-selector.js +30 -0
- package/dist/src/lib/sync-dir-selector.js.map +1 -0
- package/dist/src/lib/sync-paths.d.ts +111 -0
- package/dist/src/lib/sync-paths.js +198 -0
- package/dist/src/lib/sync-paths.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +544 -0
- package/dist/src/lib/sync-resource-types.js +975 -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 +170 -0
- package/dist/src/lib/template.js +484 -68
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-keys.d.ts +29 -0
- package/dist/src/lib/test-case-keys.js +55 -0
- package/dist/src/lib/test-case-keys.js.map +1 -0
- package/dist/src/lib/test-case-variables.d.ts +15 -0
- package/dist/src/lib/test-case-variables.js +29 -0
- package/dist/src/lib/test-case-variables.js.map +1 -0
- 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 +110 -0
- package/dist/src/lib/workflow-apply.js +164 -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 +94 -0
- package/dist/src/lib/workflow-codegen/invokerIR.js +76 -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-defaults.d.ts +29 -0
- package/dist/src/lib/workflow-defaults.js +41 -0
- package/dist/src/lib/workflow-defaults.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 +76 -0
- package/dist/src/lib/workflow-include-preserve.js +286 -0
- package/dist/src/lib/workflow-include-preserve.js.map +1 -0
- package/dist/src/lib/workflow-payload.d.ts +98 -0
- package/dist/src/lib/workflow-payload.js +178 -0
- package/dist/src/lib/workflow-payload.js.map +1 -0
- package/dist/src/lib/workflow-toml-validator.d.ts +202 -0
- package/dist/src/lib/workflow-toml-validator.js +757 -0
- package/dist/src/lib/workflow-toml-validator.js.map +1 -0
- package/dist/src/types/index.d.ts +581 -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 -8
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import { readFileSync, statSync } from "fs";
|
|
2
|
+
import { ApiClient } from "../lib/api-client.js";
|
|
3
|
+
import { resolveAppId } from "../lib/config.js";
|
|
4
|
+
import { success, error, info, keyValue, result as printResult, formatTable, formatId, formatDate, formatStatus, json, divider, dim, warn, } from "../lib/output.js";
|
|
5
|
+
import { assertSupportedFlags, buildWebhookEnvelope, } from "../lib/log-inspection.js";
|
|
6
|
+
import { confirmPrompt } from "../lib/confirm-prompt.js";
|
|
7
|
+
import { parseStatusFilter } from "../lib/object-status-filter.js";
|
|
8
|
+
import { signingSecretStatusWarning, signingSecretHealthWarning, previousSigningSecretWarning, formatGracePeriodMs, } from "../lib/signing-secret-status.js";
|
|
9
|
+
import { fetchAll } from "./sync.js";
|
|
10
|
+
/**
|
|
11
|
+
* Platform ceiling on a webhook body (`MAX_WEBHOOK_BODY_BYTES_LIMIT`, 25 MiB).
|
|
12
|
+
* A per-webhook cap can be lower — that one is the server's call and comes back
|
|
13
|
+
* as a `body_too_large` verdict. This bound only stops the CLI from reading and
|
|
14
|
+
* encoding a file no webhook could ever accept.
|
|
15
|
+
*/
|
|
16
|
+
const MAX_VERIFY_BODY_BYTES = 25 * 1024 * 1024;
|
|
17
|
+
export function registerWebhooksCommands(program) {
|
|
18
|
+
const webhooks = program
|
|
19
|
+
.command("webhooks")
|
|
20
|
+
.description("Manage inbound webhooks that trigger workflows")
|
|
21
|
+
.addHelpText("after", `
|
|
22
|
+
Examples:
|
|
23
|
+
$ primitive webhooks list
|
|
24
|
+
$ primitive secrets set STRIPE_WEBHOOK_SECRET --value whsec_...
|
|
25
|
+
$ primitive config create webhook stripe-events # then edit webhooks/stripe-events.toml and: primitive config push
|
|
26
|
+
$ primitive webhooks get 01HXY...
|
|
27
|
+
$ primitive webhooks rotate-secret 01HXY... --secret "{{secrets.STRIPE_WEBHOOK_SECRET_NEXT}}"
|
|
28
|
+
$ primitive webhooks events 01HXY...
|
|
29
|
+
$ primitive webhooks archive 01HXY... # retire it (soft delete)
|
|
30
|
+
$ primitive webhooks test 01HXY... --payload '{"event":"test"}'
|
|
31
|
+
$ primitive webhooks verify 01HXY... --header 'Stripe-Signature: t=...,v1=...' --body-file captured.json
|
|
32
|
+
`);
|
|
33
|
+
// Server-side configuration is authored in TOML and applied with `config push`
|
|
34
|
+
// (issue #2645) — this group no longer carries config-setting flags.
|
|
35
|
+
webhooks.addHelpText("after", `
|
|
36
|
+
Configuration lives in webhooks/<key>.toml:
|
|
37
|
+
$ primitive config fields webhook # the file's keys, types and defaults
|
|
38
|
+
$ primitive config create webhook <key> # scaffold one locally
|
|
39
|
+
$ primitive config set webhook/<key> <path>=<value>
|
|
40
|
+
$ primitive config push --only webhook/<key>
|
|
41
|
+
`);
|
|
42
|
+
// List webhooks
|
|
43
|
+
webhooks
|
|
44
|
+
.command("list")
|
|
45
|
+
.description("List webhooks")
|
|
46
|
+
.argument("[app-id]", "App ID (uses current app if not specified)")
|
|
47
|
+
.option("--app <app-id>", "App ID")
|
|
48
|
+
.option("--status <status>", "Filter by status: active, inactive, archived")
|
|
49
|
+
.option("--json", "Output as JSON")
|
|
50
|
+
.action(async (appId, options) => {
|
|
51
|
+
const resolvedAppId = resolveAppId(appId, options);
|
|
52
|
+
const client = new ApiClient();
|
|
53
|
+
try {
|
|
54
|
+
// #2803 — `paused` is gone; refuse it by name rather than returning the
|
|
55
|
+
// empty list a canonical filter would produce.
|
|
56
|
+
const status = parseStatusFilter("webhooks", options.status, [
|
|
57
|
+
"active",
|
|
58
|
+
"inactive",
|
|
59
|
+
"archived",
|
|
60
|
+
]);
|
|
61
|
+
// Drain every page (#2232). The admin list endpoint pages at 25 by
|
|
62
|
+
// default, so an app anywhere near the per-app webhook cap of 50 was
|
|
63
|
+
// silently truncated here — and this is the command an operator uses to
|
|
64
|
+
// find a webhook to hard-delete when a create is refused at the cap.
|
|
65
|
+
const items = await fetchAll((params) => client.listWebhooks(resolvedAppId, {
|
|
66
|
+
...params,
|
|
67
|
+
status,
|
|
68
|
+
}));
|
|
69
|
+
if (options.json) {
|
|
70
|
+
json(items);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!items || items.length === 0) {
|
|
74
|
+
info("No webhooks found.");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
console.log(formatTable(items, [
|
|
78
|
+
{ header: "KEY", key: "webhookKey" },
|
|
79
|
+
{ header: "NAME", key: "displayName" },
|
|
80
|
+
{ header: "SCHEME", key: "verificationScheme" },
|
|
81
|
+
{ header: "WORKFLOW", key: "workflowKey" },
|
|
82
|
+
{ header: "STATUS", key: "status", format: formatStatus },
|
|
83
|
+
{ header: "LAST TRIGGERED", key: "lastTriggeredAt", format: formatDate },
|
|
84
|
+
]));
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
error(err.message);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
webhooks
|
|
92
|
+
.command("get")
|
|
93
|
+
.description("Get webhook details")
|
|
94
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
95
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
96
|
+
.option("--json", "Output as JSON")
|
|
97
|
+
.action(async (webhookId, options) => {
|
|
98
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
99
|
+
const client = new ApiClient();
|
|
100
|
+
try {
|
|
101
|
+
const result = await client.getWebhook(resolvedAppId, webhookId);
|
|
102
|
+
if (options.json) {
|
|
103
|
+
json(result);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
printResult("Webhook ID", result.webhookId);
|
|
107
|
+
printResult("Key", result.webhookKey);
|
|
108
|
+
printResult("Name", result.displayName);
|
|
109
|
+
printResult("Description", result.description || "-");
|
|
110
|
+
printResult("Status", formatStatus(result.status));
|
|
111
|
+
printResult("Workflow Key", result.workflowKey);
|
|
112
|
+
printResult("Verification Scheme", result.verificationScheme);
|
|
113
|
+
printResult("Signing Secret", result.signingSecret || "-");
|
|
114
|
+
printResult("Previous Signing Secret", result.previousSigningSecret || "-");
|
|
115
|
+
// The grace slot's own status, so an operator can tell "no previous
|
|
116
|
+
// key" from "a raw value is still live there" — both print the previous
|
|
117
|
+
// secret as `-`, because a withheld value is never echoed (#2383).
|
|
118
|
+
printResult("Previous Signing Secret Status", result.previousSigningSecretStatus || "-");
|
|
119
|
+
// A stored value that is not a reference is never echoed, so say what
|
|
120
|
+
// it is here rather than showing an empty field: a legacy literal from
|
|
121
|
+
// before reference-only still verifies deliveries, a malformed
|
|
122
|
+
// reference does not (#2332). Same wording as `config pull`.
|
|
123
|
+
const signingSecretWarning = signingSecretStatusWarning(result.signingSecretStatus, {
|
|
124
|
+
subject: "Signing secret",
|
|
125
|
+
blocks: "this webhook cannot be updated or rotated",
|
|
126
|
+
});
|
|
127
|
+
if (signingSecretWarning)
|
|
128
|
+
warn(signingSecretWarning);
|
|
129
|
+
// The grace slot gets its own line: a raw value there keeps verifying
|
|
130
|
+
// deliveries even though the row's current slot reads as migrated
|
|
131
|
+
// (#2383). The lever is the grace period, not a migration.
|
|
132
|
+
const previousWarning = previousSigningSecretWarning(result.previousSigningSecretStatus, { subject: "Previous signing secret" });
|
|
133
|
+
if (previousWarning)
|
|
134
|
+
warn(previousWarning);
|
|
135
|
+
// The health axis, per slot — anything that is not `ok`.
|
|
136
|
+
const healthWarning = signingSecretHealthWarning(result.signingSecretHealth, { subject: "Signing secret" });
|
|
137
|
+
if (healthWarning)
|
|
138
|
+
warn(healthWarning);
|
|
139
|
+
const previousHealthWarning = signingSecretHealthWarning(result.previousSigningSecretHealth, { subject: "Previous signing secret" });
|
|
140
|
+
if (previousHealthWarning)
|
|
141
|
+
warn(previousHealthWarning);
|
|
142
|
+
divider();
|
|
143
|
+
info("Configuration:");
|
|
144
|
+
printResult(" Tolerance Seconds", String(result.toleranceSeconds ?? "-"));
|
|
145
|
+
printResult(" Deduplication", result.deduplicationEnabled ? "enabled" : "disabled");
|
|
146
|
+
printResult(" Dedup Window", result.deduplicationWindowMs ? `${result.deduplicationWindowMs}ms` : "-");
|
|
147
|
+
printResult(" Max Body Bytes", result.maxBodyBytes ? `${result.maxBodyBytes}` : "default (5 MiB)");
|
|
148
|
+
// Not a truthiness test: a stored `0` means immediate cutover, which is
|
|
149
|
+
// the opposite of the unset case's 24 h default (#2383).
|
|
150
|
+
printResult(" Grace Period", formatGracePeriodMs(result.secretGracePeriodMs));
|
|
151
|
+
printResult(" Allowed IPs", result.allowedIpCidrs || "-");
|
|
152
|
+
printResult(" Input Mapping", result.inputMapping || "-");
|
|
153
|
+
divider();
|
|
154
|
+
printResult("Last Triggered", result.lastTriggeredAt ? formatDate(result.lastTriggeredAt) : "never");
|
|
155
|
+
printResult("Created", formatDate(result.createdAt));
|
|
156
|
+
printResult("Modified", formatDate(result.modifiedAt));
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
error(err.message);
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
// #2645 criterion 9 / #2803 — the operational verbs. They are the only
|
|
164
|
+
// writers of `status`, which is server-owned and no longer a `[webhook]`
|
|
165
|
+
// TOML key: `config push` can neither set nor clear it, so pushing a file
|
|
166
|
+
// pulled before a pause no longer puts the endpoint back in service.
|
|
167
|
+
webhooks
|
|
168
|
+
.command("disable")
|
|
169
|
+
.description("Take a webhook out of service now. Inbound deliveries are refused with a 410; the committed configuration is unchanged.")
|
|
170
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
171
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
172
|
+
.option("--json", "Output as JSON")
|
|
173
|
+
.action(async (webhookId, options) => {
|
|
174
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
175
|
+
const client = new ApiClient();
|
|
176
|
+
try {
|
|
177
|
+
const result = await client.setWebhookAvailability(resolvedAppId, webhookId, "disable");
|
|
178
|
+
if (options.json) {
|
|
179
|
+
json(result);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
success(`Webhook disabled: ${result.webhookKey || webhookId}`);
|
|
183
|
+
info("Deliveries are refused with a 410 — `primitive webhooks enable` puts it back.");
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
error(err.message);
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
webhooks
|
|
191
|
+
.command("enable")
|
|
192
|
+
.description("Put a webhook back in service.")
|
|
193
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
194
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
195
|
+
.option("--json", "Output as JSON")
|
|
196
|
+
.action(async (webhookId, options) => {
|
|
197
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
198
|
+
const client = new ApiClient();
|
|
199
|
+
try {
|
|
200
|
+
const result = await client.setWebhookAvailability(resolvedAppId, webhookId, "enable");
|
|
201
|
+
if (options.json) {
|
|
202
|
+
json(result);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
success(`Webhook enabled: ${result.webhookKey || webhookId}`);
|
|
206
|
+
}
|
|
207
|
+
catch (err) {
|
|
208
|
+
error(err.message);
|
|
209
|
+
process.exit(1);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
// #2907 — the delete flow's CLI spelling. Not a second writer of `status`:
|
|
213
|
+
// this is the plain `DELETE` the server has always answered by writing the
|
|
214
|
+
// tombstone, which until now only the admin API and the console could reach.
|
|
215
|
+
// Named `archive`, not `delete`, because a configuration noun gets no
|
|
216
|
+
// `delete` verb (docs/cli-design.md) and prune-by-push stays the only CLI
|
|
217
|
+
// hard-delete path.
|
|
218
|
+
webhooks
|
|
219
|
+
.command("archive")
|
|
220
|
+
.description("Retire a webhook (soft delete). Delete-lifecycle, not `disable`: the row is kept, keeps its key and its capped slot, and there is no un-archive.")
|
|
221
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
222
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
223
|
+
.option("-y, --yes", "Skip confirmation prompt")
|
|
224
|
+
.option("--json", "Output as JSON")
|
|
225
|
+
.addHelpText("after", `
|
|
226
|
+
What archiving a webhook costs:
|
|
227
|
+
Inbound deliveries are refused, as they are for a disabled webhook.
|
|
228
|
+
The archived row still holds its webhookKey AND its slot under the per-app
|
|
229
|
+
webhook cap (50) — archiving frees neither, which is why an archived row a
|
|
230
|
+
delivery still reaches is not free.
|
|
231
|
+
\`primitive webhooks enable\` refuses an archived webhook; there is no
|
|
232
|
+
un-archive.
|
|
233
|
+
|
|
234
|
+
Reclaiming the key and the slot means hard-deleting the row:
|
|
235
|
+
$ rm webhooks/<key>.toml
|
|
236
|
+
$ primitive config push --prune # confirmed; hard-deletes the row
|
|
237
|
+
# or hard-delete it in the console, then re-add the file and push.
|
|
238
|
+
`)
|
|
239
|
+
.action(async (webhookId, options) => {
|
|
240
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
241
|
+
if (!options.yes) {
|
|
242
|
+
let confirmed;
|
|
243
|
+
try {
|
|
244
|
+
confirmed = await confirmPrompt(`Archive webhook ${webhookId}? Deliveries stop, the row keeps its key ` +
|
|
245
|
+
`and its capped slot, and there is no un-archive.`);
|
|
246
|
+
}
|
|
247
|
+
catch (err) {
|
|
248
|
+
error(err.message);
|
|
249
|
+
process.exit(1);
|
|
250
|
+
}
|
|
251
|
+
if (!confirmed) {
|
|
252
|
+
info("Cancelled.");
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const client = new ApiClient();
|
|
257
|
+
try {
|
|
258
|
+
// The soft delete: no `hard`, so the server writes the tombstone. The
|
|
259
|
+
// `--hard` path stays out of the CLI surface — prune-by-push owns it.
|
|
260
|
+
const result = await client.deleteWebhook(resolvedAppId, webhookId);
|
|
261
|
+
if (options.json) {
|
|
262
|
+
json(result);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
success(`Webhook archived: ${webhookId}`);
|
|
266
|
+
info("Deliveries are refused. The row still holds its key and its capped slot — reclaim both by removing its file and running a confirmed `primitive config push --prune`.");
|
|
267
|
+
}
|
|
268
|
+
catch (err) {
|
|
269
|
+
error(err.message);
|
|
270
|
+
process.exit(1);
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
webhooks
|
|
274
|
+
.command("rotate-secret")
|
|
275
|
+
.description("Rotate the signing secret for a webhook")
|
|
276
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
277
|
+
.requiredOption("--secret <ref>", "New signing secret, as a {{secrets.KEY}} reference to an app secret")
|
|
278
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
279
|
+
.option("--json", "Output as JSON")
|
|
280
|
+
.action(async (webhookId, options) => {
|
|
281
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
282
|
+
const client = new ApiClient();
|
|
283
|
+
try {
|
|
284
|
+
const result = await client.rotateWebhookSecret(resolvedAppId, webhookId, {
|
|
285
|
+
signingSecret: options.secret,
|
|
286
|
+
});
|
|
287
|
+
if (options.json) {
|
|
288
|
+
json(result);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
// Rotation now returns the serialized webhook on both surfaces, and
|
|
292
|
+
// both references are plain text (the secret values live only in the
|
|
293
|
+
// secret store), so print them rather than a masked value.
|
|
294
|
+
success("Signing secret rotated.");
|
|
295
|
+
if (result.signingSecret) {
|
|
296
|
+
keyValue("Signing Secret", result.signingSecret);
|
|
297
|
+
}
|
|
298
|
+
if (result.previousSigningSecret) {
|
|
299
|
+
keyValue("Previous Signing Secret", result.previousSigningSecret);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
error(err.message);
|
|
304
|
+
process.exit(1);
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
// List webhook events
|
|
308
|
+
webhooks
|
|
309
|
+
.command("events")
|
|
310
|
+
.description("View webhook event history")
|
|
311
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
312
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
313
|
+
.option("--limit <n>", "Number of events to show", "20")
|
|
314
|
+
.option("--cursor <cursor>", "Pagination cursor from a previous page")
|
|
315
|
+
// Declared so they can be rejected with a clear message instead of being
|
|
316
|
+
// silently ignored — status/time filtering on webhook events is deferred to
|
|
317
|
+
// Phase B (issue #1967). See assertSupportedFlags below.
|
|
318
|
+
.option("--status <status>", "(not supported yet — deferred to Phase B)")
|
|
319
|
+
.option("--from <iso>", "(not supported yet — deferred to Phase B)")
|
|
320
|
+
.option("--to <iso>", "(not supported yet — deferred to Phase B)")
|
|
321
|
+
.option("--json", "Output as JSON")
|
|
322
|
+
.action(async (webhookId, options) => {
|
|
323
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
324
|
+
const client = new ApiClient();
|
|
325
|
+
try {
|
|
326
|
+
// The webhook-events route serves limit + cursor only; reject the
|
|
327
|
+
// Phase B filters cleanly rather than dropping them silently.
|
|
328
|
+
assertSupportedFlags("webhook events", { status: options.status, from: options.from, to: options.to }, ["limit", "cursor"]);
|
|
329
|
+
const page = await client.listWebhookEvents(resolvedAppId, webhookId, {
|
|
330
|
+
limit: parseInt(options.limit),
|
|
331
|
+
...(options.cursor && { cursor: options.cursor }),
|
|
332
|
+
});
|
|
333
|
+
if (options.json) {
|
|
334
|
+
json(buildWebhookEnvelope(page.items, page));
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const printCursorHint = () => {
|
|
338
|
+
if (!page.nextCursor)
|
|
339
|
+
return;
|
|
340
|
+
console.log();
|
|
341
|
+
dim(`More events. Use --cursor ${page.nextCursor} for the next page.`);
|
|
342
|
+
};
|
|
343
|
+
if (!page.items || page.items.length === 0) {
|
|
344
|
+
info("No events found.");
|
|
345
|
+
printCursorHint();
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
console.log(formatTable(page.items, [
|
|
349
|
+
{ header: "EVENT ID", key: "eventId", format: formatId },
|
|
350
|
+
{ header: "EXTERNAL ID", key: "externalEventId" },
|
|
351
|
+
{ header: "STATUS", key: "status", format: formatStatus },
|
|
352
|
+
{ header: "HTTP", key: "httpStatus" },
|
|
353
|
+
{ header: "REASON", key: "rejectionReason" },
|
|
354
|
+
{ header: "CREATED", key: "createdAt", format: formatDate },
|
|
355
|
+
]));
|
|
356
|
+
printCursorHint();
|
|
357
|
+
}
|
|
358
|
+
catch (err) {
|
|
359
|
+
error(err.message);
|
|
360
|
+
process.exit(1);
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
// Test webhook
|
|
364
|
+
webhooks
|
|
365
|
+
.command("test")
|
|
366
|
+
.description("Sign a test payload for a webhook (returns body + headers)")
|
|
367
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
368
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
369
|
+
.option("--payload <json>", "Test payload as JSON, signed verbatim. Pass the event " +
|
|
370
|
+
"object directly (e.g. '{\"type\":\"event\",\"data\":{…}}'); it is used " +
|
|
371
|
+
"as-is. Omit it to sign a canned webhook.test ping.")
|
|
372
|
+
.option("--json", "Output as JSON")
|
|
373
|
+
.addHelpText("after", `
|
|
374
|
+
This command signs a payload and prints the signature headers and the signed
|
|
375
|
+
body. It does NOT post them to the webhook's receive endpoint, so no workflow
|
|
376
|
+
runs and no delivery is recorded — send the returned body with the returned
|
|
377
|
+
headers to POST /app/{appId}/webhook/{webhookKey} yourself to do that.
|
|
378
|
+
|
|
379
|
+
The value of --payload is signed exactly as given (WYSIWYG). A JSON object is
|
|
380
|
+
used as the test body verbatim, so a wrapped payload such as '{"payload":{…}}'
|
|
381
|
+
signs the literal wrapper — do not wrap the event. Omitting --payload (or
|
|
382
|
+
passing a non-object such as an array) signs the canned
|
|
383
|
+
{"type":"webhook.test", …} ping.
|
|
384
|
+
`)
|
|
385
|
+
.action(async (webhookId, options) => {
|
|
386
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
387
|
+
let payload = {};
|
|
388
|
+
if (options.payload) {
|
|
389
|
+
try {
|
|
390
|
+
payload = JSON.parse(options.payload);
|
|
391
|
+
}
|
|
392
|
+
catch {
|
|
393
|
+
error("Invalid JSON in --payload");
|
|
394
|
+
process.exit(1);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
const client = new ApiClient();
|
|
398
|
+
try {
|
|
399
|
+
const result = await client.testWebhook(resolvedAppId, webhookId, payload);
|
|
400
|
+
if (options.json) {
|
|
401
|
+
json(result);
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
if (result.success) {
|
|
405
|
+
success("Test payload signed. Nothing was delivered — post the signed body " +
|
|
406
|
+
"(--json shows the exact rawBody) with these headers to the " +
|
|
407
|
+
"receive endpoint to trigger the workflow.");
|
|
408
|
+
if (result.signatureHeaders) {
|
|
409
|
+
divider();
|
|
410
|
+
info("Generated Signature Headers:");
|
|
411
|
+
for (const [header, value] of Object.entries(result.signatureHeaders)) {
|
|
412
|
+
keyValue(` ${header}`, String(value));
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
if (result.payload) {
|
|
416
|
+
divider();
|
|
417
|
+
info("Test Payload:");
|
|
418
|
+
console.log(JSON.stringify(result.payload, null, 2));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
error(`Test failed: ${result.message || result.errorCode || "unknown error"}`);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
catch (err) {
|
|
426
|
+
// The server refuses a preview it cannot sign with a coded 400 — the
|
|
427
|
+
// scheme holds only public key material, the row still stores a raw
|
|
428
|
+
// secret, the signing secret is unset or unresolvable (#2445). Print
|
|
429
|
+
// the machine-readable code alongside the message, the established
|
|
430
|
+
// convention here: the prose explains, the code is what an operator
|
|
431
|
+
// searches for or reports.
|
|
432
|
+
error(err?.code ? `${err.message} (${err.code})` : err.message);
|
|
433
|
+
process.exit(1);
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
// Verify a captured delivery's signature
|
|
437
|
+
webhooks
|
|
438
|
+
.command("verify")
|
|
439
|
+
.description("Check whether signature headers you captured verify against a webhook")
|
|
440
|
+
.argument("<webhook-id>", "Webhook ID")
|
|
441
|
+
.option("--app <app-id>", "App ID (uses current app if not specified)")
|
|
442
|
+
.option("--header <name: value>", "A header from the captured delivery. Repeatable.", (value, previous) => [...(previous || []), value], [])
|
|
443
|
+
.option("--body <text>", "The captured delivery body, as text")
|
|
444
|
+
.option("--body-file <path>", "Read the captured delivery body from a file")
|
|
445
|
+
.option("--json", "Output as JSON")
|
|
446
|
+
.addHelpText("after", `
|
|
447
|
+
Runs the webhook's configured verifier over the body and headers you supply and
|
|
448
|
+
reports whether that signature checks out — the useful question when a real
|
|
449
|
+
delivery was rejected 401, and the only way to check a scheme the platform holds
|
|
450
|
+
only public key material for (discord, jwt, plaid), which \`webhooks test\`
|
|
451
|
+
cannot preview.
|
|
452
|
+
|
|
453
|
+
Nothing is delivered: no workflow runs, and no delivery is recorded (this check
|
|
454
|
+
never appears in \`primitive webhooks events\`).
|
|
455
|
+
|
|
456
|
+
It answers SIGNATURE verification only. A real delivery is also subject to the
|
|
457
|
+
webhook's status and IP allowlist before verification, and to handshake rules
|
|
458
|
+
and deduplication after it.
|
|
459
|
+
|
|
460
|
+
Exits 0 when the signature verifies and non-zero otherwise, so it composes in a
|
|
461
|
+
script.
|
|
462
|
+
|
|
463
|
+
$ primitive webhooks verify 01HXY... \\
|
|
464
|
+
--header 'Stripe-Signature: t=1754...,v1=abc...' \\
|
|
465
|
+
--body-file captured-delivery.json
|
|
466
|
+
`)
|
|
467
|
+
.action(async (webhookId, options) => {
|
|
468
|
+
const resolvedAppId = resolveAppId(undefined, options);
|
|
469
|
+
if (options.body !== undefined && options.bodyFile !== undefined) {
|
|
470
|
+
error("Pass --body or --body-file, not both.");
|
|
471
|
+
process.exit(1);
|
|
472
|
+
}
|
|
473
|
+
let rawBody;
|
|
474
|
+
let bodyBase64;
|
|
475
|
+
if (options.bodyFile !== undefined) {
|
|
476
|
+
let bytes;
|
|
477
|
+
try {
|
|
478
|
+
// Size first: a mistakenly-passed large file should be a clear CLI
|
|
479
|
+
// error rather than a buffer the command tries to base64 and ship.
|
|
480
|
+
const { size } = statSync(options.bodyFile);
|
|
481
|
+
if (size > MAX_VERIFY_BODY_BYTES) {
|
|
482
|
+
error(`--body-file is ${size} bytes, over the ${MAX_VERIFY_BODY_BYTES}-byte platform maximum for a webhook body. A delivery that large is refused before its signature is checked.`);
|
|
483
|
+
process.exit(1);
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
bytes = readFileSync(options.bodyFile);
|
|
487
|
+
}
|
|
488
|
+
catch (err) {
|
|
489
|
+
error(`Could not read --body-file: ${err.message}`);
|
|
490
|
+
process.exit(1);
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
// A signature is over BYTES. Decoding a capture that is not valid
|
|
494
|
+
// UTF-8 replaces each bad byte with U+FFFD, so sending it as `rawBody`
|
|
495
|
+
// would check the signature against bytes the provider never sent and
|
|
496
|
+
// report a confident `sig_invalid` — the wrong answer in exactly the
|
|
497
|
+
// case this command exists for. `bodyBase64` carries those bytes
|
|
498
|
+
// intact, so only a body that round-trips losslessly goes as text.
|
|
499
|
+
const asText = bytes.toString("utf-8");
|
|
500
|
+
if (Buffer.from(asText, "utf-8").equals(bytes)) {
|
|
501
|
+
rawBody = asText;
|
|
502
|
+
}
|
|
503
|
+
else {
|
|
504
|
+
bodyBase64 = bytes.toString("base64");
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
// An empty body is a legitimate delivery, so an omitted --body means
|
|
509
|
+
// "the delivery carried no body" rather than "no body was supplied".
|
|
510
|
+
rawBody = options.body ?? "";
|
|
511
|
+
}
|
|
512
|
+
// Ordered pairs, not an object: a real capture can carry the same field
|
|
513
|
+
// name on more than one line, which an object cannot represent.
|
|
514
|
+
const headers = [];
|
|
515
|
+
for (const entry of (options.header || [])) {
|
|
516
|
+
const separator = entry.indexOf(":");
|
|
517
|
+
if (separator <= 0) {
|
|
518
|
+
error(`Invalid --header '${entry}'. Use 'Name: value'.`);
|
|
519
|
+
process.exit(1);
|
|
520
|
+
}
|
|
521
|
+
headers.push([
|
|
522
|
+
entry.slice(0, separator).trim(),
|
|
523
|
+
entry.slice(separator + 1).trim(),
|
|
524
|
+
]);
|
|
525
|
+
}
|
|
526
|
+
const client = new ApiClient();
|
|
527
|
+
try {
|
|
528
|
+
const result = await client.verifyWebhook(resolvedAppId, webhookId, {
|
|
529
|
+
headers,
|
|
530
|
+
// Exactly one body form — the server refuses a request naming both.
|
|
531
|
+
...(bodyBase64 !== undefined ? { bodyBase64 } : { rawBody }),
|
|
532
|
+
});
|
|
533
|
+
if (options.json) {
|
|
534
|
+
json(result);
|
|
535
|
+
}
|
|
536
|
+
else if (result.verified) {
|
|
537
|
+
success("Signature verified.");
|
|
538
|
+
keyValue(" Scheme", String(result.verificationScheme));
|
|
539
|
+
if (result.dedupKey)
|
|
540
|
+
keyValue(" Dedup key", String(result.dedupKey));
|
|
541
|
+
if (result.externalEventId) {
|
|
542
|
+
keyValue(" Event ID", String(result.externalEventId));
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
error("Signature did NOT verify.");
|
|
547
|
+
keyValue(" Scheme", String(result.verificationScheme));
|
|
548
|
+
keyValue(" Reason", String(result.rejectionReason || "unknown"));
|
|
549
|
+
}
|
|
550
|
+
if (result.webhookStatus && result.webhookStatus !== "active") {
|
|
551
|
+
warn(`This webhook is ${result.webhookStatus} — a live delivery would be refused before its signature was checked.`);
|
|
552
|
+
}
|
|
553
|
+
if (!result.verified)
|
|
554
|
+
process.exit(1);
|
|
555
|
+
}
|
|
556
|
+
catch (err) {
|
|
557
|
+
error(err?.code ? `${err.message} (${err.code})` : err.message);
|
|
558
|
+
process.exit(1);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
//# sourceMappingURL=webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/commands/webhooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,OAAO,EACP,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,MAAM,IAAI,WAAW,EACrB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,GAAG,EACH,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,m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