agent-relay 4.0.32 → 4.0.34
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/bin/agent-relay-broker-darwin-arm64 +0 -0
- package/bin/agent-relay-broker-darwin-x64 +0 -0
- package/bin/agent-relay-broker-linux-arm64 +0 -0
- package/bin/agent-relay-broker-linux-x64 +0 -0
- package/dist/index.cjs +1 -3
- package/dist/src/cli/commands/on/start.d.ts.map +1 -1
- package/dist/src/cli/commands/on/start.js +149 -111
- package/dist/src/cli/commands/on/start.js.map +1 -1
- package/dist/src/cli/commands/setup.js +2 -2
- package/dist/src/cli/commands/setup.js.map +1 -1
- package/node_modules/@agent-relay/cloud/package.json +2 -2
- package/node_modules/@agent-relay/config/package.json +1 -1
- package/node_modules/@agent-relay/hooks/package.json +4 -4
- package/node_modules/@agent-relay/sdk/dist/workflows/runner.d.ts.map +1 -1
- package/node_modules/@agent-relay/sdk/dist/workflows/runner.js +7 -5
- package/node_modules/@agent-relay/sdk/dist/workflows/runner.js.map +1 -1
- package/node_modules/@agent-relay/sdk/package.json +2 -2
- package/node_modules/@agent-relay/telemetry/dist/config.d.ts +1 -1
- package/node_modules/@agent-relay/telemetry/dist/config.d.ts.map +1 -1
- package/node_modules/@agent-relay/telemetry/dist/config.js +6 -3
- package/node_modules/@agent-relay/telemetry/dist/config.js.map +1 -1
- package/node_modules/@agent-relay/telemetry/package.json +1 -1
- package/node_modules/@agent-relay/trajectory/package.json +2 -2
- package/node_modules/@agent-relay/user-directory/package.json +2 -2
- package/node_modules/@agent-relay/utils/package.json +2 -2
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +18 -10
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +18 -10
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +6 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -2
- package/node_modules/@aws-sdk/core/package.json +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/bdd.js +100 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/bdd.js +90 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/bdd.js +80 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/bdd.js +80 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +87 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/bdd.js +150 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/bdd.js +97 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +87 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js +77 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js +77 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +88 -4
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js +147 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +7 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js +8 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/auth/httpAuthSchemeProvider.d.ts +15 -7
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +10 -4
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.shared.d.ts +3 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/auth/httpAuthSchemeProvider.d.ts +20 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/bdd.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +35 -16
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +8 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +5 -4
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@relayfile/local-mount/README.md +215 -0
- package/node_modules/@relayfile/local-mount/dist/auto-sync.d.ts +31 -0
- package/node_modules/@relayfile/local-mount/dist/auto-sync.js +466 -0
- package/node_modules/@relayfile/local-mount/dist/dotfiles.d.ts +18 -0
- package/node_modules/@relayfile/local-mount/dist/dotfiles.js +43 -0
- package/node_modules/@relayfile/local-mount/dist/index.d.ts +4 -0
- package/node_modules/@relayfile/local-mount/dist/index.js +3 -0
- package/node_modules/@relayfile/local-mount/dist/launch.d.ts +50 -0
- package/node_modules/@relayfile/local-mount/dist/launch.js +129 -0
- package/node_modules/@relayfile/local-mount/dist/symlink-mount.d.ts +23 -0
- package/{dist/src/cli/commands/on → node_modules/@relayfile/local-mount/dist}/symlink-mount.js +88 -20
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/LICENSE +21 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/README.md +305 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/esm/handler.d.ts +90 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/esm/handler.js +629 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/esm/index.d.ts +215 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/esm/index.js +798 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/esm/package.json +1 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/handler.d.ts +90 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/handler.js +635 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/index.d.ts +215 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/index.js +804 -0
- package/node_modules/@relayfile/local-mount/node_modules/chokidar/package.json +69 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/LICENSE +21 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/README.md +120 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/esm/index.d.ts +108 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/esm/index.js +257 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/esm/package.json +1 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/index.d.ts +108 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/index.js +263 -0
- package/node_modules/@relayfile/local-mount/node_modules/readdirp/package.json +70 -0
- package/node_modules/@relayfile/local-mount/package.json +47 -0
- package/node_modules/@smithy/config-resolver/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -14
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +17 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +6 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +6 -3
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +23 -11
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +9 -3
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +16 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +8 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +6 -3
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/middleware-endpoint/package.json +3 -3
- package/node_modules/@smithy/middleware-retry/package.json +5 -5
- package/node_modules/@smithy/middleware-serde/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +188 -93
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +45 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +71 -35
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -18
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +41 -40
- package/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +42 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +34 -14
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +32 -8
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -5
- package/node_modules/@smithy/node-http-handler/package.json +1 -1
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +5 -0
- package/node_modules/@smithy/service-error-classification/dist-es/index.js +4 -0
- package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +6 -0
- package/node_modules/@smithy/service-error-classification/package.json +1 -1
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +3 -3
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +65 -53
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +9 -7
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +12 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +14 -13
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +7 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +10 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +5 -5
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts +2 -15
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts +6 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts +1 -1
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/package.json +1 -1
- package/node_modules/@smithy/util-retry/package.json +2 -2
- package/node_modules/@smithy/util-stream/package.json +2 -2
- package/package.json +25 -11
- package/packages/cloud/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/hooks/package.json +4 -4
- package/packages/sdk/dist/workflows/runner.d.ts.map +1 -1
- package/packages/sdk/dist/workflows/runner.js +7 -5
- package/packages/sdk/dist/workflows/runner.js.map +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/telemetry/dist/config.d.ts +1 -1
- package/packages/telemetry/dist/config.d.ts.map +1 -1
- package/packages/telemetry/dist/config.js +6 -3
- package/packages/telemetry/dist/config.js.map +1 -1
- package/packages/telemetry/package.json +1 -1
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/package.json +2 -2
- package/dist/src/cli/commands/on/symlink-mount.d.ts +0 -12
- package/dist/src/cli/commands/on/symlink-mount.d.ts.map +0 -1
- package/dist/src/cli/commands/on/symlink-mount.js.map +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/ruleset.js +0 -146
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +0 -133
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/ruleset.js +0 -106
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +0 -106
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js +0 -145
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/ruleset.js +0 -143
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/ruleset.js +0 -130
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/ruleset.js +0 -103
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js +0 -103
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js +0 -142
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/endpoint/ruleset.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/endpoint/ruleset.d.ts +0 -2
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReaddirpStream = exports.EntryTypes = void 0;
|
|
4
|
+
exports.readdirp = readdirp;
|
|
5
|
+
exports.readdirpPromise = readdirpPromise;
|
|
6
|
+
const promises_1 = require("node:fs/promises");
|
|
7
|
+
const node_stream_1 = require("node:stream");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
exports.EntryTypes = {
|
|
10
|
+
FILE_TYPE: 'files',
|
|
11
|
+
DIR_TYPE: 'directories',
|
|
12
|
+
FILE_DIR_TYPE: 'files_directories',
|
|
13
|
+
EVERYTHING_TYPE: 'all',
|
|
14
|
+
};
|
|
15
|
+
const defaultOptions = {
|
|
16
|
+
root: '.',
|
|
17
|
+
fileFilter: (_entryInfo) => true,
|
|
18
|
+
directoryFilter: (_entryInfo) => true,
|
|
19
|
+
type: exports.EntryTypes.FILE_TYPE,
|
|
20
|
+
lstat: false,
|
|
21
|
+
depth: 2147483648,
|
|
22
|
+
alwaysStat: false,
|
|
23
|
+
highWaterMark: 4096,
|
|
24
|
+
};
|
|
25
|
+
Object.freeze(defaultOptions);
|
|
26
|
+
const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
|
|
27
|
+
const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
|
|
28
|
+
const ALL_TYPES = [
|
|
29
|
+
exports.EntryTypes.DIR_TYPE,
|
|
30
|
+
exports.EntryTypes.EVERYTHING_TYPE,
|
|
31
|
+
exports.EntryTypes.FILE_DIR_TYPE,
|
|
32
|
+
exports.EntryTypes.FILE_TYPE,
|
|
33
|
+
];
|
|
34
|
+
const DIR_TYPES = new Set([
|
|
35
|
+
exports.EntryTypes.DIR_TYPE,
|
|
36
|
+
exports.EntryTypes.EVERYTHING_TYPE,
|
|
37
|
+
exports.EntryTypes.FILE_DIR_TYPE,
|
|
38
|
+
]);
|
|
39
|
+
const FILE_TYPES = new Set([
|
|
40
|
+
exports.EntryTypes.EVERYTHING_TYPE,
|
|
41
|
+
exports.EntryTypes.FILE_DIR_TYPE,
|
|
42
|
+
exports.EntryTypes.FILE_TYPE,
|
|
43
|
+
]);
|
|
44
|
+
const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
|
|
45
|
+
const wantBigintFsStats = process.platform === 'win32';
|
|
46
|
+
const emptyFn = (_entryInfo) => true;
|
|
47
|
+
const normalizeFilter = (filter) => {
|
|
48
|
+
if (filter === undefined)
|
|
49
|
+
return emptyFn;
|
|
50
|
+
if (typeof filter === 'function')
|
|
51
|
+
return filter;
|
|
52
|
+
if (typeof filter === 'string') {
|
|
53
|
+
const fl = filter.trim();
|
|
54
|
+
return (entry) => entry.basename === fl;
|
|
55
|
+
}
|
|
56
|
+
if (Array.isArray(filter)) {
|
|
57
|
+
const trItems = filter.map((item) => item.trim());
|
|
58
|
+
return (entry) => trItems.some((f) => entry.basename === f);
|
|
59
|
+
}
|
|
60
|
+
return emptyFn;
|
|
61
|
+
};
|
|
62
|
+
/** Readable readdir stream, emitting new files as they're being listed. */
|
|
63
|
+
class ReaddirpStream extends node_stream_1.Readable {
|
|
64
|
+
constructor(options = {}) {
|
|
65
|
+
super({
|
|
66
|
+
objectMode: true,
|
|
67
|
+
autoDestroy: true,
|
|
68
|
+
highWaterMark: options.highWaterMark,
|
|
69
|
+
});
|
|
70
|
+
const opts = { ...defaultOptions, ...options };
|
|
71
|
+
const { root, type } = opts;
|
|
72
|
+
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
73
|
+
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
74
|
+
const statMethod = opts.lstat ? promises_1.lstat : promises_1.stat;
|
|
75
|
+
// Use bigint stats if it's windows and stat() supports options (node 10+).
|
|
76
|
+
if (wantBigintFsStats) {
|
|
77
|
+
this._stat = (path) => statMethod(path, { bigint: true });
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this._stat = statMethod;
|
|
81
|
+
}
|
|
82
|
+
this._maxDepth = opts.depth ?? defaultOptions.depth;
|
|
83
|
+
this._wantsDir = type ? DIR_TYPES.has(type) : false;
|
|
84
|
+
this._wantsFile = type ? FILE_TYPES.has(type) : false;
|
|
85
|
+
this._wantsEverything = type === exports.EntryTypes.EVERYTHING_TYPE;
|
|
86
|
+
this._root = (0, node_path_1.resolve)(root);
|
|
87
|
+
this._isDirent = !opts.alwaysStat;
|
|
88
|
+
this._statsProp = this._isDirent ? 'dirent' : 'stats';
|
|
89
|
+
this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
|
|
90
|
+
// Launch stream with one parent, the root dir.
|
|
91
|
+
this.parents = [this._exploreDir(root, 1)];
|
|
92
|
+
this.reading = false;
|
|
93
|
+
this.parent = undefined;
|
|
94
|
+
}
|
|
95
|
+
async _read(batch) {
|
|
96
|
+
if (this.reading)
|
|
97
|
+
return;
|
|
98
|
+
this.reading = true;
|
|
99
|
+
try {
|
|
100
|
+
while (!this.destroyed && batch > 0) {
|
|
101
|
+
const par = this.parent;
|
|
102
|
+
const fil = par && par.files;
|
|
103
|
+
if (fil && fil.length > 0) {
|
|
104
|
+
const { path, depth } = par;
|
|
105
|
+
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
|
|
106
|
+
const awaited = await Promise.all(slice);
|
|
107
|
+
for (const entry of awaited) {
|
|
108
|
+
if (!entry)
|
|
109
|
+
continue;
|
|
110
|
+
if (this.destroyed)
|
|
111
|
+
return;
|
|
112
|
+
const entryType = await this._getEntryType(entry);
|
|
113
|
+
if (entryType === 'directory' && this._directoryFilter(entry)) {
|
|
114
|
+
if (depth <= this._maxDepth) {
|
|
115
|
+
this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
|
|
116
|
+
}
|
|
117
|
+
if (this._wantsDir) {
|
|
118
|
+
this.push(entry);
|
|
119
|
+
batch--;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else if ((entryType === 'file' || this._includeAsFile(entry)) &&
|
|
123
|
+
this._fileFilter(entry)) {
|
|
124
|
+
if (this._wantsFile) {
|
|
125
|
+
this.push(entry);
|
|
126
|
+
batch--;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const parent = this.parents.pop();
|
|
133
|
+
if (!parent) {
|
|
134
|
+
this.push(null);
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
this.parent = await parent;
|
|
138
|
+
if (this.destroyed)
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
this.destroy(error);
|
|
145
|
+
}
|
|
146
|
+
finally {
|
|
147
|
+
this.reading = false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async _exploreDir(path, depth) {
|
|
151
|
+
let files;
|
|
152
|
+
try {
|
|
153
|
+
files = await (0, promises_1.readdir)(path, this._rdOptions);
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
this._onError(error);
|
|
157
|
+
}
|
|
158
|
+
return { files, depth, path };
|
|
159
|
+
}
|
|
160
|
+
async _formatEntry(dirent, path) {
|
|
161
|
+
let entry;
|
|
162
|
+
const basename = this._isDirent ? dirent.name : dirent;
|
|
163
|
+
try {
|
|
164
|
+
const fullPath = (0, node_path_1.resolve)((0, node_path_1.join)(path, basename));
|
|
165
|
+
entry = { path: (0, node_path_1.relative)(this._root, fullPath), fullPath, basename };
|
|
166
|
+
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
this._onError(err);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
return entry;
|
|
173
|
+
}
|
|
174
|
+
_onError(err) {
|
|
175
|
+
if (isNormalFlowError(err) && !this.destroyed) {
|
|
176
|
+
this.emit('warn', err);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.destroy(err);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async _getEntryType(entry) {
|
|
183
|
+
// entry may be undefined, because a warning or an error were emitted
|
|
184
|
+
// and the statsProp is undefined
|
|
185
|
+
if (!entry && this._statsProp in entry) {
|
|
186
|
+
return '';
|
|
187
|
+
}
|
|
188
|
+
const stats = entry[this._statsProp];
|
|
189
|
+
if (stats.isFile())
|
|
190
|
+
return 'file';
|
|
191
|
+
if (stats.isDirectory())
|
|
192
|
+
return 'directory';
|
|
193
|
+
if (stats && stats.isSymbolicLink()) {
|
|
194
|
+
const full = entry.fullPath;
|
|
195
|
+
try {
|
|
196
|
+
const entryRealPath = await (0, promises_1.realpath)(full);
|
|
197
|
+
const entryRealPathStats = await (0, promises_1.lstat)(entryRealPath);
|
|
198
|
+
if (entryRealPathStats.isFile()) {
|
|
199
|
+
return 'file';
|
|
200
|
+
}
|
|
201
|
+
if (entryRealPathStats.isDirectory()) {
|
|
202
|
+
const len = entryRealPath.length;
|
|
203
|
+
if (full.startsWith(entryRealPath) && full.substr(len, 1) === node_path_1.sep) {
|
|
204
|
+
const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
205
|
+
// @ts-ignore
|
|
206
|
+
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
207
|
+
return this._onError(recursiveError);
|
|
208
|
+
}
|
|
209
|
+
return 'directory';
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (error) {
|
|
213
|
+
this._onError(error);
|
|
214
|
+
return '';
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
_includeAsFile(entry) {
|
|
219
|
+
const stats = entry && entry[this._statsProp];
|
|
220
|
+
return stats && this._wantsEverything && !stats.isDirectory();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.ReaddirpStream = ReaddirpStream;
|
|
224
|
+
/**
|
|
225
|
+
* Streaming version: Reads all files and directories in given root recursively.
|
|
226
|
+
* Consumes ~constant small amount of RAM.
|
|
227
|
+
* @param root Root directory
|
|
228
|
+
* @param options Options to specify root (start directory), filters and recursion depth
|
|
229
|
+
*/
|
|
230
|
+
function readdirp(root, options = {}) {
|
|
231
|
+
// @ts-ignore
|
|
232
|
+
let type = options.entryType || options.type;
|
|
233
|
+
if (type === 'both')
|
|
234
|
+
type = exports.EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
|
|
235
|
+
if (type)
|
|
236
|
+
options.type = type;
|
|
237
|
+
if (!root) {
|
|
238
|
+
throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
|
|
239
|
+
}
|
|
240
|
+
else if (typeof root !== 'string') {
|
|
241
|
+
throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
|
|
242
|
+
}
|
|
243
|
+
else if (type && !ALL_TYPES.includes(type)) {
|
|
244
|
+
throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
|
|
245
|
+
}
|
|
246
|
+
options.root = root;
|
|
247
|
+
return new ReaddirpStream(options);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Promise version: Reads all files and directories in given root recursively.
|
|
251
|
+
* Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
|
|
252
|
+
* @returns array of paths and their entry infos
|
|
253
|
+
*/
|
|
254
|
+
function readdirpPromise(root, options = {}) {
|
|
255
|
+
return new Promise((resolve, reject) => {
|
|
256
|
+
const files = [];
|
|
257
|
+
readdirp(root, options)
|
|
258
|
+
.on('data', (entry) => files.push(entry))
|
|
259
|
+
.on('end', () => resolve(files))
|
|
260
|
+
.on('error', (error) => reject(error));
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
exports.default = readdirp;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "readdirp",
|
|
3
|
+
"description": "Recursive version of fs.readdir with small RAM & CPU footprint.",
|
|
4
|
+
"version": "4.1.2",
|
|
5
|
+
"homepage": "https://github.com/paulmillr/readdirp",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git://github.com/paulmillr/readdirp.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/paulmillr/readdirp/issues"
|
|
13
|
+
},
|
|
14
|
+
"author": "Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
|
15
|
+
"contributors": [
|
|
16
|
+
"Thorsten Lorenz <thlorenz@gmx.de> (thlorenz.com)",
|
|
17
|
+
"Paul Miller (https://paulmillr.com)"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">= 14.18.0"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"index.js",
|
|
24
|
+
"index.d.ts",
|
|
25
|
+
"index.d.ts.map",
|
|
26
|
+
"index.js.map",
|
|
27
|
+
"esm"
|
|
28
|
+
],
|
|
29
|
+
"main": "./index.js",
|
|
30
|
+
"module": "./esm/index.js",
|
|
31
|
+
"types": "./index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"import": "./esm/index.js",
|
|
35
|
+
"require": "./index.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"sideEffects": false,
|
|
39
|
+
"keywords": [
|
|
40
|
+
"recursive",
|
|
41
|
+
"fs",
|
|
42
|
+
"stream",
|
|
43
|
+
"streams",
|
|
44
|
+
"readdir",
|
|
45
|
+
"filesystem",
|
|
46
|
+
"find",
|
|
47
|
+
"filter"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsc && tsc -p tsconfig.cjs.json",
|
|
51
|
+
"lint": "prettier --check index.ts test/index.test.js",
|
|
52
|
+
"format": "prettier --write index.ts test/index.test.js",
|
|
53
|
+
"test": "node test/index.test.js",
|
|
54
|
+
"test:coverage": "c8 node test/index.test.js"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@paulmillr/jsbt": "0.3.1",
|
|
58
|
+
"@types/node": "20.14.8",
|
|
59
|
+
"c8": "10.1.3",
|
|
60
|
+
"chai": "4.3.4",
|
|
61
|
+
"chai-subset": "1.6.0",
|
|
62
|
+
"micro-should": "0.5.0",
|
|
63
|
+
"prettier": "3.1.1",
|
|
64
|
+
"typescript": "5.5.2"
|
|
65
|
+
},
|
|
66
|
+
"funding": {
|
|
67
|
+
"type": "individual",
|
|
68
|
+
"url": "https://paulmillr.com/funding/"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@relayfile/local-mount",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Create a symlink/copy mount of a project directory with .agentignore/.agentreadonly semantics, then launch a CLI inside it and sync writable changes back on exit",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"chokidar": "^4.0.3",
|
|
19
|
+
"ignore": "^7.0.5"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^22.0.0",
|
|
23
|
+
"typescript": "^5.7.3",
|
|
24
|
+
"vitest": "^3.0.0"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/AgentWorkforce/relayfile",
|
|
32
|
+
"directory": "packages/local-mount"
|
|
33
|
+
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"relayfile",
|
|
37
|
+
"mount",
|
|
38
|
+
"symlink",
|
|
39
|
+
"agent",
|
|
40
|
+
"sandbox",
|
|
41
|
+
"agentignore",
|
|
42
|
+
"agentreadonly"
|
|
43
|
+
],
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/config-resolver",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.17",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline config-resolver",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@smithy/node-config-provider": "^4.3.14",
|
|
28
28
|
"@smithy/types": "^4.14.1",
|
|
29
29
|
"@smithy/util-config-provider": "^4.2.2",
|
|
30
|
-
"@smithy/util-endpoints": "^3.4.
|
|
30
|
+
"@smithy/util-endpoints": "^3.4.2",
|
|
31
31
|
"@smithy/util-middleware": "^4.2.14",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -204,7 +204,8 @@ function setFeature(context, feature, value) {
|
|
|
204
204
|
class DefaultIdentityProviderConfig {
|
|
205
205
|
authSchemes = new Map();
|
|
206
206
|
constructor(config) {
|
|
207
|
-
for (const
|
|
207
|
+
for (const key in config) {
|
|
208
|
+
const value = config[key];
|
|
208
209
|
if (value !== undefined) {
|
|
209
210
|
this.authSchemes.set(key, value);
|
|
210
211
|
}
|
|
@@ -745,7 +745,13 @@ const loadSmithyRpcV2CborErrorCode = (output, data) => {
|
|
|
745
745
|
if (data["__type"] !== undefined) {
|
|
746
746
|
return sanitizeErrorCode(data["__type"]);
|
|
747
747
|
}
|
|
748
|
-
|
|
748
|
+
let codeKey;
|
|
749
|
+
for (const key in data) {
|
|
750
|
+
if (key.toLowerCase() === "code") {
|
|
751
|
+
codeKey = key;
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
749
755
|
if (codeKey && data[codeKey] !== undefined) {
|
|
750
756
|
return sanitizeErrorCode(data[codeKey]);
|
|
751
757
|
}
|
|
@@ -772,8 +778,8 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
772
778
|
contents.hostname = resolvedHostname;
|
|
773
779
|
}
|
|
774
780
|
if (endpoint.headers) {
|
|
775
|
-
for (const
|
|
776
|
-
contents.headers[name] =
|
|
781
|
+
for (const name in endpoint.headers) {
|
|
782
|
+
contents.headers[name] = endpoint.headers[name];
|
|
777
783
|
}
|
|
778
784
|
}
|
|
779
785
|
if (body !== undefined) {
|
|
@@ -843,7 +849,7 @@ class CborShapeSerializer extends protocols.SerdeContext {
|
|
|
843
849
|
const newObject = {};
|
|
844
850
|
if (ns.isMapSchema()) {
|
|
845
851
|
const sparse = !!ns.getMergedTraits().sparse;
|
|
846
|
-
for (const key
|
|
852
|
+
for (const key in sourceObject) {
|
|
847
853
|
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
848
854
|
if (value != null || sparse) {
|
|
849
855
|
newObject[key] = value;
|
|
@@ -863,15 +869,15 @@ class CborShapeSerializer extends protocols.SerdeContext {
|
|
|
863
869
|
newObject[k] = v;
|
|
864
870
|
}
|
|
865
871
|
else if (typeof sourceObject.__type === "string") {
|
|
866
|
-
for (const
|
|
872
|
+
for (const k in sourceObject) {
|
|
867
873
|
if (!(k in newObject)) {
|
|
868
|
-
newObject[k] = this.serialize(15,
|
|
874
|
+
newObject[k] = this.serialize(15, sourceObject[k]);
|
|
869
875
|
}
|
|
870
876
|
}
|
|
871
877
|
}
|
|
872
878
|
}
|
|
873
879
|
else if (ns.isDocumentSchema()) {
|
|
874
|
-
for (const key
|
|
880
|
+
for (const key in sourceObject) {
|
|
875
881
|
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
876
882
|
}
|
|
877
883
|
}
|
|
@@ -944,7 +950,7 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
944
950
|
const newObject = {};
|
|
945
951
|
if (ns.isMapSchema()) {
|
|
946
952
|
const targetSchema = ns.getValueSchema();
|
|
947
|
-
for (const key
|
|
953
|
+
for (const key in value) {
|
|
948
954
|
const itemValue = this.readValue(targetSchema, value[key]);
|
|
949
955
|
newObject[key] = itemValue;
|
|
950
956
|
}
|
|
@@ -953,7 +959,12 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
953
959
|
const isUnion = ns.isUnionSchema();
|
|
954
960
|
let keys;
|
|
955
961
|
if (isUnion) {
|
|
956
|
-
keys = new Set(
|
|
962
|
+
keys = new Set();
|
|
963
|
+
for (const k in value) {
|
|
964
|
+
if (k !== "__type") {
|
|
965
|
+
keys.add(k);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
957
968
|
}
|
|
958
969
|
for (const [key, memberSchema] of ns.structIterator()) {
|
|
959
970
|
if (isUnion) {
|
|
@@ -963,14 +974,21 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
963
974
|
newObject[key] = this.readValue(memberSchema, value[key]);
|
|
964
975
|
}
|
|
965
976
|
}
|
|
966
|
-
if (isUnion && keys?.size === 1
|
|
967
|
-
|
|
968
|
-
|
|
977
|
+
if (isUnion && keys?.size === 1) {
|
|
978
|
+
let newObjectEmpty = true;
|
|
979
|
+
for (const _ in newObject) {
|
|
980
|
+
newObjectEmpty = false;
|
|
981
|
+
break;
|
|
982
|
+
}
|
|
983
|
+
if (newObjectEmpty) {
|
|
984
|
+
const k = keys.values().next().value;
|
|
985
|
+
newObject.$unknown = [k, value[k]];
|
|
986
|
+
}
|
|
969
987
|
}
|
|
970
988
|
else if (typeof value.__type === "string") {
|
|
971
|
-
for (const
|
|
989
|
+
for (const k in value) {
|
|
972
990
|
if (!(k in newObject)) {
|
|
973
|
-
newObject[k] =
|
|
991
|
+
newObject[k] = value[k];
|
|
974
992
|
}
|
|
975
993
|
}
|
|
976
994
|
}
|
|
@@ -8,8 +8,8 @@ const toEndpointV1 = (endpoint) => {
|
|
|
8
8
|
const v1Endpoint = urlParser.parseUrl(endpoint.url);
|
|
9
9
|
if (endpoint.headers) {
|
|
10
10
|
v1Endpoint.headers = {};
|
|
11
|
-
for (const
|
|
12
|
-
v1Endpoint.headers[name.toLowerCase()] =
|
|
11
|
+
for (const name in endpoint.headers) {
|
|
12
|
+
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
return v1Endpoint;
|
|
@@ -50,9 +50,13 @@ class EventStreamSerde {
|
|
|
50
50
|
body: event.body,
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
let unionMember = "";
|
|
54
|
+
for (const key in event) {
|
|
55
|
+
if (key !== "__type") {
|
|
56
|
+
unionMember = key;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
56
60
|
const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
|
|
57
61
|
const headers = {
|
|
58
62
|
":event-type": { type: "string", value: eventType },
|
|
@@ -73,9 +77,13 @@ class EventStreamSerde {
|
|
|
73
77
|
const memberSchemas = unionSchema.getMemberSchemas();
|
|
74
78
|
const initialResponseMarker = Symbol("initialResponseMarker");
|
|
75
79
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
let unionMember = "";
|
|
81
|
+
for (const key in event) {
|
|
82
|
+
if (key !== "__type") {
|
|
83
|
+
unionMember = key;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
const body = event[unionMember].body;
|
|
80
88
|
if (unionMember === "initial-response") {
|
|
81
89
|
const dataObject = await this.deserializer.read(responseSchema, body);
|
|
@@ -151,8 +159,8 @@ class EventStreamSerde {
|
|
|
151
159
|
if (!responseSchema) {
|
|
152
160
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
|
153
161
|
}
|
|
154
|
-
for (const
|
|
155
|
-
initialResponseContainer[key] = value;
|
|
162
|
+
for (const key in firstEvent.value) {
|
|
163
|
+
initialResponseContainer[key] = firstEvent.value[key];
|
|
156
164
|
}
|
|
157
165
|
}
|
|
158
166
|
return {
|
|
@@ -72,8 +72,8 @@ class HttpProtocol extends SerdeContext {
|
|
|
72
72
|
request.query[k] = v;
|
|
73
73
|
}
|
|
74
74
|
if (endpoint.headers) {
|
|
75
|
-
for (const
|
|
76
|
-
request.headers[name] =
|
|
75
|
+
for (const name in endpoint.headers) {
|
|
76
|
+
request.headers[name] = endpoint.headers[name].join(", ");
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return request;
|
|
@@ -87,8 +87,8 @@ class HttpProtocol extends SerdeContext {
|
|
|
87
87
|
...endpoint.query,
|
|
88
88
|
};
|
|
89
89
|
if (endpoint.headers) {
|
|
90
|
-
for (const
|
|
91
|
-
request.headers[name] =
|
|
90
|
+
for (const name in endpoint.headers) {
|
|
91
|
+
request.headers[name] = endpoint.headers[name];
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
return request;
|
|
@@ -103,8 +103,10 @@ class HttpProtocol extends SerdeContext {
|
|
|
103
103
|
if (opTraits.endpoint) {
|
|
104
104
|
let hostPrefix = opTraits.endpoint?.[0];
|
|
105
105
|
if (typeof hostPrefix === "string") {
|
|
106
|
-
const
|
|
107
|
-
|
|
106
|
+
for (const [name, member] of inputNs.structIterator()) {
|
|
107
|
+
if (!member.getMergedTraits().hostLabel) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
108
110
|
const replacement = input[name];
|
|
109
111
|
if (typeof replacement !== "string") {
|
|
110
112
|
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
@@ -200,7 +202,9 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
200
202
|
request.path += path;
|
|
201
203
|
}
|
|
202
204
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
203
|
-
|
|
205
|
+
for (const [key, value] of traitSearchParams) {
|
|
206
|
+
query[key] = value;
|
|
207
|
+
}
|
|
204
208
|
}
|
|
205
209
|
}
|
|
206
210
|
for (const [memberName, memberNs] of ns.structIterator()) {
|
|
@@ -250,7 +254,8 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
250
254
|
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
|
251
255
|
}
|
|
252
256
|
else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
|
253
|
-
for (const
|
|
257
|
+
for (const key in inputMemberValue) {
|
|
258
|
+
const val = inputMemberValue[key];
|
|
254
259
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
|
255
260
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
|
256
261
|
headers[amalgam.toLowerCase()] = serializer.flush();
|
|
@@ -295,8 +300,9 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
295
300
|
const serializer = this.serializer;
|
|
296
301
|
const traits = ns.getMergedTraits();
|
|
297
302
|
if (traits.httpQueryParams) {
|
|
298
|
-
for (const
|
|
303
|
+
for (const key in data) {
|
|
299
304
|
if (!(key in query)) {
|
|
305
|
+
const val = data[key];
|
|
300
306
|
const valueSchema = ns.getValueSchema();
|
|
301
307
|
Object.assign(valueSchema.getMergedTraits(), {
|
|
302
308
|
...traits,
|
|
@@ -424,8 +430,9 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
424
430
|
}
|
|
425
431
|
else if (memberTraits.httpPrefixHeaders !== undefined) {
|
|
426
432
|
dataObject[memberName] = {};
|
|
427
|
-
for (const
|
|
433
|
+
for (const header in response.headers) {
|
|
428
434
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
|
435
|
+
const value = response.headers[header];
|
|
429
436
|
const valueSchema = memberSchema.getValueSchema();
|
|
430
437
|
valueSchema.getMergedTraits().httpHeader = header;
|
|
431
438
|
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
|
@@ -655,7 +655,12 @@ class TypeRegistry {
|
|
|
655
655
|
return undefined;
|
|
656
656
|
}
|
|
657
657
|
find(predicate) {
|
|
658
|
-
|
|
658
|
+
for (const schema of this.schemas.values()) {
|
|
659
|
+
if (predicate(schema)) {
|
|
660
|
+
return schema;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
return undefined;
|
|
659
664
|
}
|
|
660
665
|
clear() {
|
|
661
666
|
this.schemas.clear();
|