@intentic/sandbox-run 1.279.0 → 1.280.0
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/quote.d.ts +4 -0
- package/dist/quote.d.ts.map +1 -1
- package/dist/quote.js +9 -1
- package/dist/quote.js.map +1 -1
- package/package.json +2 -2
package/dist/quote.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export declare const shellQuote: (word: string) => string;
|
|
2
2
|
export declare const sqlLiteral: (value: string) => string;
|
|
3
3
|
export declare const sqlIdentifier: (name: string) => string;
|
|
4
|
+
export declare class UnquotableValueError extends Error {
|
|
5
|
+
readonly key: string;
|
|
6
|
+
constructor(key: string);
|
|
7
|
+
}
|
|
4
8
|
export declare const envLine: (key: string, value: string) => string;
|
|
5
9
|
export declare const dockerEnvLine: (key: string, value: string) => string;
|
|
6
10
|
//# sourceMappingURL=quote.d.ts.map
|
package/dist/quote.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../src/quote.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAA+E,CAAC;AAI1H,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,MAA4C,CAAC;AAIxF,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,MAA2C,CAAC;AAUzF,eAAO,MAAM,OAAO,QAAS,MAAM,SAAS,MAAM,KAAG,MAMpD,CAAC;AAIF,eAAO,MAAM,aAAa,QAAS,MAAM,SAAS,MAAM,KAAG,MAO1D,CAAC"}
|
|
1
|
+
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../src/quote.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAA+E,CAAC;AAI1H,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,MAA4C,CAAC;AAIxF,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,MAA2C,CAAC;AAUzF,qBAAa,oBAAqB,SAAQ,KAAK;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM;IAAhC,YAAqB,GAAG,EAAE,MAAM,EAK/B;CACJ;AAID,eAAO,MAAM,OAAO,QAAS,MAAM,SAAS,MAAM,KAAG,MAMpD,CAAC;AAIF,eAAO,MAAM,aAAa,QAAS,MAAM,SAAS,MAAM,KAAG,MAO1D,CAAC"}
|
package/dist/quote.js
CHANGED
|
@@ -2,10 +2,18 @@ const PLAIN_WORD = /^[\w@%+=:,./-]+$/;
|
|
|
2
2
|
export const shellQuote = (word) => (PLAIN_WORD.test(word) ? word : `'${word.replaceAll("'", `'\\''`)}'`);
|
|
3
3
|
export const sqlLiteral = (value) => `'${value.replaceAll("'", "''")}'`;
|
|
4
4
|
export const sqlIdentifier = (name) => `"${name.replaceAll(`"`, `""`)}"`;
|
|
5
|
+
export class UnquotableValueError extends Error {
|
|
6
|
+
key;
|
|
7
|
+
constructor(key) {
|
|
8
|
+
super(`${key} can't be stored: its value contains a single quote, a double quote and a backtick, and a .env value has to be wrapped in one of the three. Remove one of them.`);
|
|
9
|
+
this.key = key;
|
|
10
|
+
this.name = "UnquotableValueError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
5
13
|
export const envLine = (key, value) => {
|
|
6
14
|
const delimiter = [`'`, `"`, "`"].find((candidate) => !value.includes(candidate));
|
|
7
15
|
if (delimiter === undefined) {
|
|
8
|
-
throw new
|
|
16
|
+
throw new UnquotableValueError(key);
|
|
9
17
|
}
|
|
10
18
|
return `${key}=${delimiter}${value}${delimiter}\n`;
|
|
11
19
|
};
|
package/dist/quote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quote.js","sourceRoot":"","sources":["../src/quote.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAItC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE,CA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AAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;AAUzF,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACtB,GAAG;IAAxB,YAAqB,GAAW;QAC5B,KAAK,CACD,GAAG,GAAG,iKAAiK,CAC1K,CAAC;mBAHe,GAAG;QAIpB,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACvC,CAAC;CACJ;AAID,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,KAAa,EAAU,EAAE;IAC1D,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAClF,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,GAAG,GAAG,IAAI,SAAS,GAAG,KAAK,GAAG,SAAS,IAAI,CAAC;AACvD,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,KAAa,EAAU,EAAE;IAChE,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACX,gBAAgB,GAAG,wHAAwH,CAC9I,CAAC;IACN,CAAC;IACD,OAAO,GAAG,GAAG,IAAI,KAAK,IAAI,CAAC;AAC/B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/sandbox-run",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.280.0",
|
|
4
4
|
"description": "The sandbox container's run contract, names, capability posture, env allowlist, runtime directives, and the docker-run emitter every creation path composes from",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@intentic/constants": "1.
|
|
55
|
+
"@intentic/constants": "1.280.0",
|
|
56
56
|
"tslib": "2.8.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|