@ultrst-armada/kloks 1.25.0 → 1.26.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/package.json +5 -7
- package/packages/audio-midi/dist/{audioClipEngine-E5ODQNYR.js → audioClipEngine-P2XTGBMZ.js} +3 -3
- package/packages/audio-midi/dist/{audioInputManager-OOH3TOJ6.js → audioInputManager-YL5KYUWC.js} +2 -2
- package/packages/audio-midi/dist/bowser-F6LIZBYW.js +2821 -0
- package/packages/audio-midi/dist/chunk-34KJBG4F.js +357 -0
- package/packages/audio-midi/dist/{chunk-3FXNT6PF.js → chunk-6RGU6QHK.js} +2 -2
- package/packages/audio-midi/dist/{chunk-QGM4M3NI.js → chunk-EAQYK3U2.js} +4 -0
- package/packages/audio-midi/dist/chunk-IOAPEUC7.js +3424 -0
- package/packages/audio-midi/dist/chunk-J64ZDIIX.js +2753 -0
- package/packages/audio-midi/dist/chunk-K6H7T3EP.js +1991 -0
- package/packages/audio-midi/dist/chunk-N3MSTUJN.js +4785 -0
- package/packages/audio-midi/dist/{chunk-2U7VIADS.js → chunk-QNGB2HIN.js} +1 -1
- package/packages/audio-midi/dist/chunk-VP26OHBN.js +480 -0
- package/packages/audio-midi/dist/chunk-VRLVLNLG.js +1727 -0
- package/packages/audio-midi/dist/dist-TKZ5TDRN.js +1124 -0
- package/packages/audio-midi/dist/{dist-XMSSRYDR.js → dist-W7ZJS3LZ.js} +1 -1
- package/packages/audio-midi/dist/dist-es-3DGJJFOU.js +338 -0
- package/packages/audio-midi/dist/dist-es-5IACWOIO.js +69 -0
- package/packages/audio-midi/dist/dist-es-BWLDIBIA.js +47 -0
- package/packages/audio-midi/dist/dist-es-DO3F4OBN.js +377 -0
- package/packages/audio-midi/dist/dist-es-NN7AKU7P.js +175 -0
- package/packages/audio-midi/dist/dist-es-QZ6GKMM7.js +220 -0
- package/packages/audio-midi/dist/dist-es-R3VEGXOP.js +87 -0
- package/packages/audio-midi/dist/dist-es-TLPJYZTE.js +294 -0
- package/packages/audio-midi/dist/event-streams-DRE6QVD6.js +940 -0
- package/packages/audio-midi/dist/index.js +19 -19
- package/packages/audio-midi/dist/loadSso-M3ZIZDGO.js +586 -0
- package/packages/audio-midi/dist/multipart-parser-YYFFJ4QD.js +371 -0
- package/packages/audio-midi/dist/signin-YXALFRYB.js +831 -0
- package/packages/audio-midi/dist/src-2QCYQXYH.js +1396 -0
- package/packages/audio-midi/dist/sso-oidc-NXFKRL6O.js +847 -0
- package/packages/audio-midi/dist/sts-MICPT37B.js +1253 -0
- package/packages/audio-midi/dist/{transformers.node-HWHOAE4H.js → transformers.node-R6VHTGC2.js} +1 -1
- package/packages/backend/dist/ai-inference/DeterministicEndpointExecutor.d.ts +26 -0
- package/packages/backend/dist/ai-inference/errorParser.d.ts +11 -0
- package/packages/backend/dist/ai-inference/index.d.ts +6 -97
- package/packages/backend/dist/ai-inference/inferenceExecutor.d.ts +11 -0
- package/packages/backend/dist/ai-inference/types.d.ts +45 -0
- package/packages/backend/dist/ai-keys/index.d.ts +6 -68
- package/packages/backend/dist/ai-keys/keyStore.d.ts +44 -0
- package/packages/backend/dist/ai-keys/keyValidator.d.ts +7 -0
- package/packages/backend/dist/ai-keys/keysStorage.d.ts +14 -0
- package/packages/backend/dist/{types-NITEaxAh.d.ts → ai-keys/types.d.ts} +5 -9
- package/packages/backend/dist/ai-models/catalogData.d.ts +6 -0
- package/packages/backend/dist/ai-models/endpointRefresher.d.ts +13 -0
- package/packages/backend/dist/ai-models/index.d.ts +7 -70
- package/packages/backend/dist/ai-models/modelCatalog.d.ts +33 -0
- package/packages/backend/dist/ai-models/modelHealthService.d.ts +15 -0
- package/packages/backend/dist/{types-fYUdf9oB.d.ts → ai-models/types.d.ts} +3 -7
- package/packages/backend/dist/ai-provider/AIProviderService.d.ts +16 -0
- package/packages/backend/dist/{AITransportClient-dToGr8nj.d.ts → ai-provider/AITransportClient.d.ts} +3 -5
- package/packages/backend/dist/ai-provider/index.d.ts +6 -30
- package/packages/backend/dist/ai-provider/providers.d.ts +9 -0
- package/packages/backend/dist/{types-Di4ZAQYA.d.ts → ai-provider/types.d.ts} +4 -6
- package/packages/backend/dist/ai-routing/failoverEngine.d.ts +10 -0
- package/packages/backend/dist/ai-routing/healthCheckService.d.ts +19 -0
- package/packages/backend/dist/ai-routing/index.d.ts +6 -115
- package/packages/backend/dist/ai-routing/metricsLogger.d.ts +51 -0
- package/packages/backend/dist/ai-routing/types.d.ts +30 -0
- package/packages/backend/dist/ai-tools/ToolManagerService.d.ts +11 -0
- package/packages/backend/dist/ai-tools/index.d.ts +6 -80
- package/packages/backend/dist/ai-tools/mcpEngine.d.ts +19 -0
- package/packages/backend/dist/ai-tools/toolValidationLoop.d.ts +10 -0
- package/packages/backend/dist/ai-tools/types.d.ts +37 -0
- package/packages/backend/dist/api/BaseApiRoute.d.ts +9 -0
- package/packages/backend/dist/api/index.d.ts +4 -32
- package/packages/backend/dist/api/middleware.d.ts +3 -0
- package/packages/backend/dist/api/sse.d.ts +1 -0
- package/packages/backend/dist/api/types.d.ts +14 -0
- package/packages/backend/dist/architecture/types.d.ts +53 -0
- package/packages/backend/dist/auth/BaseAccountProvider.d.ts +7 -0
- package/packages/backend/dist/auth/CanonicalAuthClient.d.ts +6 -0
- package/packages/backend/dist/auth/UnifiedAuthCore.d.ts +23 -0
- package/packages/backend/dist/auth/UnifiedAuthCore.test.d.ts +1 -0
- package/packages/backend/dist/auth/index.d.ts +2 -27
- package/packages/backend/dist/auth/index.js +1 -1
- package/packages/backend/dist/{chunk-SNKPYPDW.js → chunk-2COYZMUJ.js} +1 -0
- package/packages/backend/dist/{chunk-SHZAQTIT.js → chunk-3W4TN6XB.js} +184 -95
- package/packages/backend/dist/chunk-52M4L74T.js +247 -0
- package/packages/backend/dist/chunk-CA5HVC4X.js +155 -0
- package/packages/backend/dist/chunk-GKQ42CYW.js +47 -0
- package/packages/backend/dist/chunk-GZD5A54P.js +67 -0
- package/packages/backend/dist/{chunk-SVNL5IVN.js → chunk-IB5SLBHT.js} +1 -1
- package/packages/backend/dist/{chunk-COA3ABWL.js → chunk-JRNH5KPV.js} +3 -3
- package/packages/backend/dist/{chunk-IGZB4RYT.js → chunk-QXIMZLGS.js} +1 -1
- package/packages/backend/dist/client/index.d.ts +21 -19
- package/packages/backend/dist/client/useBackend.d.ts +18 -0
- package/packages/backend/dist/connectivity/BackendClient.d.ts +40 -0
- package/packages/backend/dist/connectivity/BackendContract.d.ts +42 -0
- package/packages/backend/dist/connectivity/BackendRegistry.d.ts +20 -0
- package/packages/backend/dist/connectivity/BackendResolver.d.ts +33 -0
- package/packages/backend/dist/connectivity/CallbackRegistry.d.ts +17 -0
- package/packages/backend/dist/connectivity/ConcurrencyManager.d.ts +28 -0
- package/packages/backend/dist/connectivity/EventBus.d.ts +18 -0
- package/packages/backend/dist/connectivity/FrontendSession.d.ts +30 -0
- package/packages/backend/dist/connectivity/HTTPTransport.d.ts +34 -0
- package/packages/backend/dist/connectivity/HealthMonitor.d.ts +18 -0
- package/packages/backend/dist/connectivity/IdempotencyManager.d.ts +14 -0
- package/packages/backend/dist/connectivity/InProcessExecutor.d.ts +27 -0
- package/packages/backend/dist/connectivity/JobScheduler.d.ts +30 -0
- package/packages/backend/dist/connectivity/LoadBalancer.d.ts +15 -0
- package/packages/backend/dist/connectivity/LockManager.d.ts +16 -0
- package/packages/backend/dist/connectivity/RemoteExecutor.d.ts +33 -0
- package/packages/backend/dist/connectivity/SequenceTracker.d.ts +26 -0
- package/packages/backend/dist/connectivity/Transport.d.ts +18 -0
- package/packages/backend/dist/connectivity/WebSocketTransport.d.ts +37 -0
- package/packages/backend/dist/connectivity/index.d.ts +23 -248
- package/packages/backend/dist/connectivity/types.d.ts +108 -0
- package/packages/backend/dist/control-plane/AuditLogger.d.ts +9 -0
- package/packages/backend/dist/control-plane/ControlPlaneManager.d.ts +10 -0
- package/packages/backend/dist/control-plane/DatabaseClusterManager.d.ts +20 -0
- package/packages/backend/dist/control-plane/index.d.ts +4 -56
- package/packages/backend/dist/control-plane/types.d.ts +17 -0
- package/packages/backend/dist/core/SrklStorageService.d.ts +33 -0
- package/packages/backend/dist/core/b2DirectCore.d.ts +37 -0
- package/packages/backend/dist/core/cloudflareIntegrationCore.d.ts +21 -0
- package/packages/backend/dist/core/credentialVaultCore.d.ts +43 -0
- package/packages/backend/dist/core/deploymentControlCore.d.ts +37 -0
- package/packages/backend/dist/core/dynamicRouteResolver.d.ts +8 -0
- package/packages/backend/dist/core/index.d.ts +18 -0
- package/packages/backend/dist/core/publicRoutesStore.d.ts +39 -0
- package/packages/backend/dist/core/routesCore.d.ts +79 -0
- package/packages/backend/dist/core/srklCore.d.ts +49 -0
- package/packages/backend/dist/core/unifiedDb.d.ts +12 -0
- package/packages/backend/dist/core/unifiedDb.test.d.ts +1 -0
- package/packages/backend/dist/core/vercelIntegrationCore.d.ts +17 -0
- package/packages/backend/dist/core/vercelTransformer.d.ts +41 -0
- package/packages/backend/dist/core/workspaceBucketSyncCore.d.ts +10 -0
- package/packages/backend/dist/core/workspaceCanonical.d.ts +7 -0
- package/packages/backend/dist/core/workspaceCloneSyncCore.d.ts +40 -0
- package/packages/backend/dist/core/workspaceCore.d.ts +33 -0
- package/packages/backend/dist/core/workspaceCore.test.d.ts +1 -0
- package/packages/backend/dist/core/workspaceDataCore.d.ts +53 -0
- package/packages/backend/dist/core/workspaceFileCore.d.ts +16 -0
- package/packages/backend/dist/core/workspaceStorageDetailsCore.d.ts +91 -0
- package/packages/backend/dist/core/workspaceSyncEngine.d.ts +40 -0
- package/packages/backend/dist/data/BaseDataProvider.d.ts +11 -0
- package/packages/backend/dist/data/FunctionalityTable.d.ts +14 -0
- package/packages/backend/dist/data/index.d.ts +3 -0
- package/packages/backend/dist/data/types.d.ts +18 -0
- package/packages/backend/dist/development/agentHarnessService.d.ts +26 -0
- package/packages/backend/dist/development/agentHarnessService.test.d.ts +1 -0
- package/packages/backend/dist/development/agentHarnessTypes.d.ts +28 -0
- package/packages/backend/dist/development/clientEntry.test.d.ts +1 -0
- package/packages/backend/dist/development/codeDiagnosticsService.d.ts +16 -0
- package/packages/backend/dist/development/codeValidationService.d.ts +20 -0
- package/packages/backend/dist/development/codeValidationService.test.d.ts +1 -0
- package/packages/backend/dist/development/codeValidationTypes.d.ts +21 -0
- package/packages/backend/dist/development/developmentService.d.ts +22 -0
- package/packages/backend/dist/development/developmentService.test.d.ts +1 -0
- package/packages/backend/dist/development/githubActionsService.d.ts +55 -0
- package/packages/backend/dist/development/githubActionsService.test.d.ts +1 -0
- package/packages/backend/dist/development/index.d.ts +13 -346
- package/packages/backend/dist/development/index.js +31 -204
- package/packages/backend/dist/development/playwrightInspectionEntry.test.d.ts +1 -0
- package/packages/backend/dist/development/playwrightInspectionService.d.ts +6 -10
- package/packages/backend/dist/development/playwrightInspectionService.test.d.ts +1 -0
- package/packages/backend/dist/development/playwrightInspectionSupport.d.ts +45 -0
- package/packages/backend/dist/development/playwrightInspectionTypes.d.ts +8 -10
- package/packages/backend/dist/development/types.d.ts +43 -0
- package/packages/backend/dist/development/typescriptLanguageServerService.d.ts +14 -0
- package/packages/backend/dist/development/typescriptLanguageServerService.test.d.ts +1 -0
- package/packages/backend/dist/development/typescriptLanguageServerTypes.d.ts +30 -0
- package/packages/backend/dist/development/webContainerDiagnostics.test.d.ts +1 -0
- package/packages/backend/dist/development/webContainerEntry.test.d.ts +1 -0
- package/packages/backend/dist/development/webContainerRuntime.d.ts +57 -0
- package/packages/backend/dist/development/webContainerRuntime.js +12 -0
- package/packages/backend/dist/development/webContainerService.d.ts +14 -0
- package/packages/backend/dist/development/webContainerService.js +19 -0
- package/packages/backend/dist/development/webContainerService.test.d.ts +1 -0
- package/packages/backend/dist/index.d.ts +27 -1655
- package/packages/backend/dist/index.js +23 -19
- package/packages/backend/dist/krnl-ai-services.d.ts +32 -35
- package/packages/backend/dist/krnl-ai-services.test.d.ts +1 -0
- package/packages/backend/dist/krnl-services.d.ts +65 -61
- package/packages/backend/dist/krnl-services.js +5 -5
- package/packages/backend/dist/luth/LuthDiscoveryService.d.ts +15 -0
- package/packages/backend/dist/luth/index.d.ts +1 -0
- package/packages/backend/dist/resolver/systemDatabaseUrl.d.ts +18 -0
- package/packages/backend/dist/resourceEngine/BaseResourceFetcher.d.ts +34 -0
- package/packages/backend/dist/resourceEngine/CloudflareResourceFetcher.d.ts +10 -0
- package/packages/backend/dist/resourceEngine/ResourceFetcherRegistry.d.ts +27 -0
- package/packages/backend/dist/resourceEngine/VercelResourceFetcher.d.ts +10 -0
- package/packages/backend/dist/resourceEngine/adapters/CloudflareResourceAdapter.d.ts +9 -0
- package/packages/backend/dist/resourceEngine/adapters/VercelResourceAdapter.d.ts +9 -0
- package/packages/backend/dist/resourceEngine/calculator/UniversalResourceCalculator.d.ts +14 -0
- package/packages/backend/dist/resourceEngine/calculator/types.d.ts +37 -0
- package/packages/backend/dist/resourceEngine/index.d.ts +6 -0
- package/packages/backend/dist/resourceEngine/metricHelpers.d.ts +63 -0
- package/packages/backend/dist/resourceEngine/types/depm/base.d.ts +43 -0
- package/packages/backend/dist/resourceEngine/types/depm/entities.d.ts +136 -0
- package/packages/backend/dist/resourceEngine/types/depm/index.d.ts +4 -0
- package/packages/backend/dist/resourceEngine/types/depm/settings.d.ts +53 -0
- package/packages/backend/dist/resourceEngine/types/depm/vercel.d.ts +110 -0
- package/packages/backend/dist/resourceEngine/types.d.ts +99 -0
- package/packages/backend/dist/resourceEngine/weightEngine/helpers.d.ts +17 -0
- package/packages/backend/dist/resourceEngine/weightEngine/index.d.ts +2 -0
- package/packages/backend/dist/resourceEngine/weightEngine/weightEngine.d.ts +16 -0
- package/packages/backend/dist/resourceEngine/weightEngine/weightEngine.test.d.ts +1 -0
- package/packages/backend/dist/resourceEngine/weightEngine.d.ts +1 -0
- package/packages/backend/dist/server/index.d.ts +8 -0
- package/packages/backend/dist/server/sampleGenerator.d.ts +1 -0
- package/packages/backend/dist/server/services/assetPoolService/assetPoolService.d.ts +70 -0
- package/packages/backend/dist/server/services/assetPoolService/helpers.d.ts +5 -0
- package/packages/backend/dist/server/services/assetPoolService/types.d.ts +25 -0
- package/packages/backend/dist/server/services/assetPoolService.d.ts +100 -0
- package/packages/backend/dist/server/services/graphAssetService.d.ts +82 -0
- package/packages/backend/dist/server/services/graphPackageService.d.ts +75 -0
- package/packages/backend/dist/server/services/projectService/helpers.d.ts +1 -0
- package/packages/backend/dist/server/services/projectService/projectService.d.ts +9 -0
- package/packages/backend/dist/server/services/projectService/types.d.ts +11 -0
- package/packages/backend/dist/server/services/projectService.d.ts +18 -0
- package/packages/backend/dist/server/services/sampleService.d.ts +21 -0
- package/packages/backend/dist/server/services/workspaceGraphService.d.ts +26 -0
- package/packages/backend/dist/server/wavHelper.d.ts +1 -0
- package/packages/backend/dist/services/CompositeBackend.d.ts +28 -0
- package/packages/backend/dist/services/EndpointGenerator.d.ts +16 -0
- package/packages/backend/dist/services/ServiceBoundary.d.ts +10 -0
- package/packages/backend/dist/services/ServiceGenerators.d.ts +12 -0
- package/packages/backend/dist/services/index.d.ts +8 -291
- package/packages/backend/dist/services/index.js +3 -3
- package/packages/backend/dist/services/nodeGraphPersistence/helpers.d.ts +17 -0
- package/packages/backend/dist/services/nodeGraphPersistence/index.d.ts +7 -0
- package/packages/backend/dist/services/nodeGraphPersistence/nodeGraphPersistence.d.ts +40 -0
- package/packages/backend/dist/services/nodeGraphPersistence/types.d.ts +107 -0
- package/packages/backend/dist/services/workspaceGraphService.d.ts +62 -0
- package/packages/backend/dist/srkl/SrklClient.d.ts +38 -0
- package/packages/backend/dist/srkl/SrklCredentialRegistry.d.ts +21 -0
- package/packages/backend/dist/srkl/SrklCryptoClient.d.ts +5 -0
- package/packages/backend/dist/srkl/SrklDiscoveryService.d.ts +33 -0
- package/packages/backend/dist/srkl/SrklVaultAccessClient.d.ts +26 -0
- package/packages/backend/dist/srkl/index.d.ts +15 -343
- package/packages/backend/dist/srkl/srkl.d.ts +139 -0
- package/packages/backend/dist/srkl/srklSyncBridge.d.ts +6 -0
- package/packages/backend/dist/srkl/types.d.ts +136 -0
- package/packages/backend/dist/srkl/useSrklServices.d.ts +27 -0
- package/packages/backend/dist/storage/B2DirectClient.d.ts +16 -0
- package/packages/backend/dist/storage/BackblazeB2Adapter.d.ts +19 -0
- package/packages/backend/dist/storage/BaseStorageAdapter.d.ts +19 -0
- package/packages/backend/dist/storage/BucketStorageService.d.ts +5 -0
- package/packages/backend/dist/storage/GoogleDriveAdapter.d.ts +19 -0
- package/packages/backend/dist/storage/GoogleDriveOAuth.d.ts +16 -0
- package/packages/backend/dist/storage/GoogleDriveStorageService.d.ts +5 -0
- package/packages/backend/dist/storage/LocalFSAdapter.d.ts +22 -0
- package/packages/backend/dist/storage/S3Adapter.d.ts +19 -0
- package/packages/backend/dist/storage/StorageAdapterFactory.d.ts +5 -0
- package/packages/backend/dist/storage/SupabaseStorageAdapter.d.ts +15 -0
- package/packages/backend/dist/storage/b2Endpoint.d.ts +12 -0
- package/packages/backend/dist/storage/index.d.ts +14 -156
- package/packages/backend/dist/storage/index.js +14 -8
- package/packages/backend/dist/storage/s3Purge.d.ts +13 -0
- package/packages/backend/dist/storage/storageProviders.test.d.ts +1 -0
- package/packages/backend/dist/storage/types.d.ts +51 -0
- package/packages/backend/dist/workspace/RemoteWorkspaceService.d.ts +30 -0
- package/packages/backend/dist/workspace/SyncEngine.d.ts +11 -0
- package/packages/backend/dist/workspace/WorkingWorkspaceService.d.ts +35 -0
- package/packages/backend/dist/workspace/WorkspaceCanonical.d.ts +2 -0
- package/packages/backend/dist/workspace/WorkspaceCloneSyncEngine.d.ts +26 -0
- package/packages/backend/dist/workspace/WorkspaceFS.d.ts +21 -0
- package/packages/backend/dist/workspace/WorkspaceService.d.ts +52 -0
- package/packages/backend/dist/workspace/index.d.ts +8 -223
- package/packages/backend/dist/workspace/index.js +2 -2
- package/packages/backend/dist/workspace/types.d.ts +51 -0
- package/packages/backend/kloks.manifest.json +1 -1
- package/packages/backend/package.json +7 -10
- package/packages/functions/dist/bowser-F6LIZBYW.js +2821 -0
- package/packages/functions/dist/chunk-34KJBG4F.js +357 -0
- package/packages/functions/dist/{chunk-QGM4M3NI.js → chunk-EAQYK3U2.js} +4 -0
- package/packages/functions/dist/chunk-IOAPEUC7.js +3424 -0
- package/packages/functions/dist/chunk-J64ZDIIX.js +2753 -0
- package/packages/functions/dist/chunk-K6H7T3EP.js +1991 -0
- package/packages/functions/dist/chunk-N3MSTUJN.js +4785 -0
- package/packages/functions/dist/chunk-VP26OHBN.js +480 -0
- package/packages/functions/dist/chunk-VRLVLNLG.js +1727 -0
- package/packages/functions/dist/dist-TKZ5TDRN.js +1124 -0
- package/packages/{services/dist/dist-XMSSRYDR.js → functions/dist/dist-W7ZJS3LZ.js} +1 -1
- package/packages/functions/dist/dist-es-3DGJJFOU.js +338 -0
- package/packages/functions/dist/dist-es-5IACWOIO.js +69 -0
- package/packages/functions/dist/dist-es-BWLDIBIA.js +47 -0
- package/packages/functions/dist/dist-es-DO3F4OBN.js +377 -0
- package/packages/functions/dist/dist-es-NN7AKU7P.js +175 -0
- package/packages/functions/dist/dist-es-QZ6GKMM7.js +220 -0
- package/packages/functions/dist/dist-es-R3VEGXOP.js +87 -0
- package/packages/functions/dist/dist-es-TLPJYZTE.js +294 -0
- package/packages/functions/dist/event-streams-DRE6QVD6.js +940 -0
- package/packages/functions/dist/index.js +17 -17
- package/packages/functions/dist/loadSso-M3ZIZDGO.js +586 -0
- package/packages/functions/dist/multipart-parser-YYFFJ4QD.js +371 -0
- package/packages/functions/dist/signin-YXALFRYB.js +831 -0
- package/packages/functions/dist/src-2QCYQXYH.js +1396 -0
- package/packages/functions/dist/sso-oidc-NXFKRL6O.js +847 -0
- package/packages/functions/dist/sts-MICPT37B.js +1253 -0
- package/packages/functions/dist/{transformers.node-HWHOAE4H.js → transformers.node-R6VHTGC2.js} +1 -1
- package/packages/services/dist/bowser-F6LIZBYW.js +2821 -0
- package/packages/services/dist/chunk-34KJBG4F.js +357 -0
- package/packages/{state-graph/dist/chunk-QGM4M3NI.js → services/dist/chunk-EAQYK3U2.js} +4 -0
- package/packages/services/dist/chunk-IOAPEUC7.js +3424 -0
- package/packages/services/dist/chunk-J64ZDIIX.js +2753 -0
- package/packages/services/dist/chunk-K6H7T3EP.js +1991 -0
- package/packages/services/dist/chunk-N3MSTUJN.js +4785 -0
- package/packages/services/dist/chunk-VP26OHBN.js +480 -0
- package/packages/services/dist/chunk-VRLVLNLG.js +1727 -0
- package/packages/services/dist/dist-TKZ5TDRN.js +1124 -0
- package/packages/{state-graph/dist/dist-XMSSRYDR.js → services/dist/dist-W7ZJS3LZ.js} +1 -1
- package/packages/services/dist/dist-es-3DGJJFOU.js +338 -0
- package/packages/services/dist/dist-es-5IACWOIO.js +69 -0
- package/packages/services/dist/dist-es-BWLDIBIA.js +47 -0
- package/packages/services/dist/dist-es-DO3F4OBN.js +377 -0
- package/packages/services/dist/dist-es-NN7AKU7P.js +175 -0
- package/packages/services/dist/dist-es-QZ6GKMM7.js +220 -0
- package/packages/services/dist/dist-es-R3VEGXOP.js +87 -0
- package/packages/services/dist/dist-es-TLPJYZTE.js +294 -0
- package/packages/services/dist/event-streams-DRE6QVD6.js +940 -0
- package/packages/services/dist/index.d.ts +70 -1
- package/packages/services/dist/index.js +131 -17
- package/packages/services/dist/loadSso-M3ZIZDGO.js +586 -0
- package/packages/services/dist/multipart-parser-YYFFJ4QD.js +371 -0
- package/packages/services/dist/signin-YXALFRYB.js +831 -0
- package/packages/services/dist/src-2QCYQXYH.js +1396 -0
- package/packages/services/dist/sso-oidc-NXFKRL6O.js +847 -0
- package/packages/services/dist/sts-MICPT37B.js +1253 -0
- package/packages/services/dist/{transformers.node-HWHOAE4H.js → transformers.node-R6VHTGC2.js} +1 -1
- package/packages/services/kloks.manifest.json +28 -0
- package/packages/state-graph/dist/BoxSelection.d.ts +2 -0
- package/packages/state-graph/dist/Viewport.d.ts +39 -0
- package/packages/state-graph/dist/bowser-F6LIZBYW.js +2821 -0
- package/packages/state-graph/dist/chunk-34KJBG4F.js +357 -0
- package/packages/{services/dist/chunk-QGM4M3NI.js → state-graph/dist/chunk-EAQYK3U2.js} +4 -0
- package/packages/state-graph/dist/chunk-IOAPEUC7.js +3424 -0
- package/packages/state-graph/dist/chunk-J64ZDIIX.js +2753 -0
- package/packages/state-graph/dist/chunk-K6H7T3EP.js +1991 -0
- package/packages/state-graph/dist/chunk-N3MSTUJN.js +4785 -0
- package/packages/state-graph/dist/chunk-VP26OHBN.js +480 -0
- package/packages/state-graph/dist/chunk-VRLVLNLG.js +1727 -0
- package/packages/state-graph/dist/dist-TKZ5TDRN.js +1124 -0
- package/packages/{functions/dist/dist-XMSSRYDR.js → state-graph/dist/dist-W7ZJS3LZ.js} +1 -1
- package/packages/state-graph/dist/dist-es-3DGJJFOU.js +338 -0
- package/packages/state-graph/dist/dist-es-5IACWOIO.js +69 -0
- package/packages/state-graph/dist/dist-es-BWLDIBIA.js +47 -0
- package/packages/state-graph/dist/dist-es-DO3F4OBN.js +377 -0
- package/packages/state-graph/dist/dist-es-NN7AKU7P.js +175 -0
- package/packages/state-graph/dist/dist-es-OECEAUXH.js +220 -0
- package/packages/state-graph/dist/dist-es-R3VEGXOP.js +87 -0
- package/packages/state-graph/dist/dist-es-TLPJYZTE.js +294 -0
- package/packages/state-graph/dist/{BaseConnection-CMRrL6Fe.d.ts → domain/BaseConnection.d.ts} +6 -8
- package/packages/state-graph/dist/domain/BaseGraph.d.ts +66 -0
- package/packages/state-graph/dist/domain/BaseHandle.d.ts +63 -0
- package/packages/state-graph/dist/domain/BaseNode.d.ts +64 -0
- package/packages/state-graph/dist/domain/BaseViewWindow.d.ts +30 -0
- package/packages/state-graph/dist/domain/GroupNode.d.ts +29 -0
- package/packages/state-graph/dist/domain/SubgraphNode.d.ts +84 -0
- package/packages/state-graph/dist/domain/index.d.ts +7 -117
- package/packages/state-graph/dist/domain/index.js +1 -1
- package/packages/state-graph/dist/domain/primitives/PrimitiveNodeDefs.d.ts +2 -0
- package/packages/state-graph/dist/domain/primitives/index.d.ts +1 -0
- package/packages/state-graph/dist/domain/types.d.ts +1 -0
- package/packages/state-graph/dist/engine/AudioConcepts.d.ts +23 -0
- package/packages/state-graph/dist/engine/BufferConcepts.d.ts +29 -0
- package/packages/state-graph/dist/engine/GraphConcepts.d.ts +24 -0
- package/packages/state-graph/dist/engine/UIConcepts.d.ts +24 -0
- package/packages/state-graph/dist/engine/core/archetypes/audioArchetypes.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/archetypes/effectArchetypes.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/archetypes/primitiveArchetypes.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/archetypes/routingArchetypes.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/archetypes/triggerModuleArchetypes.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/archetypes/types.d.ts +65 -0
- package/packages/state-graph/dist/engine/core/assets/containerSprites.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/assets/effectSprites.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/assets/primitiveSprites.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/assets/routingSprites.d.ts +2 -0
- package/packages/state-graph/dist/engine/core/assets/types.d.ts +33 -0
- package/packages/state-graph/dist/engine/core/async.d.ts +36 -0
- package/packages/state-graph/dist/engine/core/base.d.ts +31 -0
- package/packages/state-graph/dist/engine/core/cache.d.ts +36 -0
- package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalAudioInputEndpoint.d.ts +28 -0
- package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalMidiInputEndpoint.d.ts +24 -0
- package/packages/state-graph/dist/engine/core/canonicalIo/topLevelIoRegistry.d.ts +29 -0
- package/packages/state-graph/dist/engine/core/canonicalIo/types.d.ts +50 -0
- package/packages/state-graph/dist/engine/core/controlDispatcher.d.ts +31 -0
- package/packages/state-graph/dist/engine/core/env.d.ts +29 -0
- package/packages/state-graph/dist/engine/core/events.d.ts +32 -0
- package/packages/state-graph/dist/engine/core/exposedSocketsManager.d.ts +14 -0
- package/packages/state-graph/dist/engine/core/fs-lock.d.ts +9 -0
- package/packages/state-graph/dist/engine/core/fs.d.ts +35 -0
- package/packages/state-graph/dist/engine/core/graphDataService.d.ts +60 -0
- package/packages/state-graph/dist/engine/core/graphDependencyValidator.d.ts +34 -0
- package/packages/state-graph/dist/engine/core/graphTypeSystem.d.ts +21 -0
- package/packages/state-graph/dist/engine/core/hierarchy/core/GraphEntityParent.d.ts +49 -0
- package/packages/state-graph/dist/engine/core/hierarchy/index.d.ts +11 -0
- package/packages/state-graph/dist/engine/core/hierarchy/magnetic/magneticGraphBridge.d.ts +13 -0
- package/packages/state-graph/dist/engine/core/hierarchy/magnetic/magneticGraphManager.d.ts +32 -0
- package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeParent.d.ts +68 -0
- package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeTypes.d.ts +90 -0
- package/packages/state-graph/dist/engine/core/hierarchy/nodes/nodeGeometry.d.ts +27 -0
- package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketParent.d.ts +40 -0
- package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketTypes.d.ts +65 -0
- package/packages/state-graph/dist/engine/core/hierarchy/ui/UIElementBase.d.ts +41 -0
- package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireParent.d.ts +74 -0
- package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireTypes.d.ts +65 -0
- package/packages/state-graph/dist/engine/core/http.d.ts +36 -0
- package/packages/state-graph/dist/engine/core/index.d.ts +16 -0
- package/packages/state-graph/dist/engine/core/l2_drivers/audioBusDriver.d.ts +16 -0
- package/packages/state-graph/dist/engine/core/l2_drivers/audioDeviceDriver.d.ts +15 -0
- package/packages/state-graph/dist/engine/core/l2_drivers/audioStreamDriver.d.ts +6 -0
- package/packages/state-graph/dist/engine/core/nodeArchetypeRegistry.d.ts +6 -0
- package/packages/state-graph/dist/engine/core/nodeAssetRegistry.d.ts +54 -0
- package/packages/state-graph/dist/engine/core/nodeSocketRegistry.d.ts +36 -0
- package/packages/state-graph/dist/engine/core/object.d.ts +32 -0
- package/packages/state-graph/dist/engine/core/shell.d.ts +37 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/containersSockets.d.ts +3 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/createPackagedSocket.d.ts +19 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/customRegistry.d.ts +6 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/landmarksSockets.d.ts +3 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/primitivesSockets.d.ts +3 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/processorsSockets.d.ts +3 -0
- package/packages/state-graph/dist/engine/core/socketRegistry/types.d.ts +7 -0
- package/packages/state-graph/dist/engine/core/sockets/arrangementControlSockets.d.ts +4 -0
- package/packages/state-graph/dist/engine/core/sockets/audioSockets.d.ts +5 -0
- package/packages/state-graph/dist/engine/core/sockets/folderButtonSockets.d.ts +4 -0
- package/packages/state-graph/dist/engine/core/sockets/moduleSockets.d.ts +3 -0
- package/packages/state-graph/dist/engine/core/sockets/playbackSockets.d.ts +4 -0
- package/packages/state-graph/dist/engine/core/sockets/primitiveSockets.d.ts +7 -0
- package/packages/state-graph/dist/engine/core/sockets/routingSockets.d.ts +5 -0
- package/packages/state-graph/dist/engine/core/sockets/samplerSockets.d.ts +4 -0
- package/packages/state-graph/dist/engine/core/sockets/socketUtils.d.ts +25 -0
- package/packages/state-graph/dist/engine/core/sockets/stripSockets.d.ts +4 -0
- package/packages/state-graph/dist/engine/core/string.d.ts +14 -0
- package/packages/state-graph/dist/engine/core/subgraphIoTransform.d.ts +43 -0
- package/packages/state-graph/dist/engine/core/types.d.ts +31 -0
- package/packages/state-graph/dist/engine/core/workspaceGraphRegistry.d.ts +32 -0
- package/packages/state-graph/dist/engine/functions/arrangementFactory.d.ts +5 -0
- package/packages/state-graph/dist/engine/functions/canonicalSignalTable.d.ts +35 -0
- package/packages/state-graph/dist/engine/functions/clientWavEncoder.d.ts +8 -0
- package/packages/state-graph/dist/engine/functions/codeLinter.d.ts +23 -0
- package/packages/state-graph/dist/engine/functions/codeNodeParser/codeNodeParser.d.ts +38 -0
- package/packages/state-graph/dist/engine/functions/codeNodeParser/helpers.d.ts +18 -0
- package/packages/state-graph/dist/engine/functions/codeNodeParser/types.d.ts +26 -0
- package/packages/state-graph/dist/engine/functions/codeNodeParser.d.ts +75 -0
- package/packages/state-graph/dist/engine/functions/componentSocketRegistry.d.ts +13 -0
- package/packages/state-graph/dist/engine/functions/connection/portMatching.d.ts +7 -0
- package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/helpers.d.ts +4 -0
- package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/signalCompatibility.d.ts +3 -0
- package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/types.d.ts +6 -0
- package/packages/state-graph/dist/engine/functions/connection/signalCompatibility.d.ts +7 -0
- package/packages/state-graph/dist/engine/functions/connection/wireValidation.d.ts +11 -0
- package/packages/state-graph/dist/engine/functions/containerClipSync.d.ts +7 -0
- package/packages/state-graph/dist/engine/functions/containerFactory/containerFactory.d.ts +10 -0
- package/packages/state-graph/dist/engine/functions/containerFactory/helpers.d.ts +6 -0
- package/packages/state-graph/dist/engine/functions/containerFactory/types.d.ts +1 -0
- package/packages/state-graph/dist/engine/functions/containerFactory.d.ts +24 -0
- package/packages/state-graph/dist/engine/functions/effectLogic.d.ts +19 -0
- package/packages/state-graph/dist/engine/functions/graphManager/graphManager.d.ts +31 -0
- package/packages/state-graph/dist/engine/functions/graphManager/helpers.d.ts +12 -0
- package/packages/state-graph/dist/engine/functions/graphManager/types.d.ts +25 -0
- package/packages/state-graph/dist/engine/functions/graphManager.d.ts +74 -0
- package/packages/state-graph/dist/engine/functions/midiDeviceRegistry.d.ts +23 -0
- package/packages/state-graph/dist/engine/functions/musicTheory.d.ts +5 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/controlNodes.d.ts +2 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/effectNodes.d.ts +2 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/moduleNodes.d.ts +17 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/nodeFactory.d.ts +8 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/primitiveNodes.d.ts +7 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/routingNodes.d.ts +4 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory/triggerNodes.d.ts +3 -0
- package/packages/state-graph/dist/engine/functions/nodeFactory.d.ts +90 -0
- package/packages/state-graph/dist/engine/functions/nodePerformanceTracker.d.ts +21 -0
- package/packages/state-graph/dist/engine/functions/quantizeLogic.d.ts +5 -0
- package/packages/state-graph/dist/engine/functions/rotaryGeometry.d.ts +6 -0
- package/packages/state-graph/dist/engine/functions/sampleContainerExtractor.d.ts +19 -0
- package/packages/state-graph/dist/engine/functions/signalTable/audioMidiSignals.d.ts +3 -0
- package/packages/state-graph/dist/engine/functions/signalTable/canonicalEffectsTable.d.ts +2 -0
- package/packages/state-graph/dist/engine/functions/signalTable/dataSignals.d.ts +3 -0
- package/packages/state-graph/dist/engine/functions/signalTable/types.d.ts +20 -0
- package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/helpers.d.ts +3 -0
- package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/socketCompatibilitySpawner.d.ts +13 -0
- package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/types.d.ts +23 -0
- package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner.d.ts +40 -0
- package/packages/state-graph/dist/engine/functions/spawnNodeFactory.d.ts +2 -0
- package/packages/state-graph/dist/engine/functions/spawningMechanism.d.ts +42 -0
- package/packages/state-graph/dist/engine/functions/triggerLogic.d.ts +15 -0
- package/packages/state-graph/dist/engine/functions/universalConnectionEngine.d.ts +3 -0
- package/packages/state-graph/dist/engine/index.d.ts +49 -0
- package/packages/state-graph/dist/engine/predictive/index.d.ts +3 -0
- package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine/helpers.d.ts +1 -0
- package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine/predictiveGraphEngine.d.ts +6 -0
- package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine.d.ts +2 -0
- package/packages/state-graph/dist/engine/predictive/solidifyExecution.d.ts +13 -0
- package/packages/state-graph/dist/engine/predictive/types.d.ts +41 -0
- package/packages/state-graph/dist/engine/types/audio.d.ts +114 -0
- package/packages/state-graph/dist/engine/types/auth.d.ts +75 -0
- package/packages/state-graph/dist/engine/types/effects.d.ts +100 -0
- package/packages/state-graph/dist/engine/types/hardwareBus.d.ts +72 -0
- package/packages/state-graph/dist/engine/types/index.d.ts +4 -0
- package/packages/state-graph/dist/engine/types/legacyTypes.d.ts +1216 -0
- package/packages/state-graph/dist/engine/types/nodesArrangement.d.ts +62 -0
- package/packages/state-graph/dist/engine/types/nodesAudio.d.ts +85 -0
- package/packages/state-graph/dist/engine/types/nodesControl.d.ts +119 -0
- package/packages/state-graph/dist/engine/types/nodesPlayback.d.ts +110 -0
- package/packages/state-graph/dist/engine/types/nodesPrimitives.d.ts +121 -0
- package/packages/state-graph/dist/engine/types/nodesRouting.d.ts +71 -0
- package/packages/state-graph/dist/engine/types/sceneData.d.ts +58 -0
- package/packages/state-graph/dist/engine/types/sceneState.d.ts +84 -0
- package/packages/state-graph/dist/engine/types/signals.d.ts +112 -0
- package/packages/state-graph/dist/engine/types/storage.d.ts +93 -0
- package/packages/state-graph/dist/engine/types/stripsTypes.d.ts +12 -0
- package/packages/state-graph/dist/event-streams-DRE6QVD6.js +940 -0
- package/packages/state-graph/dist/index.d.ts +34 -3308
- package/packages/state-graph/dist/index.js +26 -26
- package/packages/state-graph/dist/loadSso-M3ZIZDGO.js +586 -0
- package/packages/state-graph/dist/management/GroupSettingsResolver.d.ts +5 -0
- package/packages/state-graph/dist/management/LandmarkManager.d.ts +15 -0
- package/packages/state-graph/dist/management/ViewEngine.d.ts +24 -0
- package/packages/state-graph/dist/management/ViewWindowManager.d.ts +27 -0
- package/packages/state-graph/dist/management/index.d.ts +4 -0
- package/packages/state-graph/dist/multipart-parser-YYFFJ4QD.js +371 -0
- package/packages/state-graph/dist/{CompatibilityMatrix-TiEJ3j3_.d.ts → rules/CompatibilityMatrix.d.ts} +5 -8
- package/packages/state-graph/dist/rules/ConnectionRuleStore.d.ts +52 -0
- package/packages/state-graph/dist/rules/DefaultRules.d.ts +1 -0
- package/packages/state-graph/dist/rules/HandleTypeRegistry.d.ts +14 -0
- package/packages/state-graph/dist/rules/WireTypeRegistry.d.ts +15 -0
- package/packages/state-graph/dist/rules/index.d.ts +5 -86
- package/packages/state-graph/dist/rules/index.js +1 -1
- package/packages/state-graph/dist/signin-YXALFRYB.js +831 -0
- package/packages/state-graph/dist/spatial/AttractionEngine.d.ts +5 -0
- package/packages/state-graph/dist/spatial/AutoSolidify.d.ts +6 -0
- package/packages/state-graph/dist/spatial/SpatialEngine.d.ts +7 -0
- package/packages/state-graph/dist/spatial/TraceEngine.d.ts +15 -0
- package/packages/state-graph/dist/spatial/index.d.ts +8 -103
- package/packages/state-graph/dist/spatial/index.js +1 -1
- package/packages/state-graph/dist/spatial/magneticTypes.d.ts +15 -0
- package/packages/state-graph/dist/spatial/prediction/GhostInferenceEngine.d.ts +8 -0
- package/packages/state-graph/dist/spatial/prediction/GhostLayoutResolver.d.ts +8 -0
- package/packages/state-graph/dist/spatial/prediction/GhostTracePathBuilder.d.ts +8 -0
- package/packages/state-graph/dist/spatial/prediction/index.d.ts +4 -0
- package/packages/state-graph/dist/spatial/prediction/types.d.ts +52 -0
- package/packages/state-graph/dist/spatial/socketCoordinates.d.ts +32 -0
- package/packages/state-graph/dist/spatial/useMagneticTraces.d.ts +14 -0
- package/packages/state-graph/dist/src-2QCYQXYH.js +1396 -0
- package/packages/state-graph/dist/sso-oidc-NXFKRL6O.js +847 -0
- package/packages/state-graph/dist/state/LifecycleGraph.d.ts +19 -0
- package/packages/state-graph/dist/state/SkipoState.d.ts +32 -0
- package/packages/state-graph/dist/state/hooks.d.ts +9 -0
- package/packages/state-graph/dist/state/index.d.ts +6 -107
- package/packages/state-graph/dist/state/index.js +1 -1
- package/packages/state-graph/dist/state/types.d.ts +44 -0
- package/packages/state-graph/dist/store/CommandApi.d.ts +54 -0
- package/packages/state-graph/dist/store/GhostStore.d.ts +21 -0
- package/packages/state-graph/dist/store/GraphStore.d.ts +25 -0
- package/packages/state-graph/dist/store/index.d.ts +3 -159
- package/packages/state-graph/dist/store/index.js +1 -1
- package/packages/state-graph/dist/sts-MICPT37B.js +1253 -0
- package/packages/state-graph/dist/{transformers.node-HWHOAE4H.js → transformers.node-R6VHTGC2.js} +1 -1
- package/packages/state-graph/dist/types.d.ts +80 -0
- package/packages/state-graph/package.json +1 -1
- package/.krusbl-release-attestation.json +0 -8
- package/packages/backend/dist/BaseStorageAdapter-EUCSvJse.d.ts +0 -73
- package/packages/backend/dist/WebSocketTransport-CHmkJ0tj.d.ts +0 -362
- package/packages/backend/dist/chunk-KKRWZDMN.js +0 -237
- package/packages/backend/dist/chunk-RBQ4CW3T.js +0 -136
- package/packages/state-graph/dist/BaseGraph-Bd5F1NMP.d.ts +0 -98
- package/packages/state-graph/dist/BaseNode-DKpGXMy8.d.ts +0 -129
- package/packages/state-graph/dist/types-D5kQSa65.d.ts +0 -150
|
@@ -0,0 +1,1991 @@
|
|
|
1
|
+
import {
|
|
2
|
+
decorateServiceException,
|
|
3
|
+
doesIdentityRequireRefresh,
|
|
4
|
+
getValueFromTextNode,
|
|
5
|
+
isIdentityExpired,
|
|
6
|
+
memoizeIdentityProvider,
|
|
7
|
+
normalizeProvider as normalizeProvider2,
|
|
8
|
+
setCredentialFeature
|
|
9
|
+
} from "./chunk-IOAPEUC7.js";
|
|
10
|
+
import {
|
|
11
|
+
FromStringShapeDeserializer,
|
|
12
|
+
HttpBindingProtocol,
|
|
13
|
+
HttpInterceptingShapeDeserializer,
|
|
14
|
+
HttpInterceptingShapeSerializer,
|
|
15
|
+
JsonCodec2,
|
|
16
|
+
ProviderError,
|
|
17
|
+
RpcProtocol,
|
|
18
|
+
SelectorType,
|
|
19
|
+
booleanSelector,
|
|
20
|
+
collectBody,
|
|
21
|
+
determineTimestampFormat,
|
|
22
|
+
escapeUri,
|
|
23
|
+
extendedEncodeURIComponent,
|
|
24
|
+
loadConfig,
|
|
25
|
+
loadRestJsonErrorCode
|
|
26
|
+
} from "./chunk-J64ZDIIX.js";
|
|
27
|
+
import {
|
|
28
|
+
HttpRequest,
|
|
29
|
+
HttpResponse,
|
|
30
|
+
NormalizedSchema,
|
|
31
|
+
NumericValue,
|
|
32
|
+
TypeRegistry,
|
|
33
|
+
dateToUtcString,
|
|
34
|
+
deref,
|
|
35
|
+
fromHex,
|
|
36
|
+
fromUtf8,
|
|
37
|
+
generateIdempotencyToken,
|
|
38
|
+
hasOwn,
|
|
39
|
+
isArrayBuffer,
|
|
40
|
+
normalizeProvider,
|
|
41
|
+
toBase64,
|
|
42
|
+
toHex,
|
|
43
|
+
toUint8Array,
|
|
44
|
+
toUtf8,
|
|
45
|
+
writeKey
|
|
46
|
+
} from "./chunk-VRLVLNLG.js";
|
|
47
|
+
|
|
48
|
+
// ../../node_modules/.pnpm/@smithy+types@4.19.0/node_modules/@smithy/types/dist-es/middleware.js
|
|
49
|
+
var SMITHY_CONTEXT_KEY = "__smithy_context";
|
|
50
|
+
|
|
51
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js
|
|
52
|
+
var getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
|
|
53
|
+
var getAgeHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.age ?? response.headers?.Age : void 0;
|
|
54
|
+
|
|
55
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js
|
|
56
|
+
var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
|
|
57
|
+
|
|
58
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js
|
|
59
|
+
var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset, timeRequestSent, ageHeader) => {
|
|
60
|
+
if (ageHeader !== void 0) {
|
|
61
|
+
return currentSystemClockOffset;
|
|
62
|
+
}
|
|
63
|
+
const serverTime = Date.parse(clockTime);
|
|
64
|
+
const timeResponseReceived = Date.now();
|
|
65
|
+
if (timeRequestSent !== void 0 && timeResponseReceived - timeRequestSent > 9e5) {
|
|
66
|
+
return currentSystemClockOffset;
|
|
67
|
+
}
|
|
68
|
+
return serverTime - timeResponseReceived;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js
|
|
72
|
+
var throwSigningPropertyError = (name, property) => {
|
|
73
|
+
if (!property) {
|
|
74
|
+
throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
|
|
75
|
+
}
|
|
76
|
+
return property;
|
|
77
|
+
};
|
|
78
|
+
var hasEventStreamOutput = (signingProperties) => {
|
|
79
|
+
const context = signingProperties.context;
|
|
80
|
+
const eventStream = context?.[SMITHY_CONTEXT_KEY]?.eventStream;
|
|
81
|
+
return eventStream?.output === true;
|
|
82
|
+
};
|
|
83
|
+
var validateSigningProperties = async (signingProperties) => {
|
|
84
|
+
const context = throwSigningPropertyError("context", signingProperties.context);
|
|
85
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
86
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
|
87
|
+
const signerFunction = throwSigningPropertyError("signer", config.signer);
|
|
88
|
+
const signer = await signerFunction(authScheme);
|
|
89
|
+
const signingRegion = signingProperties?.signingRegion;
|
|
90
|
+
const signingRegionSet = signingProperties?.signingRegionSet;
|
|
91
|
+
const signingName = signingProperties?.signingName;
|
|
92
|
+
return {
|
|
93
|
+
config,
|
|
94
|
+
signer,
|
|
95
|
+
signingRegion,
|
|
96
|
+
signingRegionSet,
|
|
97
|
+
signingName
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
var AwsSdkSigV4Signer = class {
|
|
101
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
102
|
+
if (!HttpRequest.isInstance(httpRequest)) {
|
|
103
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
104
|
+
}
|
|
105
|
+
const validatedProps = await validateSigningProperties(signingProperties);
|
|
106
|
+
const { config, signer } = validatedProps;
|
|
107
|
+
let { signingRegion, signingName } = validatedProps;
|
|
108
|
+
const handlerExecutionContext = signingProperties.context;
|
|
109
|
+
if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
|
|
110
|
+
const [first, second] = handlerExecutionContext.authSchemes;
|
|
111
|
+
if (first?.name === "sigv4a" && second?.name === "sigv4") {
|
|
112
|
+
signingRegion = second?.signingRegion ?? signingRegion;
|
|
113
|
+
signingName = second?.signingName ?? signingName;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const noSkewCorrection = await config.disableClockSkewCorrection?.() === true;
|
|
117
|
+
signingProperties._disableClockSkewCorrection = noSkewCorrection;
|
|
118
|
+
const skipSkewSampling = noSkewCorrection || hasEventStreamOutput(signingProperties);
|
|
119
|
+
signingProperties._skipClockSkewSampling = skipSkewSampling;
|
|
120
|
+
if (!skipSkewSampling) {
|
|
121
|
+
signingProperties._preRequestSystemClockOffset = config.systemClockOffset;
|
|
122
|
+
signingProperties._requestSentAt = Date.now();
|
|
123
|
+
}
|
|
124
|
+
const signedRequest = await signer.sign(httpRequest, {
|
|
125
|
+
signingDate: noSkewCorrection ? /* @__PURE__ */ new Date() : getSkewCorrectedDate(config.systemClockOffset),
|
|
126
|
+
signingRegion,
|
|
127
|
+
signingService: signingName
|
|
128
|
+
});
|
|
129
|
+
return signedRequest;
|
|
130
|
+
}
|
|
131
|
+
errorHandler(signingProperties) {
|
|
132
|
+
return (error) => {
|
|
133
|
+
const errorException = error;
|
|
134
|
+
if (!signingProperties._skipClockSkewSampling && !signingProperties._disableClockSkewCorrection) {
|
|
135
|
+
const serverTime = errorException.ServerTime ?? getDateHeader(errorException.$response);
|
|
136
|
+
if (serverTime) {
|
|
137
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
138
|
+
const preRequestOffset = signingProperties._preRequestSystemClockOffset;
|
|
139
|
+
const timeRequestSent = signingProperties._requestSentAt;
|
|
140
|
+
const ageHeader = getAgeHeader(errorException.$response);
|
|
141
|
+
const newOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset, timeRequestSent, ageHeader);
|
|
142
|
+
config.systemClockOffset = newOffset;
|
|
143
|
+
const skewExceedsThreshold = Math.abs(newOffset) >= 24e4;
|
|
144
|
+
const isLocalCorrection = newOffset !== preRequestOffset;
|
|
145
|
+
const isConcurrentCorrection = preRequestOffset !== void 0 && preRequestOffset !== newOffset;
|
|
146
|
+
if (skewExceedsThreshold && (isLocalCorrection || isConcurrentCorrection) && errorException.$metadata) {
|
|
147
|
+
errorException.$metadata.clockSkewCorrected = true;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
throw error;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
successHandler(httpResponse, signingProperties) {
|
|
155
|
+
if (signingProperties._skipClockSkewSampling || signingProperties._disableClockSkewCorrection) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const dateHeader = getDateHeader(httpResponse);
|
|
159
|
+
if (dateHeader) {
|
|
160
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
161
|
+
const timeRequestSent = signingProperties._requestSentAt;
|
|
162
|
+
const ageHeader = getAgeHeader(httpResponse);
|
|
163
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset, timeRequestSent, ageHeader);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js
|
|
169
|
+
var AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {
|
|
170
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
171
|
+
if (!HttpRequest.isInstance(httpRequest)) {
|
|
172
|
+
throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
173
|
+
}
|
|
174
|
+
const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
|
|
175
|
+
const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
|
|
176
|
+
const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(",");
|
|
177
|
+
const noSkewCorrection = await config.disableClockSkewCorrection?.() === true;
|
|
178
|
+
signingProperties._disableClockSkewCorrection = noSkewCorrection;
|
|
179
|
+
if (!noSkewCorrection) {
|
|
180
|
+
signingProperties._preRequestSystemClockOffset = config.systemClockOffset;
|
|
181
|
+
signingProperties._requestSentAt = Date.now();
|
|
182
|
+
}
|
|
183
|
+
const signedRequest = await signer.sign(httpRequest, {
|
|
184
|
+
signingDate: noSkewCorrection ? /* @__PURE__ */ new Date() : getSkewCorrectedDate(config.systemClockOffset),
|
|
185
|
+
signingRegion: multiRegionOverride,
|
|
186
|
+
signingService: signingName
|
|
187
|
+
});
|
|
188
|
+
return signedRequest;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js
|
|
193
|
+
var getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
|
|
194
|
+
|
|
195
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js
|
|
196
|
+
var getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
|
|
197
|
+
|
|
198
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js
|
|
199
|
+
var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
|
|
200
|
+
var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
|
|
201
|
+
var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
|
|
202
|
+
environmentVariableSelector: (env, options) => {
|
|
203
|
+
if (options?.signingName) {
|
|
204
|
+
const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
|
|
205
|
+
if (bearerTokenKey in env) {
|
|
206
|
+
return ["httpBearerAuth"];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) {
|
|
210
|
+
return void 0;
|
|
211
|
+
}
|
|
212
|
+
return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
|
|
213
|
+
},
|
|
214
|
+
configFileSelector: (profile) => {
|
|
215
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) {
|
|
216
|
+
return void 0;
|
|
217
|
+
}
|
|
218
|
+
return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
|
|
219
|
+
},
|
|
220
|
+
default: []
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.js
|
|
224
|
+
var resolveAwsSdkSigV4AConfig = (config) => {
|
|
225
|
+
config.sigv4aSigningRegionSet = normalizeProvider2(config.sigv4aSigningRegionSet);
|
|
226
|
+
return config;
|
|
227
|
+
};
|
|
228
|
+
var NODE_SIGV4A_CONFIG_OPTIONS = {
|
|
229
|
+
environmentVariableSelector(env) {
|
|
230
|
+
if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
|
|
231
|
+
return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
|
|
232
|
+
}
|
|
233
|
+
throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
|
|
234
|
+
tryNextLink: true
|
|
235
|
+
});
|
|
236
|
+
},
|
|
237
|
+
configFileSelector(profile) {
|
|
238
|
+
if (profile.sigv4a_signing_region_set) {
|
|
239
|
+
return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
|
|
240
|
+
}
|
|
241
|
+
throw new ProviderError("sigv4a_signing_region_set not set in profile.", {
|
|
242
|
+
tryNextLink: true
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
default: void 0
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js
|
|
249
|
+
var HeaderFormatter = class {
|
|
250
|
+
format(headers) {
|
|
251
|
+
const chunks = [];
|
|
252
|
+
for (const headerName in headers) {
|
|
253
|
+
if (!hasOwn(headers, headerName)) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
const bytes = fromUtf8(headerName);
|
|
257
|
+
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
258
|
+
}
|
|
259
|
+
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
260
|
+
let position = 0;
|
|
261
|
+
for (const chunk of chunks) {
|
|
262
|
+
out.set(chunk, position);
|
|
263
|
+
position += chunk.byteLength;
|
|
264
|
+
}
|
|
265
|
+
return out;
|
|
266
|
+
}
|
|
267
|
+
formatHeaderValue(header) {
|
|
268
|
+
switch (header.type) {
|
|
269
|
+
case "boolean":
|
|
270
|
+
return Uint8Array.from([header.value ? 0 : 1]);
|
|
271
|
+
case "byte":
|
|
272
|
+
return Uint8Array.from([2, header.value]);
|
|
273
|
+
case "short":
|
|
274
|
+
const shortView = new DataView(new ArrayBuffer(3));
|
|
275
|
+
shortView.setUint8(0, 3);
|
|
276
|
+
shortView.setInt16(1, header.value, false);
|
|
277
|
+
return new Uint8Array(shortView.buffer);
|
|
278
|
+
case "integer":
|
|
279
|
+
const intView = new DataView(new ArrayBuffer(5));
|
|
280
|
+
intView.setUint8(0, 4);
|
|
281
|
+
intView.setInt32(1, header.value, false);
|
|
282
|
+
return new Uint8Array(intView.buffer);
|
|
283
|
+
case "long":
|
|
284
|
+
const longBytes = new Uint8Array(9);
|
|
285
|
+
longBytes[0] = 5;
|
|
286
|
+
longBytes.set(header.value.bytes, 1);
|
|
287
|
+
return longBytes;
|
|
288
|
+
case "binary":
|
|
289
|
+
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
290
|
+
binView.setUint8(0, 6);
|
|
291
|
+
binView.setUint16(1, header.value.byteLength, false);
|
|
292
|
+
const binBytes = new Uint8Array(binView.buffer);
|
|
293
|
+
binBytes.set(header.value, 3);
|
|
294
|
+
return binBytes;
|
|
295
|
+
case "string":
|
|
296
|
+
const utf8Bytes = fromUtf8(header.value);
|
|
297
|
+
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
298
|
+
strView.setUint8(0, 7);
|
|
299
|
+
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
300
|
+
const strBytes = new Uint8Array(strView.buffer);
|
|
301
|
+
strBytes.set(utf8Bytes, 3);
|
|
302
|
+
return strBytes;
|
|
303
|
+
case "timestamp":
|
|
304
|
+
const tsBytes = new Uint8Array(9);
|
|
305
|
+
tsBytes[0] = 8;
|
|
306
|
+
tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
|
|
307
|
+
return tsBytes;
|
|
308
|
+
case "uuid":
|
|
309
|
+
if (!UUID_PATTERN.test(header.value)) {
|
|
310
|
+
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
311
|
+
}
|
|
312
|
+
const uuidBytes = new Uint8Array(17);
|
|
313
|
+
uuidBytes[0] = 9;
|
|
314
|
+
uuidBytes.set(fromHex(header.value.replace(/-/g, "")), 1);
|
|
315
|
+
return uuidBytes;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
var HEADER_VALUE_TYPE;
|
|
320
|
+
(function(HEADER_VALUE_TYPE2) {
|
|
321
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue";
|
|
322
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse";
|
|
323
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte";
|
|
324
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short";
|
|
325
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer";
|
|
326
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long";
|
|
327
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray";
|
|
328
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string";
|
|
329
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp";
|
|
330
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid";
|
|
331
|
+
})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
|
|
332
|
+
var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
333
|
+
var Int64 = class _Int64 {
|
|
334
|
+
bytes;
|
|
335
|
+
constructor(bytes) {
|
|
336
|
+
this.bytes = bytes;
|
|
337
|
+
if (bytes.byteLength !== 8) {
|
|
338
|
+
throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
static fromNumber(number) {
|
|
342
|
+
if (number > 9223372036854776e3 || number < -9223372036854776e3) {
|
|
343
|
+
throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
344
|
+
}
|
|
345
|
+
const bytes = new Uint8Array(8);
|
|
346
|
+
for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {
|
|
347
|
+
bytes[i] = remaining;
|
|
348
|
+
}
|
|
349
|
+
if (number < 0) {
|
|
350
|
+
negate(bytes);
|
|
351
|
+
}
|
|
352
|
+
return new _Int64(bytes);
|
|
353
|
+
}
|
|
354
|
+
valueOf() {
|
|
355
|
+
const bytes = this.bytes.slice(0);
|
|
356
|
+
const negative = bytes[0] & 128;
|
|
357
|
+
if (negative) {
|
|
358
|
+
negate(bytes);
|
|
359
|
+
}
|
|
360
|
+
return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
|
|
361
|
+
}
|
|
362
|
+
toString() {
|
|
363
|
+
return String(this.valueOf());
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
function negate(bytes) {
|
|
367
|
+
for (let i = 0; i < 8; i++) {
|
|
368
|
+
bytes[i] ^= 255;
|
|
369
|
+
}
|
|
370
|
+
for (let i = 7; i > -1; i--) {
|
|
371
|
+
bytes[i]++;
|
|
372
|
+
if (bytes[i] !== 0) {
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/constants.js
|
|
379
|
+
var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
|
|
380
|
+
var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
|
|
381
|
+
var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
|
|
382
|
+
var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
|
|
383
|
+
var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
|
|
384
|
+
var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
|
|
385
|
+
var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
|
|
386
|
+
var AUTH_HEADER = "authorization";
|
|
387
|
+
var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
|
|
388
|
+
var DATE_HEADER = "date";
|
|
389
|
+
var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
|
|
390
|
+
var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
|
|
391
|
+
var SHA256_HEADER = "x-amz-content-sha256";
|
|
392
|
+
var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
|
|
393
|
+
var ALWAYS_UNSIGNABLE_HEADERS = {
|
|
394
|
+
authorization: true,
|
|
395
|
+
"cache-control": true,
|
|
396
|
+
connection: true,
|
|
397
|
+
expect: true,
|
|
398
|
+
from: true,
|
|
399
|
+
"keep-alive": true,
|
|
400
|
+
"max-forwards": true,
|
|
401
|
+
pragma: true,
|
|
402
|
+
referer: true,
|
|
403
|
+
te: true,
|
|
404
|
+
trailer: true,
|
|
405
|
+
"transfer-encoding": true,
|
|
406
|
+
upgrade: true,
|
|
407
|
+
"user-agent": true,
|
|
408
|
+
"x-amzn-trace-id": true
|
|
409
|
+
};
|
|
410
|
+
var PROXY_HEADER_PATTERN = /^proxy-/;
|
|
411
|
+
var SEC_HEADER_PATTERN = /^sec-/;
|
|
412
|
+
var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
|
|
413
|
+
var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
|
|
414
|
+
var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
415
|
+
var MAX_CACHE_SIZE = 50;
|
|
416
|
+
var KEY_TYPE_IDENTIFIER = "aws4_request";
|
|
417
|
+
var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
|
|
418
|
+
|
|
419
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js
|
|
420
|
+
var getCanonicalQuery = ({ query = {} }) => {
|
|
421
|
+
const keys = [];
|
|
422
|
+
const serialized = {};
|
|
423
|
+
for (const key in query) {
|
|
424
|
+
if (!hasOwn(query, key)) {
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
const encodedKey = escapeUri(key);
|
|
431
|
+
keys.push(encodedKey);
|
|
432
|
+
const value = query[key];
|
|
433
|
+
if (typeof value === "string") {
|
|
434
|
+
serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;
|
|
435
|
+
} else if (Array.isArray(value)) {
|
|
436
|
+
serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${escapeUri(value2)}`]), []).sort().join("&");
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/utilDate.js
|
|
443
|
+
var iso8601 = (time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
444
|
+
var toDate = (time) => {
|
|
445
|
+
if (typeof time === "number") {
|
|
446
|
+
return new Date(time * 1e3);
|
|
447
|
+
}
|
|
448
|
+
if (typeof time === "string") {
|
|
449
|
+
if (Number(time)) {
|
|
450
|
+
return new Date(Number(time) * 1e3);
|
|
451
|
+
}
|
|
452
|
+
return new Date(time);
|
|
453
|
+
}
|
|
454
|
+
return time;
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js
|
|
458
|
+
var SignatureV4Base = class {
|
|
459
|
+
service;
|
|
460
|
+
regionProvider;
|
|
461
|
+
credentialProvider;
|
|
462
|
+
sha256;
|
|
463
|
+
uriEscapePath;
|
|
464
|
+
applyChecksum;
|
|
465
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
466
|
+
this.service = service;
|
|
467
|
+
this.sha256 = sha256;
|
|
468
|
+
this.uriEscapePath = uriEscapePath;
|
|
469
|
+
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
|
|
470
|
+
this.regionProvider = normalizeProvider(region);
|
|
471
|
+
this.credentialProvider = normalizeProvider(credentials);
|
|
472
|
+
}
|
|
473
|
+
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
|
|
474
|
+
const sortedHeaders = Object.keys(canonicalHeaders).sort();
|
|
475
|
+
return `${request.method}
|
|
476
|
+
${this.getCanonicalPath(request)}
|
|
477
|
+
${getCanonicalQuery(request)}
|
|
478
|
+
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")}
|
|
479
|
+
|
|
480
|
+
${sortedHeaders.join(";")}
|
|
481
|
+
${payloadHash}`;
|
|
482
|
+
}
|
|
483
|
+
async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
|
|
484
|
+
const hash = new this.sha256();
|
|
485
|
+
hash.update(toUint8Array(canonicalRequest));
|
|
486
|
+
const hashedRequest = await hash.digest();
|
|
487
|
+
return `${algorithmIdentifier}
|
|
488
|
+
${longDate}
|
|
489
|
+
${credentialScope}
|
|
490
|
+
${toHex(hashedRequest)}`;
|
|
491
|
+
}
|
|
492
|
+
getCanonicalPath({ path }) {
|
|
493
|
+
if (this.uriEscapePath) {
|
|
494
|
+
const normalizedPathSegments = [];
|
|
495
|
+
for (const pathSegment of path.split("/")) {
|
|
496
|
+
if (pathSegment?.length === 0) {
|
|
497
|
+
continue;
|
|
498
|
+
}
|
|
499
|
+
if (pathSegment === ".") {
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
if (pathSegment === "..") {
|
|
503
|
+
normalizedPathSegments.pop();
|
|
504
|
+
} else {
|
|
505
|
+
normalizedPathSegments.push(pathSegment);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
|
|
509
|
+
const doubleEncoded = escapeUri(normalizedPath);
|
|
510
|
+
return doubleEncoded.replace(/%2F/g, "/");
|
|
511
|
+
}
|
|
512
|
+
return path;
|
|
513
|
+
}
|
|
514
|
+
validateResolvedCredentials(credentials) {
|
|
515
|
+
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
516
|
+
throw new Error("Resolved credential object is not valid");
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
formatDate(now) {
|
|
520
|
+
const longDate = iso8601(now).replace(/[-:]/g, "");
|
|
521
|
+
return {
|
|
522
|
+
longDate,
|
|
523
|
+
shortDate: longDate.slice(0, 8)
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
getCanonicalHeaderList(headers) {
|
|
527
|
+
return Object.keys(headers).sort().join(";");
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js
|
|
532
|
+
var signingKeyCache = {};
|
|
533
|
+
var cacheQueue = [];
|
|
534
|
+
var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
|
|
535
|
+
var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
|
|
536
|
+
const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
|
|
537
|
+
const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;
|
|
538
|
+
if (cacheKey in signingKeyCache) {
|
|
539
|
+
return signingKeyCache[cacheKey];
|
|
540
|
+
}
|
|
541
|
+
cacheQueue.push(cacheKey);
|
|
542
|
+
while (cacheQueue.length > MAX_CACHE_SIZE) {
|
|
543
|
+
delete signingKeyCache[cacheQueue.shift()];
|
|
544
|
+
}
|
|
545
|
+
let key = `AWS4${credentials.secretAccessKey}`;
|
|
546
|
+
for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
|
|
547
|
+
key = await hmac(sha256Constructor, key, signable);
|
|
548
|
+
}
|
|
549
|
+
return signingKeyCache[cacheKey] = key;
|
|
550
|
+
};
|
|
551
|
+
var hmac = (ctor, secret, data) => {
|
|
552
|
+
const hash = new ctor(secret);
|
|
553
|
+
hash.update(toUint8Array(data));
|
|
554
|
+
return hash.digest();
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js
|
|
558
|
+
var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
|
|
559
|
+
const canonical = {};
|
|
560
|
+
for (const headerName of Object.keys(headers).sort()) {
|
|
561
|
+
if (headers[headerName] == void 0) {
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
const canonicalHeaderName = headerName.toLowerCase();
|
|
565
|
+
if (hasOwn(ALWAYS_UNSIGNABLE_HEADERS, canonicalHeaderName) || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
|
|
566
|
+
if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
|
|
567
|
+
continue;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
if (canonicalHeaderName === "__proto__") {
|
|
571
|
+
writeKey(canonical);
|
|
572
|
+
}
|
|
573
|
+
canonical[canonicalHeaderName] = headers[headerName].replace(/[\r\n]/g, " ").replace(/[ \t]+/g, " ").replace(/^ | $/g, "");
|
|
574
|
+
}
|
|
575
|
+
return canonical;
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js
|
|
579
|
+
var getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
580
|
+
for (const headerName in headers) {
|
|
581
|
+
if (!hasOwn(headers, headerName)) {
|
|
582
|
+
continue;
|
|
583
|
+
}
|
|
584
|
+
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
585
|
+
return headers[headerName];
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if (body == void 0) {
|
|
589
|
+
return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
590
|
+
} else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {
|
|
591
|
+
const hashCtor = new hashConstructor();
|
|
592
|
+
hashCtor.update(toUint8Array(body));
|
|
593
|
+
return toHex(await hashCtor.digest());
|
|
594
|
+
}
|
|
595
|
+
return UNSIGNED_PAYLOAD;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/headerUtil.js
|
|
599
|
+
var hasHeader = (soughtHeader, headers) => {
|
|
600
|
+
soughtHeader = soughtHeader.toLowerCase();
|
|
601
|
+
for (const headerName in headers) {
|
|
602
|
+
if (!hasOwn(headers, headerName)) {
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (soughtHeader === headerName.toLowerCase()) {
|
|
606
|
+
return true;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return false;
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js
|
|
613
|
+
var moveHeadersToQuery = (request, options = {}) => {
|
|
614
|
+
const { headers, query = {} } = HttpRequest.clone(request);
|
|
615
|
+
for (const name in headers) {
|
|
616
|
+
if (!hasOwn(headers, name)) {
|
|
617
|
+
continue;
|
|
618
|
+
}
|
|
619
|
+
const lname = name.toLowerCase();
|
|
620
|
+
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
|
621
|
+
query[name] = headers[name];
|
|
622
|
+
delete headers[name];
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
return {
|
|
626
|
+
...request,
|
|
627
|
+
headers,
|
|
628
|
+
query
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js
|
|
633
|
+
var prepareRequest = (request) => {
|
|
634
|
+
request = HttpRequest.clone(request);
|
|
635
|
+
for (const headerName in request.headers) {
|
|
636
|
+
if (!hasOwn(request.headers, headerName)) {
|
|
637
|
+
continue;
|
|
638
|
+
}
|
|
639
|
+
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
640
|
+
delete request.headers[headerName];
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return request;
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js
|
|
647
|
+
var SignatureV4 = class extends SignatureV4Base {
|
|
648
|
+
headerFormatter = new HeaderFormatter();
|
|
649
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
650
|
+
super({
|
|
651
|
+
applyChecksum,
|
|
652
|
+
credentials,
|
|
653
|
+
region,
|
|
654
|
+
service,
|
|
655
|
+
sha256,
|
|
656
|
+
uriEscapePath
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
async presign(originalRequest, options = {}) {
|
|
660
|
+
const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options;
|
|
661
|
+
const credentials = await this.credentialProvider();
|
|
662
|
+
this.validateResolvedCredentials(credentials);
|
|
663
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
664
|
+
const { longDate, shortDate } = this.formatDate(signingDate);
|
|
665
|
+
if (expiresIn > MAX_PRESIGNED_TTL) {
|
|
666
|
+
return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");
|
|
667
|
+
}
|
|
668
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
669
|
+
const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });
|
|
670
|
+
if (credentials.sessionToken) {
|
|
671
|
+
request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
|
|
672
|
+
}
|
|
673
|
+
request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;
|
|
674
|
+
request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
|
|
675
|
+
request.query[AMZ_DATE_QUERY_PARAM] = longDate;
|
|
676
|
+
request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
|
|
677
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
678
|
+
request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);
|
|
679
|
+
request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
|
|
680
|
+
return request;
|
|
681
|
+
}
|
|
682
|
+
async sign(toSign, options) {
|
|
683
|
+
if (typeof toSign === "string") {
|
|
684
|
+
return this.signString(toSign, options);
|
|
685
|
+
} else if (toSign.headers && toSign.payload) {
|
|
686
|
+
return this.signEvent(toSign, options);
|
|
687
|
+
} else if (toSign.message) {
|
|
688
|
+
return this.signMessage(toSign, options);
|
|
689
|
+
} else {
|
|
690
|
+
return this.signRequest(toSign, options);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService, eventStreamCredentials }) {
|
|
694
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
695
|
+
const { shortDate, longDate } = this.formatDate(signingDate);
|
|
696
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
697
|
+
const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
|
|
698
|
+
const hash = new this.sha256();
|
|
699
|
+
hash.update(headers);
|
|
700
|
+
const hashedHeaders = toHex(await hash.digest());
|
|
701
|
+
const stringToSign = [
|
|
702
|
+
EVENT_ALGORITHM_IDENTIFIER,
|
|
703
|
+
longDate,
|
|
704
|
+
scope,
|
|
705
|
+
priorSignature,
|
|
706
|
+
hashedHeaders,
|
|
707
|
+
hashedPayload
|
|
708
|
+
].join("\n");
|
|
709
|
+
return this.signString(stringToSign, {
|
|
710
|
+
signingDate,
|
|
711
|
+
signingRegion: region,
|
|
712
|
+
signingService,
|
|
713
|
+
eventStreamCredentials
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService, eventStreamCredentials }) {
|
|
717
|
+
const promise = this.signEvent({
|
|
718
|
+
headers: this.headerFormatter.format(signableMessage.message.headers),
|
|
719
|
+
payload: signableMessage.message.body
|
|
720
|
+
}, {
|
|
721
|
+
signingDate,
|
|
722
|
+
signingRegion,
|
|
723
|
+
signingService,
|
|
724
|
+
priorSignature: signableMessage.priorSignature,
|
|
725
|
+
eventStreamCredentials
|
|
726
|
+
});
|
|
727
|
+
return promise.then((signature) => {
|
|
728
|
+
return { message: signableMessage.message, signature };
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService, eventStreamCredentials } = {}) {
|
|
732
|
+
const credentials = eventStreamCredentials ?? await this.credentialProvider();
|
|
733
|
+
this.validateResolvedCredentials(credentials);
|
|
734
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
735
|
+
const { shortDate } = this.formatDate(signingDate);
|
|
736
|
+
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
|
|
737
|
+
hash.update(toUint8Array(stringToSign));
|
|
738
|
+
return toHex(await hash.digest());
|
|
739
|
+
}
|
|
740
|
+
async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
|
|
741
|
+
const credentials = await this.credentialProvider();
|
|
742
|
+
this.validateResolvedCredentials(credentials);
|
|
743
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
744
|
+
const request = prepareRequest(requestToSign);
|
|
745
|
+
const { longDate, shortDate } = this.formatDate(signingDate);
|
|
746
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
747
|
+
request.headers[AMZ_DATE_HEADER] = longDate;
|
|
748
|
+
if (credentials.sessionToken) {
|
|
749
|
+
request.headers[TOKEN_HEADER] = credentials.sessionToken;
|
|
750
|
+
}
|
|
751
|
+
const payloadHash = await getPayloadHash(request, this.sha256);
|
|
752
|
+
if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {
|
|
753
|
+
request.headers[SHA256_HEADER] = payloadHash;
|
|
754
|
+
}
|
|
755
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
756
|
+
const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
|
|
757
|
+
request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;
|
|
758
|
+
return request;
|
|
759
|
+
}
|
|
760
|
+
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
|
|
761
|
+
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
|
|
762
|
+
const hash = new this.sha256(await keyPromise);
|
|
763
|
+
hash.update(toUint8Array(stringToSign));
|
|
764
|
+
return toHex(await hash.digest());
|
|
765
|
+
}
|
|
766
|
+
getSigningKey(credentials, region, shortDate, service) {
|
|
767
|
+
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
// ../../node_modules/.pnpm/@smithy+signature-v4@5.7.5/node_modules/@smithy/signature-v4/dist-es/signature-v4a-container.js
|
|
772
|
+
var signatureV4aContainer = {
|
|
773
|
+
SignatureV4a: null
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js
|
|
777
|
+
var bindResolveAwsSdkSigV4Config = (defaultDisableClockSkewCorrection) => (config) => {
|
|
778
|
+
let inputCredentials = config.credentials;
|
|
779
|
+
let isUserSupplied = !!config.credentials;
|
|
780
|
+
let resolvedCredentials = void 0;
|
|
781
|
+
Object.defineProperty(config, "credentials", {
|
|
782
|
+
set(credentials) {
|
|
783
|
+
if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
|
|
784
|
+
isUserSupplied = true;
|
|
785
|
+
}
|
|
786
|
+
inputCredentials = credentials;
|
|
787
|
+
const memoizedProvider = normalizeCredentialProvider(config, {
|
|
788
|
+
credentials: inputCredentials,
|
|
789
|
+
credentialDefaultProvider: config.credentialDefaultProvider
|
|
790
|
+
});
|
|
791
|
+
const boundProvider = bindCallerConfig(config, memoizedProvider);
|
|
792
|
+
if (isUserSupplied && !boundProvider.attributed) {
|
|
793
|
+
const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
|
|
794
|
+
resolvedCredentials = async (options) => {
|
|
795
|
+
const creds = await boundProvider(options);
|
|
796
|
+
const attributedCreds = creds;
|
|
797
|
+
if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) {
|
|
798
|
+
return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
|
|
799
|
+
}
|
|
800
|
+
return attributedCreds;
|
|
801
|
+
};
|
|
802
|
+
resolvedCredentials.memoized = boundProvider.memoized;
|
|
803
|
+
resolvedCredentials.configBound = boundProvider.configBound;
|
|
804
|
+
resolvedCredentials.attributed = true;
|
|
805
|
+
} else {
|
|
806
|
+
resolvedCredentials = boundProvider;
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
get() {
|
|
810
|
+
return resolvedCredentials;
|
|
811
|
+
},
|
|
812
|
+
enumerable: true,
|
|
813
|
+
configurable: true
|
|
814
|
+
});
|
|
815
|
+
config.credentials = inputCredentials;
|
|
816
|
+
const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
|
|
817
|
+
let signer;
|
|
818
|
+
if (config.signer) {
|
|
819
|
+
signer = normalizeProvider2(config.signer);
|
|
820
|
+
} else if (config.regionInfoProvider) {
|
|
821
|
+
signer = () => normalizeProvider2(config.region)().then(async (region) => [
|
|
822
|
+
await config.regionInfoProvider(region, {
|
|
823
|
+
useFipsEndpoint: await config.useFipsEndpoint(),
|
|
824
|
+
useDualstackEndpoint: await config.useDualstackEndpoint()
|
|
825
|
+
}) || {},
|
|
826
|
+
region
|
|
827
|
+
]).then(([regionInfo, region]) => {
|
|
828
|
+
const { signingRegion, signingService } = regionInfo;
|
|
829
|
+
config.signingRegion = config.signingRegion || signingRegion || region;
|
|
830
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
|
831
|
+
const params = {
|
|
832
|
+
...config,
|
|
833
|
+
credentials: config.credentials,
|
|
834
|
+
region: config.signingRegion,
|
|
835
|
+
service: config.signingName,
|
|
836
|
+
sha256,
|
|
837
|
+
uriEscapePath: signingEscapePath
|
|
838
|
+
};
|
|
839
|
+
const SignerCtor = config.signerConstructor || SignatureV4;
|
|
840
|
+
return new SignerCtor(params);
|
|
841
|
+
});
|
|
842
|
+
} else {
|
|
843
|
+
signer = async (authScheme) => {
|
|
844
|
+
authScheme = Object.assign({}, {
|
|
845
|
+
name: "sigv4",
|
|
846
|
+
signingName: config.signingName || config.defaultSigningName,
|
|
847
|
+
signingRegion: await normalizeProvider2(config.region)(),
|
|
848
|
+
properties: {}
|
|
849
|
+
}, authScheme);
|
|
850
|
+
const signingRegion = authScheme.signingRegion;
|
|
851
|
+
const signingService = authScheme.signingName;
|
|
852
|
+
config.signingRegion = config.signingRegion || signingRegion;
|
|
853
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
|
854
|
+
const params = {
|
|
855
|
+
...config,
|
|
856
|
+
credentials: config.credentials,
|
|
857
|
+
region: config.signingRegion,
|
|
858
|
+
service: config.signingName,
|
|
859
|
+
sha256,
|
|
860
|
+
uriEscapePath: signingEscapePath
|
|
861
|
+
};
|
|
862
|
+
const SignerCtor = config.signerConstructor || SignatureV4;
|
|
863
|
+
return new SignerCtor(params);
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
const resolvedConfig = Object.assign(config, {
|
|
867
|
+
systemClockOffset,
|
|
868
|
+
signingEscapePath,
|
|
869
|
+
signer,
|
|
870
|
+
disableClockSkewCorrection: normalizeProvider2(config.disableClockSkewCorrection ?? defaultDisableClockSkewCorrection)
|
|
871
|
+
});
|
|
872
|
+
return resolvedConfig;
|
|
873
|
+
};
|
|
874
|
+
function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
|
|
875
|
+
let credentialsProvider;
|
|
876
|
+
if (credentials) {
|
|
877
|
+
if (!credentials?.memoized) {
|
|
878
|
+
credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);
|
|
879
|
+
} else {
|
|
880
|
+
credentialsProvider = credentials;
|
|
881
|
+
}
|
|
882
|
+
} else {
|
|
883
|
+
if (credentialDefaultProvider) {
|
|
884
|
+
credentialsProvider = normalizeProvider2(credentialDefaultProvider(Object.assign({}, config, {
|
|
885
|
+
parentClientConfig: config
|
|
886
|
+
})));
|
|
887
|
+
} else {
|
|
888
|
+
credentialsProvider = async () => {
|
|
889
|
+
throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
credentialsProvider.memoized = true;
|
|
894
|
+
return credentialsProvider;
|
|
895
|
+
}
|
|
896
|
+
function bindCallerConfig(config, credentialsProvider) {
|
|
897
|
+
if (credentialsProvider.configBound) {
|
|
898
|
+
return credentialsProvider;
|
|
899
|
+
}
|
|
900
|
+
const fn = async (options) => credentialsProvider({ ...options, callerClientConfig: config });
|
|
901
|
+
fn.memoized = credentialsProvider.memoized;
|
|
902
|
+
fn.configBound = true;
|
|
903
|
+
return fn;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.js
|
|
907
|
+
var ENV_DISABLE_CLOCK_SKEW_CORRECTION = "AWS_DISABLE_CLOCK_SKEW_CORRECTION";
|
|
908
|
+
var CONFIG_DISABLE_CLOCK_SKEW_CORRECTION = "disable_clock_skew_correction";
|
|
909
|
+
var NODE_DISABLE_CLOCK_SKEW_CORRECTION_CONFIG_OPTIONS = {
|
|
910
|
+
environmentVariableSelector: (env) => booleanSelector(env, ENV_DISABLE_CLOCK_SKEW_CORRECTION, SelectorType.ENV),
|
|
911
|
+
configFileSelector: (profile) => booleanSelector(profile, CONFIG_DISABLE_CLOCK_SKEW_CORRECTION, SelectorType.CONFIG),
|
|
912
|
+
default: false
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.js
|
|
916
|
+
var DEFAULT_DISABLE_CLOCK_SKEW_CORRECTION = loadConfig(NODE_DISABLE_CLOCK_SKEW_CORRECTION_CONFIG_OPTIONS);
|
|
917
|
+
|
|
918
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js
|
|
919
|
+
var resolveAwsSdkSigV4Config = bindResolveAwsSdkSigV4Config(DEFAULT_DISABLE_CLOCK_SKEW_CORRECTION);
|
|
920
|
+
|
|
921
|
+
// ../../node_modules/.pnpm/@aws-sdk+nested-clients@3.998.1/node_modules/@aws-sdk/nested-clients/package.json
|
|
922
|
+
var package_default = {
|
|
923
|
+
name: "@aws-sdk/nested-clients",
|
|
924
|
+
version: "3.998.1",
|
|
925
|
+
description: "Nested clients for AWS SDK packages.",
|
|
926
|
+
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
927
|
+
license: "Apache-2.0",
|
|
928
|
+
author: {
|
|
929
|
+
name: "AWS SDK for JavaScript Team",
|
|
930
|
+
url: "https://aws.amazon.com/sdk-for-javascript/"
|
|
931
|
+
},
|
|
932
|
+
repository: {
|
|
933
|
+
type: "git",
|
|
934
|
+
url: "https://github.com/aws/aws-sdk-js-v3.git",
|
|
935
|
+
directory: "packages/nested-clients"
|
|
936
|
+
},
|
|
937
|
+
files: [
|
|
938
|
+
"./cognito-identity.d.ts",
|
|
939
|
+
"./cognito-identity.js",
|
|
940
|
+
"./signin.d.ts",
|
|
941
|
+
"./signin.js",
|
|
942
|
+
"./sso-oidc.d.ts",
|
|
943
|
+
"./sso-oidc.js",
|
|
944
|
+
"./sso.d.ts",
|
|
945
|
+
"./sso.js",
|
|
946
|
+
"./sts.d.ts",
|
|
947
|
+
"./sts.js",
|
|
948
|
+
"dist-*/**"
|
|
949
|
+
],
|
|
950
|
+
sideEffects: false,
|
|
951
|
+
main: "./dist-cjs/index.js",
|
|
952
|
+
module: "./dist-es/index.js",
|
|
953
|
+
browser: {
|
|
954
|
+
"./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser",
|
|
955
|
+
"./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser",
|
|
956
|
+
"./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
|
|
957
|
+
"./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser",
|
|
958
|
+
"./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
|
|
959
|
+
},
|
|
960
|
+
types: "./dist-types/index.d.ts",
|
|
961
|
+
typesVersions: {
|
|
962
|
+
"<4.5": {
|
|
963
|
+
"dist-types/*": [
|
|
964
|
+
"dist-types/ts3.4/*"
|
|
965
|
+
],
|
|
966
|
+
"*": [
|
|
967
|
+
"dist-types/ts3.4/submodules/*/index.d.ts"
|
|
968
|
+
]
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
"react-native": {},
|
|
972
|
+
exports: {
|
|
973
|
+
"./package.json": "./package.json",
|
|
974
|
+
"./sso-oidc": {
|
|
975
|
+
types: "./dist-types/submodules/sso-oidc/index.d.ts",
|
|
976
|
+
module: "./dist-es/submodules/sso-oidc/index.js",
|
|
977
|
+
node: "./dist-cjs/submodules/sso-oidc/index.js",
|
|
978
|
+
import: "./dist-es/submodules/sso-oidc/index.js",
|
|
979
|
+
require: "./dist-cjs/submodules/sso-oidc/index.js"
|
|
980
|
+
},
|
|
981
|
+
"./sts": {
|
|
982
|
+
types: "./dist-types/submodules/sts/index.d.ts",
|
|
983
|
+
module: "./dist-es/submodules/sts/index.js",
|
|
984
|
+
node: "./dist-cjs/submodules/sts/index.js",
|
|
985
|
+
import: "./dist-es/submodules/sts/index.js",
|
|
986
|
+
require: "./dist-cjs/submodules/sts/index.js"
|
|
987
|
+
},
|
|
988
|
+
"./signin": {
|
|
989
|
+
types: "./dist-types/submodules/signin/index.d.ts",
|
|
990
|
+
module: "./dist-es/submodules/signin/index.js",
|
|
991
|
+
node: "./dist-cjs/submodules/signin/index.js",
|
|
992
|
+
import: "./dist-es/submodules/signin/index.js",
|
|
993
|
+
require: "./dist-cjs/submodules/signin/index.js"
|
|
994
|
+
},
|
|
995
|
+
"./cognito-identity": {
|
|
996
|
+
types: "./dist-types/submodules/cognito-identity/index.d.ts",
|
|
997
|
+
module: "./dist-es/submodules/cognito-identity/index.js",
|
|
998
|
+
node: "./dist-cjs/submodules/cognito-identity/index.js",
|
|
999
|
+
import: "./dist-es/submodules/cognito-identity/index.js",
|
|
1000
|
+
require: "./dist-cjs/submodules/cognito-identity/index.js"
|
|
1001
|
+
},
|
|
1002
|
+
"./sso": {
|
|
1003
|
+
types: "./dist-types/submodules/sso/index.d.ts",
|
|
1004
|
+
module: "./dist-es/submodules/sso/index.js",
|
|
1005
|
+
node: "./dist-cjs/submodules/sso/index.js",
|
|
1006
|
+
import: "./dist-es/submodules/sso/index.js",
|
|
1007
|
+
require: "./dist-cjs/submodules/sso/index.js"
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
scripts: {
|
|
1011
|
+
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
1012
|
+
"build:cjs": "node ../../scripts/compilation/inline",
|
|
1013
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
1014
|
+
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
1015
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
1016
|
+
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
1017
|
+
clean: "premove dist-cjs dist-es dist-types",
|
|
1018
|
+
lint: "node ../../scripts/validation/submodules-linter.js",
|
|
1019
|
+
prebuild: "yarn lint",
|
|
1020
|
+
test: "yarn g:vitest run",
|
|
1021
|
+
"test:watch": "yarn g:vitest watch"
|
|
1022
|
+
},
|
|
1023
|
+
dependencies: {
|
|
1024
|
+
"@aws-sdk/core": "^3.980.1",
|
|
1025
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.51",
|
|
1026
|
+
"@aws-sdk/types": "^3.975.0",
|
|
1027
|
+
"@smithy/core": "^3.38.0",
|
|
1028
|
+
"@smithy/fetch-http-handler": "^5.8.0",
|
|
1029
|
+
"@smithy/node-http-handler": "^4.14.0",
|
|
1030
|
+
"@smithy/types": "^4.19.0",
|
|
1031
|
+
tslib: "^2.6.2"
|
|
1032
|
+
},
|
|
1033
|
+
devDependencies: {
|
|
1034
|
+
concurrently: "7.0.0",
|
|
1035
|
+
"downlevel-dts": "0.10.1",
|
|
1036
|
+
premove: "4.0.0",
|
|
1037
|
+
typescript: "~7.0.2"
|
|
1038
|
+
},
|
|
1039
|
+
engines: {
|
|
1040
|
+
node: ">=20.0.0"
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js
|
|
1045
|
+
var ProtocolLib = class {
|
|
1046
|
+
queryCompat;
|
|
1047
|
+
errorRegistry;
|
|
1048
|
+
constructor(queryCompat = false) {
|
|
1049
|
+
this.queryCompat = queryCompat;
|
|
1050
|
+
}
|
|
1051
|
+
resolveRestContentType(defaultContentType, inputSchema) {
|
|
1052
|
+
const members = inputSchema.getMemberSchemas();
|
|
1053
|
+
const httpPayloadMember = Object.values(members).find((m) => {
|
|
1054
|
+
return !!m.getMergedTraits().httpPayload;
|
|
1055
|
+
});
|
|
1056
|
+
if (httpPayloadMember) {
|
|
1057
|
+
const mediaType = httpPayloadMember.getMergedTraits().mediaType;
|
|
1058
|
+
if (mediaType) {
|
|
1059
|
+
return mediaType;
|
|
1060
|
+
} else if (httpPayloadMember.isStringSchema()) {
|
|
1061
|
+
return "text/plain";
|
|
1062
|
+
} else if (httpPayloadMember.isBlobSchema()) {
|
|
1063
|
+
return "application/octet-stream";
|
|
1064
|
+
} else {
|
|
1065
|
+
return defaultContentType;
|
|
1066
|
+
}
|
|
1067
|
+
} else if (!inputSchema.isUnitSchema()) {
|
|
1068
|
+
const hasBody = Object.values(members).find((m) => {
|
|
1069
|
+
const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
|
|
1070
|
+
const noPrefixHeaders = httpPrefixHeaders === void 0;
|
|
1071
|
+
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
|
|
1072
|
+
});
|
|
1073
|
+
if (hasBody) {
|
|
1074
|
+
return defaultContentType;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
|
|
1079
|
+
let errorName = errorIdentifier;
|
|
1080
|
+
if (errorIdentifier.includes("#")) {
|
|
1081
|
+
[, errorName] = errorIdentifier.split("#");
|
|
1082
|
+
}
|
|
1083
|
+
const errorMetadata = {
|
|
1084
|
+
$metadata: metadata,
|
|
1085
|
+
$fault: response.statusCode < 500 ? "client" : "server"
|
|
1086
|
+
};
|
|
1087
|
+
if (!this.errorRegistry) {
|
|
1088
|
+
throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
|
|
1089
|
+
}
|
|
1090
|
+
try {
|
|
1091
|
+
const errorSchema = getErrorSchema?.(this.errorRegistry, errorName) ?? this.errorRegistry.getSchema(errorIdentifier);
|
|
1092
|
+
return { errorSchema, errorMetadata };
|
|
1093
|
+
} catch (e) {
|
|
1094
|
+
dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
1095
|
+
const synthetic = this.errorRegistry;
|
|
1096
|
+
const baseExceptionSchema = synthetic.getBaseException();
|
|
1097
|
+
if (baseExceptionSchema) {
|
|
1098
|
+
const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
|
|
1099
|
+
throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
|
|
1100
|
+
}
|
|
1101
|
+
const d = dataObject;
|
|
1102
|
+
const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;
|
|
1103
|
+
throw this.decorateServiceException(Object.assign(new Error(message), {
|
|
1104
|
+
name: errorName
|
|
1105
|
+
}, errorMetadata), dataObject);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
compose(composite, errorIdentifier, defaultNamespace) {
|
|
1109
|
+
let namespace = defaultNamespace;
|
|
1110
|
+
if (errorIdentifier.includes("#")) {
|
|
1111
|
+
[namespace] = errorIdentifier.split("#");
|
|
1112
|
+
}
|
|
1113
|
+
const staticRegistry = TypeRegistry.for(namespace);
|
|
1114
|
+
const defaultSyntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
|
|
1115
|
+
composite.copyFrom(staticRegistry);
|
|
1116
|
+
composite.copyFrom(defaultSyntheticRegistry);
|
|
1117
|
+
this.errorRegistry = composite;
|
|
1118
|
+
}
|
|
1119
|
+
decorateServiceException(exception, additions = {}) {
|
|
1120
|
+
if (this.queryCompat) {
|
|
1121
|
+
const msg = exception.Message ?? additions.Message;
|
|
1122
|
+
const error = decorateServiceException(exception, additions);
|
|
1123
|
+
if (msg) {
|
|
1124
|
+
error.message = msg;
|
|
1125
|
+
}
|
|
1126
|
+
const errorObj = error.Error ?? {};
|
|
1127
|
+
errorObj.Type = error.Error?.Type;
|
|
1128
|
+
errorObj.Code = error.Error?.Code;
|
|
1129
|
+
errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
|
|
1130
|
+
error.Error = errorObj;
|
|
1131
|
+
const reqId = error.$metadata.requestId;
|
|
1132
|
+
if (reqId) {
|
|
1133
|
+
error.RequestId = reqId;
|
|
1134
|
+
}
|
|
1135
|
+
return error;
|
|
1136
|
+
}
|
|
1137
|
+
return decorateServiceException(exception, additions);
|
|
1138
|
+
}
|
|
1139
|
+
setQueryCompatError(output, response) {
|
|
1140
|
+
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
|
1141
|
+
if (output !== void 0 && queryErrorHeader != null) {
|
|
1142
|
+
const [Code, Type] = queryErrorHeader.split(";");
|
|
1143
|
+
const keys = Object.keys(output);
|
|
1144
|
+
const Error2 = {
|
|
1145
|
+
Code,
|
|
1146
|
+
Type
|
|
1147
|
+
};
|
|
1148
|
+
output.Code = Code;
|
|
1149
|
+
output.Type = Type;
|
|
1150
|
+
for (let i = 0; i < keys.length; i++) {
|
|
1151
|
+
const k = keys[i];
|
|
1152
|
+
Error2[k === "message" ? "Message" : k] = output[k];
|
|
1153
|
+
}
|
|
1154
|
+
delete Error2.__type;
|
|
1155
|
+
output.Error = Error2;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
queryCompatOutput(queryCompatErrorData, errorData) {
|
|
1159
|
+
if (queryCompatErrorData.Error) {
|
|
1160
|
+
errorData.Error = queryCompatErrorData.Error;
|
|
1161
|
+
}
|
|
1162
|
+
if (queryCompatErrorData.Type) {
|
|
1163
|
+
errorData.Type = queryCompatErrorData.Type;
|
|
1164
|
+
}
|
|
1165
|
+
if (queryCompatErrorData.Code) {
|
|
1166
|
+
errorData.Code = queryCompatErrorData.Code;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
findQueryCompatibleError(registry, errorName) {
|
|
1170
|
+
try {
|
|
1171
|
+
return registry.getSchema(errorName);
|
|
1172
|
+
} catch (e) {
|
|
1173
|
+
return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js
|
|
1179
|
+
var AwsRestJsonProtocol = class extends HttpBindingProtocol {
|
|
1180
|
+
serializer;
|
|
1181
|
+
deserializer;
|
|
1182
|
+
codec;
|
|
1183
|
+
mixin = new ProtocolLib();
|
|
1184
|
+
constructor({ defaultNamespace, errorTypeRegistries, jsonCodec }) {
|
|
1185
|
+
super({
|
|
1186
|
+
defaultNamespace,
|
|
1187
|
+
errorTypeRegistries
|
|
1188
|
+
});
|
|
1189
|
+
const settings = {
|
|
1190
|
+
timestampFormat: {
|
|
1191
|
+
useTrait: true,
|
|
1192
|
+
default: 7
|
|
1193
|
+
},
|
|
1194
|
+
httpBindings: true,
|
|
1195
|
+
jsonName: true
|
|
1196
|
+
};
|
|
1197
|
+
this.codec = jsonCodec ?? new JsonCodec2(settings);
|
|
1198
|
+
this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
|
|
1199
|
+
this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
|
|
1200
|
+
}
|
|
1201
|
+
getShapeId() {
|
|
1202
|
+
return "aws.protocols#restJson1";
|
|
1203
|
+
}
|
|
1204
|
+
getPayloadCodec() {
|
|
1205
|
+
return this.codec;
|
|
1206
|
+
}
|
|
1207
|
+
setSerdeContext(serdeContext) {
|
|
1208
|
+
this.codec.setSerdeContext(serdeContext);
|
|
1209
|
+
super.setSerdeContext(serdeContext);
|
|
1210
|
+
}
|
|
1211
|
+
async serializeRequest(operationSchema, input, context) {
|
|
1212
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
1213
|
+
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
1214
|
+
if (!request.headers["content-type"]) {
|
|
1215
|
+
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
1216
|
+
if (contentType) {
|
|
1217
|
+
request.headers["content-type"] = contentType;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
if (request.body == null && request.headers["content-type"] === this.getDefaultContentType()) {
|
|
1221
|
+
request.body = "{}";
|
|
1222
|
+
}
|
|
1223
|
+
return request;
|
|
1224
|
+
}
|
|
1225
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
1226
|
+
const output = await super.deserializeResponse(operationSchema, context, response);
|
|
1227
|
+
const outputSchema = NormalizedSchema.of(operationSchema.output);
|
|
1228
|
+
for (const [name, member] of outputSchema.structIterator()) {
|
|
1229
|
+
if (member.getMemberTraits().httpPayload && !(name in output)) {
|
|
1230
|
+
output[name] = null;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
return output;
|
|
1234
|
+
}
|
|
1235
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1236
|
+
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
1237
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1238
|
+
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
1239
|
+
const ns = NormalizedSchema.of(errorSchema);
|
|
1240
|
+
const message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
1241
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1242
|
+
const exception = new ErrorCtor({});
|
|
1243
|
+
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
1244
|
+
const output = {};
|
|
1245
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
1246
|
+
for (const [name, member] of ns.structIterator()) {
|
|
1247
|
+
const target = member.getMergedTraits().jsonName ?? name;
|
|
1248
|
+
output[name] = errorDeserializer.readObject(member, dataObject[target]);
|
|
1249
|
+
}
|
|
1250
|
+
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
1251
|
+
$fault: ns.getMergedTraits().error,
|
|
1252
|
+
message
|
|
1253
|
+
}, output), dataObject);
|
|
1254
|
+
}
|
|
1255
|
+
getDefaultContentType() {
|
|
1256
|
+
return "application/json";
|
|
1257
|
+
}
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
// ../../node_modules/.pnpm/@aws-sdk+xml-builder@3.972.42/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js
|
|
1261
|
+
function writeKey2(obj) {
|
|
1262
|
+
Object.defineProperty(obj, "__proto__", { value: void 0, writable: true, enumerable: true, configurable: true });
|
|
1263
|
+
}
|
|
1264
|
+
function parseXML(xml) {
|
|
1265
|
+
const state = new AwsXmlParser(xml);
|
|
1266
|
+
return state.parse();
|
|
1267
|
+
}
|
|
1268
|
+
var AwsXmlParser = class _AwsXmlParser {
|
|
1269
|
+
x;
|
|
1270
|
+
i = 0;
|
|
1271
|
+
z;
|
|
1272
|
+
constructor(x) {
|
|
1273
|
+
this.x = x;
|
|
1274
|
+
this.x = x.replace(/\r\n?/g, "\n");
|
|
1275
|
+
this.z = this.x.length;
|
|
1276
|
+
}
|
|
1277
|
+
parse() {
|
|
1278
|
+
const p = this;
|
|
1279
|
+
const { z } = p;
|
|
1280
|
+
while (p.i < z) {
|
|
1281
|
+
p.trim();
|
|
1282
|
+
if (p.i >= z) {
|
|
1283
|
+
break;
|
|
1284
|
+
}
|
|
1285
|
+
if (p.isNext("<?")) {
|
|
1286
|
+
p.readTo("?>");
|
|
1287
|
+
p.trim();
|
|
1288
|
+
} else if (p.isNext("<!--")) {
|
|
1289
|
+
p.readTo("-->");
|
|
1290
|
+
p.trim();
|
|
1291
|
+
} else if (p.isNext("<!DOCTYPE", false)) {
|
|
1292
|
+
p.skipDoctype();
|
|
1293
|
+
p.trim();
|
|
1294
|
+
} else if (p.x[p.i] === "<") {
|
|
1295
|
+
const root = p.parseTag();
|
|
1296
|
+
return { [root.tag]: root.value };
|
|
1297
|
+
} else {
|
|
1298
|
+
throw new Error("@aws-sdk XML parse error: unexpected content.");
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
throw new Error("@aws-sdk XML parse error: no root element.");
|
|
1302
|
+
}
|
|
1303
|
+
isNext(s, caseSensitive = true) {
|
|
1304
|
+
const p = this;
|
|
1305
|
+
if (caseSensitive) {
|
|
1306
|
+
return p.x.startsWith(s, p.i);
|
|
1307
|
+
}
|
|
1308
|
+
return p.x.toLowerCase().startsWith(s.toLowerCase(), p.i);
|
|
1309
|
+
}
|
|
1310
|
+
readTo(stop) {
|
|
1311
|
+
const p = this;
|
|
1312
|
+
const _i = p.x.indexOf(stop, p.i);
|
|
1313
|
+
if (_i === -1) {
|
|
1314
|
+
throw new Error(`@aws-sdk XML parse error: expected "${stop}" not found.`);
|
|
1315
|
+
}
|
|
1316
|
+
const result = p.x.slice(p.i, _i);
|
|
1317
|
+
p.i = _i + stop.length;
|
|
1318
|
+
return result;
|
|
1319
|
+
}
|
|
1320
|
+
trim() {
|
|
1321
|
+
const p = this;
|
|
1322
|
+
while (p.i < p.z && " \r\n".includes(p.x[p.i])) {
|
|
1323
|
+
++p.i;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
readAttrValue() {
|
|
1327
|
+
const p = this;
|
|
1328
|
+
const quote = p.x[p.i];
|
|
1329
|
+
++p.i;
|
|
1330
|
+
let value = "";
|
|
1331
|
+
while (p.i < p.z && p.x[p.i] !== quote) {
|
|
1332
|
+
value += p.x[p.i++];
|
|
1333
|
+
}
|
|
1334
|
+
++p.i;
|
|
1335
|
+
return p.decodeEntities(value);
|
|
1336
|
+
}
|
|
1337
|
+
parseTag() {
|
|
1338
|
+
const p = this;
|
|
1339
|
+
++p.i;
|
|
1340
|
+
let tag = "";
|
|
1341
|
+
while (p.i < p.z && !" \r\n>/".includes(p.x[p.i])) {
|
|
1342
|
+
tag += p.x[p.i++];
|
|
1343
|
+
}
|
|
1344
|
+
let hasAttrs = false;
|
|
1345
|
+
const attrs = {};
|
|
1346
|
+
while (p.i < p.z) {
|
|
1347
|
+
p.trim();
|
|
1348
|
+
if (">/".includes(p.x[p.i])) {
|
|
1349
|
+
break;
|
|
1350
|
+
}
|
|
1351
|
+
let name = "";
|
|
1352
|
+
while (p.i < p.z && !"= \r\n>/?".includes(p.x[p.i])) {
|
|
1353
|
+
name += p.x[p.i++];
|
|
1354
|
+
}
|
|
1355
|
+
p.trim();
|
|
1356
|
+
if (p.x[p.i] !== "=") {
|
|
1357
|
+
break;
|
|
1358
|
+
}
|
|
1359
|
+
++p.i;
|
|
1360
|
+
p.trim();
|
|
1361
|
+
if (name === "__proto__") {
|
|
1362
|
+
writeKey2(attrs);
|
|
1363
|
+
}
|
|
1364
|
+
attrs[name] = p.readAttrValue();
|
|
1365
|
+
hasAttrs = true;
|
|
1366
|
+
}
|
|
1367
|
+
if (p.i >= p.z) {
|
|
1368
|
+
throw new Error("@aws-sdk XML parse error: unexpected end of input.");
|
|
1369
|
+
}
|
|
1370
|
+
if (p.x[p.i] === "/") {
|
|
1371
|
+
++p.i;
|
|
1372
|
+
if (p.i >= p.z || p.x[p.i] !== ">") {
|
|
1373
|
+
throw new Error("@aws-sdk XML parse error: expected > at the end of self-closing tag.");
|
|
1374
|
+
}
|
|
1375
|
+
++p.i;
|
|
1376
|
+
return { tag, value: hasAttrs ? attrs : "" };
|
|
1377
|
+
}
|
|
1378
|
+
if (p.x[p.i] !== ">") {
|
|
1379
|
+
throw new Error("@aws-sdk XML parse error: expected > at the end of opening tag.");
|
|
1380
|
+
}
|
|
1381
|
+
++p.i;
|
|
1382
|
+
const textParts = [];
|
|
1383
|
+
const childTags = [];
|
|
1384
|
+
let hasElementChild = false;
|
|
1385
|
+
while (p.i < p.z) {
|
|
1386
|
+
if (p.isNext("</")) {
|
|
1387
|
+
break;
|
|
1388
|
+
}
|
|
1389
|
+
if (p.x[p.i] === "<") {
|
|
1390
|
+
if (p.isNext("<!--")) {
|
|
1391
|
+
p.readTo("-->");
|
|
1392
|
+
} else if (p.isNext("<![CDATA[")) {
|
|
1393
|
+
p.i += 9;
|
|
1394
|
+
textParts.push(p.readTo("]]>"));
|
|
1395
|
+
} else if (p.isNext("<?")) {
|
|
1396
|
+
p.readTo("?>");
|
|
1397
|
+
} else {
|
|
1398
|
+
hasElementChild = true;
|
|
1399
|
+
childTags.push(p.parseTag());
|
|
1400
|
+
}
|
|
1401
|
+
} else {
|
|
1402
|
+
let text = "";
|
|
1403
|
+
while (p.i < p.z && p.x[p.i] !== "<") {
|
|
1404
|
+
text += p.x[p.i++];
|
|
1405
|
+
}
|
|
1406
|
+
textParts.push(p.decodeEntities(text));
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
if (!p.isNext("</")) {
|
|
1410
|
+
throw new Error(`@aws-sdk XML parse error: missing closing tag </${tag}>.`);
|
|
1411
|
+
}
|
|
1412
|
+
p.i += 2;
|
|
1413
|
+
const closeTag = p.readTo(">").trim();
|
|
1414
|
+
if (closeTag !== tag) {
|
|
1415
|
+
throw new Error(`@aws-sdk XML parse error: mismatched tags <${tag}> and </${closeTag}>.`);
|
|
1416
|
+
}
|
|
1417
|
+
if (!hasAttrs && textParts.length === 0 && !hasElementChild) {
|
|
1418
|
+
return { tag, value: "" };
|
|
1419
|
+
}
|
|
1420
|
+
if (!hasAttrs && !hasElementChild) {
|
|
1421
|
+
const text = textParts.length === 1 ? textParts[0] : textParts.join("");
|
|
1422
|
+
if (text.trim() === "" && text.includes("\n")) {
|
|
1423
|
+
return { tag, value: "" };
|
|
1424
|
+
}
|
|
1425
|
+
return { tag, value: text };
|
|
1426
|
+
}
|
|
1427
|
+
const obj = {};
|
|
1428
|
+
for (const text of textParts) {
|
|
1429
|
+
if (text.trim() === "" && text.includes("\n")) {
|
|
1430
|
+
continue;
|
|
1431
|
+
}
|
|
1432
|
+
obj["#text"] = "#text" in obj ? obj["#text"] + text : text;
|
|
1433
|
+
}
|
|
1434
|
+
for (const child of childTags) {
|
|
1435
|
+
if (child.tag === "__proto__") {
|
|
1436
|
+
writeKey2(obj);
|
|
1437
|
+
}
|
|
1438
|
+
if (child.tag in obj) {
|
|
1439
|
+
if (Array.isArray(obj[child.tag])) {
|
|
1440
|
+
obj[child.tag].push(child.value);
|
|
1441
|
+
} else {
|
|
1442
|
+
obj[child.tag] = [obj[child.tag], child.value];
|
|
1443
|
+
}
|
|
1444
|
+
} else {
|
|
1445
|
+
obj[child.tag] = child.value;
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
1449
|
+
if (k === "__proto__") {
|
|
1450
|
+
writeKey2(obj);
|
|
1451
|
+
}
|
|
1452
|
+
obj[k] = v;
|
|
1453
|
+
}
|
|
1454
|
+
return { tag, value: obj };
|
|
1455
|
+
}
|
|
1456
|
+
static ENTITIES = {
|
|
1457
|
+
amp: "&",
|
|
1458
|
+
lt: "<",
|
|
1459
|
+
gt: ">",
|
|
1460
|
+
quot: '"',
|
|
1461
|
+
apos: "'"
|
|
1462
|
+
};
|
|
1463
|
+
skipDoctype() {
|
|
1464
|
+
const p = this;
|
|
1465
|
+
p.i += 9;
|
|
1466
|
+
let depth = 0;
|
|
1467
|
+
while (p.i < p.z) {
|
|
1468
|
+
const c = p.x[p.i];
|
|
1469
|
+
if (c === "[") {
|
|
1470
|
+
++depth;
|
|
1471
|
+
} else if (c === "]") {
|
|
1472
|
+
--depth;
|
|
1473
|
+
} else if (c === ">" && depth === 0) {
|
|
1474
|
+
++p.i;
|
|
1475
|
+
return;
|
|
1476
|
+
}
|
|
1477
|
+
++p.i;
|
|
1478
|
+
}
|
|
1479
|
+
throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE.");
|
|
1480
|
+
}
|
|
1481
|
+
decodeEntities(s) {
|
|
1482
|
+
return s.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g, (_, hex, dec, named) => {
|
|
1483
|
+
if (hex) {
|
|
1484
|
+
return String.fromCharCode(parseInt(hex, 16));
|
|
1485
|
+
}
|
|
1486
|
+
if (dec) {
|
|
1487
|
+
return String.fromCharCode(parseInt(dec, 10));
|
|
1488
|
+
}
|
|
1489
|
+
return _AwsXmlParser.ENTITIES[named] ?? "";
|
|
1490
|
+
});
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js
|
|
1495
|
+
var SerdeContextConfig = class {
|
|
1496
|
+
serdeContext;
|
|
1497
|
+
setSerdeContext(serdeContext) {
|
|
1498
|
+
this.serdeContext = serdeContext;
|
|
1499
|
+
}
|
|
1500
|
+
};
|
|
1501
|
+
|
|
1502
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js
|
|
1503
|
+
var UnionSerde = class {
|
|
1504
|
+
from;
|
|
1505
|
+
to;
|
|
1506
|
+
keys;
|
|
1507
|
+
constructor(from, to) {
|
|
1508
|
+
this.from = from;
|
|
1509
|
+
this.to = to;
|
|
1510
|
+
const keys = Object.keys(this.from);
|
|
1511
|
+
const set = new Set(keys);
|
|
1512
|
+
set.delete("__type");
|
|
1513
|
+
this.keys = set;
|
|
1514
|
+
}
|
|
1515
|
+
mark(key) {
|
|
1516
|
+
this.keys.delete(key);
|
|
1517
|
+
}
|
|
1518
|
+
hasUnknown() {
|
|
1519
|
+
return this.keys.size === 1 && Object.keys(this.to).length === 0;
|
|
1520
|
+
}
|
|
1521
|
+
writeUnknown() {
|
|
1522
|
+
if (this.hasUnknown()) {
|
|
1523
|
+
const k = this.keys.values().next().value;
|
|
1524
|
+
const v = this.from[k];
|
|
1525
|
+
this.to.$unknown = [k, v];
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
};
|
|
1529
|
+
|
|
1530
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/writeKey.js
|
|
1531
|
+
function writeKey3(obj) {
|
|
1532
|
+
Object.defineProperty(obj, "__proto__", { value: void 0, writable: true, enumerable: true, configurable: true });
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js
|
|
1536
|
+
var XmlShapeDeserializer = class extends SerdeContextConfig {
|
|
1537
|
+
settings;
|
|
1538
|
+
stringDeserializer;
|
|
1539
|
+
constructor(settings) {
|
|
1540
|
+
super();
|
|
1541
|
+
this.settings = settings;
|
|
1542
|
+
this.stringDeserializer = new FromStringShapeDeserializer(settings);
|
|
1543
|
+
}
|
|
1544
|
+
setSerdeContext(serdeContext) {
|
|
1545
|
+
this.serdeContext = serdeContext;
|
|
1546
|
+
this.stringDeserializer.setSerdeContext(serdeContext);
|
|
1547
|
+
}
|
|
1548
|
+
read(schema, bytes, key) {
|
|
1549
|
+
const ns = NormalizedSchema.of(schema);
|
|
1550
|
+
const memberSchemas = ns.getMemberSchemas();
|
|
1551
|
+
const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => {
|
|
1552
|
+
return !!memberNs.getMemberTraits().eventPayload;
|
|
1553
|
+
});
|
|
1554
|
+
if (isEventPayload) {
|
|
1555
|
+
const output = {};
|
|
1556
|
+
const memberName = Object.keys(memberSchemas)[0];
|
|
1557
|
+
const eventMemberSchema = memberSchemas[memberName];
|
|
1558
|
+
if (eventMemberSchema.isBlobSchema()) {
|
|
1559
|
+
output[memberName] = bytes;
|
|
1560
|
+
} else {
|
|
1561
|
+
output[memberName] = this.read(memberSchemas[memberName], bytes);
|
|
1562
|
+
}
|
|
1563
|
+
return output;
|
|
1564
|
+
}
|
|
1565
|
+
const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes);
|
|
1566
|
+
const parsedObject = this.parseXml(xmlString);
|
|
1567
|
+
return this.readSchema(schema, key ? parsedObject[key] : parsedObject);
|
|
1568
|
+
}
|
|
1569
|
+
readSchema(_schema, value) {
|
|
1570
|
+
const ns = NormalizedSchema.of(_schema);
|
|
1571
|
+
if (ns.isUnitSchema()) {
|
|
1572
|
+
return;
|
|
1573
|
+
}
|
|
1574
|
+
const traits = ns.getMergedTraits();
|
|
1575
|
+
if (ns.isListSchema() && !Array.isArray(value)) {
|
|
1576
|
+
return this.readSchema(ns, [value]);
|
|
1577
|
+
}
|
|
1578
|
+
if (value == null) {
|
|
1579
|
+
return value;
|
|
1580
|
+
}
|
|
1581
|
+
if (typeof value === "object") {
|
|
1582
|
+
const flat = !!traits.xmlFlattened;
|
|
1583
|
+
if (ns.isListSchema()) {
|
|
1584
|
+
const listValue = ns.getValueSchema();
|
|
1585
|
+
const buffer2 = [];
|
|
1586
|
+
const sourceKey = listValue.getMergedTraits().xmlName ?? "member";
|
|
1587
|
+
const source = flat ? value : (value[0] ?? value)[sourceKey];
|
|
1588
|
+
if (source == null) {
|
|
1589
|
+
return buffer2;
|
|
1590
|
+
}
|
|
1591
|
+
const sourceArray = Array.isArray(source) ? source : [source];
|
|
1592
|
+
for (const v of sourceArray) {
|
|
1593
|
+
buffer2.push(this.readSchema(listValue, v));
|
|
1594
|
+
}
|
|
1595
|
+
return buffer2;
|
|
1596
|
+
}
|
|
1597
|
+
const buffer = {};
|
|
1598
|
+
if (ns.isMapSchema()) {
|
|
1599
|
+
const keyNs = ns.getKeySchema();
|
|
1600
|
+
const memberNs = ns.getValueSchema();
|
|
1601
|
+
let entries;
|
|
1602
|
+
if (flat) {
|
|
1603
|
+
entries = Array.isArray(value) ? value : [value];
|
|
1604
|
+
} else {
|
|
1605
|
+
entries = Array.isArray(value.entry) ? value.entry : [value.entry];
|
|
1606
|
+
}
|
|
1607
|
+
const keyProperty = keyNs.getMergedTraits().xmlName ?? "key";
|
|
1608
|
+
const valueProperty = memberNs.getMergedTraits().xmlName ?? "value";
|
|
1609
|
+
for (const entry of entries) {
|
|
1610
|
+
const key = entry[keyProperty];
|
|
1611
|
+
const value2 = entry[valueProperty];
|
|
1612
|
+
if (key === "__proto__") {
|
|
1613
|
+
writeKey3(buffer);
|
|
1614
|
+
}
|
|
1615
|
+
buffer[key] = this.readSchema(memberNs, value2);
|
|
1616
|
+
}
|
|
1617
|
+
return buffer;
|
|
1618
|
+
}
|
|
1619
|
+
if (ns.isStructSchema()) {
|
|
1620
|
+
const union = ns.isUnionSchema();
|
|
1621
|
+
let unionSerde;
|
|
1622
|
+
if (union) {
|
|
1623
|
+
unionSerde = new UnionSerde(value, buffer);
|
|
1624
|
+
}
|
|
1625
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
1626
|
+
const memberTraits = memberSchema.getMergedTraits();
|
|
1627
|
+
const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName();
|
|
1628
|
+
if (union) {
|
|
1629
|
+
unionSerde.mark(xmlObjectKey);
|
|
1630
|
+
}
|
|
1631
|
+
if (value[xmlObjectKey] != null) {
|
|
1632
|
+
buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
if (union) {
|
|
1636
|
+
unionSerde.writeUnknown();
|
|
1637
|
+
}
|
|
1638
|
+
return buffer;
|
|
1639
|
+
}
|
|
1640
|
+
if (ns.isDocumentSchema()) {
|
|
1641
|
+
return value;
|
|
1642
|
+
}
|
|
1643
|
+
throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
|
|
1644
|
+
}
|
|
1645
|
+
if (ns.isListSchema()) {
|
|
1646
|
+
return [];
|
|
1647
|
+
}
|
|
1648
|
+
if (ns.isMapSchema() || ns.isStructSchema()) {
|
|
1649
|
+
return {};
|
|
1650
|
+
}
|
|
1651
|
+
return this.stringDeserializer.read(ns, value);
|
|
1652
|
+
}
|
|
1653
|
+
parseXml(xml) {
|
|
1654
|
+
if (xml.length) {
|
|
1655
|
+
let parsedObj;
|
|
1656
|
+
try {
|
|
1657
|
+
parsedObj = parseXML(xml);
|
|
1658
|
+
} catch (e) {
|
|
1659
|
+
if (e && typeof e === "object") {
|
|
1660
|
+
Object.defineProperty(e, "$responseBodyText", {
|
|
1661
|
+
value: xml
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
throw e;
|
|
1665
|
+
}
|
|
1666
|
+
const textNodeName = "#text";
|
|
1667
|
+
const key = Object.keys(parsedObj)[0];
|
|
1668
|
+
const parsedObjToReturn = parsedObj[key];
|
|
1669
|
+
if (parsedObjToReturn[textNodeName]) {
|
|
1670
|
+
parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
|
|
1671
|
+
delete parsedObjToReturn[textNodeName];
|
|
1672
|
+
}
|
|
1673
|
+
return getValueFromTextNode(parsedObjToReturn);
|
|
1674
|
+
}
|
|
1675
|
+
return {};
|
|
1676
|
+
}
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1679
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js
|
|
1680
|
+
var QueryShapeSerializer = class extends SerdeContextConfig {
|
|
1681
|
+
settings;
|
|
1682
|
+
buffer;
|
|
1683
|
+
constructor(settings) {
|
|
1684
|
+
super();
|
|
1685
|
+
this.settings = settings;
|
|
1686
|
+
}
|
|
1687
|
+
write(schema, value, prefix = "") {
|
|
1688
|
+
if (this.buffer === void 0) {
|
|
1689
|
+
this.buffer = "";
|
|
1690
|
+
}
|
|
1691
|
+
const ns = NormalizedSchema.of(schema);
|
|
1692
|
+
if (prefix && !prefix.endsWith(".")) {
|
|
1693
|
+
prefix += ".";
|
|
1694
|
+
}
|
|
1695
|
+
if (ns.isBlobSchema()) {
|
|
1696
|
+
if (typeof value === "string" || value instanceof Uint8Array) {
|
|
1697
|
+
this.writeKey(prefix);
|
|
1698
|
+
this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value));
|
|
1699
|
+
}
|
|
1700
|
+
} else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
|
|
1701
|
+
if (value != null) {
|
|
1702
|
+
this.writeKey(prefix);
|
|
1703
|
+
this.writeValue(String(value));
|
|
1704
|
+
} else if (ns.isIdempotencyToken()) {
|
|
1705
|
+
this.writeKey(prefix);
|
|
1706
|
+
this.writeValue(generateIdempotencyToken());
|
|
1707
|
+
}
|
|
1708
|
+
} else if (ns.isBigIntegerSchema()) {
|
|
1709
|
+
if (value != null) {
|
|
1710
|
+
this.writeKey(prefix);
|
|
1711
|
+
this.writeValue(String(value));
|
|
1712
|
+
}
|
|
1713
|
+
} else if (ns.isBigDecimalSchema()) {
|
|
1714
|
+
if (value != null) {
|
|
1715
|
+
this.writeKey(prefix);
|
|
1716
|
+
this.writeValue(value instanceof NumericValue ? value.string : String(value));
|
|
1717
|
+
}
|
|
1718
|
+
} else if (ns.isTimestampSchema()) {
|
|
1719
|
+
if (value instanceof Date) {
|
|
1720
|
+
this.writeKey(prefix);
|
|
1721
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
1722
|
+
switch (format) {
|
|
1723
|
+
case 5:
|
|
1724
|
+
this.writeValue(value.toISOString().replace(".000Z", "Z"));
|
|
1725
|
+
break;
|
|
1726
|
+
case 6:
|
|
1727
|
+
this.writeValue(dateToUtcString(value));
|
|
1728
|
+
break;
|
|
1729
|
+
case 7:
|
|
1730
|
+
this.writeValue(String(value.getTime() / 1e3));
|
|
1731
|
+
break;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
} else if (ns.isDocumentSchema()) {
|
|
1735
|
+
if (Array.isArray(value)) {
|
|
1736
|
+
this.write(64 | 15, value, prefix);
|
|
1737
|
+
} else if (value instanceof Date) {
|
|
1738
|
+
this.write(4, value, prefix);
|
|
1739
|
+
} else if (value instanceof Uint8Array) {
|
|
1740
|
+
this.write(21, value, prefix);
|
|
1741
|
+
} else if (value && typeof value === "object") {
|
|
1742
|
+
this.write(128 | 15, value, prefix);
|
|
1743
|
+
} else {
|
|
1744
|
+
this.writeKey(prefix);
|
|
1745
|
+
this.writeValue(String(value));
|
|
1746
|
+
}
|
|
1747
|
+
} else if (ns.isListSchema()) {
|
|
1748
|
+
if (Array.isArray(value)) {
|
|
1749
|
+
if (value.length === 0) {
|
|
1750
|
+
if (this.settings.serializeEmptyLists) {
|
|
1751
|
+
this.writeKey(prefix);
|
|
1752
|
+
this.writeValue("");
|
|
1753
|
+
}
|
|
1754
|
+
} else {
|
|
1755
|
+
const member = ns.getValueSchema();
|
|
1756
|
+
const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
|
|
1757
|
+
let i = 1;
|
|
1758
|
+
for (const item of value) {
|
|
1759
|
+
if (item == null) {
|
|
1760
|
+
continue;
|
|
1761
|
+
}
|
|
1762
|
+
const traits = member.getMergedTraits();
|
|
1763
|
+
const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName);
|
|
1764
|
+
const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;
|
|
1765
|
+
this.write(member, item, key);
|
|
1766
|
+
++i;
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
} else if (ns.isMapSchema()) {
|
|
1771
|
+
if (value && typeof value === "object") {
|
|
1772
|
+
const keySchema = ns.getKeySchema();
|
|
1773
|
+
const memberSchema = ns.getValueSchema();
|
|
1774
|
+
const flat = ns.getMergedTraits().xmlFlattened;
|
|
1775
|
+
let i = 1;
|
|
1776
|
+
for (const k in value) {
|
|
1777
|
+
const v = value[k];
|
|
1778
|
+
if (v == null) {
|
|
1779
|
+
continue;
|
|
1780
|
+
}
|
|
1781
|
+
const keyTraits = keySchema.getMergedTraits();
|
|
1782
|
+
const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName);
|
|
1783
|
+
const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;
|
|
1784
|
+
const valTraits = memberSchema.getMergedTraits();
|
|
1785
|
+
const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName);
|
|
1786
|
+
const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;
|
|
1787
|
+
this.write(keySchema, k, key);
|
|
1788
|
+
this.write(memberSchema, v, valueKey);
|
|
1789
|
+
++i;
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
} else if (ns.isStructSchema()) {
|
|
1793
|
+
if (value && typeof value === "object") {
|
|
1794
|
+
let didWriteMember = false;
|
|
1795
|
+
for (const [memberName, member] of ns.structIterator()) {
|
|
1796
|
+
if (value[memberName] == null && !member.isIdempotencyToken()) {
|
|
1797
|
+
continue;
|
|
1798
|
+
}
|
|
1799
|
+
const traits = member.getMergedTraits();
|
|
1800
|
+
const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct");
|
|
1801
|
+
const key = `${prefix}${suffix}`;
|
|
1802
|
+
this.write(member, value[memberName], key);
|
|
1803
|
+
didWriteMember = true;
|
|
1804
|
+
}
|
|
1805
|
+
if (!didWriteMember && ns.isUnionSchema()) {
|
|
1806
|
+
const { $unknown } = value;
|
|
1807
|
+
if (Array.isArray($unknown)) {
|
|
1808
|
+
const [k, v] = $unknown;
|
|
1809
|
+
const key = `${prefix}${k}`;
|
|
1810
|
+
this.write(15, v, key);
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
} else if (ns.isUnitSchema()) {
|
|
1815
|
+
} else {
|
|
1816
|
+
throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
flush() {
|
|
1820
|
+
if (this.buffer === void 0) {
|
|
1821
|
+
throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
|
|
1822
|
+
}
|
|
1823
|
+
const str = this.buffer;
|
|
1824
|
+
delete this.buffer;
|
|
1825
|
+
return str;
|
|
1826
|
+
}
|
|
1827
|
+
getKey(memberName, xmlName, ec2QueryName, keySource) {
|
|
1828
|
+
const { ec2, capitalizeKeys } = this.settings;
|
|
1829
|
+
if (ec2 && ec2QueryName) {
|
|
1830
|
+
return ec2QueryName;
|
|
1831
|
+
}
|
|
1832
|
+
const key = xmlName ?? memberName;
|
|
1833
|
+
if (capitalizeKeys && keySource === "struct") {
|
|
1834
|
+
return key[0].toUpperCase() + key.slice(1);
|
|
1835
|
+
}
|
|
1836
|
+
return key;
|
|
1837
|
+
}
|
|
1838
|
+
writeKey(key) {
|
|
1839
|
+
if (key.endsWith(".")) {
|
|
1840
|
+
key = key.slice(0, key.length - 1);
|
|
1841
|
+
}
|
|
1842
|
+
this.buffer += `&${extendedEncodeURIComponent(key)}=`;
|
|
1843
|
+
}
|
|
1844
|
+
writeValue(value) {
|
|
1845
|
+
this.buffer += extendedEncodeURIComponent(value);
|
|
1846
|
+
}
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
// ../../node_modules/.pnpm/@aws-sdk+core@3.980.1/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js
|
|
1850
|
+
var AwsQueryProtocol = class extends RpcProtocol {
|
|
1851
|
+
options;
|
|
1852
|
+
serializer;
|
|
1853
|
+
deserializer;
|
|
1854
|
+
mixin = new ProtocolLib();
|
|
1855
|
+
constructor(options) {
|
|
1856
|
+
super({
|
|
1857
|
+
defaultNamespace: options.defaultNamespace,
|
|
1858
|
+
errorTypeRegistries: options.errorTypeRegistries
|
|
1859
|
+
});
|
|
1860
|
+
this.options = options;
|
|
1861
|
+
const settings = {
|
|
1862
|
+
timestampFormat: {
|
|
1863
|
+
useTrait: true,
|
|
1864
|
+
default: 5
|
|
1865
|
+
},
|
|
1866
|
+
httpBindings: false,
|
|
1867
|
+
xmlNamespace: options.xmlNamespace,
|
|
1868
|
+
serviceNamespace: options.defaultNamespace,
|
|
1869
|
+
serializeEmptyLists: true
|
|
1870
|
+
};
|
|
1871
|
+
this.serializer = new QueryShapeSerializer(settings);
|
|
1872
|
+
this.deserializer = new XmlShapeDeserializer(settings);
|
|
1873
|
+
}
|
|
1874
|
+
getShapeId() {
|
|
1875
|
+
return "aws.protocols#awsQuery";
|
|
1876
|
+
}
|
|
1877
|
+
setSerdeContext(serdeContext) {
|
|
1878
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
1879
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
1880
|
+
}
|
|
1881
|
+
getPayloadCodec() {
|
|
1882
|
+
throw new Error("AWSQuery protocol has no payload codec.");
|
|
1883
|
+
}
|
|
1884
|
+
async serializeRequest(operationSchema, input, context) {
|
|
1885
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
1886
|
+
if (!request.path.endsWith("/")) {
|
|
1887
|
+
request.path += "/";
|
|
1888
|
+
}
|
|
1889
|
+
request.headers["content-type"] = "application/x-www-form-urlencoded";
|
|
1890
|
+
if (deref(operationSchema.input) === "unit" || !request.body) {
|
|
1891
|
+
request.body = "";
|
|
1892
|
+
}
|
|
1893
|
+
const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
1894
|
+
request.body = `Action=${action}&Version=${this.options.version}` + request.body;
|
|
1895
|
+
if (request.body.endsWith("&")) {
|
|
1896
|
+
request.body = request.body.slice(-1);
|
|
1897
|
+
}
|
|
1898
|
+
return request;
|
|
1899
|
+
}
|
|
1900
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
1901
|
+
const deserializer = this.deserializer;
|
|
1902
|
+
const ns = NormalizedSchema.of(operationSchema.output);
|
|
1903
|
+
const dataObject = {};
|
|
1904
|
+
if (response.statusCode >= 300) {
|
|
1905
|
+
const bytes2 = await collectBody(response.body, context);
|
|
1906
|
+
if (bytes2.byteLength > 0) {
|
|
1907
|
+
Object.assign(dataObject, await deserializer.read(15, bytes2));
|
|
1908
|
+
}
|
|
1909
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
1910
|
+
}
|
|
1911
|
+
for (const header in response.headers) {
|
|
1912
|
+
const value = response.headers[header];
|
|
1913
|
+
delete response.headers[header];
|
|
1914
|
+
response.headers[header.toLowerCase()] = value;
|
|
1915
|
+
}
|
|
1916
|
+
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
1917
|
+
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
1918
|
+
const bytes = await collectBody(response.body, context);
|
|
1919
|
+
if (bytes.byteLength > 0) {
|
|
1920
|
+
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
1921
|
+
}
|
|
1922
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
1923
|
+
return dataObject;
|
|
1924
|
+
}
|
|
1925
|
+
useNestedResult() {
|
|
1926
|
+
return true;
|
|
1927
|
+
}
|
|
1928
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
1929
|
+
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
1930
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
1931
|
+
const errorData = this.loadQueryError(dataObject) ?? {};
|
|
1932
|
+
const message = this.loadQueryErrorMessage(dataObject);
|
|
1933
|
+
errorData.message = message;
|
|
1934
|
+
errorData.Error = {
|
|
1935
|
+
Type: errorData.Type,
|
|
1936
|
+
Code: errorData.Code,
|
|
1937
|
+
Message: message
|
|
1938
|
+
};
|
|
1939
|
+
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
|
|
1940
|
+
const ns = NormalizedSchema.of(errorSchema);
|
|
1941
|
+
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1942
|
+
const exception = new ErrorCtor({});
|
|
1943
|
+
const output = {
|
|
1944
|
+
Type: errorData.Error.Type,
|
|
1945
|
+
Code: errorData.Error.Code,
|
|
1946
|
+
Error: errorData.Error
|
|
1947
|
+
};
|
|
1948
|
+
for (const [name, member] of ns.structIterator()) {
|
|
1949
|
+
const target = member.getMergedTraits().xmlName ?? name;
|
|
1950
|
+
const value = errorData[target] ?? dataObject[target];
|
|
1951
|
+
output[name] = this.deserializer.readSchema(member, value);
|
|
1952
|
+
}
|
|
1953
|
+
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
1954
|
+
$fault: ns.getMergedTraits().error,
|
|
1955
|
+
message
|
|
1956
|
+
}, output), dataObject);
|
|
1957
|
+
}
|
|
1958
|
+
loadQueryErrorCode(output, data) {
|
|
1959
|
+
const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
|
|
1960
|
+
if (code !== void 0) {
|
|
1961
|
+
return code;
|
|
1962
|
+
}
|
|
1963
|
+
if (output.statusCode == 404) {
|
|
1964
|
+
return "NotFound";
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
loadQueryError(data) {
|
|
1968
|
+
return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;
|
|
1969
|
+
}
|
|
1970
|
+
loadQueryErrorMessage(data) {
|
|
1971
|
+
const errorData = this.loadQueryError(data);
|
|
1972
|
+
return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
|
|
1973
|
+
}
|
|
1974
|
+
getDefaultContentType() {
|
|
1975
|
+
return "application/x-www-form-urlencoded";
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
|
|
1979
|
+
export {
|
|
1980
|
+
SignatureV4,
|
|
1981
|
+
signatureV4aContainer,
|
|
1982
|
+
AwsRestJsonProtocol,
|
|
1983
|
+
AwsQueryProtocol,
|
|
1984
|
+
AwsSdkSigV4Signer,
|
|
1985
|
+
AwsSdkSigV4ASigner,
|
|
1986
|
+
NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
|
|
1987
|
+
resolveAwsSdkSigV4AConfig,
|
|
1988
|
+
NODE_SIGV4A_CONFIG_OPTIONS,
|
|
1989
|
+
resolveAwsSdkSigV4Config,
|
|
1990
|
+
package_default
|
|
1991
|
+
};
|