@shawnstack/quickforge 1.3.20 → 1.3.22
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/README.md +348 -348
- package/dist/assets/{anthropic-Bj3HAZgj.js → anthropic-CDKnv1FQ.js} +1 -1
- package/dist/assets/{azure-openai-responses-IdZZrSrI.js → azure-openai-responses-BnUwVl-8.js} +1 -1
- package/dist/assets/{google-Brt_lS1J.js → google-DOEyCDZy.js} +1 -1
- package/dist/assets/{google-vertex-B6HsoZ34.js → google-vertex-BPPf3car.js} +1 -1
- package/dist/assets/{icons-BHkxP7oT.js → icons-WD3UkVNM.js} +1 -1
- package/dist/assets/{index-D0CVLdX_.js → index-CjTN0qaQ.js} +586 -554
- package/dist/assets/index-eeLjaV06.css +3 -0
- package/dist/assets/{mistral-CenXqwPz.js → mistral-Ber29mja.js} +1 -1
- package/dist/assets/{openai-codex-responses-D9ffGwbj.js → openai-codex-responses-D8gq8a3l.js} +1 -1
- package/dist/assets/{openai-completions-eWdeSGBG.js → openai-completions-CATWPFBp.js} +1 -1
- package/dist/assets/{openai-responses-Cavpmjeu.js → openai-responses-DxcB6Ksu.js} +1 -1
- package/dist/assets/{openai-responses-shared-DF3ZGaUx.js → openai-responses-shared-a_PAPxTO.js} +1 -1
- package/dist/assets/{react-vendor-CmyL2roG.js → react-vendor-BcQaTQ90.js} +1 -1
- package/dist/index.html +4 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +11 -11
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +201 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +62 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +156 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +80 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +69 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@nodable/entities/package.json +1 -1
- package/node_modules/@nodable/entities/src/EntityDecoder.js +1 -1
- package/node_modules/@nodable/entities/src/entities.js +0 -18
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +3 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +12 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +184 -0
- package/node_modules/@smithy/core/dist-es/index.js +6 -6
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/{protocols/url-parser → transport}/parseUrl.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/{endpoints → transport}/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/package.json +19 -10
- package/node_modules/@smithy/core/transport.js +5 -0
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/eventsource-parser/README.md +31 -0
- package/node_modules/eventsource-parser/dist/index.cjs +21 -10
- package/node_modules/eventsource-parser/dist/index.js +21 -10
- package/node_modules/eventsource-parser/dist/stream.cjs +4 -3
- package/node_modules/eventsource-parser/dist/stream.js +4 -3
- package/node_modules/eventsource-parser/package.json +8 -8
- package/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/hasown/package.json +4 -5
- package/node_modules/protobufjs/dist/light/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/converter.js +4 -2
- package/node_modules/protobufjs/src/roots.js +1 -1
- package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
- package/node_modules/typebox/build/type/script/parser.mjs +2 -1
- package/node_modules/typebox/package.json +29 -29
- package/package.json +1 -1
- package/server/agent-manager.mjs +63 -25
- package/server/agent-profiles.mjs +191 -0
- package/server/auto-compaction.mjs +20 -0
- package/server/index.mjs +32 -8
- package/server/mcp/registry.mjs +13 -2
- package/server/routes/agent-profiles.mjs +172 -0
- package/server/routes/lan-access.mjs +20 -0
- package/server/routes/scheduled-tasks.mjs +161 -47
- package/server/routes/shared-conversation.mjs +14 -0
- package/server/routes/storage.mjs +10 -0
- package/server/routes/terminal.mjs +13 -3
- package/server/session-utils.mjs +2 -2
- package/server/storage.mjs +3 -4
- package/server/system-prompt.mjs +10 -5
- package/server/terminal/terminal-manager.mjs +9 -1
- package/server/tools/definitions.mjs +2 -7
- package/server/utils/response.mjs +4 -0
- package/dist/assets/index-D0W9hAl_.css +0 -3
- package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +0 -46
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +0 -24
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +0 -19
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +0 -27
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +0 -10
- package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +0 -44
- package/node_modules/@smithy/core/dist-cjs/request-builder/requestBuilder.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/setFeature.js +0 -14
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +0 -18
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +0 -38
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +0 -15
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +0 -9
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +0 -61
- package/node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +0 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/TestVectors.fixture.js +0 -146
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/vectorTypes.fixture.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js +0 -2
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js +0 -399
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemePlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/httpAuthSchemeMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/resolveAuthOptions.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/getHttpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/httpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{pagination → legacy-root-exports/pagination}/createPaginator.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/DefaultIdentityProviderConfig.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpApiKeyAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpBearerAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/noAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/memoizeIdentityProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{getSmithyContext.js → submodules/transport/getSmithyContext.js} +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpRequest.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpResponse.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{endpoints/util-endpoints/lib → transport}/isValidHostLabel.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/isValidHostname.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{client/util-middleware → transport}/normalizeProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/querystring-parser → transport}/parseQueryString.js +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { parse } from "node:url";
|
|
2
1
|
import { CredentialsProviderError } from "@smithy/core/config";
|
|
3
2
|
import { fromImdsCredentials, isImdsCredentials } from "./remoteProvider/ImdsCredentials";
|
|
4
3
|
import { providerConfigFromInit } from "./remoteProvider/RemoteProviderInit";
|
|
@@ -34,14 +33,8 @@ const requestFromEcsImds = async (timeout, options) => {
|
|
|
34
33
|
return buffer.toString();
|
|
35
34
|
};
|
|
36
35
|
const CMDS_IP = "169.254.170.2";
|
|
37
|
-
const GREENGRASS_HOSTS =
|
|
38
|
-
|
|
39
|
-
"127.0.0.1": true,
|
|
40
|
-
};
|
|
41
|
-
const GREENGRASS_PROTOCOLS = {
|
|
42
|
-
"http:": true,
|
|
43
|
-
"https:": true,
|
|
44
|
-
};
|
|
36
|
+
const GREENGRASS_HOSTS = new Set(["localhost", "127.0.0.1"]);
|
|
37
|
+
const GREENGRASS_PROTOCOLS = new Set(["http:", "https:"]);
|
|
45
38
|
const getCmdsUri = async ({ logger }) => {
|
|
46
39
|
if (process.env[ENV_CMDS_RELATIVE_URI]) {
|
|
47
40
|
return {
|
|
@@ -50,21 +43,29 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
50
43
|
};
|
|
51
44
|
}
|
|
52
45
|
if (process.env[ENV_CMDS_FULL_URI]) {
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
let parsed;
|
|
47
|
+
try {
|
|
48
|
+
parsed = new URL(process.env[ENV_CMDS_FULL_URI]);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });
|
|
52
|
+
}
|
|
53
|
+
if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
|
|
55
54
|
throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
|
|
56
55
|
tryNextLink: false,
|
|
57
56
|
logger,
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
|
-
if (!parsed.protocol || !(parsed.protocol
|
|
59
|
+
if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {
|
|
61
60
|
throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
|
|
62
61
|
tryNextLink: false,
|
|
63
62
|
logger,
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
return {
|
|
67
|
-
|
|
66
|
+
protocol: parsed.protocol,
|
|
67
|
+
hostname: parsed.hostname,
|
|
68
|
+
path: parsed.pathname + parsed.search,
|
|
68
69
|
port: parsed.port ? parseInt(parsed.port, 10) : undefined,
|
|
69
70
|
};
|
|
70
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.6",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.24.
|
|
30
|
+
"@smithy/core": "^3.24.5",
|
|
31
31
|
"@smithy/types": "^4.14.2",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.5",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"module": "./dist-es/index.js",
|
|
28
28
|
"types": "./dist-types/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.24.
|
|
30
|
+
"@smithy/core": "^3.24.5",
|
|
31
31
|
"@smithy/types": "^4.14.2",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.5",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"module": "./dist-es/index.js",
|
|
27
27
|
"types": "./dist-types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@smithy/core": "^3.24.
|
|
29
|
+
"@smithy/core": "^3.24.5",
|
|
30
30
|
"@smithy/types": "^4.14.2",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.5",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.24.
|
|
28
|
+
"@smithy/core": "^3.24.5",
|
|
29
29
|
"@smithy/types": "^4.14.2",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
@@ -109,6 +109,28 @@ const parser = createParser({
|
|
|
109
109
|
> [!NOTE]
|
|
110
110
|
> Leading whitespace is not stripped from comments, eg `: comment` will give ` comment` as the comment value, not `comment` (note the leading space).
|
|
111
111
|
|
|
112
|
+
### Limiting buffered memory (`maxBufferSize`)
|
|
113
|
+
|
|
114
|
+
By default the parser buffers data indefinitely until a server completes an event. A server (or proxy) that never terminates a line, or that keeps appending `data:` lines without ever sending a blank line to dispatch the event, can therefore grow the parser's buffers without bound.
|
|
115
|
+
|
|
116
|
+
Pass a `maxBufferSize` (in characters) to `createParser` to cap this. If the combined size of the pending line buffer and the in-progress event's data buffer exceeds the limit, the parser emits a `ParseError` with `type: 'max-buffer-size-exceeded'` and becomes terminated: subsequent calls to `feed()` will throw until `reset()` is called.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
const parser = createParser({
|
|
120
|
+
maxBufferSize: 1024 * 1024, // 1 MB
|
|
121
|
+
onEvent(event) {
|
|
122
|
+
// …
|
|
123
|
+
},
|
|
124
|
+
onError(error) {
|
|
125
|
+
if (error.type === 'max-buffer-size-exceeded') {
|
|
126
|
+
// Stream peer is misbehaving — typically you'd close the connection.
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
})
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The same option is available on the [stream variant](#stream-usage); the stream is always errored when this limit is exceeded, regardless of the `onError` setting (since the underlying parser is unrecoverable without a `reset()`).
|
|
133
|
+
|
|
112
134
|
## Stream usage
|
|
113
135
|
|
|
114
136
|
```ts
|
|
@@ -119,6 +141,15 @@ const eventStream = response.body
|
|
|
119
141
|
.pipeThrough(new EventSourceParserStream())
|
|
120
142
|
```
|
|
121
143
|
|
|
144
|
+
The stream constructor accepts a subset of the `createParser` options (`onComment`, `onRetry`, `maxBufferSize`) plus an `onError` that can either be a function or set to `'terminate'` to error the stream on parse errors. Events are delivered through the stream itself rather than via an `onEvent` callback:
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
new EventSourceParserStream({
|
|
148
|
+
maxBufferSize: 1024 * 1024,
|
|
149
|
+
onError: 'terminate',
|
|
150
|
+
})
|
|
151
|
+
```
|
|
152
|
+
|
|
122
153
|
Note that the TransformStream is exposed under a separate export (`eventsource-parser/stream`), in order to maximize compatibility with environments that do not have the `TransformStream` constructor available.
|
|
123
154
|
|
|
124
155
|
## License
|
|
@@ -8,29 +8,40 @@ class ParseError extends Error {
|
|
|
8
8
|
const LF = 10, CR = 13, SPACE = 32;
|
|
9
9
|
function noop(_arg) {
|
|
10
10
|
}
|
|
11
|
-
function createParser(
|
|
12
|
-
if (typeof
|
|
11
|
+
function createParser(config) {
|
|
12
|
+
if (typeof config == "function")
|
|
13
13
|
throw new TypeError(
|
|
14
|
-
"`
|
|
14
|
+
"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
|
|
15
15
|
);
|
|
16
|
-
const { onEvent = noop, onError = noop, onRetry = noop, onComment } =
|
|
17
|
-
let isFirstChunk = !0, id, data = "", dataLines = 0, eventType;
|
|
16
|
+
const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];
|
|
17
|
+
let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = "", dataLines = 0, eventType, terminated = !1;
|
|
18
18
|
function feed(chunk) {
|
|
19
|
+
if (terminated)
|
|
20
|
+
throw new Error(
|
|
21
|
+
"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing."
|
|
22
|
+
);
|
|
19
23
|
if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
|
|
20
24
|
const trailing2 = processLines(chunk);
|
|
21
|
-
trailing2 !== "" && pendingFragments.push(trailing2);
|
|
25
|
+
trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
|
|
22
26
|
return;
|
|
23
27
|
}
|
|
24
28
|
if (chunk.indexOf(`
|
|
25
29
|
`) === -1 && chunk.indexOf("\r") === -1) {
|
|
26
|
-
pendingFragments.push(chunk);
|
|
30
|
+
pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
29
33
|
pendingFragments.push(chunk);
|
|
30
34
|
const input = pendingFragments.join("");
|
|
31
|
-
pendingFragments.length = 0;
|
|
35
|
+
pendingFragments.length = 0, pendingFragmentsLength = 0;
|
|
32
36
|
const trailing = processLines(input);
|
|
33
|
-
trailing !== "" && pendingFragments.push(trailing);
|
|
37
|
+
trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
|
|
38
|
+
}
|
|
39
|
+
function checkBufferSize() {
|
|
40
|
+
maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = "", dataLines = 0, eventType = void 0, onError(
|
|
41
|
+
new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {
|
|
42
|
+
type: "max-buffer-size-exceeded"
|
|
43
|
+
})
|
|
44
|
+
)));
|
|
34
45
|
}
|
|
35
46
|
function processLines(chunk) {
|
|
36
47
|
let searchIndex = 0;
|
|
@@ -151,7 +162,7 @@ ${value}`, dataLines++;
|
|
|
151
162
|
const incompleteLine = pendingFragments.join("");
|
|
152
163
|
parseLine(incompleteLine, 0, incompleteLine.length);
|
|
153
164
|
}
|
|
154
|
-
isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
|
|
165
|
+
isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;
|
|
155
166
|
}
|
|
156
167
|
return { feed, reset };
|
|
157
168
|
}
|
|
@@ -6,29 +6,40 @@ class ParseError extends Error {
|
|
|
6
6
|
const LF = 10, CR = 13, SPACE = 32;
|
|
7
7
|
function noop(_arg) {
|
|
8
8
|
}
|
|
9
|
-
function createParser(
|
|
10
|
-
if (typeof
|
|
9
|
+
function createParser(config) {
|
|
10
|
+
if (typeof config == "function")
|
|
11
11
|
throw new TypeError(
|
|
12
|
-
"`
|
|
12
|
+
"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
|
|
13
13
|
);
|
|
14
|
-
const { onEvent = noop, onError = noop, onRetry = noop, onComment } =
|
|
15
|
-
let isFirstChunk = !0, id, data = "", dataLines = 0, eventType;
|
|
14
|
+
const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];
|
|
15
|
+
let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = "", dataLines = 0, eventType, terminated = !1;
|
|
16
16
|
function feed(chunk) {
|
|
17
|
+
if (terminated)
|
|
18
|
+
throw new Error(
|
|
19
|
+
"Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing."
|
|
20
|
+
);
|
|
17
21
|
if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
|
|
18
22
|
const trailing2 = processLines(chunk);
|
|
19
|
-
trailing2 !== "" && pendingFragments.push(trailing2);
|
|
23
|
+
trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
|
|
20
24
|
return;
|
|
21
25
|
}
|
|
22
26
|
if (chunk.indexOf(`
|
|
23
27
|
`) === -1 && chunk.indexOf("\r") === -1) {
|
|
24
|
-
pendingFragments.push(chunk);
|
|
28
|
+
pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
|
|
25
29
|
return;
|
|
26
30
|
}
|
|
27
31
|
pendingFragments.push(chunk);
|
|
28
32
|
const input = pendingFragments.join("");
|
|
29
|
-
pendingFragments.length = 0;
|
|
33
|
+
pendingFragments.length = 0, pendingFragmentsLength = 0;
|
|
30
34
|
const trailing = processLines(input);
|
|
31
|
-
trailing !== "" && pendingFragments.push(trailing);
|
|
35
|
+
trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
|
|
36
|
+
}
|
|
37
|
+
function checkBufferSize() {
|
|
38
|
+
maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = "", dataLines = 0, eventType = void 0, onError(
|
|
39
|
+
new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, {
|
|
40
|
+
type: "max-buffer-size-exceeded"
|
|
41
|
+
})
|
|
42
|
+
)));
|
|
32
43
|
}
|
|
33
44
|
function processLines(chunk) {
|
|
34
45
|
let searchIndex = 0;
|
|
@@ -149,7 +160,7 @@ ${value}`, dataLines++;
|
|
|
149
160
|
const incompleteLine = pendingFragments.join("");
|
|
150
161
|
parseLine(incompleteLine, 0, incompleteLine.length);
|
|
151
162
|
}
|
|
152
|
-
isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
|
|
163
|
+
isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;
|
|
153
164
|
}
|
|
154
165
|
return { feed, reset };
|
|
155
166
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
3
3
|
var index = require("./index.cjs");
|
|
4
4
|
class EventSourceParserStream extends TransformStream {
|
|
5
|
-
constructor({ onError, onRetry, onComment } = {}) {
|
|
5
|
+
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
|
|
6
6
|
let parser;
|
|
7
7
|
super({
|
|
8
8
|
start(controller) {
|
|
@@ -11,10 +11,11 @@ class EventSourceParserStream extends TransformStream {
|
|
|
11
11
|
controller.enqueue(event);
|
|
12
12
|
},
|
|
13
13
|
onError(error) {
|
|
14
|
-
onError
|
|
14
|
+
typeof onError == "function" && onError(error), (onError === "terminate" || error.type === "max-buffer-size-exceeded") && controller.error(error);
|
|
15
15
|
},
|
|
16
16
|
onRetry,
|
|
17
|
-
onComment
|
|
17
|
+
onComment,
|
|
18
|
+
maxBufferSize
|
|
18
19
|
});
|
|
19
20
|
},
|
|
20
21
|
transform(chunk) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createParser } from "./index.js";
|
|
2
2
|
import { ParseError } from "./index.js";
|
|
3
3
|
class EventSourceParserStream extends TransformStream {
|
|
4
|
-
constructor({ onError, onRetry, onComment } = {}) {
|
|
4
|
+
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
|
|
5
5
|
let parser;
|
|
6
6
|
super({
|
|
7
7
|
start(controller) {
|
|
@@ -10,10 +10,11 @@ class EventSourceParserStream extends TransformStream {
|
|
|
10
10
|
controller.enqueue(event);
|
|
11
11
|
},
|
|
12
12
|
onError(error) {
|
|
13
|
-
onError
|
|
13
|
+
typeof onError == "function" && onError(error), (onError === "terminate" || error.type === "max-buffer-size-exceeded") && controller.error(error);
|
|
14
14
|
},
|
|
15
15
|
onRetry,
|
|
16
|
-
onComment
|
|
16
|
+
onComment,
|
|
17
|
+
maxBufferSize
|
|
17
18
|
});
|
|
18
19
|
},
|
|
19
20
|
transform(chunk) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eventsource-parser",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Streaming, source-agnostic EventSource/Server-Sent Events parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eventsource",
|
|
@@ -63,21 +63,21 @@
|
|
|
63
63
|
"test:node": "vitest --reporter=verbose"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@sanity/pkg-utils": "^10.4.
|
|
66
|
+
"@sanity/pkg-utils": "^10.4.18",
|
|
67
67
|
"@sanity/semantic-release-preset": "^6.0.0",
|
|
68
68
|
"@sanity/tsconfig": "^2.1.0",
|
|
69
69
|
"@types/node": "^20.19.0",
|
|
70
|
-
"eventsource-encoder": "^1.0.
|
|
71
|
-
"knip": "^6.
|
|
70
|
+
"eventsource-encoder": "^1.0.2",
|
|
71
|
+
"knip": "^6.7.0",
|
|
72
72
|
"mitata": "^1.0.34",
|
|
73
|
-
"oxfmt": "^0.
|
|
74
|
-
"oxlint": "^1.
|
|
73
|
+
"oxfmt": "^0.47.0",
|
|
74
|
+
"oxlint": "^1.62.0",
|
|
75
75
|
"rimraf": "^6.1.3",
|
|
76
76
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
77
77
|
"semantic-release": "^25.0.3",
|
|
78
|
-
"terser": "^5.46.
|
|
78
|
+
"terser": "^5.46.2",
|
|
79
79
|
"typescript": "^5.9.3",
|
|
80
|
-
"vitest": "^4.1.
|
|
80
|
+
"vitest": "^4.1.5"
|
|
81
81
|
},
|
|
82
82
|
"browserslist": [
|
|
83
83
|
"node >= 18",
|
|
@@ -5,6 +5,13 @@ 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
|
+
## [v2.0.4](https://github.com/inspect-js/hasOwn/compare/v2.0.3...v2.0.4) - 2026-05-28
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [types] drop the dead key-narrowing overload [`fdab00e`](https://github.com/inspect-js/hasOwn/commit/fdab00e2703e65411424e19bf86a7e72a8f10da9)
|
|
13
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint` [`91f6247`](https://github.com/inspect-js/hasOwn/commit/91f624768dd0f7db0d019b89d4d86bd66e20ec30)
|
|
14
|
+
|
|
8
15
|
## [v2.0.3](https://github.com/inspect-js/hasOwn/compare/v2.0.2...v2.0.3) - 2026-04-17
|
|
9
16
|
|
|
10
17
|
### Commits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hasown",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -52,13 +52,12 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
55
|
-
"@ljharb/eslint-config": "^22.2.
|
|
55
|
+
"@ljharb/eslint-config": "^22.2.3",
|
|
56
56
|
"@ljharb/tsconfig": "^0.3.2",
|
|
57
57
|
"@types/function-bind": "^1.1.10",
|
|
58
58
|
"@types/tape": "^5.8.1",
|
|
59
|
-
"auto-changelog": "^2.5.
|
|
60
|
-
"
|
|
61
|
-
"eslint": "^10.2.0",
|
|
59
|
+
"auto-changelog": "^2.5.1",
|
|
60
|
+
"eslint": "^10.4.0",
|
|
62
61
|
"evalmd": "^0.0.19",
|
|
63
62
|
"in-publish": "^2.0.1",
|
|
64
63
|
"jiti": "^0.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.6.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.6.2 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled sat, 30 may 2026 21:57:57 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
@@ -1207,7 +1207,7 @@ function genValuePartial_fromObject(gen, field, fieldIndex, prop) {
|
|
|
1207
1207
|
} gen
|
|
1208
1208
|
("}");
|
|
1209
1209
|
} else gen
|
|
1210
|
-
("if(
|
|
1210
|
+
("if(!util.isObject(d%s))", prop)
|
|
1211
1211
|
("throw TypeError(%j)", field.fullName + ": object expected")
|
|
1212
1212
|
("m%s=types[%i].fromObject(d%s,n+1)", prop, fieldIndex, prop);
|
|
1213
1213
|
} else {
|
|
@@ -1274,6 +1274,8 @@ converter.fromObject = function fromObject(mtype) {
|
|
|
1274
1274
|
var gen = util.codegen(["d", "n"], mtype.name + "$fromObject")
|
|
1275
1275
|
("if(d instanceof this.ctor)")
|
|
1276
1276
|
("return d")
|
|
1277
|
+
("if(!util.isObject(d))")
|
|
1278
|
+
("throw TypeError(%j)", mtype.fullName + ": object expected")
|
|
1277
1279
|
("if(n===undefined)n=0")
|
|
1278
1280
|
("if(n>util.recursionLimit)")
|
|
1279
1281
|
("throw Error(\"maximum nesting depth exceeded\")");
|
|
@@ -1288,7 +1290,7 @@ converter.fromObject = function fromObject(mtype) {
|
|
|
1288
1290
|
// Map fields
|
|
1289
1291
|
if (field.map) { gen
|
|
1290
1292
|
("if(d%s){", prop)
|
|
1291
|
-
("if(
|
|
1293
|
+
("if(!util.isObject(d%s))", prop)
|
|
1292
1294
|
("throw TypeError(%j)", field.fullName + ": object expected")
|
|
1293
1295
|
("m%s={}", prop)
|
|
1294
1296
|
("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", prop);
|
|
@@ -5049,7 +5051,7 @@ Root._configure = function(Type_, parse_, common_) {
|
|
|
5049
5051
|
|
|
5050
5052
|
},{"16":16,"17":17,"23":23,"25":25,"35":35}],29:[function(require,module,exports){
|
|
5051
5053
|
"use strict";
|
|
5052
|
-
module.exports =
|
|
5054
|
+
module.exports = Object.create(null);
|
|
5053
5055
|
|
|
5054
5056
|
/**
|
|
5055
5057
|
* Named roots.
|