@poe-platform/safe-bash 0.1.508 → 0.1.509
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/dist/safe-bash/chunks/chunk-4OKU6JXB.js +5279 -0
- package/dist/safe-bash/chunks/chunk-4OKU6JXB.js.map +7 -0
- package/dist/safe-bash/chunks/chunk-5HT35GTV.js +520 -0
- package/dist/safe-bash/chunks/chunk-5HT35GTV.js.map +7 -0
- package/dist/safe-bash/chunks/{chunk-3ISDVRIM.js → chunk-B637PJBS.js} +19 -523
- package/dist/safe-bash/chunks/chunk-B637PJBS.js.map +7 -0
- package/dist/safe-bash/commands/structured/query-core.d.ts +35 -0
- package/dist/safe-bash/commands/structured/query-core.d.ts.map +1 -0
- package/dist/safe-bash/commands/structured/query-core.js +588 -0
- package/dist/safe-bash/commands/structured/query-core.js.map +1 -0
- package/dist/safe-bash/commands/xml/index.browser.js +2 -1
- package/dist/safe-bash/commands/yq/accounting.d.ts +64 -0
- package/dist/safe-bash/commands/yq/accounting.d.ts.map +1 -0
- package/dist/safe-bash/commands/yq/accounting.js +257 -0
- package/dist/safe-bash/commands/yq/accounting.js.map +1 -0
- package/dist/safe-bash/commands/yq/encoder.d.ts +6 -0
- package/dist/safe-bash/commands/yq/encoder.d.ts.map +1 -0
- package/dist/safe-bash/commands/yq/encoder.js +240 -0
- package/dist/safe-bash/commands/yq/encoder.js.map +1 -0
- package/dist/safe-bash/commands/yq/errors.d.ts +15 -0
- package/dist/safe-bash/commands/yq/errors.d.ts.map +1 -0
- package/dist/safe-bash/commands/yq/errors.js +37 -0
- package/dist/safe-bash/commands/yq/errors.js.map +1 -0
- package/dist/safe-bash/commands/yq/index.browser.js +12 -0
- package/dist/safe-bash/commands/yq/index.browser.js.map +7 -0
- package/dist/safe-bash/commands/yq/index.d.ts +9 -0
- package/dist/safe-bash/commands/yq/index.d.ts.map +1 -0
- package/dist/safe-bash/commands/yq/index.js +719 -0
- package/dist/safe-bash/commands/yq/index.js.map +1 -0
- package/dist/safe-bash/commands/yq/parser.d.ts +5 -0
- package/dist/safe-bash/commands/yq/parser.d.ts.map +1 -0
- package/dist/safe-bash/commands/yq/parser.js +1326 -0
- package/dist/safe-bash/commands/yq/parser.js.map +1 -0
- package/dist/safe-bash/commands/yq/toml.d.ts +5 -0
- package/dist/safe-bash/commands/yq/toml.d.ts.map +1 -0
- package/dist/safe-bash/commands/yq/toml.js +690 -0
- package/dist/safe-bash/commands/yq/toml.js.map +1 -0
- package/dist/safe-bash/core.browser.js +221 -2171
- package/dist/safe-bash/core.browser.js.map +4 -4
- package/dist/safe-bash/core.d.ts +1 -0
- package/dist/safe-bash/core.d.ts.map +1 -1
- package/dist/safe-bash/core.js +1 -0
- package/dist/safe-bash/core.js.map +1 -1
- package/package.json +8 -2
- package/dist/safe-bash/chunks/chunk-3ISDVRIM.js.map +0 -7
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { JqLimitError } from "../structured/limits.js";
|
|
2
|
+
export class YqError extends Error {
|
|
3
|
+
category;
|
|
4
|
+
code;
|
|
5
|
+
status;
|
|
6
|
+
source;
|
|
7
|
+
line;
|
|
8
|
+
column;
|
|
9
|
+
constructor(category, code, status, source, line, column) {
|
|
10
|
+
super(`${category}: ${code}`);
|
|
11
|
+
this.category = category;
|
|
12
|
+
this.code = code;
|
|
13
|
+
this.status = status;
|
|
14
|
+
this.source = source;
|
|
15
|
+
this.line = line;
|
|
16
|
+
this.column = column;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const budgetLimits = Object.freeze({
|
|
20
|
+
maxInputBytes: "LIMIT_MAX_INPUT_BYTES",
|
|
21
|
+
maxValueBytes: "LIMIT_MAX_VALUE_BYTES",
|
|
22
|
+
maxOutputBytes: "LIMIT_MAX_OUTPUT_BYTES",
|
|
23
|
+
maxSourceBytes: "LIMIT_MAX_QUERY_SOURCE_BYTES",
|
|
24
|
+
maxDepth: "LIMIT_MAX_DEPTH",
|
|
25
|
+
maxAstDepth: "LIMIT_MAX_AST_DEPTH",
|
|
26
|
+
maxSteps: "LIMIT_MAX_STEPS",
|
|
27
|
+
maxResults: "LIMIT_MAX_RESULTS",
|
|
28
|
+
maxCollectionSize: "LIMIT_MAX_COLLECTION_SIZE",
|
|
29
|
+
});
|
|
30
|
+
export function fromJqLimit(error) {
|
|
31
|
+
const prefix = error.message.slice(0, error.message.indexOf(" "));
|
|
32
|
+
return new YqError("limit", budgetLimits[prefix] ?? "LIMIT_MAX_STEPS", 5);
|
|
33
|
+
}
|
|
34
|
+
export function limit(code, source, line, column) {
|
|
35
|
+
return new YqError("limit", code, 5, source, line, column);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/commands/yq/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,yBAAyB,CAAC;AAmBtE,MAAM,OAAO,OAAQ,SAAQ,KAAK;IAErB;IACA;IACA;IACA;IACA;IACA;IANX,YACW,QAAoB,EACpB,IAAY,EACZ,MAAc,EACd,MAAe,EACf,IAAa,EACb,MAAe;QAExB,KAAK,CAAC,GAAG,QAAQ,KAAK,IAAI,EAAE,CAAC,CAAC;QAPrB,aAAQ,GAAR,QAAQ,CAAY;QACpB,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAS;QACf,SAAI,GAAJ,IAAI,CAAS;QACb,WAAM,GAAN,MAAM,CAAS;IAG1B,CAAC;CACF;AAED,MAAM,YAAY,GAA6C,MAAM,CAAC,MAAM,CAAC;IAC3E,aAAa,EAAE,uBAAuB;IACtC,aAAa,EAAE,uBAAuB;IACtC,cAAc,EAAE,wBAAwB;IACxC,cAAc,EAAE,8BAA8B;IAC9C,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,QAAQ,EAAE,iBAAiB;IAC3B,UAAU,EAAE,mBAAmB;IAC/B,iBAAiB,EAAE,2BAA2B;CAC/C,CAAC,CAAC;AAEH,MAAM,UAAU,WAAW,CAAC,KAAmB;IAC7C,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAmB,CAAC;IACpF,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,iBAAiB,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,IAAY,EAAE,MAAe,EAAE,IAAa,EAAE,MAAe;IACjF,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createYqCommand,
|
|
3
|
+
createYqCommands,
|
|
4
|
+
yqCommands
|
|
5
|
+
} from "../../chunks/chunk-4OKU6JXB.js";
|
|
6
|
+
import "../../chunks/chunk-B637PJBS.js";
|
|
7
|
+
export {
|
|
8
|
+
createYqCommand,
|
|
9
|
+
createYqCommands,
|
|
10
|
+
yqCommands
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.browser.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CommandDefinition, type VirtualShellPlugin } from "../../contracts/index.js";
|
|
2
|
+
export interface YqCommandsOptions {
|
|
3
|
+
readonly replace?: boolean;
|
|
4
|
+
readonly inputFormat?: "yaml" | "toml";
|
|
5
|
+
}
|
|
6
|
+
export declare function createYqCommand(options?: YqCommandsOptions): CommandDefinition;
|
|
7
|
+
export declare function createYqCommands(options?: YqCommandsOptions): readonly CommandDefinition[];
|
|
8
|
+
export declare function yqCommands(options?: YqCommandsOptions): VirtualShellPlugin;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/yq/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,KAAK,iBAAiB,EAItB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAqmBlC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxC;AAWD,wBAAgB,eAAe,CAAC,OAAO,GAAE,iBAAsB,GAAG,iBAAiB,CAOlF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,SAAS,iBAAiB,EAAE,CAE9F;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,kBAAkB,CAc9E"}
|