@superblocksteam/shared 0.9569.3 → 0.9571.0
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.map +1 -1
- package/dist/bindings/utils.test.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/constants.test.js.map +1 -1
- package/dist/dbfs/hashing.d.ts.map +1 -1
- package/dist/dbfs/hashing.js +1 -1
- package/dist/dbfs/hashing.js.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jwt/verifier.d.ts.map +1 -1
- package/dist/jwt/verifier.js.map +1 -1
- package/dist/jwt/verifier.test.js.map +1 -1
- package/dist/org-features/index.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v4to5.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.js.map +1 -1
- package/dist/pageMigrations/migrations/v5to6.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/adjustModalCanvases.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToDimensions.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/migrateToSections.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v6to7/v6to7.test.js.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.d.ts.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.js.map +1 -1
- package/dist/pageMigrations/migrations/v7to8.test.js.map +1 -1
- package/dist/pages/pageV8.d.ts.map +1 -1
- package/dist/pages/pageV8.js.map +1 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js.map +1 -1
- package/dist/plugins/templates/gsheets.d.ts.map +1 -1
- package/dist/plugins/templates/gsheets.js.map +1 -1
- package/dist/plugins/templates/kafka.d.ts.map +1 -1
- package/dist/plugins/templates/kafka.js.map +1 -1
- package/dist/plugins/templates/mariadb.js +1 -1
- package/dist/plugins/templates/mariadb.js.map +1 -1
- package/dist/plugins/templates/mssql.js +1 -1
- package/dist/plugins/templates/mssql.js.map +1 -1
- package/dist/plugins/templates/mysql.js +1 -1
- package/dist/plugins/templates/mysql.js.map +1 -1
- package/dist/plugins/templates/postgres.js +1 -1
- package/dist/plugins/templates/postgres.js.map +1 -1
- package/dist/plugins/templates/salesforce.js +1 -1
- package/dist/plugins/templates/salesforce.js.map +1 -1
- package/dist/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.js +18 -0
- package/dist/plugins/templates/shared/auth.js.map +1 -1
- package/dist/plugins/templates/shared/openapi.d.ts.map +1 -1
- package/dist/plugins/templates/shared/openapi.js.map +1 -1
- package/dist/plugins/templates/snowflake.js +1 -1
- package/dist/plugins/templates/snowflake.js.map +1 -1
- package/dist/refactoring/application.d.ts.map +1 -1
- package/dist/refactoring/application.js.map +1 -1
- package/dist/refactoring/refactor.d.ts.map +1 -1
- package/dist/refactoring/refactor.js.map +1 -1
- package/dist/refactoring/refactor.test.js.map +1 -1
- package/dist/refactoring/rename.d.ts.map +1 -1
- package/dist/refactoring/rename.js.map +1 -1
- package/dist/refactoring/updates.d.ts.map +1 -1
- package/dist/refactoring/updates.js.map +1 -1
- package/dist/signing/JSON/index.test.js +1 -1
- package/dist/signing/JSON/index.test.js.map +1 -1
- package/dist/signing/constants.d.ts.map +1 -1
- package/dist/signing/hashing.d.ts.map +1 -1
- package/dist/signing/hashing.js.map +1 -1
- package/dist/signing/hashing.test.js.map +1 -1
- package/dist/signing/index.d.ts +1 -1
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/index.js +2 -2
- package/dist/signing/index.js.map +1 -1
- package/dist/signing/index.test.js +1 -1
- package/dist/signing/index.test.js.map +1 -1
- package/dist/socket/protocol.d.ts +1 -1
- package/dist/socket/protocol.d.ts.map +1 -1
- package/dist/socket/socket.d.ts.map +1 -1
- package/dist/socket/socket.js.map +1 -1
- package/dist/socket/socketWithClientAuth.d.ts.map +1 -1
- package/dist/socket/socketWithClientAuth.js.map +1 -1
- package/dist/socket/tracedSocket.d.ts.map +1 -1
- package/dist/socket/tracedSocket.js.map +1 -1
- package/dist/tracing/errorSanitizer.test.js.map +1 -1
- package/dist/tracing/methodTracing.d.ts.map +1 -1
- package/dist/tracing/methodTracing.js.map +1 -1
- package/dist/types/api/action.d.ts.map +1 -1
- package/dist/types/api/action.js.map +1 -1
- package/dist/types/api/execution.d.ts.map +1 -1
- package/dist/types/api/execution.js.map +1 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/index.js.map +1 -1
- package/dist/types/audit/apiRunDetails.d.ts +6 -0
- package/dist/types/audit/apiRunDetails.d.ts.map +1 -1
- package/dist/types/audit/apiRunDetails.js +5 -0
- package/dist/types/audit/apiRunDetails.js.map +1 -1
- package/dist/types/audit/audit.d.ts +12 -0
- package/dist/types/audit/audit.d.ts.map +1 -1
- package/dist/types/audit/audit.js +9 -2
- package/dist/types/audit/audit.js.map +1 -1
- package/dist/types/audit/index.d.ts +1 -0
- package/dist/types/audit/index.d.ts.map +1 -1
- package/dist/types/audit/index.js +1 -0
- package/dist/types/audit/index.js.map +1 -1
- package/dist/types/audit/ocsf.d.ts +101 -0
- package/dist/types/audit/ocsf.d.ts.map +1 -0
- package/dist/types/audit/ocsf.js +70 -0
- package/dist/types/audit/ocsf.js.map +1 -0
- package/dist/types/billing/billing.d.ts +3 -0
- package/dist/types/billing/billing.d.ts.map +1 -1
- package/dist/types/common/file.test.js.map +1 -1
- package/dist/types/datasource/auth.d.ts +2 -0
- package/dist/types/datasource/auth.d.ts.map +1 -1
- package/dist/types/datasource/auth.js +5 -0
- package/dist/types/datasource/auth.js.map +1 -1
- package/dist/types/datasource/auth.test.d.ts +2 -0
- package/dist/types/datasource/auth.test.d.ts.map +1 -0
- package/dist/types/datasource/auth.test.js +58 -0
- package/dist/types/datasource/auth.test.js.map +1 -0
- package/dist/types/datasource/index.d.ts.map +1 -1
- package/dist/types/datasource/index.js.map +1 -1
- package/dist/types/datasource/index.test.js.map +1 -1
- package/dist/types/datasource/metadata/index.d.ts.map +1 -1
- package/dist/types/datasource/metadata/index.js.map +1 -1
- package/dist/types/datasource/test.d.ts +1 -1
- package/dist/types/datasource/test.d.ts.map +1 -1
- package/dist/types/deployment/index.d.ts +1 -1
- package/dist/types/deployment/index.d.ts.map +1 -1
- package/dist/types/event/index.d.ts +1 -0
- 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/metadata/index.d.ts.map +1 -1
- package/dist/types/metadata/index.js.map +1 -1
- package/dist/types/organization/agent.d.ts.map +1 -1
- package/dist/types/organization/agent.js.map +1 -1
- package/dist/types/organization/agent.test.js.map +1 -1
- package/dist/types/page/Dimension.test.js.map +1 -1
- package/dist/types/page/event.d.ts.map +1 -1
- package/dist/types/page/event.js.map +1 -1
- package/dist/types/page/layout.d.ts +1 -1
- package/dist/types/page/layout.d.ts.map +1 -1
- package/dist/types/plugin/evaluation.d.ts.map +1 -1
- package/dist/types/plugin/evaluation.js.map +1 -1
- package/dist/types/response/GetAuditLogsEntitiesResponseBody.d.ts +1 -0
- package/dist/types/response/GetAuditLogsEntitiesResponseBody.d.ts.map +1 -1
- package/dist/types/response/GetAuditLogsResponseBody.d.ts +1 -0
- package/dist/types/response/GetAuditLogsResponseBody.d.ts.map +1 -1
- package/dist/utils/apiv2.d.ts.map +1 -1
- package/dist/utils/apiv2.js.map +1 -1
- package/dist/utils/apiv2.test.js +1 -1
- package/dist/utils/apiv2.test.js.map +1 -1
- package/dist/utils/attachment-upload.test.js.map +1 -1
- package/dist/utils/configuration.d.ts.map +1 -1
- package/dist/utils/configuration.js.map +1 -1
- package/dist/utils/configuration.test.js.map +1 -1
- package/dist/utils/env.test.js.map +1 -1
- package/dist/utils/environment.test.js.map +1 -1
- package/dist/utils/git-url.d.ts +38 -0
- package/dist/utils/git-url.d.ts.map +1 -0
- package/dist/utils/git-url.js +153 -0
- package/dist/utils/git-url.js.map +1 -0
- package/dist/utils/git-url.test.d.ts +2 -0
- package/dist/utils/git-url.test.d.ts.map +1 -0
- package/dist/utils/git-url.test.js +78 -0
- package/dist/utils/git-url.test.js.map +1 -0
- package/dist/utils/gitlab-workflow.d.ts +3 -0
- package/dist/utils/gitlab-workflow.d.ts.map +1 -0
- package/dist/utils/gitlab-workflow.js +35 -0
- package/dist/utils/gitlab-workflow.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/normalize.d.ts.map +1 -1
- package/dist/utils/normalize.js.map +1 -1
- package/dist/utils/page.d.ts.map +1 -1
- package/dist/utils/page.js.map +1 -1
- package/dist/utils/page.test.js.map +1 -1
- package/dist/utils/string.test.js.map +1 -1
- package/dist/utils/tracedEventEmitter.d.ts.map +1 -1
- package/dist/utils/tracedEventEmitter.js.map +1 -1
- package/dist/utils/tracedEventEmitter.test.js.map +1 -1
- package/dist/utils/truncate.test.js.map +1 -1
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js.map +1 -1
- package/dist/utils/url.test.js.map +1 -1
- package/dist-esm/bindings/utils.d.ts.map +1 -1
- package/dist-esm/bindings/utils.js.map +1 -1
- package/dist-esm/bindings/utils.test.js.map +1 -1
- package/dist-esm/constants.d.ts.map +1 -1
- package/dist-esm/constants.js.map +1 -1
- package/dist-esm/constants.test.js.map +1 -1
- package/dist-esm/dbfs/hashing.d.ts.map +1 -1
- package/dist-esm/dbfs/hashing.js +1 -1
- package/dist-esm/dbfs/hashing.js.map +1 -1
- package/dist-esm/errors/integration.d.ts.map +1 -1
- package/dist-esm/errors/integration.js +1 -1
- package/dist-esm/errors/integration.js.map +1 -1
- package/dist-esm/index.d.ts +1 -0
- package/dist-esm/index.d.ts.map +1 -1
- package/dist-esm/index.js +1 -0
- package/dist-esm/index.js.map +1 -1
- package/dist-esm/jwt/verifier.d.ts.map +1 -1
- package/dist-esm/jwt/verifier.js.map +1 -1
- package/dist-esm/jwt/verifier.test.js.map +1 -1
- package/dist-esm/org-features/index.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v4to5.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v5to6.d.ts.map +1 -1
- package/dist-esm/pageMigrations/migrations/v5to6.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v5to6.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/adjustModalCanvases.d.ts.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/adjustModalCanvases.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/adjustModalCanvases.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/migrateToDimensions.d.ts.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/migrateToDimensions.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/migrateToDimensions.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/migrateToSections.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v6to7/v6to7.test.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v7to8.d.ts.map +1 -1
- package/dist-esm/pageMigrations/migrations/v7to8.js.map +1 -1
- package/dist-esm/pageMigrations/migrations/v7to8.test.js.map +1 -1
- package/dist-esm/pages/pageV8.d.ts.map +1 -1
- package/dist-esm/pages/pageV8.js.map +1 -1
- package/dist-esm/plugins/registry.d.ts.map +1 -1
- package/dist-esm/plugins/registry.js.map +1 -1
- package/dist-esm/plugins/templates/gsheets.d.ts.map +1 -1
- package/dist-esm/plugins/templates/gsheets.js.map +1 -1
- package/dist-esm/plugins/templates/kafka.d.ts.map +1 -1
- package/dist-esm/plugins/templates/kafka.js.map +1 -1
- package/dist-esm/plugins/templates/mariadb.js +1 -1
- package/dist-esm/plugins/templates/mariadb.js.map +1 -1
- package/dist-esm/plugins/templates/mssql.js +1 -1
- package/dist-esm/plugins/templates/mssql.js.map +1 -1
- package/dist-esm/plugins/templates/mysql.js +1 -1
- package/dist-esm/plugins/templates/mysql.js.map +1 -1
- package/dist-esm/plugins/templates/postgres.js +1 -1
- package/dist-esm/plugins/templates/postgres.js.map +1 -1
- package/dist-esm/plugins/templates/salesforce.js +1 -1
- package/dist-esm/plugins/templates/salesforce.js.map +1 -1
- package/dist-esm/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist-esm/plugins/templates/shared/auth.js +18 -0
- package/dist-esm/plugins/templates/shared/auth.js.map +1 -1
- package/dist-esm/plugins/templates/shared/openapi.d.ts.map +1 -1
- package/dist-esm/plugins/templates/shared/openapi.js.map +1 -1
- package/dist-esm/plugins/templates/snowflake.js +1 -1
- package/dist-esm/plugins/templates/snowflake.js.map +1 -1
- package/dist-esm/refactoring/application.d.ts.map +1 -1
- package/dist-esm/refactoring/application.js.map +1 -1
- package/dist-esm/refactoring/refactor.d.ts.map +1 -1
- package/dist-esm/refactoring/refactor.js.map +1 -1
- package/dist-esm/refactoring/refactor.test.js.map +1 -1
- package/dist-esm/refactoring/rename.d.ts.map +1 -1
- package/dist-esm/refactoring/rename.js.map +1 -1
- package/dist-esm/refactoring/updates.d.ts.map +1 -1
- package/dist-esm/refactoring/updates.js.map +1 -1
- package/dist-esm/signing/JSON/index.test.js +1 -1
- package/dist-esm/signing/JSON/index.test.js.map +1 -1
- package/dist-esm/signing/constants.d.ts.map +1 -1
- package/dist-esm/signing/hashing.d.ts.map +1 -1
- package/dist-esm/signing/hashing.js.map +1 -1
- package/dist-esm/signing/hashing.test.js.map +1 -1
- package/dist-esm/signing/index.d.ts +1 -1
- package/dist-esm/signing/index.d.ts.map +1 -1
- package/dist-esm/signing/index.js +2 -2
- package/dist-esm/signing/index.js.map +1 -1
- package/dist-esm/signing/index.test.js +1 -1
- package/dist-esm/signing/index.test.js.map +1 -1
- package/dist-esm/socket/protocol.d.ts +1 -1
- package/dist-esm/socket/protocol.d.ts.map +1 -1
- package/dist-esm/socket/socket.d.ts.map +1 -1
- package/dist-esm/socket/socket.js.map +1 -1
- package/dist-esm/socket/socketWithClientAuth.d.ts.map +1 -1
- package/dist-esm/socket/socketWithClientAuth.js.map +1 -1
- package/dist-esm/socket/tracedSocket.d.ts.map +1 -1
- package/dist-esm/socket/tracedSocket.js.map +1 -1
- package/dist-esm/tracing/errorSanitizer.test.js.map +1 -1
- package/dist-esm/tracing/methodTracing.d.ts.map +1 -1
- package/dist-esm/tracing/methodTracing.js.map +1 -1
- package/dist-esm/types/api/action.d.ts.map +1 -1
- package/dist-esm/types/api/action.js.map +1 -1
- package/dist-esm/types/api/execution.d.ts.map +1 -1
- package/dist-esm/types/api/execution.js.map +1 -1
- package/dist-esm/types/api/index.d.ts.map +1 -1
- package/dist-esm/types/api/index.js.map +1 -1
- package/dist-esm/types/audit/apiRunDetails.d.ts +6 -0
- package/dist-esm/types/audit/apiRunDetails.d.ts.map +1 -1
- package/dist-esm/types/audit/apiRunDetails.js +5 -0
- package/dist-esm/types/audit/apiRunDetails.js.map +1 -1
- package/dist-esm/types/audit/audit.d.ts +12 -0
- package/dist-esm/types/audit/audit.d.ts.map +1 -1
- package/dist-esm/types/audit/audit.js +9 -2
- package/dist-esm/types/audit/audit.js.map +1 -1
- package/dist-esm/types/audit/index.d.ts +1 -0
- package/dist-esm/types/audit/index.d.ts.map +1 -1
- package/dist-esm/types/audit/index.js +1 -0
- package/dist-esm/types/audit/index.js.map +1 -1
- package/dist-esm/types/audit/ocsf.d.ts +101 -0
- package/dist-esm/types/audit/ocsf.d.ts.map +1 -0
- package/dist-esm/types/audit/ocsf.js +65 -0
- package/dist-esm/types/audit/ocsf.js.map +1 -0
- package/dist-esm/types/billing/billing.d.ts +3 -0
- package/dist-esm/types/billing/billing.d.ts.map +1 -1
- package/dist-esm/types/common/file.test.js.map +1 -1
- package/dist-esm/types/datasource/auth.d.ts +2 -0
- package/dist-esm/types/datasource/auth.d.ts.map +1 -1
- package/dist-esm/types/datasource/auth.js +5 -0
- package/dist-esm/types/datasource/auth.js.map +1 -1
- package/dist-esm/types/datasource/auth.test.d.ts +2 -0
- package/dist-esm/types/datasource/auth.test.d.ts.map +1 -0
- package/dist-esm/types/datasource/auth.test.js +56 -0
- package/dist-esm/types/datasource/auth.test.js.map +1 -0
- package/dist-esm/types/datasource/index.d.ts.map +1 -1
- package/dist-esm/types/datasource/index.js.map +1 -1
- package/dist-esm/types/datasource/index.test.js.map +1 -1
- package/dist-esm/types/datasource/metadata/index.d.ts.map +1 -1
- package/dist-esm/types/datasource/metadata/index.js.map +1 -1
- package/dist-esm/types/datasource/test.d.ts +1 -1
- package/dist-esm/types/datasource/test.d.ts.map +1 -1
- package/dist-esm/types/deployment/index.d.ts +1 -1
- package/dist-esm/types/deployment/index.d.ts.map +1 -1
- package/dist-esm/types/event/index.d.ts +1 -0
- package/dist-esm/types/event/index.d.ts.map +1 -1
- package/dist-esm/types/event/index.js +1 -0
- package/dist-esm/types/event/index.js.map +1 -1
- package/dist-esm/types/metadata/index.d.ts.map +1 -1
- package/dist-esm/types/metadata/index.js.map +1 -1
- package/dist-esm/types/organization/agent.d.ts.map +1 -1
- package/dist-esm/types/organization/agent.js.map +1 -1
- package/dist-esm/types/organization/agent.test.js.map +1 -1
- package/dist-esm/types/page/Dimension.test.js.map +1 -1
- package/dist-esm/types/page/event.d.ts.map +1 -1
- package/dist-esm/types/page/event.js.map +1 -1
- package/dist-esm/types/page/layout.d.ts +1 -1
- package/dist-esm/types/page/layout.d.ts.map +1 -1
- package/dist-esm/types/plugin/evaluation.d.ts.map +1 -1
- package/dist-esm/types/plugin/evaluation.js.map +1 -1
- package/dist-esm/types/response/GetAuditLogsEntitiesResponseBody.d.ts +1 -0
- package/dist-esm/types/response/GetAuditLogsEntitiesResponseBody.d.ts.map +1 -1
- package/dist-esm/types/response/GetAuditLogsResponseBody.d.ts +1 -0
- package/dist-esm/types/response/GetAuditLogsResponseBody.d.ts.map +1 -1
- package/dist-esm/utils/apiv2.d.ts.map +1 -1
- package/dist-esm/utils/apiv2.js.map +1 -1
- package/dist-esm/utils/apiv2.test.js +1 -1
- package/dist-esm/utils/apiv2.test.js.map +1 -1
- package/dist-esm/utils/attachment-upload.test.js.map +1 -1
- package/dist-esm/utils/configuration.d.ts.map +1 -1
- package/dist-esm/utils/configuration.js.map +1 -1
- package/dist-esm/utils/configuration.test.js.map +1 -1
- package/dist-esm/utils/env.test.js.map +1 -1
- package/dist-esm/utils/environment.test.js.map +1 -1
- package/dist-esm/utils/git-url.d.ts +38 -0
- package/dist-esm/utils/git-url.d.ts.map +1 -0
- package/dist-esm/utils/git-url.js +143 -0
- package/dist-esm/utils/git-url.js.map +1 -0
- package/dist-esm/utils/git-url.test.d.ts +2 -0
- package/dist-esm/utils/git-url.test.d.ts.map +1 -0
- package/dist-esm/utils/git-url.test.js +76 -0
- package/dist-esm/utils/git-url.test.js.map +1 -0
- package/dist-esm/utils/gitlab-workflow.d.ts +3 -0
- package/dist-esm/utils/gitlab-workflow.d.ts.map +1 -0
- package/dist-esm/utils/gitlab-workflow.js +31 -0
- package/dist-esm/utils/gitlab-workflow.js.map +1 -0
- package/dist-esm/utils/index.d.ts +1 -0
- package/dist-esm/utils/index.d.ts.map +1 -1
- package/dist-esm/utils/index.js +1 -0
- package/dist-esm/utils/index.js.map +1 -1
- package/dist-esm/utils/normalize.d.ts.map +1 -1
- package/dist-esm/utils/normalize.js.map +1 -1
- package/dist-esm/utils/page.d.ts.map +1 -1
- package/dist-esm/utils/page.js.map +1 -1
- package/dist-esm/utils/page.test.js.map +1 -1
- package/dist-esm/utils/string.test.js.map +1 -1
- package/dist-esm/utils/tracedEventEmitter.d.ts.map +1 -1
- package/dist-esm/utils/tracedEventEmitter.js.map +1 -1
- package/dist-esm/utils/tracedEventEmitter.test.js.map +1 -1
- package/dist-esm/utils/truncate.test.js.map +1 -1
- package/dist-esm/utils/url.d.ts.map +1 -1
- package/dist-esm/utils/url.js.map +1 -1
- package/dist-esm/utils/url.test.js.map +1 -1
- package/package.json +1 -1
- package/src/bindings/utils.test.ts +1 -0
- package/src/bindings/utils.ts +1 -0
- package/src/constants.test.ts +3 -1
- package/src/constants.ts +1 -0
- package/src/dbfs/hashing.ts +2 -1
- package/src/errors/integration.ts +2 -1
- package/src/index.ts +1 -0
- package/src/jwt/verifier.test.ts +2 -2
- package/src/jwt/verifier.ts +1 -0
- package/src/org-features/index.test.ts +1 -0
- package/src/pageMigrations/migrations/v4to5.test.ts +1 -0
- package/src/pageMigrations/migrations/v5to6.test.ts +1 -0
- package/src/pageMigrations/migrations/v5to6.ts +1 -0
- package/src/pageMigrations/migrations/v6to7/adjustModalCanvases.test.ts +1 -0
- package/src/pageMigrations/migrations/v6to7/adjustModalCanvases.ts +1 -0
- package/src/pageMigrations/migrations/v6to7/migrateToDimensions.test.ts +1 -0
- package/src/pageMigrations/migrations/v6to7/migrateToDimensions.ts +1 -0
- package/src/pageMigrations/migrations/v6to7/migrateToSections.test.ts +1 -0
- package/src/pageMigrations/migrations/v6to7/v6to7.test.ts +1 -0
- package/src/pageMigrations/migrations/v7to8.test.ts +1 -0
- package/src/pageMigrations/migrations/v7to8.ts +1 -0
- package/src/pages/pageV8.ts +1 -0
- package/src/plugins/registry.ts +0 -1
- package/src/plugins/templates/gsheets.ts +0 -1
- package/src/plugins/templates/kafka.ts +1 -0
- package/src/plugins/templates/mariadb.ts +1 -1
- package/src/plugins/templates/mssql.ts +1 -1
- package/src/plugins/templates/mysql.ts +1 -1
- package/src/plugins/templates/postgres.ts +1 -1
- package/src/plugins/templates/salesforce.ts +1 -1
- package/src/plugins/templates/shared/auth.ts +18 -0
- package/src/plugins/templates/shared/openapi.ts +1 -0
- package/src/plugins/templates/snowflake.ts +1 -1
- package/src/refactoring/application.ts +1 -0
- package/src/refactoring/refactor.test.ts +1 -0
- package/src/refactoring/refactor.ts +1 -0
- package/src/refactoring/rename.ts +1 -0
- package/src/refactoring/updates.ts +1 -0
- package/src/signing/JSON/index.test.ts +2 -1
- package/src/signing/constants.ts +1 -0
- package/src/signing/hashing.test.ts +1 -0
- package/src/signing/hashing.ts +1 -0
- package/src/signing/index.test.ts +3 -1
- package/src/signing/index.ts +5 -3
- package/src/socket/protocol.ts +13 -13
- package/src/socket/socket.ts +1 -0
- package/src/socket/socketWithClientAuth.ts +1 -0
- package/src/socket/tracedSocket.ts +1 -0
- package/src/tracing/errorSanitizer.test.ts +1 -0
- package/src/tracing/methodTracing.ts +1 -0
- package/src/types/api/action.ts +1 -0
- package/src/types/api/execution.ts +3 -1
- package/src/types/api/index.ts +1 -0
- package/src/types/audit/apiRunDetails.ts +7 -0
- package/src/types/audit/audit.ts +13 -2
- package/src/types/audit/index.ts +1 -0
- package/src/types/audit/ocsf.ts +121 -0
- package/src/types/billing/billing.ts +3 -0
- package/src/types/common/file.test.ts +1 -0
- package/src/types/datasource/auth.test.ts +64 -0
- package/src/types/datasource/auth.ts +6 -0
- package/src/types/datasource/index.test.ts +1 -0
- package/src/types/datasource/index.ts +1 -0
- package/src/types/datasource/metadata/index.ts +1 -0
- package/src/types/datasource/test.ts +1 -1
- package/src/types/deployment/index.ts +1 -1
- package/src/types/event/index.ts +1 -0
- package/src/types/metadata/index.ts +1 -0
- package/src/types/organization/agent.test.ts +1 -0
- package/src/types/organization/agent.ts +1 -0
- package/src/types/page/Dimension.test.ts +1 -0
- package/src/types/page/event.ts +1 -0
- package/src/types/page/layout.ts +1 -1
- package/src/types/plugin/evaluation.ts +1 -1
- package/src/types/response/GetAuditLogsEntitiesResponseBody.ts +1 -0
- package/src/types/response/GetAuditLogsResponseBody.ts +1 -0
- package/src/utils/apiv2.test.ts +3 -1
- package/src/utils/apiv2.ts +1 -0
- package/src/utils/attachment-upload.test.ts +1 -0
- package/src/utils/configuration.test.ts +1 -0
- package/src/utils/configuration.ts +1 -1
- package/src/utils/env.test.ts +1 -0
- package/src/utils/environment.test.ts +1 -0
- package/src/utils/git-url.test.ts +102 -0
- package/src/utils/git-url.ts +175 -0
- package/src/utils/gitlab-workflow.ts +33 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/normalize.ts +1 -0
- package/src/utils/page.test.ts +1 -0
- package/src/utils/page.ts +1 -0
- package/src/utils/string.test.ts +1 -0
- package/src/utils/tracedEventEmitter.test.ts +1 -0
- package/src/utils/tracedEventEmitter.ts +2 -0
- package/src/utils/truncate.test.ts +1 -0
- package/src/utils/url.test.ts +1 -0
- package/src/utils/url.ts +1 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OCSF (Open Cybersecurity Schema Framework) v1.3 types for audit events.
|
|
3
|
+
* See https://schema.ocsf.io/ for the full spec.
|
|
4
|
+
*
|
|
5
|
+
* We implement a subset relevant to Superblocks audit logging:
|
|
6
|
+
* - Category 3: Identity & Access Management
|
|
7
|
+
* - Category 6: Application Activity
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export enum OCSFCategoryUid {
|
|
11
|
+
IAM = 3,
|
|
12
|
+
APPLICATION_ACTIVITY = 6
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum OCSFClassUid {
|
|
16
|
+
ACCOUNT_CHANGE = 3001,
|
|
17
|
+
AUTHENTICATION = 3002,
|
|
18
|
+
ENTITY_MANAGEMENT = 3004,
|
|
19
|
+
USER_ACCESS_MANAGEMENT = 3005,
|
|
20
|
+
APPLICATION_LIFECYCLE = 6002,
|
|
21
|
+
API_ACTIVITY = 6003
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum OCSFActivityId {
|
|
25
|
+
UNKNOWN = 0,
|
|
26
|
+
CREATE = 1,
|
|
27
|
+
READ = 2,
|
|
28
|
+
UPDATE = 3,
|
|
29
|
+
DELETE = 4,
|
|
30
|
+
EXECUTE = 5,
|
|
31
|
+
LOGIN = 6,
|
|
32
|
+
LOGOUT = 7,
|
|
33
|
+
DEPLOY = 8,
|
|
34
|
+
GRANT = 9,
|
|
35
|
+
REVOKE = 10,
|
|
36
|
+
OTHER = 99
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export enum OCSFStatusId {
|
|
40
|
+
UNKNOWN = 0,
|
|
41
|
+
SUCCESS = 1,
|
|
42
|
+
FAILURE = 2,
|
|
43
|
+
IN_PROGRESS = 99
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export enum OCSFSeverityId {
|
|
47
|
+
UNKNOWN = 0,
|
|
48
|
+
INFORMATIONAL = 1,
|
|
49
|
+
LOW = 2,
|
|
50
|
+
MEDIUM = 3,
|
|
51
|
+
HIGH = 4,
|
|
52
|
+
CRITICAL = 5,
|
|
53
|
+
FATAL = 6
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface OCSFActor {
|
|
57
|
+
user: {
|
|
58
|
+
uid: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
email_addr?: string;
|
|
61
|
+
type?: string;
|
|
62
|
+
};
|
|
63
|
+
session?: {
|
|
64
|
+
uid: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface OCSFResource {
|
|
69
|
+
uid: string;
|
|
70
|
+
type: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface OCSFApi {
|
|
75
|
+
operation: string;
|
|
76
|
+
service: {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface OCSFMetadata {
|
|
82
|
+
product: {
|
|
83
|
+
name: string;
|
|
84
|
+
vendor_name: string;
|
|
85
|
+
};
|
|
86
|
+
version: string;
|
|
87
|
+
log_name: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Core OCSF event shape stored in audit_event.data (jsonb).
|
|
92
|
+
* `type_uid` = class_uid * 100 + activity_id (OCSF convention).
|
|
93
|
+
*/
|
|
94
|
+
export interface OCSFAuditEvent {
|
|
95
|
+
category_uid: OCSFCategoryUid;
|
|
96
|
+
class_uid: OCSFClassUid;
|
|
97
|
+
activity_id: OCSFActivityId;
|
|
98
|
+
type_uid: number;
|
|
99
|
+
status_id: OCSFStatusId;
|
|
100
|
+
severity_id: OCSFSeverityId;
|
|
101
|
+
time: number;
|
|
102
|
+
duration?: number;
|
|
103
|
+
actor: OCSFActor;
|
|
104
|
+
resource: OCSFResource;
|
|
105
|
+
api?: OCSFApi;
|
|
106
|
+
metadata: OCSFMetadata;
|
|
107
|
+
unmapped?: Record<string, unknown>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function computeTypeUid(classUid: OCSFClassUid, activityId: OCSFActivityId): number {
|
|
111
|
+
return classUid * 100 + activityId;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const METADATA: Omit<OCSFMetadata, 'log_name'> = {
|
|
115
|
+
product: { name: 'Superblocks', vendor_name: 'Superblocks' },
|
|
116
|
+
version: '1.3.0'
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export function buildOCSFMetadata(logName: string): OCSFMetadata {
|
|
120
|
+
return { ...METADATA, log_name: logName };
|
|
121
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { describe, test, expect } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { IntegrationAuthType, getDisplayName, extractPublic, getAuthId } from './auth.js';
|
|
4
|
+
|
|
5
|
+
describe('getDisplayName', () => {
|
|
6
|
+
test('returns "IdP Token Passthrough" for OAUTH2_IDP_TOKEN_PASSTHROUGH', () => {
|
|
7
|
+
expect(getDisplayName(IntegrationAuthType.OAUTH2_IDP_TOKEN_PASSTHROUGH)).toBe('IdP Token Passthrough');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
test('returns "OAuth2 - On-Behalf-Of Token Exchange" for OAUTH2_TOKEN_EXCHANGE', () => {
|
|
11
|
+
expect(getDisplayName(IntegrationAuthType.OAUTH2_TOKEN_EXCHANGE)).toBe('OAuth2 - On-Behalf-Of Token Exchange');
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
test('returns "None" for NONE', () => {
|
|
15
|
+
expect(getDisplayName(IntegrationAuthType.NONE)).toBe('None');
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
describe('extractPublic', () => {
|
|
20
|
+
test('returns empty object for OAUTH2_IDP_TOKEN_PASSTHROUGH (no secrets to expose)', () => {
|
|
21
|
+
const authConfig = { clientId: 'test' };
|
|
22
|
+
expect(extractPublic(IntegrationAuthType.OAUTH2_IDP_TOKEN_PASSTHROUGH, authConfig)).toEqual({});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('returns token exchange fields for OAUTH2_TOKEN_EXCHANGE', () => {
|
|
26
|
+
const authConfig = {
|
|
27
|
+
clientId: 'my-client',
|
|
28
|
+
clientSecret: 'my-secret',
|
|
29
|
+
tokenUrl: 'https://token.example.com',
|
|
30
|
+
audience: 'https://api.example.com',
|
|
31
|
+
scope: 'read write',
|
|
32
|
+
subjectTokenSource: 'SUBJECT_TOKEN_SOURCE_LOGIN_IDENTITY_PROVIDER',
|
|
33
|
+
subjectTokenSourceStaticToken: 'static'
|
|
34
|
+
};
|
|
35
|
+
const result = extractPublic(IntegrationAuthType.OAUTH2_TOKEN_EXCHANGE, authConfig);
|
|
36
|
+
expect(result).toEqual({
|
|
37
|
+
clientId: 'my-client',
|
|
38
|
+
tokenUrl: 'https://token.example.com',
|
|
39
|
+
audience: 'https://api.example.com',
|
|
40
|
+
scope: 'read write',
|
|
41
|
+
subjectTokenSource: 'SUBJECT_TOKEN_SOURCE_LOGIN_IDENTITY_PROVIDER',
|
|
42
|
+
subjectTokenSourceStaticToken: 'static'
|
|
43
|
+
});
|
|
44
|
+
// clientSecret must not leak
|
|
45
|
+
expect(result).not.toHaveProperty('clientSecret');
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test('throws for unknown auth type', () => {
|
|
49
|
+
expect(() => extractPublic('totally-unknown-type' as never, {})).toThrow('unknown auth type');
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
describe('getAuthId', () => {
|
|
54
|
+
test('uses unknown-client for OAUTH2_IDP_TOKEN_PASSTHROUGH (no client identity)', () => {
|
|
55
|
+
const authId = getAuthId(IntegrationAuthType.OAUTH2_IDP_TOKEN_PASSTHROUGH, {}, 'int-1', 'cfg-1');
|
|
56
|
+
expect(authId).toBe('oauth-idp-token-passthrough.unknown-client');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test('uses clientId for OAUTH2_TOKEN_EXCHANGE', () => {
|
|
60
|
+
const authId = getAuthId(IntegrationAuthType.OAUTH2_TOKEN_EXCHANGE, { clientId: 'my-client' }, 'int-1', 'cfg-1');
|
|
61
|
+
// Token exchange builds: `clientId-hashedFields` — clientId prefix present
|
|
62
|
+
expect(authId).toMatch(/^oauth-token-exchange\.my-client/);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import JSON5 from 'json5';
|
|
2
2
|
import { isEmpty } from 'lodash';
|
|
3
|
+
|
|
3
4
|
import { ClientAuthMethod } from '../../plugins/index.js';
|
|
4
5
|
import { OAuthErrorResponse, OAuthTokenResponse } from '../auth/index.js';
|
|
5
6
|
import { Property } from '../common/property.js';
|
|
@@ -102,6 +103,8 @@ export enum IntegrationAuthType {
|
|
|
102
103
|
OAUTH2_TOKEN_EXCHANGE = 'oauth-token-exchange',
|
|
103
104
|
// since proto does not support hyphens
|
|
104
105
|
OAUTH2_TOKEN_EXCHANGE_PROTO = 'oauthTokenExchange',
|
|
106
|
+
/** Passes the user's SSO IdP access token through as {{ oauth.token }} — no OAuth client config needed. */
|
|
107
|
+
OAUTH2_IDP_TOKEN_PASSTHROUGH = 'oauth-idp-token-passthrough',
|
|
105
108
|
FIREBASE = 'Firebase',
|
|
106
109
|
BEARER = 'bearer',
|
|
107
110
|
API_KEY = 'api-key',
|
|
@@ -199,6 +202,8 @@ export function getDisplayName(authType: AuthType): string {
|
|
|
199
202
|
return 'OAuth2 - Authorization Code';
|
|
200
203
|
case IntegrationAuthType.OAUTH2_TOKEN_EXCHANGE:
|
|
201
204
|
return 'OAuth2 - On-Behalf-Of Token Exchange';
|
|
205
|
+
case IntegrationAuthType.OAUTH2_IDP_TOKEN_PASSTHROUGH:
|
|
206
|
+
return 'IdP Token Passthrough';
|
|
202
207
|
case IntegrationAuthType.BEARER:
|
|
203
208
|
return 'Bearer Token';
|
|
204
209
|
case IntegrationAuthType.TOKEN_PREFIXED:
|
|
@@ -425,6 +430,7 @@ export const extractPublic = (authType: AuthType | undefined, authConfig: AuthCo
|
|
|
425
430
|
case IntegrationAuthType.TOKEN_PREFIXED:
|
|
426
431
|
case IntegrationAuthType.API_KEY:
|
|
427
432
|
case IntegrationAuthType.API_KEY_FORM:
|
|
433
|
+
case IntegrationAuthType.OAUTH2_IDP_TOKEN_PASSTHROUGH:
|
|
428
434
|
case DatabaseAuthType.FIELDS:
|
|
429
435
|
case DatabaseAuthType.OKTA:
|
|
430
436
|
case DatabaseAuthType.KEY_PAIR:
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
SmtpPluginV1 as SmtpPlugin
|
|
14
14
|
} from '@superblocksteam/types';
|
|
15
15
|
import { SecretsV1 as Secrets } from '@superblocksteam/types';
|
|
16
|
+
|
|
16
17
|
import { Property } from '../common/property.js';
|
|
17
18
|
import { Plugin, PluginMetadata } from '../plugin/index.js';
|
|
18
19
|
import { CreatorDto } from '../rbac/index.js';
|
package/src/types/event/index.ts
CHANGED
package/src/types/page/event.ts
CHANGED
package/src/types/page/layout.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Dimension } from './Dimension.js';
|
|
2
|
+
import { EventDefinitionLoose } from './event.js';
|
|
2
3
|
import { Margin } from './Margin.js';
|
|
3
4
|
import { Padding } from './Padding.js';
|
|
4
|
-
import { EventDefinitionLoose } from './event.js';
|
|
5
5
|
import { DynamicPath6, EntityWithBindings6 } from './shared.js';
|
|
6
6
|
|
|
7
7
|
export interface WidgetProps4and5 {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { get, isFunction, isPlainObject } from 'lodash';
|
|
2
1
|
import type { TreeCursor } from '@lezer/common';
|
|
3
2
|
import type { LRParser } from '@lezer/lr';
|
|
4
3
|
import type { Token, TokenizeOptions } from 'esprima';
|
|
5
4
|
import type { SourceLocation } from 'estree';
|
|
5
|
+
import { get, isFunction, isPlainObject } from 'lodash';
|
|
6
6
|
|
|
7
7
|
export type EvaluationPair = {
|
|
8
8
|
binding: string;
|
package/src/utils/apiv2.test.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { JsonValue } from '@bufbuild/protobuf';
|
|
2
|
-
import { Api } from '@superblocksteam/types';
|
|
3
2
|
import { cloneDeep } from 'lodash';
|
|
4
3
|
import { describe, it, expect } from 'vitest';
|
|
4
|
+
|
|
5
|
+
import { Api } from '@superblocksteam/types';
|
|
6
|
+
|
|
5
7
|
import { sanitizeV2RequestBody } from './apiv2.js';
|
|
6
8
|
|
|
7
9
|
describe('sanitizeV2RequestBody', () => {
|
package/src/utils/apiv2.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Value as ValuePb } from '@bufbuild/protobuf';
|
|
2
|
+
|
|
2
3
|
import { GraphQLIntegrationPlugin } from '../plugins/templates/graphqlintegration.js';
|
|
3
4
|
import { GOOGLE_SHEETS_PLUGIN_ID } from '../plugins/templates/gsheets.js';
|
|
4
5
|
import { MariaDBPlugin } from '../plugins/templates/mariadb.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cloneDeep } from 'lodash';
|
|
2
2
|
import { describe, test, expect } from 'vitest';
|
|
3
|
+
|
|
3
4
|
import { PostgresPlugin, RestApiIntegrationPlugin } from '../plugins/index.js';
|
|
4
5
|
import { PostgresDatasourceConfiguration, Property, RestApiDatasourceConfiguration } from '../types/index.js';
|
|
5
6
|
import { MASKED_SECRET, maskSecrets, unmaskSecrets } from './configuration.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _ from 'lodash';
|
|
2
|
+
|
|
2
3
|
import {
|
|
3
4
|
FieldListFormItem,
|
|
4
5
|
FormComponentType,
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
Property,
|
|
9
10
|
getRowItemsFromSectionItem
|
|
10
11
|
} from '../types/index.js';
|
|
11
|
-
|
|
12
12
|
import { DatasourceConfiguration, InputDataType } from '../types/index.js';
|
|
13
13
|
|
|
14
14
|
export const MASKED_SECRET = '<redacted>';
|
package/src/utils/env.test.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, test, expect } from 'vitest';
|
|
2
|
+
|
|
2
3
|
import { BadRequestError } from '../errors/index.js';
|
|
3
4
|
import { DatasourceEnvironments, ENVIRONMENT_ALL, ENVIRONMENT_PRODUCTION, ENVIRONMENT_STAGING } from '../types/index.js';
|
|
4
5
|
import { checkEnvironment, getDefaultDatasourceEnvironment, getDefaultEnvironment } from './environment.js';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import { GITHUB_PAT_SETTINGS_URL, getGitHubCompareUrl, gitRemoteUrlToWeb, isGitHubUrl, isValidGitUrl } from './git-url.js';
|
|
4
|
+
|
|
5
|
+
describe('isValidGitUrl', () => {
|
|
6
|
+
it.each([
|
|
7
|
+
'https://github.com/org/repo.git',
|
|
8
|
+
'https://github.com/org/repo',
|
|
9
|
+
'http://gitlab.com/org/repo.git',
|
|
10
|
+
'git@github.com:org/repo.git',
|
|
11
|
+
'git@gitlab.com:org/repo'
|
|
12
|
+
])('returns true for %s', (url) => {
|
|
13
|
+
expect(isValidGitUrl(url)).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it.each(['', 'not-a-url', 'ftp://github.com/org/repo', 'https://'])('returns false for %j', (url) => {
|
|
17
|
+
expect(isValidGitUrl(url)).toBe(false);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('trims whitespace', () => {
|
|
21
|
+
expect(isValidGitUrl(' https://github.com/org/repo ')).toBe(true);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe('isGitHubUrl', () => {
|
|
26
|
+
it.each(['https://github.com/org/repo.git', 'https://github.com/org/repo', 'git@github.com:org/repo.git'])(
|
|
27
|
+
'returns true for %s',
|
|
28
|
+
(url) => {
|
|
29
|
+
expect(isGitHubUrl(url)).toBe(true);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
it.each(['https://gitlab.com/org/repo', 'git@bitbucket.org:org/repo.git', 'https://example.com/org/repo', 'not-a-url'])(
|
|
34
|
+
'returns false for %s',
|
|
35
|
+
(url) => {
|
|
36
|
+
expect(isGitHubUrl(url)).toBe(false);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
it('is case-insensitive on the host', () => {
|
|
41
|
+
expect(isGitHubUrl('https://GitHub.COM/org/repo')).toBe(true);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe('gitRemoteUrlToWeb', () => {
|
|
46
|
+
it.each<[string, string]>([
|
|
47
|
+
['https://github.com/org/repo.git', 'https://github.com/org/repo'],
|
|
48
|
+
['https://github.com/org/repo', 'https://github.com/org/repo'],
|
|
49
|
+
['http://gitlab.com/org/repo.git', 'http://gitlab.com/org/repo'],
|
|
50
|
+
['git@github.com:org/repo.git', 'https://github.com/org/repo'],
|
|
51
|
+
['git@gitlab.com:group/sub/repo.git', 'https://gitlab.com/group/sub/repo']
|
|
52
|
+
])('converts %s → %s', (input, expected) => {
|
|
53
|
+
expect(gitRemoteUrlToWeb(input)).toBe(expected);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('returns null for unconvertible URLs', () => {
|
|
57
|
+
expect(gitRemoteUrlToWeb('not-a-url')).toBeNull();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe('getGitHubCompareUrl', () => {
|
|
62
|
+
const base = { fromBranch: 'feature/cool', toBranch: 'main' };
|
|
63
|
+
|
|
64
|
+
it('builds a GitHub compare URL', () => {
|
|
65
|
+
expect(
|
|
66
|
+
getGitHubCompareUrl({
|
|
67
|
+
gitRemoteUrl: 'https://github.com/org/repo.git',
|
|
68
|
+
...base
|
|
69
|
+
})
|
|
70
|
+
).toBe('https://github.com/org/repo/compare/main...feature%2Fcool');
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('appends title and body', () => {
|
|
74
|
+
expect(
|
|
75
|
+
getGitHubCompareUrl({
|
|
76
|
+
gitRemoteUrl: 'https://github.com/org/repo.git',
|
|
77
|
+
...base,
|
|
78
|
+
title: 'My PR',
|
|
79
|
+
body: '## Summary'
|
|
80
|
+
})
|
|
81
|
+
).toBe('https://github.com/org/repo/compare/main...feature%2Fcool?expand=1&title=My+PR&body=%23%23+Summary');
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('returns null for non-GitHub URLs', () => {
|
|
85
|
+
expect(
|
|
86
|
+
getGitHubCompareUrl({
|
|
87
|
+
gitRemoteUrl: 'https://gitlab.com/org/repo',
|
|
88
|
+
...base
|
|
89
|
+
})
|
|
90
|
+
).toBeNull();
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('returns null for unconvertible URLs', () => {
|
|
94
|
+
expect(getGitHubCompareUrl({ gitRemoteUrl: 'not-a-url', ...base })).toBeNull();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
describe('GITHUB_PAT_SETTINGS_URL', () => {
|
|
99
|
+
it('is a valid URL', () => {
|
|
100
|
+
expect(GITHUB_PAT_SETTINGS_URL).toBe('https://github.com/settings/tokens');
|
|
101
|
+
});
|
|
102
|
+
});
|