@vercel/sandbox 1.9.0 → 1.9.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 +8 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/api-client/api-client.cjs +375 -0
- package/dist/api-client/api-client.cjs.map +1 -0
- package/dist/api-client/api-client.d.cts +403 -0
- package/dist/api-client/api-client.d.ts +397 -392
- package/dist/api-client/api-client.js +365 -405
- package/dist/api-client/api-client.js.map +1 -1
- package/dist/api-client/api-error.cjs +31 -0
- package/dist/api-client/api-error.cjs.map +1 -0
- package/dist/api-client/api-error.d.cts +27 -0
- package/dist/api-client/api-error.d.ts +19 -16
- package/dist/api-client/api-error.js +27 -32
- package/dist/api-client/api-error.js.map +1 -1
- package/dist/api-client/base-client.cjs +113 -0
- package/dist/api-client/base-client.cjs.map +1 -0
- package/dist/api-client/base-client.d.cts +38 -0
- package/dist/api-client/base-client.d.ts +31 -36
- package/dist/api-client/base-client.js +101 -118
- package/dist/api-client/base-client.js.map +1 -1
- package/dist/api-client/file-writer.cjs +62 -0
- package/dist/api-client/file-writer.cjs.map +1 -0
- package/dist/api-client/file-writer.d.cts +66 -0
- package/dist/api-client/file-writer.d.ts +56 -52
- package/dist/api-client/file-writer.js +57 -61
- package/dist/api-client/file-writer.js.map +1 -1
- package/dist/api-client/index.cjs +2 -0
- package/dist/api-client/index.d.ts +2 -2
- package/dist/api-client/index.js +4 -21
- package/dist/api-client/validators.cjs +149 -0
- package/dist/api-client/validators.cjs.map +1 -0
- package/dist/api-client/validators.d.cts +1677 -0
- package/dist/api-client/validators.d.ts +1501 -2412
- package/dist/api-client/validators.js +124 -154
- package/dist/api-client/validators.js.map +1 -1
- package/dist/api-client/with-retry.cjs +89 -0
- package/dist/api-client/with-retry.cjs.map +1 -0
- package/dist/api-client/with-retry.d.cts +10 -0
- package/dist/api-client/with-retry.d.ts +9 -13
- package/dist/api-client/with-retry.js +81 -102
- package/dist/api-client/with-retry.js.map +1 -1
- package/dist/auth/api.cjs +29 -0
- package/dist/auth/api.cjs.map +1 -0
- package/dist/auth/api.js +26 -25
- package/dist/auth/api.js.map +1 -1
- package/dist/auth/error.cjs +13 -0
- package/dist/auth/error.cjs.map +1 -0
- package/dist/auth/error.js +11 -11
- package/dist/auth/error.js.map +1 -1
- package/dist/auth/file.cjs +64 -0
- package/dist/auth/file.cjs.map +1 -0
- package/dist/auth/file.d.cts +26 -0
- package/dist/auth/file.d.ts +19 -15
- package/dist/auth/file.js +49 -64
- package/dist/auth/file.js.map +1 -1
- package/dist/auth/index.cjs +12 -0
- package/dist/auth/index.d.cts +5 -0
- package/dist/auth/index.d.ts +5 -6
- package/dist/auth/index.js +6 -27
- package/dist/auth/linked-project.cjs +38 -0
- package/dist/auth/linked-project.cjs.map +1 -0
- package/dist/auth/linked-project.js +30 -64
- package/dist/auth/linked-project.js.map +1 -1
- package/dist/auth/oauth.cjs +205 -0
- package/dist/auth/oauth.cjs.map +1 -0
- package/dist/auth/oauth.d.cts +135 -0
- package/dist/auth/oauth.d.ts +113 -109
- package/dist/auth/oauth.js +185 -252
- package/dist/auth/oauth.js.map +1 -1
- package/dist/auth/poll-for-token.cjs +82 -0
- package/dist/auth/poll-for-token.cjs.map +1 -0
- package/dist/auth/poll-for-token.d.cts +28 -0
- package/dist/auth/poll-for-token.d.ts +23 -15
- package/dist/auth/poll-for-token.js +79 -64
- package/dist/auth/poll-for-token.js.map +1 -1
- package/dist/auth/project.cjs +80 -0
- package/dist/auth/project.cjs.map +1 -0
- package/dist/auth/project.d.cts +44 -0
- package/dist/auth/project.d.ts +12 -8
- package/dist/auth/project.js +70 -72
- package/dist/auth/project.js.map +1 -1
- package/dist/auth/zod.cjs +22 -0
- package/dist/auth/zod.cjs.map +1 -0
- package/dist/auth/zod.js +18 -17
- package/dist/auth/zod.js.map +1 -1
- package/dist/command.cjs +326 -0
- package/dist/command.cjs.map +1 -0
- package/dist/command.d.cts +289 -0
- package/dist/command.d.ts +265 -171
- package/dist/command.js +321 -226
- package/dist/command.js.map +1 -1
- package/dist/constants.d.cts +5 -0
- package/dist/constants.d.ts +5 -1
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -15
- package/dist/network-policy.d.cts +100 -0
- package/dist/network-policy.d.ts +32 -28
- package/dist/sandbox.cjs +543 -0
- package/dist/sandbox.cjs.map +1 -0
- package/dist/sandbox.d.cts +538 -0
- package/dist/sandbox.d.ts +521 -479
- package/dist/sandbox.js +539 -512
- package/dist/sandbox.js.map +1 -1
- package/dist/snapshot.cjs +116 -0
- package/dist/snapshot.cjs.map +1 -0
- package/dist/snapshot.d.cts +109 -0
- package/dist/snapshot.d.ts +100 -92
- package/dist/snapshot.js +114 -114
- package/dist/snapshot.js.map +1 -1
- package/dist/utils/array.cjs +17 -0
- package/dist/utils/array.cjs.map +1 -0
- package/dist/utils/array.js +12 -15
- package/dist/utils/array.js.map +1 -1
- package/dist/utils/consume-readable.cjs +18 -0
- package/dist/utils/consume-readable.cjs.map +1 -0
- package/dist/utils/consume-readable.js +13 -12
- package/dist/utils/consume-readable.js.map +1 -1
- package/dist/utils/decode-base64-url.cjs +15 -0
- package/dist/utils/decode-base64-url.cjs.map +1 -0
- package/dist/utils/decode-base64-url.js +10 -9
- package/dist/utils/decode-base64-url.js.map +1 -1
- package/dist/utils/dev-credentials.cjs +142 -0
- package/dist/utils/dev-credentials.cjs.map +1 -0
- package/dist/utils/dev-credentials.js +126 -184
- package/dist/utils/dev-credentials.js.map +1 -1
- package/dist/utils/get-credentials.cjs +123 -0
- package/dist/utils/get-credentials.cjs.map +1 -0
- package/dist/utils/get-credentials.d.cts +21 -0
- package/dist/utils/get-credentials.d.ts +19 -61
- package/dist/utils/get-credentials.js +106 -140
- package/dist/utils/get-credentials.js.map +1 -1
- package/dist/utils/log.cjs +25 -0
- package/dist/utils/log.cjs.map +1 -0
- package/dist/utils/log.js +15 -17
- package/dist/utils/log.js.map +1 -1
- package/dist/utils/network-policy.cjs +65 -0
- package/dist/utils/network-policy.cjs.map +1 -0
- package/dist/utils/network-policy.js +58 -77
- package/dist/utils/network-policy.js.map +1 -1
- package/dist/utils/normalizePath.cjs +27 -0
- package/dist/utils/normalizePath.cjs.map +1 -0
- package/dist/utils/normalizePath.js +21 -28
- package/dist/utils/normalizePath.js.map +1 -1
- package/dist/utils/resolveSignal.cjs +20 -0
- package/dist/utils/resolveSignal.cjs.map +1 -0
- package/dist/utils/resolveSignal.d.cts +15 -0
- package/dist/utils/resolveSignal.d.ts +12 -10
- package/dist/utils/resolveSignal.js +14 -17
- package/dist/utils/resolveSignal.js.map +1 -1
- package/dist/utils/sandbox-snapshot.cjs +14 -0
- package/dist/utils/sandbox-snapshot.cjs.map +1 -0
- package/dist/utils/sandbox-snapshot.d.cts +10 -0
- package/dist/utils/sandbox-snapshot.d.ts +11 -0
- package/dist/utils/sandbox-snapshot.js +14 -0
- package/dist/utils/sandbox-snapshot.js.map +1 -0
- package/dist/utils/types.cjs +13 -0
- package/dist/utils/types.cjs.map +1 -0
- package/dist/utils/types.d.cts +11 -0
- package/dist/utils/types.d.ts +5 -7
- package/dist/utils/types.js +8 -8
- package/dist/utils/types.js.map +1 -1
- package/dist/version.cjs +7 -0
- package/dist/version.cjs.map +1 -0
- package/dist/version.js +5 -5
- package/dist/version.js.map +1 -1
- package/package.json +23 -3
- package/dist/api-client/index.js.map +0 -1
- package/dist/auth/api.d.ts +0 -6
- package/dist/auth/error.d.ts +0 -11
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/linked-project.d.ts +0 -10
- package/dist/auth/zod.d.ts +0 -5
- package/dist/constants.js +0 -3
- package/dist/constants.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/network-policy.js +0 -3
- package/dist/network-policy.js.map +0 -1
- package/dist/utils/array.d.ts +0 -9
- package/dist/utils/consume-readable.d.ts +0 -5
- package/dist/utils/convert-sandbox.d.ts +0 -6
- package/dist/utils/convert-sandbox.js +0 -14
- package/dist/utils/convert-sandbox.js.map +0 -1
- package/dist/utils/decode-base64-url.d.ts +0 -7
- package/dist/utils/dev-credentials.d.ts +0 -37
- package/dist/utils/log.d.ts +0 -2
- package/dist/utils/network-policy.d.ts +0 -7
- package/dist/utils/normalizePath.d.ts +0 -17
- package/dist/version.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-policy.js","
|
|
1
|
+
{"version":3,"file":"network-policy.js","names":["injectionRules: z.infer<typeof InjectionRuleValidator>[]","merged: Record<string, string>","allow: Record<string, NetworkPolicyRule[]>"],"sources":["../../src/utils/network-policy.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { NetworkPolicy, NetworkPolicyRule } from \"../network-policy.js\";\nimport {\n NetworkPolicyValidator,\n InjectionRuleValidator,\n} from \"../api-client/validators.js\";\n\ntype APINetworkPolicy = z.infer<typeof NetworkPolicyValidator>;\n\nexport function toAPINetworkPolicy(policy: NetworkPolicy): APINetworkPolicy {\n if (policy === \"allow-all\") return { mode: \"allow-all\" };\n if (policy === \"deny-all\") return { mode: \"deny-all\" };\n\n if (policy.allow && !Array.isArray(policy.allow)) {\n const allowedDomains = Object.keys(policy.allow);\n const injectionRules: z.infer<typeof InjectionRuleValidator>[] = [];\n\n for (const [domain, rules] of Object.entries(policy.allow)) {\n const merged: Record<string, string> = {};\n for (const rule of rules) {\n for (const t of rule.transform ?? []) {\n Object.assign(merged, t.headers);\n }\n }\n if (Object.keys(merged).length > 0) {\n injectionRules.push({ domain, headers: merged });\n }\n }\n\n return {\n mode: \"custom\",\n ...(allowedDomains.length > 0 && { allowedDomains }),\n ...(injectionRules.length > 0 && { injectionRules }),\n ...(policy.subnets?.allow && { allowedCIDRs: policy.subnets.allow }),\n ...(policy.subnets?.deny && { deniedCIDRs: policy.subnets.deny }),\n };\n }\n\n return {\n mode: \"custom\",\n ...(policy.allow && { allowedDomains: policy.allow }),\n ...(policy.subnets?.allow && { allowedCIDRs: policy.subnets.allow }),\n ...(policy.subnets?.deny && { deniedCIDRs: policy.subnets.deny }),\n };\n}\n\nexport function fromAPINetworkPolicy(api: APINetworkPolicy): NetworkPolicy {\n if (api.mode === \"allow-all\") return \"allow-all\";\n if (api.mode === \"deny-all\") return \"deny-all\";\n\n const subnets =\n api.allowedCIDRs || api.deniedCIDRs\n ? {\n subnets: {\n ...(api.allowedCIDRs && { allow: api.allowedCIDRs }),\n ...(api.deniedCIDRs && { deny: api.deniedCIDRs }),\n },\n }\n : undefined;\n\n // If injectionRules are present, reconstruct the record form.\n // The API returns headerNames (secret values are stripped), so we\n // populate each header value with \"<redacted>\".\n if (api.injectionRules && api.injectionRules.length > 0) {\n const rulesByDomain = new Map(\n api.injectionRules.map((r) => [r.domain, r.headerNames ?? []]),\n );\n\n const allow: Record<string, NetworkPolicyRule[]> = {};\n for (const domain of api.allowedDomains ?? []) {\n const headerNames = rulesByDomain.get(domain);\n if (headerNames && headerNames.length > 0) {\n const headers = Object.fromEntries(\n headerNames.map((n) => [n, \"<redacted>\"]),\n );\n allow[domain] = [{ transform: [{ headers }] }];\n } else {\n allow[domain] = [];\n }\n }\n // Include injection rules for domains not in allowedDomains\n for (const rule of api.injectionRules) {\n if (!(rule.domain in allow)) {\n const headers = Object.fromEntries(\n (rule.headerNames ?? []).map((n) => [n, \"<redacted>\"]),\n );\n allow[rule.domain] = [{ transform: [{ headers }] }];\n }\n }\n\n return { allow, ...subnets };\n }\n\n return {\n ...(api.allowedDomains && { allow: api.allowedDomains }),\n ...subnets,\n };\n}\n"],"mappings":";AASA,SAAgB,mBAAmB,QAAyC;AAC1E,KAAI,WAAW,YAAa,QAAO,EAAE,MAAM,aAAa;AACxD,KAAI,WAAW,WAAY,QAAO,EAAE,MAAM,YAAY;AAEtD,KAAI,OAAO,SAAS,CAAC,MAAM,QAAQ,OAAO,MAAM,EAAE;EAChD,MAAM,iBAAiB,OAAO,KAAK,OAAO,MAAM;EAChD,MAAMA,iBAA2D,EAAE;AAEnE,OAAK,MAAM,CAAC,QAAQ,UAAU,OAAO,QAAQ,OAAO,MAAM,EAAE;GAC1D,MAAMC,SAAiC,EAAE;AACzC,QAAK,MAAM,QAAQ,MACjB,MAAK,MAAM,KAAK,KAAK,aAAa,EAAE,CAClC,QAAO,OAAO,QAAQ,EAAE,QAAQ;AAGpC,OAAI,OAAO,KAAK,OAAO,CAAC,SAAS,EAC/B,gBAAe,KAAK;IAAE;IAAQ,SAAS;IAAQ,CAAC;;AAIpD,SAAO;GACL,MAAM;GACN,GAAI,eAAe,SAAS,KAAK,EAAE,gBAAgB;GACnD,GAAI,eAAe,SAAS,KAAK,EAAE,gBAAgB;GACnD,GAAI,OAAO,SAAS,SAAS,EAAE,cAAc,OAAO,QAAQ,OAAO;GACnE,GAAI,OAAO,SAAS,QAAQ,EAAE,aAAa,OAAO,QAAQ,MAAM;GACjE;;AAGH,QAAO;EACL,MAAM;EACN,GAAI,OAAO,SAAS,EAAE,gBAAgB,OAAO,OAAO;EACpD,GAAI,OAAO,SAAS,SAAS,EAAE,cAAc,OAAO,QAAQ,OAAO;EACnE,GAAI,OAAO,SAAS,QAAQ,EAAE,aAAa,OAAO,QAAQ,MAAM;EACjE;;AAGH,SAAgB,qBAAqB,KAAsC;AACzE,KAAI,IAAI,SAAS,YAAa,QAAO;AACrC,KAAI,IAAI,SAAS,WAAY,QAAO;CAEpC,MAAM,UACJ,IAAI,gBAAgB,IAAI,cACpB,EACE,SAAS;EACP,GAAI,IAAI,gBAAgB,EAAE,OAAO,IAAI,cAAc;EACnD,GAAI,IAAI,eAAe,EAAE,MAAM,IAAI,aAAa;EACjD,EACF,GACD;AAKN,KAAI,IAAI,kBAAkB,IAAI,eAAe,SAAS,GAAG;EACvD,MAAM,gBAAgB,IAAI,IACxB,IAAI,eAAe,KAAK,MAAM,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC,CAC/D;EAED,MAAMC,QAA6C,EAAE;AACrD,OAAK,MAAM,UAAU,IAAI,kBAAkB,EAAE,EAAE;GAC7C,MAAM,cAAc,cAAc,IAAI,OAAO;AAC7C,OAAI,eAAe,YAAY,SAAS,EAItC,OAAM,UAAU,CAAC,EAAE,WAAW,CAAC,EAAE,SAHjB,OAAO,YACrB,YAAY,KAAK,MAAM,CAAC,GAAG,aAAa,CAAC,CAC1C,EACyC,CAAC,EAAE,CAAC;OAE9C,OAAM,UAAU,EAAE;;AAItB,OAAK,MAAM,QAAQ,IAAI,eACrB,KAAI,EAAE,KAAK,UAAU,QAAQ;GAC3B,MAAM,UAAU,OAAO,aACpB,KAAK,eAAe,EAAE,EAAE,KAAK,MAAM,CAAC,GAAG,aAAa,CAAC,CACvD;AACD,SAAM,KAAK,UAAU,CAAC,EAAE,WAAW,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC;;AAIvD,SAAO;GAAE;GAAO,GAAG;GAAS;;AAG9B,QAAO;EACL,GAAI,IAAI,kBAAkB,EAAE,OAAO,IAAI,gBAAgB;EACvD,GAAG;EACJ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let path = require("path");
|
|
3
|
+
path = require_rolldown_runtime.__toESM(path);
|
|
4
|
+
|
|
5
|
+
//#region src/utils/normalizePath.ts
|
|
6
|
+
/**
|
|
7
|
+
* Normalize a path and make it relative to `params.extractDir` for inclusion
|
|
8
|
+
* in our tar archives.
|
|
9
|
+
*
|
|
10
|
+
* Relative paths are first resolved to `params.cwd`.
|
|
11
|
+
* Absolute paths are normalized and resolved relative to `params.extractDir`.
|
|
12
|
+
*
|
|
13
|
+
* In addition, paths are normalized so consecutive slashes are removed and
|
|
14
|
+
* stuff like `../..` is resolved appropriately.
|
|
15
|
+
*
|
|
16
|
+
* This function always returns a path relative to `params.extractDir`.
|
|
17
|
+
*/
|
|
18
|
+
function normalizePath(params) {
|
|
19
|
+
if (!path.default.posix.isAbsolute(params.cwd)) throw new Error("cwd dir must be absolute");
|
|
20
|
+
if (!path.default.posix.isAbsolute(params.extractDir)) throw new Error("extractDir must be absolute");
|
|
21
|
+
const basePath = path.default.posix.isAbsolute(params.filePath) ? path.default.posix.normalize(params.filePath) : path.default.posix.join(params.cwd, params.filePath);
|
|
22
|
+
return path.default.posix.relative(params.extractDir, basePath);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.normalizePath = normalizePath;
|
|
27
|
+
//# sourceMappingURL=normalizePath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizePath.cjs","names":[],"sources":["../../src/utils/normalizePath.ts"],"sourcesContent":["import path from \"path\";\n\n/**\n * Normalize a path and make it relative to `params.extractDir` for inclusion\n * in our tar archives.\n *\n * Relative paths are first resolved to `params.cwd`.\n * Absolute paths are normalized and resolved relative to `params.extractDir`.\n *\n * In addition, paths are normalized so consecutive slashes are removed and\n * stuff like `../..` is resolved appropriately.\n *\n * This function always returns a path relative to `params.extractDir`.\n */\nexport function normalizePath(params: {\n filePath: string;\n cwd: string;\n extractDir: string;\n}) {\n if (!path.posix.isAbsolute(params.cwd)) {\n throw new Error(\"cwd dir must be absolute\");\n }\n\n if (!path.posix.isAbsolute(params.extractDir)) {\n throw new Error(\"extractDir must be absolute\");\n }\n\n const basePath = path.posix.isAbsolute(params.filePath)\n ? path.posix.normalize(params.filePath)\n : path.posix.join(params.cwd, params.filePath);\n\n return path.posix.relative(params.extractDir, basePath);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAcA,SAAgB,cAAc,QAI3B;AACD,KAAI,CAAC,aAAK,MAAM,WAAW,OAAO,IAAI,CACpC,OAAM,IAAI,MAAM,2BAA2B;AAG7C,KAAI,CAAC,aAAK,MAAM,WAAW,OAAO,WAAW,CAC3C,OAAM,IAAI,MAAM,8BAA8B;CAGhD,MAAM,WAAW,aAAK,MAAM,WAAW,OAAO,SAAS,GACnD,aAAK,MAAM,UAAU,OAAO,SAAS,GACrC,aAAK,MAAM,KAAK,OAAO,KAAK,OAAO,SAAS;AAEhD,QAAO,aAAK,MAAM,SAAS,OAAO,YAAY,SAAS"}
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.normalizePath = normalizePath;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
1
|
+
import path from "path";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/normalizePath.ts
|
|
8
4
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
* Normalize a path and make it relative to `params.extractDir` for inclusion
|
|
6
|
+
* in our tar archives.
|
|
7
|
+
*
|
|
8
|
+
* Relative paths are first resolved to `params.cwd`.
|
|
9
|
+
* Absolute paths are normalized and resolved relative to `params.extractDir`.
|
|
10
|
+
*
|
|
11
|
+
* In addition, paths are normalized so consecutive slashes are removed and
|
|
12
|
+
* stuff like `../..` is resolved appropriately.
|
|
13
|
+
*
|
|
14
|
+
* This function always returns a path relative to `params.extractDir`.
|
|
15
|
+
*/
|
|
20
16
|
function normalizePath(params) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
throw new Error("extractDir must be absolute");
|
|
26
|
-
}
|
|
27
|
-
const basePath = path_1.default.posix.isAbsolute(params.filePath)
|
|
28
|
-
? path_1.default.posix.normalize(params.filePath)
|
|
29
|
-
: path_1.default.posix.join(params.cwd, params.filePath);
|
|
30
|
-
return path_1.default.posix.relative(params.extractDir, basePath);
|
|
17
|
+
if (!path.posix.isAbsolute(params.cwd)) throw new Error("cwd dir must be absolute");
|
|
18
|
+
if (!path.posix.isAbsolute(params.extractDir)) throw new Error("extractDir must be absolute");
|
|
19
|
+
const basePath = path.posix.isAbsolute(params.filePath) ? path.posix.normalize(params.filePath) : path.posix.join(params.cwd, params.filePath);
|
|
20
|
+
return path.posix.relative(params.extractDir, basePath);
|
|
31
21
|
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { normalizePath };
|
|
32
25
|
//# sourceMappingURL=normalizePath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePath.js","
|
|
1
|
+
{"version":3,"file":"normalizePath.js","names":[],"sources":["../../src/utils/normalizePath.ts"],"sourcesContent":["import path from \"path\";\n\n/**\n * Normalize a path and make it relative to `params.extractDir` for inclusion\n * in our tar archives.\n *\n * Relative paths are first resolved to `params.cwd`.\n * Absolute paths are normalized and resolved relative to `params.extractDir`.\n *\n * In addition, paths are normalized so consecutive slashes are removed and\n * stuff like `../..` is resolved appropriately.\n *\n * This function always returns a path relative to `params.extractDir`.\n */\nexport function normalizePath(params: {\n filePath: string;\n cwd: string;\n extractDir: string;\n}) {\n if (!path.posix.isAbsolute(params.cwd)) {\n throw new Error(\"cwd dir must be absolute\");\n }\n\n if (!path.posix.isAbsolute(params.extractDir)) {\n throw new Error(\"extractDir must be absolute\");\n }\n\n const basePath = path.posix.isAbsolute(params.filePath)\n ? path.posix.normalize(params.filePath)\n : path.posix.join(params.cwd, params.filePath);\n\n return path.posix.relative(params.extractDir, basePath);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcA,SAAgB,cAAc,QAI3B;AACD,KAAI,CAAC,KAAK,MAAM,WAAW,OAAO,IAAI,CACpC,OAAM,IAAI,MAAM,2BAA2B;AAG7C,KAAI,CAAC,KAAK,MAAM,WAAW,OAAO,WAAW,CAC3C,OAAM,IAAI,MAAM,8BAA8B;CAGhD,MAAM,WAAW,KAAK,MAAM,WAAW,OAAO,SAAS,GACnD,KAAK,MAAM,UAAU,OAAO,SAAS,GACrC,KAAK,MAAM,KAAK,OAAO,KAAK,OAAO,SAAS;AAEhD,QAAO,KAAK,MAAM,SAAS,OAAO,YAAY,SAAS"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/resolveSignal.ts
|
|
3
|
+
const linuxSignalMapping = {
|
|
4
|
+
SIGHUP: 1,
|
|
5
|
+
SIGINT: 2,
|
|
6
|
+
SIGQUIT: 3,
|
|
7
|
+
SIGKILL: 9,
|
|
8
|
+
SIGTERM: 15,
|
|
9
|
+
SIGCONT: 18,
|
|
10
|
+
SIGSTOP: 19
|
|
11
|
+
};
|
|
12
|
+
function resolveSignal(signal) {
|
|
13
|
+
if (typeof signal === "number") return signal;
|
|
14
|
+
if (signal in linuxSignalMapping) return linuxSignalMapping[signal];
|
|
15
|
+
throw new Error(`Unknown signal name: ${String(signal)}`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.resolveSignal = resolveSignal;
|
|
20
|
+
//# sourceMappingURL=resolveSignal.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSignal.cjs","names":[],"sources":["../../src/utils/resolveSignal.ts"],"sourcesContent":["const linuxSignalMapping = {\n SIGHUP: 1,\n SIGINT: 2,\n SIGQUIT: 3,\n SIGKILL: 9,\n SIGTERM: 15,\n SIGCONT: 18,\n SIGSTOP: 19,\n} as const;\n\ntype CommonLinuxSignals = keyof typeof linuxSignalMapping;\n\nexport type Signal = CommonLinuxSignals | number;\n\nexport function resolveSignal(signal: Signal): number {\n if (typeof signal === \"number\") {\n return signal;\n }\n\n if (signal in linuxSignalMapping) {\n return linuxSignalMapping[signal];\n }\n throw new Error(`Unknown signal name: ${String(signal)}`);\n}\n"],"mappings":";;AAAA,MAAM,qBAAqB;CACzB,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACV;AAMD,SAAgB,cAAc,QAAwB;AACpD,KAAI,OAAO,WAAW,SACpB,QAAO;AAGT,KAAI,UAAU,mBACZ,QAAO,mBAAmB;AAE5B,OAAM,IAAI,MAAM,wBAAwB,OAAO,OAAO,GAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/utils/resolveSignal.d.ts
|
|
2
|
+
declare const linuxSignalMapping: {
|
|
3
|
+
readonly SIGHUP: 1;
|
|
4
|
+
readonly SIGINT: 2;
|
|
5
|
+
readonly SIGQUIT: 3;
|
|
6
|
+
readonly SIGKILL: 9;
|
|
7
|
+
readonly SIGTERM: 15;
|
|
8
|
+
readonly SIGCONT: 18;
|
|
9
|
+
readonly SIGSTOP: 19;
|
|
10
|
+
};
|
|
11
|
+
type CommonLinuxSignals = keyof typeof linuxSignalMapping;
|
|
12
|
+
type Signal = CommonLinuxSignals | number;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Signal };
|
|
15
|
+
//# sourceMappingURL=resolveSignal.d.cts.map
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
//#region src/utils/resolveSignal.d.ts
|
|
1
2
|
declare const linuxSignalMapping: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
readonly SIGHUP: 1;
|
|
4
|
+
readonly SIGINT: 2;
|
|
5
|
+
readonly SIGQUIT: 3;
|
|
6
|
+
readonly SIGKILL: 9;
|
|
7
|
+
readonly SIGTERM: 15;
|
|
8
|
+
readonly SIGCONT: 18;
|
|
9
|
+
readonly SIGSTOP: 19;
|
|
9
10
|
};
|
|
10
11
|
type CommonLinuxSignals = keyof typeof linuxSignalMapping;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {};
|
|
12
|
+
type Signal = CommonLinuxSignals | number;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Signal };
|
|
15
|
+
//# sourceMappingURL=resolveSignal.d.ts.map
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveSignal = resolveSignal;
|
|
1
|
+
//#region src/utils/resolveSignal.ts
|
|
4
2
|
const linuxSignalMapping = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
SIGHUP: 1,
|
|
4
|
+
SIGINT: 2,
|
|
5
|
+
SIGQUIT: 3,
|
|
6
|
+
SIGKILL: 9,
|
|
7
|
+
SIGTERM: 15,
|
|
8
|
+
SIGCONT: 18,
|
|
9
|
+
SIGSTOP: 19
|
|
12
10
|
};
|
|
13
11
|
function resolveSignal(signal) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (signal in linuxSignalMapping) {
|
|
18
|
-
return linuxSignalMapping[signal];
|
|
19
|
-
}
|
|
20
|
-
throw new Error(`Unknown signal name: ${String(signal)}`);
|
|
12
|
+
if (typeof signal === "number") return signal;
|
|
13
|
+
if (signal in linuxSignalMapping) return linuxSignalMapping[signal];
|
|
14
|
+
throw new Error(`Unknown signal name: ${String(signal)}`);
|
|
21
15
|
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { resolveSignal };
|
|
22
19
|
//# sourceMappingURL=resolveSignal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSignal.js","
|
|
1
|
+
{"version":3,"file":"resolveSignal.js","names":[],"sources":["../../src/utils/resolveSignal.ts"],"sourcesContent":["const linuxSignalMapping = {\n SIGHUP: 1,\n SIGINT: 2,\n SIGQUIT: 3,\n SIGKILL: 9,\n SIGTERM: 15,\n SIGCONT: 18,\n SIGSTOP: 19,\n} as const;\n\ntype CommonLinuxSignals = keyof typeof linuxSignalMapping;\n\nexport type Signal = CommonLinuxSignals | number;\n\nexport function resolveSignal(signal: Signal): number {\n if (typeof signal === \"number\") {\n return signal;\n }\n\n if (signal in linuxSignalMapping) {\n return linuxSignalMapping[signal];\n }\n throw new Error(`Unknown signal name: ${String(signal)}`);\n}\n"],"mappings":";AAAA,MAAM,qBAAqB;CACzB,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACV;AAMD,SAAgB,cAAc,QAAwB;AACpD,KAAI,OAAO,WAAW,SACpB,QAAO;AAGT,KAAI,UAAU,mBACZ,QAAO,mBAAmB;AAE5B,OAAM,IAAI,MAAM,wBAAwB,OAAO,OAAO,GAAG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const require_network_policy = require('./network-policy.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/utils/sandbox-snapshot.ts
|
|
4
|
+
function toSandboxSnapshot(sandbox) {
|
|
5
|
+
const { networkPolicy, ...rest } = sandbox;
|
|
6
|
+
return {
|
|
7
|
+
...rest,
|
|
8
|
+
networkPolicy: networkPolicy ? require_network_policy.fromAPINetworkPolicy(networkPolicy) : void 0
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.toSandboxSnapshot = toSandboxSnapshot;
|
|
14
|
+
//# sourceMappingURL=sandbox-snapshot.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-snapshot.cjs","names":["fromAPINetworkPolicy"],"sources":["../../src/utils/sandbox-snapshot.ts"],"sourcesContent":["import type { SandboxMetaData } from \"../api-client/index.js\";\nimport type { NetworkPolicy } from \"../network-policy.js\";\nimport { fromAPINetworkPolicy } from \"./network-policy.js\";\n\nexport type SandboxSnapshot = Omit<SandboxMetaData, \"networkPolicy\"> & {\n networkPolicy?: NetworkPolicy;\n};\n\nexport function toSandboxSnapshot(sandbox: SandboxMetaData): SandboxSnapshot {\n const { networkPolicy, ...rest } = sandbox;\n return {\n ...rest,\n networkPolicy: networkPolicy\n ? fromAPINetworkPolicy(networkPolicy)\n : undefined,\n };\n}\n"],"mappings":";;;AAQA,SAAgB,kBAAkB,SAA2C;CAC3E,MAAM,EAAE,eAAe,GAAG,SAAS;AACnC,QAAO;EACL,GAAG;EACH,eAAe,gBACXA,4CAAqB,cAAc,GACnC;EACL"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SandboxMetaData } from "../api-client/validators.cjs";
|
|
2
|
+
import { NetworkPolicy } from "../network-policy.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/sandbox-snapshot.d.ts
|
|
5
|
+
type SandboxSnapshot = Omit<SandboxMetaData, "networkPolicy"> & {
|
|
6
|
+
networkPolicy?: NetworkPolicy;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { SandboxSnapshot };
|
|
10
|
+
//# sourceMappingURL=sandbox-snapshot.d.cts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SandboxMetaData } from "../api-client/validators.js";
|
|
2
|
+
import { NetworkPolicy } from "../network-policy.js";
|
|
3
|
+
import "../api-client/index.js";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/sandbox-snapshot.d.ts
|
|
6
|
+
type SandboxSnapshot = Omit<SandboxMetaData, "networkPolicy"> & {
|
|
7
|
+
networkPolicy?: NetworkPolicy;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SandboxSnapshot };
|
|
11
|
+
//# sourceMappingURL=sandbox-snapshot.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { fromAPINetworkPolicy } from "./network-policy.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/sandbox-snapshot.ts
|
|
4
|
+
function toSandboxSnapshot(sandbox) {
|
|
5
|
+
const { networkPolicy, ...rest } = sandbox;
|
|
6
|
+
return {
|
|
7
|
+
...rest,
|
|
8
|
+
networkPolicy: networkPolicy ? fromAPINetworkPolicy(networkPolicy) : void 0
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { toSandboxSnapshot };
|
|
14
|
+
//# sourceMappingURL=sandbox-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox-snapshot.js","names":[],"sources":["../../src/utils/sandbox-snapshot.ts"],"sourcesContent":["import type { SandboxMetaData } from \"../api-client/index.js\";\nimport type { NetworkPolicy } from \"../network-policy.js\";\nimport { fromAPINetworkPolicy } from \"./network-policy.js\";\n\nexport type SandboxSnapshot = Omit<SandboxMetaData, \"networkPolicy\"> & {\n networkPolicy?: NetworkPolicy;\n};\n\nexport function toSandboxSnapshot(sandbox: SandboxMetaData): SandboxSnapshot {\n const { networkPolicy, ...rest } = sandbox;\n return {\n ...rest,\n networkPolicy: networkPolicy\n ? fromAPINetworkPolicy(networkPolicy)\n : undefined,\n };\n}\n"],"mappings":";;;AAQA,SAAgB,kBAAkB,SAA2C;CAC3E,MAAM,EAAE,eAAe,GAAG,SAAS;AACnC,QAAO;EACL,GAAG;EACH,eAAe,gBACX,qBAAqB,cAAc,GACnC;EACL"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Extract private parameters out of an object.
|
|
5
|
+
*/
|
|
6
|
+
const getPrivateParams = (params) => {
|
|
7
|
+
const privateEntries = Object.entries(params ?? {}).filter(([k]) => k.startsWith("__"));
|
|
8
|
+
return Object.fromEntries(privateEntries);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.getPrivateParams = getPrivateParams;
|
|
13
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/utils/types.ts"],"sourcesContent":["/**\n * Utility type that extends a type to accept private parameters.\n *\n * The private parameters can then be extracted out of the object using\n * `getPrivateParams`.\n */\nexport type WithPrivate<T> = T & {\n [K in `__${string}`]?: unknown;\n};\n\n/**\n * Extract private parameters out of an object.\n */\nexport const getPrivateParams = (params?: object) => {\n const privateEntries = Object.entries(params ?? {}).filter(([k]) =>\n k.startsWith(\"__\"),\n );\n return Object.fromEntries(privateEntries) as {\n [K in keyof typeof params as K extends `__${string}`\n ? K\n : never]: (typeof params)[K];\n };\n};\n"],"mappings":";;;;;AAaA,MAAa,oBAAoB,WAAoB;CACnD,MAAM,iBAAiB,OAAO,QAAQ,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,OAC3D,EAAE,WAAW,KAAK,CACnB;AACD,QAAO,OAAO,YAAY,eAAe"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/utils/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Utility type that extends a type to accept private parameters.
|
|
4
|
+
*
|
|
5
|
+
* The private parameters can then be extracted out of the object using
|
|
6
|
+
* `getPrivateParams`.
|
|
7
|
+
*/
|
|
8
|
+
type WithPrivate<T> = T & { [K in `__${string}`]?: unknown };
|
|
9
|
+
//#endregion
|
|
10
|
+
export { WithPrivate };
|
|
11
|
+
//# sourceMappingURL=types.d.cts.map
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
//#region src/utils/types.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Utility type that extends a type to accept private parameters.
|
|
3
4
|
*
|
|
4
5
|
* The private parameters can then be extracted out of the object using
|
|
5
6
|
* `getPrivateParams`.
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
* Extract private parameters out of an object.
|
|
12
|
-
*/
|
|
13
|
-
export declare const getPrivateParams: (params?: object) => { [K in keyof typeof params as K extends `__${string}` ? K : never]: (typeof params)[K]; };
|
|
8
|
+
type WithPrivate<T> = T & { [K in `__${string}`]?: unknown };
|
|
9
|
+
//#endregion
|
|
10
|
+
export { WithPrivate };
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/utils/types.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPrivateParams = void 0;
|
|
1
|
+
//#region src/utils/types.ts
|
|
4
2
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
* Extract private parameters out of an object.
|
|
4
|
+
*/
|
|
7
5
|
const getPrivateParams = (params) => {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
const privateEntries = Object.entries(params ?? {}).filter(([k]) => k.startsWith("__"));
|
|
7
|
+
return Object.fromEntries(privateEntries);
|
|
10
8
|
};
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { getPrivateParams };
|
|
12
12
|
//# sourceMappingURL=types.js.map
|
package/dist/utils/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/utils/types.ts"],"sourcesContent":["/**\n * Utility type that extends a type to accept private parameters.\n *\n * The private parameters can then be extracted out of the object using\n * `getPrivateParams`.\n */\nexport type WithPrivate<T> = T & {\n [K in `__${string}`]?: unknown;\n};\n\n/**\n * Extract private parameters out of an object.\n */\nexport const getPrivateParams = (params?: object) => {\n const privateEntries = Object.entries(params ?? {}).filter(([k]) =>\n k.startsWith(\"__\"),\n );\n return Object.fromEntries(privateEntries) as {\n [K in keyof typeof params as K extends `__${string}`\n ? K\n : never]: (typeof params)[K];\n };\n};\n"],"mappings":";;;;AAaA,MAAa,oBAAoB,WAAoB;CACnD,MAAM,iBAAiB,OAAO,QAAQ,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,OAC3D,EAAE,WAAW,KAAK,CACnB;AACD,QAAO,OAAO,YAAY,eAAe"}
|
package/dist/version.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.cjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Autogenerated by inject-version.ts\nexport const VERSION = \"1.9.1\";\n"],"mappings":";;AACA,MAAa,UAAU"}
|
package/dist/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/version.ts
|
|
2
|
+
const VERSION = "1.9.1";
|
|
3
|
+
|
|
4
|
+
//#endregion
|
|
5
|
+
export { VERSION };
|
|
6
6
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","
|
|
1
|
+
{"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["// Autogenerated by inject-version.ts\nexport const VERSION = \"1.9.1\";\n"],"mappings":";AACA,MAAa,UAAU"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/sandbox",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Software Development Kit for Vercel Sandbox",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
6
8
|
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs",
|
|
14
|
+
"default": "./dist/index.cjs"
|
|
15
|
+
},
|
|
16
|
+
"./dist/auth/index.js": {
|
|
17
|
+
"types": "./dist/auth/index.d.ts",
|
|
18
|
+
"import": "./dist/auth/index.js",
|
|
19
|
+
"require": "./dist/auth/index.cjs",
|
|
20
|
+
"default": "./dist/auth/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
7
24
|
"files": [
|
|
8
25
|
"dist",
|
|
9
26
|
"README.md",
|
|
@@ -23,6 +40,7 @@
|
|
|
23
40
|
"license": "Apache-2.0",
|
|
24
41
|
"dependencies": {
|
|
25
42
|
"@vercel/oidc": "3.2.0",
|
|
43
|
+
"@workflow/serde": "4.1.0-beta.2",
|
|
26
44
|
"async-retry": "1.3.3",
|
|
27
45
|
"jsonlines": "0.1.1",
|
|
28
46
|
"ms": "2.1.3",
|
|
@@ -38,15 +56,17 @@
|
|
|
38
56
|
"@types/ms": "2.1.0",
|
|
39
57
|
"@types/node": "22.15.12",
|
|
40
58
|
"@types/tar-stream": "3.1.4",
|
|
59
|
+
"@workflow/core": "4.2.0-beta.73",
|
|
41
60
|
"dotenv": "16.5.0",
|
|
42
61
|
"factoree": "^0.1.2",
|
|
62
|
+
"tsdown": "0.16.6",
|
|
43
63
|
"typedoc": "0.28.5",
|
|
44
64
|
"typescript": "5.8.3",
|
|
45
65
|
"vitest": "3.2.1"
|
|
46
66
|
},
|
|
47
67
|
"scripts": {
|
|
48
68
|
"clean": "rm -rf node_modules dist",
|
|
49
|
-
"build": "
|
|
69
|
+
"build": "tsdown",
|
|
50
70
|
"test": "vitest run",
|
|
51
71
|
"typedoc": "typedoc",
|
|
52
72
|
"typecheck": "tsc --noEmit",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,+CAA6B"}
|
package/dist/auth/api.d.ts
DELETED
package/dist/auth/error.d.ts
DELETED
package/dist/auth/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";AAAA,2FAA2F;AAC3F,kFAAkF;;;;;;;;;;;;;;;;;AAElF,yCAAuB;AAEvB,0CAAwB;AAExB,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AACrB,qCAAmD;AAA1C,qGAAA,UAAU,OAAA;AAAE,qGAAA,UAAU,OAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads the linked project configuration from `.vercel/project.json`.
|
|
3
|
-
*
|
|
4
|
-
* @param cwd - The directory to search for `.vercel/project.json`.
|
|
5
|
-
* @returns The linked project's `projectId` and `teamId`, or `null` if not found.
|
|
6
|
-
*/
|
|
7
|
-
export declare function readLinkedProject(cwd: string): Promise<{
|
|
8
|
-
projectId: string;
|
|
9
|
-
teamId: string;
|
|
10
|
-
} | null>;
|
package/dist/auth/zod.d.ts
DELETED
package/dist/constants.js
DELETED
package/dist/constants.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":""}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAKmB;AAJjB,kGAAA,OAAO,OAAA;AAKT,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,qCAAqD;AAA5C,kGAAA,OAAO,OAAA;AAAE,0GAAA,eAAe,OAAA;AACjC,oDAAqD;AAA5C,wGAAA,WAAW,OAAA;AACpB,oDAAkD;AAAzC,qGAAA,QAAQ,OAAA"}
|
package/dist/network-policy.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"network-policy.js","sourceRoot":"","sources":["../src/network-policy.ts"],"names":[],"mappings":""}
|
package/dist/utils/array.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns an array from the given item. If the item is an array it will be
|
|
3
|
-
* returned as a it is, otherwise it will be returned as a single item array.
|
|
4
|
-
* If the item is undefined or null an empty array will be returned.
|
|
5
|
-
*
|
|
6
|
-
* @param item The item to convert to an array.
|
|
7
|
-
* @returns An array.
|
|
8
|
-
*/
|
|
9
|
-
export declare function array<T>(item?: null | T | T[]): T[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SandboxMetaData } from "../api-client";
|
|
2
|
-
import type { NetworkPolicy } from "../network-policy";
|
|
3
|
-
export type ConvertedSandbox = Omit<SandboxMetaData, "networkPolicy"> & {
|
|
4
|
-
networkPolicy?: NetworkPolicy;
|
|
5
|
-
};
|
|
6
|
-
export declare function convertSandbox(sandbox: SandboxMetaData): ConvertedSandbox;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertSandbox = convertSandbox;
|
|
4
|
-
const network_policy_1 = require("./network-policy");
|
|
5
|
-
function convertSandbox(sandbox) {
|
|
6
|
-
const { networkPolicy, ...rest } = sandbox;
|
|
7
|
-
return {
|
|
8
|
-
...rest,
|
|
9
|
-
networkPolicy: networkPolicy
|
|
10
|
-
? (0, network_policy_1.fromAPINetworkPolicy)(networkPolicy)
|
|
11
|
-
: undefined,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=convert-sandbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convert-sandbox.js","sourceRoot":"","sources":["../../src/utils/convert-sandbox.ts"],"names":[],"mappings":";;AAQA,wCAQC;AAdD,qDAAwD;AAMxD,SAAgB,cAAc,CAAC,OAAwB;IACrD,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAC3C,OAAO;QACL,GAAG,IAAI;QACP,aAAa,EAAE,aAAa;YAC1B,CAAC,CAAC,IAAA,qCAAoB,EAAC,aAAa,CAAC;YACrC,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC"}
|