@cdklabs/cdk-construct-connect-datalake 0.0.27 → 0.0.28
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/.jsii +10 -10
- package/.jsii.tabl.json +1 -1
- package/lib/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +187 -181
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormation.d.ts +184 -180
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/client-connect/README.md +7 -0
- package/node_modules/@aws-sdk/client-connect/dist-cjs/index.js +74 -21
- package/node_modules/@aws-sdk/client-connect/dist-es/Connect.js +4 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/commands/ListSecurityProfileAIAgentsCommand.js +4 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/commands/index.js +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/models/enums.js +10 -6
- package/node_modules/@aws-sdk/client-connect/dist-es/pagination/ListSecurityProfileAIAgentsPaginator.js +4 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/pagination/index.js +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-es/schemas/schemas_0.js +48 -14
- package/node_modules/@aws-sdk/client-connect/dist-types/Connect.d.ts +813 -793
- package/node_modules/@aws-sdk/client-connect/dist-types/ConnectClient.d.ts +3 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/CreateSecurityProfileCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/DescribeInstanceAttributeCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/ListContactReferencesCommand.d.ts +8 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/ListInstanceAttributesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/ListSecurityProfileAIAgentsCommand.d.ts +97 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/PutUserStatusCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/ReleasePhoneNumberCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/ReplicateInstanceCommand.d.ts +2 -3
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateInstanceAttributeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateSecurityProfileCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateTestCaseCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateTrafficDistributionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateUserConfigCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/models/enums.d.ts +26 -14
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_0.d.ts +22 -27
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_1.d.ts +28 -37
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_2.d.ts +158 -75
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_3.d.ts +83 -81
- package/node_modules/@aws-sdk/client-connect/dist-types/models/models_4.d.ts +81 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/pagination/ListSecurityProfileAIAgentsPaginator.d.ts +7 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/schemas/schemas_0.d.ts +5 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/Connect.d.ts +820 -792
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/ConnectClient.d.ts +6 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/ListSecurityProfileAIAgentsCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/PutUserStatusCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/ReleasePhoneNumberCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/ReplicateInstanceCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/UpdateTestCaseCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/UpdateTrafficDistributionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/UpdateUserConfigCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/enums.d.ts +12 -7
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_0.d.ts +6 -7
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_1.d.ts +8 -18
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_2.d.ts +67 -18
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_3.d.ts +19 -20
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_4.d.ts +24 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/pagination/ListSecurityProfileAIAgentsPaginator.d.ts +11 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/schemas/schemas_0.d.ts +5 -0
- package/node_modules/@aws-sdk/client-connect/package.json +8 -8
- package/node_modules/@aws-sdk/client-glue/README.md +7 -0
- package/node_modules/@aws-sdk/client-glue/dist-cjs/index.js +104 -21
- package/node_modules/@aws-sdk/client-glue/dist-es/Glue.js +2 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/ListIntegrationTablePropertiesCommand.js +4 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/commands/index.js +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/models/enums.js +16 -0
- package/node_modules/@aws-sdk/client-glue/dist-es/schemas/schemas_0.js +75 -20
- package/node_modules/@aws-sdk/client-glue/dist-types/Glue.d.ts +613 -599
- package/node_modules/@aws-sdk/client-glue/dist-types/GlueClient.d.ts +3 -2
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/CreateIntegrationTablePropertiesCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/CreateTableCommand.d.ts +18 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetDataQualityRuleRecommendationRunCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetIntegrationTablePropertiesCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTableCommand.d.ts +24 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTableVersionCommand.d.ts +24 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTableVersionsCommand.d.ts +24 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetTablesCommand.d.ts +25 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/GetUnfilteredTableMetadataCommand.d.ts +24 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/ListDataQualityRuleRecommendationRunsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/ListIntegrationTablePropertiesCommand.d.ts +129 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/RemoveSchemaVersionMetadataCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/ResetJobBookmarkCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/ResumeWorkflowRunCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/SearchTablesCommand.d.ts +24 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/StartDataQualityRuleRecommendationRunCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/UpdateIntegrationTablePropertiesCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/UpdateTableCommand.d.ts +18 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/models/enums.d.ts +40 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_1.d.ts +86 -51
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_2.d.ts +168 -134
- package/node_modules/@aws-sdk/client-glue/dist-types/models/models_3.d.ts +116 -4
- package/node_modules/@aws-sdk/client-glue/dist-types/schemas/schemas_0.d.ts +6 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/Glue.d.ts +620 -598
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/GlueClient.d.ts +6 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/ListIntegrationTablePropertiesCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/RemoveSchemaVersionMetadataCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/ResetJobBookmarkCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/ResumeWorkflowRunCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/enums.d.ts +20 -0
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_1.d.ts +18 -10
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_2.d.ts +37 -34
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_3.d.ts +30 -1
- package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/schemas/schemas_0.d.ts +6 -0
- package/node_modules/@aws-sdk/client-glue/package.json +8 -8
- package/node_modules/@aws-sdk/client-lakeformation/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/client-lakeformation/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-lakeformation/dist-types/LakeFormation.d.ts +129 -123
- package/node_modules/@aws-sdk/client-lakeformation/dist-types/ts3.4/LakeFormation.d.ts +126 -122
- package/node_modules/@aws-sdk/client-lakeformation/package.json +8 -8
- package/node_modules/@aws-sdk/client-ram/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/client-ram/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-ram/dist-types/RAM.d.ts +77 -71
- package/node_modules/@aws-sdk/client-ram/dist-types/ts3.4/RAM.d.ts +74 -70
- package/node_modules/@aws-sdk/client-ram/package.json +8 -8
- package/node_modules/@aws-sdk/client-sts/README.md +22 -3
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +30 -27
- package/node_modules/@aws-sdk/client-sts/dist-es/schemas/schemas_0.js +29 -26
- package/node_modules/@aws-sdk/client-sts/dist-types/STS.d.ts +51 -26
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +22 -3
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/AssumeRootCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetFederationTokenCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetSessionTokenCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/commands/GetWebIdentityTokenCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/index.d.ts +22 -3
- package/node_modules/@aws-sdk/client-sts/dist-types/models/models_0.d.ts +118 -0
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STS.d.ts +29 -23
- package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/models/models_0.d.ts +18 -0
- package/node_modules/@aws-sdk/client-sts/package.json +9 -9
- package/node_modules/@aws-sdk/core/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +14 -11
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +13 -10
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +33 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +22 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +22 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +40 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +14 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STS.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +1 -0
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +22 -37
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +26 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +49 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +12 -7
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +22 -22
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +0 -15
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +8 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +18 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +49 -8
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +12 -7
- package/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +4 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +4 -1
- package/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@smithy/types/dist-types/metrics.d.ts +8 -7
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +8 -7
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +5 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/which-typed-array/CHANGELOG.md +14 -0
- package/node_modules/which-typed-array/README.md +0 -2
- package/node_modules/which-typed-array/index.d.ts +288 -11
- package/node_modules/which-typed-array/index.js +6 -7
- package/node_modules/which-typed-array/package.json +12 -11
- package/package.json +11 -11
- package/node_modules/which-typed-array/eslint.config.mjs +0 -12
- package/node_modules/which-typed-array/test/index.js +0 -105
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.35.0",
|
|
4
4
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
242
242
|
},
|
|
243
243
|
"dependencies": {
|
|
244
|
-
"@smithy/types": "^4.
|
|
244
|
+
"@smithy/types": "^4.19.0",
|
|
245
245
|
"tslib": "^2.6.2"
|
|
246
246
|
},
|
|
247
247
|
"devDependencies": {
|
|
@@ -339,7 +339,10 @@ const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) =>
|
|
|
339
339
|
continue;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
canonical[canonicalHeaderName] = headers[headerName]
|
|
342
|
+
canonical[canonicalHeaderName] = headers[headerName]
|
|
343
|
+
.replace(/[\r\n]/g, " ")
|
|
344
|
+
.replace(/[ \t]+/g, " ")
|
|
345
|
+
.replace(/^ | $/g, "");
|
|
343
346
|
}
|
|
344
347
|
return canonical;
|
|
345
348
|
};
|
|
@@ -14,7 +14,10 @@ export const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHead
|
|
|
14
14
|
continue;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
canonical[canonicalHeaderName] = headers[headerName]
|
|
17
|
+
canonical[canonicalHeaderName] = headers[headerName]
|
|
18
|
+
.replace(/[\r\n]/g, " ")
|
|
19
|
+
.replace(/[ \t]+/g, " ")
|
|
20
|
+
.replace(/^ | $/g, "");
|
|
18
21
|
}
|
|
19
22
|
return canonical;
|
|
20
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.4",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/signature-v4",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"test:watch": "yarn g:vitest watch"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@smithy/core": "^3.
|
|
42
|
-
"@smithy/types": "^4.
|
|
41
|
+
"@smithy/core": "^3.35.0",
|
|
42
|
+
"@smithy/types": "^4.19.0",
|
|
43
43
|
"tslib": "^2.6.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
@@ -15,10 +15,11 @@ export type RequestOutcome = "Success" | "Fault";
|
|
|
15
15
|
export type MetricUnit = "Seconds" | "Microseconds" | "Milliseconds" | "Bytes" | "Kilobytes" | "Megabytes" | "Gigabytes" | "Terabytes" | "Bits" | "Kilobits" | "Megabits" | "Gigabits" | "Terabits" | "Percent" | "Count" | "None" | "Bytes/Second" | "Kilobytes/Second" | "Megabytes/Second" | "Gigabytes/Second" | "Terabytes/Second" | "Bits/Second" | "Kilobits/Second" | "Megabits/Second" | "Gigabits/Second" | "Terabits/Second" | "Count/Second";
|
|
16
16
|
/**
|
|
17
17
|
* Backend-agnostic recorder for per-request metrics. The framework drives the
|
|
18
|
-
* lifecycle and records request-level
|
|
19
|
-
* handlers record their own business
|
|
20
|
-
* recorders (e.g. an EMF recorder,
|
|
21
|
-
* these abstract calls into their
|
|
18
|
+
* lifecycle of recorders obtained from a factory and records request-level
|
|
19
|
+
* metrics through this interface; user handlers record their own business
|
|
20
|
+
* metrics through the same methods. Concrete recorders (e.g. an EMF recorder,
|
|
21
|
+
* or a future OpenTelemetry recorder) translate these abstract calls into their
|
|
22
|
+
* own primitives.
|
|
22
23
|
*
|
|
23
24
|
* @typeParam Native - the concrete backend handle returned by
|
|
24
25
|
* {@link MetricsRecorder.getMetrics}, e.g. an OpenTelemetry `Meter`. The
|
|
@@ -30,13 +31,13 @@ export type MetricUnit = "Seconds" | "Microseconds" | "Milliseconds" | "Bytes" |
|
|
|
30
31
|
export interface MetricsRecorder<Native> {
|
|
31
32
|
/**
|
|
32
33
|
* Open the recorder for the current request. Called by the framework once at
|
|
33
|
-
* the start of request handling.
|
|
34
|
+
* the start of request handling when it owns the recorder.
|
|
34
35
|
*/
|
|
35
36
|
begin(): void;
|
|
36
37
|
/**
|
|
37
38
|
* Close the recorder for the current request. Called by the framework once at
|
|
38
|
-
* the end of request handling; this is where an
|
|
39
|
-
* flushes its event.
|
|
39
|
+
* the end of request handling when it owns the recorder; this is where an
|
|
40
|
+
* implementation typically flushes its event.
|
|
40
41
|
*/
|
|
41
42
|
end(): void;
|
|
42
43
|
/**
|
|
@@ -4,6 +4,7 @@ import type { Command } from "./command";
|
|
|
4
4
|
import type { EndpointV2 } from "./endpoint";
|
|
5
5
|
import type { SmithyFeatures } from "./feature-ids";
|
|
6
6
|
import type { Logger } from "./logger";
|
|
7
|
+
import type { MetricsRecorder } from "./metrics";
|
|
7
8
|
import type { UserAgent } from "./util";
|
|
8
9
|
/**
|
|
9
10
|
* @public
|
|
@@ -505,6 +506,10 @@ export interface HandlerExecutionContext {
|
|
|
505
506
|
commandInstance?: Command<any, any, any, any, any>;
|
|
506
507
|
selectedHttpAuthScheme?: SelectedHttpAuthScheme;
|
|
507
508
|
features?: SmithyFeatures;
|
|
509
|
+
/**
|
|
510
|
+
* Transferred from request options to the Smithy context.
|
|
511
|
+
*/
|
|
512
|
+
metricsRecorder?: MetricsRecorder<unknown>;
|
|
508
513
|
/**
|
|
509
514
|
* @deprecated
|
|
510
515
|
* Do not assign arbitrary members to the Smithy Context,
|
|
@@ -15,10 +15,11 @@ export type RequestOutcome = "Success" | "Fault";
|
|
|
15
15
|
export type MetricUnit = "Seconds" | "Microseconds" | "Milliseconds" | "Bytes" | "Kilobytes" | "Megabytes" | "Gigabytes" | "Terabytes" | "Bits" | "Kilobits" | "Megabits" | "Gigabits" | "Terabits" | "Percent" | "Count" | "None" | "Bytes/Second" | "Kilobytes/Second" | "Megabytes/Second" | "Gigabytes/Second" | "Terabytes/Second" | "Bits/Second" | "Kilobits/Second" | "Megabits/Second" | "Gigabits/Second" | "Terabits/Second" | "Count/Second";
|
|
16
16
|
/**
|
|
17
17
|
* Backend-agnostic recorder for per-request metrics. The framework drives the
|
|
18
|
-
* lifecycle and records request-level
|
|
19
|
-
* handlers record their own business
|
|
20
|
-
* recorders (e.g. an EMF recorder,
|
|
21
|
-
* these abstract calls into their
|
|
18
|
+
* lifecycle of recorders obtained from a factory and records request-level
|
|
19
|
+
* metrics through this interface; user handlers record their own business
|
|
20
|
+
* metrics through the same methods. Concrete recorders (e.g. an EMF recorder,
|
|
21
|
+
* or a future OpenTelemetry recorder) translate these abstract calls into their
|
|
22
|
+
* own primitives.
|
|
22
23
|
*
|
|
23
24
|
* @typeParam Native - the concrete backend handle returned by
|
|
24
25
|
* {@link MetricsRecorder.getMetrics}, e.g. an OpenTelemetry `Meter`. The
|
|
@@ -30,13 +31,13 @@ export type MetricUnit = "Seconds" | "Microseconds" | "Milliseconds" | "Bytes" |
|
|
|
30
31
|
export interface MetricsRecorder<Native> {
|
|
31
32
|
/**
|
|
32
33
|
* Open the recorder for the current request. Called by the framework once at
|
|
33
|
-
* the start of request handling.
|
|
34
|
+
* the start of request handling when it owns the recorder.
|
|
34
35
|
*/
|
|
35
36
|
begin(): void;
|
|
36
37
|
/**
|
|
37
38
|
* Close the recorder for the current request. Called by the framework once at
|
|
38
|
-
* the end of request handling; this is where an
|
|
39
|
-
* flushes its event.
|
|
39
|
+
* the end of request handling when it owns the recorder; this is where an
|
|
40
|
+
* implementation typically flushes its event.
|
|
40
41
|
*/
|
|
41
42
|
end(): void;
|
|
42
43
|
/**
|
|
@@ -4,6 +4,7 @@ import { Command } from "./command";
|
|
|
4
4
|
import { EndpointV2 } from "./endpoint";
|
|
5
5
|
import { SmithyFeatures } from "./feature-ids";
|
|
6
6
|
import { Logger } from "./logger";
|
|
7
|
+
import { MetricsRecorder } from "./metrics";
|
|
7
8
|
import { UserAgent } from "./util";
|
|
8
9
|
/**
|
|
9
10
|
* @public
|
|
@@ -505,6 +506,10 @@ export interface HandlerExecutionContext {
|
|
|
505
506
|
commandInstance?: Command<any, any, any, any, any>;
|
|
506
507
|
selectedHttpAuthScheme?: SelectedHttpAuthScheme;
|
|
507
508
|
features?: SmithyFeatures;
|
|
509
|
+
/**
|
|
510
|
+
* Transferred from request options to the Smithy context.
|
|
511
|
+
*/
|
|
512
|
+
metricsRecorder?: MetricsRecorder<unknown>;
|
|
508
513
|
/**
|
|
509
514
|
* @deprecated
|
|
510
515
|
* Do not assign arbitrary members to the Smithy Context,
|
|
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.1.24](https://github.com/inspect-js/which-typed-array/compare/v1.1.23...v1.1.24) - 2026-09-18
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [types] fix the types for good, hopefully [`d746946`](https://github.com/inspect-js/which-typed-array/commit/d746946a8a76dc6e58302de53856aff304dbdb98)
|
|
13
|
+
|
|
14
|
+
## [v1.1.23](https://github.com/inspect-js/which-typed-array/compare/v1.1.22...v1.1.23) - 2026-09-16
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [types] handle a consumer `lib` that lacks `Float16Array` [`7fd78fb`](https://github.com/inspect-js/which-typed-array/commit/7fd78fb1f90d00d1e340457c7e6a00492c1c5e79)
|
|
19
|
+
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `auto-changelog`, `eslint`, `tape` [`885ae7d`](https://github.com/inspect-js/which-typed-array/commit/885ae7d6888b21bcacaae883f86861258196888d)
|
|
20
|
+
- [readme] remove dead badges [`67844dd`](https://github.com/inspect-js/which-typed-array/commit/67844dd30a89dddfc98172672af6372ae2e74d13)
|
|
21
|
+
|
|
8
22
|
## [v1.1.22](https://github.com/inspect-js/which-typed-array/compare/v1.1.21...v1.1.22) - 2026-06-05
|
|
9
23
|
|
|
10
24
|
### Commits
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
[![github actions][actions-image]][actions-url]
|
|
4
4
|
[![coverage][codecov-image]][codecov-url]
|
|
5
|
-
[![dependency status][deps-svg]][deps-url]
|
|
6
|
-
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
|
7
5
|
[![License][license-image]][license-url]
|
|
8
6
|
[![Downloads][downloads-image]][downloads-url]
|
|
9
7
|
|
|
@@ -4,32 +4,309 @@
|
|
|
4
4
|
* @param {unknown} value The potential collection
|
|
5
5
|
* @returns {TypedArrayName | false | null} 'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array' | false | null
|
|
6
6
|
*/
|
|
7
|
-
declare function whichTypedArray<T>(
|
|
8
|
-
|
|
7
|
+
declare function whichTypedArray<T>(
|
|
8
|
+
value: T & whichTypedArray.TypedArray,
|
|
9
|
+
): whichTypedArray.WhichTypedArray<T>;
|
|
10
|
+
declare function whichTypedArray<T>(
|
|
11
|
+
value: unknown,
|
|
12
|
+
): false | null | whichTypedArray.TypedArrayName;
|
|
9
13
|
|
|
10
14
|
import TAs from 'available-typed-arrays';
|
|
11
15
|
|
|
16
|
+
/** the names the consumer's `lib` declares a global for, so there is a type to compare against */
|
|
17
|
+
type DeclaredName = whichTypedArray.TypedArrayName & keyof typeof globalThis;
|
|
18
|
+
|
|
19
|
+
/** the names it does not (eg, `Float16Array` under `lib: es2020`), which are still possible at runtime */
|
|
20
|
+
type UndeclaredName = Exclude<whichTypedArray.TypedArrayName, keyof typeof globalThis>;
|
|
21
|
+
|
|
22
|
+
type Instance<Name extends DeclaredName> = typeof globalThis[Name]['prototype'];
|
|
23
|
+
|
|
24
|
+
type IsAny<T> = 0 extends (1 & T) ? true : false;
|
|
25
|
+
|
|
26
|
+
type RequiredKeys<T> = {
|
|
27
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? never : K
|
|
28
|
+
}[keyof T];
|
|
29
|
+
|
|
30
|
+
/** the key types of `T`'s index signatures, found by `{}` having them covered already */
|
|
31
|
+
type IndexKeys<T> = {
|
|
32
|
+
[K in keyof T]-?: {} extends Record<K, never> ? K : never
|
|
33
|
+
}[keyof T];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The keys of `T` that can be read off a value by name. An index signature is not a
|
|
37
|
+
* named member, but a `string`-keyed one cannot be told apart here from the named
|
|
38
|
+
* string members beside it, so it is left in and they are taken at face value.
|
|
39
|
+
*/
|
|
40
|
+
type NamedKeys<T> = Exclude<keyof T, Exclude<IndexKeys<T>, string>>;
|
|
41
|
+
|
|
42
|
+
/** `Object`'s members are on every object type, even though `keyof` does not list them */
|
|
43
|
+
type Apparent<T, K> = K extends keyof T
|
|
44
|
+
? T[K]
|
|
45
|
+
: K extends keyof Object
|
|
46
|
+
? Object[K]
|
|
47
|
+
: unknown;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The typed arrays' symbol-keyed member whose value is a string, which is
|
|
51
|
+
* `Symbol.toStringTag` in a `lib` that declares symbols and `never` in one that
|
|
52
|
+
* does not (`lib: es5`). Deriving it this way leaves the tag comparisons below
|
|
53
|
+
* with no information to go on, rather than naming `Symbol` in a `lib` without it.
|
|
54
|
+
*/
|
|
55
|
+
type TagKey = {
|
|
56
|
+
[K in keyof whichTypedArray.TypedArray & symbol]: whichTypedArray.TypedArray[K] extends string ? K : never
|
|
57
|
+
}[keyof whichTypedArray.TypedArray & symbol];
|
|
58
|
+
|
|
59
|
+
/** `unknown` when `T` says nothing about its own tag, which rules no name out */
|
|
60
|
+
type TagOf<T> = [TagKey] extends [never]
|
|
61
|
+
? unknown
|
|
62
|
+
: TagKey extends keyof T
|
|
63
|
+
? T[TagKey & keyof T]
|
|
64
|
+
: unknown;
|
|
65
|
+
|
|
66
|
+
/** one value can carry both tags when either is assignable to the other */
|
|
67
|
+
type TagsMeet<A, B> = IsAny<A> extends true
|
|
68
|
+
? true
|
|
69
|
+
: IsAny<B> extends true
|
|
70
|
+
? true
|
|
71
|
+
: [Extract<A, B>] extends [never]
|
|
72
|
+
? ([Extract<B, A>] extends [never] ? false : true)
|
|
73
|
+
: true;
|
|
74
|
+
|
|
75
|
+
/** how many levels of members `Related` walks before it stops looking for a conflict */
|
|
76
|
+
type Prev = [
|
|
77
|
+
never,
|
|
78
|
+
0,
|
|
79
|
+
1,
|
|
80
|
+
2,
|
|
81
|
+
3,
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
type Depth = 0 | 1 | 2 | 3 | 4;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* A rough stand-in for the comparability check TypeScript itself runs to decide
|
|
88
|
+
* whether `x === someTypedArray` is worth allowing. One value can be a `Source` and
|
|
89
|
+
* a `Target` at once if the two already share a constituent, or if neither is an
|
|
90
|
+
* object type and one is assignable to the other; failing that, `D` more levels of
|
|
91
|
+
* members and signatures are compared, in this direction only - `Meets` runs both.
|
|
92
|
+
*
|
|
93
|
+
* It is a heuristic, not that check, and it leans towards saying the two can meet.
|
|
94
|
+
* A conflict further down than `D` levels is not looked for, so a name can be left
|
|
95
|
+
* in that no value could produce. It also drops names TypeScript would have allowed:
|
|
96
|
+
* a `Source` that carries a call signature, or a member declared with its own type
|
|
97
|
+
* parameters, meets nothing, and only the last signature of an overloaded member is
|
|
98
|
+
* compared.
|
|
99
|
+
*
|
|
100
|
+
* `Stale` marks a comparison standing in for a name this `lib` has no type for, where
|
|
101
|
+
* a member the `lib` has never heard of is weaker evidence (see `GatedOn`).
|
|
102
|
+
*/
|
|
103
|
+
type Related<Source, Target, D extends Depth, Stale extends boolean> = IsAny<Source> extends true
|
|
104
|
+
? true
|
|
105
|
+
: IsAny<Target> extends true
|
|
106
|
+
? true
|
|
107
|
+
: [Extract<Source, Target>] extends [never]
|
|
108
|
+
? (Widens<Source, Target> extends true ? true : Deeply<Source, Target, D, Stale>)
|
|
109
|
+
: true;
|
|
110
|
+
|
|
111
|
+
/** neither side being an object type, one value fits both when either is assignable to the other */
|
|
112
|
+
type Widens<Source, Target> = [Source] extends [object]
|
|
113
|
+
? false
|
|
114
|
+
: [Target] extends [object]
|
|
115
|
+
? false
|
|
116
|
+
: ([Extract<Target, Source>] extends [never] ? false : true);
|
|
117
|
+
|
|
118
|
+
/** a union on either side only needs one part that can meet one part of the other */
|
|
119
|
+
type Deeply<Source, Target, D extends Depth, Stale extends boolean> = [D] extends [0]
|
|
120
|
+
? true
|
|
121
|
+
: true extends (Source extends unknown
|
|
122
|
+
? (Target extends unknown ? Structurally<Source, Target, D, Stale> : never)
|
|
123
|
+
: never)
|
|
124
|
+
? true
|
|
125
|
+
: false;
|
|
126
|
+
|
|
127
|
+
type Structurally<Source, Target, D extends Depth, Stale extends boolean> = [Source] extends [(...args: infer SP) => infer SR]
|
|
128
|
+
? ([Target] extends [(...args: infer TP) => infer TR]
|
|
129
|
+
? (Related<SR, TR, Prev[D], Stale> extends true ? ParamsRelated<SP, TP, Prev[D], Stale> : false)
|
|
130
|
+
: false)
|
|
131
|
+
: [Target] extends [Function]
|
|
132
|
+
? false
|
|
133
|
+
: [Source] extends [object]
|
|
134
|
+
? ([Target] extends [object] ? Membered<Source, Target, D, Stale> : false)
|
|
135
|
+
: false;
|
|
136
|
+
|
|
137
|
+
/** each pair of parameters only has to meet, in either direction, as with an overridden method */
|
|
138
|
+
type ParamsRelated<SP extends readonly unknown[], TP extends readonly unknown[], D extends Depth, Stale extends boolean> = false extends {
|
|
139
|
+
[K in keyof SP]: K extends keyof TP ? Related<SP[K], TP[K & keyof TP], D, Stale> : true
|
|
140
|
+
}[number]
|
|
141
|
+
? false
|
|
142
|
+
: true;
|
|
143
|
+
|
|
144
|
+
type Membered<Source, Target, D extends Depth, Stale extends boolean> = GatedOn<Source, Target, D, Stale> extends true
|
|
145
|
+
? (TagsMeet<TagOf<Source>, TagOf<Target>> extends true ? EachMember<Source, Target, D, Stale> : false)
|
|
146
|
+
: false;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Whether a member `Target` requires but `Source` lacks counts against the two
|
|
150
|
+
* meeting. At the top of a comparison it does. Below that, in a comparison standing
|
|
151
|
+
* in for a name this `lib` has no type for, one side is the `lib`'s own type for a
|
|
152
|
+
* typed array or one of its members, and a member missing from that is as easily an
|
|
153
|
+
* older `lib`'s gap as a real conflict, so it is not counted - which is how such a
|
|
154
|
+
* name survives an input written in terms of a newer member, as
|
|
155
|
+
* `{ buffer: { byteLength: number } & { resizable: boolean } }` is.
|
|
156
|
+
*/
|
|
157
|
+
type GatedOn<Source, Target, D extends Depth, Stale extends boolean> = [Stale, D] extends [true, 0 | 1 | 2 | 3]
|
|
158
|
+
? true
|
|
159
|
+
: Compatible<Source, Target, Stale>;
|
|
160
|
+
|
|
161
|
+
/** the members of `Target` that `Source`, or `Object` behind it, also has */
|
|
162
|
+
type SharedKeys<Source, Target> = keyof Target & (keyof Source | keyof Object);
|
|
163
|
+
|
|
164
|
+
type EachMember<Source, Target, D extends Depth, Stale extends boolean> = false extends {
|
|
165
|
+
[K in SharedKeys<Source, Target>]: Related<Apparent<Source, K>, Target[K], Prev[D], Stale>
|
|
166
|
+
}[SharedKeys<Source, Target>]
|
|
167
|
+
? false
|
|
168
|
+
: true;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* `Source` has something to offer for every member `Target` requires. `Target`'s
|
|
172
|
+
* optional members are left out on purpose: one value can be a `Source` and a
|
|
173
|
+
* `Target` at once while having none of them.
|
|
174
|
+
*/
|
|
175
|
+
type Compatible<Source, Target, Stale extends boolean> = [Exclude<RequiredKeys<Target>, NamedKeys<Source> | keyof Object>] extends [never]
|
|
176
|
+
? IndexesCovered<Source, Target, Stale>
|
|
177
|
+
: false;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Each index signature `Target` has needs one on `Source` with the same keys, or a
|
|
181
|
+
* value type of `any`, which anything satisfies. Numeric-string keys are the
|
|
182
|
+
* exception: they reach a `number` index signature, so `Source` having one of those
|
|
183
|
+
* covers them, as long as what it holds can be what `Target` asks for.
|
|
184
|
+
*/
|
|
185
|
+
type IndexesCovered<Source, Target, Stale extends boolean> = [{
|
|
186
|
+
[K in IndexKeys<Target>]: IsAny<Target[K & keyof Target]> extends true
|
|
187
|
+
? never
|
|
188
|
+
: (K extends IndexKeys<Source>
|
|
189
|
+
? never
|
|
190
|
+
: (string extends K
|
|
191
|
+
? K
|
|
192
|
+
: (`${number}` extends K
|
|
193
|
+
? (Related<Source[number & keyof Source], Target[K & keyof Target], 1, Stale> extends true ? never : K)
|
|
194
|
+
: K)))
|
|
195
|
+
}[IndexKeys<Target>]] extends [never]
|
|
196
|
+
? true
|
|
197
|
+
: false;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* `T` is not assignable to a plain copy of its own members, which is what a
|
|
201
|
+
* `private`, `protected` or `#private` member does to a class, and what a call or
|
|
202
|
+
* construct signature does to any type - none of which a typed array has, so nothing
|
|
203
|
+
* outside that class can be one.
|
|
204
|
+
*/
|
|
205
|
+
type IsNominal<T> = {
|
|
206
|
+
[K in keyof T]: T[K]
|
|
207
|
+
} extends T
|
|
208
|
+
? false
|
|
209
|
+
: true;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Whether a `T` and an `I` look like they could be one value. A nominal `T` only
|
|
213
|
+
* gets the one direction: nothing outside its class can be a `T`, but a `T` whose
|
|
214
|
+
* members are all there can still be a typed array.
|
|
215
|
+
*/
|
|
216
|
+
type Meets<T, I, Nominal, Stale extends boolean> = Related<T, I, 4, Stale> extends true
|
|
217
|
+
? true
|
|
218
|
+
: (Nominal extends true ? false : Related<I, T, 4, Stale>);
|
|
219
|
+
|
|
220
|
+
type MayBe<T, Name extends DeclaredName> = TagsMeet<TagOf<Instance<Name>>, TagOf<T>> extends true
|
|
221
|
+
? Meets<T, Instance<Name>, IsNominal<T>, false>
|
|
222
|
+
: false;
|
|
223
|
+
|
|
224
|
+
type PossibleNames<T> = {
|
|
225
|
+
[Name in DeclaredName]: MayBe<T, Name> extends true ? Name : never
|
|
226
|
+
}[DeclaredName];
|
|
227
|
+
|
|
228
|
+
/** the members the typed arrays this `lib` declares actually have */
|
|
229
|
+
type KnownKey = keyof Object | {
|
|
230
|
+
[Name in DeclaredName]: keyof Instance<Name>
|
|
231
|
+
}[DeclaredName];
|
|
232
|
+
|
|
233
|
+
type UnknownKeys<T> = Exclude<RequiredKeys<T>, KnownKey>;
|
|
234
|
+
|
|
235
|
+
type WithoutUnknown<T> = Pick<T, Exclude<keyof T, UnknownKeys<T>>>;
|
|
236
|
+
|
|
237
|
+
/** of those, the ones holding data rather than a method */
|
|
238
|
+
type UnknownDataKeys<T> = {
|
|
239
|
+
[K in UnknownKeys<T>]: T[K & keyof T] extends Function ? never : K
|
|
240
|
+
}[UnknownKeys<T>];
|
|
241
|
+
|
|
242
|
+
type MeetsAny<T, Nominal> = true extends {
|
|
243
|
+
[Name in DeclaredName]: Meets<T, Instance<Name>, Nominal, true>
|
|
244
|
+
}[DeclaredName]
|
|
245
|
+
? true
|
|
246
|
+
: false;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* An undeclared name has no type in this `lib`, so there is nothing to compare `T`
|
|
250
|
+
* to: the declared typed arrays stand in for it, with the members `T` requires that
|
|
251
|
+
* none of them has set aside, so that a `T` asking for a member only a newer `lib`
|
|
252
|
+
* knows about - `at` under `lib: es2020` - can still be the name that `lib` lacks.
|
|
253
|
+
*
|
|
254
|
+
* Setting a member aside loses whatever it said, and a member the `lib` has not heard
|
|
255
|
+
* of further down is not counted either (see `GatedOn`), so this is looser than the
|
|
256
|
+
* test for a declared name. A member that is data rather than a method is kept as
|
|
257
|
+
* evidence, on the guess that a newer `lib` mostly adds methods; that guess, and the
|
|
258
|
+
* stand-in itself, are why an undeclared name is the one that survives most often -
|
|
259
|
+
* `DataView`, whose own methods are all set aside, keeps one.
|
|
260
|
+
*/
|
|
261
|
+
type MayBeUndeclared<T> = IsAny<T> extends true
|
|
262
|
+
? true
|
|
263
|
+
: [unknown] extends [T]
|
|
264
|
+
? true
|
|
265
|
+
: [T] extends [Function]
|
|
266
|
+
? false
|
|
267
|
+
: [T] extends [object]
|
|
268
|
+
? ([UnknownDataKeys<T>] extends [never] ? MeetsAny<WithoutUnknown<T>, IsNominal<T>> : false)
|
|
269
|
+
: false;
|
|
270
|
+
|
|
271
|
+
/** a specific tag names the typed array outright; a `string` tag leaves it to the members */
|
|
272
|
+
type PossibleUndeclaredNames<T> = [UndeclaredName] extends [never]
|
|
273
|
+
? never
|
|
274
|
+
: string extends TagOf<T>
|
|
275
|
+
? (MayBeUndeclared<T> extends true ? UndeclaredName : never)
|
|
276
|
+
: Extract<UndeclaredName, TagOf<T>>;
|
|
277
|
+
|
|
12
278
|
declare namespace whichTypedArray {
|
|
13
279
|
export type TypedArrayName = ReturnType<typeof TAs>[number];
|
|
14
280
|
|
|
15
|
-
|
|
281
|
+
// a consumer's `lib` may not declare every name (eg, `Float16Array`), so only look up the globals it has
|
|
282
|
+
export type TypedArrayConstructor = typeof globalThis[TypedArrayName & keyof typeof globalThis];
|
|
16
283
|
|
|
17
284
|
export type TypedArray = TypedArrayConstructor['prototype'];
|
|
18
285
|
|
|
19
286
|
/**
|
|
20
287
|
* Distributes over `T`, so a subset of typed arrays maps to the matching
|
|
21
288
|
* subset of names (`Int8Array | Uint8Array` -> `'Int8Array' | 'Uint8Array'`,
|
|
22
|
-
* never a float16 or bigint name)
|
|
289
|
+
* never a float16 or bigint name), and a `T` that is not definitely a typed
|
|
290
|
+
* array also gets `false | null`.
|
|
291
|
+
*
|
|
292
|
+
* For everything else - `object`, `ArrayBufferView`, `{ length: 0 }`, a
|
|
293
|
+
* duck-typed stand-in - it keeps the names that `T`'s own members do not rule
|
|
294
|
+
* out, so comparing the result to one of those names is usually not reported as a
|
|
295
|
+
* comparison that can never be true. The rule behind that is a heuristic (see
|
|
296
|
+
* `Related`), so it can keep a name no value of `T` could produce, and a `T` whose
|
|
297
|
+
* conflict with a name is buried deeply enough will keep that name too. A name
|
|
298
|
+
* this `lib` has no type for (see `MayBeUndeclared`) is kept more readily still.
|
|
23
299
|
*
|
|
24
300
|
* Derived entirely from `TypedArrayName`, so a new entry in `available-typed-arrays` flows through with no other change here.
|
|
25
301
|
*/
|
|
26
|
-
export type WhichTypedArray<T> =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
302
|
+
export type WhichTypedArray<T> = T extends unknown
|
|
303
|
+
?
|
|
304
|
+
| PossibleNames<T>
|
|
305
|
+
| PossibleUndeclaredNames<T>
|
|
306
|
+
| ([T] extends [TypedArray]
|
|
307
|
+
? (IsAny<T> extends true ? false | null : never)
|
|
308
|
+
: false | null)
|
|
309
|
+
: never;
|
|
33
310
|
}
|
|
34
311
|
|
|
35
312
|
export = whichTypedArray;
|
|
@@ -56,7 +56,7 @@ if (hasToStringTag && gOPD && getProto) {
|
|
|
56
56
|
var arr = new g[typedArray]();
|
|
57
57
|
var fn = arr.slice || arr.set;
|
|
58
58
|
if (fn) {
|
|
59
|
-
var bound = /** @type {BoundSlice | BoundSet} */ (
|
|
59
|
+
var bound = /** @type {typeof BoundSlice | typeof BoundSet} */ (
|
|
60
60
|
// @ts-expect-error TODO FIXME
|
|
61
61
|
callBind(fn)
|
|
62
62
|
);
|
|
@@ -111,11 +111,8 @@ function isTATag(tag) {
|
|
|
111
111
|
return $indexOf(typedArrays, tag) > -1;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
/**
|
|
115
|
-
|
|
116
|
-
* @param {unknown} value
|
|
117
|
-
*/
|
|
118
|
-
module.exports = function whichTypedArray(value) {
|
|
114
|
+
/** @type {(value: unknown) => ReturnType<typeof import('.')>} */
|
|
115
|
+
function whichTypedArray(value) {
|
|
119
116
|
if (!value || typeof value !== 'object') {
|
|
120
117
|
return false;
|
|
121
118
|
}
|
|
@@ -132,4 +129,6 @@ module.exports = function whichTypedArray(value) {
|
|
|
132
129
|
}
|
|
133
130
|
if (!gOPD) { return null; } // unknown engine
|
|
134
131
|
return tryTypedArrays(value);
|
|
135
|
-
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
module.exports = whichTypedArray;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "which-typed-array",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.24",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Jordan Harband",
|
|
6
6
|
"email": "ljharb@gmail.com",
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"test:harmony": "nyc node --harmony --es-staging test",
|
|
32
32
|
"posttest": "npx npm@'>=10.2' audit --production",
|
|
33
33
|
"lint": "eslint .",
|
|
34
|
-
"postlint": "tsc -p . && attw -P",
|
|
34
|
+
"postlint": "tsc -p . && tsc -p test/es2020 && attw -P",
|
|
35
35
|
"version": "auto-changelog && git add CHANGELOG.md",
|
|
36
|
-
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
36
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
|
|
37
|
+
"dependencies": "node -p \"process.env.npm_command\" | npx \"dt-clean@^1.2.2\" --auto"
|
|
37
38
|
},
|
|
38
39
|
"repository": {
|
|
39
40
|
"type": "git",
|
|
@@ -69,18 +70,16 @@
|
|
|
69
70
|
"has-tostringtag": "^1.0.2"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
|
-
"@arethetypeswrong/cli": "^0.18.
|
|
73
|
-
"@ljharb/eslint-config": "^22.2.
|
|
73
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
74
|
+
"@ljharb/eslint-config": "^22.2.4",
|
|
74
75
|
"@ljharb/tsconfig": "^0.3.2",
|
|
75
76
|
"@types/call-bind": "^1.0.5",
|
|
76
|
-
"@types/for-each": "^0.3.3",
|
|
77
|
-
"@types/gopd": "^1.0.3",
|
|
78
77
|
"@types/is-callable": "^1.1.2",
|
|
79
78
|
"@types/make-arrow-function": "^1.2.2",
|
|
80
79
|
"@types/make-generator-function": "^2.0.3",
|
|
81
|
-
"@types/
|
|
82
|
-
"auto-changelog": "^2.6.
|
|
83
|
-
"eslint": "^10.
|
|
80
|
+
"@types/node": "^22.20.3",
|
|
81
|
+
"auto-changelog": "^2.6.1",
|
|
82
|
+
"eslint": "^10.10.0",
|
|
84
83
|
"in-publish": "^2.0.1",
|
|
85
84
|
"is-callable": "^1.2.7",
|
|
86
85
|
"jiti": "^0.0.0",
|
|
@@ -89,7 +88,7 @@
|
|
|
89
88
|
"npmignore": "^0.3.5",
|
|
90
89
|
"nyc": "^10.3.2",
|
|
91
90
|
"safe-publish-latest": "^2.0.0",
|
|
92
|
-
"tape": "^5.
|
|
91
|
+
"tape": "^5.10.2",
|
|
93
92
|
"typescript": "next"
|
|
94
93
|
},
|
|
95
94
|
"testling": {
|
|
@@ -124,6 +123,8 @@
|
|
|
124
123
|
"publishConfig": {
|
|
125
124
|
"ignore": [
|
|
126
125
|
".github/workflows",
|
|
126
|
+
"eslint.config.mjs",
|
|
127
|
+
"test",
|
|
127
128
|
"types.d.ts"
|
|
128
129
|
]
|
|
129
130
|
}
|