deepline 0.3.434 → 0.3.435
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +32 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +7 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +9 -119
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +155 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +32 -3
- package/dist/bundling-sources/shared_libs/product-notifications/slack-transport.ts +2 -0
- package/dist/cli/{auth-ZWASM3JJ.mjs → auth-EQ3MPGNF.mjs} +4 -4
- package/dist/cli/auth-N3273IA5.js +40 -0
- package/dist/cli/{billing-SQI72SQI.js → billing-23HTLBTU.js} +73 -73
- package/dist/cli/{billing-BICK6R5J.mjs → billing-AZXP6FQ6.mjs} +4 -4
- package/dist/cli/{chunk-E5HBBE7F.js → chunk-26X3B5SV.js} +16 -16
- package/dist/cli/{chunk-6AOEQVTN.js → chunk-2CM22MQI.js} +50 -50
- package/dist/cli/{chunk-NIRI3ILU.mjs → chunk-5WJ4K7ZJ.mjs} +1 -1
- package/dist/cli/{chunk-K324EUI2.mjs → chunk-6R6BUVOX.mjs} +8 -8
- package/dist/cli/{chunk-ISU67CJA.mjs → chunk-7JZD5E5E.mjs} +3 -3
- package/dist/cli/{chunk-KPPCM62O.js → chunk-B6ZCP3Z5.js} +6 -6
- package/dist/cli/{chunk-NP5HEQAW.mjs → chunk-BFYSJUB7.mjs} +2 -2
- package/dist/cli/{chunk-6ZGPHO5R.js → chunk-CF4T46L6.js} +1 -1
- package/dist/cli/{chunk-Q7IWP5UM.js → chunk-CTDN4FZR.js} +2 -2
- package/dist/cli/{chunk-KXB5UAFH.js → chunk-DCSRQRUL.js} +2 -2
- package/dist/cli/{chunk-ISUKMN5B.mjs → chunk-DOWK7NOY.mjs} +1 -1
- package/dist/cli/{chunk-QY2DYCUJ.mjs → chunk-EW5TD772.mjs} +2 -2
- package/dist/cli/{chunk-GDIZKSKB.mjs → chunk-HBZWT2US.mjs} +2 -2
- package/dist/cli/{chunk-KHR6V4CE.mjs → chunk-HHJYD3PC.mjs} +1 -1
- package/dist/cli/{chunk-GVMQS6G7.js → chunk-HN6WJC4Y.js} +10 -10
- package/dist/cli/{chunk-A4RM6SQK.mjs → chunk-HR7TOTM7.mjs} +1 -1
- package/dist/cli/{chunk-VFNLUKRT.mjs → chunk-IIW7JOKQ.mjs} +4 -4
- package/dist/cli/{chunk-EAZGVI2H.js → chunk-KDTYSHTE.js} +8 -8
- package/dist/cli/{chunk-NLD7TUJ6.js → chunk-KSXYGT6J.js} +8 -8
- package/dist/cli/{chunk-WB7HZOGR.mjs → chunk-LQTNFYOL.mjs} +2 -2
- package/dist/cli/{chunk-NBZGQRBQ.mjs → chunk-PBK2HVL5.mjs} +3 -3
- package/dist/cli/{chunk-FECJ5LBK.js → chunk-PKHERMMF.js} +52 -52
- package/dist/cli/{chunk-OLWNESMO.js → chunk-PSOCBKRK.js} +35 -35
- package/dist/cli/{chunk-EEQEQRTO.js → chunk-R2DKLSIE.js} +4 -4
- package/dist/cli/{chunk-6P3SCJZA.mjs → chunk-R4KGIU4P.mjs} +1 -1
- package/dist/cli/{chunk-S57PLAGM.mjs → chunk-TXG7K6OK.mjs} +1 -1
- package/dist/cli/{chunk-XVDYAJ4B.js → chunk-UDWRO43L.js} +79 -79
- package/dist/cli/{chunk-CYJJUUIT.mjs → chunk-UFXJB5VM.mjs} +5 -5
- package/dist/cli/{chunk-TFOUACKF.js → chunk-V5S5JGXE.js} +20 -20
- package/dist/cli/{chunk-SVRL42S7.js → chunk-VZOIX2SU.js} +26 -26
- package/dist/cli/{chunk-XZBBTLIL.js → chunk-X3GM2FO2.js} +6 -6
- package/dist/cli/{chunk-HMJS4EP4.mjs → chunk-X7L2ICG7.mjs} +3 -3
- package/dist/cli/{csv-JDI6IB23.js → csv-CHD4AORD.js} +12 -12
- package/dist/cli/{csv-4VNH4CNZ.mjs → csv-RBYDE2VF.mjs} +3 -3
- package/dist/cli/{db-RIXQ4WX5.js → db-G66I35IX.js} +25 -25
- package/dist/cli/{db-2BT7CMVU.mjs → db-PEAA46HL.mjs} +4 -4
- package/dist/cli/{describe-ODFGJI7Q.js → describe-N3WGB4RU.js} +16 -16
- package/dist/cli/{describe-SF4TKH2Y.mjs → describe-YAAQ22BK.mjs} +12 -12
- package/dist/cli/{executions-DNPJRBW2.mjs → executions-NFYYKOQ4.mjs} +4 -4
- package/dist/cli/{executions-HZTV7BRI.js → executions-XL3VMVUS.js} +6 -6
- package/dist/cli/{feedback-OBODUERI.js → feedback-KZ6SBLG6.js} +7 -7
- package/dist/cli/{feedback-SK5AKR7W.mjs → feedback-PUTCVMTD.mjs} +3 -3
- package/dist/cli/git-QTHF7KRA.js +24 -0
- package/dist/cli/{git-7IE5J53C.mjs → git-UU3XVCT4.mjs} +4 -4
- package/dist/cli/index.js +131 -131
- package/dist/cli/index.mjs +36 -36
- package/dist/cli/{legacy-noops-UIQWCOGF.mjs → legacy-noops-BOGHHXVF.mjs} +4 -4
- package/dist/cli/{legacy-noops-CVHQS2Z4.js → legacy-noops-FZSGPSPI.js} +7 -7
- package/dist/cli/{monitors-37W655H5.js → monitors-BDUIUKJJ.js} +84 -84
- package/dist/cli/{monitors-47U23SEH.mjs → monitors-XUSIJAQS.mjs} +4 -4
- package/dist/cli/{org-AS7BDCF2.js → org-4M4LF366.js} +64 -64
- package/dist/cli/{org-Z3WRCPPN.mjs → org-YKDMSVRT.mjs} +4 -4
- package/dist/cli/{play-CQNGRFJX.mjs → play-CLGVNXQW.mjs} +10 -10
- package/dist/cli/{play-IDRYO2XG.js → play-XYAA5UC5.js} +283 -283
- package/dist/cli/{providers-LXH4JT4W.js → providers-HS2JM5MQ.js} +7 -7
- package/dist/cli/{providers-XFGJTDA2.mjs → providers-MFI6MK72.mjs} +4 -4
- package/dist/cli/{quickstart-AFPLY6AL.js → quickstart-BHNM5TQN.js} +5 -5
- package/dist/cli/{quickstart-I34EZG6K.mjs → quickstart-CWUBSTJ2.mjs} +3 -3
- package/dist/cli/search-MN7DAPYR.js +30 -0
- package/dist/cli/{search-GV3H73R7.mjs → search-VK6EN3BR.mjs} +5 -5
- package/dist/cli/{secrets-Z2RLL7MD.mjs → secrets-GPRZ4XF5.mjs} +4 -4
- package/dist/cli/{secrets-ADPINHAV.js → secrets-HJ3HW5TQ.js} +13 -13
- package/dist/cli/{sessions-H7QVYCTY.mjs → sessions-NN4AJLGF.mjs} +4 -4
- package/dist/cli/{sessions-A635YVAT.js → sessions-XJYXZKFA.js} +5 -5
- package/dist/cli/{settings-G6FM442W.js → settings-3Y4FZRE6.js} +75 -75
- package/dist/cli/{settings-LUYTVWTR.mjs → settings-ADLQGWTJ.mjs} +8 -8
- package/dist/cli/{setup-7Y3JAMBT.js → setup-DR2F5EHD.js} +42 -42
- package/dist/cli/{setup-EPRBDJXZ.mjs → setup-PJUA2JPA.mjs} +7 -7
- package/dist/cli/skills-AF3OYN25.js +29 -0
- package/dist/cli/{skills-2SNUHQC7.mjs → skills-YYLZ6ZCQ.mjs} +5 -5
- package/dist/cli/tools-3XW4TJBV.js +44 -0
- package/dist/cli/{tools-PJPLF63I.mjs → tools-GIVNDAF4.mjs} +12 -12
- package/dist/cli/update-2WLAPOXT.js +31 -0
- package/dist/cli/{update-JP7BOOIZ.mjs → update-IZO6EDLX.mjs} +7 -7
- package/dist/cli/{workflow-42ISZKK5.mjs → workflow-FO67TXGC.mjs} +5 -5
- package/dist/cli/{workflow-L33RGJ4A.js → workflow-O4TG6Q3C.js} +15 -15
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +79 -78
- 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/package.json +1 -1
- package/dist/cli/auth-KFYDF5TS.js +0 -40
- package/dist/cli/git-WMBBN7S7.js +0 -24
- package/dist/cli/search-HBEAM36R.js +0 -30
- package/dist/cli/skills-GV2L7QWT.js +0 -29
- package/dist/cli/tools-PXECTR3C.js +0 -44
- package/dist/cli/update-LKVWKWIV.js +0 -31
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk26X3B5SVjs = require('./chunk-26X3B5SV.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkPKHERMMFjs = require('./chunk-PKHERMMF.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkX3GM2FO2js = require('./chunk-X3GM2FO2.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkR2DKLSIEjs = require('./chunk-R2DKLSIE.js');
|
|
19
19
|
|
|
20
20
|
// src/cli/compatibility-catalog.ts
|
|
21
21
|
var readers = /* @__PURE__ */ new WeakMap();
|
|
@@ -42,7 +42,7 @@ function trustedAutoUpdateRegistryUrl(baseUrl) {
|
|
|
42
42
|
async function reportAutoUpdateEvent(input) {
|
|
43
43
|
let apiKey = "";
|
|
44
44
|
try {
|
|
45
|
-
apiKey =
|
|
45
|
+
apiKey = _chunkR2DKLSIEjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
46
46
|
} catch (e2) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -58,15 +58,15 @@ async function reportAutoUpdateEvent(input) {
|
|
|
58
58
|
headers: {
|
|
59
59
|
Authorization: `Bearer ${apiKey}`,
|
|
60
60
|
"Content-Type": "application/json",
|
|
61
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
61
|
+
"User-Agent": `deepline-ts-sdk/${_chunkR2DKLSIEjs.SDK_VERSION}`,
|
|
62
62
|
"X-Deepline-Client-Family": "sdk",
|
|
63
63
|
"X-Deepline-CLI-Family": "sdk",
|
|
64
|
-
"X-Deepline-CLI-Version":
|
|
65
|
-
"X-Deepline-SDK-Version":
|
|
64
|
+
"X-Deepline-CLI-Version": _chunkR2DKLSIEjs.SDK_VERSION,
|
|
65
|
+
"X-Deepline-SDK-Version": _chunkR2DKLSIEjs.SDK_VERSION
|
|
66
66
|
},
|
|
67
67
|
body: JSON.stringify({
|
|
68
68
|
event: input.event,
|
|
69
|
-
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ||
|
|
69
|
+
current_version: _optionalChain([input, 'access', _4 => _4.response, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) || _chunkR2DKLSIEjs.SDK_VERSION,
|
|
70
70
|
target_version: input.response.latest,
|
|
71
71
|
reason: _optionalChain([input, 'access', _8 => _8.response, 'access', _9 => _9.auto_update, 'optionalAccess', _10 => _10.reason]),
|
|
72
72
|
command: _nullishCoalesce(input.response.command, () => ( null)),
|
|
@@ -85,13 +85,13 @@ function envTruthy(name) {
|
|
|
85
85
|
return value === "1" || value === "true" || value === "yes";
|
|
86
86
|
}
|
|
87
87
|
function shouldSkipSelfUpdate(policy) {
|
|
88
|
-
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !
|
|
88
|
+
return policy === "off" || envTruthy("DEEPLINE_SKIP_SELF_UPDATE") || envTruthy("DEEPLINE_NO_AUTO_UPDATE") || envTruthy("DEEPLINE_SKIP_SDK_AUTO_UPDATE") || envTruthy("DEEPLINE_DISABLE_AUTO_UPDATE") || !_chunk26X3B5SVjs.shouldRunCliAutoUpdate.call(void 0, ) || _chunkPKHERMMFjs.isCiEnvironment.call(void 0, );
|
|
89
89
|
}
|
|
90
90
|
function isDowngradeAutoUpdateResponse(response) {
|
|
91
91
|
const target = _optionalChain([response, 'optionalAccess', _17 => _17.latest, 'optionalAccess', _18 => _18.trim, 'call', _19 => _19()]);
|
|
92
|
-
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) ||
|
|
92
|
+
const current = _optionalChain([response, 'optionalAccess', _20 => _20.current, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]) || _chunkR2DKLSIEjs.SDK_VERSION;
|
|
93
93
|
if (!target) return false;
|
|
94
|
-
return
|
|
94
|
+
return _chunk26X3B5SVjs.compareUpdateVersions.call(void 0, target, current) < 0;
|
|
95
95
|
}
|
|
96
96
|
function relaunchCurrentCommand(plan, runtime = {}) {
|
|
97
97
|
return new Promise((resolve) => {
|
|
@@ -144,7 +144,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
144
144
|
}
|
|
145
145
|
if (isDowngradeAutoUpdateResponse(response)) {
|
|
146
146
|
const target = response.latest;
|
|
147
|
-
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) ||
|
|
147
|
+
const current = _optionalChain([response, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.trim, 'call', _28 => _28()]) || _chunkR2DKLSIEjs.SDK_VERSION;
|
|
148
148
|
process.stderr.write(
|
|
149
149
|
`Deepline SDK/CLI auto-update refused: server advertised older ${target} than current ${current}. Continuing without mutating the CLI.
|
|
150
150
|
`
|
|
@@ -152,21 +152,21 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
152
152
|
return false;
|
|
153
153
|
}
|
|
154
154
|
const packageSpec = response.latest ? `deepline@${response.latest}` : void 0;
|
|
155
|
-
const plan =
|
|
155
|
+
const plan = _chunk26X3B5SVjs.resolveUpdatePlan.call(void 0, {
|
|
156
156
|
packageSpec,
|
|
157
157
|
requireVerifiedNpmOwnership: true,
|
|
158
158
|
npmFallbackRegistryUrl: trustedAutoUpdateRegistryUrl(baseUrl)
|
|
159
159
|
});
|
|
160
|
-
if (!
|
|
160
|
+
if (!_chunk26X3B5SVjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) {
|
|
161
161
|
return false;
|
|
162
162
|
}
|
|
163
163
|
if (!autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
164
164
|
deferredAutoUpdate = async () => {
|
|
165
165
|
await applyAutoUpdate(response, baseUrl, plan, "next_command");
|
|
166
166
|
};
|
|
167
|
-
if (
|
|
167
|
+
if (_chunkX3GM2FO2js.isJsonOutputMode.call(void 0, )) {
|
|
168
168
|
const target = _optionalChain([response, 'access', _29 => _29.latest, 'optionalAccess', _30 => _30.trim, 'call', _31 => _31()]);
|
|
169
|
-
|
|
169
|
+
_chunkX3GM2FO2js.addJsonNotice.call(void 0, {
|
|
170
170
|
code: "sdk_update_queued",
|
|
171
171
|
message: `Deepline SDK/CLI update${target ? ` to ${target}` : ""} is queued after this command; the next command will use it if installation succeeds.`
|
|
172
172
|
});
|
|
@@ -179,7 +179,7 @@ async function maybeAutoUpdateAndRelaunch(response, baseUrl, policy = "configure
|
|
|
179
179
|
return true;
|
|
180
180
|
}
|
|
181
181
|
async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
182
|
-
if (!
|
|
182
|
+
if (!_chunk26X3B5SVjs.canAutomaticallyApplyUpdatePlan.call(void 0, plan)) return false;
|
|
183
183
|
const autoUpdate = response.auto_update;
|
|
184
184
|
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";
|
|
185
185
|
process.stderr.write(
|
|
@@ -192,7 +192,7 @@ async function applyAutoUpdate(response, baseUrl, plan, takesEffect) {
|
|
|
192
192
|
event: "started",
|
|
193
193
|
installKind: plan.kind
|
|
194
194
|
});
|
|
195
|
-
const updateResult = await
|
|
195
|
+
const updateResult = await _chunk26X3B5SVjs.runAutomaticUpdatePlan.call(void 0, plan);
|
|
196
196
|
if (updateResult.status === "skipped_previous_failure") {
|
|
197
197
|
void reportAutoUpdateEvent({
|
|
198
198
|
baseUrl,
|
|
@@ -243,7 +243,7 @@ var _crypto = require('crypto');
|
|
|
243
243
|
var TOOL_EXECUTE_PROGRESS_INTERVAL_MS = 15e3;
|
|
244
244
|
var activeToolExecuteCommand = null;
|
|
245
245
|
function progressLine(line) {
|
|
246
|
-
if (!
|
|
246
|
+
if (!_chunkX3GM2FO2js.isJsonOutputMode.call(void 0, )) console.error(line);
|
|
247
247
|
}
|
|
248
248
|
function beginToolExecuteCommand() {
|
|
249
249
|
if (activeToolExecuteCommand) return activeToolExecuteCommand.invocationId;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkX3GM2FO2js = require('./chunk-X3GM2FO2.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkR2DKLSIEjs = require('./chunk-R2DKLSIE.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.getAuthedHttpClient.call(void 0, );
|
|
224
224
|
const payload = await http.get(
|
|
225
225
|
`/api/v2/play-projects/${encodeURIComponent(id)}`
|
|
226
226
|
);
|
|
227
|
-
|
|
227
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.getAuthedHttpClient.call(void 0, );
|
|
268
268
|
await http.delete(`/api/v2/play-projects/${encodeURIComponent(id)}`);
|
|
269
|
-
|
|
269
|
+
_chunkX3GM2FO2js.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 = _chunkR2DKLSIEjs.resolveBaseUrlOnly.call(void 0, );
|
|
290
290
|
const connectUrl = `${baseUrl.replace(/\/$/, "")}/api/v2/github/connect`;
|
|
291
|
-
const opened =
|
|
292
|
-
|
|
291
|
+
const opened = _chunkX3GM2FO2js.openInBrowser.call(void 0, connectUrl);
|
|
292
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.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
|
+
_chunkX3GM2FO2js.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 } = _chunkX3GM2FO2js.getAuthedHttpClient.call(void 0, );
|
|
391
391
|
const payload = await http.post(`/api/v2/deployments/${encodeURIComponent(id)}/cancel`, {});
|
|
392
|
-
|
|
392
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
393
393
|
{
|
|
394
394
|
cancelled: payload.cancelled,
|
|
395
395
|
deployment: payload.deployment,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkR2DKLSIEjs = require('./chunk-R2DKLSIE.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -288,8 +288,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
288
288
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
289
289
|
var defaultBrowserCommandRunner = childProcess;
|
|
290
290
|
function getAuthedHttpClient() {
|
|
291
|
-
const config =
|
|
292
|
-
return { config, http: new (0,
|
|
291
|
+
const config = _chunkR2DKLSIEjs.resolveConfig.call(void 0, );
|
|
292
|
+
return { config, http: new (0, _chunkR2DKLSIEjs.HttpClient)(config) };
|
|
293
293
|
}
|
|
294
294
|
function stableOsUserId() {
|
|
295
295
|
try {
|
|
@@ -629,7 +629,7 @@ function collectLocalEnvInfo() {
|
|
|
629
629
|
os: `${process.platform} ${process.arch}`,
|
|
630
630
|
node_version: process.version,
|
|
631
631
|
home_dir: homeDir,
|
|
632
|
-
agent_runtime:
|
|
632
|
+
agent_runtime: _chunkR2DKLSIEjs.detectAgentRuntime.call(void 0, )
|
|
633
633
|
};
|
|
634
634
|
const env = process.env;
|
|
635
635
|
const optional = {
|
|
@@ -876,9 +876,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
876
876
|
}
|
|
877
877
|
function withAgentCommandContext(value) {
|
|
878
878
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
879
|
-
return
|
|
879
|
+
return _chunkR2DKLSIEjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
880
880
|
...valueRecord,
|
|
881
|
-
command_context:
|
|
881
|
+
command_context: _chunkR2DKLSIEjs.resolveCliCommandContext.call(void 0, )
|
|
882
882
|
} : value;
|
|
883
883
|
}
|
|
884
884
|
function printJson(value, fields) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isJsonOutputMode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HHJYD3PC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_SKILL_AGENTS,
|
|
6
6
|
KNOWN_SKILL_AGENTS,
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
sdkCliStateDirPath,
|
|
18
18
|
skillsAgentPathSegment,
|
|
19
19
|
writeSdkSkillsLocalVersion
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DOWK7NOY.mjs";
|
|
21
21
|
import {
|
|
22
22
|
DeeplineError
|
|
23
23
|
} from "./chunk-E4IXDAZI.mjs";
|
|
24
24
|
import {
|
|
25
25
|
SDK_RELEASE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R4KGIU4P.mjs";
|
|
27
27
|
|
|
28
28
|
// src/compat.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkX3GM2FO2js = require('./chunk-X3GM2FO2.js');
|
|
8
|
+
require('./chunk-R2DKLSIE.js');
|
|
9
9
|
require('./chunk-NPBJI7RE.js');
|
|
10
10
|
require('./chunk-XNYIZMNQ.js');
|
|
11
11
|
require('./chunk-PPDBRJRW.js');
|
|
12
|
-
require('./chunk-
|
|
12
|
+
require('./chunk-CF4T46L6.js');
|
|
13
13
|
require('./chunk-OG64RBAC.js');
|
|
14
14
|
require('./chunk-COGTRVWW.js');
|
|
15
15
|
|
|
@@ -127,7 +127,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
127
127
|
column.length,
|
|
128
128
|
...rows.map((row) => {
|
|
129
129
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
130
|
-
return (verbose ? value :
|
|
130
|
+
return (verbose ? value : _chunkX3GM2FO2js.clip.call(void 0, value, 42)).length;
|
|
131
131
|
})
|
|
132
132
|
)
|
|
133
133
|
])
|
|
@@ -137,7 +137,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
137
137
|
const body = rows.map(
|
|
138
138
|
(row) => columns.map((column) => {
|
|
139
139
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
140
|
-
const display = verbose ? raw :
|
|
140
|
+
const display = verbose ? raw : _chunkX3GM2FO2js.clip.call(void 0, raw, 42);
|
|
141
141
|
return display.padEnd(widths[column]);
|
|
142
142
|
}).join(" | ")
|
|
143
143
|
);
|
|
@@ -157,7 +157,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
157
157
|
{ exitCode: 2 }
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
const allRows =
|
|
160
|
+
const allRows = _chunkX3GM2FO2js.readCsvRows.call(void 0, csvPath);
|
|
161
161
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
162
162
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
163
163
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -170,7 +170,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
170
170
|
if (options.summary) {
|
|
171
171
|
const summaries = summarizeColumns(selected, columns);
|
|
172
172
|
if (format === "json") {
|
|
173
|
-
|
|
173
|
+
_chunkX3GM2FO2js.printJson.call(void 0, {
|
|
174
174
|
rows: summaries,
|
|
175
175
|
total_rows: selected.length,
|
|
176
176
|
source_total_rows: allRows.length
|
|
@@ -179,7 +179,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
179
179
|
}
|
|
180
180
|
const displayRows = summaryDisplayRows(summaries);
|
|
181
181
|
if (format === "csv") {
|
|
182
|
-
process.stdout.write(
|
|
182
|
+
process.stdout.write(_chunkX3GM2FO2js.csvStringFromRows.call(void 0, displayRows));
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
process.stdout.write(
|
|
@@ -194,7 +194,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
if (format === "json") {
|
|
197
|
-
|
|
197
|
+
_chunkX3GM2FO2js.printJson.call(void 0, {
|
|
198
198
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
199
199
|
});
|
|
200
200
|
return;
|
|
@@ -437,7 +437,7 @@ async function handleCsvRenderStart(options) {
|
|
|
437
437
|
if (log) {
|
|
438
438
|
detail = `
|
|
439
439
|
CSV render log:
|
|
440
|
-
${
|
|
440
|
+
${_chunkX3GM2FO2js.clip.call(void 0, log, 2e3)}`;
|
|
441
441
|
}
|
|
442
442
|
} catch (e7) {
|
|
443
443
|
}
|
|
@@ -488,7 +488,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
488
488
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
489
489
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
490
490
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
491
|
-
|
|
491
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0, payload, {
|
|
492
492
|
json: options.json,
|
|
493
493
|
text: `${lines.join("\n")}
|
|
494
494
|
`
|
|
@@ -524,7 +524,7 @@ async function handleCsvRenderStop(options) {
|
|
|
524
524
|
};
|
|
525
525
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
526
526
|
` : "No running CSV render process found.\n";
|
|
527
|
-
|
|
527
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
528
528
|
}
|
|
529
529
|
async function handleCsvRender(action, options) {
|
|
530
530
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-HHJYD3PC.mjs";
|
|
8
|
+
import "./chunk-DOWK7NOY.mjs";
|
|
9
9
|
import "./chunk-MAMVGOSC.mjs";
|
|
10
10
|
import "./chunk-DLIRSHV6.mjs";
|
|
11
11
|
import "./chunk-E4IXDAZI.mjs";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-R4KGIU4P.mjs";
|
|
13
13
|
import "./chunk-WZYKRD7T.mjs";
|
|
14
14
|
import "./chunk-KRD6H754.mjs";
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkHN6WJC4Yjs = require('./chunk-HN6WJC4Y.js');
|
|
8
8
|
require('./chunk-E4CABWXL.js');
|
|
9
9
|
require('./chunk-2H4EY7KH.js');
|
|
10
10
|
require('./chunk-KXMNM4AQ.js');
|
|
@@ -18,8 +18,8 @@ require('./chunk-XDVT3GOM.js');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
22
|
-
require('./chunk-
|
|
21
|
+
var _chunkX3GM2FO2js = require('./chunk-X3GM2FO2.js');
|
|
22
|
+
require('./chunk-R2DKLSIE.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _chunkNPBJI7REjs = require('./chunk-NPBJI7RE.js');
|
|
@@ -27,7 +27,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
30
|
-
require('./chunk-
|
|
30
|
+
require('./chunk-CF4T46L6.js');
|
|
31
31
|
require('./chunk-OG64RBAC.js');
|
|
32
32
|
require('./chunk-COGTRVWW.js');
|
|
33
33
|
|
|
@@ -50,8 +50,8 @@ function formatCell(value) {
|
|
|
50
50
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
51
51
|
}
|
|
52
52
|
function tableLines(result) {
|
|
53
|
-
const rows =
|
|
54
|
-
const responseColumns =
|
|
53
|
+
const rows = _chunkX3GM2FO2js.dataExportRows.call(void 0, customerDbRows(result));
|
|
54
|
+
const responseColumns = _chunkX3GM2FO2js.dataExportColumns.call(void 0,
|
|
55
55
|
rows,
|
|
56
56
|
customerDbColumnNames(result)
|
|
57
57
|
);
|
|
@@ -97,7 +97,7 @@ function tableLines(result) {
|
|
|
97
97
|
return lines;
|
|
98
98
|
}
|
|
99
99
|
function customerDbRows(result) {
|
|
100
|
-
return
|
|
100
|
+
return _chunkX3GM2FO2js.recordRows.call(void 0, result.rows);
|
|
101
101
|
}
|
|
102
102
|
function customerDbColumnNames(result) {
|
|
103
103
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -150,7 +150,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
150
150
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
151
151
|
_fs.writeFileSync.call(void 0,
|
|
152
152
|
resolved,
|
|
153
|
-
|
|
153
|
+
_chunkX3GM2FO2js.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
154
154
|
"utf-8"
|
|
155
155
|
);
|
|
156
156
|
return resolved;
|
|
@@ -191,7 +191,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
191
191
|
function renderDbQueryResult(result, query, options) {
|
|
192
192
|
const { sql, maxRows, operationKey } = query;
|
|
193
193
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
194
|
-
const jsonOutput = explicitJsonOutput ||
|
|
194
|
+
const jsonOutput = explicitJsonOutput || _chunkX3GM2FO2js.shouldEmitJson.call(void 0, );
|
|
195
195
|
const toolPayload = JSON.stringify({
|
|
196
196
|
sql,
|
|
197
197
|
result_mode: "rows",
|
|
@@ -202,7 +202,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
202
202
|
if (format === "csv") {
|
|
203
203
|
if (outPath) {
|
|
204
204
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
205
|
-
|
|
205
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
206
206
|
dbQueryExportEnvelope({
|
|
207
207
|
result,
|
|
208
208
|
format,
|
|
@@ -218,7 +218,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
218
218
|
);
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
222
222
|
dbQueryExportEnvelope({
|
|
223
223
|
result,
|
|
224
224
|
format,
|
|
@@ -228,7 +228,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
228
228
|
}),
|
|
229
229
|
{
|
|
230
230
|
json: explicitJsonOutput,
|
|
231
|
-
text:
|
|
231
|
+
text: _chunkX3GM2FO2js.dataExportCsvString.call(void 0,
|
|
232
232
|
customerDbRows(result),
|
|
233
233
|
customerDbColumnNames(result)
|
|
234
234
|
)
|
|
@@ -237,14 +237,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
if (format === "markdown") {
|
|
240
|
-
const content =
|
|
240
|
+
const content = _chunkX3GM2FO2js.markdownTableFromRows.call(void 0,
|
|
241
241
|
customerDbRows(result),
|
|
242
242
|
customerDbColumnNames(result)
|
|
243
243
|
);
|
|
244
244
|
if (outPath) {
|
|
245
245
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
246
246
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
247
|
-
|
|
247
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
248
248
|
dbQueryExportEnvelope({
|
|
249
249
|
result,
|
|
250
250
|
format,
|
|
@@ -260,7 +260,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
260
260
|
);
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
264
264
|
dbQueryExportEnvelope({
|
|
265
265
|
result,
|
|
266
266
|
format,
|
|
@@ -275,7 +275,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
275
275
|
);
|
|
276
276
|
return;
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
279
279
|
{
|
|
280
280
|
...result,
|
|
281
281
|
next: {
|
|
@@ -349,9 +349,9 @@ async function runDbQueryCommand(options) {
|
|
|
349
349
|
...maxRows === void 0 ? {} : { maxRows },
|
|
350
350
|
...operationKey === void 0 ? {} : { operationKey }
|
|
351
351
|
};
|
|
352
|
-
const plan =
|
|
352
|
+
const plan = _chunkHN6WJC4Yjs.planCustomerDbQuery.call(void 0, query);
|
|
353
353
|
if (options.dryRun) {
|
|
354
|
-
|
|
354
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
355
355
|
{
|
|
356
356
|
dryRun: true,
|
|
357
357
|
...plan,
|
|
@@ -364,11 +364,11 @@ async function runDbQueryCommand(options) {
|
|
|
364
364
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
|
-
{ json: options.json ||
|
|
367
|
+
{ json: options.json || _chunkX3GM2FO2js.shouldEmitJson.call(void 0, ) }
|
|
368
368
|
);
|
|
369
369
|
return 0;
|
|
370
370
|
}
|
|
371
|
-
const client = new (0,
|
|
371
|
+
const client = new (0, _chunkHN6WJC4Yjs.DeeplineClient)();
|
|
372
372
|
const result = await client.db.query(query);
|
|
373
373
|
renderDbQueryResult(result, query, {
|
|
374
374
|
format,
|
|
@@ -377,8 +377,8 @@ async function runDbQueryCommand(options) {
|
|
|
377
377
|
});
|
|
378
378
|
return 0;
|
|
379
379
|
} catch (error) {
|
|
380
|
-
if (error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError && (options.json ||
|
|
381
|
-
|
|
380
|
+
if (error instanceof _chunkNPBJI7REjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkX3GM2FO2js.shouldEmitJson.call(void 0, ))) {
|
|
381
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
382
382
|
{
|
|
383
383
|
ok: false,
|
|
384
384
|
error: {
|
|
@@ -426,8 +426,8 @@ function dbRepairPlainText(result) {
|
|
|
426
426
|
async function handleDbRepair(args) {
|
|
427
427
|
const providerIndex = args.indexOf("--provider");
|
|
428
428
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
429
|
-
const jsonOutput =
|
|
430
|
-
const client = new (0,
|
|
429
|
+
const jsonOutput = _chunkX3GM2FO2js.argsWantJson.call(void 0, args);
|
|
430
|
+
const client = new (0, _chunkHN6WJC4Yjs.DeeplineClient)();
|
|
431
431
|
let result;
|
|
432
432
|
try {
|
|
433
433
|
result = await client.repairIngestionStorage(
|
|
@@ -443,7 +443,7 @@ async function handleDbRepair(args) {
|
|
|
443
443
|
console.error(errorMessage2(error));
|
|
444
444
|
return 1;
|
|
445
445
|
}
|
|
446
|
-
|
|
446
|
+
_chunkX3GM2FO2js.printCommandEnvelope.call(void 0,
|
|
447
447
|
{
|
|
448
448
|
command: "db repair",
|
|
449
449
|
status: result.status,
|