@superblocksteam/shared 0.9619.10 → 0.9620.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings/utils.d.ts.map +1 -1
- package/dist/bindings/utils.js +1 -1
- package/dist/bindings/utils.js.map +1 -1
- package/dist/constants.d.ts +10 -8
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -12
- package/dist/constants.js.map +1 -1
- package/dist/database-lifecycle/appDatabaseCompatibility.d.ts +2 -2
- package/dist/database-lifecycle/appDatabaseCompatibility.d.ts.map +1 -1
- package/dist/database-lifecycle/appDatabaseImport.d.ts +18 -2
- package/dist/database-lifecycle/appDatabaseImport.d.ts.map +1 -1
- package/dist/database-lifecycle/appDatabaseImport.js.map +1 -1
- package/dist/database-lifecycle/appDatabaseStatus.d.ts +12 -2
- package/dist/database-lifecycle/appDatabaseStatus.d.ts.map +1 -1
- package/dist/database-lifecycle/appDatabaseStatus.js +8 -2
- package/dist/database-lifecycle/appDatabaseStatus.js.map +1 -1
- package/dist/database-lifecycle/appDatabaseStatus.test.js +2 -0
- package/dist/database-lifecycle/appDatabaseStatus.test.js.map +1 -1
- package/dist/database-lifecycle/capacityPolicy.d.ts +2 -2
- package/dist/database-lifecycle/capacityPolicy.d.ts.map +1 -1
- package/dist/database-lifecycle/capacityPolicy.js.map +1 -1
- package/dist/database-lifecycle/dataImport.d.ts +7 -4
- package/dist/database-lifecycle/dataImport.d.ts.map +1 -1
- package/dist/database-lifecycle/dataImport.js.map +1 -1
- package/dist/database-lifecycle/destructiveMigrations.d.ts +3 -3
- package/dist/database-lifecycle/destructiveMigrations.js.map +1 -1
- package/dist/database-lifecycle/importCompatibility.d.ts +15 -2
- package/dist/database-lifecycle/importCompatibility.d.ts.map +1 -1
- package/dist/database-lifecycle/importCompatibility.js +33 -0
- package/dist/database-lifecycle/importCompatibility.js.map +1 -1
- package/dist/database-lifecycle/importCompatibility.test.js +47 -1
- package/dist/database-lifecycle/importCompatibility.test.js.map +1 -1
- package/dist/database-lifecycle/index.d.ts +18 -14
- package/dist/database-lifecycle/index.d.ts.map +1 -1
- package/dist/database-lifecycle/index.js +4 -0
- package/dist/database-lifecycle/index.js.map +1 -1
- package/dist/database-lifecycle/physicalPoolIdentity.d.ts.map +1 -1
- package/dist/database-lifecycle/physicalPoolIdentity.js.map +1 -1
- package/dist/errors/git.d.ts.map +1 -1
- package/dist/errors/http.d.ts.map +1 -1
- package/dist/errors/integration.d.ts.map +1 -1
- package/dist/errors/integration.js +1 -1
- package/dist/errors/integration.js.map +1 -1
- package/dist/headers.d.ts +9 -0
- package/dist/headers.d.ts.map +1 -0
- package/dist/headers.js +12 -0
- package/dist/headers.js.map +1 -0
- package/dist/jwt/verifier.d.ts.map +1 -1
- package/dist/jwt/verifier.js +1 -1
- package/dist/jwt/verifier.js.map +1 -1
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +1 -0
- package/dist/observability/index.js.map +1 -1
- package/dist/org-features/index.d.ts +2 -2
- package/dist/org-features/index.d.ts.map +1 -1
- package/dist/package.json +1 -1
- package/dist/pageMigrations/migrations/v4to5.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.js +6 -1
- package/dist/pageMigrations/migrations/v5to6.js.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.test.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.test.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.js +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.test.js +2 -2
- package/dist/pageMigrations/migrations/v6to7/migrateToSections.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/v6to7.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.js +2 -1
- package/dist/pageMigrations/migrations/v7to8.js.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.test.js +1 -1
- package/dist/pages/pageV6.d.ts.map +1 -1
- package/dist/pages/pageV7.d.ts.map +1 -1
- package/dist/pages/pageV8.d.ts.map +1 -1
- package/dist/pages/pageV8.js +1 -1
- package/dist/pages/pageV8.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/templates/constants.d.ts +1 -1
- package/dist/plugins/templates/constants.d.ts.map +1 -1
- package/dist/plugins/templates/graphql.d.ts.map +1 -1
- package/dist/plugins/templates/gsheets.d.ts.map +1 -1
- package/dist/plugins/templates/lakebase.d.ts.map +1 -1
- package/dist/plugins/templates/mcp.d.ts.map +1 -1
- package/dist/plugins/templates/mcp.test.js +13 -0
- package/dist/plugins/templates/mcp.test.js.map +1 -1
- package/dist/plugins/templates/salesforce.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.js +16 -0
- package/dist/plugins/templates/shared/auth.js.map +1 -1
- package/dist/plugins/templates/shared/aws.d.ts.map +1 -1
- package/dist/plugins/templates/shared/db.d.ts.map +1 -1
- package/dist/plugins/templates/shared/openapi.d.ts.map +1 -1
- package/dist/plugins/templates/shared/openapi.js +1 -1
- package/dist/plugins/templates/shared/openapi.js.map +1 -1
- package/dist/plugins/templates/shared/restapiintegration.d.ts.map +1 -1
- package/dist/plugins/templates/shared/sql.d.ts.map +1 -1
- package/dist/plugins/templates/shared/sshtunnel.d.ts.map +1 -1
- package/dist/plugins/templates/snowflakepostgres.d.ts.map +1 -1
- package/dist/plugins/unsupported-integration-types.d.ts +10 -0
- package/dist/plugins/unsupported-integration-types.d.ts.map +1 -0
- package/dist/plugins/unsupported-integration-types.js +29 -0
- package/dist/plugins/unsupported-integration-types.js.map +1 -0
- package/dist/refactoring/application.d.ts.map +1 -1
- package/dist/refactoring/application.js +2 -1
- package/dist/refactoring/application.js.map +1 -1
- package/dist/refactoring/refactor.d.ts.map +1 -1
- package/dist/refactoring/refactor.js +4 -1
- package/dist/refactoring/refactor.js.map +1 -1
- package/dist/refactoring/refactor.test.js +274 -260
- package/dist/refactoring/refactor.test.js.map +1 -1
- package/dist/refactoring/rename.js +1 -1
- package/dist/refactoring/rename.js.map +1 -1
- package/dist/refactoring/updates.d.ts.map +1 -1
- package/dist/refactoring/updates.js +3 -1
- package/dist/refactoring/updates.js.map +1 -1
- package/dist/relay/builder.d.ts.map +1 -1
- package/dist/signing/JSON/portable.js +2 -2
- package/dist/signing/index.js +1 -1
- package/dist/signing/index.js.map +1 -1
- package/dist/socket/dist-entry.test.js +10 -2
- package/dist/socket/dist-entry.test.js.map +1 -1
- package/dist/socket/heartbeat.d.ts.map +1 -1
- package/dist/socket/heartbeat.js.map +1 -1
- package/dist/socket/heartbeat.test.js.map +1 -1
- package/dist/socket/protocol.d.ts +26 -0
- package/dist/socket/protocol.d.ts.map +1 -1
- package/dist/socket/socket.d.ts +1 -1
- package/dist/socket/socket.d.ts.map +1 -1
- package/dist/socket/socket.js +2 -2
- package/dist/socket/socketWithClientAuth.d.ts.map +1 -1
- package/dist/socket/tracedSocket.d.ts.map +1 -1
- package/dist/socket/types.d.ts.map +1 -1
- package/dist/socket/util.js.map +1 -1
- package/dist/tracing/methodTracing.js +1 -1
- package/dist/types/ai/builder-caller.d.ts +16 -0
- package/dist/types/ai/builder-caller.d.ts.map +1 -0
- package/dist/types/ai/builder-caller.js +64 -0
- package/dist/types/ai/builder-caller.js.map +1 -0
- package/dist/types/ai/builder-caller.test.d.ts +2 -0
- package/dist/types/ai/builder-caller.test.d.ts.map +1 -0
- package/dist/types/ai/builder-caller.test.js +40 -0
- package/dist/types/ai/builder-caller.test.js.map +1 -0
- package/dist/types/ai/index.d.ts +25 -3
- package/dist/types/ai/index.d.ts.map +1 -1
- package/dist/types/ai/index.js +3 -0
- package/dist/types/ai/index.js.map +1 -1
- package/dist/types/ai/native-builder-model.d.ts +21 -0
- package/dist/types/ai/native-builder-model.d.ts.map +1 -0
- package/dist/types/ai/native-builder-model.js +26 -0
- package/dist/types/ai/native-builder-model.js.map +1 -0
- package/dist/types/ai/native-builder-model.test.d.ts +2 -0
- package/dist/types/ai/native-builder-model.test.d.ts.map +1 -0
- package/dist/types/ai/native-builder-model.test.js +30 -0
- package/dist/types/ai/native-builder-model.test.js.map +1 -0
- package/dist/types/ai/provider-credential.d.ts +1 -1
- package/dist/types/ai/provider-credential.d.ts.map +1 -1
- package/dist/types/ai/quota-paywall.d.ts.map +1 -1
- package/dist/types/ai/safety-classification.d.ts +1 -1
- package/dist/types/ai/safety-classification.d.ts.map +1 -1
- package/dist/types/api/control-flow.d.ts +12 -12
- package/dist/types/api/control-flow.d.ts.map +1 -1
- package/dist/types/api/control-flow.js.map +1 -1
- package/dist/types/api/execution.d.ts.map +1 -1
- package/dist/types/api/execution.js +4 -1
- package/dist/types/api/execution.js.map +1 -1
- package/dist/types/api/global.d.ts.map +1 -1
- package/dist/types/api/global.js +2 -3
- package/dist/types/api/global.js.map +1 -1
- package/dist/types/api/index.d.ts +1 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/schedule.d.ts.map +1 -1
- package/dist/types/application/index.d.ts +3 -0
- package/dist/types/application/index.d.ts.map +1 -1
- package/dist/types/application/index.js.map +1 -1
- package/dist/types/application/index.test.js.map +1 -1
- package/dist/types/audit/ocsf.d.ts.map +1 -1
- package/dist/types/audit/ocsf.js +1 -0
- package/dist/types/audit/ocsf.js.map +1 -1
- package/dist/types/branch/index.d.ts +107 -0
- package/dist/types/branch/index.d.ts.map +1 -1
- package/dist/types/codeSecurity/index.d.ts +3 -3
- package/dist/types/codeSecurity/index.d.ts.map +1 -1
- package/dist/types/common/env.d.ts.map +1 -1
- package/dist/types/common/response.d.ts +3 -0
- package/dist/types/common/response.d.ts.map +1 -1
- package/dist/types/common/response.js +2 -0
- package/dist/types/common/response.js.map +1 -1
- package/dist/types/credentials/index.d.ts +3 -3
- package/dist/types/credentials/index.d.ts.map +1 -1
- package/dist/types/customAgents.d.ts +2 -3
- package/dist/types/customAgents.d.ts.map +1 -1
- package/dist/types/datasource/auth.d.ts.map +1 -1
- package/dist/types/datasource/auth.js +1 -1
- package/dist/types/datasource/auth.js.map +1 -1
- package/dist/types/datasource/index.d.ts.map +1 -1
- package/dist/types/datasource/metadata/database.d.ts.map +1 -1
- package/dist/types/event/index.d.ts +4 -3
- package/dist/types/event/index.d.ts.map +1 -1
- package/dist/types/event/index.js +1 -0
- package/dist/types/event/index.js.map +1 -1
- package/dist/types/group/index.d.ts.map +1 -1
- package/dist/types/integration/index.d.ts.map +1 -1
- package/dist/types/integration/index.js +2 -2
- package/dist/types/metadata/index.d.ts.map +1 -1
- package/dist/types/organization/agent.d.ts.map +1 -1
- package/dist/types/organization/token.d.ts.map +1 -1
- package/dist/types/page/Dimension.d.ts +7 -7
- package/dist/types/page/Dimension.d.ts.map +1 -1
- package/dist/types/page/Dimension.js +1 -1
- package/dist/types/page/Dimension.js.map +1 -1
- package/dist/types/page/Dimension.test.js +1 -1
- package/dist/types/page/Padding.d.ts +2 -2
- package/dist/types/page/Padding.d.ts.map +1 -1
- package/dist/types/page/Padding.js +1 -1
- package/dist/types/page/event.d.ts.map +1 -1
- package/dist/types/page/event.js +2 -1
- package/dist/types/page/event.js.map +1 -1
- package/dist/types/plugin/evaluation.d.ts +12 -5
- package/dist/types/plugin/evaluation.d.ts.map +1 -1
- package/dist/types/plugin/evaluation.js +8 -6
- package/dist/types/plugin/evaluation.js.map +1 -1
- package/dist/types/plugin/form.d.ts +1 -1
- package/dist/types/plugin/form.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/plugin/integration.d.ts.map +1 -1
- package/dist/types/plugin/js-tokenizer.d.ts +14 -0
- package/dist/types/plugin/js-tokenizer.d.ts.map +1 -0
- package/dist/types/plugin/js-tokenizer.js +97 -0
- package/dist/types/plugin/js-tokenizer.js.map +1 -0
- package/dist/types/plugin/js-tokenizer.test.d.ts +2 -0
- package/dist/types/plugin/js-tokenizer.test.d.ts.map +1 -0
- package/dist/types/plugin/js-tokenizer.test.js +126 -0
- package/dist/types/plugin/js-tokenizer.test.js.map +1 -0
- package/dist/types/policyGate/errors.d.ts +23 -23
- package/dist/types/policyGate/errors.d.ts.map +1 -1
- package/dist/types/profile/index.d.ts.map +1 -1
- package/dist/types/publishPipeline/index.d.ts +6 -6
- package/dist/types/publishPipeline/index.d.ts.map +1 -1
- package/dist/types/publishPipeline/policyStatus.js.map +1 -1
- package/dist/types/rbac/index.d.ts +4 -0
- package/dist/types/rbac/index.d.ts.map +1 -1
- package/dist/types/rbac/index.js +4 -0
- package/dist/types/rbac/index.js.map +1 -1
- package/dist/types/repository/index.d.ts.map +1 -1
- package/dist/types/repository/index.js.map +1 -1
- package/dist/types/reviewPolicy/index.d.ts +24 -24
- package/dist/types/reviewPolicy/index.d.ts.map +1 -1
- package/dist/types/user/analytics.d.ts +1 -1
- package/dist/types/user/analytics.d.ts.map +1 -1
- package/dist/utils/apiv2.d.ts.map +1 -1
- package/dist/utils/apiv2.js +1 -1
- package/dist/utils/apiv2.test.js +10 -10
- package/dist/utils/appDSL.d.ts.map +1 -1
- package/dist/utils/attachment-upload.d.ts +1 -1
- package/dist/utils/attachment-upload.d.ts.map +1 -1
- package/dist/utils/attachment-upload.js +3 -1
- package/dist/utils/attachment-upload.js.map +1 -1
- package/dist/utils/attachment-validation.d.ts +6 -6
- package/dist/utils/attachment-validation.d.ts.map +1 -1
- package/dist/utils/attachment-validation.js +5 -4
- package/dist/utils/attachment-validation.js.map +1 -1
- package/dist/utils/azure-devops-workflow.js.map +1 -1
- package/dist/utils/bitbucket-workflow.js.map +1 -1
- package/dist/utils/bytestring.d.ts.map +1 -1
- package/dist/utils/bytestring.js +5 -4
- package/dist/utils/bytestring.js.map +1 -1
- package/dist/utils/bytestring.test.d.ts +2 -0
- package/dist/utils/bytestring.test.d.ts.map +1 -0
- package/dist/utils/bytestring.test.js +23 -0
- package/dist/utils/bytestring.test.js.map +1 -0
- package/dist/utils/configuration.d.ts.map +1 -1
- package/dist/utils/configuration.js +3 -1
- package/dist/utils/configuration.js.map +1 -1
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +4 -4
- package/dist/utils/github-workflow.js.map +1 -1
- package/dist/utils/gitlab-workflow.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/localNativeBuilderFlags.d.ts +9 -0
- package/dist/utils/localNativeBuilderFlags.d.ts.map +1 -0
- package/dist/utils/localNativeBuilderFlags.js +26 -0
- package/dist/utils/localNativeBuilderFlags.js.map +1 -0
- package/dist/utils/localNativeBuilderFlags.test.d.ts +2 -0
- package/dist/utils/localNativeBuilderFlags.test.d.ts.map +1 -0
- package/dist/utils/localNativeBuilderFlags.test.js +35 -0
- package/dist/utils/localNativeBuilderFlags.test.js.map +1 -0
- package/dist/utils/maskCredential.d.ts.map +1 -1
- package/dist/utils/openApiSpecRef.d.ts +3 -0
- package/dist/utils/openApiSpecRef.d.ts.map +1 -0
- package/dist/utils/openApiSpecRef.js +27 -0
- package/dist/utils/openApiSpecRef.js.map +1 -0
- package/dist/utils/openApiSpecRef.test.d.ts +2 -0
- package/dist/utils/openApiSpecRef.test.d.ts.map +1 -0
- package/dist/utils/openApiSpecRef.test.js +16 -0
- package/dist/utils/openApiSpecRef.test.js.map +1 -0
- package/dist/utils/page.js +1 -1
- package/dist/utils/page.js.map +1 -1
- package/dist/utils/pageFixtures/v4/container.d.ts +346 -346
- package/dist/utils/pageFixtures/v4/container.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/empty.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/form.d.ts +11 -11
- package/dist/utils/pageFixtures/v4/form.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/grid.d.ts +9 -9
- package/dist/utils/pageFixtures/v4/grid.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/slideout.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v4/tabs.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/codeTrigger.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/complexTriggers.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/duplicateTriggers.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v5/missingTriggers.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/initial_app.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/nested_modal.d.ts +32 -32
- package/dist/utils/pageFixtures/v6/nested_modal.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/slideout_without_child.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_2_modals.d.ts +30 -30
- package/dist/utils/pageFixtures/v6/with_2_modals.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_main_canvas_children.d.ts +97 -97
- package/dist/utils/pageFixtures/v6/with_main_canvas_children.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_slideouts.d.ts +42 -42
- package/dist/utils/pageFixtures/v6/with_slideouts.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v6/with_widgets_named_page.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/canvases.d.ts +29 -29
- package/dist/utils/pageFixtures/v7/canvases.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/grids_and_forms.d.ts +56 -56
- package/dist/utils/pageFixtures/v7/grids_and_forms.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/images.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/initial_app.d.ts.map +1 -1
- package/dist/utils/pageFixtures/v7/nested_containers.d.ts +2 -2
- package/dist/utils/pageFixtures/v7/nested_containers.d.ts.map +1 -1
- package/dist/utils/platform-mcp-server-routes.d.ts +23 -0
- package/dist/utils/platform-mcp-server-routes.d.ts.map +1 -0
- package/dist/utils/platform-mcp-server-routes.js +59 -0
- package/dist/utils/platform-mcp-server-routes.js.map +1 -0
- package/dist/utils/platform-mcp-server-routes.test.d.ts +2 -0
- package/dist/utils/platform-mcp-server-routes.test.d.ts.map +1 -0
- package/dist/utils/platform-mcp-server-routes.test.js +21 -0
- package/dist/utils/platform-mcp-server-routes.test.js.map +1 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +1 -1
- package/dist/utils/tracedEventEmitter.d.ts.map +1 -1
- package/dist/utils/tracedEventEmitter.js +3 -3
- package/dist/utils/truncate.d.ts.map +1 -1
- package/dist/utils/truncate.test.js +1 -1
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +1 -1
- package/dist/utils/url.js.map +1 -1
- package/package.json +25 -19
- package/src/bindings/utils.ts +1 -1
- package/src/constants.ts +15 -12
- package/src/database-lifecycle/appDatabaseImport.ts +34 -0
- package/src/database-lifecycle/appDatabaseStatus.test.ts +2 -0
- package/src/database-lifecycle/appDatabaseStatus.ts +19 -3
- package/src/database-lifecycle/dataImport.ts +6 -0
- package/src/database-lifecycle/importCompatibility.test.ts +60 -1
- package/src/database-lifecycle/importCompatibility.ts +52 -0
- package/src/database-lifecycle/index.ts +6 -0
- package/src/errors/integration.ts +1 -1
- package/src/headers.ts +11 -0
- package/src/jwt/verifier.ts +1 -1
- package/src/observability/index.ts +1 -0
- package/src/pageMigrations/migrations/v4to5.ts +1 -1
- package/src/pageMigrations/migrations/v5to6.test.ts +1 -1
- package/src/pageMigrations/migrations/v5to6.ts +6 -1
- package/src/pageMigrations/migrations/v6to7/adjustModalCanvases.test.ts +1 -1
- package/src/pageMigrations/migrations/v6to7/adjustModalCanvases.ts +1 -1
- package/src/pageMigrations/migrations/v6to7/migrateToDimensions.test.ts +2 -2
- package/src/pageMigrations/migrations/v6to7/migrateToDimensions.ts +1 -1
- package/src/pageMigrations/migrations/v7to8.test.ts +1 -1
- package/src/pageMigrations/migrations/v7to8.ts +2 -1
- package/src/pages/pageV8.ts +1 -1
- package/src/plugins/index.ts +1 -0
- package/src/plugins/templates/mcp.test.ts +17 -0
- package/src/plugins/templates/shared/auth.ts +16 -0
- package/src/plugins/templates/shared/openapi.ts +1 -1
- package/src/plugins/unsupported-integration-types.ts +30 -0
- package/src/refactoring/application.ts +2 -1
- package/src/refactoring/refactor.test.ts +306 -287
- package/src/refactoring/refactor.ts +4 -1
- package/src/refactoring/rename.ts +1 -1
- package/src/refactoring/updates.ts +3 -1
- package/src/signing/JSON/portable.ts +2 -2
- package/src/signing/index.ts +1 -1
- package/src/socket/dist-entry.test.ts +14 -2
- package/src/socket/protocol.ts +17 -0
- package/src/socket/socket.ts +2 -2
- package/src/socket/types.ts +1 -1
- package/src/tracing/methodTracing.ts +1 -1
- package/src/types/ai/builder-caller.test.ts +45 -0
- package/src/types/ai/builder-caller.ts +63 -0
- package/src/types/ai/index.ts +24 -0
- package/src/types/ai/native-builder-model.test.ts +33 -0
- package/src/types/ai/native-builder-model.ts +28 -0
- package/src/types/api/execution.ts +4 -1
- package/src/types/api/global.ts +2 -4
- package/src/types/application/index.ts +3 -0
- package/src/types/audit/ocsf.ts +1 -0
- package/src/types/branch/index.ts +101 -0
- package/src/types/common/response.ts +3 -0
- package/src/types/customAgents.ts +2 -3
- package/src/types/datasource/auth.ts +1 -1
- package/src/types/datasource/metadata/index.ts +4 -4
- package/src/types/event/index.ts +2 -1
- package/src/types/integration/index.ts +3 -3
- package/src/types/page/Dimension.test.ts +1 -1
- package/src/types/page/Dimension.ts +1 -1
- package/src/types/page/Padding.ts +1 -1
- package/src/types/page/event.ts +2 -1
- package/src/types/plugin/evaluation.ts +20 -13
- package/src/types/plugin/form.ts +1 -1
- package/src/types/plugin/js-tokenizer.test.ts +139 -0
- package/src/types/plugin/js-tokenizer.ts +98 -0
- package/src/types/rbac/index.ts +4 -0
- package/src/utils/apiv2.test.ts +10 -10
- package/src/utils/apiv2.ts +1 -1
- package/src/utils/attachment-upload.ts +4 -1
- package/src/utils/attachment-validation.ts +8 -4
- package/src/utils/bytestring.test.ts +31 -0
- package/src/utils/bytestring.ts +7 -4
- package/src/utils/configuration.ts +3 -1
- package/src/utils/env.ts +5 -5
- package/src/utils/index.ts +3 -0
- package/src/utils/localNativeBuilderFlags.test.ts +39 -0
- package/src/utils/localNativeBuilderFlags.ts +27 -0
- package/src/utils/openApiSpecRef.test.ts +20 -0
- package/src/utils/openApiSpecRef.ts +30 -0
- package/src/utils/page.ts +2 -2
- package/src/utils/platform-mcp-server-routes.test.ts +27 -0
- package/src/utils/platform-mcp-server-routes.ts +65 -0
- package/src/utils/string.ts +1 -1
- package/src/utils/tracedEventEmitter.ts +5 -5
- package/src/utils/truncate.test.ts +1 -1
- package/src/utils/url.ts +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9620.1",
|
|
4
4
|
"description": "Superblocks Shared Resources",
|
|
5
5
|
"license": "Superblocks Community Software License",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/superblocksteam/
|
|
8
|
+
"url": "git+https://github.com/superblocksteam/superblocks.git"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"LICENSE.txt",
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
".": {
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./js-tokenizer": {
|
|
26
|
+
"types": "./dist/types/plugin/js-tokenizer.d.ts",
|
|
27
|
+
"default": "./dist/types/plugin/js-tokenizer.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"publishConfig": {
|
|
@@ -32,51 +36,53 @@
|
|
|
32
36
|
"@lezer/lr": "0.16.3",
|
|
33
37
|
"@opentelemetry/api": "^1.9.1",
|
|
34
38
|
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
35
|
-
"@superblocksteam/sabs-types": "0.
|
|
36
|
-
"@superblocksteam/types": "1.
|
|
37
|
-
"@types/
|
|
38
|
-
"@types/estree": "^1.0.5",
|
|
39
|
+
"@superblocksteam/sabs-types": "0.798.0",
|
|
40
|
+
"@superblocksteam/types": "1.838.0",
|
|
41
|
+
"@types/estree": "^1.0.9",
|
|
39
42
|
"@types/events": "^3.0.3",
|
|
43
|
+
"acorn": "^8.19.0",
|
|
40
44
|
"events": "^3.3.0",
|
|
41
45
|
"isomorphic-ws": "^5.0.0",
|
|
42
46
|
"jose": "^5.10.0",
|
|
43
|
-
"js-base64": "^3.
|
|
47
|
+
"js-base64": "^3.9.4",
|
|
44
48
|
"json5": "2.2.3",
|
|
45
49
|
"lodash-es": "^4.18.1",
|
|
46
50
|
"normalizr": "3.6.2",
|
|
47
51
|
"pdf-lib": "1.17.1",
|
|
48
|
-
"semver": "^7.
|
|
49
|
-
"slugify": "^1.6.
|
|
52
|
+
"semver": "^7.8.5",
|
|
53
|
+
"slugify": "^1.6.9",
|
|
50
54
|
"uuid": "^11.1.1"
|
|
51
55
|
},
|
|
52
56
|
"devDependencies": {
|
|
53
|
-
"@eslint/js": "^9.39.
|
|
57
|
+
"@eslint/js": "^9.39.5",
|
|
54
58
|
"@types/lodash-es": "^4.17.12",
|
|
55
|
-
"@types/node": "^24",
|
|
56
|
-
"@types/semver": "^7.
|
|
57
|
-
"@
|
|
59
|
+
"@types/node": "^24.19.2",
|
|
60
|
+
"@types/semver": "^7.8.0",
|
|
61
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
62
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
58
63
|
"chokidar-cli": "3.0.0",
|
|
59
64
|
"eslint": "^9.39.2",
|
|
60
65
|
"eslint-config-prettier": "^10.1.8",
|
|
61
66
|
"eslint-config-turbo": "^2.9.16",
|
|
62
67
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
63
68
|
"eslint-plugin-import": "^2.32.0",
|
|
64
|
-
"
|
|
65
|
-
"globals": "^17.
|
|
66
|
-
"typescript": "
|
|
67
|
-
"typescript-eslint": "^8.
|
|
68
|
-
"vitest": "^4.1.
|
|
69
|
+
"eslint-plugin-oxlint": "1.90.0",
|
|
70
|
+
"globals": "^17.13.0",
|
|
71
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
72
|
+
"typescript-eslint": "^8.72.0",
|
|
73
|
+
"vitest": "^4.1.12"
|
|
69
74
|
},
|
|
70
75
|
"engines": {
|
|
71
76
|
"node": ">=24",
|
|
72
77
|
"npm": ">=10.x"
|
|
73
78
|
},
|
|
74
79
|
"scripts": {
|
|
75
|
-
"build": "tsc --build && printf '{\"type\":\"module\"}\\n' > dist/package.json",
|
|
80
|
+
"build": "tsc --build && printf '{\"type\":\"module\",\"sideEffects\":false}\\n' > dist/package.json",
|
|
76
81
|
"check": "npm run typecheck && npm run lint",
|
|
77
82
|
"clean": "premove ./dist *tsbuildinfo",
|
|
78
83
|
"dev": "chokidar \"**/*.ts\" -c \"npm run build\"",
|
|
79
84
|
"lint": "eslint --max-warnings 0 --concurrency=2",
|
|
85
|
+
"lint:pkg": "publint --strict && attw --pack --profile esm-only",
|
|
80
86
|
"lint:fix": "eslint --fix --concurrency=2",
|
|
81
87
|
"lint:precommit": "eslint --fix --concurrency=2",
|
|
82
88
|
"publish-package": "pnpm publish",
|
package/src/bindings/utils.ts
CHANGED
package/src/constants.ts
CHANGED
|
@@ -23,18 +23,21 @@ import type {
|
|
|
23
23
|
SalesforceDatasourceConfiguration
|
|
24
24
|
} from './types/index.js';
|
|
25
25
|
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
export const SUPERBLOCKS_COMPONENT_EVENT_HEADER = 'x-superblocks-component-event';
|
|
29
|
-
export const SUPERBLOCKS_URL_HEADER = 'x-superblocks-url';
|
|
30
|
-
export const SUPERBLOCKS_AUTHORIZATION_HEADER = 'x-superblocks-authorization';
|
|
31
|
-
export const SUPERBLOCKS_EMBED_HEADER = 'x-superblocks-embed';
|
|
32
|
-
export const SUPERBLOCKS_RESOLVED_PROFILE_KEY_HEADER = 'x-superblocks-resolved-profile-key';
|
|
33
|
-
export const SUPERBLOCKS_SESSION_ID_HEADER = 'x-superblocks-session-id';
|
|
26
|
+
export * from './headers.js';
|
|
27
|
+
|
|
34
28
|
export const SUPERBLOCKS_LIVE_GIT_BRANCH = 'superblocks/live';
|
|
35
29
|
// Baseline branch used after disconnecting from git-backed workflows.
|
|
36
30
|
export const DEFAULT_NON_GIT_BRANCH = 'main';
|
|
37
31
|
export const DEFAULT_BRANCH = DEFAULT_NON_GIT_BRANCH;
|
|
32
|
+
/** Lowercase letters, digits and dashes, so a name stays one path segment. */
|
|
33
|
+
export const BRANCH_NAME_PATTERN = /^[a-z0-9][a-z0-9-]{0,39}$/;
|
|
34
|
+
export const isValidBranchName = (name: string): boolean => name !== DEFAULT_BRANCH && BRANCH_NAME_PATTERN.test(name);
|
|
35
|
+
/** Prefixes the lock conflict a dev server gets when its user now holds a different branch of the app. */
|
|
36
|
+
export const LOCK_HELD_ON_OTHER_BRANCH = 'LOCK_HELD_ON_OTHER_BRANCH';
|
|
37
|
+
/** For a pod or the mock, which cannot read branch rows: every branch other than main and the git live branch. */
|
|
38
|
+
export const isFeatureBranchName = (name?: string) => !!name && name !== DEFAULT_BRANCH && name !== SUPERBLOCKS_LIVE_GIT_BRANCH;
|
|
39
|
+
/** main-view: a read-only look at main after the app has branched. */
|
|
40
|
+
export type WorkspaceMode = 'git' | 'single' | 'user-branch' | 'main-view';
|
|
38
41
|
|
|
39
42
|
export const EMAIL_VERIFICATION_CODE_LENGTH = 6;
|
|
40
43
|
|
|
@@ -53,7 +56,7 @@ export const NULL_AS_STRING = 'null';
|
|
|
53
56
|
|
|
54
57
|
// this is needed due to the migration from ts -> proto objects
|
|
55
58
|
// which have different JSON representations for plugins
|
|
56
|
-
//
|
|
59
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
57
60
|
export const PLUGIN_ID_TO_PROTO_CLASS: Record<string, any> = {
|
|
58
61
|
cosmosdb: CosmosDbPluginV1.Plugin,
|
|
59
62
|
redis: RedisPluginV1.Plugin,
|
|
@@ -106,7 +109,7 @@ function deserializeRedisDatasourceConfig(serialized: Record<string, unknown>):
|
|
|
106
109
|
|
|
107
110
|
function deserializeRedisActionConfig(serialized: Record<string, unknown>): RedisActionConfiguration {
|
|
108
111
|
const plugin = RedisPluginV1.Plugin.fromJsonString(JSON.stringify(serialized), { ignoreUnknownFields: true });
|
|
109
|
-
//
|
|
112
|
+
// oxlint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
113
|
const { name, connection, ...rest } = plugin;
|
|
111
114
|
return rest as RedisActionConfiguration;
|
|
112
115
|
}
|
|
@@ -120,7 +123,7 @@ function deserializeSalesforceDatasourceConfig(serialized: Record<string, unknow
|
|
|
120
123
|
|
|
121
124
|
function deserializeSalesforceActionConfig(serialized: Record<string, unknown>): SalesforceActionConfiguration {
|
|
122
125
|
const plugin = SalesforcePluginV1.Plugin.fromJsonString(JSON.stringify(serialized), { ignoreUnknownFields: true });
|
|
123
|
-
//
|
|
126
|
+
// oxlint-disable-next-line @typescript-eslint/no-unused-vars
|
|
124
127
|
const { name, connection, ...rest } = plugin;
|
|
125
128
|
return rest as SalesforceActionConfiguration;
|
|
126
129
|
}
|
|
@@ -133,7 +136,7 @@ function deserializeCosmosDbDatasourceConfig(serialized: Record<string, unknown>
|
|
|
133
136
|
|
|
134
137
|
function deserializeCosmosDbActionConfig(serialized: Record<string, unknown>): CosmosDbActionConfiguration {
|
|
135
138
|
const plugin = CosmosDbPluginV1.Plugin.fromJsonString(JSON.stringify(serialized), { ignoreUnknownFields: true });
|
|
136
|
-
//
|
|
139
|
+
// oxlint-disable-next-line @typescript-eslint/no-unused-vars
|
|
137
140
|
const { name, connection, ...rest } = plugin;
|
|
138
141
|
return rest as CosmosDbActionConfiguration;
|
|
139
142
|
}
|
|
@@ -59,6 +59,40 @@ export type AppDatabaseImportValidationMetadata = {
|
|
|
59
59
|
tableNames: string[];
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
// One column present in both the dump and the App Database that differs.
|
|
63
|
+
export type AppDatabaseImportColumnDifference = {
|
|
64
|
+
// The kinds of difference (type, nullability, ...), never expression text.
|
|
65
|
+
detail: string;
|
|
66
|
+
name: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// One changed relation's column groups as arrays. The summaries in
|
|
70
|
+
// `changed` join names with ", " and write an empty group as "none", so
|
|
71
|
+
// they cannot round-trip a legal identifier; these can. Absent on diffs
|
|
72
|
+
// stored before the worker sent them.
|
|
73
|
+
export type AppDatabaseImportRelationColumnDifferences = {
|
|
74
|
+
changed: AppDatabaseImportColumnDifference[];
|
|
75
|
+
// Columns in the App Database but not in the dump.
|
|
76
|
+
extraOnTarget: string[];
|
|
77
|
+
// Columns in the dump but not in the App Database.
|
|
78
|
+
missingOnTarget: string[];
|
|
79
|
+
relation: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// The structured catalog diff behind a schema_mismatch failure. Identifiers
|
|
83
|
+
// only: relation and column names from the user's own dump and App Database.
|
|
84
|
+
// Tables and sequences are both relations, so both land in these lists.
|
|
85
|
+
export type AppDatabaseImportSchemaDifferences = {
|
|
86
|
+
// Per-relation differences (columns, constraints, enums) as short summaries.
|
|
87
|
+
changed: string[];
|
|
88
|
+
// The column groups behind the column summaries in `changed`, as arrays.
|
|
89
|
+
changedColumns?: AppDatabaseImportRelationColumnDifferences[];
|
|
90
|
+
// Relations in the App Database but not in the dump.
|
|
91
|
+
extraRelations: string[];
|
|
92
|
+
// Relations in the dump but not in the App Database.
|
|
93
|
+
missingRelations: string[];
|
|
94
|
+
};
|
|
95
|
+
|
|
62
96
|
export type AppDatabaseImportDispatchDetails = {
|
|
63
97
|
importId: string;
|
|
64
98
|
kind: AppDatabaseImportKind;
|
|
@@ -118,6 +118,8 @@ describe('database-wide operation block', () => {
|
|
|
118
118
|
expect(preferredBlockingDatabaseOperation(['import_table_data'])).toBeUndefined();
|
|
119
119
|
expect(databaseWideOperationBlockReason('migrate_schema')).toBe('A schema migration is running on this database.');
|
|
120
120
|
expect(databaseWideOperationBlockReason('restore_import_data')).toBe('A database restore is running on this data tag.');
|
|
121
|
+
expect(preferredBlockingDatabaseOperation(['restore_integration_pg_dump'])).toBe('restore_integration_pg_dump');
|
|
122
|
+
expect(databaseWideOperationBlockReason('restore_integration_pg_dump')).toBe('A database restore is running on this data tag.');
|
|
121
123
|
expect(databaseWideOperationBlockReason('retire_database')).toBe('This database is being removed.');
|
|
122
124
|
expect(TABLE_IMPORT_IN_PROGRESS_REASON).toBe('A table import is running on this database.');
|
|
123
125
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ViewMode } from '../types/event/index.js';
|
|
2
2
|
import type { AppDatabaseTagRef } from './appDatabaseCompatibility.js';
|
|
3
|
-
import type { AppDatabaseImportTagSupport } from './importCompatibility.js';
|
|
3
|
+
import type { AppDatabaseDumpSupport, AppDatabaseImportTagSupport } from './importCompatibility.js';
|
|
4
4
|
import type { DatabaseEngine, LifecycleMigrationState, LifecycleState } from './index.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -23,7 +23,12 @@ export type AppDatabaseStatusIntegration = {
|
|
|
23
23
|
|
|
24
24
|
// These rewrite or remove the whole database. A CSV import into any table on
|
|
25
25
|
// that binding has to wait until the lifecycle request leaves these states.
|
|
26
|
-
export const DATABASE_WIDE_LIFECYCLE_OPERATIONS = [
|
|
26
|
+
export const DATABASE_WIDE_LIFECYCLE_OPERATIONS = [
|
|
27
|
+
'migrate_schema',
|
|
28
|
+
'restore_import_data',
|
|
29
|
+
'restore_integration_pg_dump',
|
|
30
|
+
'retire_database'
|
|
31
|
+
] as const;
|
|
27
32
|
export type DatabaseWideLifecycleOperation = (typeof DATABASE_WIDE_LIFECYCLE_OPERATIONS)[number];
|
|
28
33
|
|
|
29
34
|
export const TABLE_IMPORT_IN_PROGRESS_REASON = 'A table import is running on this database.';
|
|
@@ -33,13 +38,14 @@ export function databaseWideOperationBlockReason(operation: DatabaseWideLifecycl
|
|
|
33
38
|
case 'migrate_schema':
|
|
34
39
|
return 'A schema migration is running on this database.';
|
|
35
40
|
case 'restore_import_data':
|
|
41
|
+
case 'restore_integration_pg_dump':
|
|
36
42
|
return 'A database restore is running on this data tag.';
|
|
37
43
|
case 'retire_database':
|
|
38
44
|
return 'This database is being removed.';
|
|
39
45
|
}
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
const BLOCKING_OPERATION_PRIORITY = ['retire_database', 'migrate_schema', 'restore_import_data'] as const;
|
|
48
|
+
const BLOCKING_OPERATION_PRIORITY = ['retire_database', 'migrate_schema', 'restore_import_data', 'restore_integration_pg_dump'] as const;
|
|
43
49
|
|
|
44
50
|
export function preferredBlockingDatabaseOperation(operations: readonly string[]): DatabaseWideLifecycleOperation | undefined {
|
|
45
51
|
return BLOCKING_OPERATION_PRIORITY.find((operation) => operations.includes(operation));
|
|
@@ -74,6 +80,7 @@ export type AppDatabaseStatusTag = AppDatabaseTagRef & {
|
|
|
74
80
|
* the server from connected-agent registrations, not from a browser probe.
|
|
75
81
|
*/
|
|
76
82
|
csvImport?: AppDatabaseImportTagSupport;
|
|
83
|
+
dumpImport?: AppDatabaseDumpSupport;
|
|
77
84
|
/**
|
|
78
85
|
* True when this data tag had a database that was retired. The live
|
|
79
86
|
* binding is omitted so the tag can be provisioned again, but Status
|
|
@@ -104,8 +111,17 @@ export type AppDatabaseStatus = {
|
|
|
104
111
|
* requirement. Working-state (Edit) rows are not this signal: a leftover
|
|
105
112
|
* production database stays undeletable until a version without databases
|
|
106
113
|
* is live.
|
|
114
|
+
*
|
|
115
|
+
* Also true when the deployed commit id is not a UUID (a git SHA from a CLI
|
|
116
|
+
* push): deploy cannot stamp a requirement for those commits, so whether the
|
|
117
|
+
* live version needs a database cannot be determined, and this reports true
|
|
118
|
+
* to keep production database retirement blocked. This is a stopgap, not a
|
|
119
|
+
* fact about the app; remove it once requirements are recorded for git SHA
|
|
120
|
+
* commits.
|
|
107
121
|
*/
|
|
108
122
|
liveVersionHasAppDatabase: boolean;
|
|
123
|
+
/** False when the caller edits a user branch: every branch shares one database, so only the default branch migrates or retires it. */
|
|
124
|
+
onDefaultBranch?: boolean;
|
|
109
125
|
tags: AppDatabaseStatusTag[];
|
|
110
126
|
};
|
|
111
127
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AppDatabaseImportSchemaDifferences } from './appDatabaseImport.js';
|
|
2
|
+
|
|
1
3
|
export const DATA_IMPORT_KINDS = ['csv', 'pg_dump_custom'] as const;
|
|
2
4
|
// CHECK union for every kind. Prefix/schema success is `schema_validated`.
|
|
3
5
|
// `ready` stays available for CSV/JSON "validated, waiting to apply".
|
|
@@ -48,6 +50,9 @@ export type DataImportTarget = AppDatabaseDataImportTarget;
|
|
|
48
50
|
export type DataImportUploadMetadata = {
|
|
49
51
|
completedPartNumbers?: number[];
|
|
50
52
|
filename: string;
|
|
53
|
+
// When the current multipart part URLs stop working (ms since epoch).
|
|
54
|
+
// The expiry only, never the signed URLs themselves.
|
|
55
|
+
partUrlsExpireAt?: number;
|
|
51
56
|
prefixExpiresAt?: number;
|
|
52
57
|
// Browser handoff for the current prefix. Cleared when that step ends.
|
|
53
58
|
prefixUploadHeaders?: Record<string, string>;
|
|
@@ -74,6 +79,7 @@ export type PgDumpDataImportMetadata = {
|
|
|
74
79
|
prefixChecksumSha256?: string;
|
|
75
80
|
prefixObjectKey?: string;
|
|
76
81
|
requestedPrefixSizeBytes?: number;
|
|
82
|
+
schemaDifferences?: AppDatabaseImportSchemaDifferences;
|
|
77
83
|
source?: {
|
|
78
84
|
integrationConfigurationId: string;
|
|
79
85
|
integrationId: string;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
|
|
3
3
|
import { AgentStatus } from '../types/organization/agent.js';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
APP_DATABASE_DUMP_FILE_OPERATIONS,
|
|
6
|
+
APP_DATABASE_DUMP_INTEGRATION_OPERATIONS,
|
|
7
|
+
evaluateAppDatabaseDumpTag,
|
|
8
|
+
DATABASE_LIFECYCLE_TAG_IMPORT_TRANSFORMS,
|
|
9
|
+
evaluateAppDatabaseImportTag
|
|
10
|
+
} from './importCompatibility.js';
|
|
5
11
|
|
|
6
12
|
const IMPORT_OPERATIONS = ['complete_import_upload', 'describe_schema', 'import_table_data', 'prepare_import_upload'];
|
|
7
13
|
|
|
@@ -144,3 +150,56 @@ describe('evaluateAppDatabaseImportTag', () => {
|
|
|
144
150
|
).toBe('temporarily_unavailable');
|
|
145
151
|
});
|
|
146
152
|
});
|
|
153
|
+
|
|
154
|
+
describe('pg_dump capability preflight', () => {
|
|
155
|
+
const worker = (operations: readonly string[]) => ({
|
|
156
|
+
status: AgentStatus.ACTIVE,
|
|
157
|
+
tags: {
|
|
158
|
+
'databaseLifecycle:agentName': ['owner'],
|
|
159
|
+
'databaseLifecycle:engines': ['postgres'],
|
|
160
|
+
'databaseLifecycle:capabilities': ['managed-IAM-v1'],
|
|
161
|
+
'databaseLifecycle:operations': [...operations],
|
|
162
|
+
profile: ['production']
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const check = (agents: ReturnType<typeof worker>[], source: 'file' | 'integration' = 'file') =>
|
|
166
|
+
evaluateAppDatabaseDumpTag({ agents, agentName: 'owner', profileKey: 'production', source });
|
|
167
|
+
it.each(APP_DATABASE_DUMP_FILE_OPERATIONS)('rejects a file import missing %s', (operation) => {
|
|
168
|
+
expect(check([worker(APP_DATABASE_DUMP_FILE_OPERATIONS.filter((value) => value !== operation))])).toMatchObject({
|
|
169
|
+
supportState: 'unsupported',
|
|
170
|
+
missingOperations: [operation]
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
it('accepts file restore without CSV transforms or integration capture', () => {
|
|
174
|
+
expect(check([worker(APP_DATABASE_DUMP_FILE_OPERATIONS)])).toMatchObject({ supportState: 'supported', reason: '' });
|
|
175
|
+
});
|
|
176
|
+
it('checks integration capture separately', () => {
|
|
177
|
+
expect(check([worker(APP_DATABASE_DUMP_INTEGRATION_OPERATIONS)], 'integration').supportState).toBe('supported');
|
|
178
|
+
expect(check([worker(APP_DATABASE_DUMP_FILE_OPERATIONS)], 'integration').supportState).toBe('unsupported');
|
|
179
|
+
});
|
|
180
|
+
it('does not borrow capabilities from another owner or profile', () => {
|
|
181
|
+
const other = worker(APP_DATABASE_DUMP_FILE_OPERATIONS);
|
|
182
|
+
other.tags['databaseLifecycle:agentName'] = ['other'];
|
|
183
|
+
expect(check([other]).supportState).toBe('temporarily_unavailable');
|
|
184
|
+
other.tags['databaseLifecycle:agentName'] = ['owner'];
|
|
185
|
+
other.tags.profile = ['staging'];
|
|
186
|
+
expect(check([other]).supportState).toBe('temporarily_unavailable');
|
|
187
|
+
});
|
|
188
|
+
it('does not combine incomplete replicas into a capable worker', () => {
|
|
189
|
+
expect(
|
|
190
|
+
check([worker(APP_DATABASE_DUMP_FILE_OPERATIONS.slice(0, 2)), worker(APP_DATABASE_DUMP_FILE_OPERATIONS.slice(2))]).supportState
|
|
191
|
+
).toBe('unsupported');
|
|
192
|
+
});
|
|
193
|
+
it.each(['databaseLifecycle:engines', 'databaseLifecycle:capabilities'] as const)(
|
|
194
|
+
'rejects a fully advertised worker missing %s',
|
|
195
|
+
(tag) => {
|
|
196
|
+
const agent = worker(APP_DATABASE_DUMP_FILE_OPERATIONS);
|
|
197
|
+
agent.tags[tag] = [];
|
|
198
|
+
expect(check([agent])).toMatchObject({
|
|
199
|
+
missingOperations: [],
|
|
200
|
+
reason: 'pg_dump import requires a PostgreSQL worker with managed IAM support.',
|
|
201
|
+
supportState: 'unsupported'
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
});
|
|
@@ -146,3 +146,55 @@ function transformsInCommon(agents: readonly AgentLifecycleTagSource[]): AppData
|
|
|
146
146
|
}
|
|
147
147
|
return APP_DATABASE_IMPORT_TRANSFORMS.filter((transform) => counts.get(transform) === agents.length);
|
|
148
148
|
}
|
|
149
|
+
|
|
150
|
+
export const APP_DATABASE_DUMP_FILE_OPERATIONS = [
|
|
151
|
+
'prepare_import_prefix_upload',
|
|
152
|
+
'inspect_import_prefix',
|
|
153
|
+
'prepare_import_upload',
|
|
154
|
+
'complete_import_upload',
|
|
155
|
+
'restore_import_data'
|
|
156
|
+
] as const;
|
|
157
|
+
export const APP_DATABASE_DUMP_INTEGRATION_OPERATIONS = ['capture_integration_pg_dump', 'restore_integration_pg_dump'] as const;
|
|
158
|
+
export type AppDatabaseDumpTagSupport = Pick<AppDatabaseImportTagSupport, 'missingOperations' | 'reason' | 'supportState'>;
|
|
159
|
+
export type AppDatabaseDumpSupport = { file: AppDatabaseDumpTagSupport; integration: AppDatabaseDumpTagSupport };
|
|
160
|
+
|
|
161
|
+
export function evaluateAppDatabaseDumpTag({
|
|
162
|
+
agents,
|
|
163
|
+
agentName,
|
|
164
|
+
profileKey,
|
|
165
|
+
source
|
|
166
|
+
}: {
|
|
167
|
+
agents: readonly AgentLifecycleTagSource[] | undefined;
|
|
168
|
+
agentName?: string | null;
|
|
169
|
+
profileKey: string;
|
|
170
|
+
source: 'file' | 'integration';
|
|
171
|
+
}): AppDatabaseDumpTagSupport {
|
|
172
|
+
const operations = source === 'file' ? APP_DATABASE_DUMP_FILE_OPERATIONS : APP_DATABASE_DUMP_INTEGRATION_OPERATIONS;
|
|
173
|
+
const eligible = (agents ?? []).filter(
|
|
174
|
+
(agent) => isActiveAgent(agent) && !!agentName && publishesAgentName(agent, agentName) && coversProfile(agent, profileKey)
|
|
175
|
+
);
|
|
176
|
+
if (eligible.length === 0) {
|
|
177
|
+
return {
|
|
178
|
+
missingOperations: [...operations],
|
|
179
|
+
supportState: 'temporarily_unavailable',
|
|
180
|
+
reason: 'pg_dump import is unavailable: the worker for this data tag is not connected or its capabilities could not be checked.'
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const missing = eligible.map((agent) => operations.filter((operation) => !publishedOperations(agent).includes(operation)));
|
|
184
|
+
const supported = eligible.some(
|
|
185
|
+
(agent, index) =>
|
|
186
|
+
missing[index].length === 0 &&
|
|
187
|
+
agent.tags?.['databaseLifecycle:engines']?.includes('postgres') &&
|
|
188
|
+
agent.tags?.['databaseLifecycle:capabilities']?.includes('managed-IAM-v1')
|
|
189
|
+
);
|
|
190
|
+
if (supported) return { missingOperations: [], supportState: 'supported', reason: '' };
|
|
191
|
+
const missingOperations = missing.sort((a, b) => a.length - b.length)[0];
|
|
192
|
+
return {
|
|
193
|
+
missingOperations,
|
|
194
|
+
supportState: 'unsupported',
|
|
195
|
+
reason:
|
|
196
|
+
missingOperations.length > 0
|
|
197
|
+
? `pg_dump import is unavailable: the worker does not advertise ${missingOperations.join(', ')}. Configure import storage and update the worker.`
|
|
198
|
+
: 'pg_dump import requires a PostgreSQL worker with managed IAM support.'
|
|
199
|
+
};
|
|
200
|
+
}
|
|
@@ -69,6 +69,7 @@ export const APP_DB_CONNECTOR_ROLE_NAME_PREFIX = 'superblocks-app-db-connector';
|
|
|
69
69
|
export const NATIVE_DB_IAM_AUTH_MODE = 'aws_iam_role' as const;
|
|
70
70
|
export const NATIVE_DB_IDENTIFIER_HASH_DOMAIN = 'superblocks-native-db:v1';
|
|
71
71
|
export const DATABASE_LIFECYCLE_CAPABILITY_MANAGED_IAM_V1 = 'managed-IAM-v1';
|
|
72
|
+
export const DATABASE_LIFECYCLE_CAPABILITY_DATA_QUERY = 'data-query';
|
|
72
73
|
|
|
73
74
|
export function isLifecycleManagedIntegrationAllowedForApiTrigger(
|
|
74
75
|
triggerType: ApiTriggerType,
|
|
@@ -90,6 +91,10 @@ export function isLifecycleManagedIntegrationAllowedForApiTrigger(
|
|
|
90
91
|
export const DATABASE_LIFECYCLE_TAG_OPERATIONS = 'databaseLifecycle:operations';
|
|
91
92
|
export const DATABASE_LIFECYCLE_TAG_ENGINES = 'databaseLifecycle:engines';
|
|
92
93
|
export const DATABASE_LIFECYCLE_TAG_CAPABILITIES = 'databaseLifecycle:capabilities';
|
|
94
|
+
|
|
95
|
+
export function agentTagsAdvertiseDataQuery(tags: { [key: string]: readonly string[] | undefined } | undefined): boolean {
|
|
96
|
+
return (tags?.[DATABASE_LIFECYCLE_TAG_CAPABILITIES] ?? []).includes(DATABASE_LIFECYCLE_CAPABILITY_DATA_QUERY);
|
|
97
|
+
}
|
|
93
98
|
export const DATABASE_LIFECYCLE_TAG_PHYSICAL_CONFIG_FINGERPRINT = 'databaseLifecycle:physicalConfigFingerprint';
|
|
94
99
|
export {
|
|
95
100
|
APP_DATABASE_IMPORT_ERROR_CODES,
|
|
@@ -108,6 +113,7 @@ export {
|
|
|
108
113
|
type AppDatabaseImportLifecycleOperation,
|
|
109
114
|
type AppDatabaseImportSource,
|
|
110
115
|
type AppDatabaseImportState,
|
|
116
|
+
type AppDatabaseImportSchemaDifferences,
|
|
111
117
|
type AppDatabaseImportValidationMetadata,
|
|
112
118
|
type CaptureIntegrationPgDumpCallbackResult,
|
|
113
119
|
type CaptureIntegrationPgDumpDispatchPayloadEnvelope,
|
package/src/headers.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Kept apart from constants.ts, which loads generated protobuf code. Code shipped
|
|
2
|
+
// to user apps imports these headers, and importing constants.ts would bundle that
|
|
3
|
+
// protobuf code too.
|
|
4
|
+
export const SUPERBLOCKS_REQUEST_ID_HEADER = 'x-superblocks-request-id';
|
|
5
|
+
export const SUPERBLOCKS_CLI_VERSION_HEADER = 'x-superblocks-cli-version';
|
|
6
|
+
export const SUPERBLOCKS_COMPONENT_EVENT_HEADER = 'x-superblocks-component-event';
|
|
7
|
+
export const SUPERBLOCKS_URL_HEADER = 'x-superblocks-url';
|
|
8
|
+
export const SUPERBLOCKS_AUTHORIZATION_HEADER = 'x-superblocks-authorization';
|
|
9
|
+
export const SUPERBLOCKS_EMBED_HEADER = 'x-superblocks-embed';
|
|
10
|
+
export const SUPERBLOCKS_RESOLVED_PROFILE_KEY_HEADER = 'x-superblocks-resolved-profile-key';
|
|
11
|
+
export const SUPERBLOCKS_SESSION_ID_HEADER = 'x-superblocks-session-id';
|
package/src/jwt/verifier.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLocalJWKSet, createRemoteJWKSet, decodeProtectedHeader, jwtVerify } from 'jose';
|
|
2
2
|
import type { JWTPayload, JWTVerifyOptions, RemoteJWKSetOptions } from 'jose';
|
|
3
|
-
import
|
|
3
|
+
import isEmpty from 'lodash-es/isEmpty.js';
|
|
4
4
|
|
|
5
5
|
import { UnauthorizedError } from '../errors/index.js';
|
|
6
6
|
|
|
@@ -18,6 +18,7 @@ export const OBS_TAG_FEATURE_GROUP = 'feature-group';
|
|
|
18
18
|
// SUPERBLOCKS ORGANZIATION
|
|
19
19
|
export const OBS_TAG_ORG_ID = 'organization-id';
|
|
20
20
|
export const OBS_TAG_ORG_NAME = 'organization-name';
|
|
21
|
+
export const OBS_TAG_USER_ID = 'user-id';
|
|
21
22
|
export const OBS_TAG_USER_EMAIL = 'user-email';
|
|
22
23
|
export const OBS_TAG_USER_TYPE = 'user-type';
|
|
23
24
|
export const OBS_TAG_BILLING_PLAN = 'billing-plan';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// So we are using `!` to assert that `widget.children` is never undefined.
|
|
4
4
|
// Note that `!` does not change the runtime behavior of the code so the code will work the same way as before.
|
|
5
5
|
|
|
6
|
-
/*
|
|
6
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */
|
|
7
7
|
|
|
8
8
|
import type { PageDSL4and5 } from '../../types/index.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// So we are using `!` to assert that `widget.children` is never undefined.
|
|
4
4
|
// Note that `!` does not change the runtime behavior of the code so the code will work the same way as before.
|
|
5
5
|
|
|
6
|
-
/*
|
|
6
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */
|
|
7
7
|
|
|
8
8
|
import { cloneDeep } from 'lodash-es';
|
|
9
9
|
import { describe, it, expect } from 'vitest';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import get from 'lodash-es/get.js';
|
|
2
|
+
import isArray from 'lodash-es/isArray.js';
|
|
3
|
+
import isEmpty from 'lodash-es/isEmpty.js';
|
|
4
|
+
import isString from 'lodash-es/isString.js';
|
|
5
|
+
import set from 'lodash-es/set.js';
|
|
6
|
+
import uniq from 'lodash-es/uniq.js';
|
|
2
7
|
|
|
3
8
|
import type { PageDSL4and5, PageDSL6 } from '../../types/index.js';
|
|
4
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// So we are using `!` to assert that `widget.children` is never undefined.
|
|
4
4
|
// Note that `!` does not change the runtime behavior of the code so the code will work the same way as before.
|
|
5
5
|
|
|
6
|
-
/*
|
|
6
|
+
/* oxlint-disable @typescript-eslint/no-explicit-any */
|
|
7
7
|
|
|
8
8
|
import { cloneDeep } from 'lodash-es';
|
|
9
9
|
import { describe, test, expect } from 'vitest';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// So we are using `!` to assert that `widget.children` is never undefined.
|
|
4
4
|
// Note that `!` does not change the runtime behavior of the code so the code will work the same way as before.
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import cloneDeep from 'lodash-es/cloneDeep.js';
|
|
7
7
|
|
|
8
8
|
import type { PageDSL6, WidgetProps6 } from '../../../types/index.js';
|
|
9
9
|
|
|
@@ -10,7 +10,7 @@ import { migrateToSections } from './migrateToSections.js';
|
|
|
10
10
|
|
|
11
11
|
describe('version 7 to version 8', () => {
|
|
12
12
|
test('should migrate a page with a container widget', () => {
|
|
13
|
-
//
|
|
13
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
14
|
const v7 = migrateToSections(migrate5to6(migrate4to5(cloneDeep(containerV4 as any))));
|
|
15
15
|
const v8 = migrateToDimensions(cloneDeep(v7));
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ describe('version 7 to version 8', () => {
|
|
|
21
21
|
// Check that snapColumns, snapRows have been migrated to gridColumns and don't exist anymore
|
|
22
22
|
// Do this for all children recursively
|
|
23
23
|
|
|
24
|
-
//
|
|
24
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
25
|
const checkWidget = (parent: any, old: any) => {
|
|
26
26
|
if (parent.children) {
|
|
27
27
|
parent.children.forEach((child: WidgetProps7) => {
|
|
@@ -9,7 +9,7 @@ import initialAppV7DSL from '../../utils/pageFixtures/v7/initial_app.js';
|
|
|
9
9
|
import nestedContainers from '../../utils/pageFixtures/v7/nested_containers.js';
|
|
10
10
|
import { migrate7to8 } from './v7to8.js';
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
13
|
const getWidgetNameToProperty = (widget: WidgetProps7, widgetTypes: string[], propertyNames: string[], obj: Record<string, any>) => {
|
|
14
14
|
if (widgetTypes.includes(widget.type)) {
|
|
15
15
|
propertyNames.forEach((propertyName) => {
|
package/src/pages/pageV8.ts
CHANGED
package/src/plugins/index.ts
CHANGED
|
@@ -79,6 +79,7 @@ import {
|
|
|
79
79
|
export * from './clientCredentialsAuthConfig.js';
|
|
80
80
|
export * from './registry.js';
|
|
81
81
|
export * from './templates/index.js';
|
|
82
|
+
export * from './unsupported-integration-types.js';
|
|
82
83
|
|
|
83
84
|
// WHEN A NEW INTEGRATION IS ADDED, WE WILL NEED TO ADD IT HERE IN ORDER FOR IT TO BE REGISTERED WITH CLOUD
|
|
84
85
|
// we use a really big version so we don't have to manually bump this each time a plugin has a version increment
|
|
@@ -80,6 +80,23 @@ describe('MCP Server integration form', () => {
|
|
|
80
80
|
expect(restCheckbox).toBeUndefined();
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
test('explains the disabled Connect button only while the token is per user', () => {
|
|
84
|
+
const hint = datasourceFields().find((field) => field.name === 'oauth-per-user-connect-hint');
|
|
85
|
+
const restHint = templateFields(RestApiIntegrationPlugin.datasourceTemplate).find(
|
|
86
|
+
(field) => field.name === 'oauth-per-user-connect-hint'
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
expect(hint?.componentType).toBe(FormComponentType.ALERT);
|
|
90
|
+
expect(hint && 'messageTemplate' in hint ? hint.messageTemplate : undefined).toContain('Share access token across all users');
|
|
91
|
+
// Matches exactly the scope that disables Connect, so the hint and the button agree.
|
|
92
|
+
expect(hint?.display?.show).toEqual({
|
|
93
|
+
authType: [IntegrationAuthType.OAUTH2_CODE],
|
|
94
|
+
'authConfig.tokenScope': [TokenScope.USER]
|
|
95
|
+
});
|
|
96
|
+
// REST API has no Connect button, so it has nothing to explain.
|
|
97
|
+
expect(restHint).toBeUndefined();
|
|
98
|
+
});
|
|
99
|
+
|
|
83
100
|
test('renders the Connect and Revoke buttons for the authorization code flow', () => {
|
|
84
101
|
const fields = datasourceFields();
|
|
85
102
|
const connect = fields.find((field) => field.name === 'oauth-connect-button');
|