deepline 0.3.499 → 0.3.501
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/bundling-sources/sdk/src/plays/client-core.ts +45 -7
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +36 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +155 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +54 -1
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +21 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +9 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +31 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +226 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +5 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-app-transport.ts +374 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +49 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +25 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-profile.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-sandbox-credential.ts +338 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-staging.ts +417 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +184 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +17 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +18 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +176 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-attempt.ts +81 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-journal.ts +708 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-teardown.ts +160 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +4 -0
- package/dist/cli/{auth-TECJ27G3.mjs → auth-6ECHXOI4.mjs} +5 -5
- package/dist/cli/auth-VP7PMXKQ.js +43 -0
- package/dist/cli/{billing-PMKO73VG.mjs → billing-75NZYRXA.mjs} +8 -8
- package/dist/cli/{billing-ULZGAED6.js → billing-QRR7O6BD.js} +81 -81
- package/dist/cli/{chunk-K54BUQSK.js → chunk-463ZOO2L.js} +7 -7
- package/dist/cli/{chunk-L6C7C7IJ.js → chunk-4OXHLTCP.js} +1 -1
- package/dist/cli/{chunk-3GP52OHV.mjs → chunk-5S7MLAI7.mjs} +11 -11
- package/dist/cli/{chunk-7OQZZHZ4.js → chunk-5X4AUFYW.js} +7 -7
- package/dist/cli/{chunk-56JE475N.mjs → chunk-66XDYH5T.mjs} +2 -2
- package/dist/cli/{chunk-A2VCFBZN.mjs → chunk-7L6QNHUL.mjs} +1 -1
- package/dist/cli/{chunk-UOQUCFAK.js → chunk-APAHMCGR.js} +53 -53
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-BMCRTI6Z.mjs} +22 -1
- package/dist/cli/{chunk-WSOM3TY6.js → chunk-BOFCF4L7.js} +3 -3
- package/dist/cli/{chunk-SLWCXGKP.js → chunk-CJJ7JBM2.js} +16 -16
- package/dist/cli/{chunk-JM52ATUS.mjs → chunk-EHVFBD36.mjs} +1 -1
- package/dist/cli/{chunk-7WUMIRBV.js → chunk-EKF4DKUA.js} +5 -5
- package/dist/cli/{chunk-AGZRRHSB.js → chunk-EKZQ5LQO.js} +3 -3
- package/dist/cli/{chunk-5IDORX4E.mjs → chunk-EOO7OSS4.mjs} +4 -4
- package/dist/cli/{chunk-2PKZ3RUU.js → chunk-FS7XYDOF.js} +16 -16
- package/dist/cli/{chunk-Z2MO7FZG.js → chunk-HDKXSHGA.js} +53 -53
- package/dist/cli/{chunk-YRQWGWRJ.js → chunk-J6SVNKRP.js} +2 -2
- package/dist/cli/{chunk-QXI2W7YY.mjs → chunk-J74N375S.mjs} +4 -4
- package/dist/cli/{chunk-KLQ5CR77.js → chunk-KTOAJP4N.js} +6 -6
- package/dist/cli/{chunk-ZVAD65CF.mjs → chunk-MADTHS56.mjs} +1 -1
- package/dist/cli/{chunk-UMPCQ4EE.mjs → chunk-MSLXAVVK.mjs} +2 -2
- package/dist/cli/{chunk-JIZHGOZ5.js → chunk-N2TJJNCW.js} +96 -96
- package/dist/cli/{chunk-CS2AEAD6.mjs → chunk-N4TR6QRI.mjs} +1 -1
- package/dist/cli/{chunk-43ZERPGR.mjs → chunk-NA3J3F2Z.mjs} +1 -1
- package/dist/cli/{chunk-JQHJKARU.mjs → chunk-O3DDVP7Z.mjs} +1 -1
- package/dist/cli/{chunk-JUQESEJX.mjs → chunk-OKOXB3LY.mjs} +2 -2
- package/dist/cli/{chunk-FG5OZ5FB.js → chunk-PNF2ZU4R.js} +8 -8
- package/dist/cli/{chunk-KZJKRU24.mjs → chunk-PXIF74UJ.mjs} +4 -4
- package/dist/cli/{chunk-TUDYBF4Y.js → chunk-QQ3JJYE2.js} +14 -14
- package/dist/cli/{chunk-IGCSKXGK.mjs → chunk-RFV7PPLS.mjs} +3 -3
- package/dist/cli/{chunk-EQR5O2D2.js → chunk-RNSHCJME.js} +3 -3
- package/dist/cli/{chunk-PE3UHMMZ.js → chunk-RU5ROUFO.js} +5 -5
- package/dist/cli/{chunk-2RZHMCDL.js → chunk-SV2TEZ2M.js} +4 -4
- package/dist/cli/{chunk-P3MGNLZF.mjs → chunk-T4U245E4.mjs} +2 -2
- package/dist/cli/{chunk-7UC2UZYW.mjs → chunk-T7E3XEPG.mjs} +6 -6
- package/dist/cli/{chunk-LUNXREUI.js → chunk-TOE7LHEA.js} +6 -6
- package/dist/cli/{chunk-OWHQ4OG5.mjs → chunk-UJRN6YP6.mjs} +3 -3
- package/dist/cli/{chunk-XSUQAUG4.js → chunk-UR7JOSLT.js} +360 -300
- package/dist/cli/{chunk-KOD45UP5.mjs → chunk-V5NHEYU7.mjs} +5 -5
- package/dist/cli/{chunk-PSYGSXDS.mjs → chunk-VD2374K7.mjs} +1 -1
- package/dist/cli/{chunk-57LW4TGY.js → chunk-VL72UKNW.js} +26 -26
- package/dist/cli/{chunk-YAW7ET4P.mjs → chunk-VTDAJZIJ.mjs} +90 -30
- package/dist/cli/{chunk-AKLI4XSG.js → chunk-VVEMPC2I.js} +2 -2
- package/dist/cli/{chunk-L7O7AFSF.js → chunk-W6JTHVPF.js} +21 -21
- package/dist/cli/{chunk-MQ5YPD7K.mjs → chunk-WJUDAHIQ.mjs} +1 -1
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-WSGXBROE.js} +22 -1
- package/dist/cli/{chunk-G7BB2VOC.js → chunk-XEBFJ2PH.js} +41 -41
- package/dist/cli/{chunk-WEVIUQGZ.mjs → chunk-Z6AUOV7D.mjs} +2 -2
- package/dist/cli/{chunk-BBFWIYAF.mjs → chunk-ZUOKIBLJ.mjs} +2 -2
- package/dist/cli/{chunk-C2V5U6HO.mjs → chunk-ZUQHQGC5.mjs} +5 -5
- package/dist/cli/{csv-VGSQ3JYE.js → csv-JXX2LXK5.js} +13 -13
- package/dist/cli/{csv-ACO5YC46.mjs → csv-RZJ4SOIL.mjs} +4 -4
- package/dist/cli/{db-CXNZOXGM.mjs → db-MUTT2NWI.mjs} +8 -8
- package/dist/cli/{db-QOUPHFFN.js → db-T2KJNONM.js} +29 -29
- package/dist/cli/{describe-J4O5GCJS.mjs → describe-K3UMAAVO.mjs} +19 -19
- package/dist/cli/describe-SEXUJLE4.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-YIECH2CL.js → executions-7HSLDRHR.js} +10 -10
- package/dist/cli/{executions-SJETRLXW.mjs → executions-PHS4R2OX.mjs} +8 -8
- package/dist/cli/{feedback-5BRCNERV.js → feedback-BJZRM637.js} +8 -8
- package/dist/cli/{feedback-GSAFFMF6.mjs → feedback-RWMDCIDF.mjs} +4 -4
- package/dist/cli/git-VNS7UQWN.js +25 -0
- package/dist/cli/{git-SF5XIGLU.mjs → git-YW6VHYZG.mjs} +5 -5
- package/dist/cli/index.js +137 -137
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-5TBT4XC6.js → legacy-noops-2WUV2XD7.js} +8 -8
- package/dist/cli/{legacy-noops-TZA3CALE.mjs → legacy-noops-5UBSUPGG.mjs} +5 -5
- package/dist/cli/{monitors-XAYWJNSV.mjs → monitors-HWOQO3OK.mjs} +9 -9
- package/dist/cli/{monitors-XNB5YNC3.js → monitors-YZZRKSTG.js} +97 -97
- package/dist/cli/{org-2UYWJXG7.js → org-JY7HLHBA.js} +74 -74
- package/dist/cli/{org-S5VZL5KZ.mjs → org-NCXT6RB4.mjs} +8 -8
- package/dist/cli/{pages-ZQRRTZIT.js → pages-6ZOHXL6X.js} +20 -20
- package/dist/cli/{pages-NGVJO7PA.mjs → pages-QJO53QAT.mjs} +8 -8
- package/dist/cli/{play-3JNERHSC.mjs → play-SQRS7JN3.mjs} +20 -20
- package/dist/cli/{play-P3OYQ7JV.js → play-TAYGSR35.js} +336 -336
- package/dist/cli/{providers-27O6BOAP.mjs → providers-3IR3N5DT.mjs} +8 -8
- package/dist/cli/{providers-2FFGAPUR.js → providers-4Q5LOIQ5.js} +11 -11
- package/dist/cli/{quickstart-5G2UPKJV.js → quickstart-ITNUZENY.js} +6 -6
- package/dist/cli/{quickstart-B2EXIAU6.mjs → quickstart-KCZCYO6B.mjs} +4 -4
- package/dist/cli/{run-3QFXYV3Z.mjs → run-JCWRWDSK.mjs} +24 -24
- package/dist/cli/{run-2TGD7FAL.js → run-YQ57LMKN.js} +42 -42
- package/dist/cli/run-identity-HFYABUJS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MNRZS2N3.mjs} +9 -3
- package/dist/cli/{search-GXEEOMVD.mjs → search-FUM27HQP.mjs} +9 -9
- package/dist/cli/search-I425FRTK.js +32 -0
- package/dist/cli/{search-output-DMIJQTAA.mjs → search-output-EWEYT34M.mjs} +4 -4
- package/dist/cli/{search-output-I4RZPHU6.js → search-output-XAMWKRJH.js} +6 -6
- package/dist/cli/{secrets-MJMNRXZX.js → secrets-2IRRRZBL.js} +17 -17
- package/dist/cli/{secrets-DQI5YCS6.mjs → secrets-YTI4IAKR.mjs} +8 -8
- package/dist/cli/{sessions-HAUN3VYE.mjs → sessions-EFS4KUPF.mjs} +5 -5
- package/dist/cli/{sessions-QS74ZTRH.js → sessions-HWTRDXBQ.js} +6 -6
- package/dist/cli/{settings-VQBOS6VU.js → settings-FRVEIOKR.js} +80 -80
- package/dist/cli/{settings-E64HIUXW.mjs → settings-NTOO42DY.mjs} +13 -13
- package/dist/cli/{setup-KRW3JCJE.js → setup-6ZIOAE2V.js} +49 -49
- package/dist/cli/{setup-NRUG42F2.mjs → setup-PAVQPALX.mjs} +9 -9
- package/dist/cli/{skills-AHLZRTKZ.mjs → skills-3O3XTPUM.mjs} +7 -7
- package/dist/cli/skills-6ZNMO2PR.js +36 -0
- package/dist/cli/{tools-INRRIWOU.mjs → tools-7QSB65UL.mjs} +18 -18
- package/dist/cli/tools-DPV2JES6.js +57 -0
- package/dist/cli/update-Q5GUDEAW.js +34 -0
- package/dist/cli/{update-ETOWEJ7D.mjs → update-T6CYS5ZT.mjs} +9 -9
- package/dist/cli/{workflow-RUAYQK4D.js → workflow-4KMJBMGX.js} +19 -19
- package/dist/cli/{workflow-JT2DOSCJ.mjs → workflow-OMSXZ73T.mjs} +9 -9
- package/dist/{client-Cj3UqrCZ.d.ts → client-Bn8FwKGO.d.ts} +1 -1
- package/dist/{client-DSCTVVRj.d.mts → client-CfNRmjLK.d.mts} +1 -1
- package/dist/{client-core-dI4KTuWS.d.ts → client-core-B91EV0WS.d.ts} +19 -0
- package/dist/{client-core-B-8DTIN1.d.mts → client-core-BG8Cgrmk.d.mts} +19 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -19
- package/dist/index.mjs +8 -8
- package/dist/install-integrity.json +114 -108
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +5 -5
- package/package.json +1 -1
- package/dist/cli/auth-32FRISRT.js +0 -43
- package/dist/cli/describe-DEXYQMBO.js +0 -50
- package/dist/cli/git-RDKLITUC.js +0 -25
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-YKTYDBCN.js +0 -32
- package/dist/cli/skills-PGVIJK6Q.js +0 -36
- package/dist/cli/tools-IXXN2RE4.js +0 -57
- package/dist/cli/update-QW4RV2UX.js +0 -34
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
npmSupportsAllowScripts,
|
|
3
3
|
readNpmVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NA3J3F2Z.mjs";
|
|
5
5
|
import {
|
|
6
6
|
runSkillsCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PXIF74UJ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveShellSpawn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J74N375S.mjs";
|
|
11
11
|
import {
|
|
12
12
|
printCommandEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-66XDYH5T.mjs";
|
|
14
14
|
import {
|
|
15
15
|
autoDetectBaseUrl
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MADTHS56.mjs";
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk5X4AUFYWjs = require('./chunk-5X4AUFYW.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkBOFCF4L7js = require('./chunk-BOFCF4L7.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -32,11 +32,11 @@ function renderDeployment(deployment) {
|
|
|
32
32
|
return `${deployment.id} ${source} (${kind}) - ${deployment.status}${suffix}`;
|
|
33
33
|
}
|
|
34
34
|
async function handleList(options) {
|
|
35
|
-
const { http } =
|
|
35
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
36
36
|
const payload = await http.get(
|
|
37
37
|
`/api/v2/play-projects${options.all ? "?includeDisabled=1" : ""}`
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
40
40
|
{
|
|
41
41
|
projects: payload.projects,
|
|
42
42
|
count: payload.projects.length,
|
|
@@ -73,7 +73,7 @@ function describeInstallationStatus(installation) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
async function handleStatus(options) {
|
|
76
|
-
const { http } =
|
|
76
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
77
77
|
const payload = await http.get("/api/v2/github/installation");
|
|
78
78
|
const installation = payload.installation;
|
|
79
79
|
const others = (_nullishCoalesce(payload.installations, () => ( []))).filter(
|
|
@@ -136,7 +136,7 @@ async function handleStatus(options) {
|
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
|
|
139
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
140
140
|
{
|
|
141
141
|
installation,
|
|
142
142
|
installations: _nullishCoalesce(payload.installations, () => ( [])),
|
|
@@ -147,10 +147,10 @@ async function handleStatus(options) {
|
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
async function handleRepos(options) {
|
|
150
|
-
const { http } =
|
|
150
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
151
151
|
const query = options.installation ? `?installationId=${encodeURIComponent(options.installation)}` : "";
|
|
152
152
|
const payload = await http.get(`/api/v2/github/repos${query}`);
|
|
153
|
-
|
|
153
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
154
154
|
{
|
|
155
155
|
installation: payload.installation,
|
|
156
156
|
repositories: payload.repositories,
|
|
@@ -171,7 +171,7 @@ async function handleRepos(options) {
|
|
|
171
171
|
}
|
|
172
172
|
async function resolveRepoId(repo, installation) {
|
|
173
173
|
if (/^\d+$/.test(repo)) return Number(repo);
|
|
174
|
-
const { http } =
|
|
174
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
175
175
|
const query = installation ? `?installationId=${encodeURIComponent(installation)}` : "";
|
|
176
176
|
const payload = await http.get(
|
|
177
177
|
`/api/v2/github/repos${query}`
|
|
@@ -188,7 +188,7 @@ async function resolveRepoId(repo, installation) {
|
|
|
188
188
|
}
|
|
189
189
|
async function handleLink(repo, options) {
|
|
190
190
|
const repoId = await resolveRepoId(repo, options.installation);
|
|
191
|
-
const { http } =
|
|
191
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
192
192
|
const payload = await http.post("/api/v2/play-projects", {
|
|
193
193
|
repoId,
|
|
194
194
|
...options.installation !== void 0 ? { installationId: options.installation } : {},
|
|
@@ -197,7 +197,7 @@ async function handleLink(repo, options) {
|
|
|
197
197
|
...options.branch !== void 0 ? { productionBranch: options.branch } : {},
|
|
198
198
|
...options.prChecks !== void 0 ? { checkOnPullRequest: options.prChecks } : {}
|
|
199
199
|
});
|
|
200
|
-
|
|
200
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
201
201
|
{
|
|
202
202
|
project: payload.project,
|
|
203
203
|
render: {
|
|
@@ -220,11 +220,11 @@ async function handleLink(repo, options) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
async function handleGet(id, options) {
|
|
223
|
-
const { http } =
|
|
223
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
228
228
|
{
|
|
229
229
|
project: payload.project,
|
|
230
230
|
render: {
|
|
@@ -240,7 +240,7 @@ async function handleGet(id, options) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
async function handleSet(id, options) {
|
|
243
|
-
const { http } =
|
|
243
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
244
244
|
const payload = await http.patch(
|
|
245
245
|
`/api/v2/play-projects/${encodeURIComponent(id)}`,
|
|
246
246
|
{
|
|
@@ -251,7 +251,7 @@ async function handleSet(id, options) {
|
|
|
251
251
|
...options.disabled !== void 0 ? { disabled: options.disabled } : {}
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
|
-
|
|
254
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
255
255
|
{
|
|
256
256
|
project: payload.project,
|
|
257
257
|
render: {
|
|
@@ -264,9 +264,9 @@ async function handleSet(id, options) {
|
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
async function handleUnlink(id, options) {
|
|
267
|
-
const { http } =
|
|
267
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
270
270
|
{
|
|
271
271
|
ok: true,
|
|
272
272
|
id,
|
|
@@ -286,10 +286,10 @@ async function handleUnlink(id, options) {
|
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
async function handleConnect(options) {
|
|
289
|
-
const baseUrl =
|
|
289
|
+
const baseUrl = _chunkBOFCF4L7js.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunk5X4AUFYWjs.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
293
293
|
{
|
|
294
294
|
connectUrl,
|
|
295
295
|
browser: opened,
|
|
@@ -311,7 +311,7 @@ async function handleConnect(options) {
|
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
313
|
async function handleDeploymentsList(options) {
|
|
314
|
-
const { http } =
|
|
314
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
315
315
|
const query = new URLSearchParams();
|
|
316
316
|
if (options.repo) query.set("projectId", options.repo);
|
|
317
317
|
if (options.limit) query.set("limit", options.limit);
|
|
@@ -319,7 +319,7 @@ async function handleDeploymentsList(options) {
|
|
|
319
319
|
const payload = await http.get(
|
|
320
320
|
`/api/v2/deployments${suffix}`
|
|
321
321
|
);
|
|
322
|
-
|
|
322
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
deployments: payload.deployments,
|
|
325
325
|
count: payload.deployments.length,
|
|
@@ -363,12 +363,12 @@ function renderDeploymentMonitorLines(results) {
|
|
|
363
363
|
]);
|
|
364
364
|
}
|
|
365
365
|
async function handleDeploymentGet(id, options) {
|
|
366
|
-
const { http } =
|
|
366
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
367
367
|
const payload = await http.get(`/api/v2/deployments/${encodeURIComponent(id)}`);
|
|
368
368
|
const playLines = renderDeploymentPlayLines(payload.deployment.results);
|
|
369
369
|
const monitorLines = renderDeploymentMonitorLines(payload.deployment.results);
|
|
370
370
|
const repository = _nullishCoalesce(_optionalChain([payload, 'access', _10 => _10.project, 'optionalAccess', _11 => _11.repoFullName]), () => ( payload.deployment.repoFullName));
|
|
371
|
-
|
|
371
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
372
372
|
{
|
|
373
373
|
deployment: payload.deployment,
|
|
374
374
|
project: payload.project,
|
|
@@ -387,9 +387,9 @@ async function handleDeploymentGet(id, options) {
|
|
|
387
387
|
);
|
|
388
388
|
}
|
|
389
389
|
async function handleDeploymentCancel(id, options) {
|
|
390
|
-
const { http } =
|
|
390
|
+
const { http } = _chunk5X4AUFYWjs.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunk5X4AUFYWjs.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
stagePlayFiles,
|
|
21
21
|
startPlayRun,
|
|
22
22
|
submitPreparedPlayRunAdmission
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-N4TR6QRI.mjs";
|
|
24
24
|
import {
|
|
25
25
|
describePlayDetail,
|
|
26
26
|
describePlayListItem
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
32
32
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
33
33
|
SDK_API_MAJOR
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-EHVFBD36.mjs";
|
|
35
35
|
import {
|
|
36
36
|
CustomerDbQueryOutcomeUnknownError
|
|
37
37
|
} from "./chunk-4QF2K7TM.mjs";
|
|
@@ -844,8 +844,52 @@ var ToolCalls = class {
|
|
|
844
844
|
}
|
|
845
845
|
};
|
|
846
846
|
|
|
847
|
+
// ../play-runtime/output-size-limits.ts
|
|
848
|
+
var TERMINAL_RUN_RESULT_MAX_BYTES = 6 * 1024 * 1024;
|
|
849
|
+
var LEDGER_TERMINAL_RESULT_MAX_BYTES = 256 * 1024;
|
|
850
|
+
var CUSTOMER_OUTPUT_VALUE_MAX_BYTES = 5 * 1024 * 1024;
|
|
851
|
+
var CUSTOMER_OUTPUT_TOTAL_MAX_BYTES = 5 * 1024 * 1024;
|
|
852
|
+
var RUNTIME_RECEIPT_OUTPUT_MAX_BYTES = 10 * 1024 * 1024;
|
|
853
|
+
var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
|
|
854
|
+
var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
|
|
855
|
+
var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
856
|
+
var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
857
|
+
var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
|
|
858
|
+
var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
|
|
859
|
+
var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
|
|
860
|
+
var JSON_SIZE_LIMIT_REACHED = Symbol("JSON_SIZE_LIMIT_REACHED");
|
|
861
|
+
var OMIT_JSON_OUTPUT_VALUE = Symbol("OMIT_JSON_OUTPUT_VALUE");
|
|
862
|
+
|
|
863
|
+
// ../play-runtime/runtime-gateway-profile.ts
|
|
864
|
+
var RUNTIME_GATEWAY_PROFILE_IDS = {
|
|
865
|
+
vercelApp: "vercel_app@1"
|
|
866
|
+
};
|
|
867
|
+
var RUNTIME_GATEWAY_PROFILES = Object.freeze({
|
|
868
|
+
[RUNTIME_GATEWAY_PROFILE_IDS.vercelApp]: Object.freeze({
|
|
869
|
+
id: RUNTIME_GATEWAY_PROFILE_IDS.vercelApp,
|
|
870
|
+
hosting: "admitting_app_deployment",
|
|
871
|
+
receiptPath: "/api/receipt",
|
|
872
|
+
executionPath: "/api/execution",
|
|
873
|
+
maxPinAgeMs: 6 * 60 * 60 * 1e3,
|
|
874
|
+
poolMaxClients: 2,
|
|
875
|
+
requestBodyMaxBytes: RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES
|
|
876
|
+
})
|
|
877
|
+
});
|
|
878
|
+
var RUNTIME_GATEWAY_PROFILE_ID_SET = new Set(
|
|
879
|
+
Object.values(RUNTIME_GATEWAY_PROFILE_IDS)
|
|
880
|
+
);
|
|
881
|
+
function normalizeRuntimeGatewayProfileId(value) {
|
|
882
|
+
if (typeof value !== "string") return void 0;
|
|
883
|
+
const normalized = value.trim();
|
|
884
|
+
return RUNTIME_GATEWAY_PROFILE_ID_SET.has(normalized) ? normalized : void 0;
|
|
885
|
+
}
|
|
886
|
+
|
|
847
887
|
// ../play-runtime/runtime-environment.ts
|
|
848
888
|
var PLAY_RUNTIME_ENVIRONMENTS = ["preview"];
|
|
889
|
+
function selectedGatewayProfile(value) {
|
|
890
|
+
if (value === void 0) return void 0;
|
|
891
|
+
return normalizeRuntimeGatewayProfileId(value) ?? null;
|
|
892
|
+
}
|
|
849
893
|
var PLAY_RUNTIME_NAMESPACE_PATTERN = /^[a-z][a-z0-9-]{0,30}$/;
|
|
850
894
|
var PLAY_RUNTIME_SANDBOX_PLACEMENT_POLICY_PATTERN = /^[a-z][a-z0-9_]*@[1-9][0-9]*$/;
|
|
851
895
|
function normalizePlayRuntimeNamespace(value) {
|
|
@@ -862,10 +906,12 @@ function normalizePlayRuntimeSelection(value) {
|
|
|
862
906
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
863
907
|
const record = value;
|
|
864
908
|
if (Object.keys(record).some(
|
|
865
|
-
(key) => key !== "environment" && key !== "namespace" && key !== "backend" && key !== "sandboxPlacementPolicy"
|
|
909
|
+
(key) => key !== "environment" && key !== "namespace" && key !== "backend" && key !== "sandboxPlacementPolicy" && key !== "gatewayProfile"
|
|
866
910
|
) || record.environment !== "preview") {
|
|
867
911
|
return null;
|
|
868
912
|
}
|
|
913
|
+
const gatewayProfile = selectedGatewayProfile(record.gatewayProfile);
|
|
914
|
+
if (gatewayProfile === null) return null;
|
|
869
915
|
const namespace = normalizePlayRuntimeNamespace(record.namespace);
|
|
870
916
|
if (!namespace) return null;
|
|
871
917
|
const sandboxPlacementPolicy = record.sandboxPlacementPolicy === void 0 ? void 0 : normalizePlayRuntimeSandboxPlacementPolicy(
|
|
@@ -881,7 +927,8 @@ function normalizePlayRuntimeSelection(value) {
|
|
|
881
927
|
environment: "preview",
|
|
882
928
|
namespace,
|
|
883
929
|
...record.backend === void 0 ? {} : { backend: record.backend },
|
|
884
|
-
...sandboxPlacementPolicy ? { sandboxPlacementPolicy } : {}
|
|
930
|
+
...sandboxPlacementPolicy ? { sandboxPlacementPolicy } : {},
|
|
931
|
+
...gatewayProfile ? { gatewayProfile } : {}
|
|
885
932
|
};
|
|
886
933
|
}
|
|
887
934
|
function normalizePlayRunRuntimeSelection(value) {
|
|
@@ -891,14 +938,24 @@ function normalizePlayRunRuntimeSelection(value) {
|
|
|
891
938
|
return normalizePlayRuntimeSelection(value);
|
|
892
939
|
}
|
|
893
940
|
if (Object.keys(record).some(
|
|
894
|
-
(key) => key !== "environment" && key !== "sandboxPlacementPolicy"
|
|
941
|
+
(key) => key !== "environment" && key !== "sandboxPlacementPolicy" && key !== "gatewayProfile"
|
|
895
942
|
)) {
|
|
896
943
|
return null;
|
|
897
944
|
}
|
|
945
|
+
const gatewayProfile = selectedGatewayProfile(record.gatewayProfile);
|
|
946
|
+
if (gatewayProfile === null) return null;
|
|
947
|
+
if (record.sandboxPlacementPolicy === void 0) {
|
|
948
|
+
return gatewayProfile ? { environment: "native", gatewayProfile } : null;
|
|
949
|
+
}
|
|
898
950
|
const sandboxPlacementPolicy = normalizePlayRuntimeSandboxPlacementPolicy(
|
|
899
951
|
record.sandboxPlacementPolicy
|
|
900
952
|
);
|
|
901
|
-
|
|
953
|
+
if (!sandboxPlacementPolicy) return null;
|
|
954
|
+
return {
|
|
955
|
+
environment: "native",
|
|
956
|
+
sandboxPlacementPolicy,
|
|
957
|
+
...gatewayProfile ? { gatewayProfile } : {}
|
|
958
|
+
};
|
|
902
959
|
}
|
|
903
960
|
function normalizePlayRuntimeEnvironment(value) {
|
|
904
961
|
return typeof value === "string" && PLAY_RUNTIME_ENVIRONMENTS.includes(value) ? value : null;
|
|
@@ -932,14 +989,18 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
932
989
|
const configuredNamespace = env.DEEPLINE_RUNTIME_NAMESPACE?.trim();
|
|
933
990
|
const configuredToken = env.DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN?.trim();
|
|
934
991
|
const configuredPlacementPolicy = env.DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY?.trim();
|
|
992
|
+
const configuredGatewayProfile = env.DEEPLINE_RUNTIME_GATEWAY_PROFILE?.trim();
|
|
935
993
|
if (!configured) {
|
|
936
|
-
if (configuredNamespace || configuredToken || configuredPlacementPolicy) {
|
|
994
|
+
if (configuredNamespace || configuredToken || configuredPlacementPolicy || configuredGatewayProfile) {
|
|
937
995
|
const present = [];
|
|
938
996
|
if (configuredNamespace) present.push("DEEPLINE_RUNTIME_NAMESPACE");
|
|
939
997
|
if (configuredToken) present.push("DEEPLINE_RUNTIME_ENVIRONMENT_TOKEN");
|
|
940
998
|
if (configuredPlacementPolicy) {
|
|
941
999
|
present.push("DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY");
|
|
942
1000
|
}
|
|
1001
|
+
if (configuredGatewayProfile) {
|
|
1002
|
+
present.push("DEEPLINE_RUNTIME_GATEWAY_PROFILE");
|
|
1003
|
+
}
|
|
943
1004
|
const isPlural = present.length > 1;
|
|
944
1005
|
throw new DeeplineError(
|
|
945
1006
|
[
|
|
@@ -954,18 +1015,32 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
954
1015
|
}
|
|
955
1016
|
return void 0;
|
|
956
1017
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1018
|
+
const selectedGatewayProfile2 = configuredGatewayProfile ? normalizeRuntimeGatewayProfileId(configuredGatewayProfile) : void 0;
|
|
1019
|
+
if (configuredGatewayProfile && !selectedGatewayProfile2) {
|
|
1020
|
+
throw new DeeplineError(
|
|
1021
|
+
`DEEPLINE_RUNTIME_GATEWAY_PROFILE must be a supported versioned gateway profile id such as vercel_app@1. Received "${configuredGatewayProfile}".`,
|
|
1022
|
+
void 0,
|
|
1023
|
+
"INVALID_RUNTIME_GATEWAY_PROFILE"
|
|
960
1024
|
);
|
|
961
|
-
|
|
1025
|
+
}
|
|
1026
|
+
const gatewayProfile = selectedGatewayProfile2 ? { gatewayProfile: selectedGatewayProfile2 } : {};
|
|
1027
|
+
if (configured === "native") {
|
|
1028
|
+
const sandboxPlacementPolicy = configuredPlacementPolicy ? normalizePlayRuntimeSandboxPlacementPolicy(configuredPlacementPolicy) : void 0;
|
|
1029
|
+
if (configuredNamespace || configuredPlacementPolicy && !sandboxPlacementPolicy || !sandboxPlacementPolicy && !selectedGatewayProfile2) {
|
|
962
1030
|
throw new DeeplineError(
|
|
963
|
-
"DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and no DEEPLINE_RUNTIME_NAMESPACE.",
|
|
1031
|
+
"DEEPLINE_RUNTIME_ENVIRONMENT=native requires DEEPLINE_RUNTIME_SANDBOX_PLACEMENT_POLICY (such as modal_only@1) and/or DEEPLINE_RUNTIME_GATEWAY_PROFILE (such as vercel_app@1), and no DEEPLINE_RUNTIME_NAMESPACE.",
|
|
964
1032
|
void 0,
|
|
965
1033
|
"INVALID_RUNTIME_ENVIRONMENT"
|
|
966
1034
|
);
|
|
967
1035
|
}
|
|
968
|
-
|
|
1036
|
+
if (sandboxPlacementPolicy) {
|
|
1037
|
+
return {
|
|
1038
|
+
environment: "native",
|
|
1039
|
+
sandboxPlacementPolicy,
|
|
1040
|
+
...gatewayProfile
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
return { environment: "native", gatewayProfile: selectedGatewayProfile2 };
|
|
969
1044
|
}
|
|
970
1045
|
const environment = normalizePlayRuntimeEnvironment(configured);
|
|
971
1046
|
if (!environment) {
|
|
@@ -1003,7 +1078,8 @@ function resolvePlayRunRuntimeSelection(request, env) {
|
|
|
1003
1078
|
environment,
|
|
1004
1079
|
namespace,
|
|
1005
1080
|
...configuredBackend ? { backend: configuredBackend } : {},
|
|
1006
|
-
...configuredPlacementPolicy ? { sandboxPlacementPolicy: configuredPlacementPolicy } : {}
|
|
1081
|
+
...configuredPlacementPolicy ? { sandboxPlacementPolicy: configuredPlacementPolicy } : {},
|
|
1082
|
+
...gatewayProfile
|
|
1007
1083
|
};
|
|
1008
1084
|
}
|
|
1009
1085
|
function resolveStartPlayRunRequest(request, env) {
|
|
@@ -2464,22 +2540,6 @@ var REDACTION_TRIGGER_RE = new RegExp(
|
|
|
2464
2540
|
"i"
|
|
2465
2541
|
);
|
|
2466
2542
|
|
|
2467
|
-
// ../play-runtime/output-size-limits.ts
|
|
2468
|
-
var TERMINAL_RUN_RESULT_MAX_BYTES = 6 * 1024 * 1024;
|
|
2469
|
-
var LEDGER_TERMINAL_RESULT_MAX_BYTES = 256 * 1024;
|
|
2470
|
-
var CUSTOMER_OUTPUT_VALUE_MAX_BYTES = 5 * 1024 * 1024;
|
|
2471
|
-
var CUSTOMER_OUTPUT_TOTAL_MAX_BYTES = 5 * 1024 * 1024;
|
|
2472
|
-
var RUNTIME_RECEIPT_OUTPUT_MAX_BYTES = 10 * 1024 * 1024;
|
|
2473
|
-
var RUNTIME_RECEIPT_COMPLETION_BUFFER_MAX_BYTES = 32 * 1024 * 1024;
|
|
2474
|
-
var RUNTIME_RECEIPT_CONTROL_BUFFER_MAX_BYTES = 2 * 1024 * 1024;
|
|
2475
|
-
var RUNNER_TERMINAL_PUSH_MAX_BODY_BYTES = 16 * 1024 * 1024;
|
|
2476
|
-
var RUNTIME_SHEET_START_TARGET_BODY_BYTES = 12 * 1024 * 1024;
|
|
2477
|
-
var RUNTIME_RECEIPT_GATEWAY_BATCH_MAX_BYTES = 12 * 1024 * 1024;
|
|
2478
|
-
var RUNTIME_RECEIPT_WRITER_TARGET_BATCH_BYTES = 8 * 1024 * 1024;
|
|
2479
|
-
var RUNNER_POST_TERMINAL_DIAGNOSTIC_MAX_BYTES = 64 * 1024;
|
|
2480
|
-
var JSON_SIZE_LIMIT_REACHED = Symbol("JSON_SIZE_LIMIT_REACHED");
|
|
2481
|
-
var OMIT_JSON_OUTPUT_VALUE = Symbol("OMIT_JSON_OUTPUT_VALUE");
|
|
2482
|
-
|
|
2483
2543
|
// ../play-runtime/docflow-node-io.ts
|
|
2484
2544
|
var utf8Encoder = new TextEncoder();
|
|
2485
2545
|
var PLAY_DATASET_BRAND = Symbol.for("deepline.play.dataset");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkAPAHMCGRjs = require('./chunk-APAHMCGR.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/npm-script-policy.ts
|
|
6
6
|
var _child_process = require('child_process');
|
|
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
|
|
|
13
13
|
}
|
|
14
14
|
function readNpmVersion(env) {
|
|
15
15
|
try {
|
|
16
|
-
const plan =
|
|
16
|
+
const plan = _chunkAPAHMCGRjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
|
|
17
17
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
18
18
|
encoding: "utf8",
|
|
19
19
|
env,
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkFS7XYDOFjs = require('./chunk-FS7XYDOF.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkAPAHMCGRjs = require('./chunk-APAHMCGR.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk5X4AUFYWjs = require('./chunk-5X4AUFYW.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkBOFCF4L7js = require('./chunk-BOFCF4L7.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkSV2TEZ2Mjs = require('./chunk-SV2TEZ2M.js');
|
|
21
21
|
|
|
22
22
|
// src/cli/compatibility-catalog.ts
|
|
23
23
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -44,7 +44,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
44
44
|
async function reportAutoUpdateEvent(input) {
|
|
45
45
|
let apiKey = "";
|
|
46
46
|
try {
|
|
47
|
-
apiKey =
|
|
47
|
+
apiKey = _chunkBOFCF4L7js.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
48
48
|
} catch (e2) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -60,15 +60,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
60
60
|
headers: {
|
|
61
61
|
Authorization: `Bearer ${apiKey}`,
|
|
62
62
|
"Content-Type": "application/json",
|
|
63
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
63
|
+
"User-Agent": `deepline-ts-sdk/${_chunkSV2TEZ2Mjs.SDK_VERSION}`,
|
|
64
64
|
"X-Deepline-Client-Family": "sdk",
|
|
65
65
|
"X-Deepline-CLI-Family": "sdk",
|
|
66
|
-
"X-Deepline-CLI-Version":
|
|
67
|
-
"X-Deepline-SDK-Version":
|
|
66
|
+
"X-Deepline-CLI-Version": _chunkSV2TEZ2Mjs.SDK_VERSION,
|
|
67
|
+
"X-Deepline-SDK-Version": _chunkSV2TEZ2Mjs.SDK_VERSION
|
|
68
68
|
},
|
|
69
69
|
body: JSON.stringify({
|
|
70
70
|
event: input.event,
|
|
71
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
71
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkSV2TEZ2Mjs.SDK_VERSION,
|
|
72
72
|
target_version: input.response.latest,
|
|
73
73
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
74
74
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -87,13 +87,13 @@ function envTruthy(name) {
|
|
|
87
87
|
return value === "1" || value === "true" || value === "yes";
|
|
88
88
|
}
|
|
89
89
|
function shouldSkipSelfUpdate(policy) {
|
|
90
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
90
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunkFS7XYDOFjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkAPAHMCGRjs.isCiEnvironment.call(void 0, );
|
|
91
91
|
}
|
|
92
92
|
function isDowngradeAutoUpdateResponse(response) {
|
|
93
93
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
94
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
94
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkSV2TEZ2Mjs.SDK_VERSION;
|
|
95
95
|
if (!target) return false;
|
|
96
|
-
return
|
|
96
|
+
return _chunkFS7XYDOFjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
97
97
|
}
|
|
98
98
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
99
99
|
return new Promise((resolve) => {
|
|
@@ -146,7 +146,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
146
146
|
}
|
|
147
147
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
148
148
|
const target = response.latest;
|
|
149
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
149
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkSV2TEZ2Mjs.SDK_VERSION;
|
|
150
150
|
process.stderr.write(
|
|
151
151
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
152
152
|
`
|
|
@@ -154,21 +154,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
157
|
-
const plan =
|
|
157
|
+
const plan = _chunkFS7XYDOFjs.resolveUpdatePlan.call(void 0, {
|
|
158
158
|
packageSpec,
|
|
159
159
|
requireVerifiedNpmOwnership: true,
|
|
160
160
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
161
161
|
});
|
|
162
|
-
if (!
|
|
162
|
+
if (!_chunkFS7XYDOFjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
163
163
|
return false;
|
|
164
164
|
}
|
|
165
165
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
166
166
|
deferredAutoUpdate = async () => {
|
|
167
167
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
168
168
|
};
|
|
169
|
-
if (
|
|
169
|
+
if (_chunk5X4AUFYWjs.isJsonOutputMode.call(void 0, )) {
|
|
170
170
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
171
|
-
|
|
171
|
+
_chunk5X4AUFYWjs.addJsonNotice.call(void 0, {
|
|
172
172
|
code: "sdk_update_queued",
|
|
173
173
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
174
174
|
});
|
|
@@ -181,7 +181,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
181
181
|
return true;
|
|
182
182
|
}
|
|
183
183
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
184
|
-
if (!
|
|
184
|
+
if (!_chunkFS7XYDOFjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
185
185
|
const autoUpdate = response.auto_update;
|
|
186
186
|
const label = _optionalChain([autoUpdate, 'optionalAccess', _32 => _32.reason]) === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : _optionalChain([autoUpdate, 'optionalAccess', _33 => _33.reason]) === "deprecated" ? "is deprecated and will update automatically" : _optionalChain([autoUpdate, 'optionalAccess', _34 => _34.required]) ? "requires an update" : "has an update available and will update automatically";
|
|
187
187
|
process.stderr.write(
|
|
@@ -194,7 +194,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
194
194
|
event: "started",
|
|
195
195
|
installKind: plan.kind
|
|
196
196
|
});
|
|
197
|
-
const updateResult = await
|
|
197
|
+
const updateResult = await _chunkFS7XYDOFjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
198
198
|
if (updateResult.status === "skipped_previous_failure") {
|
|
199
199
|
void reportAutoUpdateEvent({
|
|
200
200
|
baseUrl,
|
|
@@ -245,7 +245,7 @@ var _crypto = require('crypto');
|
|
|
245
245
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
246
246
|
var activeToolExecuteCommand = null;
|
|
247
247
|
function progressLine(line) {
|
|
248
|
-
if (!
|
|
248
|
+
if (!_chunk5X4AUFYWjs.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
249
249
|
}
|
|
250
250
|
function beginToolExecuteCommand() {
|
|
251
251
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -292,6 +292,27 @@ function buildAsyncPlayRequestFingerprint(input) {
|
|
|
292
292
|
})
|
|
293
293
|
);
|
|
294
294
|
}
|
|
295
|
+
var PLAY_RUN_ID_MAX_LENGTH = 256;
|
|
296
|
+
var RUNTIME_SCOPE_RUN_ID_PATTERN = /^[A-Za-z0-9_.:@/-]+$/;
|
|
297
|
+
function isRuntimeScopeRunId(value) {
|
|
298
|
+
return typeof value === "string" && value.length > 0 && value.length <= PLAY_RUN_ID_MAX_LENGTH && RUNTIME_SCOPE_RUN_ID_PATTERN.test(value);
|
|
299
|
+
}
|
|
300
|
+
var PLAY_RUN_ID_PATTERN = /^play\/([a-z0-9-]+(?:\/[a-z0-9-]+)*)\/run\/\d{8}t\d{6}-\d{3}(?:-[a-z0-9]{8}(-caller-[a-f0-9]{64})?|(-async-[a-f0-9]{20})|(-rerun-[a-f0-9]{20}))?$/;
|
|
301
|
+
function parsePlayRunId(value) {
|
|
302
|
+
if (!isRuntimeScopeRunId(value)) return null;
|
|
303
|
+
const match = PLAY_RUN_ID_PATTERN.exec(value);
|
|
304
|
+
if (!match) return null;
|
|
305
|
+
const startedAtMs = canonicalPlayRunStartedAtMs(value);
|
|
306
|
+
if (startedAtMs === null) return null;
|
|
307
|
+
return Object.freeze({
|
|
308
|
+
familyKey: match[1],
|
|
309
|
+
startedAtMs,
|
|
310
|
+
kind: match[2] ? "caller" : match[3] ? "async" : match[4] ? "rerun" : "root"
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
295
316
|
|
|
296
317
|
|
|
297
318
|
|
|
@@ -307,4 +328,4 @@ function buildAsyncPlayRequestFingerprint(input) {
|
|
|
307
328
|
|
|
308
329
|
|
|
309
330
|
|
|
310
|
-
exports.stableStringify = stableStringify; exports.sha256Hex = sha256Hex; exports.normalizeTableNamespace = normalizeTableNamespace; exports.buildPlayWorkflowFamilyKey = buildPlayWorkflowFamilyKey; exports.buildPlayWorkflowRunSuffix = buildPlayWorkflowRunSuffix; exports.canonicalPlayRunStartedAtMs = canonicalPlayRunStartedAtMs; exports.buildPlayWorkflowId = buildPlayWorkflowId; exports.buildCallerPlayWorkflowId = buildCallerPlayWorkflowId; exports.callerPlayWorkflowIdMatchesRequest = callerPlayWorkflowIdMatchesRequest; exports.buildPlayRunIdentity = buildPlayRunIdentity; exports.buildAsyncPlayRunIdentity = buildAsyncPlayRunIdentity; exports.buildRerunPlayRunIdentity = buildRerunPlayRunIdentity; exports.buildAsyncPlayRequestFingerprint = buildAsyncPlayRequestFingerprint;
|
|
331
|
+
exports.stableStringify = stableStringify; exports.sha256Hex = sha256Hex; exports.normalizeTableNamespace = normalizeTableNamespace; exports.buildPlayWorkflowFamilyKey = buildPlayWorkflowFamilyKey; exports.buildPlayWorkflowRunSuffix = buildPlayWorkflowRunSuffix; exports.canonicalPlayRunStartedAtMs = canonicalPlayRunStartedAtMs; exports.buildPlayWorkflowId = buildPlayWorkflowId; exports.buildCallerPlayWorkflowId = buildCallerPlayWorkflowId; exports.callerPlayWorkflowIdMatchesRequest = callerPlayWorkflowIdMatchesRequest; exports.buildPlayRunIdentity = buildPlayRunIdentity; exports.buildAsyncPlayRunIdentity = buildAsyncPlayRunIdentity; exports.buildRerunPlayRunIdentity = buildRerunPlayRunIdentity; exports.buildAsyncPlayRequestFingerprint = buildAsyncPlayRequestFingerprint; exports.PLAY_RUN_ID_MAX_LENGTH = PLAY_RUN_ID_MAX_LENGTH; exports.isRuntimeScopeRunId = isRuntimeScopeRunId; exports.parsePlayRunId = parsePlayRunId;
|