@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,2753 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HttpRequest,
|
|
3
|
+
HttpResponse,
|
|
4
|
+
IniSectionType,
|
|
5
|
+
LazyJsonString,
|
|
6
|
+
NormalizedSchema,
|
|
7
|
+
NumericValue,
|
|
8
|
+
TypeRegistry,
|
|
9
|
+
Uint8ArrayBlobAdapter,
|
|
10
|
+
_parseEpochTimestamp,
|
|
11
|
+
_parseRfc3339DateTimeWithOffset,
|
|
12
|
+
_parseRfc7231DateTime,
|
|
13
|
+
dateToUtcString,
|
|
14
|
+
fromBase64,
|
|
15
|
+
fromUtf8,
|
|
16
|
+
generateIdempotencyToken,
|
|
17
|
+
hasOwn,
|
|
18
|
+
isValidHostLabel,
|
|
19
|
+
isValidHostname,
|
|
20
|
+
parseEpochTimestamp,
|
|
21
|
+
parseRfc3339DateTimeWithOffset,
|
|
22
|
+
parseRfc7231DateTime,
|
|
23
|
+
quoteHeader,
|
|
24
|
+
sdkStreamMixin,
|
|
25
|
+
splitEvery,
|
|
26
|
+
splitHeader,
|
|
27
|
+
toBase64,
|
|
28
|
+
toUtf8,
|
|
29
|
+
translateTraits,
|
|
30
|
+
writeKey
|
|
31
|
+
} from "./chunk-VRLVLNLG.js";
|
|
32
|
+
|
|
33
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/ProviderError.js
|
|
34
|
+
var ProviderError = class _ProviderError extends Error {
|
|
35
|
+
name = "ProviderError";
|
|
36
|
+
tryNextLink;
|
|
37
|
+
constructor(message, options = true) {
|
|
38
|
+
let logger;
|
|
39
|
+
let tryNextLink = true;
|
|
40
|
+
if (typeof options === "boolean") {
|
|
41
|
+
logger = void 0;
|
|
42
|
+
tryNextLink = options;
|
|
43
|
+
} else if (options != null && typeof options === "object") {
|
|
44
|
+
logger = options.logger;
|
|
45
|
+
tryNextLink = options.tryNextLink ?? true;
|
|
46
|
+
}
|
|
47
|
+
super(message);
|
|
48
|
+
this.tryNextLink = tryNextLink;
|
|
49
|
+
Object.setPrototypeOf(this, _ProviderError.prototype);
|
|
50
|
+
logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
|
|
51
|
+
}
|
|
52
|
+
static from(error, options = true) {
|
|
53
|
+
return Object.assign(new this(error.message, options), error);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/CredentialsProviderError.js
|
|
58
|
+
var CredentialsProviderError = class _CredentialsProviderError extends ProviderError {
|
|
59
|
+
name = "CredentialsProviderError";
|
|
60
|
+
constructor(message, options = true) {
|
|
61
|
+
super(message, options);
|
|
62
|
+
Object.setPrototypeOf(this, _CredentialsProviderError.prototype);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getProfileName.js
|
|
67
|
+
var ENV_PROFILE = "AWS_PROFILE";
|
|
68
|
+
var DEFAULT_PROFILE = "default";
|
|
69
|
+
var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
|
|
70
|
+
|
|
71
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js
|
|
72
|
+
import { join } from "path";
|
|
73
|
+
|
|
74
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js
|
|
75
|
+
import { homedir } from "os";
|
|
76
|
+
import { sep } from "path";
|
|
77
|
+
var homeDirCache = {};
|
|
78
|
+
var getHomeDirCacheKey = () => {
|
|
79
|
+
if (process && process.geteuid) {
|
|
80
|
+
return `${process.geteuid()}`;
|
|
81
|
+
}
|
|
82
|
+
return "DEFAULT";
|
|
83
|
+
};
|
|
84
|
+
var getHomeDir = () => {
|
|
85
|
+
const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${sep}` } = process.env;
|
|
86
|
+
if (HOME) {
|
|
87
|
+
return HOME;
|
|
88
|
+
}
|
|
89
|
+
if (USERPROFILE) {
|
|
90
|
+
return USERPROFILE;
|
|
91
|
+
}
|
|
92
|
+
if (HOMEPATH) {
|
|
93
|
+
return `${HOMEDRIVE}${HOMEPATH}`;
|
|
94
|
+
}
|
|
95
|
+
const homeDirCacheKey = getHomeDirCacheKey();
|
|
96
|
+
if (!homeDirCache[homeDirCacheKey]) {
|
|
97
|
+
homeDirCache[homeDirCacheKey] = homedir();
|
|
98
|
+
}
|
|
99
|
+
return homeDirCache[homeDirCacheKey];
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigFilepath.js
|
|
103
|
+
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
104
|
+
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || join(getHomeDir(), ".aws", "config");
|
|
105
|
+
|
|
106
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js
|
|
107
|
+
import { join as join3 } from "path";
|
|
108
|
+
|
|
109
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/constants.js
|
|
110
|
+
var CONFIG_PREFIX_SEPARATOR = ".";
|
|
111
|
+
|
|
112
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getConfigData.js
|
|
113
|
+
var getConfigData = (data) => Object.entries(data).filter(([key]) => {
|
|
114
|
+
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
115
|
+
if (indexOfSeparator === -1) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
return Object.values(IniSectionType).includes(key.substring(0, indexOfSeparator));
|
|
119
|
+
}).reduce((acc, [key, value]) => {
|
|
120
|
+
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
121
|
+
const updatedKey = key.substring(0, indexOfSeparator) === IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
|
|
122
|
+
acc[updatedKey] = value;
|
|
123
|
+
return acc;
|
|
124
|
+
}, {
|
|
125
|
+
...data.default && { default: data.default }
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getCredentialsFilepath.js
|
|
129
|
+
import { join as join2 } from "path";
|
|
130
|
+
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
131
|
+
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || join2(getHomeDir(), ".aws", "credentials");
|
|
132
|
+
|
|
133
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseIni.js
|
|
134
|
+
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/;
|
|
135
|
+
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
136
|
+
var parseIni = (iniData) => {
|
|
137
|
+
const map = {};
|
|
138
|
+
let currentSection;
|
|
139
|
+
let currentSubSection;
|
|
140
|
+
for (const iniLine of iniData.split(/\r?\n/)) {
|
|
141
|
+
const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
|
|
142
|
+
const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
|
|
143
|
+
if (isSection) {
|
|
144
|
+
currentSection = void 0;
|
|
145
|
+
currentSubSection = void 0;
|
|
146
|
+
const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
|
|
147
|
+
const matches = prefixKeyRegex.exec(sectionName);
|
|
148
|
+
if (matches) {
|
|
149
|
+
const [, prefix, , name] = matches;
|
|
150
|
+
if (Object.values(IniSectionType).includes(prefix)) {
|
|
151
|
+
currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
|
|
152
|
+
}
|
|
153
|
+
} else {
|
|
154
|
+
currentSection = sectionName;
|
|
155
|
+
}
|
|
156
|
+
if (profileNameBlockList.includes(sectionName)) {
|
|
157
|
+
throw new Error(`Found invalid profile name "${sectionName}"`);
|
|
158
|
+
}
|
|
159
|
+
} else if (currentSection) {
|
|
160
|
+
const indexOfEqualsSign = trimmedLine.indexOf("=");
|
|
161
|
+
if (![0, -1].includes(indexOfEqualsSign)) {
|
|
162
|
+
const [name, value] = [
|
|
163
|
+
trimmedLine.substring(0, indexOfEqualsSign).trim(),
|
|
164
|
+
trimmedLine.substring(indexOfEqualsSign + 1).trim()
|
|
165
|
+
];
|
|
166
|
+
if (value === "") {
|
|
167
|
+
currentSubSection = name;
|
|
168
|
+
} else {
|
|
169
|
+
if (currentSubSection && iniLine.trimStart() === iniLine) {
|
|
170
|
+
currentSubSection = void 0;
|
|
171
|
+
}
|
|
172
|
+
map[currentSection] = map[currentSection] || {};
|
|
173
|
+
const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
|
|
174
|
+
map[currentSection][key] = value;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return map;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/readFile.js
|
|
183
|
+
import { readFile as fsReadFile } from "fs/promises";
|
|
184
|
+
var filePromises = {};
|
|
185
|
+
var fileIntercept = {};
|
|
186
|
+
var readFile = (path, options) => {
|
|
187
|
+
if (fileIntercept[path] !== void 0) {
|
|
188
|
+
return fileIntercept[path];
|
|
189
|
+
}
|
|
190
|
+
if (!filePromises[path] || options?.ignoreCache) {
|
|
191
|
+
filePromises[path] = fsReadFile(path, "utf8");
|
|
192
|
+
}
|
|
193
|
+
return filePromises[path];
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSharedConfigFiles.js
|
|
197
|
+
var swallowError = () => ({});
|
|
198
|
+
var loadSharedConfigFiles = async (init = {}) => {
|
|
199
|
+
const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
|
|
200
|
+
const homeDir = getHomeDir();
|
|
201
|
+
const relativeHomeDirPrefix = "~/";
|
|
202
|
+
let resolvedFilepath = filepath;
|
|
203
|
+
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
|
204
|
+
resolvedFilepath = join3(homeDir, filepath.slice(2));
|
|
205
|
+
}
|
|
206
|
+
let resolvedConfigFilepath = configFilepath;
|
|
207
|
+
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
|
208
|
+
resolvedConfigFilepath = join3(homeDir, configFilepath.slice(2));
|
|
209
|
+
}
|
|
210
|
+
const parsedFiles = await Promise.all([
|
|
211
|
+
readFile(resolvedConfigFilepath, {
|
|
212
|
+
ignoreCache: init.ignoreCache
|
|
213
|
+
}).then(parseIni).then(getConfigData).catch(swallowError),
|
|
214
|
+
readFile(resolvedFilepath, {
|
|
215
|
+
ignoreCache: init.ignoreCache
|
|
216
|
+
}).then(parseIni).catch(swallowError)
|
|
217
|
+
]);
|
|
218
|
+
return {
|
|
219
|
+
configFile: parsedFiles[0],
|
|
220
|
+
credentialsFile: parsedFiles[1]
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSsoSessionData.js
|
|
225
|
+
var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
|
|
226
|
+
|
|
227
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/loadSsoSessionData.js
|
|
228
|
+
var swallowError2 = () => ({});
|
|
229
|
+
var loadSsoSessionData = async (init = {}) => readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2);
|
|
230
|
+
|
|
231
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js
|
|
232
|
+
var mergeConfigFiles = (...files) => {
|
|
233
|
+
const merged = {};
|
|
234
|
+
for (const file of files) {
|
|
235
|
+
for (const [key, values] of Object.entries(file)) {
|
|
236
|
+
if (merged[key] !== void 0) {
|
|
237
|
+
Object.assign(merged[key], values);
|
|
238
|
+
} else {
|
|
239
|
+
merged[key] = values;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return merged;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js
|
|
247
|
+
var parseKnownFiles = async (init) => {
|
|
248
|
+
const parsedFiles = await loadSharedConfigFiles(init);
|
|
249
|
+
return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js
|
|
253
|
+
import { readFile as readFile2 } from "fs/promises";
|
|
254
|
+
|
|
255
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFilepath.js
|
|
256
|
+
import { createHash } from "crypto";
|
|
257
|
+
import { join as join4 } from "path";
|
|
258
|
+
var getSSOTokenFilepath = (id) => {
|
|
259
|
+
const hasher = createHash("sha1");
|
|
260
|
+
const cacheName = hasher.update(id).digest("hex");
|
|
261
|
+
return join4(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getSSOTokenFromFile.js
|
|
265
|
+
var tokenIntercept = {};
|
|
266
|
+
var getSSOTokenFromFile = async (id) => {
|
|
267
|
+
if (tokenIntercept[id]) {
|
|
268
|
+
return tokenIntercept[id];
|
|
269
|
+
}
|
|
270
|
+
const ssoTokenFilepath = getSSOTokenFilepath(id);
|
|
271
|
+
const ssoTokenText = await readFile2(ssoTokenFilepath, "utf8");
|
|
272
|
+
return JSON.parse(ssoTokenText);
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/externalDataInterceptor.js
|
|
276
|
+
var externalDataInterceptor = {
|
|
277
|
+
getFileRecord() {
|
|
278
|
+
return fileIntercept;
|
|
279
|
+
},
|
|
280
|
+
interceptFile(path, contents) {
|
|
281
|
+
fileIntercept[path] = Promise.resolve(contents);
|
|
282
|
+
},
|
|
283
|
+
getTokenRecord() {
|
|
284
|
+
return tokenIntercept;
|
|
285
|
+
},
|
|
286
|
+
interceptToken(id, contents) {
|
|
287
|
+
tokenIntercept[id] = contents;
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/chain.js
|
|
292
|
+
var chain = (...providers) => async () => {
|
|
293
|
+
if (providers.length === 0) {
|
|
294
|
+
throw new ProviderError("No providers in chain");
|
|
295
|
+
}
|
|
296
|
+
let lastProviderError;
|
|
297
|
+
for (const provider of providers) {
|
|
298
|
+
try {
|
|
299
|
+
const credentials = await provider();
|
|
300
|
+
return credentials;
|
|
301
|
+
} catch (err) {
|
|
302
|
+
lastProviderError = err;
|
|
303
|
+
if (err?.tryNextLink) {
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
throw err;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
throw lastProviderError;
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js
|
|
313
|
+
var memoize = (provider, isExpired, requiresRefresh) => {
|
|
314
|
+
let resolved;
|
|
315
|
+
let pending;
|
|
316
|
+
let hasResult;
|
|
317
|
+
let isConstant = false;
|
|
318
|
+
const coalesceProvider = async () => {
|
|
319
|
+
if (!pending) {
|
|
320
|
+
pending = provider();
|
|
321
|
+
}
|
|
322
|
+
try {
|
|
323
|
+
resolved = await pending;
|
|
324
|
+
hasResult = true;
|
|
325
|
+
isConstant = false;
|
|
326
|
+
} finally {
|
|
327
|
+
pending = void 0;
|
|
328
|
+
}
|
|
329
|
+
return resolved;
|
|
330
|
+
};
|
|
331
|
+
if (isExpired === void 0) {
|
|
332
|
+
return async (options) => {
|
|
333
|
+
if (!hasResult || options?.forceRefresh) {
|
|
334
|
+
resolved = await coalesceProvider();
|
|
335
|
+
}
|
|
336
|
+
return resolved;
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
return async (options) => {
|
|
340
|
+
if (!hasResult || options?.forceRefresh) {
|
|
341
|
+
resolved = await coalesceProvider();
|
|
342
|
+
}
|
|
343
|
+
if (isConstant) {
|
|
344
|
+
return resolved;
|
|
345
|
+
}
|
|
346
|
+
if (requiresRefresh && !requiresRefresh(resolved)) {
|
|
347
|
+
isConstant = true;
|
|
348
|
+
return resolved;
|
|
349
|
+
}
|
|
350
|
+
if (isExpired(resolved)) {
|
|
351
|
+
await coalesceProvider();
|
|
352
|
+
return resolved;
|
|
353
|
+
}
|
|
354
|
+
return resolved;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js
|
|
359
|
+
function getSelectorName(functionString) {
|
|
360
|
+
try {
|
|
361
|
+
const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
|
|
362
|
+
constants.delete("CONFIG");
|
|
363
|
+
constants.delete("CONFIG_PREFIX_SEPARATOR");
|
|
364
|
+
constants.delete("ENV");
|
|
365
|
+
return [...constants].join(", ");
|
|
366
|
+
} catch (ignored) {
|
|
367
|
+
return functionString;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js
|
|
372
|
+
var fromEnv = (envVarSelector, options) => async () => {
|
|
373
|
+
try {
|
|
374
|
+
const config = envVarSelector(process.env, options);
|
|
375
|
+
if (config === void 0) {
|
|
376
|
+
throw new Error();
|
|
377
|
+
}
|
|
378
|
+
return config;
|
|
379
|
+
} catch (e) {
|
|
380
|
+
throw new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js
|
|
385
|
+
var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
|
|
386
|
+
const profile = getProfileName(init);
|
|
387
|
+
const { configFile, credentialsFile } = await loadSharedConfigFiles(init);
|
|
388
|
+
const profileFromCredentials = credentialsFile[profile] || {};
|
|
389
|
+
const profileFromConfig = configFile[profile] || {};
|
|
390
|
+
const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
|
|
391
|
+
try {
|
|
392
|
+
const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
|
|
393
|
+
const configValue = configSelector(mergedProfile, cfgFile);
|
|
394
|
+
if (configValue === void 0) {
|
|
395
|
+
throw new Error();
|
|
396
|
+
}
|
|
397
|
+
return configValue;
|
|
398
|
+
} catch (e) {
|
|
399
|
+
throw new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js
|
|
404
|
+
var fromValue = (staticValue) => () => Promise.resolve(staticValue);
|
|
405
|
+
|
|
406
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js
|
|
407
|
+
var isFunction = (func) => typeof func === "function";
|
|
408
|
+
var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue);
|
|
409
|
+
|
|
410
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js
|
|
411
|
+
var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
|
|
412
|
+
const { signingName, logger } = configuration;
|
|
413
|
+
const envOptions = { signingName, logger };
|
|
414
|
+
return memoize(chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js
|
|
418
|
+
var validRegions = /* @__PURE__ */ new Set();
|
|
419
|
+
var checkRegion = (region, check = isValidHostLabel) => {
|
|
420
|
+
if (!validRegions.has(region) && !check(region)) {
|
|
421
|
+
if (region === "*") {
|
|
422
|
+
console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
|
|
423
|
+
} else {
|
|
424
|
+
throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
|
|
425
|
+
}
|
|
426
|
+
} else {
|
|
427
|
+
validRegions.add(region);
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/isFipsRegion.js
|
|
432
|
+
var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
|
|
433
|
+
|
|
434
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getRealRegion.js
|
|
435
|
+
var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
|
|
436
|
+
|
|
437
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/resolveRegionConfig.js
|
|
438
|
+
var resolveRegionConfig = (input) => {
|
|
439
|
+
const { region, useFipsEndpoint } = input;
|
|
440
|
+
if (!region) {
|
|
441
|
+
throw new Error("Region is missing");
|
|
442
|
+
}
|
|
443
|
+
return Object.assign(input, {
|
|
444
|
+
region: async () => {
|
|
445
|
+
const providedRegion = typeof region === "function" ? await region() : region;
|
|
446
|
+
const realRegion = getRealRegion(providedRegion);
|
|
447
|
+
checkRegion(realRegion);
|
|
448
|
+
return realRegion;
|
|
449
|
+
},
|
|
450
|
+
useFipsEndpoint: async () => {
|
|
451
|
+
const providedRegion = typeof region === "string" ? region : await region();
|
|
452
|
+
if (isFipsRegion(providedRegion)) {
|
|
453
|
+
return true;
|
|
454
|
+
}
|
|
455
|
+
return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/property-provider/TokenProviderError.js
|
|
461
|
+
var TokenProviderError = class _TokenProviderError extends ProviderError {
|
|
462
|
+
name = "TokenProviderError";
|
|
463
|
+
constructor(message, options = true) {
|
|
464
|
+
super(message, options);
|
|
465
|
+
Object.setPrototypeOf(this, _TokenProviderError.prototype);
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js
|
|
470
|
+
var booleanSelector = (obj, key, type) => {
|
|
471
|
+
if (!(key in obj)) {
|
|
472
|
+
return void 0;
|
|
473
|
+
}
|
|
474
|
+
if (obj[key] === "true") {
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
477
|
+
if (obj[key] === "false") {
|
|
478
|
+
return false;
|
|
479
|
+
}
|
|
480
|
+
throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/types.js
|
|
484
|
+
var SelectorType;
|
|
485
|
+
(function(SelectorType2) {
|
|
486
|
+
SelectorType2["ENV"] = "env";
|
|
487
|
+
SelectorType2["CONFIG"] = "shared config entry";
|
|
488
|
+
})(SelectorType || (SelectorType = {}));
|
|
489
|
+
|
|
490
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js
|
|
491
|
+
var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
|
|
492
|
+
var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
|
|
493
|
+
var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
|
|
494
|
+
environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
|
|
495
|
+
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
|
|
496
|
+
default: false
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/endpointsConfig/NodeUseFipsEndpointConfigOptions.js
|
|
500
|
+
var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
|
|
501
|
+
var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
|
|
502
|
+
var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
|
|
503
|
+
environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
|
|
504
|
+
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
|
|
505
|
+
default: false
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/constants.js
|
|
509
|
+
var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
|
|
510
|
+
var AWS_REGION_ENV = "AWS_REGION";
|
|
511
|
+
var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
|
|
512
|
+
var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
513
|
+
var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
|
|
514
|
+
var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
|
|
515
|
+
var IMDS_TOKEN_PATH = "/latest/api/token";
|
|
516
|
+
var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
|
|
517
|
+
var X_AWS_EC2_METADATA_TOKEN_TTL = "x-aws-ec2-metadata-token-ttl-seconds";
|
|
518
|
+
|
|
519
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/getInstanceMetadataRegion.js
|
|
520
|
+
var TIMEOUT_MS = 1e3;
|
|
521
|
+
var NEG_CACHE_TTL_MS = 6e4;
|
|
522
|
+
var negativeCacheUntil = 0;
|
|
523
|
+
var getInstanceMetadataRegion = async () => {
|
|
524
|
+
if (process.env[ENV_IMDS_DISABLED]) {
|
|
525
|
+
return void 0;
|
|
526
|
+
}
|
|
527
|
+
if (Date.now() < negativeCacheUntil) {
|
|
528
|
+
return void 0;
|
|
529
|
+
}
|
|
530
|
+
try {
|
|
531
|
+
const endpoint = resolveImdsEndpoint();
|
|
532
|
+
const token = (await imdsRequest({
|
|
533
|
+
...endpoint,
|
|
534
|
+
path: IMDS_TOKEN_PATH,
|
|
535
|
+
method: "PUT",
|
|
536
|
+
headers: {
|
|
537
|
+
[X_AWS_EC2_METADATA_TOKEN_TTL]: "21600"
|
|
538
|
+
}
|
|
539
|
+
})).toString();
|
|
540
|
+
const region = (await imdsRequest({
|
|
541
|
+
...endpoint,
|
|
542
|
+
path: IMDS_REGION_PATH,
|
|
543
|
+
method: "GET",
|
|
544
|
+
headers: {
|
|
545
|
+
[X_AWS_EC2_METADATA_TOKEN]: token
|
|
546
|
+
}
|
|
547
|
+
})).toString().trim();
|
|
548
|
+
return region || cacheNegativeAndReturnUndefined();
|
|
549
|
+
} catch {
|
|
550
|
+
return cacheNegativeAndReturnUndefined();
|
|
551
|
+
}
|
|
552
|
+
};
|
|
553
|
+
var cacheNegativeAndReturnUndefined = () => {
|
|
554
|
+
negativeCacheUntil = Date.now() + NEG_CACHE_TTL_MS;
|
|
555
|
+
return void 0;
|
|
556
|
+
};
|
|
557
|
+
var resolveImdsEndpoint = () => {
|
|
558
|
+
const envEndpoint = process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT;
|
|
559
|
+
if (envEndpoint) {
|
|
560
|
+
const url = new URL(envEndpoint);
|
|
561
|
+
return {
|
|
562
|
+
hostname: url.hostname.replace(/^\[(.+)]$/, "$1"),
|
|
563
|
+
port: url.port ? Number(url.port) : void 0
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
if (process.env.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE === "IPv6") {
|
|
567
|
+
return { hostname: "fd00:ec2::254" };
|
|
568
|
+
}
|
|
569
|
+
return { hostname: "169.254.169.254" };
|
|
570
|
+
};
|
|
571
|
+
var imdsRequest = async (options) => {
|
|
572
|
+
const { request } = await import("http");
|
|
573
|
+
return new Promise((resolve, reject) => {
|
|
574
|
+
const req = request({
|
|
575
|
+
hostname: options.hostname,
|
|
576
|
+
port: options.port,
|
|
577
|
+
path: options.path,
|
|
578
|
+
method: options.method,
|
|
579
|
+
headers: options.headers,
|
|
580
|
+
timeout: TIMEOUT_MS,
|
|
581
|
+
signal: AbortSignal.timeout(TIMEOUT_MS)
|
|
582
|
+
});
|
|
583
|
+
req.on("error", (err) => {
|
|
584
|
+
reject(err);
|
|
585
|
+
req.destroy();
|
|
586
|
+
});
|
|
587
|
+
req.on("timeout", () => {
|
|
588
|
+
reject(new Error("TimeoutError from instance metadata service"));
|
|
589
|
+
req.destroy();
|
|
590
|
+
});
|
|
591
|
+
req.on("response", (res) => {
|
|
592
|
+
const { statusCode = 400 } = res;
|
|
593
|
+
if (statusCode < 200 || statusCode >= 300) {
|
|
594
|
+
reject(Object.assign(new Error("Error response received from instance metadata service"), { statusCode }));
|
|
595
|
+
req.destroy();
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
const chunks = [];
|
|
599
|
+
res.on("data", (chunk) => chunks.push(chunk));
|
|
600
|
+
res.on("end", () => {
|
|
601
|
+
resolve(Buffer.concat(chunks));
|
|
602
|
+
req.destroy();
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
req.end();
|
|
606
|
+
});
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/config.js
|
|
610
|
+
var REGION_ENV_NAME = "AWS_REGION";
|
|
611
|
+
var REGION_INI_NAME = "region";
|
|
612
|
+
var NODE_REGION_CONFIG_OPTIONS = {
|
|
613
|
+
environmentVariableSelector: (env) => env[REGION_ENV_NAME],
|
|
614
|
+
configFileSelector: (profile) => profile[REGION_INI_NAME],
|
|
615
|
+
default: async () => {
|
|
616
|
+
const region = await getInstanceMetadataRegion();
|
|
617
|
+
if (region) {
|
|
618
|
+
return region;
|
|
619
|
+
}
|
|
620
|
+
throw new Error("Region is missing");
|
|
621
|
+
}
|
|
622
|
+
};
|
|
623
|
+
var NODE_REGION_CONFIG_FILE_OPTIONS = {
|
|
624
|
+
preferredFile: "credentials"
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/defaultsModeConfig.js
|
|
628
|
+
var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
|
|
629
|
+
var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
|
|
630
|
+
var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
|
|
631
|
+
environmentVariableSelector: (env) => {
|
|
632
|
+
return env[AWS_DEFAULTS_MODE_ENV];
|
|
633
|
+
},
|
|
634
|
+
configFileSelector: (profile) => {
|
|
635
|
+
return profile[AWS_DEFAULTS_MODE_CONFIG];
|
|
636
|
+
},
|
|
637
|
+
default: "legacy"
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/config/defaults-mode/resolveDefaultsModeConfig.js
|
|
641
|
+
var resolveDefaultsModeConfig = ({ region = loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => memoize(async () => {
|
|
642
|
+
const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
|
|
643
|
+
switch (mode?.toLowerCase()) {
|
|
644
|
+
case "auto":
|
|
645
|
+
return resolveNodeDefaultsModeAuto(region);
|
|
646
|
+
case "in-region":
|
|
647
|
+
case "cross-region":
|
|
648
|
+
case "mobile":
|
|
649
|
+
case "standard":
|
|
650
|
+
case "legacy":
|
|
651
|
+
return Promise.resolve(mode?.toLocaleLowerCase());
|
|
652
|
+
case void 0:
|
|
653
|
+
return Promise.resolve("legacy");
|
|
654
|
+
default:
|
|
655
|
+
throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
var resolveNodeDefaultsModeAuto = async (clientRegion) => {
|
|
659
|
+
if (clientRegion) {
|
|
660
|
+
const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
|
|
661
|
+
const inferredRegion = await inferPhysicalRegion();
|
|
662
|
+
if (!inferredRegion) {
|
|
663
|
+
return "standard";
|
|
664
|
+
}
|
|
665
|
+
if (resolvedRegion === inferredRegion) {
|
|
666
|
+
return "in-region";
|
|
667
|
+
} else {
|
|
668
|
+
return "cross-region";
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return "standard";
|
|
672
|
+
};
|
|
673
|
+
var inferPhysicalRegion = async () => {
|
|
674
|
+
if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
|
|
675
|
+
return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
|
|
676
|
+
}
|
|
677
|
+
return getInstanceMetadataRegion();
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js
|
|
681
|
+
var CONTENT_LENGTH_HEADER = "content-length";
|
|
682
|
+
function contentLengthMiddleware(bodyLengthChecker) {
|
|
683
|
+
return (next) => async (args) => {
|
|
684
|
+
const request = args.request;
|
|
685
|
+
if (HttpRequest.isInstance(request)) {
|
|
686
|
+
const { body, headers } = request;
|
|
687
|
+
if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {
|
|
688
|
+
try {
|
|
689
|
+
const length = bodyLengthChecker(body);
|
|
690
|
+
if (length != null) {
|
|
691
|
+
request.headers = {
|
|
692
|
+
...request.headers,
|
|
693
|
+
[CONTENT_LENGTH_HEADER]: String(length)
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
} catch (ignored) {
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return next({
|
|
701
|
+
...args,
|
|
702
|
+
request
|
|
703
|
+
});
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
var contentLengthMiddlewareOptions = {
|
|
707
|
+
step: "build",
|
|
708
|
+
tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
|
|
709
|
+
name: "contentLengthMiddleware",
|
|
710
|
+
override: true
|
|
711
|
+
};
|
|
712
|
+
var getContentLengthPlugin = (options) => ({
|
|
713
|
+
applyToStack: (clientStack) => {
|
|
714
|
+
clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js
|
|
719
|
+
var collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
720
|
+
if (streamBody instanceof Uint8Array) {
|
|
721
|
+
return Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
722
|
+
}
|
|
723
|
+
if (!streamBody) {
|
|
724
|
+
return Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
725
|
+
}
|
|
726
|
+
const fromContext = context.streamCollector(streamBody);
|
|
727
|
+
return Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js
|
|
731
|
+
function extendedEncodeURIComponent(str) {
|
|
732
|
+
return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
|
|
733
|
+
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
734
|
+
});
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js
|
|
738
|
+
var SerdeContext = class {
|
|
739
|
+
serdeContext;
|
|
740
|
+
setSerdeContext(serdeContext) {
|
|
741
|
+
this.serdeContext = serdeContext;
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js
|
|
746
|
+
var HttpProtocol = class extends SerdeContext {
|
|
747
|
+
options;
|
|
748
|
+
compositeErrorRegistry;
|
|
749
|
+
constructor(options) {
|
|
750
|
+
super();
|
|
751
|
+
this.options = options;
|
|
752
|
+
this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
|
|
753
|
+
for (const etr of options.errorTypeRegistries ?? []) {
|
|
754
|
+
this.compositeErrorRegistry.copyFrom(etr);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
getRequestType() {
|
|
758
|
+
return HttpRequest;
|
|
759
|
+
}
|
|
760
|
+
getResponseType() {
|
|
761
|
+
return HttpResponse;
|
|
762
|
+
}
|
|
763
|
+
setSerdeContext(serdeContext) {
|
|
764
|
+
this.serdeContext = serdeContext;
|
|
765
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
766
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
767
|
+
if (this.getPayloadCodec()) {
|
|
768
|
+
this.getPayloadCodec().setSerdeContext(serdeContext);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
updateServiceEndpoint(request, endpoint) {
|
|
772
|
+
if ("url" in endpoint) {
|
|
773
|
+
request.protocol = endpoint.url.protocol;
|
|
774
|
+
request.hostname = endpoint.url.hostname;
|
|
775
|
+
request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0;
|
|
776
|
+
request.path = endpoint.url.pathname;
|
|
777
|
+
request.fragment = endpoint.url.hash || void 0;
|
|
778
|
+
request.username = endpoint.url.username || void 0;
|
|
779
|
+
request.password = endpoint.url.password || void 0;
|
|
780
|
+
if (!request.query) {
|
|
781
|
+
request.query = {};
|
|
782
|
+
}
|
|
783
|
+
for (const [k, v] of endpoint.url.searchParams.entries()) {
|
|
784
|
+
request.query[k] = v;
|
|
785
|
+
}
|
|
786
|
+
if (endpoint.headers) {
|
|
787
|
+
for (const name in endpoint.headers) {
|
|
788
|
+
if (!hasOwn(endpoint.headers, name)) {
|
|
789
|
+
continue;
|
|
790
|
+
}
|
|
791
|
+
request.headers[name] = endpoint.headers[name].join(", ");
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
return request;
|
|
795
|
+
} else {
|
|
796
|
+
request.protocol = endpoint.protocol;
|
|
797
|
+
request.hostname = endpoint.hostname;
|
|
798
|
+
request.port = endpoint.port ? Number(endpoint.port) : void 0;
|
|
799
|
+
request.path = endpoint.path;
|
|
800
|
+
request.query = {
|
|
801
|
+
...endpoint.query
|
|
802
|
+
};
|
|
803
|
+
if (endpoint.headers) {
|
|
804
|
+
for (const name in endpoint.headers) {
|
|
805
|
+
if (!hasOwn(endpoint.headers, name)) {
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
request.headers[name] = endpoint.headers[name];
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
return request;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
setHostPrefix(request, operationSchema, input) {
|
|
815
|
+
if (this.serdeContext?.disableHostPrefix) {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
const inputNs = NormalizedSchema.of(operationSchema.input);
|
|
819
|
+
const opTraits = translateTraits(operationSchema.traits ?? {});
|
|
820
|
+
if (opTraits.endpoint) {
|
|
821
|
+
let hostPrefix = opTraits.endpoint?.[0];
|
|
822
|
+
if (typeof hostPrefix === "string") {
|
|
823
|
+
for (const [name, member] of inputNs.structIterator()) {
|
|
824
|
+
if (!member.getMergedTraits().hostLabel) {
|
|
825
|
+
continue;
|
|
826
|
+
}
|
|
827
|
+
const replacement = input[name];
|
|
828
|
+
if (typeof replacement !== "string") {
|
|
829
|
+
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
830
|
+
}
|
|
831
|
+
hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
|
|
832
|
+
}
|
|
833
|
+
request.hostname = hostPrefix + request.hostname;
|
|
834
|
+
if (!isValidHostname(request.hostname)) {
|
|
835
|
+
throw new Error(`[${request.hostname}] is not a valid hostname.`);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
deserializeMetadata(output) {
|
|
841
|
+
return {
|
|
842
|
+
httpStatusCode: output.statusCode,
|
|
843
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
844
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
845
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
resolveError(name, namespaces, registries) {
|
|
849
|
+
const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
|
|
850
|
+
let schema;
|
|
851
|
+
for (const registry of registries) {
|
|
852
|
+
for (const ns of namespaces) {
|
|
853
|
+
try {
|
|
854
|
+
if (ns === "*") {
|
|
855
|
+
schema = registry.getSchema(name);
|
|
856
|
+
} else {
|
|
857
|
+
schema = registry.getSchema(ns + "#" + name);
|
|
858
|
+
}
|
|
859
|
+
const errorCtor = registry.getErrorCtor(schema);
|
|
860
|
+
if (errorCtor) {
|
|
861
|
+
return [schema, errorCtor, "modeled"];
|
|
862
|
+
} else {
|
|
863
|
+
const syntheticErrorSchema = registry.getBaseException();
|
|
864
|
+
if (syntheticErrorSchema) {
|
|
865
|
+
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
|
866
|
+
if (syntheticErrorCtor) {
|
|
867
|
+
return [schema, syntheticErrorCtor, "synthetic"];
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
} catch (ignored) {
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
for (const registry of registries) {
|
|
876
|
+
const syntheticErrorSchema = registry.getBaseException();
|
|
877
|
+
if (syntheticErrorSchema) {
|
|
878
|
+
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
|
879
|
+
if (syntheticErrorCtor) {
|
|
880
|
+
return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
return [defaultErrorSchema, Error, "native"];
|
|
885
|
+
}
|
|
886
|
+
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
|
887
|
+
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
888
|
+
return eventStreamSerde.serializeEventStream({
|
|
889
|
+
eventStream,
|
|
890
|
+
requestSchema,
|
|
891
|
+
initialRequest
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
|
|
895
|
+
const eventStreamSerde = await this.loadEventStreamCapability();
|
|
896
|
+
return eventStreamSerde.deserializeEventStream({
|
|
897
|
+
response,
|
|
898
|
+
responseSchema,
|
|
899
|
+
initialResponseContainer
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
async loadEventStreamCapability() {
|
|
903
|
+
const { EventStreamSerde, eventStreamSerdeProvider } = await import("./event-streams-DRE6QVD6.js");
|
|
904
|
+
const marshaller = this.resolveEventStreamMarshaller(eventStreamSerdeProvider);
|
|
905
|
+
return new EventStreamSerde({
|
|
906
|
+
marshaller,
|
|
907
|
+
serializer: this.serializer,
|
|
908
|
+
deserializer: this.deserializer,
|
|
909
|
+
serdeContext: this.serdeContext,
|
|
910
|
+
defaultContentType: this.getDefaultContentType(),
|
|
911
|
+
compositeErrorRegistry: this.compositeErrorRegistry
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
getDefaultContentType() {
|
|
915
|
+
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
916
|
+
}
|
|
917
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
918
|
+
void schema;
|
|
919
|
+
void context;
|
|
920
|
+
void response;
|
|
921
|
+
void arg4;
|
|
922
|
+
void arg5;
|
|
923
|
+
return [];
|
|
924
|
+
}
|
|
925
|
+
getEventStreamMarshaller() {
|
|
926
|
+
const context = this.serdeContext;
|
|
927
|
+
if (!context.eventStreamMarshaller) {
|
|
928
|
+
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
929
|
+
}
|
|
930
|
+
return context.eventStreamMarshaller;
|
|
931
|
+
}
|
|
932
|
+
resolveEventStreamMarshaller(importedProvider) {
|
|
933
|
+
const context = this.serdeContext;
|
|
934
|
+
if (context.eventStreamMarshaller) {
|
|
935
|
+
return context.eventStreamMarshaller;
|
|
936
|
+
}
|
|
937
|
+
return importedProvider(this.serdeContext);
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js
|
|
942
|
+
var HttpBindingProtocol = class extends HttpProtocol {
|
|
943
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
944
|
+
const input = _input && typeof _input === "object" ? _input : {};
|
|
945
|
+
const serializer = this.serializer;
|
|
946
|
+
const query = {};
|
|
947
|
+
const headers = {};
|
|
948
|
+
const endpoint = await context.endpoint();
|
|
949
|
+
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
950
|
+
const payloadMemberNames = [];
|
|
951
|
+
const payloadMemberSchemas = [];
|
|
952
|
+
let hasNonHttpBindingMember = false;
|
|
953
|
+
let payload;
|
|
954
|
+
const request = new HttpRequest({
|
|
955
|
+
protocol: "",
|
|
956
|
+
hostname: "",
|
|
957
|
+
port: void 0,
|
|
958
|
+
path: "",
|
|
959
|
+
fragment: void 0,
|
|
960
|
+
query,
|
|
961
|
+
headers,
|
|
962
|
+
body: void 0
|
|
963
|
+
});
|
|
964
|
+
if (endpoint) {
|
|
965
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
966
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
967
|
+
const opTraits = translateTraits(operationSchema.traits);
|
|
968
|
+
if (opTraits.http) {
|
|
969
|
+
request.method = opTraits.http[0];
|
|
970
|
+
const [path, search] = opTraits.http[1].split("?");
|
|
971
|
+
if (request.path == "/") {
|
|
972
|
+
request.path = path;
|
|
973
|
+
} else {
|
|
974
|
+
request.path += path;
|
|
975
|
+
}
|
|
976
|
+
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
977
|
+
for (const [key, value] of traitSearchParams) {
|
|
978
|
+
query[key] = value;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
983
|
+
const memberTraits = memberNs.getMergedTraits() ?? {};
|
|
984
|
+
const inputMemberValue = input[memberName];
|
|
985
|
+
if (inputMemberValue == null && !memberNs.isIdempotencyToken()) {
|
|
986
|
+
if (memberTraits.httpLabel) {
|
|
987
|
+
if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) {
|
|
988
|
+
throw new Error(`No value provided for input HTTP label: ${memberName}.`);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
continue;
|
|
992
|
+
}
|
|
993
|
+
if (memberTraits.httpPayload) {
|
|
994
|
+
const isStreaming = memberNs.isStreaming();
|
|
995
|
+
if (isStreaming) {
|
|
996
|
+
const isEventStream = memberNs.isStructSchema();
|
|
997
|
+
if (isEventStream) {
|
|
998
|
+
if (input[memberName]) {
|
|
999
|
+
payload = await this.serializeEventStream({
|
|
1000
|
+
eventStream: input[memberName],
|
|
1001
|
+
requestSchema: ns
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
} else {
|
|
1005
|
+
payload = inputMemberValue;
|
|
1006
|
+
}
|
|
1007
|
+
} else {
|
|
1008
|
+
serializer.write(memberNs, inputMemberValue);
|
|
1009
|
+
payload = serializer.flush();
|
|
1010
|
+
}
|
|
1011
|
+
} else if (memberTraits.httpLabel) {
|
|
1012
|
+
serializer.write(memberNs, inputMemberValue);
|
|
1013
|
+
const replacement = serializer.flush();
|
|
1014
|
+
if (request.path.includes(`{${memberName}+}`)) {
|
|
1015
|
+
request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
|
|
1016
|
+
} else if (request.path.includes(`{${memberName}}`)) {
|
|
1017
|
+
request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
|
|
1018
|
+
}
|
|
1019
|
+
} else if (memberTraits.httpHeader) {
|
|
1020
|
+
serializer.write(memberNs, inputMemberValue);
|
|
1021
|
+
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
1022
|
+
} else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
1023
|
+
for (const key in inputMemberValue) {
|
|
1024
|
+
if (!hasOwn(inputMemberValue, key)) {
|
|
1025
|
+
continue;
|
|
1026
|
+
}
|
|
1027
|
+
const val = inputMemberValue[key];
|
|
1028
|
+
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
1029
|
+
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
1030
|
+
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
1031
|
+
}
|
|
1032
|
+
} else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
|
|
1033
|
+
this.serializeQuery(memberNs, inputMemberValue, query);
|
|
1034
|
+
} else {
|
|
1035
|
+
hasNonHttpBindingMember = true;
|
|
1036
|
+
payloadMemberNames.push(memberName);
|
|
1037
|
+
payloadMemberSchemas.push(memberNs);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
if (hasNonHttpBindingMember && input) {
|
|
1041
|
+
const [namespace, name] = (ns.getName(true) ?? "#Unknown").split("#");
|
|
1042
|
+
const requiredMembers = ns.getSchema()[6];
|
|
1043
|
+
const payloadSchema = [
|
|
1044
|
+
3,
|
|
1045
|
+
namespace,
|
|
1046
|
+
name,
|
|
1047
|
+
ns.getMergedTraits(),
|
|
1048
|
+
payloadMemberNames,
|
|
1049
|
+
payloadMemberSchemas,
|
|
1050
|
+
void 0
|
|
1051
|
+
];
|
|
1052
|
+
if (requiredMembers) {
|
|
1053
|
+
payloadSchema[6] = requiredMembers;
|
|
1054
|
+
} else {
|
|
1055
|
+
payloadSchema.pop();
|
|
1056
|
+
}
|
|
1057
|
+
serializer.write(payloadSchema, input);
|
|
1058
|
+
payload = serializer.flush();
|
|
1059
|
+
}
|
|
1060
|
+
request.headers = headers;
|
|
1061
|
+
request.query = query;
|
|
1062
|
+
request.body = payload;
|
|
1063
|
+
return request;
|
|
1064
|
+
}
|
|
1065
|
+
serializeQuery(ns, data, query) {
|
|
1066
|
+
const serializer = this.serializer;
|
|
1067
|
+
const traits = ns.getMergedTraits();
|
|
1068
|
+
if (traits.httpQueryParams) {
|
|
1069
|
+
for (const key in data) {
|
|
1070
|
+
if (!hasOwn(data, key)) {
|
|
1071
|
+
continue;
|
|
1072
|
+
}
|
|
1073
|
+
if (!(key in query)) {
|
|
1074
|
+
const val = data[key];
|
|
1075
|
+
const valueSchema = ns.getValueSchema();
|
|
1076
|
+
Object.assign(valueSchema.getMergedTraits(), {
|
|
1077
|
+
...traits,
|
|
1078
|
+
httpQuery: key,
|
|
1079
|
+
httpQueryParams: void 0
|
|
1080
|
+
});
|
|
1081
|
+
this.serializeQuery(valueSchema, val, query);
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
return;
|
|
1085
|
+
}
|
|
1086
|
+
if (ns.isListSchema()) {
|
|
1087
|
+
const sparse = !!ns.getMergedTraits().sparse;
|
|
1088
|
+
const buffer = [];
|
|
1089
|
+
for (const item of data) {
|
|
1090
|
+
serializer.write([ns.getValueSchema(), traits], item);
|
|
1091
|
+
const serializable = serializer.flush();
|
|
1092
|
+
if (sparse || serializable !== void 0) {
|
|
1093
|
+
buffer.push(serializable);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
query[traits.httpQuery] = buffer;
|
|
1097
|
+
} else {
|
|
1098
|
+
serializer.write([ns, traits], data);
|
|
1099
|
+
query[traits.httpQuery] = serializer.flush();
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
1103
|
+
const deserializer = this.deserializer;
|
|
1104
|
+
const ns = NormalizedSchema.of(operationSchema.output);
|
|
1105
|
+
const dataObject = {};
|
|
1106
|
+
if (response.statusCode >= 300) {
|
|
1107
|
+
const bytes = await collectBody(response.body, context);
|
|
1108
|
+
if (bytes.byteLength > 0) {
|
|
1109
|
+
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
1110
|
+
}
|
|
1111
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
1112
|
+
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
1113
|
+
}
|
|
1114
|
+
for (const header in response.headers) {
|
|
1115
|
+
if (!hasOwn(response.headers, header)) {
|
|
1116
|
+
continue;
|
|
1117
|
+
}
|
|
1118
|
+
const value = response.headers[header];
|
|
1119
|
+
delete response.headers[header];
|
|
1120
|
+
response.headers[header.toLowerCase()] = value;
|
|
1121
|
+
}
|
|
1122
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
|
|
1123
|
+
if (nonHttpBindingMembers.length) {
|
|
1124
|
+
const bytes = await collectBody(response.body, context);
|
|
1125
|
+
if (bytes.byteLength > 0) {
|
|
1126
|
+
const dataFromBody = await deserializer.read(ns, bytes);
|
|
1127
|
+
for (const member of nonHttpBindingMembers) {
|
|
1128
|
+
if (dataFromBody[member] != null) {
|
|
1129
|
+
dataObject[member] = dataFromBody[member];
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
} else if (nonHttpBindingMembers.discardResponseBody) {
|
|
1134
|
+
await collectBody(response.body, context);
|
|
1135
|
+
}
|
|
1136
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
1137
|
+
return dataObject;
|
|
1138
|
+
}
|
|
1139
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
1140
|
+
let dataObject;
|
|
1141
|
+
if (arg4 instanceof Set) {
|
|
1142
|
+
dataObject = arg5;
|
|
1143
|
+
} else {
|
|
1144
|
+
dataObject = arg4;
|
|
1145
|
+
}
|
|
1146
|
+
let discardResponseBody = true;
|
|
1147
|
+
const deserializer = this.deserializer;
|
|
1148
|
+
const ns = NormalizedSchema.of(schema);
|
|
1149
|
+
const nonHttpBindingMembers = [];
|
|
1150
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
1151
|
+
const memberTraits = memberSchema.getMemberTraits();
|
|
1152
|
+
if (memberTraits.httpPayload) {
|
|
1153
|
+
discardResponseBody = false;
|
|
1154
|
+
const isStreaming = memberSchema.isStreaming();
|
|
1155
|
+
if (isStreaming) {
|
|
1156
|
+
const isEventStream = memberSchema.isStructSchema();
|
|
1157
|
+
if (isEventStream) {
|
|
1158
|
+
dataObject[memberName] = await this.deserializeEventStream({
|
|
1159
|
+
response,
|
|
1160
|
+
responseSchema: ns
|
|
1161
|
+
});
|
|
1162
|
+
} else {
|
|
1163
|
+
dataObject[memberName] = sdkStreamMixin(response.body);
|
|
1164
|
+
}
|
|
1165
|
+
} else if (response.body) {
|
|
1166
|
+
const bytes = await collectBody(response.body, context);
|
|
1167
|
+
if (bytes.byteLength > 0) {
|
|
1168
|
+
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
} else if (memberTraits.httpHeader) {
|
|
1172
|
+
const key = String(memberTraits.httpHeader).toLowerCase();
|
|
1173
|
+
const value = response.headers[key];
|
|
1174
|
+
if (null != value) {
|
|
1175
|
+
if (memberSchema.isListSchema()) {
|
|
1176
|
+
const headerListValueSchema = memberSchema.getValueSchema();
|
|
1177
|
+
headerListValueSchema.getMergedTraits().httpHeader = key;
|
|
1178
|
+
let sections;
|
|
1179
|
+
if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === 4) {
|
|
1180
|
+
sections = splitEvery(value, ",", 2);
|
|
1181
|
+
} else {
|
|
1182
|
+
sections = splitHeader(value);
|
|
1183
|
+
}
|
|
1184
|
+
const list = [];
|
|
1185
|
+
for (const section of sections) {
|
|
1186
|
+
list.push(await deserializer.read(headerListValueSchema, section.trim()));
|
|
1187
|
+
}
|
|
1188
|
+
dataObject[memberName] = list;
|
|
1189
|
+
} else {
|
|
1190
|
+
dataObject[memberName] = await deserializer.read(memberSchema, value);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
} else if (memberTraits.httpPrefixHeaders !== void 0) {
|
|
1194
|
+
dataObject[memberName] = {};
|
|
1195
|
+
for (const header in response.headers) {
|
|
1196
|
+
if (!hasOwn(response.headers, header)) {
|
|
1197
|
+
continue;
|
|
1198
|
+
}
|
|
1199
|
+
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
1200
|
+
const value = response.headers[header];
|
|
1201
|
+
const valueSchema = memberSchema.getValueSchema();
|
|
1202
|
+
valueSchema.getMergedTraits().httpHeader = header;
|
|
1203
|
+
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
} else if (memberTraits.httpResponseCode) {
|
|
1207
|
+
dataObject[memberName] = response.statusCode;
|
|
1208
|
+
} else {
|
|
1209
|
+
nonHttpBindingMembers.push(memberName);
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
nonHttpBindingMembers.discardResponseBody = discardResponseBody;
|
|
1213
|
+
return nonHttpBindingMembers;
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1217
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js
|
|
1218
|
+
var RpcProtocol = class extends HttpProtocol {
|
|
1219
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
1220
|
+
const serializer = this.serializer;
|
|
1221
|
+
const query = {};
|
|
1222
|
+
const headers = {};
|
|
1223
|
+
const endpoint = await context.endpoint();
|
|
1224
|
+
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
1225
|
+
const schema = ns.getSchema();
|
|
1226
|
+
let payload;
|
|
1227
|
+
const input = _input && typeof _input === "object" ? _input : {};
|
|
1228
|
+
const request = new HttpRequest({
|
|
1229
|
+
protocol: "",
|
|
1230
|
+
hostname: "",
|
|
1231
|
+
port: void 0,
|
|
1232
|
+
path: "/",
|
|
1233
|
+
fragment: void 0,
|
|
1234
|
+
query,
|
|
1235
|
+
headers,
|
|
1236
|
+
body: void 0
|
|
1237
|
+
});
|
|
1238
|
+
if (endpoint) {
|
|
1239
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
1240
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
1241
|
+
}
|
|
1242
|
+
if (input) {
|
|
1243
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
1244
|
+
if (eventStreamMember) {
|
|
1245
|
+
if (input[eventStreamMember]) {
|
|
1246
|
+
const initialRequest = {};
|
|
1247
|
+
for (const [memberName] of ns.structIterator()) {
|
|
1248
|
+
if (memberName !== eventStreamMember && input[memberName] != null) {
|
|
1249
|
+
initialRequest[memberName] = input[memberName];
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
payload = await this.serializeEventStream({
|
|
1253
|
+
eventStream: input[eventStreamMember],
|
|
1254
|
+
requestSchema: ns,
|
|
1255
|
+
initialRequest
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
} else {
|
|
1259
|
+
serializer.write(schema, input);
|
|
1260
|
+
payload = serializer.flush();
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
request.headers = Object.assign(request.headers, headers);
|
|
1264
|
+
request.query = query;
|
|
1265
|
+
request.body = payload;
|
|
1266
|
+
request.method = "POST";
|
|
1267
|
+
return request;
|
|
1268
|
+
}
|
|
1269
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
1270
|
+
const deserializer = this.deserializer;
|
|
1271
|
+
const ns = NormalizedSchema.of(operationSchema.output);
|
|
1272
|
+
const dataObject = {};
|
|
1273
|
+
if (this.isErrorResponse(response.statusCode)) {
|
|
1274
|
+
const bytes = await collectBody(response.body, context);
|
|
1275
|
+
if (bytes.byteLength > 0) {
|
|
1276
|
+
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
1277
|
+
}
|
|
1278
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
1279
|
+
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
1280
|
+
}
|
|
1281
|
+
for (const header in response.headers) {
|
|
1282
|
+
if (!hasOwn(response.headers, header)) {
|
|
1283
|
+
continue;
|
|
1284
|
+
}
|
|
1285
|
+
const value = response.headers[header];
|
|
1286
|
+
delete response.headers[header];
|
|
1287
|
+
response.headers[header.toLowerCase()] = value;
|
|
1288
|
+
}
|
|
1289
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
1290
|
+
if (eventStreamMember) {
|
|
1291
|
+
dataObject[eventStreamMember] = await this.deserializeEventStream({
|
|
1292
|
+
response,
|
|
1293
|
+
responseSchema: ns,
|
|
1294
|
+
initialResponseContainer: dataObject
|
|
1295
|
+
});
|
|
1296
|
+
} else {
|
|
1297
|
+
const bytes = await collectBody(response.body, context);
|
|
1298
|
+
if (bytes.byteLength > 0) {
|
|
1299
|
+
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
1303
|
+
return dataObject;
|
|
1304
|
+
}
|
|
1305
|
+
isErrorResponse(statusCode) {
|
|
1306
|
+
return statusCode >= 300;
|
|
1307
|
+
}
|
|
1308
|
+
};
|
|
1309
|
+
|
|
1310
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js
|
|
1311
|
+
function determineTimestampFormat(ns, settings) {
|
|
1312
|
+
if (settings.timestampFormat.useTrait) {
|
|
1313
|
+
if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) {
|
|
1314
|
+
return ns.getSchema();
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
|
|
1318
|
+
const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : void 0 : void 0;
|
|
1319
|
+
return bindingFormat ?? settings.timestampFormat.default;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js
|
|
1323
|
+
var FromStringShapeDeserializer = class extends SerdeContext {
|
|
1324
|
+
settings;
|
|
1325
|
+
constructor(settings) {
|
|
1326
|
+
super();
|
|
1327
|
+
this.settings = settings;
|
|
1328
|
+
}
|
|
1329
|
+
read(_schema, data) {
|
|
1330
|
+
const ns = NormalizedSchema.of(_schema);
|
|
1331
|
+
if (ns.isListSchema()) {
|
|
1332
|
+
return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
|
|
1333
|
+
}
|
|
1334
|
+
if (ns.isBlobSchema()) {
|
|
1335
|
+
return (this.serdeContext?.base64Decoder ?? fromBase64)(data);
|
|
1336
|
+
}
|
|
1337
|
+
if (ns.isTimestampSchema()) {
|
|
1338
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
1339
|
+
switch (format) {
|
|
1340
|
+
case 5:
|
|
1341
|
+
return _parseRfc3339DateTimeWithOffset(data);
|
|
1342
|
+
case 6:
|
|
1343
|
+
return _parseRfc7231DateTime(data);
|
|
1344
|
+
case 7:
|
|
1345
|
+
return _parseEpochTimestamp(data);
|
|
1346
|
+
default:
|
|
1347
|
+
console.warn("Missing timestamp format, parsing value with Date constructor:", data);
|
|
1348
|
+
return new Date(data);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
if (ns.isStringSchema()) {
|
|
1352
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
1353
|
+
let intermediateValue = data;
|
|
1354
|
+
if (mediaType) {
|
|
1355
|
+
if (ns.getMergedTraits().httpHeader) {
|
|
1356
|
+
intermediateValue = this.base64ToUtf8(intermediateValue);
|
|
1357
|
+
}
|
|
1358
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
1359
|
+
if (isJson) {
|
|
1360
|
+
intermediateValue = LazyJsonString.from(intermediateValue);
|
|
1361
|
+
}
|
|
1362
|
+
return intermediateValue;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
if (ns.isNumericSchema()) {
|
|
1366
|
+
return Number(data);
|
|
1367
|
+
}
|
|
1368
|
+
if (ns.isBigIntegerSchema()) {
|
|
1369
|
+
return BigInt(data);
|
|
1370
|
+
}
|
|
1371
|
+
if (ns.isBigDecimalSchema()) {
|
|
1372
|
+
return new NumericValue(data, "bigDecimal");
|
|
1373
|
+
}
|
|
1374
|
+
if (ns.isBooleanSchema()) {
|
|
1375
|
+
return String(data).toLowerCase() === "true";
|
|
1376
|
+
}
|
|
1377
|
+
return data;
|
|
1378
|
+
}
|
|
1379
|
+
base64ToUtf8(base64String) {
|
|
1380
|
+
return (this.serdeContext?.utf8Encoder ?? toUtf8)((this.serdeContext?.base64Decoder ?? fromBase64)(base64String));
|
|
1381
|
+
}
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js
|
|
1385
|
+
var HttpInterceptingShapeDeserializer = class extends SerdeContext {
|
|
1386
|
+
codecDeserializer;
|
|
1387
|
+
stringDeserializer;
|
|
1388
|
+
constructor(codecDeserializer, codecSettings) {
|
|
1389
|
+
super();
|
|
1390
|
+
this.codecDeserializer = codecDeserializer;
|
|
1391
|
+
this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
|
|
1392
|
+
}
|
|
1393
|
+
setSerdeContext(serdeContext) {
|
|
1394
|
+
this.stringDeserializer.setSerdeContext(serdeContext);
|
|
1395
|
+
this.codecDeserializer.setSerdeContext(serdeContext);
|
|
1396
|
+
this.serdeContext = serdeContext;
|
|
1397
|
+
}
|
|
1398
|
+
read(schema, data) {
|
|
1399
|
+
const ns = NormalizedSchema.of(schema);
|
|
1400
|
+
const traits = ns.getMergedTraits();
|
|
1401
|
+
const toString = this.serdeContext?.utf8Encoder ?? toUtf8;
|
|
1402
|
+
if (traits.httpHeader || traits.httpResponseCode) {
|
|
1403
|
+
return this.stringDeserializer.read(ns, toString(data));
|
|
1404
|
+
}
|
|
1405
|
+
if (traits.httpPayload) {
|
|
1406
|
+
if (ns.isBlobSchema()) {
|
|
1407
|
+
const toBytes = this.serdeContext?.utf8Decoder ?? fromUtf8;
|
|
1408
|
+
if (typeof data === "string") {
|
|
1409
|
+
return toBytes(data);
|
|
1410
|
+
}
|
|
1411
|
+
return data;
|
|
1412
|
+
} else if (ns.isStringSchema()) {
|
|
1413
|
+
if ("byteLength" in data) {
|
|
1414
|
+
return toString(data);
|
|
1415
|
+
}
|
|
1416
|
+
return data;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
return this.codecDeserializer.read(ns, data);
|
|
1420
|
+
}
|
|
1421
|
+
};
|
|
1422
|
+
|
|
1423
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js
|
|
1424
|
+
var ToStringShapeSerializer = class extends SerdeContext {
|
|
1425
|
+
settings;
|
|
1426
|
+
stringBuffer = "";
|
|
1427
|
+
constructor(settings) {
|
|
1428
|
+
super();
|
|
1429
|
+
this.settings = settings;
|
|
1430
|
+
}
|
|
1431
|
+
write(schema, value) {
|
|
1432
|
+
const ns = NormalizedSchema.of(schema);
|
|
1433
|
+
switch (typeof value) {
|
|
1434
|
+
case "object":
|
|
1435
|
+
if (value === null) {
|
|
1436
|
+
this.stringBuffer = "null";
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
if (ns.isTimestampSchema()) {
|
|
1440
|
+
if (!(value instanceof Date)) {
|
|
1441
|
+
throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);
|
|
1442
|
+
}
|
|
1443
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
1444
|
+
switch (format) {
|
|
1445
|
+
case 5:
|
|
1446
|
+
this.stringBuffer = value.toISOString().replace(".000Z", "Z");
|
|
1447
|
+
break;
|
|
1448
|
+
case 6:
|
|
1449
|
+
this.stringBuffer = dateToUtcString(value);
|
|
1450
|
+
break;
|
|
1451
|
+
case 7:
|
|
1452
|
+
this.stringBuffer = String(value.getTime() / 1e3);
|
|
1453
|
+
break;
|
|
1454
|
+
default:
|
|
1455
|
+
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
1456
|
+
this.stringBuffer = String(value.getTime() / 1e3);
|
|
1457
|
+
}
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
if (ns.isBlobSchema() && "byteLength" in value) {
|
|
1461
|
+
this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
1462
|
+
return;
|
|
1463
|
+
}
|
|
1464
|
+
if (ns.isListSchema() && Array.isArray(value)) {
|
|
1465
|
+
let buffer = "";
|
|
1466
|
+
for (const item of value) {
|
|
1467
|
+
this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
|
|
1468
|
+
const headerItem = this.flush();
|
|
1469
|
+
const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : quoteHeader(headerItem);
|
|
1470
|
+
if (buffer !== "") {
|
|
1471
|
+
buffer += ", ";
|
|
1472
|
+
}
|
|
1473
|
+
buffer += serialized;
|
|
1474
|
+
}
|
|
1475
|
+
this.stringBuffer = buffer;
|
|
1476
|
+
return;
|
|
1477
|
+
}
|
|
1478
|
+
this.stringBuffer = JSON.stringify(value, null, 2);
|
|
1479
|
+
break;
|
|
1480
|
+
case "string":
|
|
1481
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
1482
|
+
let intermediateValue = value;
|
|
1483
|
+
if (mediaType) {
|
|
1484
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
1485
|
+
if (isJson) {
|
|
1486
|
+
intermediateValue = LazyJsonString.from(intermediateValue);
|
|
1487
|
+
}
|
|
1488
|
+
if (ns.getMergedTraits().httpHeader) {
|
|
1489
|
+
this.stringBuffer = (this.serdeContext?.base64Encoder ?? toBase64)(intermediateValue.toString());
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
this.stringBuffer = value;
|
|
1494
|
+
break;
|
|
1495
|
+
default:
|
|
1496
|
+
if (ns.isIdempotencyToken()) {
|
|
1497
|
+
this.stringBuffer = generateIdempotencyToken();
|
|
1498
|
+
} else {
|
|
1499
|
+
this.stringBuffer = String(value);
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
flush() {
|
|
1504
|
+
const buffer = this.stringBuffer;
|
|
1505
|
+
this.stringBuffer = "";
|
|
1506
|
+
return buffer;
|
|
1507
|
+
}
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js
|
|
1511
|
+
var HttpInterceptingShapeSerializer = class {
|
|
1512
|
+
codecSerializer;
|
|
1513
|
+
stringSerializer;
|
|
1514
|
+
buffer;
|
|
1515
|
+
constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
|
|
1516
|
+
this.codecSerializer = codecSerializer;
|
|
1517
|
+
this.stringSerializer = stringSerializer;
|
|
1518
|
+
}
|
|
1519
|
+
setSerdeContext(serdeContext) {
|
|
1520
|
+
this.codecSerializer.setSerdeContext(serdeContext);
|
|
1521
|
+
this.stringSerializer.setSerdeContext(serdeContext);
|
|
1522
|
+
}
|
|
1523
|
+
write(schema, value) {
|
|
1524
|
+
const ns = NormalizedSchema.of(schema);
|
|
1525
|
+
const traits = ns.getMergedTraits();
|
|
1526
|
+
if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
|
|
1527
|
+
this.stringSerializer.write(ns, value);
|
|
1528
|
+
this.buffer = this.stringSerializer.flush();
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
return this.codecSerializer.write(ns, value);
|
|
1532
|
+
}
|
|
1533
|
+
flush() {
|
|
1534
|
+
if (this.buffer !== void 0) {
|
|
1535
|
+
const buffer = this.buffer;
|
|
1536
|
+
this.buffer = void 0;
|
|
1537
|
+
return buffer;
|
|
1538
|
+
}
|
|
1539
|
+
return this.codecSerializer.flush();
|
|
1540
|
+
}
|
|
1541
|
+
};
|
|
1542
|
+
|
|
1543
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js
|
|
1544
|
+
var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
|
|
1545
|
+
if (runtimeConfig.logger && runtimeConfig.logger.constructor?.name !== "NoOpLogger") {
|
|
1546
|
+
runtimeConfig.requestHandler?.updateHttpClientConfig?.(/* @__PURE__ */ Symbol.for("logger"), runtimeConfig.logger);
|
|
1547
|
+
}
|
|
1548
|
+
if (runtimeConfig.defaultSocketTimeout) {
|
|
1549
|
+
runtimeConfig.requestHandler?.updateHttpClientConfig?.(/* @__PURE__ */ Symbol.for("@smithy/defaultSocketTimeout"), runtimeConfig.defaultSocketTimeout);
|
|
1550
|
+
}
|
|
1551
|
+
return {
|
|
1552
|
+
setHttpHandler(handler) {
|
|
1553
|
+
runtimeConfig.requestHandler = handler;
|
|
1554
|
+
},
|
|
1555
|
+
httpHandler() {
|
|
1556
|
+
return runtimeConfig.requestHandler;
|
|
1557
|
+
},
|
|
1558
|
+
updateHttpClientConfig(key, value) {
|
|
1559
|
+
runtimeConfig.requestHandler?.updateHttpClientConfig(key, value);
|
|
1560
|
+
},
|
|
1561
|
+
httpHandlerConfigs() {
|
|
1562
|
+
return runtimeConfig.requestHandler.httpHandlerConfigs();
|
|
1563
|
+
}
|
|
1564
|
+
};
|
|
1565
|
+
};
|
|
1566
|
+
var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
|
|
1567
|
+
return {
|
|
1568
|
+
requestHandler: httpHandlerExtensionConfiguration.httpHandler()
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1572
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/util-uri-escape/escape-uri.js
|
|
1573
|
+
var escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
|
|
1574
|
+
var hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
|
|
1575
|
+
|
|
1576
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/querystring-builder/buildQueryString.js
|
|
1577
|
+
function buildQueryString(query) {
|
|
1578
|
+
const parts = [];
|
|
1579
|
+
for (let key of Object.keys(query).sort()) {
|
|
1580
|
+
const value = query[key];
|
|
1581
|
+
key = escapeUri(key);
|
|
1582
|
+
if (Array.isArray(value)) {
|
|
1583
|
+
for (let i = 0, iLen = value.length; i < iLen; i++) {
|
|
1584
|
+
parts.push(`${key}=${escapeUri(value[i])}`);
|
|
1585
|
+
}
|
|
1586
|
+
} else {
|
|
1587
|
+
let qsEntry = key;
|
|
1588
|
+
if (value || typeof value === "string") {
|
|
1589
|
+
qsEntry += `=${escapeUri(value)}`;
|
|
1590
|
+
}
|
|
1591
|
+
parts.push(qsEntry);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
return parts.join("&");
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js
|
|
1598
|
+
var SerdeContextConfig = class {
|
|
1599
|
+
serdeContext;
|
|
1600
|
+
setSerdeContext(serdeContext) {
|
|
1601
|
+
this.serdeContext = serdeContext;
|
|
1602
|
+
}
|
|
1603
|
+
};
|
|
1604
|
+
|
|
1605
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js
|
|
1606
|
+
var UnionSerde = class {
|
|
1607
|
+
from;
|
|
1608
|
+
to;
|
|
1609
|
+
keys;
|
|
1610
|
+
constructor(from, to) {
|
|
1611
|
+
this.from = from;
|
|
1612
|
+
this.to = to;
|
|
1613
|
+
const keys = Object.keys(this.from);
|
|
1614
|
+
const set = new Set(keys);
|
|
1615
|
+
set.delete("__type");
|
|
1616
|
+
this.keys = set;
|
|
1617
|
+
}
|
|
1618
|
+
mark(key) {
|
|
1619
|
+
this.keys.delete(key);
|
|
1620
|
+
}
|
|
1621
|
+
hasUnknown() {
|
|
1622
|
+
return this.keys.size === 1 && Object.keys(this.to).length === 0;
|
|
1623
|
+
}
|
|
1624
|
+
writeUnknown() {
|
|
1625
|
+
if (this.hasUnknown()) {
|
|
1626
|
+
const k = this.keys.values().next().value;
|
|
1627
|
+
const v = this.from[k];
|
|
1628
|
+
this.to.$unknown = [k, v];
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/detectBufferParsing.js
|
|
1634
|
+
var canParseBuffer;
|
|
1635
|
+
function detectBufferParsing() {
|
|
1636
|
+
if (canParseBuffer === void 0) {
|
|
1637
|
+
try {
|
|
1638
|
+
if (typeof Buffer !== "function") {
|
|
1639
|
+
canParseBuffer = false;
|
|
1640
|
+
} else {
|
|
1641
|
+
const result = JSON.parse(Buffer.from([123, 125]));
|
|
1642
|
+
canParseBuffer = result !== null && typeof result === "object";
|
|
1643
|
+
}
|
|
1644
|
+
} catch {
|
|
1645
|
+
canParseBuffer = false;
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
return canParseBuffer;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
1652
|
+
function jsonReviver(key, value, context) {
|
|
1653
|
+
if (context?.source) {
|
|
1654
|
+
const numericString = context.source;
|
|
1655
|
+
if (typeof value === "number") {
|
|
1656
|
+
const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER;
|
|
1657
|
+
if (inSafeRange) {
|
|
1658
|
+
if (isRepresentable(numericString, value)) {
|
|
1659
|
+
return value;
|
|
1660
|
+
}
|
|
1661
|
+
return new NumericValue(numericString, "bigDecimal");
|
|
1662
|
+
} else {
|
|
1663
|
+
if (isFractionalBigNumeric(numericString)) {
|
|
1664
|
+
return new NumericValue(numericString, "bigDecimal");
|
|
1665
|
+
}
|
|
1666
|
+
if (/[eE]/.test(numericString)) {
|
|
1667
|
+
return expandExponentToBigInt(numericString);
|
|
1668
|
+
}
|
|
1669
|
+
return BigInt(numericString);
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
return value;
|
|
1674
|
+
}
|
|
1675
|
+
function isFractionalBigNumeric(s) {
|
|
1676
|
+
const dotIndex = s.indexOf(".");
|
|
1677
|
+
if (dotIndex === -1) {
|
|
1678
|
+
return false;
|
|
1679
|
+
}
|
|
1680
|
+
const eIndex = s.search(/[eE]/);
|
|
1681
|
+
if (eIndex === -1) {
|
|
1682
|
+
return true;
|
|
1683
|
+
}
|
|
1684
|
+
const fracDigits = eIndex - dotIndex - 1;
|
|
1685
|
+
const exp = parseInt(s.slice(eIndex + 1), 10);
|
|
1686
|
+
return exp < fracDigits;
|
|
1687
|
+
}
|
|
1688
|
+
function isRepresentable(numericString, value) {
|
|
1689
|
+
if (numericString === String(value)) {
|
|
1690
|
+
return true;
|
|
1691
|
+
}
|
|
1692
|
+
if (Object.is(value, -0)) {
|
|
1693
|
+
return true;
|
|
1694
|
+
}
|
|
1695
|
+
if (/[eE]/.test(numericString)) {
|
|
1696
|
+
return expandToDecimal(numericString) === expandToDecimal(String(value));
|
|
1697
|
+
}
|
|
1698
|
+
const normalized = numericString.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
1699
|
+
const canonical = String(value);
|
|
1700
|
+
if (normalized === canonical) {
|
|
1701
|
+
return true;
|
|
1702
|
+
}
|
|
1703
|
+
if (/[eE]/.test(canonical)) {
|
|
1704
|
+
return normalized === expandToDecimal(canonical);
|
|
1705
|
+
}
|
|
1706
|
+
return false;
|
|
1707
|
+
}
|
|
1708
|
+
function expandToDecimal(s) {
|
|
1709
|
+
const negative = s.startsWith("-");
|
|
1710
|
+
const abs = negative ? s.slice(1) : s;
|
|
1711
|
+
const eIndex = abs.search(/[eE]/);
|
|
1712
|
+
let result;
|
|
1713
|
+
if (eIndex === -1) {
|
|
1714
|
+
result = abs;
|
|
1715
|
+
} else {
|
|
1716
|
+
const exp = parseInt(abs.slice(eIndex + 1), 10);
|
|
1717
|
+
const mantissa = abs.slice(0, eIndex);
|
|
1718
|
+
const dotIndex = mantissa.indexOf(".");
|
|
1719
|
+
let digits;
|
|
1720
|
+
let intLen;
|
|
1721
|
+
if (dotIndex === -1) {
|
|
1722
|
+
digits = mantissa;
|
|
1723
|
+
intLen = mantissa.length;
|
|
1724
|
+
} else {
|
|
1725
|
+
digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
|
|
1726
|
+
intLen = dotIndex;
|
|
1727
|
+
}
|
|
1728
|
+
digits = digits.replace(/0+$/, "") || "0";
|
|
1729
|
+
const newDotPos = intLen + exp;
|
|
1730
|
+
if (digits === "0") {
|
|
1731
|
+
result = "0";
|
|
1732
|
+
} else if (newDotPos <= 0) {
|
|
1733
|
+
result = "0." + "0".repeat(-newDotPos) + digits;
|
|
1734
|
+
} else if (newDotPos >= digits.length) {
|
|
1735
|
+
result = digits + "0".repeat(newDotPos - digits.length);
|
|
1736
|
+
} else {
|
|
1737
|
+
result = digits.slice(0, newDotPos) + "." + digits.slice(newDotPos);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
if (result.includes(".")) {
|
|
1741
|
+
result = result.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
|
|
1742
|
+
}
|
|
1743
|
+
return (negative ? "-" : "") + result;
|
|
1744
|
+
}
|
|
1745
|
+
function expandExponentToBigInt(s) {
|
|
1746
|
+
const eIndex = s.search(/[eE]/);
|
|
1747
|
+
const exp = parseInt(s.slice(eIndex + 1), 10);
|
|
1748
|
+
const negative = s.startsWith("-");
|
|
1749
|
+
const mantissa = s.slice(negative ? 1 : 0, eIndex);
|
|
1750
|
+
const dotIndex = mantissa.indexOf(".");
|
|
1751
|
+
let digits;
|
|
1752
|
+
let shift;
|
|
1753
|
+
if (dotIndex === -1) {
|
|
1754
|
+
digits = mantissa;
|
|
1755
|
+
shift = exp;
|
|
1756
|
+
} else {
|
|
1757
|
+
digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
|
|
1758
|
+
const fracDigits = mantissa.length - dotIndex - 1;
|
|
1759
|
+
shift = exp - fracDigits;
|
|
1760
|
+
}
|
|
1761
|
+
digits = digits.replace(/0+$/, "") || "0";
|
|
1762
|
+
const result = BigInt(digits) * 10n ** BigInt(shift + (mantissa.replace(".", "").length - digits.length));
|
|
1763
|
+
return negative ? -result : result;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/needsReviver.js
|
|
1767
|
+
var REVIVER_SYMBOL = /* @__PURE__ */ Symbol.for("@aws-sdk/reviver");
|
|
1768
|
+
function needsReviver(schema) {
|
|
1769
|
+
const ns = NormalizedSchema.of(schema);
|
|
1770
|
+
const raw = ns.getSchema();
|
|
1771
|
+
if (Array.isArray(raw) && ns.isStructSchema()) {
|
|
1772
|
+
if (REVIVER_SYMBOL in raw) {
|
|
1773
|
+
return raw[REVIVER_SYMBOL];
|
|
1774
|
+
}
|
|
1775
|
+
const result = _check(ns, /* @__PURE__ */ new Set());
|
|
1776
|
+
raw[REVIVER_SYMBOL] = result;
|
|
1777
|
+
return result;
|
|
1778
|
+
}
|
|
1779
|
+
return _check(ns, /* @__PURE__ */ new Set());
|
|
1780
|
+
}
|
|
1781
|
+
function _check(ns, seen) {
|
|
1782
|
+
const raw = ns.getSchema();
|
|
1783
|
+
if (seen.has(raw)) {
|
|
1784
|
+
return false;
|
|
1785
|
+
}
|
|
1786
|
+
seen.add(raw);
|
|
1787
|
+
if (ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
|
|
1788
|
+
return true;
|
|
1789
|
+
}
|
|
1790
|
+
if (ns.isStructSchema()) {
|
|
1791
|
+
for (const [, memberSchema] of ns.structIterator()) {
|
|
1792
|
+
if (_check(memberSchema, seen)) {
|
|
1793
|
+
return true;
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
} else if (ns.isListSchema() || ns.isMapSchema()) {
|
|
1797
|
+
if (_check(ns.getValueSchema(), seen)) {
|
|
1798
|
+
return true;
|
|
1799
|
+
}
|
|
1800
|
+
} else if (ns.isDocumentSchema()) {
|
|
1801
|
+
return true;
|
|
1802
|
+
}
|
|
1803
|
+
return false;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/common.js
|
|
1807
|
+
var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));
|
|
1808
|
+
|
|
1809
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/parseJsonBody.js
|
|
1810
|
+
async function parseJsonBody(streamBody, context, schema) {
|
|
1811
|
+
let parsingInput;
|
|
1812
|
+
if (detectBufferParsing() && typeof streamBody?.[Symbol.asyncIterator] === "function") {
|
|
1813
|
+
const buffer = await collectBody(streamBody, context);
|
|
1814
|
+
if (typeof Buffer === "function") {
|
|
1815
|
+
if (Buffer.isBuffer(buffer)) {
|
|
1816
|
+
parsingInput = buffer;
|
|
1817
|
+
} else {
|
|
1818
|
+
parsingInput = Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
if (!parsingInput) {
|
|
1823
|
+
parsingInput = await collectBodyString(streamBody, context);
|
|
1824
|
+
}
|
|
1825
|
+
if (parsingInput.length === 0) {
|
|
1826
|
+
return {};
|
|
1827
|
+
}
|
|
1828
|
+
const reviver = schema && needsReviver(schema) ? jsonReviver : void 0;
|
|
1829
|
+
try {
|
|
1830
|
+
return JSON.parse(parsingInput, reviver);
|
|
1831
|
+
} catch (e) {
|
|
1832
|
+
if (e?.name === "SyntaxError") {
|
|
1833
|
+
Object.defineProperty(e, "$responseBodyText", {
|
|
1834
|
+
value: typeof parsingInput === "string" ? parsingInput : parsingInput.toString("utf8")
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
throw e;
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
var findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1841
|
+
var sanitizeErrorCode = (rawValue) => {
|
|
1842
|
+
let cleanValue = rawValue;
|
|
1843
|
+
if (typeof cleanValue === "number") {
|
|
1844
|
+
cleanValue = cleanValue.toString();
|
|
1845
|
+
}
|
|
1846
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1847
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1848
|
+
}
|
|
1849
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1850
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1851
|
+
}
|
|
1852
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1853
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1854
|
+
}
|
|
1855
|
+
return cleanValue;
|
|
1856
|
+
};
|
|
1857
|
+
var loadRestJsonErrorCode = (output, data) => {
|
|
1858
|
+
return loadErrorCode(output, data, ["header", "code", "type"]);
|
|
1859
|
+
};
|
|
1860
|
+
var loadErrorCode = ({ headers }, data, order) => {
|
|
1861
|
+
while (order.length > 0) {
|
|
1862
|
+
const location = order.shift();
|
|
1863
|
+
switch (location) {
|
|
1864
|
+
case "header":
|
|
1865
|
+
const headerKey = findKey(headers ?? {}, "x-amzn-errortype");
|
|
1866
|
+
if (headerKey !== void 0) {
|
|
1867
|
+
return sanitizeErrorCode(headers[headerKey]);
|
|
1868
|
+
}
|
|
1869
|
+
break;
|
|
1870
|
+
case "code":
|
|
1871
|
+
const codeKey = findKey(data ?? {}, "code");
|
|
1872
|
+
if (codeKey && data[codeKey] !== void 0) {
|
|
1873
|
+
return sanitizeErrorCode(data[codeKey]);
|
|
1874
|
+
}
|
|
1875
|
+
break;
|
|
1876
|
+
case "type":
|
|
1877
|
+
if (data?.__type !== void 0) {
|
|
1878
|
+
return sanitizeErrorCode(data.__type);
|
|
1879
|
+
}
|
|
1880
|
+
break;
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
};
|
|
1884
|
+
|
|
1885
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js
|
|
1886
|
+
var JsonShapeDeserializer2 = class extends SerdeContextConfig {
|
|
1887
|
+
settings;
|
|
1888
|
+
constructor(settings) {
|
|
1889
|
+
super();
|
|
1890
|
+
this.settings = settings;
|
|
1891
|
+
}
|
|
1892
|
+
async read(schema, data) {
|
|
1893
|
+
const reviver = needsReviver(schema) ? jsonReviver : void 0;
|
|
1894
|
+
let parsed;
|
|
1895
|
+
if (typeof data === "string") {
|
|
1896
|
+
if (data.length === 0) {
|
|
1897
|
+
return {};
|
|
1898
|
+
}
|
|
1899
|
+
parsed = JSON.parse(data, reviver);
|
|
1900
|
+
} else if (data instanceof Uint8Array && detectBufferParsing()) {
|
|
1901
|
+
if (data.byteLength === 0) {
|
|
1902
|
+
return {};
|
|
1903
|
+
}
|
|
1904
|
+
const buf = Buffer.isBuffer(data) ? data : Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
1905
|
+
parsed = JSON.parse(buf, reviver);
|
|
1906
|
+
} else {
|
|
1907
|
+
parsed = await parseJsonBody(data, this.serdeContext, schema);
|
|
1908
|
+
}
|
|
1909
|
+
return this._read(schema, parsed);
|
|
1910
|
+
}
|
|
1911
|
+
readObject(schema, data) {
|
|
1912
|
+
return this._read(schema, data);
|
|
1913
|
+
}
|
|
1914
|
+
_read(schema, value) {
|
|
1915
|
+
const isObject = value !== null && typeof value === "object";
|
|
1916
|
+
const ns = NormalizedSchema.of(schema);
|
|
1917
|
+
if (isObject) {
|
|
1918
|
+
if (ns.isStructSchema()) {
|
|
1919
|
+
return this._readStruct(ns, value);
|
|
1920
|
+
}
|
|
1921
|
+
if (Array.isArray(value) && ns.isListSchema()) {
|
|
1922
|
+
const listMember = ns.getValueSchema();
|
|
1923
|
+
if (this.needsTransform(listMember)) {
|
|
1924
|
+
for (let i = 0; i < value.length; ++i) {
|
|
1925
|
+
value[i] = this._read(listMember, value[i]);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
return value;
|
|
1929
|
+
}
|
|
1930
|
+
if (ns.isMapSchema()) {
|
|
1931
|
+
const mapMember = ns.getValueSchema();
|
|
1932
|
+
const map = value;
|
|
1933
|
+
if (this.needsTransform(mapMember)) {
|
|
1934
|
+
for (const k in map) {
|
|
1935
|
+
if (!hasOwn(map, k)) {
|
|
1936
|
+
continue;
|
|
1937
|
+
}
|
|
1938
|
+
if (k === "__proto__") {
|
|
1939
|
+
writeKey(map);
|
|
1940
|
+
}
|
|
1941
|
+
map[k] = this._read(mapMember, map[k]);
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return map;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
if (ns.isBlobSchema() && typeof value === "string") {
|
|
1948
|
+
return fromBase64(value);
|
|
1949
|
+
}
|
|
1950
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
1951
|
+
if (ns.isStringSchema() && typeof value === "string" && mediaType) {
|
|
1952
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
1953
|
+
if (isJson) {
|
|
1954
|
+
return LazyJsonString.from(value);
|
|
1955
|
+
}
|
|
1956
|
+
return value;
|
|
1957
|
+
}
|
|
1958
|
+
if (ns.isTimestampSchema() && value != null) {
|
|
1959
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
1960
|
+
switch (format) {
|
|
1961
|
+
case 5:
|
|
1962
|
+
return parseRfc3339DateTimeWithOffset(value);
|
|
1963
|
+
case 6:
|
|
1964
|
+
return parseRfc7231DateTime(value);
|
|
1965
|
+
case 7:
|
|
1966
|
+
return parseEpochTimestamp(value);
|
|
1967
|
+
default:
|
|
1968
|
+
console.warn("Missing timestamp format, parsing value with Date constructor:", value);
|
|
1969
|
+
return new Date(value);
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
|
|
1973
|
+
return BigInt(value);
|
|
1974
|
+
}
|
|
1975
|
+
if (ns.isBigDecimalSchema() && value != void 0) {
|
|
1976
|
+
if (value instanceof NumericValue) {
|
|
1977
|
+
return value;
|
|
1978
|
+
}
|
|
1979
|
+
const untyped = value;
|
|
1980
|
+
if (untyped.type === "bigDecimal" && "string" in untyped) {
|
|
1981
|
+
return new NumericValue(untyped.string, untyped.type);
|
|
1982
|
+
}
|
|
1983
|
+
return new NumericValue(String(value), "bigDecimal");
|
|
1984
|
+
}
|
|
1985
|
+
if (ns.isNumericSchema() && typeof value === "string") {
|
|
1986
|
+
switch (value) {
|
|
1987
|
+
case "Infinity":
|
|
1988
|
+
return Infinity;
|
|
1989
|
+
case "-Infinity":
|
|
1990
|
+
return -Infinity;
|
|
1991
|
+
case "NaN":
|
|
1992
|
+
return NaN;
|
|
1993
|
+
}
|
|
1994
|
+
return value;
|
|
1995
|
+
}
|
|
1996
|
+
if (ns.isDocumentSchema()) {
|
|
1997
|
+
if (isObject) {
|
|
1998
|
+
if (Array.isArray(value)) {
|
|
1999
|
+
for (let i = 0; i < value.length; ++i) {
|
|
2000
|
+
const v = value[i];
|
|
2001
|
+
if (!(v instanceof NumericValue)) {
|
|
2002
|
+
value[i] = this._read(ns, v);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
} else {
|
|
2006
|
+
const doc = value;
|
|
2007
|
+
for (const k in doc) {
|
|
2008
|
+
if (!hasOwn(doc, k)) {
|
|
2009
|
+
continue;
|
|
2010
|
+
}
|
|
2011
|
+
if (k === "__proto__") {
|
|
2012
|
+
writeKey(doc);
|
|
2013
|
+
}
|
|
2014
|
+
const v = doc[k];
|
|
2015
|
+
if (!(v instanceof NumericValue)) {
|
|
2016
|
+
doc[k] = this._read(ns, v);
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
return value;
|
|
2023
|
+
}
|
|
2024
|
+
_readStruct(ns, record) {
|
|
2025
|
+
const union = ns.isUnionSchema();
|
|
2026
|
+
const out = {};
|
|
2027
|
+
let nameMap;
|
|
2028
|
+
const hasType = typeof record.__type === "string";
|
|
2029
|
+
const { jsonName } = this.settings;
|
|
2030
|
+
if (jsonName && hasType) {
|
|
2031
|
+
nameMap = {};
|
|
2032
|
+
}
|
|
2033
|
+
let unionSerde;
|
|
2034
|
+
if (union) {
|
|
2035
|
+
unionSerde = new UnionSerde(record, out);
|
|
2036
|
+
}
|
|
2037
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
2038
|
+
let fromKey = memberName;
|
|
2039
|
+
if (jsonName) {
|
|
2040
|
+
fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
|
|
2041
|
+
if (hasType) {
|
|
2042
|
+
nameMap[fromKey] = memberName;
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
if (union) {
|
|
2046
|
+
unionSerde.mark(fromKey);
|
|
2047
|
+
}
|
|
2048
|
+
if (record[fromKey] != null) {
|
|
2049
|
+
out[memberName] = this._read(memberSchema, record[fromKey]);
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
if (union) {
|
|
2053
|
+
unionSerde.writeUnknown();
|
|
2054
|
+
} else if (hasType) {
|
|
2055
|
+
for (const k in record) {
|
|
2056
|
+
if (!hasOwn(record, k)) {
|
|
2057
|
+
continue;
|
|
2058
|
+
}
|
|
2059
|
+
const v = record[k];
|
|
2060
|
+
const t = jsonName ? nameMap[k] ?? k : k;
|
|
2061
|
+
if (!(t in out)) {
|
|
2062
|
+
out[t] = v;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
return out;
|
|
2067
|
+
}
|
|
2068
|
+
needsTransform(ns) {
|
|
2069
|
+
if (ns.isBlobSchema() || ns.isTimestampSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema() || ns.isNumericSchema()) {
|
|
2070
|
+
return true;
|
|
2071
|
+
}
|
|
2072
|
+
if (ns.isDocumentSchema() || ns.isStructSchema() || ns.isListSchema() || ns.isMapSchema()) {
|
|
2073
|
+
return true;
|
|
2074
|
+
}
|
|
2075
|
+
if (ns.isStringSchema() && ns.getMergedTraits().mediaType) {
|
|
2076
|
+
return true;
|
|
2077
|
+
}
|
|
2078
|
+
return false;
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
|
|
2082
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js
|
|
2083
|
+
var JsonBytesStringAdapter = class _JsonBytesStringAdapter extends Uint8Array {
|
|
2084
|
+
string = null;
|
|
2085
|
+
static allocUnsafe(bytes) {
|
|
2086
|
+
if (typeof Buffer === "function") {
|
|
2087
|
+
const buffer = Buffer.allocUnsafe(bytes);
|
|
2088
|
+
return new _JsonBytesStringAdapter(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
2089
|
+
}
|
|
2090
|
+
return new _JsonBytesStringAdapter(bytes);
|
|
2091
|
+
}
|
|
2092
|
+
toString() {
|
|
2093
|
+
return this.s();
|
|
2094
|
+
}
|
|
2095
|
+
valueOf() {
|
|
2096
|
+
return this.s();
|
|
2097
|
+
}
|
|
2098
|
+
includes(searchString, position) {
|
|
2099
|
+
if (typeof searchString === "string") {
|
|
2100
|
+
return this.s().includes(searchString, position);
|
|
2101
|
+
}
|
|
2102
|
+
return Uint8Array.prototype.includes.call(this, searchString, position);
|
|
2103
|
+
}
|
|
2104
|
+
indexOf(searchString, position) {
|
|
2105
|
+
if (typeof searchString === "string") {
|
|
2106
|
+
return this.s().indexOf(searchString, position);
|
|
2107
|
+
}
|
|
2108
|
+
return Uint8Array.prototype.indexOf.call(this, searchString, position);
|
|
2109
|
+
}
|
|
2110
|
+
lastIndexOf(searchString, position) {
|
|
2111
|
+
if (typeof searchString === "string") {
|
|
2112
|
+
return this.s().lastIndexOf(searchString, position);
|
|
2113
|
+
}
|
|
2114
|
+
const fn = Uint8Array.prototype.lastIndexOf;
|
|
2115
|
+
if (position !== void 0) {
|
|
2116
|
+
return fn.call(this, searchString, position);
|
|
2117
|
+
}
|
|
2118
|
+
return fn.call(this, searchString);
|
|
2119
|
+
}
|
|
2120
|
+
startsWith(searchString, position) {
|
|
2121
|
+
return this.s().startsWith(searchString, position);
|
|
2122
|
+
}
|
|
2123
|
+
endsWith(searchString, endPosition) {
|
|
2124
|
+
return this.s().endsWith(searchString, endPosition);
|
|
2125
|
+
}
|
|
2126
|
+
match(regexp) {
|
|
2127
|
+
return this.s().match(regexp);
|
|
2128
|
+
}
|
|
2129
|
+
replace(searchValue, replaceValue) {
|
|
2130
|
+
return this.s().replace(searchValue, replaceValue);
|
|
2131
|
+
}
|
|
2132
|
+
search(regexp) {
|
|
2133
|
+
return this.s().search(regexp);
|
|
2134
|
+
}
|
|
2135
|
+
split(separator, limit) {
|
|
2136
|
+
return this.s().split(separator, limit);
|
|
2137
|
+
}
|
|
2138
|
+
substring(start, end) {
|
|
2139
|
+
return this.s().substring(start, end);
|
|
2140
|
+
}
|
|
2141
|
+
trim() {
|
|
2142
|
+
return this.s().trim();
|
|
2143
|
+
}
|
|
2144
|
+
trimStart() {
|
|
2145
|
+
return this.s().trimStart();
|
|
2146
|
+
}
|
|
2147
|
+
trimEnd() {
|
|
2148
|
+
return this.s().trimEnd();
|
|
2149
|
+
}
|
|
2150
|
+
charAt(pos) {
|
|
2151
|
+
return this.s().charAt(pos);
|
|
2152
|
+
}
|
|
2153
|
+
charCodeAt(index) {
|
|
2154
|
+
return this.s().charCodeAt(index);
|
|
2155
|
+
}
|
|
2156
|
+
padStart(maxLength, fillString) {
|
|
2157
|
+
return this.s().padStart(maxLength, fillString);
|
|
2158
|
+
}
|
|
2159
|
+
padEnd(maxLength, fillString) {
|
|
2160
|
+
return this.s().padEnd(maxLength, fillString);
|
|
2161
|
+
}
|
|
2162
|
+
repeat(count) {
|
|
2163
|
+
return this.s().repeat(count);
|
|
2164
|
+
}
|
|
2165
|
+
toUpperCase() {
|
|
2166
|
+
return this.s().toUpperCase();
|
|
2167
|
+
}
|
|
2168
|
+
toLowerCase() {
|
|
2169
|
+
return this.s().toLowerCase();
|
|
2170
|
+
}
|
|
2171
|
+
s() {
|
|
2172
|
+
if (this.string == null) {
|
|
2173
|
+
const n = Date.now();
|
|
2174
|
+
if (n > warned + 6e4) {
|
|
2175
|
+
console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. It has been automatically converted to string. In a future version this will throw an error.");
|
|
2176
|
+
warned = n;
|
|
2177
|
+
}
|
|
2178
|
+
this.string = toUtf8(this);
|
|
2179
|
+
}
|
|
2180
|
+
return this.string;
|
|
2181
|
+
}
|
|
2182
|
+
};
|
|
2183
|
+
var warned = 0;
|
|
2184
|
+
|
|
2185
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js
|
|
2186
|
+
var encoder = new TextEncoder();
|
|
2187
|
+
var OPEN_BRACE = 123;
|
|
2188
|
+
var CLOSE_BRACE = 125;
|
|
2189
|
+
var OPEN_BRACKET = 91;
|
|
2190
|
+
var CLOSE_BRACKET = 93;
|
|
2191
|
+
var QUOTE = 34;
|
|
2192
|
+
var COLON = 58;
|
|
2193
|
+
var COMMA = 44;
|
|
2194
|
+
var BACKSLASH = 92;
|
|
2195
|
+
var TRUE = new Uint8Array([116, 114, 117, 101]);
|
|
2196
|
+
var FALSE = new Uint8Array([102, 97, 108, 115, 101]);
|
|
2197
|
+
var NULL = new Uint8Array([110, 117, 108, 108]);
|
|
2198
|
+
var ESCAPE_TABLE = new Array(128).fill(null);
|
|
2199
|
+
ESCAPE_TABLE[8] = "b";
|
|
2200
|
+
ESCAPE_TABLE[9] = "t";
|
|
2201
|
+
ESCAPE_TABLE[10] = "n";
|
|
2202
|
+
ESCAPE_TABLE[12] = "f";
|
|
2203
|
+
ESCAPE_TABLE[13] = "r";
|
|
2204
|
+
ESCAPE_TABLE[34] = '"';
|
|
2205
|
+
ESCAPE_TABLE[92] = "\\";
|
|
2206
|
+
for (let i = 0; i < 32; i++) {
|
|
2207
|
+
if (ESCAPE_TABLE[i] === null) {
|
|
2208
|
+
ESCAPE_TABLE[i] = "u00" + i.toString(16).padStart(2, "0");
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
var INITIAL_BUFFER_SIZE = 2048;
|
|
2212
|
+
function alloc(size) {
|
|
2213
|
+
return JsonBytesStringAdapter.allocUnsafe(size);
|
|
2214
|
+
}
|
|
2215
|
+
var JsonShapeSerializer2 = class _JsonShapeSerializer2 extends SerdeContextConfig {
|
|
2216
|
+
settings;
|
|
2217
|
+
json;
|
|
2218
|
+
i = 0;
|
|
2219
|
+
rootSchema;
|
|
2220
|
+
rawValue;
|
|
2221
|
+
passthrough = false;
|
|
2222
|
+
constructor(settings) {
|
|
2223
|
+
super();
|
|
2224
|
+
this.settings = settings;
|
|
2225
|
+
this.json = alloc(INITIAL_BUFFER_SIZE);
|
|
2226
|
+
}
|
|
2227
|
+
write(schema, value) {
|
|
2228
|
+
this.i = 0;
|
|
2229
|
+
this.rawValue = value;
|
|
2230
|
+
this.rootSchema = NormalizedSchema.of(schema);
|
|
2231
|
+
this.passthrough = this.rootSchema.isBlobSchema() || this.rootSchema.isStringSchema();
|
|
2232
|
+
if (!this.passthrough) {
|
|
2233
|
+
this.writeValue(this.rootSchema, value, void 0);
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
writeDiscriminatedDocument(schema, value) {
|
|
2237
|
+
this.i = 0;
|
|
2238
|
+
this.rootSchema = NormalizedSchema.of(schema);
|
|
2239
|
+
const ns = this.rootSchema;
|
|
2240
|
+
if (ns.isStructSchema() && value != null && typeof value === "object") {
|
|
2241
|
+
this.writeValue(ns, value, void 0);
|
|
2242
|
+
const prefix = `"__type":"${ns.getName(true) ?? "Unknown"}",`;
|
|
2243
|
+
const z = prefix.length;
|
|
2244
|
+
this.ensure(z);
|
|
2245
|
+
this.json.copyWithin(1 + z, 1, this.i);
|
|
2246
|
+
encoder.encodeInto(prefix, this.json.subarray(1));
|
|
2247
|
+
this.i += z;
|
|
2248
|
+
} else {
|
|
2249
|
+
this.writeValue(ns, value, void 0);
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
flush() {
|
|
2253
|
+
this.rootSchema = void 0;
|
|
2254
|
+
const finalPosition = this.i;
|
|
2255
|
+
this.i = 0;
|
|
2256
|
+
const raw = this.rawValue;
|
|
2257
|
+
this.rawValue = void 0;
|
|
2258
|
+
if (finalPosition === 0) {
|
|
2259
|
+
return raw;
|
|
2260
|
+
}
|
|
2261
|
+
const result = this.json.subarray(0, finalPosition);
|
|
2262
|
+
this.json = alloc(INITIAL_BUFFER_SIZE);
|
|
2263
|
+
return result;
|
|
2264
|
+
}
|
|
2265
|
+
ensure(byteCount) {
|
|
2266
|
+
const { i, json } = this;
|
|
2267
|
+
if (i + byteCount > json.length) {
|
|
2268
|
+
let newSize = json.length * 2;
|
|
2269
|
+
while (newSize < i + byteCount) {
|
|
2270
|
+
newSize *= 2;
|
|
2271
|
+
}
|
|
2272
|
+
const next = alloc(newSize);
|
|
2273
|
+
next.set(this.json);
|
|
2274
|
+
this.json = next;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
writeAscii(s) {
|
|
2278
|
+
const z = s.length;
|
|
2279
|
+
this.ensure(z);
|
|
2280
|
+
let { i, json } = this;
|
|
2281
|
+
for (let j = 0; j < z; ++j) {
|
|
2282
|
+
json[i] = s.charCodeAt(j);
|
|
2283
|
+
i += 1;
|
|
2284
|
+
}
|
|
2285
|
+
this.i = i;
|
|
2286
|
+
}
|
|
2287
|
+
writeAsciiQuoted(s) {
|
|
2288
|
+
const z = s.length;
|
|
2289
|
+
this.ensure(z + 4);
|
|
2290
|
+
let { json, i } = this;
|
|
2291
|
+
json[i++] = QUOTE;
|
|
2292
|
+
for (let j = 0; j < z; ++j) {
|
|
2293
|
+
json[i++] = s.charCodeAt(j);
|
|
2294
|
+
}
|
|
2295
|
+
json[i++] = QUOTE;
|
|
2296
|
+
this.i = i;
|
|
2297
|
+
}
|
|
2298
|
+
writeJsonString(s) {
|
|
2299
|
+
const z = s.length;
|
|
2300
|
+
this.ensure(z * 3 + 2);
|
|
2301
|
+
this.json[this.i++] = QUOTE;
|
|
2302
|
+
for (let j = 0; j < z; ++j) {
|
|
2303
|
+
const c = s.charCodeAt(j);
|
|
2304
|
+
if (c > 34 && c < 92) {
|
|
2305
|
+
this.json[this.i++] = c;
|
|
2306
|
+
} else if (c < 128) {
|
|
2307
|
+
const esc = ESCAPE_TABLE[c];
|
|
2308
|
+
if (esc !== null) {
|
|
2309
|
+
this.ensure(esc.length + 1 + (z - j - 1) * 3 + 1);
|
|
2310
|
+
this.json[this.i++] = BACKSLASH;
|
|
2311
|
+
for (let k = 0; k < esc.length; k++) {
|
|
2312
|
+
this.json[this.i++] = esc.charCodeAt(k);
|
|
2313
|
+
}
|
|
2314
|
+
} else {
|
|
2315
|
+
this.json[this.i++] = c;
|
|
2316
|
+
}
|
|
2317
|
+
} else if (c >= 55296 && c <= 56319) {
|
|
2318
|
+
const next = j + 1 < z ? s.charCodeAt(j + 1) : 0;
|
|
2319
|
+
if (next >= 56320 && next <= 57343) {
|
|
2320
|
+
this.ensure(4);
|
|
2321
|
+
const { written } = encoder.encodeInto(s.substring(j, j + 2), this.json.subarray(this.i));
|
|
2322
|
+
this.i += written;
|
|
2323
|
+
++j;
|
|
2324
|
+
} else {
|
|
2325
|
+
this.ensure(6 + (z - j - 1) * 3 + 1);
|
|
2326
|
+
this.writeUnicodeEscape(c);
|
|
2327
|
+
}
|
|
2328
|
+
} else if (c >= 56320 && c <= 57343) {
|
|
2329
|
+
this.ensure(6 + (z - j - 1) * 3 + 1);
|
|
2330
|
+
this.writeUnicodeEscape(c);
|
|
2331
|
+
} else {
|
|
2332
|
+
let { i, json } = this;
|
|
2333
|
+
if (c < 2048) {
|
|
2334
|
+
json[i++] = 192 | c >> 6;
|
|
2335
|
+
json[i++] = 128 | c & 63;
|
|
2336
|
+
} else {
|
|
2337
|
+
json[i++] = 224 | c >> 12;
|
|
2338
|
+
json[i++] = 128 | c >> 6 & 63;
|
|
2339
|
+
json[i++] = 128 | c & 63;
|
|
2340
|
+
}
|
|
2341
|
+
this.i = i;
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
this.json[this.i++] = QUOTE;
|
|
2345
|
+
}
|
|
2346
|
+
writeUnicodeEscape(code) {
|
|
2347
|
+
let { json, i } = this;
|
|
2348
|
+
json[i++] = BACKSLASH;
|
|
2349
|
+
json[i++] = 117;
|
|
2350
|
+
const hex = code.toString(16).padStart(4, "0");
|
|
2351
|
+
for (let j = 0; j < 4; ++j) {
|
|
2352
|
+
json[i++] = hex.charCodeAt(j);
|
|
2353
|
+
}
|
|
2354
|
+
this.i = i;
|
|
2355
|
+
}
|
|
2356
|
+
static B64 = (() => {
|
|
2357
|
+
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
2358
|
+
const table = new Uint8Array(64);
|
|
2359
|
+
for (let i = 0; i < 64; ++i) {
|
|
2360
|
+
table[i] = chars.charCodeAt(i);
|
|
2361
|
+
}
|
|
2362
|
+
return table;
|
|
2363
|
+
})();
|
|
2364
|
+
writeBase64(data) {
|
|
2365
|
+
const b64Len = Math.ceil(data.length / 3) * 4;
|
|
2366
|
+
this.ensure(b64Len + 2);
|
|
2367
|
+
const json = this.json;
|
|
2368
|
+
const B64 = _JsonShapeSerializer2.B64;
|
|
2369
|
+
let i = this.i;
|
|
2370
|
+
json[i++] = QUOTE;
|
|
2371
|
+
const len = data.length;
|
|
2372
|
+
const remainder = len % 3;
|
|
2373
|
+
const mainLen = len - remainder;
|
|
2374
|
+
for (let j = 0; j < mainLen; j += 3) {
|
|
2375
|
+
const a = data[j];
|
|
2376
|
+
const b = data[j + 1];
|
|
2377
|
+
const c = data[j + 2];
|
|
2378
|
+
json[i++] = B64[a >> 2];
|
|
2379
|
+
json[i++] = B64[(a & 3) << 4 | b >> 4];
|
|
2380
|
+
json[i++] = B64[(b & 15) << 2 | c >> 6];
|
|
2381
|
+
json[i++] = B64[c & 63];
|
|
2382
|
+
}
|
|
2383
|
+
if (remainder === 2) {
|
|
2384
|
+
const a = data[mainLen];
|
|
2385
|
+
const b = data[mainLen + 1];
|
|
2386
|
+
json[i++] = B64[a >> 2];
|
|
2387
|
+
json[i++] = B64[(a & 3) << 4 | b >> 4];
|
|
2388
|
+
json[i++] = B64[(b & 15) << 2];
|
|
2389
|
+
json[i++] = 61;
|
|
2390
|
+
} else if (remainder === 1) {
|
|
2391
|
+
const a = data[mainLen];
|
|
2392
|
+
json[i++] = B64[a >> 2];
|
|
2393
|
+
json[i++] = B64[(a & 3) << 4];
|
|
2394
|
+
json[i++] = 61;
|
|
2395
|
+
json[i++] = 61;
|
|
2396
|
+
}
|
|
2397
|
+
json[i++] = QUOTE;
|
|
2398
|
+
this.i = i;
|
|
2399
|
+
}
|
|
2400
|
+
writeValue(schema, value, container) {
|
|
2401
|
+
if (value == null) {
|
|
2402
|
+
if (container?.isStructSchema()) {
|
|
2403
|
+
if (value === void 0) {
|
|
2404
|
+
const ns2 = NormalizedSchema.of(schema);
|
|
2405
|
+
if (ns2.isIdempotencyToken()) {
|
|
2406
|
+
this.writeAsciiQuoted(generateIdempotencyToken());
|
|
2407
|
+
return;
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
this.ensure(4);
|
|
2413
|
+
this.json.set(NULL, this.i);
|
|
2414
|
+
this.i += 4;
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
const ns = NormalizedSchema.of(schema);
|
|
2418
|
+
const isObject = typeof value === "object";
|
|
2419
|
+
if (ns.isStringSchema()) {
|
|
2420
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
2421
|
+
if (mediaType) {
|
|
2422
|
+
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
2423
|
+
if (isJson) {
|
|
2424
|
+
this.writeJsonString(LazyJsonString.from(value).toString());
|
|
2425
|
+
return;
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
if (this.settings.bigNumberAsString && value != null && (ns.isBigIntegerSchema() || ns.isBigDecimalSchema())) {
|
|
2430
|
+
const asString = value instanceof NumericValue ? value.string : String(value);
|
|
2431
|
+
this.writeAsciiQuoted(asString);
|
|
2432
|
+
return;
|
|
2433
|
+
}
|
|
2434
|
+
if (isObject) {
|
|
2435
|
+
if (ns.isStructSchema()) {
|
|
2436
|
+
this.writeStruct(ns, value);
|
|
2437
|
+
return;
|
|
2438
|
+
}
|
|
2439
|
+
if (Array.isArray(value) && (ns.isListSchema() || ns.isDocumentSchema())) {
|
|
2440
|
+
this.writeList(ns, value, ns.isDocumentSchema());
|
|
2441
|
+
return;
|
|
2442
|
+
}
|
|
2443
|
+
if (ns.isMapSchema()) {
|
|
2444
|
+
this.writeMap(ns, value, false);
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
|
|
2448
|
+
this.writeBase64(value);
|
|
2449
|
+
return;
|
|
2450
|
+
}
|
|
2451
|
+
if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
|
|
2452
|
+
this.writeTimestamp(ns, value);
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2455
|
+
if (value instanceof NumericValue) {
|
|
2456
|
+
this.writeAscii(value.string);
|
|
2457
|
+
return;
|
|
2458
|
+
}
|
|
2459
|
+
if (ns.isDocumentSchema()) {
|
|
2460
|
+
if (Array.isArray(value)) {
|
|
2461
|
+
this.writeList(ns, value, true);
|
|
2462
|
+
} else {
|
|
2463
|
+
this.writeMap(ns, value, true);
|
|
2464
|
+
}
|
|
2465
|
+
return;
|
|
2466
|
+
}
|
|
2467
|
+
const json = JSON.stringify(value);
|
|
2468
|
+
this.writeAscii(json);
|
|
2469
|
+
return;
|
|
2470
|
+
}
|
|
2471
|
+
if (typeof value === "string") {
|
|
2472
|
+
if (ns.isBlobSchema()) {
|
|
2473
|
+
const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
2474
|
+
this.writeAsciiQuoted(b64);
|
|
2475
|
+
return;
|
|
2476
|
+
}
|
|
2477
|
+
this.writeJsonString(value);
|
|
2478
|
+
return;
|
|
2479
|
+
}
|
|
2480
|
+
if (typeof value === "number") {
|
|
2481
|
+
if (Math.abs(value) === Infinity || Number.isNaN(value)) {
|
|
2482
|
+
this.writeAsciiQuoted(String(value));
|
|
2483
|
+
return;
|
|
2484
|
+
}
|
|
2485
|
+
const numStr = String(value);
|
|
2486
|
+
this.writeAscii(numStr);
|
|
2487
|
+
return;
|
|
2488
|
+
}
|
|
2489
|
+
if (typeof value === "boolean") {
|
|
2490
|
+
this.ensure(5);
|
|
2491
|
+
let { i, json } = this;
|
|
2492
|
+
if (value) {
|
|
2493
|
+
json.set(TRUE, i);
|
|
2494
|
+
i += 4;
|
|
2495
|
+
} else {
|
|
2496
|
+
json.set(FALSE, i);
|
|
2497
|
+
i += 5;
|
|
2498
|
+
}
|
|
2499
|
+
this.i = i;
|
|
2500
|
+
return;
|
|
2501
|
+
}
|
|
2502
|
+
if (typeof value === "bigint") {
|
|
2503
|
+
this.writeAscii(value.toString());
|
|
2504
|
+
return;
|
|
2505
|
+
}
|
|
2506
|
+
this.writeAscii(String(value));
|
|
2507
|
+
}
|
|
2508
|
+
writeStruct(ns, value) {
|
|
2509
|
+
this.ensure(2);
|
|
2510
|
+
this.json[this.i++] = OPEN_BRACE;
|
|
2511
|
+
let wroteAny = false;
|
|
2512
|
+
const hasType = typeof value.__type === "string";
|
|
2513
|
+
let writtenKeys;
|
|
2514
|
+
if (hasType) {
|
|
2515
|
+
writtenKeys = /* @__PURE__ */ new Set();
|
|
2516
|
+
}
|
|
2517
|
+
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
2518
|
+
const item = value[memberName];
|
|
2519
|
+
if (item == null && !memberSchema.isIdempotencyToken()) {
|
|
2520
|
+
continue;
|
|
2521
|
+
}
|
|
2522
|
+
if (wroteAny) {
|
|
2523
|
+
this.ensure(1);
|
|
2524
|
+
this.json[this.i++] = COMMA;
|
|
2525
|
+
}
|
|
2526
|
+
wroteAny = true;
|
|
2527
|
+
const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
|
|
2528
|
+
if (writtenKeys) {
|
|
2529
|
+
writtenKeys.add(memberName);
|
|
2530
|
+
writtenKeys.add(targetKey);
|
|
2531
|
+
}
|
|
2532
|
+
this.writeAsciiQuoted(targetKey);
|
|
2533
|
+
this.json[this.i++] = COLON;
|
|
2534
|
+
this.writeValue(memberSchema, item, ns);
|
|
2535
|
+
}
|
|
2536
|
+
if (!wroteAny && ns.isUnionSchema()) {
|
|
2537
|
+
const { $unknown } = value;
|
|
2538
|
+
if (Array.isArray($unknown)) {
|
|
2539
|
+
const [k, v] = $unknown;
|
|
2540
|
+
this.writeAsciiQuoted(k);
|
|
2541
|
+
this.ensure(1);
|
|
2542
|
+
this.json[this.i++] = COLON;
|
|
2543
|
+
this.writeValue(15, v, ns);
|
|
2544
|
+
}
|
|
2545
|
+
} else if (hasType) {
|
|
2546
|
+
for (const k in value) {
|
|
2547
|
+
if (writtenKeys.has(k)) {
|
|
2548
|
+
continue;
|
|
2549
|
+
}
|
|
2550
|
+
writtenKeys.add(k);
|
|
2551
|
+
const v = value[k];
|
|
2552
|
+
if (wroteAny) {
|
|
2553
|
+
this.ensure(1);
|
|
2554
|
+
this.json[this.i++] = COMMA;
|
|
2555
|
+
}
|
|
2556
|
+
wroteAny = true;
|
|
2557
|
+
this.writeAsciiQuoted(k);
|
|
2558
|
+
this.ensure(1);
|
|
2559
|
+
this.json[this.i++] = COLON;
|
|
2560
|
+
this.writeValue(15, v, void 0);
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
this.ensure(1);
|
|
2564
|
+
this.json[this.i++] = CLOSE_BRACE;
|
|
2565
|
+
}
|
|
2566
|
+
writeList(ns, value, isDocument) {
|
|
2567
|
+
const sparse = !!ns.getMergedTraits().sparse;
|
|
2568
|
+
const valueSchema = ns.getValueSchema();
|
|
2569
|
+
if (!isDocument) {
|
|
2570
|
+
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
2571
|
+
let hasSpecials = false;
|
|
2572
|
+
for (let i = 0; i < value.length; ++i) {
|
|
2573
|
+
const v = value[i];
|
|
2574
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity || v == null && !sparse) {
|
|
2575
|
+
hasSpecials = true;
|
|
2576
|
+
break;
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
let json;
|
|
2580
|
+
if (!hasSpecials) {
|
|
2581
|
+
json = JSON.stringify(value);
|
|
2582
|
+
} else {
|
|
2583
|
+
const out = [];
|
|
2584
|
+
for (let i = 0; i < value.length; ++i) {
|
|
2585
|
+
const v = value[i];
|
|
2586
|
+
if (v == null && !sparse) {
|
|
2587
|
+
continue;
|
|
2588
|
+
}
|
|
2589
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
2590
|
+
out.push(String(v));
|
|
2591
|
+
} else {
|
|
2592
|
+
out.push(v);
|
|
2593
|
+
}
|
|
2594
|
+
}
|
|
2595
|
+
json = JSON.stringify(out);
|
|
2596
|
+
}
|
|
2597
|
+
this.ensure(json.length * 3);
|
|
2598
|
+
this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
|
|
2599
|
+
return;
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
this.ensure(2);
|
|
2603
|
+
this.json[this.i++] = OPEN_BRACKET;
|
|
2604
|
+
let wroteFirstItem = false;
|
|
2605
|
+
for (let i = 0; i < value.length; ++i) {
|
|
2606
|
+
const item = value[i];
|
|
2607
|
+
if (isDocument ? item === void 0 : item == null && !sparse) {
|
|
2608
|
+
continue;
|
|
2609
|
+
}
|
|
2610
|
+
if (wroteFirstItem) {
|
|
2611
|
+
this.ensure(1);
|
|
2612
|
+
this.json[this.i++] = COMMA;
|
|
2613
|
+
}
|
|
2614
|
+
this.writeValue(valueSchema, item, void 0);
|
|
2615
|
+
wroteFirstItem = true;
|
|
2616
|
+
}
|
|
2617
|
+
this.ensure(1);
|
|
2618
|
+
this.json[this.i++] = CLOSE_BRACKET;
|
|
2619
|
+
}
|
|
2620
|
+
writeMap(ns, value, isDocument) {
|
|
2621
|
+
const sparse = !!ns.getMergedTraits().sparse;
|
|
2622
|
+
const valueSchema = ns.getValueSchema();
|
|
2623
|
+
if (!isDocument) {
|
|
2624
|
+
if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
|
|
2625
|
+
let modifications;
|
|
2626
|
+
for (const k in value) {
|
|
2627
|
+
if (!hasOwn(value, k)) {
|
|
2628
|
+
continue;
|
|
2629
|
+
}
|
|
2630
|
+
const v = value[k];
|
|
2631
|
+
if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
|
|
2632
|
+
(modifications ??= {})[k] = v;
|
|
2633
|
+
value[k] = String(v);
|
|
2634
|
+
} else if (v === null && !sparse) {
|
|
2635
|
+
(modifications ??= {})[k] = null;
|
|
2636
|
+
value[k] = void 0;
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
const json = JSON.stringify(value);
|
|
2640
|
+
if (modifications) {
|
|
2641
|
+
Object.assign(value, modifications);
|
|
2642
|
+
}
|
|
2643
|
+
this.ensure(json.length * 3);
|
|
2644
|
+
this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
|
|
2645
|
+
return;
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
this.ensure(2);
|
|
2649
|
+
this.json[this.i++] = OPEN_BRACE;
|
|
2650
|
+
let first = true;
|
|
2651
|
+
for (const k in value) {
|
|
2652
|
+
if (!hasOwn(value, k)) {
|
|
2653
|
+
continue;
|
|
2654
|
+
}
|
|
2655
|
+
const v = value[k];
|
|
2656
|
+
if (isDocument ? v === void 0 : v == null && !sparse) {
|
|
2657
|
+
continue;
|
|
2658
|
+
}
|
|
2659
|
+
if (!first) {
|
|
2660
|
+
this.ensure(1);
|
|
2661
|
+
this.json[this.i++] = COMMA;
|
|
2662
|
+
}
|
|
2663
|
+
first = false;
|
|
2664
|
+
this.writeJsonString(k);
|
|
2665
|
+
this.ensure(1);
|
|
2666
|
+
this.json[this.i++] = COLON;
|
|
2667
|
+
this.writeValue(valueSchema, v, void 0);
|
|
2668
|
+
}
|
|
2669
|
+
this.ensure(1);
|
|
2670
|
+
this.json[this.i++] = CLOSE_BRACE;
|
|
2671
|
+
}
|
|
2672
|
+
writeTimestamp(ns, value) {
|
|
2673
|
+
const format = determineTimestampFormat(ns, this.settings);
|
|
2674
|
+
switch (format) {
|
|
2675
|
+
case 5: {
|
|
2676
|
+
const iso = value.toISOString().replace(".000Z", "Z");
|
|
2677
|
+
this.writeAsciiQuoted(iso);
|
|
2678
|
+
return;
|
|
2679
|
+
}
|
|
2680
|
+
case 6: {
|
|
2681
|
+
this.writeAsciiQuoted(dateToUtcString(value));
|
|
2682
|
+
return;
|
|
2683
|
+
}
|
|
2684
|
+
case 7: {
|
|
2685
|
+
const epochSecs = String(value.getTime() / 1e3);
|
|
2686
|
+
this.writeAscii(epochSecs);
|
|
2687
|
+
return;
|
|
2688
|
+
}
|
|
2689
|
+
default: {
|
|
2690
|
+
const epochSecs = String(value.getTime() / 1e3);
|
|
2691
|
+
this.writeAscii(epochSecs);
|
|
2692
|
+
return;
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
};
|
|
2697
|
+
|
|
2698
|
+
// ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js
|
|
2699
|
+
var JsonCodec2 = class extends SerdeContextConfig {
|
|
2700
|
+
settings;
|
|
2701
|
+
constructor(settings) {
|
|
2702
|
+
super();
|
|
2703
|
+
this.settings = settings;
|
|
2704
|
+
}
|
|
2705
|
+
createSerializer() {
|
|
2706
|
+
const serializer = new JsonShapeSerializer2(this.settings);
|
|
2707
|
+
serializer.setSerdeContext(this.serdeContext);
|
|
2708
|
+
return serializer;
|
|
2709
|
+
}
|
|
2710
|
+
createDeserializer() {
|
|
2711
|
+
const deserializer = new JsonShapeDeserializer2(this.settings);
|
|
2712
|
+
deserializer.setSerdeContext(this.serdeContext);
|
|
2713
|
+
return deserializer;
|
|
2714
|
+
}
|
|
2715
|
+
};
|
|
2716
|
+
|
|
2717
|
+
export {
|
|
2718
|
+
ProviderError,
|
|
2719
|
+
CredentialsProviderError,
|
|
2720
|
+
TokenProviderError,
|
|
2721
|
+
chain,
|
|
2722
|
+
booleanSelector,
|
|
2723
|
+
SelectorType,
|
|
2724
|
+
getProfileName,
|
|
2725
|
+
getSSOTokenFilepath,
|
|
2726
|
+
getSSOTokenFromFile,
|
|
2727
|
+
CONFIG_PREFIX_SEPARATOR,
|
|
2728
|
+
loadSsoSessionData,
|
|
2729
|
+
parseKnownFiles,
|
|
2730
|
+
externalDataInterceptor,
|
|
2731
|
+
loadConfig,
|
|
2732
|
+
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
|
|
2733
|
+
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
|
|
2734
|
+
NODE_REGION_CONFIG_OPTIONS,
|
|
2735
|
+
NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
2736
|
+
resolveRegionConfig,
|
|
2737
|
+
resolveDefaultsModeConfig,
|
|
2738
|
+
collectBody,
|
|
2739
|
+
extendedEncodeURIComponent,
|
|
2740
|
+
HttpBindingProtocol,
|
|
2741
|
+
RpcProtocol,
|
|
2742
|
+
determineTimestampFormat,
|
|
2743
|
+
FromStringShapeDeserializer,
|
|
2744
|
+
HttpInterceptingShapeDeserializer,
|
|
2745
|
+
HttpInterceptingShapeSerializer,
|
|
2746
|
+
getHttpHandlerExtensionConfiguration,
|
|
2747
|
+
resolveHttpHandlerRuntimeConfig,
|
|
2748
|
+
getContentLengthPlugin,
|
|
2749
|
+
escapeUri,
|
|
2750
|
+
buildQueryString,
|
|
2751
|
+
loadRestJsonErrorCode,
|
|
2752
|
+
JsonCodec2
|
|
2753
|
+
};
|