@webiny/api-core 0.0.0-unstable.7be00a75a9 → 0.0.0-unstable.7c2def32a7
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/ApiCoreFeature.d.ts +2 -2
- package/ApiCoreFeature.js +35 -5
- package/ApiCoreFeature.js.map +1 -1
- package/exports/api/security/api-key.d.ts +1 -0
- package/exports/api/security/api-key.js +1 -0
- package/exports/api/tasks.d.ts +1 -0
- package/exports/api/tasks.js +1 -1
- package/exports/api.d.ts +2 -1
- package/exports/api.js +2 -1
- package/features/ai/Ai.d.ts +5 -1
- package/features/ai/Ai.js +72 -29
- package/features/ai/Ai.js.map +1 -1
- package/features/ai/AiModelRegistry.d.ts +14 -0
- package/features/ai/AiModelRegistry.js +39 -0
- package/features/ai/AiModelRegistry.js.map +1 -0
- package/features/ai/AiSdkToolHandlerResolver.d.ts +11 -0
- package/features/ai/AiSdkToolHandlerResolver.js +19 -0
- package/features/ai/AiSdkToolHandlerResolver.js.map +1 -0
- package/features/ai/AiSdkTools.d.ts +4 -3
- package/features/ai/AiSdkTools.js +11 -9
- package/features/ai/AiSdkTools.js.map +1 -1
- package/features/ai/AnthropicSdkFactory.js +18 -34
- package/features/ai/AnthropicSdkFactory.js.map +1 -1
- package/features/ai/DEVELOPERS.md +183 -0
- package/features/ai/GoogleSdkFactory.d.ts +10 -0
- package/features/ai/GoogleSdkFactory.js +65 -0
- package/features/ai/GoogleSdkFactory.js.map +1 -0
- package/features/ai/OpenAiSdkFactory.js +42 -150
- package/features/ai/OpenAiSdkFactory.js.map +1 -1
- package/features/ai/OpenRouterSdkFactory.d.ts +10 -0
- package/features/ai/OpenRouterSdkFactory.js +112 -0
- package/features/ai/OpenRouterSdkFactory.js.map +1 -0
- package/features/ai/RemoteAiModelCatalog.d.ts +13 -0
- package/features/ai/RemoteAiModelCatalog.js +74 -0
- package/features/ai/RemoteAiModelCatalog.js.map +1 -0
- package/features/ai/TextExtractor/DefaultTextExtractor.d.ts +9 -0
- package/features/ai/TextExtractor/DefaultTextExtractor.js +28 -0
- package/features/ai/TextExtractor/DefaultTextExtractor.js.map +1 -0
- package/features/ai/TextExtractor/abstractions.d.ts +12 -0
- package/features/ai/TextExtractor/abstractions.js +5 -0
- package/features/ai/TextExtractor/abstractions.js.map +1 -0
- package/features/ai/TextExtractor/index.d.ts +3 -0
- package/features/ai/TextExtractor/index.js +2 -0
- package/features/ai/TextExtractor/parsers/docxParser.d.ts +1 -0
- package/features/ai/TextExtractor/parsers/docxParser.js +111 -0
- package/features/ai/TextExtractor/parsers/docxParser.js.map +1 -0
- package/features/ai/abstractions.d.ts +102 -7
- package/features/ai/abstractions.js +6 -2
- package/features/ai/abstractions.js.map +1 -1
- package/features/ai/events.d.ts +59 -0
- package/features/ai/events.js +41 -0
- package/features/ai/events.js.map +1 -0
- package/features/ai/feature.js +16 -0
- package/features/ai/feature.js.map +1 -1
- package/features/ai/index.d.ts +6 -2
- package/features/ai/index.js +4 -1
- package/features/ai/toolPipeline/AiOutputToolRegistry.d.ts +11 -0
- package/features/ai/toolPipeline/AiOutputToolRegistry.js +31 -0
- package/features/ai/toolPipeline/AiOutputToolRegistry.js.map +1 -0
- package/features/ai/toolPipeline/AiToolPipelineRunner.d.ts +10 -0
- package/features/ai/toolPipeline/AiToolPipelineRunner.js +36 -0
- package/features/ai/toolPipeline/AiToolPipelineRunner.js.map +1 -0
- package/features/ai/toolPipeline/abstractions.d.ts +23 -0
- package/features/ai/toolPipeline/abstractions.js +7 -0
- package/features/ai/toolPipeline/abstractions.js.map +1 -0
- package/features/ai/toolPipeline/index.d.ts +2 -0
- package/features/ai/toolPipeline/index.js +1 -0
- package/features/dateFormatter/DefaultDateFormatter.d.ts +15 -0
- package/features/dateFormatter/DefaultDateFormatter.js +20 -0
- package/features/dateFormatter/DefaultDateFormatter.js.map +1 -0
- package/features/dateFormatter/abstractions.d.ts +13 -0
- package/features/dateFormatter/abstractions.js +5 -0
- package/features/dateFormatter/abstractions.js.map +1 -0
- package/features/dateFormatter/feature.d.ts +4 -0
- package/features/dateFormatter/feature.js +11 -0
- package/features/dateFormatter/feature.js.map +1 -0
- package/features/dateFormatter/index.d.ts +3 -0
- package/features/dateFormatter/index.js +2 -0
- package/features/debugger/Debugger.d.ts +30 -0
- package/features/debugger/Debugger.js +142 -0
- package/features/debugger/Debugger.js.map +1 -0
- package/features/debugger/DebuggerRouteDecorator.d.ts +45 -0
- package/features/debugger/DebuggerRouteDecorator.js +107 -0
- package/features/debugger/DebuggerRouteDecorator.js.map +1 -0
- package/features/debugger/GraphQLDebuggerTransport.d.ts +28 -0
- package/features/debugger/GraphQLDebuggerTransport.js +45 -0
- package/features/debugger/GraphQLDebuggerTransport.js.map +1 -0
- package/features/debugger/__tests__/matchNamespace.test.d.ts +1 -0
- package/features/debugger/__tests__/matchNamespace.test.js +68 -0
- package/features/debugger/__tests__/matchNamespace.test.js.map +1 -0
- package/features/debugger/__tests__/serialize.test.d.ts +1 -0
- package/features/debugger/__tests__/serialize.test.js +220 -0
- package/features/debugger/__tests__/serialize.test.js.map +1 -0
- package/features/debugger/abstractions.d.ts +100 -0
- package/features/debugger/abstractions.js +6 -0
- package/features/debugger/abstractions.js.map +1 -0
- package/features/debugger/feature.d.ts +5 -0
- package/features/debugger/feature.js +15 -0
- package/features/debugger/feature.js.map +1 -0
- package/features/debugger/index.d.ts +12 -0
- package/features/debugger/index.js +7 -0
- package/features/debugger/limits.d.ts +18 -0
- package/features/debugger/limits.js +11 -0
- package/features/debugger/limits.js.map +1 -0
- package/features/debugger/matchNamespace.d.ts +14 -0
- package/features/debugger/matchNamespace.js +35 -0
- package/features/debugger/matchNamespace.js.map +1 -0
- package/features/debugger/parseNamespaceHeader.d.ts +7 -0
- package/features/debugger/parseNamespaceHeader.js +16 -0
- package/features/debugger/parseNamespaceHeader.js.map +1 -0
- package/features/debugger/permissions.d.ts +14 -0
- package/features/debugger/permissions.js +8 -0
- package/features/debugger/permissions.js.map +1 -0
- package/features/debugger/permissionsSchema.d.ts +17 -0
- package/features/debugger/permissionsSchema.js +18 -0
- package/features/debugger/permissionsSchema.js.map +1 -0
- package/features/debugger/serialize.d.ts +11 -0
- package/features/debugger/serialize.js +121 -0
- package/features/debugger/serialize.js.map +1 -0
- package/features/encryption/EncryptionKeyCacheFeature.d.ts +8 -0
- package/features/encryption/EncryptionKeyCacheFeature.js +11 -0
- package/features/encryption/EncryptionKeyCacheFeature.js.map +1 -0
- package/features/encryption/EncryptionService.d.ts +2 -1
- package/features/encryption/EncryptionService.js +11 -4
- package/features/encryption/EncryptionService.js.map +1 -1
- package/features/encryption/MemoryEncryptionKeyCache.d.ts +13 -0
- package/features/encryption/MemoryEncryptionKeyCache.js +26 -0
- package/features/encryption/MemoryEncryptionKeyCache.js.map +1 -0
- package/features/encryption/abstractions.d.ts +11 -0
- package/features/encryption/abstractions.js +2 -1
- package/features/encryption/abstractions.js.map +1 -1
- package/features/encryption/index.d.ts +1 -0
- package/features/encryption/index.js +1 -0
- package/features/featureFlags/decorators/FeatureFlagsWithLicenseDecorator.d.ts +13 -0
- package/features/featureFlags/decorators/FeatureFlagsWithLicenseDecorator.js +62 -0
- package/features/featureFlags/decorators/FeatureFlagsWithLicenseDecorator.js.map +1 -0
- package/features/hashing/ScryptHasher.d.ts +11 -0
- package/features/hashing/ScryptHasher.js +74 -0
- package/features/hashing/ScryptHasher.js.map +1 -0
- package/features/hashing/abstractions.d.ts +18 -0
- package/features/hashing/abstractions.js +5 -0
- package/features/hashing/abstractions.js.map +1 -0
- package/features/hashing/feature.d.ts +4 -0
- package/features/hashing/feature.js +11 -0
- package/features/hashing/feature.js.map +1 -0
- package/features/hashing/index.d.ts +2 -0
- package/features/hashing/index.js +1 -0
- package/features/httpClient/HttpClient.d.ts +7 -0
- package/features/httpClient/HttpClient.js +72 -0
- package/features/httpClient/HttpClient.js.map +1 -0
- package/features/httpClient/HttpRequestError.d.ts +10 -0
- package/features/httpClient/HttpRequestError.js +13 -0
- package/features/httpClient/HttpRequestError.js.map +1 -0
- package/features/httpClient/HttpStatusError.d.ts +12 -0
- package/features/httpClient/HttpStatusError.js +12 -0
- package/features/httpClient/HttpStatusError.js.map +1 -0
- package/features/httpClient/abstractions.d.ts +32 -0
- package/features/httpClient/abstractions.js +5 -0
- package/features/httpClient/abstractions.js.map +1 -0
- package/features/httpClient/feature.d.ts +4 -0
- package/features/httpClient/feature.js +11 -0
- package/features/httpClient/feature.js.map +1 -0
- package/features/httpClient/index.d.ts +3 -0
- package/features/httpClient/index.js +3 -0
- package/features/keyValueStore/GlobalKeyValueStore.d.ts +9 -3
- package/features/keyValueStore/GlobalKeyValueStore.js +12 -2
- package/features/keyValueStore/GlobalKeyValueStore.js.map +1 -1
- package/features/keyValueStore/KeyValueStore.d.ts +6 -2
- package/features/keyValueStore/KeyValueStore.js +13 -3
- package/features/keyValueStore/KeyValueStore.js.map +1 -1
- package/features/keyValueStore/KeyValueStoreRepository.d.ts +8 -2
- package/features/keyValueStore/KeyValueStoreRepository.js +82 -4
- package/features/keyValueStore/KeyValueStoreRepository.js.map +1 -1
- package/features/keyValueStore/abstractions.d.ts +132 -14
- package/features/keyValueStore/abstractions.js.map +1 -1
- package/features/keyValueStore/errors.d.ts +29 -0
- package/features/keyValueStore/errors.js +49 -1
- package/features/keyValueStore/errors.js.map +1 -1
- package/features/keyValueStore/index.d.ts +4 -1
- package/features/keyValueStore/index.js +1 -1
- package/features/publicUrls/NullPublicUrls.d.ts +11 -0
- package/features/publicUrls/NullPublicUrls.js +17 -0
- package/features/publicUrls/NullPublicUrls.js.map +1 -0
- package/features/publicUrls/PublicUrl.d.ts +24 -0
- package/features/publicUrls/PublicUrl.js +43 -0
- package/features/publicUrls/PublicUrl.js.map +1 -0
- package/features/publicUrls/__tests__/PublicUrl.test.d.ts +1 -0
- package/features/publicUrls/__tests__/PublicUrl.test.js +38 -0
- package/features/publicUrls/__tests__/PublicUrl.test.js.map +1 -0
- package/features/publicUrls/__tests__/PublicUrls.test.d.ts +1 -0
- package/features/publicUrls/__tests__/PublicUrls.test.js +14 -0
- package/features/publicUrls/__tests__/PublicUrls.test.js.map +1 -0
- package/features/publicUrls/abstractions.d.ts +27 -0
- package/features/publicUrls/abstractions.js +5 -0
- package/features/publicUrls/abstractions.js.map +1 -0
- package/features/publicUrls/feature.d.ts +8 -0
- package/features/publicUrls/feature.js +11 -0
- package/features/publicUrls/feature.js.map +1 -0
- package/features/publicUrls/index.d.ts +3 -0
- package/features/publicUrls/index.js +3 -0
- package/features/requestContext/RawAssumePermissions.d.ts +14 -0
- package/features/requestContext/RawAssumePermissions.js +19 -0
- package/features/requestContext/RawAssumePermissions.js.map +1 -0
- package/features/requestContext/RawAuthToken.d.ts +14 -0
- package/features/requestContext/RawAuthToken.js +19 -0
- package/features/requestContext/RawAuthToken.js.map +1 -0
- package/features/requestContext/RawTenantId.d.ts +14 -0
- package/features/requestContext/RawTenantId.js +19 -0
- package/features/requestContext/RawTenantId.js.map +1 -0
- package/features/requestContext/RequestIdentityLoader.d.ts +19 -0
- package/features/requestContext/RequestIdentityLoader.js +26 -0
- package/features/requestContext/RequestIdentityLoader.js.map +1 -0
- package/features/requestContext/RequestTenantLoader.d.ts +18 -0
- package/features/requestContext/RequestTenantLoader.js +52 -0
- package/features/requestContext/RequestTenantLoader.js.map +1 -0
- package/features/requestContext/abstractions.d.ts +75 -0
- package/features/requestContext/abstractions.js +9 -0
- package/features/requestContext/abstractions.js.map +1 -0
- package/features/requestContext/extractAssumePermissions.d.ts +14 -0
- package/features/requestContext/extractAssumePermissions.js +32 -0
- package/features/requestContext/extractAssumePermissions.js.map +1 -0
- package/features/requestContext/feature.d.ts +12 -0
- package/features/requestContext/feature.js +19 -0
- package/features/requestContext/feature.js.map +1 -0
- package/features/requestContext/index.d.ts +4 -0
- package/features/requestContext/index.js +3 -0
- package/features/security/IdentityContext/IdentityContext.d.ts +3 -3
- package/features/security/IdentityContext/IdentityContext.js +6 -6
- package/features/security/IdentityContext/IdentityContext.js.map +1 -1
- package/features/security/apiKeys/ApiKeyAuthenticator.d.ts +14 -0
- package/features/security/apiKeys/ApiKeyAuthenticator.js +36 -0
- package/features/security/apiKeys/ApiKeyAuthenticator.js.map +1 -0
- package/features/security/apiKeys/ApiKeyAuthorizer.d.ts +10 -0
- package/features/security/apiKeys/ApiKeyAuthorizer.js +15 -0
- package/features/security/apiKeys/ApiKeyAuthorizer.js.map +1 -0
- package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js +11 -6
- package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKey/GetApiKeyUseCase.d.ts +1 -1
- package/features/security/apiKeys/GetApiKey/GetApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/GetApiKeyBySlugUseCase.d.ts +1 -3
- package/features/security/apiKeys/GetApiKeyBySlug/GetApiKeyBySlugUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.d.ts +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/GetApiKeyByTokenUseCase.d.ts +1 -3
- package/features/security/apiKeys/GetApiKeyByToken/GetApiKeyByTokenUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.d.ts +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js +9 -3
- package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/feature.js +11 -2
- package/features/security/apiKeys/feature.js.map +1 -1
- package/features/security/apiKeys/shared/ApiKeyProvider.d.ts +3 -5
- package/features/security/apiKeys/shared/ApiKeyProvider.js +6 -21
- package/features/security/apiKeys/shared/ApiKeyProvider.js.map +1 -1
- package/features/security/apiKeys/shared/ApiKeysRepository.d.ts +1 -0
- package/features/security/apiKeys/shared/ApiKeysRepository.js +19 -4
- package/features/security/apiKeys/shared/ApiKeysRepository.js.map +1 -1
- package/features/security/apiKeys/shared/generateToken.d.ts +1 -1
- package/features/security/apiKeys/shared/generateToken.js.map +1 -1
- package/features/security/apiKeys/shared/schemas.d.ts +2 -2
- package/features/security/apiKeys/shared/schemas.js +2 -2
- package/features/security/apiKeys/shared/schemas.js.map +1 -1
- package/features/security/apiKeys/shared/types.d.ts +1 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/AssumedPermissions.d.ts +30 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/AssumedPermissions.js +60 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/AssumedPermissions.js.map +1 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.d.ts +4 -4
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.js +5 -5
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.js.map +1 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/feature.js +2 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/feature.js.map +1 -1
- package/features/security/roles/CreateRole/CreateRoleUseCase.js +11 -6
- package/features/security/roles/CreateRole/CreateRoleUseCase.js.map +1 -1
- package/features/security/roles/CreateRole/schema.d.ts +1 -1
- package/features/security/roles/CreateRole/schema.js +1 -1
- package/features/security/roles/CreateRole/schema.js.map +1 -1
- package/features/security/roles/Installer/RolesInstaller.js +1 -0
- package/features/security/roles/Installer/RolesInstaller.js.map +1 -1
- package/features/security/roles/UpdateRole/UpdateRoleUseCase.js +9 -3
- package/features/security/roles/UpdateRole/UpdateRoleUseCase.js.map +1 -1
- package/features/security/roles/UpdateRole/schema.d.ts +1 -1
- package/features/security/roles/UpdateRole/schema.js +1 -1
- package/features/security/roles/UpdateRole/schema.js.map +1 -1
- package/features/security/shared/description.d.ts +4 -0
- package/features/security/shared/description.js +7 -0
- package/features/security/shared/description.js.map +1 -0
- package/features/security/shared/index.d.ts +1 -0
- package/features/security/shared/index.js +1 -0
- package/features/security/teams/CreateTeam/CreateTeamUseCase.d.ts +3 -1
- package/features/security/teams/CreateTeam/CreateTeamUseCase.js +20 -8
- package/features/security/teams/CreateTeam/CreateTeamUseCase.js.map +1 -1
- package/features/security/teams/CreateTeam/schema.d.ts +1 -1
- package/features/security/teams/CreateTeam/schema.js +1 -1
- package/features/security/teams/CreateTeam/schema.js.map +1 -1
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.d.ts +3 -1
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js +20 -5
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js.map +1 -1
- package/features/security/teams/UpdateTeam/schema.d.ts +1 -1
- package/features/security/teams/UpdateTeam/schema.js +1 -1
- package/features/security/teams/UpdateTeam/schema.js.map +1 -1
- package/features/security/teams/shared/resolveRoleIdentifiers.d.ts +17 -0
- package/features/security/teams/shared/resolveRoleIdentifiers.js +32 -0
- package/features/security/teams/shared/resolveRoleIdentifiers.js.map +1 -0
- package/features/security/utils/getPermissionsFromRoles.d.ts +1 -1
- package/features/serviceDiscovery/ServiceDiscovery.d.ts +17 -0
- package/features/serviceDiscovery/ServiceDiscovery.js +22 -0
- package/features/serviceDiscovery/ServiceDiscovery.js.map +1 -0
- package/features/serviceDiscovery/__tests__/ServiceDiscovery.test.d.ts +1 -0
- package/features/serviceDiscovery/__tests__/ServiceDiscovery.test.js +111 -0
- package/features/serviceDiscovery/__tests__/ServiceDiscovery.test.js.map +1 -0
- package/features/serviceDiscovery/index.d.ts +3 -0
- package/features/serviceDiscovery/index.js +1 -0
- package/features/slugify/DefaultSlugify.d.ts +8 -0
- package/features/slugify/DefaultSlugify.js +20 -0
- package/features/slugify/DefaultSlugify.js.map +1 -0
- package/features/slugify/abstractions.d.ts +12 -0
- package/features/slugify/abstractions.js +5 -0
- package/features/slugify/abstractions.js.map +1 -0
- package/features/slugify/feature.d.ts +4 -0
- package/features/slugify/feature.js +11 -0
- package/features/slugify/feature.js.map +1 -0
- package/features/slugify/index.d.ts +3 -0
- package/features/slugify/index.js +2 -0
- package/features/storageOperations/abstractions.d.ts +21 -0
- package/features/storageOperations/abstractions.js +10 -0
- package/features/storageOperations/abstractions.js.map +1 -0
- package/features/stringFormatter/DefaultStringFormatter.d.ts +17 -0
- package/features/stringFormatter/DefaultStringFormatter.js +19 -0
- package/features/stringFormatter/DefaultStringFormatter.js.map +1 -0
- package/features/stringFormatter/abstractions.d.ts +11 -0
- package/features/stringFormatter/abstractions.js +5 -0
- package/features/stringFormatter/abstractions.js.map +1 -0
- package/features/stringFormatter/feature.d.ts +4 -0
- package/features/stringFormatter/feature.js +13 -0
- package/features/stringFormatter/feature.js.map +1 -0
- package/features/stringFormatter/index.d.ts +3 -0
- package/features/stringFormatter/index.js +2 -0
- package/features/task/TaskDefinition/abstractions.d.ts +69 -4
- package/features/task/TaskDefinition/abstractions.js +2 -1
- package/features/task/TaskDefinition/abstractions.js.map +1 -1
- package/features/tenancy/CreateTenant/CreateTenantUseCase.d.ts +1 -1
- package/features/tenancy/InstallTenant/InstallTenantUseCase.d.ts +1 -1
- package/features/tenancy/TenantContext/TenantContext.d.ts +1 -0
- package/features/tenancy/TenantContext/TenantContext.js +13 -8
- package/features/tenancy/TenantContext/TenantContext.js.map +1 -1
- package/features/tenancy/UpdateTenant/UpdateTenantUseCase.d.ts +2 -2
- package/features/users/CreateUser/decorators/CreateUserWithWcpIncrement.d.ts +1 -1
- package/features/wcp/WcpContext/WcpContext.d.ts +16 -5
- package/features/wcp/WcpContext/WcpContext.js +41 -2
- package/features/wcp/WcpContext/WcpContext.js.map +1 -1
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.d.ts +15 -60
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js +81 -25
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js.map +1 -1
- package/features/wcp/WcpContext/feature.d.ts +1 -2
- package/features/wcp/WcpContext/feature.js +2 -2
- package/features/wcp/WcpContext/feature.js.map +1 -1
- package/features/wcp/WcpContext/index.d.ts +0 -1
- package/features/wcp/WcpContext/types.d.ts +0 -4
- package/features/wcp/WcpFeature.d.ts +1 -1
- package/features/wcp/WcpFeature.js +7 -2
- package/features/wcp/WcpFeature.js.map +1 -1
- package/features/wcp/WcpLicenseLoader.d.ts +25 -0
- package/features/wcp/WcpLicenseLoader.js +58 -0
- package/features/wcp/WcpLicenseLoader.js.map +1 -0
- package/features/wcp/WcpLicenseProvider.d.ts +21 -0
- package/features/wcp/WcpLicenseProvider.js +14 -0
- package/features/wcp/WcpLicenseProvider.js.map +1 -0
- package/features/wcp/resolveWcpProjectEnvironment.d.ts +9 -0
- package/features/wcp/resolveWcpProjectEnvironment.js +23 -0
- package/features/wcp/resolveWcpProjectEnvironment.js.map +1 -0
- package/graphql/ApiCoreSchemaFactory.d.ts +16 -0
- package/graphql/ApiCoreSchemaFactory.js +58 -0
- package/graphql/ApiCoreSchemaFactory.js.map +1 -0
- package/graphql/featureFlags/FeatureFlagsSchemaFactory.d.ts +10 -0
- package/graphql/featureFlags/FeatureFlagsSchemaFactory.js +53 -0
- package/graphql/featureFlags/FeatureFlagsSchemaFactory.js.map +1 -0
- package/graphql/security/NotAuthorizedResponse.d.ts +1 -1
- package/graphql/security/NotAuthorizedResponse.js +1 -1
- package/graphql/security/NotAuthorizedResponse.js.map +1 -1
- package/graphql/security/SecuritySchemaFactory.d.ts +15 -0
- package/graphql/security/SecuritySchemaFactory.js +27 -0
- package/graphql/security/SecuritySchemaFactory.js.map +1 -0
- package/graphql/security/addApiKeySchema.d.ts +2 -0
- package/graphql/security/{apiKey.gql.js → addApiKeySchema.js} +45 -27
- package/graphql/security/addApiKeySchema.js.map +1 -0
- package/graphql/security/addIdentitySchema.d.ts +2 -0
- package/graphql/security/{identity.gql.js → addIdentitySchema.js} +52 -35
- package/graphql/security/addIdentitySchema.js.map +1 -0
- package/graphql/security/addRoleSchema.d.ts +2 -0
- package/graphql/security/addRoleSchema.js +137 -0
- package/graphql/security/addRoleSchema.js.map +1 -0
- package/graphql/security/addSecurityBaseSchema.d.ts +2 -0
- package/graphql/security/{base.gql.js → addSecurityBaseSchema.js} +14 -16
- package/graphql/security/addSecurityBaseSchema.js.map +1 -0
- package/graphql/security/addTeamSchema.d.ts +2 -0
- package/graphql/security/addTeamSchema.js +157 -0
- package/graphql/security/addTeamSchema.js.map +1 -0
- package/graphql/system/SystemSchemaFactory.d.ts +10 -0
- package/graphql/system/SystemSchemaFactory.js +70 -0
- package/graphql/system/SystemSchemaFactory.js.map +1 -0
- package/graphql/users/UsersSchemaFactory.d.ts +10 -0
- package/graphql/users/UsersSchemaFactory.js +195 -0
- package/graphql/users/UsersSchemaFactory.js.map +1 -0
- package/graphql/wcp/WcpSchemaFactory.d.ts +10 -0
- package/graphql/wcp/{graphql.js → WcpSchemaFactory.js} +32 -18
- package/graphql/wcp/WcpSchemaFactory.js.map +1 -0
- package/idp/JwksCache.d.ts +14 -3
- package/idp/JwksCache.js +97 -17
- package/idp/JwksCache.js.map +1 -1
- package/idp/JwksStoreFeature.d.ts +8 -0
- package/idp/JwksStoreFeature.js +11 -0
- package/idp/JwksStoreFeature.js.map +1 -0
- package/idp/MemoryJwksStore.d.ts +14 -0
- package/idp/MemoryJwksStore.js +21 -0
- package/idp/MemoryJwksStore.js.map +1 -0
- package/idp/OidcJwtIdentityProvider.js +5 -1
- package/idp/OidcJwtIdentityProvider.js.map +1 -1
- package/idp/abstractions.d.ts +24 -0
- package/idp/abstractions.js +2 -1
- package/idp/abstractions.js.map +1 -1
- package/idp/feature.js +1 -2
- package/idp/feature.js.map +1 -1
- package/idp/index.d.ts +1 -0
- package/idp/index.js +1 -0
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/package.json +23 -24
- package/testing/environment.d.ts +14 -0
- package/testing/environment.js +18 -0
- package/testing/environment.js.map +1 -0
- package/types/core.d.ts +17 -5
- package/types/security.d.ts +1 -7
- package/types/tenancy.d.ts +0 -17
- package/types/users.d.ts +0 -13
- package/createApiCore.d.ts +0 -7
- package/createApiCore.js +0 -22
- package/createApiCore.js.map +0 -1
- package/graphql/security/apiKey.gql.d.ts +0 -4
- package/graphql/security/apiKey.gql.js.map +0 -1
- package/graphql/security/base.gql.d.ts +0 -4
- package/graphql/security/base.gql.js.map +0 -1
- package/graphql/security/identity.gql.d.ts +0 -4
- package/graphql/security/identity.gql.js.map +0 -1
- package/graphql/security/index.d.ts +0 -1
- package/graphql/security/index.js +0 -15
- package/graphql/security/index.js.map +0 -1
- package/graphql/security/role.gql.d.ts +0 -4
- package/graphql/security/role.gql.js +0 -106
- package/graphql/security/role.gql.js.map +0 -1
- package/graphql/security/team.gql.d.ts +0 -4
- package/graphql/security/team.gql.js +0 -119
- package/graphql/security/team.gql.js.map +0 -1
- package/graphql/system/createSystemGraphQL.d.ts +0 -2
- package/graphql/system/createSystemGraphQL.js +0 -54
- package/graphql/system/createSystemGraphQL.js.map +0 -1
- package/graphql/users/user.gql.d.ts +0 -3
- package/graphql/users/user.gql.js +0 -167
- package/graphql/users/user.gql.js.map +0 -1
- package/graphql/wcp/graphql.d.ts +0 -2
- package/graphql/wcp/graphql.js.map +0 -1
- package/legacy/security/LegacyContext.d.ts +0 -36
- package/legacy/security/LegacyContext.js +0 -152
- package/legacy/security/LegacyContext.js.map +0 -1
- package/legacy/security/createSecurityContext.d.ts +0 -3
- package/legacy/security/createSecurityContext.js +0 -10
- package/legacy/security/createSecurityContext.js.map +0 -1
- package/legacy/security/plugins/apiKeyAuthentication.d.ts +0 -7
- package/legacy/security/plugins/apiKeyAuthentication.js +0 -20
- package/legacy/security/plugins/apiKeyAuthentication.js.map +0 -1
- package/legacy/security/plugins/apiKeyAuthorization.d.ts +0 -6
- package/legacy/security/plugins/apiKeyAuthorization.js +0 -13
- package/legacy/security/plugins/apiKeyAuthorization.js.map +0 -1
- package/legacy/security/plugins/authenticateUsingCookie.d.ts +0 -5
- package/legacy/security/plugins/authenticateUsingCookie.js +0 -23
- package/legacy/security/plugins/authenticateUsingCookie.js.map +0 -1
- package/legacy/security/plugins/authenticateUsingHttpHeader.d.ts +0 -5
- package/legacy/security/plugins/authenticateUsingHttpHeader.js +0 -20
- package/legacy/security/plugins/authenticateUsingHttpHeader.js.map +0 -1
- package/legacy/security/plugins/secureHeaders.d.ts +0 -1
- package/legacy/security/plugins/secureHeaders.js +0 -30
- package/legacy/security/plugins/secureHeaders.js.map +0 -1
- package/legacy/tenancy/LegacyContext.d.ts +0 -15
- package/legacy/tenancy/LegacyContext.js +0 -57
- package/legacy/tenancy/LegacyContext.js.map +0 -1
- package/legacy/tenancy/createTenancyContext.d.ts +0 -3
- package/legacy/tenancy/createTenancyContext.js +0 -31
- package/legacy/tenancy/createTenancyContext.js.map +0 -1
- package/legacy/users/LegacyContext.d.ts +0 -13
- package/legacy/users/LegacyContext.js +0 -55
- package/legacy/users/LegacyContext.js.map +0 -1
- package/legacy/users/createAdminUsersContext.d.ts +0 -3
- package/legacy/users/createAdminUsersContext.js +0 -12
- package/legacy/users/createAdminUsersContext.js.map +0 -1
- package/legacy/wcp/LegacyWcpContext.d.ts +0 -33
- package/legacy/wcp/LegacyWcpContext.js +0 -84
- package/legacy/wcp/LegacyWcpContext.js.map +0 -1
- package/legacy/wcp/context.d.ts +0 -5
- package/legacy/wcp/context.js +0 -46
- package/legacy/wcp/context.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { WCP_FEATURE_LABEL } from "@webiny/wcp";
|
|
2
|
+
import type { WcpProject } from "@webiny/wcp/types.js";
|
|
2
3
|
import { WcpContext } from "../abstractions.js";
|
|
3
4
|
import { FeatureFlags } from "../../../featureFlags/abstractions.js";
|
|
4
5
|
declare class WcpContextWithFeatureFlagsDecoratorImpl implements WcpContext.Interface {
|
|
@@ -6,66 +7,8 @@ declare class WcpContextWithFeatureFlagsDecoratorImpl implements WcpContext.Inte
|
|
|
6
7
|
private decoratee;
|
|
7
8
|
constructor(featureFlags: FeatureFlags.Interface, decoratee: WcpContext.Interface);
|
|
8
9
|
getRawLicense(): import("@webiny/wcp/types.js").DecryptedWcpProjectLicense | null;
|
|
9
|
-
getProject():
|
|
10
|
-
getProjectWithFeatureFlags():
|
|
11
|
-
package: {
|
|
12
|
-
features: {
|
|
13
|
-
multiTenancy: {
|
|
14
|
-
enabled: true;
|
|
15
|
-
options: {
|
|
16
|
-
maxCount: {
|
|
17
|
-
type: import("@webiny/wcp/types.js").MT_OPTIONS_MAX_COUNT_TYPE;
|
|
18
|
-
count?: number;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
advancedPublishingWorkflow: {
|
|
23
|
-
enabled: boolean;
|
|
24
|
-
};
|
|
25
|
-
advancedAccessControlLayer: {
|
|
26
|
-
enabled: boolean;
|
|
27
|
-
options: {
|
|
28
|
-
teams: boolean;
|
|
29
|
-
privateFiles: boolean;
|
|
30
|
-
folderLevelPermissions: boolean;
|
|
31
|
-
hcmsFieldPermissions: boolean;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
auditLogs: {
|
|
35
|
-
enabled: boolean;
|
|
36
|
-
};
|
|
37
|
-
recordLocking: {
|
|
38
|
-
enabled: boolean;
|
|
39
|
-
};
|
|
40
|
-
fileManager: {
|
|
41
|
-
enabled: boolean;
|
|
42
|
-
options: {
|
|
43
|
-
threatDetection: boolean;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
aiPowerups: {
|
|
47
|
-
enabled: boolean;
|
|
48
|
-
options: {
|
|
49
|
-
websiteBuilder: {
|
|
50
|
-
pageGeneration: boolean | undefined;
|
|
51
|
-
};
|
|
52
|
-
fileManager: {
|
|
53
|
-
imageEnrichment: boolean | undefined;
|
|
54
|
-
};
|
|
55
|
-
lexicalGeneration: boolean | undefined;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
seats: {
|
|
59
|
-
enabled: true;
|
|
60
|
-
options: {
|
|
61
|
-
maxCount: number;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
orgId: string;
|
|
67
|
-
projectId: string;
|
|
68
|
-
} | null;
|
|
10
|
+
getProject(): WcpProject | null;
|
|
11
|
+
getProjectWithFeatureFlags(): WcpProject | null;
|
|
69
12
|
getProjectEnvironment(): import("@webiny/wcp/types.js").WcpProjectEnvironment | null;
|
|
70
13
|
getProjectLicense(): import("@webiny/wcp/types.js").ILicense;
|
|
71
14
|
canUseFeature(wcpFeatureId: keyof typeof WCP_FEATURE_LABEL): boolean;
|
|
@@ -80,7 +23,19 @@ declare class WcpContextWithFeatureFlagsDecoratorImpl implements WcpContext.Inte
|
|
|
80
23
|
canUseHcmsFieldPermissions(): boolean;
|
|
81
24
|
canUseAiImageEnrichment(): boolean;
|
|
82
25
|
canUseAiPageGeneration(): boolean;
|
|
26
|
+
canUseAiPageTranslation(): boolean;
|
|
83
27
|
canUseAiLexicalGeneration(): boolean;
|
|
28
|
+
canUseAiAdminAssistant(): boolean;
|
|
29
|
+
canUseAiEntryGeneration(): boolean;
|
|
30
|
+
canUseAiEntryComparison(): boolean;
|
|
31
|
+
canUseAiEntryTranslation(): boolean;
|
|
32
|
+
canUseAiPowerups(): boolean;
|
|
33
|
+
canUseAbTesting(): boolean;
|
|
34
|
+
canUseRemoteComponents(): boolean;
|
|
35
|
+
canUseCollaboration(): boolean;
|
|
36
|
+
canUseComments(): boolean;
|
|
37
|
+
canUseActivityLog(): boolean;
|
|
38
|
+
canUseLanguages(): boolean;
|
|
84
39
|
ensureCanUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): void;
|
|
85
40
|
incrementSeats(): Promise<void>;
|
|
86
41
|
decrementSeats(): Promise<void>;
|
|
@@ -24,44 +24,64 @@ class WcpContextWithFeatureFlagsDecoratorImpl {
|
|
|
24
24
|
multiTenancy: project.package.features.multiTenancy,
|
|
25
25
|
advancedPublishingWorkflow: {
|
|
26
26
|
...project.package.features.advancedPublishingWorkflow,
|
|
27
|
-
enabled: flags.
|
|
27
|
+
enabled: flags.isEnabled("advancedPublishingWorkflow") ? project.package.features.advancedPublishingWorkflow.enabled : false
|
|
28
28
|
},
|
|
29
29
|
advancedAccessControlLayer: {
|
|
30
30
|
...project.package.features.advancedAccessControlLayer,
|
|
31
|
-
enabled: flags.
|
|
31
|
+
enabled: flags.isEnabled("advancedAccessControlLayer") ? project.package.features.advancedAccessControlLayer.enabled : false,
|
|
32
32
|
options: {
|
|
33
|
-
teams: flags.
|
|
34
|
-
privateFiles: flags.
|
|
35
|
-
folderLevelPermissions: flags.
|
|
36
|
-
hcmsFieldPermissions: flags.
|
|
33
|
+
teams: flags.isEnabled("advancedAccessControlLayer.teams") ? project.package.features.advancedAccessControlLayer.options.teams : false,
|
|
34
|
+
privateFiles: flags.isEnabled("advancedAccessControlLayer.privateFiles") ? project.package.features.advancedAccessControlLayer.options.privateFiles : false,
|
|
35
|
+
folderLevelPermissions: flags.isEnabled("advancedAccessControlLayer.folderLevelPermissions") ? project.package.features.advancedAccessControlLayer.options.folderLevelPermissions : false,
|
|
36
|
+
hcmsFieldPermissions: flags.isEnabled("advancedAccessControlLayer.hcmsFieldPermissions") ? project.package.features.advancedAccessControlLayer.options.hcmsFieldPermissions : false
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
auditLogs: {
|
|
40
40
|
...project.package.features.auditLogs,
|
|
41
|
-
enabled: flags.
|
|
41
|
+
enabled: flags.isEnabled("auditLogs") ? project.package.features.auditLogs.enabled : false
|
|
42
42
|
},
|
|
43
43
|
recordLocking: {
|
|
44
44
|
...project.package.features.recordLocking,
|
|
45
|
-
enabled: flags.
|
|
45
|
+
enabled: flags.isEnabled("recordLocking") ? project.package.features.recordLocking.enabled : false
|
|
46
46
|
},
|
|
47
47
|
fileManager: {
|
|
48
48
|
...project.package.features.fileManager,
|
|
49
49
|
enabled: project.package.features.fileManager.enabled,
|
|
50
50
|
options: {
|
|
51
|
-
threatDetection: flags.
|
|
51
|
+
threatDetection: flags.isEnabled("fileManager.threatDetection") ? project.package.features.fileManager.options.threatDetection : false
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
aiPowerups: {
|
|
55
55
|
...project.package.features.aiPowerups,
|
|
56
|
-
enabled: flags.
|
|
56
|
+
enabled: flags.isEnabled("aiPowerups") ? project.package.features.aiPowerups?.enabled : false,
|
|
57
57
|
options: {
|
|
58
58
|
websiteBuilder: {
|
|
59
|
-
pageGeneration: flags.
|
|
59
|
+
pageGeneration: flags.isEnabled("aiPowerups.websiteBuilder.pageGeneration") ? project.package.features.aiPowerups?.options?.websiteBuilder?.pageGeneration : false,
|
|
60
|
+
pageTranslation: flags.isEnabled("aiPowerups.websiteBuilder.pageTranslation") ? project.package.features.aiPowerups?.options?.websiteBuilder?.pageTranslation : false
|
|
60
61
|
},
|
|
61
62
|
fileManager: {
|
|
62
|
-
imageEnrichment: flags.
|
|
63
|
+
imageEnrichment: flags.isEnabled("aiPowerups.fileManager.imageEnrichment") ? project.package.features.aiPowerups?.options?.fileManager?.imageEnrichment : false
|
|
63
64
|
},
|
|
64
|
-
lexicalGeneration: flags.
|
|
65
|
+
lexicalGeneration: flags.isEnabled("aiPowerups.lexicalGeneration") ? project.package.features.aiPowerups?.options?.lexicalGeneration : false,
|
|
66
|
+
adminAssistant: flags.isEnabled("aiPowerups.adminAssistant") ? project.package.features.aiPowerups?.options?.adminAssistant : false,
|
|
67
|
+
remoteComponents: flags.isEnabled("aiPowerups.remoteComponents") ? project.package.features.aiPowerups?.options?.remoteComponents : false,
|
|
68
|
+
cms: {
|
|
69
|
+
entryGeneration: flags.isEnabled("aiPowerups.cms.entryGeneration") ? project.package.features.aiPowerups?.options?.cms?.entryGeneration : false,
|
|
70
|
+
entryComparison: flags.isEnabled("aiPowerups.cms.entryComparison") ? project.package.features.aiPowerups?.options?.cms?.entryComparison : false,
|
|
71
|
+
entryTranslation: flags.isEnabled("aiPowerups.cms.entryTranslation") ? project.package.features.aiPowerups?.options?.cms?.entryTranslation : false
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
abTesting: {
|
|
76
|
+
...project.package.features.abTesting,
|
|
77
|
+
enabled: flags.isEnabled("abTesting") ? project.package.features.abTesting?.enabled : false
|
|
78
|
+
},
|
|
79
|
+
collaboration: {
|
|
80
|
+
...project.package.features.collaboration,
|
|
81
|
+
enabled: flags.isEnabled("collaboration") ? project.package.features.collaboration?.enabled : false,
|
|
82
|
+
options: {
|
|
83
|
+
comments: flags.isEnabled("collaboration.comments") ? project.package.features.collaboration?.options?.comments : false,
|
|
84
|
+
activityLog: flags.isEnabled("collaboration.activityLog") ? project.package.features.collaboration?.options?.activityLog : false
|
|
65
85
|
}
|
|
66
86
|
}
|
|
67
87
|
}
|
|
@@ -78,40 +98,76 @@ class WcpContextWithFeatureFlagsDecoratorImpl {
|
|
|
78
98
|
return this.decoratee.canUseFeature(wcpFeatureId);
|
|
79
99
|
}
|
|
80
100
|
canUseAacl() {
|
|
81
|
-
return this.decoratee.canUseAacl() && this.featureFlags.get().
|
|
101
|
+
return this.decoratee.canUseAacl() && this.featureFlags.get().isEnabled("advancedAccessControlLayer");
|
|
82
102
|
}
|
|
83
103
|
canUseTeams() {
|
|
84
|
-
return this.decoratee.canUseTeams() && this.featureFlags.get().
|
|
104
|
+
return this.decoratee.canUseTeams() && this.featureFlags.get().isEnabled("advancedAccessControlLayer.teams");
|
|
85
105
|
}
|
|
86
106
|
canUseFolderLevelPermissions() {
|
|
87
|
-
return this.decoratee.canUseFolderLevelPermissions() && this.featureFlags.get().
|
|
107
|
+
return this.decoratee.canUseFolderLevelPermissions() && this.featureFlags.get().isEnabled("advancedAccessControlLayer.folderLevelPermissions");
|
|
88
108
|
}
|
|
89
109
|
canUsePrivateFiles() {
|
|
90
|
-
return this.decoratee.canUsePrivateFiles() && this.featureFlags.get().
|
|
110
|
+
return this.decoratee.canUsePrivateFiles() && this.featureFlags.get().isEnabled("advancedAccessControlLayer.privateFiles");
|
|
91
111
|
}
|
|
92
112
|
canUseAuditLogs() {
|
|
93
|
-
return this.decoratee.canUseAuditLogs() && this.featureFlags.get().
|
|
113
|
+
return this.decoratee.canUseAuditLogs() && this.featureFlags.get().isEnabled("auditLogs");
|
|
94
114
|
}
|
|
95
115
|
canUseRecordLocking() {
|
|
96
|
-
return this.decoratee.canUseRecordLocking() && this.featureFlags.get().
|
|
116
|
+
return this.decoratee.canUseRecordLocking() && this.featureFlags.get().isEnabled("recordLocking");
|
|
97
117
|
}
|
|
98
118
|
canUseFileManagerThreatDetection() {
|
|
99
|
-
return this.decoratee.canUseFileManagerThreatDetection() && this.featureFlags.get().
|
|
119
|
+
return this.decoratee.canUseFileManagerThreatDetection() && this.featureFlags.get().isEnabled("fileManager.threatDetection");
|
|
100
120
|
}
|
|
101
121
|
canUseWorkflows() {
|
|
102
|
-
return this.decoratee.canUseWorkflows() && this.featureFlags.get().
|
|
122
|
+
return this.decoratee.canUseWorkflows() && this.featureFlags.get().isEnabled("advancedPublishingWorkflow");
|
|
103
123
|
}
|
|
104
124
|
canUseHcmsFieldPermissions() {
|
|
105
|
-
return this.decoratee.canUseHcmsFieldPermissions() && this.featureFlags.get().
|
|
125
|
+
return this.decoratee.canUseHcmsFieldPermissions() && this.featureFlags.get().isEnabled("advancedAccessControlLayer.hcmsFieldPermissions");
|
|
106
126
|
}
|
|
107
127
|
canUseAiImageEnrichment() {
|
|
108
|
-
return this.decoratee.canUseAiImageEnrichment() && this.featureFlags.get().
|
|
128
|
+
return this.decoratee.canUseAiImageEnrichment() && this.featureFlags.get().isEnabled("aiPowerups.fileManager.imageEnrichment");
|
|
109
129
|
}
|
|
110
130
|
canUseAiPageGeneration() {
|
|
111
|
-
return this.decoratee.canUseAiPageGeneration() && this.featureFlags.get().
|
|
131
|
+
return this.decoratee.canUseAiPageGeneration() && this.featureFlags.get().isEnabled("aiPowerups.websiteBuilder.pageGeneration");
|
|
132
|
+
}
|
|
133
|
+
canUseAiPageTranslation() {
|
|
134
|
+
return this.decoratee.canUseAiPageTranslation() && this.featureFlags.get().isEnabled("aiPowerups.websiteBuilder.pageTranslation");
|
|
112
135
|
}
|
|
113
136
|
canUseAiLexicalGeneration() {
|
|
114
|
-
return this.decoratee.canUseAiLexicalGeneration() && this.featureFlags.get().
|
|
137
|
+
return this.decoratee.canUseAiLexicalGeneration() && this.featureFlags.get().isEnabled("aiPowerups.lexicalGeneration");
|
|
138
|
+
}
|
|
139
|
+
canUseAiAdminAssistant() {
|
|
140
|
+
return this.decoratee.canUseAiAdminAssistant() && this.featureFlags.get().isEnabled("aiPowerups.adminAssistant");
|
|
141
|
+
}
|
|
142
|
+
canUseAiEntryGeneration() {
|
|
143
|
+
return this.decoratee.canUseAiEntryGeneration() && this.featureFlags.get().isEnabled("aiPowerups.cms.entryGeneration");
|
|
144
|
+
}
|
|
145
|
+
canUseAiEntryComparison() {
|
|
146
|
+
return this.decoratee.canUseAiEntryComparison() && this.featureFlags.get().isEnabled("aiPowerups.cms.entryComparison");
|
|
147
|
+
}
|
|
148
|
+
canUseAiEntryTranslation() {
|
|
149
|
+
return this.decoratee.canUseAiEntryTranslation() && this.featureFlags.get().isEnabled("aiPowerups.cms.entryTranslation");
|
|
150
|
+
}
|
|
151
|
+
canUseAiPowerups() {
|
|
152
|
+
return this.decoratee.canUseAiPowerups() && this.featureFlags.get().isEnabled("aiPowerups");
|
|
153
|
+
}
|
|
154
|
+
canUseAbTesting() {
|
|
155
|
+
return this.decoratee.canUseAbTesting() && this.featureFlags.get().isEnabled("abTesting");
|
|
156
|
+
}
|
|
157
|
+
canUseRemoteComponents() {
|
|
158
|
+
return this.decoratee.canUseRemoteComponents() && this.featureFlags.get().isEnabled("aiPowerups.remoteComponents");
|
|
159
|
+
}
|
|
160
|
+
canUseCollaboration() {
|
|
161
|
+
return this.decoratee.canUseCollaboration() && this.featureFlags.get().isEnabled("collaboration");
|
|
162
|
+
}
|
|
163
|
+
canUseComments() {
|
|
164
|
+
return this.decoratee.canUseComments() && this.featureFlags.get().isEnabled("collaboration.comments");
|
|
165
|
+
}
|
|
166
|
+
canUseActivityLog() {
|
|
167
|
+
return this.decoratee.canUseActivityLog() && this.featureFlags.get().isEnabled("collaboration.activityLog");
|
|
168
|
+
}
|
|
169
|
+
canUseLanguages() {
|
|
170
|
+
return this.decoratee.canUseLanguages() && this.featureFlags.get().isEnabled("languages");
|
|
115
171
|
}
|
|
116
172
|
ensureCanUseFeature(featureId) {
|
|
117
173
|
return this.decoratee.ensureCanUseFeature(featureId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js","sources":["../../../../../src/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.ts"],"sourcesContent":["import type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\nimport { WcpContext } from \"../abstractions.js\";\nimport { FeatureFlags } from \"../../../featureFlags/abstractions.js\";\n\nclass WcpContextWithFeatureFlagsDecoratorImpl implements WcpContext.Interface {\n constructor(\n private featureFlags: FeatureFlags.Interface,\n private decoratee: WcpContext.Interface\n ) {}\n\n getRawLicense() {\n return this.decoratee.getRawLicense();\n }\n\n getProject() {\n return this.decoratee.getProject();\n }\n\n getProjectWithFeatureFlags() {\n const project = this.decoratee.getProjectWithFeatureFlags();\n if (!project) {\n return null;\n }\n\n const flags = this.featureFlags.get();\n\n return {\n ...project,\n package: {\n ...project.package,\n features: {\n ...project.package.features,\n multiTenancy: project.package.features.multiTenancy,\n advancedPublishingWorkflow: {\n ...project.package.features.advancedPublishingWorkflow,\n enabled: flags.isWorkflowsEnabled()\n ? project.package.features.advancedPublishingWorkflow.enabled\n : false\n },\n advancedAccessControlLayer: {\n ...project.package.features.advancedAccessControlLayer,\n enabled: flags.isAaclEnabled()\n ? project.package.features.advancedAccessControlLayer.enabled\n : false,\n options: {\n teams: flags.isTeamsEnabled()\n ? project.package.features.advancedAccessControlLayer.options.teams\n : false,\n privateFiles: flags.isPrivateFilesEnabled()\n ? project.package.features.advancedAccessControlLayer.options\n .privateFiles\n : false,\n folderLevelPermissions: flags.isFolderLevelPermissionsEnabled()\n ? project.package.features.advancedAccessControlLayer.options\n .folderLevelPermissions\n : false,\n hcmsFieldPermissions: flags.isHcmsFieldPermissionsEnabled()\n ? project.package.features.advancedAccessControlLayer.options\n .hcmsFieldPermissions\n : false\n }\n },\n auditLogs: {\n ...project.package.features.auditLogs,\n enabled: flags.isAuditLogsEnabled()\n ? project.package.features.auditLogs.enabled\n : false\n },\n recordLocking: {\n ...project.package.features.recordLocking,\n enabled: flags.isRecordLockingEnabled()\n ? project.package.features.recordLocking.enabled\n : false\n },\n fileManager: {\n ...project.package.features.fileManager,\n enabled: project.package.features.fileManager.enabled,\n options: {\n threatDetection: flags.isFileManagerThreatDetectionEnabled()\n ? project.package.features.fileManager.options.threatDetection\n : false\n }\n },\n aiPowerups: {\n ...project.package.features.aiPowerups,\n enabled: flags.isAiPowerupsEnabled()\n ? project.package.features.aiPowerups?.enabled\n : false,\n options: {\n websiteBuilder: {\n pageGeneration: flags.isAiPageGenerationEnabled()\n ? project.package.features.aiPowerups?.options?.websiteBuilder\n ?.pageGeneration\n : false\n },\n fileManager: {\n imageEnrichment: flags.isAiImageEnrichmentEnabled()\n ? project.package.features.aiPowerups?.options?.fileManager\n ?.imageEnrichment\n : false\n },\n lexicalGeneration: flags.isAiLexicalGenerationEnabled()\n ? project.package.features.aiPowerups?.options?.lexicalGeneration\n : false\n }\n }\n }\n }\n };\n }\n\n getProjectEnvironment() {\n return this.decoratee.getProjectEnvironment();\n }\n\n getProjectLicense() {\n return this.decoratee.getProjectLicense();\n }\n\n canUseFeature(wcpFeatureId: keyof typeof WCP_FEATURE_LABEL) {\n return this.decoratee.canUseFeature(wcpFeatureId);\n }\n\n canUseAacl() {\n return this.decoratee.canUseAacl() && this.featureFlags.get().isAaclEnabled();\n }\n\n canUseTeams() {\n return this.decoratee.canUseTeams() && this.featureFlags.get().isTeamsEnabled();\n }\n\n canUseFolderLevelPermissions() {\n return (\n this.decoratee.canUseFolderLevelPermissions() &&\n this.featureFlags.get().isFolderLevelPermissionsEnabled()\n );\n }\n\n canUsePrivateFiles() {\n return (\n this.decoratee.canUsePrivateFiles() && this.featureFlags.get().isPrivateFilesEnabled()\n );\n }\n\n canUseAuditLogs() {\n return this.decoratee.canUseAuditLogs() && this.featureFlags.get().isAuditLogsEnabled();\n }\n\n canUseRecordLocking() {\n return (\n this.decoratee.canUseRecordLocking() && this.featureFlags.get().isRecordLockingEnabled()\n );\n }\n\n canUseFileManagerThreatDetection() {\n return (\n this.decoratee.canUseFileManagerThreatDetection() &&\n this.featureFlags.get().isFileManagerThreatDetectionEnabled()\n );\n }\n\n canUseWorkflows() {\n return this.decoratee.canUseWorkflows() && this.featureFlags.get().isWorkflowsEnabled();\n }\n\n canUseHcmsFieldPermissions() {\n return (\n this.decoratee.canUseHcmsFieldPermissions() &&\n this.featureFlags.get().isHcmsFieldPermissionsEnabled()\n );\n }\n\n canUseAiImageEnrichment() {\n return (\n this.decoratee.canUseAiImageEnrichment() &&\n this.featureFlags.get().isAiImageEnrichmentEnabled()\n );\n }\n\n canUseAiPageGeneration() {\n return (\n this.decoratee.canUseAiPageGeneration() &&\n this.featureFlags.get().isAiPageGenerationEnabled()\n );\n }\n\n canUseAiLexicalGeneration() {\n return (\n this.decoratee.canUseAiLexicalGeneration() &&\n this.featureFlags.get().isAiLexicalGenerationEnabled()\n );\n }\n\n ensureCanUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL) {\n return this.decoratee.ensureCanUseFeature(featureId);\n }\n\n async incrementSeats() {\n return this.decoratee.incrementSeats();\n }\n\n async decrementSeats() {\n return this.decoratee.decrementSeats();\n }\n\n async incrementTenants() {\n return this.decoratee.incrementTenants();\n }\n\n async decrementTenants() {\n return this.decoratee.decrementTenants();\n }\n\n toDto() {\n return this.decoratee.toDto();\n }\n}\n\nexport const WcpContextWithFeatureFlagsDecorator = WcpContext.createDecorator({\n decorator: WcpContextWithFeatureFlagsDecoratorImpl,\n dependencies: [FeatureFlags]\n});\n"],"names":["WcpContextWithFeatureFlagsDecoratorImpl","featureFlags","decoratee","project","flags","wcpFeatureId","featureId","WcpContextWithFeatureFlagsDecorator","WcpContext","FeatureFlags"],"mappings":";;AAIA,MAAMA;IACF,YACYC,YAAoC,EACpCC,SAA+B,CACzC;aAFUD,YAAY,GAAZA;aACAC,SAAS,GAATA;IACT;IAEH,gBAAgB;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa;IACvC;IAEA,aAAa;QACT,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU;IACpC;IAEA,6BAA6B;QACzB,MAAMC,UAAU,IAAI,CAAC,SAAS,CAAC,0BAA0B;QACzD,IAAI,CAACA,SACD,OAAO;QAGX,MAAMC,QAAQ,IAAI,CAAC,YAAY,CAAC,GAAG;QAEnC,OAAO;YACH,GAAGD,OAAO;YACV,SAAS;gBACL,GAAGA,QAAQ,OAAO;gBAClB,UAAU;oBACN,GAAGA,QAAQ,OAAO,CAAC,QAAQ;oBAC3B,cAAcA,QAAQ,OAAO,CAAC,QAAQ,CAAC,YAAY;oBACnD,4BAA4B;wBACxB,GAAGA,QAAQ,OAAO,CAAC,QAAQ,CAAC,0BAA0B;wBACtD,SAASC,MAAM,kBAAkB,KAC3BD,QAAQ,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,OAAO,GAC3D;oBACV;oBACA,4BAA4B;wBACxB,GAAGA,QAAQ,OAAO,CAAC,QAAQ,CAAC,0BAA0B;wBACtD,SAASC,MAAM,aAAa,KACtBD,QAAQ,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,OAAO,GAC3D;wBACN,SAAS;4BACL,OAAOC,MAAM,cAAc,KACrBD,QAAQ,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,GACjE;4BACN,cAAcC,MAAM,qBAAqB,KACnCD,QAAQ,O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,CAAC,SAAS,CAAC,eAAe,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,kBAAkB;IACzF;IAEA,6BAA6B;QACzB,OACI,IAAI,CAAC,SAAS,CAAC,0BAA0B,MACzC,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,6BAA6B;IAE7D;IAEA,0BAA0B;QACtB,OACI,IAAI,CAAC,SAAS,CAAC,uBAAuB,MACtC,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,0BAA0B;IAE1D;IAEA,yBAAyB;QACrB,OACI,IAAI,CAAC,SAAS,CAAC,sBAAsB,MACrC,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,yBAAyB;IAEzD;IAEA,4BAA4B;QACxB,OACI,IAAI,CAAC,SAAS,CAAC,yBAAyB,MACxC,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,4BAA4B;IAE5D;IAEA,oBAAoBC,SAAyC,EAAE;QAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAACA;IAC9C;IAEA,MAAM,iBAAiB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc;IACxC;IAEA,MAAM,iBAAiB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc;IACxC;IAEA,MAAM,mBAAmB;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB;IAC1C;IAEA,MAAM,mBAAmB;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB;IAC1C;IAEA,QAAQ;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;IAC/B;AACJ;AAEO,MAAMC,sCAAsCC,WAAW,eAAe,CAAC;IAC1E,WAAWR;IACX,cAAc;QAACS;KAAa;AAChC"}
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js","sources":["../../../../../src/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.ts"],"sourcesContent":["import type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\nimport type { WcpProject } from \"@webiny/wcp/types.js\";\nimport { WcpContext } from \"../abstractions.js\";\nimport { FeatureFlags } from \"../../../featureFlags/abstractions.js\";\n\nclass WcpContextWithFeatureFlagsDecoratorImpl implements WcpContext.Interface {\n constructor(\n private featureFlags: FeatureFlags.Interface,\n private decoratee: WcpContext.Interface\n ) {}\n\n getRawLicense() {\n return this.decoratee.getRawLicense();\n }\n\n getProject() {\n return this.decoratee.getProject();\n }\n\n getProjectWithFeatureFlags(): WcpProject | null {\n const project = this.decoratee.getProjectWithFeatureFlags();\n if (!project) {\n return null;\n }\n\n const flags = this.featureFlags.get();\n\n return {\n ...project,\n package: {\n ...project.package,\n features: {\n ...project.package.features,\n multiTenancy: project.package.features.multiTenancy,\n advancedPublishingWorkflow: {\n ...project.package.features.advancedPublishingWorkflow,\n enabled: flags.isEnabled(\"advancedPublishingWorkflow\")\n ? project.package.features.advancedPublishingWorkflow.enabled\n : false\n },\n advancedAccessControlLayer: {\n ...project.package.features.advancedAccessControlLayer,\n enabled: flags.isEnabled(\"advancedAccessControlLayer\")\n ? project.package.features.advancedAccessControlLayer.enabled\n : false,\n options: {\n teams: flags.isEnabled(\"advancedAccessControlLayer.teams\")\n ? project.package.features.advancedAccessControlLayer.options.teams\n : false,\n privateFiles: flags.isEnabled(\"advancedAccessControlLayer.privateFiles\")\n ? project.package.features.advancedAccessControlLayer.options\n .privateFiles\n : false,\n folderLevelPermissions: flags.isEnabled(\n \"advancedAccessControlLayer.folderLevelPermissions\"\n )\n ? project.package.features.advancedAccessControlLayer.options\n .folderLevelPermissions\n : false,\n hcmsFieldPermissions: flags.isEnabled(\n \"advancedAccessControlLayer.hcmsFieldPermissions\"\n )\n ? project.package.features.advancedAccessControlLayer.options\n .hcmsFieldPermissions\n : false\n }\n },\n auditLogs: {\n ...project.package.features.auditLogs,\n enabled: flags.isEnabled(\"auditLogs\")\n ? project.package.features.auditLogs.enabled\n : false\n },\n recordLocking: {\n ...project.package.features.recordLocking,\n enabled: flags.isEnabled(\"recordLocking\")\n ? project.package.features.recordLocking.enabled\n : false\n },\n fileManager: {\n ...project.package.features.fileManager,\n enabled: project.package.features.fileManager.enabled,\n options: {\n threatDetection: flags.isEnabled(\"fileManager.threatDetection\")\n ? project.package.features.fileManager.options.threatDetection\n : false\n }\n },\n aiPowerups: {\n ...project.package.features.aiPowerups,\n enabled: flags.isEnabled(\"aiPowerups\")\n ? project.package.features.aiPowerups?.enabled\n : false,\n options: {\n websiteBuilder: {\n pageGeneration: flags.isEnabled(\n \"aiPowerups.websiteBuilder.pageGeneration\"\n )\n ? project.package.features.aiPowerups?.options?.websiteBuilder\n ?.pageGeneration\n : false,\n pageTranslation: flags.isEnabled(\n \"aiPowerups.websiteBuilder.pageTranslation\"\n )\n ? project.package.features.aiPowerups?.options?.websiteBuilder\n ?.pageTranslation\n : false\n },\n fileManager: {\n imageEnrichment: flags.isEnabled(\n \"aiPowerups.fileManager.imageEnrichment\"\n )\n ? project.package.features.aiPowerups?.options?.fileManager\n ?.imageEnrichment\n : false\n },\n lexicalGeneration: flags.isEnabled(\"aiPowerups.lexicalGeneration\")\n ? project.package.features.aiPowerups?.options?.lexicalGeneration\n : false,\n adminAssistant: flags.isEnabled(\"aiPowerups.adminAssistant\")\n ? project.package.features.aiPowerups?.options?.adminAssistant\n : false,\n remoteComponents: flags.isEnabled(\"aiPowerups.remoteComponents\")\n ? project.package.features.aiPowerups?.options?.remoteComponents\n : false,\n cms: {\n entryGeneration: flags.isEnabled(\"aiPowerups.cms.entryGeneration\")\n ? project.package.features.aiPowerups?.options?.cms\n ?.entryGeneration\n : false,\n entryComparison: flags.isEnabled(\"aiPowerups.cms.entryComparison\")\n ? project.package.features.aiPowerups?.options?.cms\n ?.entryComparison\n : false,\n entryTranslation: flags.isEnabled(\"aiPowerups.cms.entryTranslation\")\n ? project.package.features.aiPowerups?.options?.cms\n ?.entryTranslation\n : false\n }\n }\n },\n abTesting: {\n ...project.package.features.abTesting,\n enabled: flags.isEnabled(\"abTesting\")\n ? project.package.features.abTesting?.enabled\n : false\n },\n collaboration: {\n ...project.package.features.collaboration,\n enabled: flags.isEnabled(\"collaboration\")\n ? project.package.features.collaboration?.enabled\n : false,\n options: {\n comments: flags.isEnabled(\"collaboration.comments\")\n ? project.package.features.collaboration?.options?.comments\n : false,\n activityLog: flags.isEnabled(\"collaboration.activityLog\")\n ? project.package.features.collaboration?.options?.activityLog\n : false\n }\n }\n }\n }\n };\n }\n\n getProjectEnvironment() {\n return this.decoratee.getProjectEnvironment();\n }\n\n getProjectLicense() {\n return this.decoratee.getProjectLicense();\n }\n\n canUseFeature(wcpFeatureId: keyof typeof WCP_FEATURE_LABEL) {\n return this.decoratee.canUseFeature(wcpFeatureId);\n }\n\n canUseAacl() {\n return (\n this.decoratee.canUseAacl() &&\n this.featureFlags.get().isEnabled(\"advancedAccessControlLayer\")\n );\n }\n\n canUseTeams() {\n return (\n this.decoratee.canUseTeams() &&\n this.featureFlags.get().isEnabled(\"advancedAccessControlLayer.teams\")\n );\n }\n\n canUseFolderLevelPermissions() {\n return (\n this.decoratee.canUseFolderLevelPermissions() &&\n this.featureFlags.get().isEnabled(\"advancedAccessControlLayer.folderLevelPermissions\")\n );\n }\n\n canUsePrivateFiles() {\n return (\n this.decoratee.canUsePrivateFiles() &&\n this.featureFlags.get().isEnabled(\"advancedAccessControlLayer.privateFiles\")\n );\n }\n\n canUseAuditLogs() {\n return this.decoratee.canUseAuditLogs() && this.featureFlags.get().isEnabled(\"auditLogs\");\n }\n\n canUseRecordLocking() {\n return (\n this.decoratee.canUseRecordLocking() &&\n this.featureFlags.get().isEnabled(\"recordLocking\")\n );\n }\n\n canUseFileManagerThreatDetection() {\n return (\n this.decoratee.canUseFileManagerThreatDetection() &&\n this.featureFlags.get().isEnabled(\"fileManager.threatDetection\")\n );\n }\n\n canUseWorkflows() {\n return (\n this.decoratee.canUseWorkflows() &&\n this.featureFlags.get().isEnabled(\"advancedPublishingWorkflow\")\n );\n }\n\n canUseHcmsFieldPermissions() {\n return (\n this.decoratee.canUseHcmsFieldPermissions() &&\n this.featureFlags.get().isEnabled(\"advancedAccessControlLayer.hcmsFieldPermissions\")\n );\n }\n\n canUseAiImageEnrichment() {\n return (\n this.decoratee.canUseAiImageEnrichment() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.fileManager.imageEnrichment\")\n );\n }\n\n canUseAiPageGeneration() {\n return (\n this.decoratee.canUseAiPageGeneration() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.websiteBuilder.pageGeneration\")\n );\n }\n\n canUseAiPageTranslation() {\n return (\n this.decoratee.canUseAiPageTranslation() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.websiteBuilder.pageTranslation\")\n );\n }\n\n canUseAiLexicalGeneration() {\n return (\n this.decoratee.canUseAiLexicalGeneration() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.lexicalGeneration\")\n );\n }\n\n canUseAiAdminAssistant() {\n return (\n this.decoratee.canUseAiAdminAssistant() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.adminAssistant\")\n );\n }\n\n canUseAiEntryGeneration() {\n return (\n this.decoratee.canUseAiEntryGeneration() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.cms.entryGeneration\")\n );\n }\n\n canUseAiEntryComparison() {\n return (\n this.decoratee.canUseAiEntryComparison() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.cms.entryComparison\")\n );\n }\n\n canUseAiEntryTranslation() {\n return (\n this.decoratee.canUseAiEntryTranslation() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.cms.entryTranslation\")\n );\n }\n\n canUseAiPowerups() {\n return this.decoratee.canUseAiPowerups() && this.featureFlags.get().isEnabled(\"aiPowerups\");\n }\n\n canUseAbTesting() {\n return this.decoratee.canUseAbTesting() && this.featureFlags.get().isEnabled(\"abTesting\");\n }\n\n canUseRemoteComponents() {\n return (\n this.decoratee.canUseRemoteComponents() &&\n this.featureFlags.get().isEnabled(\"aiPowerups.remoteComponents\")\n );\n }\n\n canUseCollaboration() {\n return (\n this.decoratee.canUseCollaboration() &&\n this.featureFlags.get().isEnabled(\"collaboration\")\n );\n }\n\n canUseComments() {\n return (\n this.decoratee.canUseComments() &&\n this.featureFlags.get().isEnabled(\"collaboration.comments\")\n );\n }\n\n canUseActivityLog() {\n return (\n this.decoratee.canUseActivityLog() &&\n this.featureFlags.get().isEnabled(\"collaboration.activityLog\")\n );\n }\n\n canUseLanguages() {\n return this.decoratee.canUseLanguages() && this.featureFlags.get().isEnabled(\"languages\");\n }\n\n ensureCanUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL) {\n return this.decoratee.ensureCanUseFeature(featureId);\n }\n\n async incrementSeats() {\n return this.decoratee.incrementSeats();\n }\n\n async decrementSeats() {\n return this.decoratee.decrementSeats();\n }\n\n async incrementTenants() {\n return this.decoratee.incrementTenants();\n }\n\n async decrementTenants() {\n return this.decoratee.decrementTenants();\n }\n\n toDto() {\n return this.decoratee.toDto();\n }\n}\n\nexport const WcpContextWithFeatureFlagsDecorator = WcpContext.createDecorator({\n decorator: WcpContextWithFeatureFlagsDecoratorImpl,\n dependencies: [FeatureFlags]\n});\n"],"names":["WcpContextWithFeatureFlagsDecoratorImpl","featureFlags","decoratee","project","flags","wcpFeatureId","featureId","WcpContextWithFeatureFlagsDecorator","WcpContext","FeatureFlags"],"mappings":";;AAKA,MAAMA;IACF,YACYC,YAAoC,EACpCC,SAA+B,CACzC;aAFUD,YAAY,GAAZA;aACAC,SAAS,GAATA;IACT;IAEH,gBAAgB;QACZ,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa;IACvC;IAEA,aAAa;QACT,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU;IACpC;IAEA,6BAAgD;QAC5C,MAAMC,UAAU,IAAI,CAAC,SAAS,CAAC,0BAA0B;QACzD,IAAI,CAACA,SACD,OAAO;QAGX,MAAMC,QAAQ,IAAI,CAAC,YAAY,CAAC,GAAG;QAEnC,OAAO;YACH,GAAGD,O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AAS,CAAC,iBAAiB,MAChC,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC;IAE1C;IAEA,kBAAkB;QACd,OAAO,IAAI,CAAC,SAAS,CAAC,eAAe,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC;IACjF;IAEA,oBAAoBC,SAAyC,EAAE;QAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAACA;IAC9C;IAEA,MAAM,iBAAiB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc;IACxC;IAEA,MAAM,iBAAiB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc;IACxC;IAEA,MAAM,mBAAmB;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB;IAC1C;IAEA,MAAM,mBAAmB;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB;IAC1C;IAEA,QAAQ;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK;IAC/B;AACJ;AAEO,MAAMC,sCAAsCC,WAAW,eAAe,CAAC;IAC1E,WAAWR;IACX,cAAc;QAACS;KAAa;AAChC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Container } from "@webiny/di";
|
|
2
|
-
import type { ILicense } from "@webiny/wcp/types.js";
|
|
3
2
|
export declare const WcpContextFeature: {
|
|
4
3
|
name: string;
|
|
5
|
-
register(container: Container, context:
|
|
4
|
+
register(container: Container, context: import("../WcpLicenseProvider.js").IWcpLicenseProvider): void;
|
|
6
5
|
};
|
|
@@ -3,8 +3,8 @@ import { WcpContextImpl } from "./WcpContext.js";
|
|
|
3
3
|
import { WcpContext } from "./abstractions.js";
|
|
4
4
|
const WcpContextFeature = createFeature({
|
|
5
5
|
name: "WcpContext",
|
|
6
|
-
register (container,
|
|
7
|
-
container.registerInstance(WcpContext, new WcpContextImpl(
|
|
6
|
+
register (container, provider) {
|
|
7
|
+
container.registerInstance(WcpContext, new WcpContextImpl(provider));
|
|
8
8
|
}
|
|
9
9
|
});
|
|
10
10
|
export { WcpContextFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/WcpContext/feature.js","sources":["../../../../src/features/wcp/WcpContext/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport type { Container } from \"@webiny/di\";\nimport { WcpContextImpl } from \"./WcpContext.js\";\nimport { WcpContext } from \"./abstractions.js\";\nimport type {
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpContext/feature.js","sources":["../../../../src/features/wcp/WcpContext/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport type { Container } from \"@webiny/di\";\nimport { WcpContextImpl } from \"./WcpContext.js\";\nimport { WcpContext } from \"./abstractions.js\";\nimport type { WcpLicenseProvider } from \"../WcpLicenseProvider.js\";\n\nexport const WcpContextFeature = createFeature({\n name: \"WcpContext\",\n register(container: Container, provider: WcpLicenseProvider.Interface) {\n container.registerInstance(WcpContext, new WcpContextImpl(provider));\n }\n});\n"],"names":["WcpContextFeature","createFeature","container","provider","WcpContext","WcpContextImpl"],"mappings":";;;AAMO,MAAMA,oBAAoBC,cAAc;IAC3C,MAAM;IACN,UAASC,SAAoB,EAAEC,QAAsC;QACjED,UAAU,gBAAgB,CAACE,YAAY,IAAIC,eAAeF;IAC9D;AACJ"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type { Context } from "@webiny/api/types.js";
|
|
2
1
|
import type { ILicense, WcpProject } from "@webiny/wcp/types.js";
|
|
3
2
|
import { IWcpContext } from "./abstractions.js";
|
|
4
|
-
export interface WcpContext extends Context {
|
|
5
|
-
wcp: IWcpContext;
|
|
6
|
-
}
|
|
7
3
|
export type WcpContextObject = IWcpContext;
|
|
8
4
|
export interface CachedWcpProjectLicense {
|
|
9
5
|
cacheKey: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ILicense } from "@webiny/wcp/types.js";
|
|
2
2
|
export declare const WcpFeature: {
|
|
3
3
|
name: string;
|
|
4
|
-
register(container: import("@webiny/di").Container, context
|
|
4
|
+
register(container: import("@webiny/di").Container, context?: ILicense | undefined): void;
|
|
5
5
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { createFeature } from "@webiny/feature/api";
|
|
2
2
|
import { WcpContextFeature } from "./WcpContext/feature.js";
|
|
3
3
|
import { WcpContextWithFeatureFlagsDecorator } from "./WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js";
|
|
4
|
+
import { FeatureFlagsWithLicenseDecorator } from "../featureFlags/decorators/FeatureFlagsWithLicenseDecorator.js";
|
|
5
|
+
import { WcpLicenseProvider, WcpLicenseProviderImpl } from "./WcpLicenseProvider.js";
|
|
4
6
|
const WcpFeature = createFeature({
|
|
5
7
|
name: "WebinyControlPanel",
|
|
6
|
-
register (container,
|
|
7
|
-
|
|
8
|
+
register (container, initialLicense) {
|
|
9
|
+
const provider = new WcpLicenseProviderImpl(initialLicense);
|
|
10
|
+
container.registerInstance(WcpLicenseProvider, provider);
|
|
11
|
+
WcpContextFeature.register(container, provider);
|
|
8
12
|
container.registerDecorator(WcpContextWithFeatureFlagsDecorator);
|
|
13
|
+
container.registerDecorator(FeatureFlagsWithLicenseDecorator);
|
|
9
14
|
}
|
|
10
15
|
});
|
|
11
16
|
export { WcpFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/WcpFeature.js","sources":["../../../src/features/wcp/WcpFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { WcpContextFeature } from \"./WcpContext/feature.js\";\nimport { WcpContextWithFeatureFlagsDecorator } from \"./WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js\";\nimport type { ILicense } from \"@webiny/wcp/types.js\";\n\nexport const WcpFeature = createFeature<ILicense>({\n name: \"WebinyControlPanel\",\n register(container,
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpFeature.js","sources":["../../../src/features/wcp/WcpFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { WcpContextFeature } from \"./WcpContext/feature.js\";\nimport { WcpContextWithFeatureFlagsDecorator } from \"./WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js\";\nimport { FeatureFlagsWithLicenseDecorator } from \"../featureFlags/decorators/FeatureFlagsWithLicenseDecorator.js\";\nimport { WcpLicenseProvider, WcpLicenseProviderImpl } from \"./WcpLicenseProvider.js\";\nimport type { ILicense } from \"@webiny/wcp/types.js\";\n\nexport const WcpFeature = createFeature<ILicense | undefined>({\n name: \"WebinyControlPanel\",\n register(container, initialLicense?) {\n const provider = new WcpLicenseProviderImpl(initialLicense);\n container.registerInstance(WcpLicenseProvider, provider);\n WcpContextFeature.register(container, provider);\n container.registerDecorator(WcpContextWithFeatureFlagsDecorator);\n container.registerDecorator(FeatureFlagsWithLicenseDecorator);\n // The per-request license refresh is loaded pre-register by api-event-handler-core's\n // registerApiRequestStack, keeping the domain layer free of the transport lifecycle contract.\n }\n});\n"],"names":["WcpFeature","createFeature","container","initialLicense","provider","WcpLicenseProviderImpl","WcpLicenseProvider","WcpContextFeature","WcpContextWithFeatureFlagsDecorator","FeatureFlagsWithLicenseDecorator"],"mappings":";;;;;AAOO,MAAMA,aAAaC,cAAoC;IAC1D,MAAM;IACN,UAASC,SAAS,EAAEC,cAAe;QAC/B,MAAMC,WAAW,IAAIC,uBAAuBF;QAC5CD,UAAU,gBAAgB,CAACI,oBAAoBF;QAC/CG,kBAAkB,QAAQ,CAACL,WAAWE;QACtCF,UAAU,iBAAiB,CAACM;QAC5BN,UAAU,iBAAiB,CAACO;IAGhC;AACJ"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DecryptedWcpProjectLicense, ILicense } from "@webiny/wcp/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Loads and process-caches the WCP project license. Static because the cache is process-global (one
|
|
4
|
+
* license per deployment): the pre-register refresh in `registerApiRequestStack` calls `load()` to
|
|
5
|
+
* populate it, and `WcpLicenseProvider` / register-time feature-flag gates read it synchronously via
|
|
6
|
+
* `getCached()`. Not DI — it must be usable before any container exists (before register).
|
|
7
|
+
*/
|
|
8
|
+
export declare class WcpLicenseLoader {
|
|
9
|
+
private static readonly wcpProjectEnvironment;
|
|
10
|
+
private static cached;
|
|
11
|
+
private static inflight;
|
|
12
|
+
/**
|
|
13
|
+
* Synchronously read the currently cached license. `load()` must have been awaited at least once
|
|
14
|
+
* this request (the pre-register refresh does this), so this reflects the live license — letting
|
|
15
|
+
* register()-time feature-flag checks read it synchronously.
|
|
16
|
+
*/
|
|
17
|
+
static getCached(): ILicense;
|
|
18
|
+
/**
|
|
19
|
+
* Seed the cache with an already-resolved license (tests pass a pre-built one). Marks it fresh so
|
|
20
|
+
* a subsequent `load()` returns it without a fetch. This is how `WcpLicenseProviderImpl` installs
|
|
21
|
+
* an initial license.
|
|
22
|
+
*/
|
|
23
|
+
static seed(license: ILicense): void;
|
|
24
|
+
static load(testProjectLicense?: DecryptedWcpProjectLicense): Promise<ILicense>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { License, NullLicense, getWcpProjectLicense } from "@webiny/wcp";
|
|
2
|
+
import { getWcpProjectLicenseCacheKey } from "./WcpContext/utils.js";
|
|
3
|
+
import { resolveWcpProjectEnvironment } from "./resolveWcpProjectEnvironment.js";
|
|
4
|
+
class WcpLicenseLoader {
|
|
5
|
+
static{
|
|
6
|
+
this.wcpProjectEnvironment = resolveWcpProjectEnvironment();
|
|
7
|
+
}
|
|
8
|
+
static{
|
|
9
|
+
this.cached = {
|
|
10
|
+
cacheKey: null,
|
|
11
|
+
project: null,
|
|
12
|
+
license: new NullLicense()
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
static{
|
|
16
|
+
this.inflight = null;
|
|
17
|
+
}
|
|
18
|
+
static getCached() {
|
|
19
|
+
return WcpLicenseLoader.cached.license;
|
|
20
|
+
}
|
|
21
|
+
static seed(license) {
|
|
22
|
+
WcpLicenseLoader.cached.license = license;
|
|
23
|
+
WcpLicenseLoader.cached.cacheKey = getWcpProjectLicenseCacheKey();
|
|
24
|
+
}
|
|
25
|
+
static async load(testProjectLicense) {
|
|
26
|
+
const cached = WcpLicenseLoader.cached;
|
|
27
|
+
if (testProjectLicense) {
|
|
28
|
+
cached.license = License.fromLicenseDto(testProjectLicense);
|
|
29
|
+
return cached.license;
|
|
30
|
+
}
|
|
31
|
+
const env = WcpLicenseLoader.wcpProjectEnvironment;
|
|
32
|
+
if (!env) return cached.license;
|
|
33
|
+
const currentCacheKey = getWcpProjectLicenseCacheKey();
|
|
34
|
+
if (cached.cacheKey === currentCacheKey) return cached.license;
|
|
35
|
+
if (WcpLicenseLoader.inflight) return WcpLicenseLoader.inflight;
|
|
36
|
+
WcpLicenseLoader.inflight = (async ()=>{
|
|
37
|
+
const decryptedLicenseDto = await getWcpProjectLicense({
|
|
38
|
+
orgId: env.org.id,
|
|
39
|
+
projectId: env.project.id,
|
|
40
|
+
projectEnvironmentApiKey: env.apiKey
|
|
41
|
+
});
|
|
42
|
+
if (decryptedLicenseDto) cached.project = {
|
|
43
|
+
orgId: decryptedLicenseDto.orgId,
|
|
44
|
+
projectId: decryptedLicenseDto.projectId,
|
|
45
|
+
package: decryptedLicenseDto.package
|
|
46
|
+
};
|
|
47
|
+
cached.license = License.fromLicenseDto(decryptedLicenseDto);
|
|
48
|
+
cached.cacheKey = currentCacheKey;
|
|
49
|
+
return cached.license;
|
|
50
|
+
})().finally(()=>{
|
|
51
|
+
WcpLicenseLoader.inflight = null;
|
|
52
|
+
});
|
|
53
|
+
return WcpLicenseLoader.inflight;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export { WcpLicenseLoader };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=WcpLicenseLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpLicenseLoader.js","sources":["../../../src/features/wcp/WcpLicenseLoader.ts"],"sourcesContent":["import { getWcpProjectLicense, NullLicense, License } from \"@webiny/wcp\";\nimport type { DecryptedWcpProjectLicense, ILicense } from \"@webiny/wcp/types.js\";\nimport type { CachedWcpProjectLicense } from \"~/features/wcp/WcpContext/types.js\";\nimport { getWcpProjectLicenseCacheKey } from \"~/features/wcp/WcpContext/utils.js\";\nimport { resolveWcpProjectEnvironment } from \"~/features/wcp/resolveWcpProjectEnvironment.js\";\n\n/**\n * Loads and process-caches the WCP project license. Static because the cache is process-global (one\n * license per deployment): the pre-register refresh in `registerApiRequestStack` calls `load()` to\n * populate it, and `WcpLicenseProvider` / register-time feature-flag gates read it synchronously via\n * `getCached()`. Not DI — it must be usable before any container exists (before register).\n */\nexport class WcpLicenseLoader {\n private static readonly wcpProjectEnvironment = resolveWcpProjectEnvironment();\n\n private static cached: CachedWcpProjectLicense = {\n cacheKey: null,\n project: null,\n license: new NullLicense()\n };\n\n // In-flight fetch, memoized so concurrent cache-miss callers coalesce onto a single WCP request\n // (standalone runs many requests in one process; we never want two license fetches at once).\n private static inflight: Promise<ILicense> | null = null;\n\n /**\n * Synchronously read the currently cached license. `load()` must have been awaited at least once\n * this request (the pre-register refresh does this), so this reflects the live license — letting\n * register()-time feature-flag checks read it synchronously.\n */\n static getCached(): ILicense {\n return WcpLicenseLoader.cached.license;\n }\n\n /**\n * Seed the cache with an already-resolved license (tests pass a pre-built one). Marks it fresh so\n * a subsequent `load()` returns it without a fetch. This is how `WcpLicenseProviderImpl` installs\n * an initial license.\n */\n static seed(license: ILicense): void {\n WcpLicenseLoader.cached.license = license;\n WcpLicenseLoader.cached.cacheKey = getWcpProjectLicenseCacheKey();\n }\n\n static async load(testProjectLicense?: DecryptedWcpProjectLicense): Promise<ILicense> {\n const cached = WcpLicenseLoader.cached;\n\n if (testProjectLicense) {\n cached.license = License.fromLicenseDto(testProjectLicense);\n return cached.license;\n }\n\n const env = WcpLicenseLoader.wcpProjectEnvironment;\n if (!env) {\n return cached.license;\n }\n\n const currentCacheKey = getWcpProjectLicenseCacheKey();\n if (cached.cacheKey === currentCacheKey) {\n return cached.license;\n }\n\n // Cache miss (first load or the ~5-min key rotated). Coalesce concurrent callers onto one fetch.\n if (WcpLicenseLoader.inflight) {\n return WcpLicenseLoader.inflight;\n }\n\n WcpLicenseLoader.inflight = (async () => {\n // Pull the project license from the WCP API.\n const decryptedLicenseDto = await getWcpProjectLicense({\n orgId: env.org.id,\n projectId: env.project.id,\n projectEnvironmentApiKey: env.apiKey\n });\n\n if (decryptedLicenseDto) {\n cached.project = {\n orgId: decryptedLicenseDto.orgId,\n projectId: decryptedLicenseDto.projectId,\n package: decryptedLicenseDto.package\n };\n }\n\n cached.license = License.fromLicenseDto(decryptedLicenseDto);\n // Mark fresh only after a successful fetch — a throw leaves the key unset so the next call retries.\n cached.cacheKey = currentCacheKey;\n return cached.license;\n })().finally(() => {\n WcpLicenseLoader.inflight = null;\n });\n\n return WcpLicenseLoader.inflight;\n }\n}\n"],"names":["WcpLicenseLoader","resolveWcpProjectEnvironment","NullLicense","license","getWcpProjectLicenseCacheKey","testProjectLicense","cached","License","env","currentCacheKey","decryptedLicenseDto","getWcpProjectLicense"],"mappings":";;;AAYO,MAAMA;;aACe,qBAAqB,GAAGC;;;aAEjC,MAAM,GAA4B;YAC7C,UAAU;YACV,SAAS;YACT,SAAS,IAAIC;QACjB;;;aAIe,QAAQ,GAA6B;;IAOpD,OAAO,YAAsB;QACzB,OAAOF,iBAAiB,MAAM,CAAC,OAAO;IAC1C;IAOA,OAAO,KAAKG,OAAiB,EAAQ;QACjCH,iBAAiB,MAAM,CAAC,OAAO,GAAGG;QAClCH,iBAAiB,MAAM,CAAC,QAAQ,GAAGI;IACvC;IAEA,aAAa,KAAKC,kBAA+C,EAAqB;QAClF,MAAMC,SAASN,iBAAiB,MAAM;QAEtC,IAAIK,oBAAoB;YACpBC,OAAO,OAAO,GAAGC,QAAQ,cAAc,CAACF;YACxC,OAAOC,OAAO,OAAO;QACzB;QAEA,MAAME,MAAMR,iBAAiB,qBAAqB;QAClD,IAAI,CAACQ,KACD,OAAOF,OAAO,OAAO;QAGzB,MAAMG,kBAAkBL;QACxB,IAAIE,OAAO,QAAQ,KAAKG,iBACpB,OAAOH,OAAO,OAAO;QAIzB,IAAIN,iBAAiB,QAAQ,EACzB,OAAOA,iBAAiB,QAAQ;QAGpCA,iBAAiB,QAAQ,GAAI;YAEzB,MAAMU,sBAAsB,MAAMC,qBAAqB;gBACnD,OAAOH,IAAI,GAAG,CAAC,EAAE;gBACjB,WAAWA,IAAI,OAAO,CAAC,EAAE;gBACzB,0BAA0BA,IAAI,MAAM;YACxC;YAEA,IAAIE,qBACAJ,OAAO,OAAO,GAAG;gBACb,OAAOI,oBAAoB,KAAK;gBAChC,WAAWA,oBAAoB,SAAS;gBACxC,SAASA,oBAAoB,OAAO;YACxC;YAGJJ,OAAO,OAAO,GAAGC,QAAQ,cAAc,CAACG;YAExCJ,OAAO,QAAQ,GAAGG;YAClB,OAAOH,OAAO,OAAO;QACzB,KAAK,OAAO,CAAC;YACTN,iBAAiB,QAAQ,GAAG;QAChC;QAEA,OAAOA,iBAAiB,QAAQ;IACpC;AACJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ILicense } from "@webiny/wcp/types.js";
|
|
2
|
+
export interface IWcpLicenseProvider {
|
|
3
|
+
get(): ILicense;
|
|
4
|
+
}
|
|
5
|
+
export declare const WcpLicenseProvider: import("@webiny/di").Abstraction<IWcpLicenseProvider>;
|
|
6
|
+
export declare namespace WcpLicenseProvider {
|
|
7
|
+
type Interface = IWcpLicenseProvider;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Synchronous read-through to the process-cached WCP license. `get()` stays sync so the canUse*
|
|
11
|
+
* consumers (WcpContext, IdentityContext, the WCP GraphQL query) do too. The license is refreshed
|
|
12
|
+
* once per request BEFORE any feature registers — `registerApiRequestStack` awaits
|
|
13
|
+
* `WcpLicenseLoader.load()` (process-cached, ~5-min TTL, single-flighted) — so `get()` reflects the
|
|
14
|
+
* live license at both register() time (feature-flag gates) and resolver time.
|
|
15
|
+
*
|
|
16
|
+
* An optional initial license can be supplied (tests pass a pre-resolved one); it seeds the cache.
|
|
17
|
+
*/
|
|
18
|
+
export declare class WcpLicenseProviderImpl implements IWcpLicenseProvider {
|
|
19
|
+
constructor(initialLicense?: ILicense);
|
|
20
|
+
get(): ILicense;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
+
import { WcpLicenseLoader } from "./WcpLicenseLoader.js";
|
|
3
|
+
const WcpLicenseProvider = createAbstraction("WcpLicenseProvider");
|
|
4
|
+
class WcpLicenseProviderImpl {
|
|
5
|
+
constructor(initialLicense){
|
|
6
|
+
if (initialLicense) WcpLicenseLoader.seed(initialLicense);
|
|
7
|
+
}
|
|
8
|
+
get() {
|
|
9
|
+
return WcpLicenseLoader.getCached();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { WcpLicenseProvider, WcpLicenseProviderImpl };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=WcpLicenseProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpLicenseProvider.js","sources":["../../../src/features/wcp/WcpLicenseProvider.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ILicense } from \"@webiny/wcp/types.js\";\nimport { WcpLicenseLoader } from \"~/features/wcp/WcpLicenseLoader.js\";\n\nexport interface IWcpLicenseProvider {\n get(): ILicense;\n}\n\nexport const WcpLicenseProvider = createAbstraction<IWcpLicenseProvider>(\"WcpLicenseProvider\");\n\nexport namespace WcpLicenseProvider {\n export type Interface = IWcpLicenseProvider;\n}\n\n/**\n * Synchronous read-through to the process-cached WCP license. `get()` stays sync so the canUse*\n * consumers (WcpContext, IdentityContext, the WCP GraphQL query) do too. The license is refreshed\n * once per request BEFORE any feature registers — `registerApiRequestStack` awaits\n * `WcpLicenseLoader.load()` (process-cached, ~5-min TTL, single-flighted) — so `get()` reflects the\n * live license at both register() time (feature-flag gates) and resolver time.\n *\n * An optional initial license can be supplied (tests pass a pre-resolved one); it seeds the cache.\n */\nexport class WcpLicenseProviderImpl implements IWcpLicenseProvider {\n constructor(initialLicense?: ILicense) {\n if (initialLicense) {\n WcpLicenseLoader.seed(initialLicense);\n }\n }\n\n get(): ILicense {\n return WcpLicenseLoader.getCached();\n }\n}\n"],"names":["WcpLicenseProvider","createAbstraction","WcpLicenseProviderImpl","initialLicense","WcpLicenseLoader"],"mappings":";;AAQO,MAAMA,qBAAqBC,kBAAuC;AAelE,MAAMC;IACT,YAAYC,cAAyB,CAAE;QACnC,IAAIA,gBACAC,iBAAiB,IAAI,CAACD;IAE9B;IAEA,MAAgB;QACZ,OAAOC,iBAAiB,SAAS;IACrC;AACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WcpProjectEnvironment } from "@webiny/wcp/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the WCP project environment used to fetch the license. Prefer the CLI-computed
|
|
4
|
+
* WCP_PROJECT_ENVIRONMENT blob (set by `applyWcpEnvVars` during `webiny serve` and the AWS deploy).
|
|
5
|
+
* When it's absent — a CLI-less standalone deploy that boots the built handler directly (e.g.
|
|
6
|
+
* `node start.mjs`) — derive the same org, project and api key straight from the runtime env, so a
|
|
7
|
+
* fresh license can still be fetched.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveWcpProjectEnvironment(): WcpProjectEnvironment | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getWcpProjectEnvironment } from "@webiny/wcp";
|
|
2
|
+
function resolveWcpProjectEnvironment() {
|
|
3
|
+
const fromBlob = getWcpProjectEnvironment();
|
|
4
|
+
if (fromBlob) return fromBlob;
|
|
5
|
+
const projectId = process.env.WEBINY_PROJECT_ID || process.env.WCP_PROJECT_ID;
|
|
6
|
+
const apiKey = process.env.WEBINY_PROJECT_API_KEY || process.env.WCP_PROJECT_ENVIRONMENT_API_KEY;
|
|
7
|
+
if (!projectId || !apiKey) return null;
|
|
8
|
+
const [orgId, project] = projectId.split("/");
|
|
9
|
+
if (!orgId || !project) return null;
|
|
10
|
+
return {
|
|
11
|
+
id: "",
|
|
12
|
+
apiKey,
|
|
13
|
+
org: {
|
|
14
|
+
id: orgId
|
|
15
|
+
},
|
|
16
|
+
project: {
|
|
17
|
+
id: project
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export { resolveWcpProjectEnvironment };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=resolveWcpProjectEnvironment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/wcp/resolveWcpProjectEnvironment.js","sources":["../../../src/features/wcp/resolveWcpProjectEnvironment.ts"],"sourcesContent":["import { getWcpProjectEnvironment } from \"@webiny/wcp\";\nimport type { WcpProjectEnvironment } from \"@webiny/wcp/types.js\";\n\n/**\n * Resolve the WCP project environment used to fetch the license. Prefer the CLI-computed\n * WCP_PROJECT_ENVIRONMENT blob (set by `applyWcpEnvVars` during `webiny serve` and the AWS deploy).\n * When it's absent — a CLI-less standalone deploy that boots the built handler directly (e.g.\n * `node start.mjs`) — derive the same org, project and api key straight from the runtime env, so a\n * fresh license can still be fetched.\n */\nexport function resolveWcpProjectEnvironment(): WcpProjectEnvironment | null {\n const fromBlob = getWcpProjectEnvironment();\n if (fromBlob) {\n return fromBlob;\n }\n\n const projectId = process.env.WEBINY_PROJECT_ID || process.env.WCP_PROJECT_ID;\n const apiKey =\n process.env.WEBINY_PROJECT_API_KEY || process.env.WCP_PROJECT_ENVIRONMENT_API_KEY;\n if (!projectId || !apiKey) {\n return null;\n }\n\n // WEBINY_PROJECT_ID has an \"orgId/projectId\" shape.\n const [orgId, project] = projectId.split(\"/\");\n if (!orgId || !project) {\n return null;\n }\n\n // `id` is intentionally empty. The WCP backend identifies the specific project environment\n // from the api key (sent as the request's authorization header); the license fetch only uses\n // org/project (URL path) + apiKey (auth), never the environment id. So there's nothing to fill.\n return { id: \"\", apiKey, org: { id: orgId }, project: { id: project } };\n}\n"],"names":["resolveWcpProjectEnvironment","fromBlob","getWcpProjectEnvironment","projectId","process","apiKey","orgId","project"],"mappings":";AAUO,SAASA;IACZ,MAAMC,WAAWC;IACjB,IAAID,UACA,OAAOA;IAGX,MAAME,YAAYC,QAAQ,GAAG,CAAC,iBAAiB,IAAIA,QAAQ,GAAG,CAAC,cAAc;IAC7E,MAAMC,SACFD,QAAQ,GAAG,CAAC,sBAAsB,IAAIA,QAAQ,GAAG,CAAC,+BAA+B;IACrF,IAAI,CAACD,aAAa,CAACE,QACf,OAAO;IAIX,MAAM,CAACC,OAAOC,QAAQ,GAAGJ,UAAU,KAAK,CAAC;IACzC,IAAI,CAACG,SAAS,CAACC,SACX,OAAO;IAMX,OAAO;QAAE,IAAI;QAAIF;QAAQ,KAAK;YAAE,IAAIC;QAAM;QAAG,SAAS;YAAE,IAAIC;QAAQ;IAAE;AAC1E"}
|