@songtonyli/dsh-cli 0.1.81 → 0.1.82
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 +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- 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 +3 -3
- 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 +3 -3
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.i18n.yaml +14 -14
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.md +7 -5
- package/node_modules/@deepseek-ai/dsh-subprocess-local/README.zh.md +7 -5
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/index.js +15 -3
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner-launch-f9xQyTek.js +1669 -0
- package/node_modules/@deepseek-ai/dsh-subprocess-local/lib/runner.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +19 -16
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +25 -8
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +25 -8
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +325 -22
- package/node_modules/execa/lib/convert/duplex.js +8 -4
- package/node_modules/execa/lib/convert/readable.js +3 -8
- package/node_modules/execa/lib/convert/writable.js +6 -5
- package/node_modules/execa/lib/io/input-sync.js +2 -1
- package/node_modules/execa/lib/io/max-buffer.js +2 -1
- package/node_modules/execa/lib/io/output-sync.js +2 -1
- package/node_modules/execa/lib/methods/create.js +7 -0
- package/node_modules/execa/lib/methods/node.js +1 -1
- package/node_modules/execa/lib/methods/script.js +3 -3
- package/node_modules/execa/lib/resolve/all-async.js +2 -1
- package/node_modules/execa/lib/resolve/wait-subprocess.js +6 -0
- package/node_modules/execa/lib/stdio/handle-async.js +3 -2
- package/node_modules/execa/lib/stdio/handle.js +8 -3
- package/node_modules/execa/lib/transform/generator.js +7 -0
- package/node_modules/execa/lib/transform/run-sync.js +17 -5
- package/node_modules/execa/package.json +1 -1
- package/package.json +16 -16
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
2
|
-
const REVIVER_SYMBOL = Symbol.for("@aws-sdk/reviver");
|
|
3
|
-
export function needsReviver(schema) {
|
|
4
|
-
const ns = NormalizedSchema.of(schema);
|
|
5
|
-
const raw = ns.getSchema();
|
|
6
|
-
if (Array.isArray(raw) && ns.isStructSchema()) {
|
|
7
|
-
if (REVIVER_SYMBOL in raw) {
|
|
8
|
-
return raw[REVIVER_SYMBOL];
|
|
9
|
-
}
|
|
10
|
-
const result = _check(ns, new Set());
|
|
11
|
-
raw[REVIVER_SYMBOL] = result;
|
|
12
|
-
return result;
|
|
13
|
-
}
|
|
14
|
-
return _check(ns, new Set());
|
|
15
|
-
}
|
|
16
|
-
function _check(ns, seen) {
|
|
17
|
-
const raw = ns.getSchema();
|
|
18
|
-
if (seen.has(raw)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
seen.add(raw);
|
|
22
|
-
if (ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
if (ns.isStructSchema()) {
|
|
26
|
-
for (const [, memberSchema] of ns.structIterator()) {
|
|
27
|
-
if (_check(memberSchema, seen)) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else if (ns.isListSchema() || ns.isMapSchema()) {
|
|
33
|
-
if (_check(ns.getValueSchema(), seen)) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else if (ns.isDocumentSchema()) {
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { collectBody } from "@smithy/core/protocols";
|
|
2
|
-
import { collectBodyString } from "../common";
|
|
3
|
-
import { detectBufferParsing } from "./detectBufferParsing";
|
|
4
|
-
import { jsonReviver } from "./jsonReviver";
|
|
5
|
-
import { needsReviver } from "./needsReviver";
|
|
6
|
-
export async function parseJsonBody(streamBody, context, schema) {
|
|
7
|
-
let parsingInput;
|
|
8
|
-
if (detectBufferParsing() && typeof streamBody?.[Symbol.asyncIterator] === "function") {
|
|
9
|
-
const buffer = await collectBody(streamBody, context);
|
|
10
|
-
if (typeof Buffer === "function") {
|
|
11
|
-
if (Buffer.isBuffer(buffer)) {
|
|
12
|
-
parsingInput = buffer;
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
parsingInput = Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (!parsingInput) {
|
|
20
|
-
parsingInput = await collectBodyString(streamBody, context);
|
|
21
|
-
}
|
|
22
|
-
if (parsingInput.length === 0) {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
const reviver = schema && needsReviver(schema) ? jsonReviver : undefined;
|
|
26
|
-
try {
|
|
27
|
-
return JSON.parse(parsingInput, reviver);
|
|
28
|
-
}
|
|
29
|
-
catch (e) {
|
|
30
|
-
if (e?.name === "SyntaxError") {
|
|
31
|
-
Object.defineProperty(e, "$responseBodyText", {
|
|
32
|
-
value: typeof parsingInput === "string" ? parsingInput : parsingInput.toString("utf8"),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
throw e;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export const parseJsonErrorBody = async (errorBody, context) => {
|
|
39
|
-
const value = await parseJsonBody(errorBody, context);
|
|
40
|
-
value.message = value.message ?? value.Message;
|
|
41
|
-
return value;
|
|
42
|
-
};
|
|
43
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
44
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
45
|
-
let cleanValue = rawValue;
|
|
46
|
-
if (typeof cleanValue === "number") {
|
|
47
|
-
cleanValue = cleanValue.toString();
|
|
48
|
-
}
|
|
49
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
50
|
-
cleanValue = cleanValue.split(",")[0];
|
|
51
|
-
}
|
|
52
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
53
|
-
cleanValue = cleanValue.split(":")[0];
|
|
54
|
-
}
|
|
55
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
56
|
-
cleanValue = cleanValue.split("#")[1];
|
|
57
|
-
}
|
|
58
|
-
return cleanValue;
|
|
59
|
-
};
|
|
60
|
-
export const loadRestJsonErrorCode = (output, data) => {
|
|
61
|
-
return loadErrorCode(output, data, ["header", "code", "type"]);
|
|
62
|
-
};
|
|
63
|
-
export const loadJsonRpcErrorCode = (output, data, queryCompat = false) => {
|
|
64
|
-
return loadErrorCode(output, data, queryCompat ? ["code", "header", "type"] : ["type", "code", "header"]);
|
|
65
|
-
};
|
|
66
|
-
const loadErrorCode = ({ headers }, data, order) => {
|
|
67
|
-
while (order.length > 0) {
|
|
68
|
-
const location = order.shift();
|
|
69
|
-
switch (location) {
|
|
70
|
-
case "header":
|
|
71
|
-
const headerKey = findKey(headers ?? {}, "x-amzn-errortype");
|
|
72
|
-
if (headerKey !== undefined) {
|
|
73
|
-
return sanitizeErrorCode(headers[headerKey]);
|
|
74
|
-
}
|
|
75
|
-
break;
|
|
76
|
-
case "code":
|
|
77
|
-
const codeKey = findKey(data ?? {}, "code");
|
|
78
|
-
if (codeKey && data[codeKey] !== undefined) {
|
|
79
|
-
return sanitizeErrorCode(data[codeKey]);
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
case "type":
|
|
83
|
-
if (data?.__type !== undefined) {
|
|
84
|
-
return sanitizeErrorCode(data.__type);
|
|
85
|
-
}
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|