@moldea.ai/cli 14.0.0 → 14.0.1
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/dist/portable/SHA256SUMS +16 -16
- package/dist/portable/analysis-worker.mjs +110 -133
- package/dist/portable/chunk-1306b995.mjs +2 -0
- package/dist/portable/chunk-24ea7c23.mjs +328 -0
- package/dist/portable/chunk-2cc3bf5c.mjs +399 -0
- package/dist/portable/chunk-2e9d4c63.mjs +95 -0
- package/dist/portable/chunk-43b8574a.mjs +1837 -0
- package/dist/portable/chunk-517c6bfb.mjs +2 -0
- package/dist/portable/chunk-8f198616.mjs +4414 -0
- package/dist/portable/chunk-936e5d09.mjs +112519 -0
- package/dist/portable/chunk-98d84174.mjs +422 -0
- package/dist/portable/chunk-9e42770a.mjs +3114 -0
- package/dist/portable/chunk-cea1378f.mjs +50 -0
- package/dist/portable/chunk-d6656fa6.mjs +14 -0
- package/dist/portable/chunk-d9e49acd.mjs +302 -0
- package/dist/portable/moldea.mjs +1995 -2868
- package/dist/portable/node-runner.mjs +77 -106
- package/package.json +1 -1
- package/dist/portable/chunk-131f8005.mjs +0 -115
- package/dist/portable/chunk-2ba7e89e.mjs +0 -26
- package/dist/portable/chunk-459da9cf.mjs +0 -4138
- package/dist/portable/chunk-728df961.mjs +0 -544
- package/dist/portable/chunk-8d6114d2.mjs +0 -588
- package/dist/portable/chunk-90403e67.mjs +0 -2
- package/dist/portable/chunk-94b5ac22.mjs +0 -59
- package/dist/portable/chunk-a5514957.mjs +0 -5870
- package/dist/portable/chunk-b98ca669.mjs +0 -2
- package/dist/portable/chunk-c13db66a.mjs +0 -380
- package/dist/portable/chunk-d5af3eda.mjs +0 -2926
- package/dist/portable/chunk-ec3f49d3.mjs +0 -367
- package/dist/portable/chunk-fcbcf4e3.mjs +0 -147458
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
import { a as isCoreOperationErrorCode, i as isCoreOperation, n as CoreOperationException, o as measureJsonBytes, r as isCoreConfigurationErrorCode, t as CoreConfigurationException, u as isObjectValid } from "./chunk-728df961.mjs";
|
|
2
|
-
import { c as isRepositoryPath, i as RepositorySourceException, r as RepositoryPathException } from "./chunk-8d6114d2.mjs";
|
|
3
|
-
import { Buffer } from "node:buffer";
|
|
4
|
-
//#region ../core/dist/chunks/errors-C5qcq3E0.js
|
|
5
|
-
var NODE_INSPECTION_LIFETIME_MS = 12e4;
|
|
6
|
-
var NODE_INSPECTION_TERMINATION_GRACE_MS = 1e3;
|
|
7
|
-
var NODE_INSPECTION_FILE_PAGE_BYTES = 65536;
|
|
8
|
-
var NODE_INSPECTION_MESSAGE_BYTES = 1048576;
|
|
9
|
-
var NODE_INSPECTION_STDIO_BYTES = 32768;
|
|
10
|
-
var NODE_INSPECTION_TRANSPORT_BYTES = 4 * NODE_INSPECTION_MESSAGE_BYTES * 2 * 2 * 3;
|
|
11
|
-
Object.freeze({
|
|
12
|
-
lifetimeMs: NODE_INSPECTION_LIFETIME_MS,
|
|
13
|
-
terminationGraceMs: NODE_INSPECTION_TERMINATION_GRACE_MS,
|
|
14
|
-
maxReaderRequests: 4,
|
|
15
|
-
maxFilePageBytes: NODE_INSPECTION_FILE_PAGE_BYTES,
|
|
16
|
-
maxMessageBytes: NODE_INSPECTION_MESSAGE_BYTES,
|
|
17
|
-
maxStdioBytes: NODE_INSPECTION_STDIO_BYTES,
|
|
18
|
-
transportBytes: NODE_INSPECTION_TRANSPORT_BYTES,
|
|
19
|
-
oldGenerationMiB: 512,
|
|
20
|
-
youngGenerationMiB: 24
|
|
21
|
-
});
|
|
22
|
-
var createInspectionProcessFailure = (cause) => new CoreOperationException({
|
|
23
|
-
code: "INSPECTION_PROCESS_FAILED",
|
|
24
|
-
operation: "create-project-inspection",
|
|
25
|
-
...cause === void 0 ? {} : { cause }
|
|
26
|
-
});
|
|
27
|
-
var isInteger = (input) => typeof input === "number" && Number.isSafeInteger(input) && input >= 0;
|
|
28
|
-
var hasKeys = (input, required, optional = []) => required.every((key) => Object.hasOwn(input, key)) && Object.keys(input).every((key) => required.includes(key) || optional.includes(key));
|
|
29
|
-
var isSnapshot = (input) => isObjectValid(input, true) && hasKeys(input, ["id", "sourceKind"]) && typeof input["id"] === "string" && input["id"].length > 0 && typeof input["sourceKind"] === "string" && input["sourceKind"].length > 0;
|
|
30
|
-
var isOptionalString = (input, key) => !Object.hasOwn(input, key) || typeof input[key] === "string";
|
|
31
|
-
var isPageInput = (input) => isObjectValid(input, true) && hasKeys(input, ["maxItems", "view"], ["cursor"]) && isInteger(input["maxItems"]) && input["maxItems"] > 0 && [
|
|
32
|
-
"all",
|
|
33
|
-
"diagnostics",
|
|
34
|
-
"coverage",
|
|
35
|
-
"metadata"
|
|
36
|
-
].includes(String(input["view"])) && isOptionalString(input, "cursor");
|
|
37
|
-
var isLimits = (input) => isObjectValid(input, true) && hasKeys(input, [
|
|
38
|
-
"maxEntries",
|
|
39
|
-
"maxTotalBytesRead",
|
|
40
|
-
"maxFileBytes",
|
|
41
|
-
"maxManifestBytes",
|
|
42
|
-
"maxRetainedBytes",
|
|
43
|
-
"maxDiagnostics",
|
|
44
|
-
"maxCoverage",
|
|
45
|
-
"maxAcceptedWarnings"
|
|
46
|
-
]) && Object.values(input).every((limit) => isInteger(limit) && limit > 0);
|
|
47
|
-
var isCounts = (input) => isObjectValid(input, true) && hasKeys(input, [
|
|
48
|
-
"agents",
|
|
49
|
-
"context",
|
|
50
|
-
"decisions",
|
|
51
|
-
"mirrors",
|
|
52
|
-
"diagnostics",
|
|
53
|
-
"errors",
|
|
54
|
-
"warnings",
|
|
55
|
-
"acceptedWarnings",
|
|
56
|
-
"coverage",
|
|
57
|
-
"metadata"
|
|
58
|
-
]) && Object.values(input).every(isInteger);
|
|
59
|
-
var isSummary = (input) => input === null || isObjectValid(input, true) && hasKeys(input, [
|
|
60
|
-
"counts",
|
|
61
|
-
"manifestDigest",
|
|
62
|
-
"manifestPath",
|
|
63
|
-
"projectDigest",
|
|
64
|
-
"projectPath"
|
|
65
|
-
]) && isObjectValid(input["counts"], true) && hasKeys(input["counts"], [
|
|
66
|
-
"agents",
|
|
67
|
-
"context",
|
|
68
|
-
"decisions",
|
|
69
|
-
"mirrors"
|
|
70
|
-
]) && Object.values(input["counts"]).every(isInteger) && typeof input["manifestDigest"] === "string" && typeof input["projectDigest"] === "string" && isRepositoryPath(input["manifestPath"]) && isRepositoryPath(input["projectPath"]);
|
|
71
|
-
var isInspectionBase = (input) => isCounts(input["counts"]) && isObjectValid(input["coverageCounts"], true) && hasKeys(input["coverageCounts"], [
|
|
72
|
-
"bindings",
|
|
73
|
-
"exportsPassed",
|
|
74
|
-
"exportsFailed",
|
|
75
|
-
"exportsNotChecked"
|
|
76
|
-
]) && Object.values(input["coverageCounts"]).every(isInteger) && typeof input["valid"] === "boolean" && (input["formatVersion"] === null || input["formatVersion"] === 1) && typeof input["inspectionDigest"] === "string" && isSnapshot(input["source"]) && isSummary(input["summary"]);
|
|
77
|
-
var INSPECTION_KEYS = [
|
|
78
|
-
"counts",
|
|
79
|
-
"coverageCounts",
|
|
80
|
-
"valid",
|
|
81
|
-
"formatVersion",
|
|
82
|
-
"inspectionDigest",
|
|
83
|
-
"source",
|
|
84
|
-
"summary"
|
|
85
|
-
];
|
|
86
|
-
var isMetadata = (input) => isObjectValid(input, true) && hasKeys(input, [
|
|
87
|
-
...INSPECTION_KEYS,
|
|
88
|
-
"resourceUsage",
|
|
89
|
-
"maxAnalysisHeapBytes"
|
|
90
|
-
]) && isInspectionBase(input) && isInteger(input["maxAnalysisHeapBytes"]) && input["maxAnalysisHeapBytes"] > 0 && isObjectValid(input["resourceUsage"], true) && hasKeys(input["resourceUsage"], [
|
|
91
|
-
"canonicalBytes",
|
|
92
|
-
"peakRetainedBytes",
|
|
93
|
-
"preparedBytes",
|
|
94
|
-
"retainedBytes",
|
|
95
|
-
"totalBytesRead"
|
|
96
|
-
]) && Object.values(input["resourceUsage"]).every(isInteger);
|
|
97
|
-
var isPage = (input) => isObjectValid(input, true) && hasKeys(input, [
|
|
98
|
-
...INSPECTION_KEYS,
|
|
99
|
-
"page",
|
|
100
|
-
"view"
|
|
101
|
-
]) && isInspectionBase(input) && [
|
|
102
|
-
"all",
|
|
103
|
-
"diagnostics",
|
|
104
|
-
"coverage",
|
|
105
|
-
"metadata"
|
|
106
|
-
].includes(String(input["view"])) && isObjectValid(input["page"], true) && hasKeys(input["page"], [
|
|
107
|
-
"isComplete",
|
|
108
|
-
"records",
|
|
109
|
-
"nextCursor",
|
|
110
|
-
"totalItems"
|
|
111
|
-
]) && typeof input["page"]["isComplete"] === "boolean" && isInteger(input["page"]["totalItems"]) && (input["page"]["nextCursor"] === null || typeof input["page"]["nextCursor"] === "string") && Array.isArray(input["page"]["records"]) && input["page"]["records"].every((record) => isObjectValid(record, true) && hasKeys(record, ["item", "nextCursor"]) && (record["nextCursor"] === null || typeof record["nextCursor"] === "string") && isObjectValid(record["item"], true) && typeof record["item"]["kind"] === "string" && [
|
|
112
|
-
"agent",
|
|
113
|
-
"diagnostic",
|
|
114
|
-
"coverage",
|
|
115
|
-
"metadata"
|
|
116
|
-
].includes(record["item"]["kind"]) && hasKeys(record["item"], ["kind", record["item"]["kind"]]) && isObjectValid(record["item"][record["item"]["kind"]], true));
|
|
117
|
-
var isSource = (input) => input === "instructions" || input === "repository";
|
|
118
|
-
var isFilePageRequest = (input) => isRepositoryPath(input["path"]) && isInteger(input["offset"]) && isInteger(input["maxBytes"]) && input["maxBytes"] > 0 && input["maxBytes"] <= 65536;
|
|
119
|
-
var isInstructionSource = (input) => input === null || isObjectValid(input, true) && hasKeys(input, ["snapshot"]) && isSnapshot(input["snapshot"]);
|
|
120
|
-
var isRequest = (input) => {
|
|
121
|
-
if (!isObjectValid(input, true)) return false;
|
|
122
|
-
switch (input["method"]) {
|
|
123
|
-
case "getEntry":
|
|
124
|
-
case "readLinkText": return hasKeys(input, [
|
|
125
|
-
"method",
|
|
126
|
-
"path",
|
|
127
|
-
"source"
|
|
128
|
-
]) && isRepositoryPath(input["path"]) && isSource(input["source"]);
|
|
129
|
-
case "listEntriesPage": return hasKeys(input, ["method", "maxEntries"], ["cursor", "prefix"]) && isInteger(input["maxEntries"]) && input["maxEntries"] > 0 && input["maxEntries"] <= 128 && isOptionalString(input, "cursor") && (!Object.hasOwn(input, "prefix") || isRepositoryPath(input["prefix"]));
|
|
130
|
-
case "readFilePage": return hasKeys(input, [
|
|
131
|
-
"method",
|
|
132
|
-
"path",
|
|
133
|
-
"maxBytes",
|
|
134
|
-
"offset",
|
|
135
|
-
"source"
|
|
136
|
-
]) && isSource(input["source"]) && isFilePageRequest(input);
|
|
137
|
-
default: return false;
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
var isMessage = (input) => {
|
|
141
|
-
if (!isObjectValid(input, true) || typeof input["attemptId"] !== "string" || !/^[a-f0-9]{32}$/.test(input["attemptId"])) return false;
|
|
142
|
-
const keys = ["attemptId", "kind"];
|
|
143
|
-
switch (input["kind"]) {
|
|
144
|
-
case "start": return hasKeys(input, [
|
|
145
|
-
...keys,
|
|
146
|
-
"snapshot",
|
|
147
|
-
"instructions",
|
|
148
|
-
"limits",
|
|
149
|
-
"deadline"
|
|
150
|
-
]) && isSnapshot(input["snapshot"]) && isInstructionSource(input["instructions"]) && isLimits(input["limits"]) && isInteger(input["deadline"]);
|
|
151
|
-
case "ready": return hasKeys(input, [...keys, "maxAnalysisHeapBytes"]) && isInteger(input["maxAnalysisHeapBytes"]) && input["maxAnalysisHeapBytes"] > 0;
|
|
152
|
-
case "run":
|
|
153
|
-
case "dispose": return hasKeys(input, keys);
|
|
154
|
-
case "prepared": return hasKeys(input, [...keys, "inspection"]) && isMetadata(input["inspection"]);
|
|
155
|
-
case "read-page": return hasKeys(input, [
|
|
156
|
-
...keys,
|
|
157
|
-
"requestId",
|
|
158
|
-
"input"
|
|
159
|
-
]) && isInteger(input["requestId"]) && isPageInput(input["input"]);
|
|
160
|
-
case "page": return hasKeys(input, [
|
|
161
|
-
...keys,
|
|
162
|
-
"requestId",
|
|
163
|
-
"result"
|
|
164
|
-
]) && isInteger(input["requestId"]) && isPage(input["result"]);
|
|
165
|
-
case "reader-request": return hasKeys(input, [
|
|
166
|
-
...keys,
|
|
167
|
-
"requestId",
|
|
168
|
-
"request"
|
|
169
|
-
]) && isInteger(input["requestId"]) && isRequest(input["request"]);
|
|
170
|
-
case "reader-response": return hasKeys(input, [
|
|
171
|
-
...keys,
|
|
172
|
-
"requestId",
|
|
173
|
-
"result"
|
|
174
|
-
]) && isInteger(input["requestId"]);
|
|
175
|
-
case "reader-failure":
|
|
176
|
-
case "failure": return hasKeys(input, [
|
|
177
|
-
...keys,
|
|
178
|
-
"failure",
|
|
179
|
-
...input["kind"] === "reader-failure" ? ["requestId"] : []
|
|
180
|
-
]) && (input["kind"] !== "reader-failure" || isInteger(input["requestId"])) && isObjectValid(input["failure"], true) && hasKeys(input["failure"], ["family", "options"]) && [
|
|
181
|
-
"configuration",
|
|
182
|
-
"operation",
|
|
183
|
-
"repository",
|
|
184
|
-
"path"
|
|
185
|
-
].includes(String(input["failure"]["family"])) && isObjectValid(input["failure"]["options"], true);
|
|
186
|
-
default: return false;
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
var encodeInspectionMessage = (message) => {
|
|
190
|
-
let bytes;
|
|
191
|
-
try {
|
|
192
|
-
bytes = measureJsonBytes(message, NODE_INSPECTION_MESSAGE_BYTES);
|
|
193
|
-
} catch (error) {
|
|
194
|
-
throw createInspectionProcessFailure(error);
|
|
195
|
-
}
|
|
196
|
-
if (bytes > 1048576) throw new CoreOperationException({
|
|
197
|
-
code: "RESOURCE_LIMIT_EXCEEDED",
|
|
198
|
-
limit: "maxInspectionMessageBytes",
|
|
199
|
-
limitMaximum: NODE_INSPECTION_MESSAGE_BYTES,
|
|
200
|
-
observedUsage: bytes,
|
|
201
|
-
nextAction: null,
|
|
202
|
-
operation: "create-project-inspection"
|
|
203
|
-
});
|
|
204
|
-
if (!isMessage(message)) throw createInspectionProcessFailure();
|
|
205
|
-
return JSON.stringify(message);
|
|
206
|
-
};
|
|
207
|
-
var decodeInspectionMessage = (frame) => {
|
|
208
|
-
if (typeof frame !== "string" || Buffer.byteLength(frame) > 1048576) throw createInspectionProcessFailure();
|
|
209
|
-
let message;
|
|
210
|
-
try {
|
|
211
|
-
message = JSON.parse(frame);
|
|
212
|
-
} catch (cause) {
|
|
213
|
-
throw createInspectionProcessFailure(cause);
|
|
214
|
-
}
|
|
215
|
-
if (!isMessage(message)) throw createInspectionProcessFailure();
|
|
216
|
-
return message;
|
|
217
|
-
};
|
|
218
|
-
var serializeInspectionFailure = (error) => {
|
|
219
|
-
if (error instanceof CoreConfigurationException) return {
|
|
220
|
-
family: "configuration",
|
|
221
|
-
options: {
|
|
222
|
-
code: error.code,
|
|
223
|
-
operation: error.operation
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
if (error instanceof CoreOperationException) return {
|
|
227
|
-
family: "operation",
|
|
228
|
-
options: {
|
|
229
|
-
code: error.code,
|
|
230
|
-
operation: error.operation,
|
|
231
|
-
...error.code !== "RESOURCE_LIMIT_EXCEEDED" ? {} : {
|
|
232
|
-
limit: error.limit,
|
|
233
|
-
limitMaximum: error.limitMaximum,
|
|
234
|
-
nextAction: error.nextAction,
|
|
235
|
-
observedUsage: error.observedUsage
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
if (error instanceof RepositoryPathException) return {
|
|
240
|
-
family: "path",
|
|
241
|
-
options: {}
|
|
242
|
-
};
|
|
243
|
-
if (error instanceof RepositorySourceException) return {
|
|
244
|
-
family: "repository",
|
|
245
|
-
options: {
|
|
246
|
-
code: error.code,
|
|
247
|
-
operation: error.operation,
|
|
248
|
-
path: error.path,
|
|
249
|
-
retryable: error.retryable,
|
|
250
|
-
...error.resource === null ? {} : { resource: error.resource }
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
return {
|
|
254
|
-
family: "operation",
|
|
255
|
-
options: {
|
|
256
|
-
code: "INSPECTION_PROCESS_FAILED",
|
|
257
|
-
operation: "create-project-inspection"
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
var REPOSITORY_CODES = [
|
|
262
|
-
"ENTRY_NOT_FOUND",
|
|
263
|
-
"ENTRY_NOT_FILE",
|
|
264
|
-
"ENTRY_NOT_DIRECTORY",
|
|
265
|
-
"INVALID_PAGE_REQUEST",
|
|
266
|
-
"ACCESS_DENIED",
|
|
267
|
-
"SOURCE_UNAVAILABLE",
|
|
268
|
-
"SNAPSHOT_CHANGED",
|
|
269
|
-
"PROVIDER_INCOMPLETE",
|
|
270
|
-
"INVALID_SOURCE_DATA",
|
|
271
|
-
"RESOURCE_LIMIT_EXCEEDED",
|
|
272
|
-
"ABORTED"
|
|
273
|
-
];
|
|
274
|
-
var REPOSITORY_OPERATIONS = [
|
|
275
|
-
"create-reader",
|
|
276
|
-
"create-comparison",
|
|
277
|
-
"get-entry",
|
|
278
|
-
"read-file-page",
|
|
279
|
-
"list-entries-page",
|
|
280
|
-
"list-changes-page"
|
|
281
|
-
];
|
|
282
|
-
var isNumber = (input) => typeof input === "number" && Number.isSafeInteger(input) && input >= 0;
|
|
283
|
-
var deserializeInspectionFailure = (failure) => {
|
|
284
|
-
const options = failure.options;
|
|
285
|
-
const allowed = failure.family === "configuration" ? ["code", "operation"] : failure.family === "operation" ? [
|
|
286
|
-
"code",
|
|
287
|
-
"operation",
|
|
288
|
-
"limit",
|
|
289
|
-
"limitMaximum",
|
|
290
|
-
"nextAction",
|
|
291
|
-
"observedUsage"
|
|
292
|
-
] : failure.family === "repository" ? [
|
|
293
|
-
"code",
|
|
294
|
-
"operation",
|
|
295
|
-
"path",
|
|
296
|
-
"retryable",
|
|
297
|
-
"resource"
|
|
298
|
-
] : [];
|
|
299
|
-
if (Object.keys(options).some((key) => !allowed.includes(key))) throw createInspectionProcessFailure();
|
|
300
|
-
if ((failure.family === "operation" || failure.family === "configuration") && !isCoreOperation(options["operation"])) throw createInspectionProcessFailure();
|
|
301
|
-
const scope = { operation: isCoreOperation(options["operation"]) ? options["operation"] : "create-project-inspection" };
|
|
302
|
-
if (failure.family === "path" && Object.keys(options).length === 0) return new RepositoryPathException();
|
|
303
|
-
if (failure.family === "configuration") {
|
|
304
|
-
const code = options["code"];
|
|
305
|
-
if (isCoreConfigurationErrorCode(code)) return new CoreConfigurationException({
|
|
306
|
-
...scope,
|
|
307
|
-
code
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
if (failure.family === "operation") {
|
|
311
|
-
const code = options["code"];
|
|
312
|
-
if (isCoreOperationErrorCode(code) && code !== "RESOURCE_LIMIT_EXCEEDED" && ![
|
|
313
|
-
"limit",
|
|
314
|
-
"limitMaximum",
|
|
315
|
-
"nextAction",
|
|
316
|
-
"observedUsage"
|
|
317
|
-
].some((key) => Object.hasOwn(options, key))) return new CoreOperationException({
|
|
318
|
-
...scope,
|
|
319
|
-
code
|
|
320
|
-
});
|
|
321
|
-
if (options["code"] === "RESOURCE_LIMIT_EXCEEDED" && isNumber(options["limitMaximum"]) && options["limitMaximum"] > 0) {
|
|
322
|
-
if (options["limit"] === "maxAnalysisHeapBytes" && options["nextAction"] === "review-inspection-capacity" && options["observedUsage"] === null) return new CoreOperationException({
|
|
323
|
-
...scope,
|
|
324
|
-
code: "RESOURCE_LIMIT_EXCEEDED",
|
|
325
|
-
limit: "maxAnalysisHeapBytes",
|
|
326
|
-
limitMaximum: options["limitMaximum"],
|
|
327
|
-
observedUsage: null,
|
|
328
|
-
nextAction: "review-inspection-capacity"
|
|
329
|
-
});
|
|
330
|
-
if ((options["limit"] === "maxInspectionMessageBytes" || options["limit"] === "maxReaderRequests") && options["nextAction"] === null && isNumber(options["observedUsage"])) return new CoreOperationException({
|
|
331
|
-
...scope,
|
|
332
|
-
code: "RESOURCE_LIMIT_EXCEEDED",
|
|
333
|
-
limit: options["limit"],
|
|
334
|
-
limitMaximum: options["limitMaximum"],
|
|
335
|
-
nextAction: null,
|
|
336
|
-
observedUsage: options["observedUsage"]
|
|
337
|
-
});
|
|
338
|
-
if (typeof options["limit"] === "string" && ![
|
|
339
|
-
"maxAnalysisHeapBytes",
|
|
340
|
-
"maxInspectionMessageBytes",
|
|
341
|
-
"maxReaderRequests"
|
|
342
|
-
].includes(options["limit"]) && options["nextAction"] === "reduce-input-or-increase-limit" && isNumber(options["observedUsage"])) return new CoreOperationException({
|
|
343
|
-
...scope,
|
|
344
|
-
code: "RESOURCE_LIMIT_EXCEEDED",
|
|
345
|
-
limit: options["limit"],
|
|
346
|
-
limitMaximum: options["limitMaximum"],
|
|
347
|
-
nextAction: "reduce-input-or-increase-limit",
|
|
348
|
-
observedUsage: options["observedUsage"]
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (failure.family === "repository") {
|
|
353
|
-
const code = REPOSITORY_CODES.find((candidate) => candidate === options["code"]);
|
|
354
|
-
const operation = REPOSITORY_OPERATIONS.find((candidate) => candidate === options["operation"]);
|
|
355
|
-
const resource = options["resource"];
|
|
356
|
-
if (code !== void 0 && operation !== void 0 && typeof options["retryable"] === "boolean" && (options["path"] === null || isRepositoryPath(options["path"])) && (resource === void 0 || resource !== null && typeof resource === "object" && Object.keys(resource).length === 3 && "dimension" in resource && typeof resource.dimension === "string" && "limit" in resource && isNumber(resource.limit) && "observed" in resource && isNumber(resource.observed))) return new RepositorySourceException({
|
|
357
|
-
code,
|
|
358
|
-
operation,
|
|
359
|
-
path: options["path"],
|
|
360
|
-
retryable: options["retryable"],
|
|
361
|
-
...resource === void 0 ? {} : { resource }
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
throw createInspectionProcessFailure();
|
|
365
|
-
};
|
|
366
|
-
//#endregion
|
|
367
|
-
export { createInspectionProcessFailure as a, encodeInspectionMessage as c, NODE_INSPECTION_TRANSPORT_BYTES as i, serializeInspectionFailure as l, NODE_INSPECTION_LIFETIME_MS as n, decodeInspectionMessage as o, NODE_INSPECTION_TERMINATION_GRACE_MS as r, deserializeInspectionFailure as s, NODE_INSPECTION_FILE_PAGE_BYTES as t };
|