deepline 0.3.328 → 0.3.330
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/billing-idempotency.ts +24 -0
- package/dist/bundling-sources/sdk/src/client.ts +22 -22
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/play.ts +55 -45
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +16 -0
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +31 -15
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +22 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +29 -11
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +145 -19
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -10
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +59 -10
- package/dist/cli/{auth-ANHHABWT.mjs → auth-A4XQ3KMW.mjs} +4 -4
- package/dist/cli/auth-XJJYQESF.js +31 -0
- package/dist/cli/{billing-R6NYYO6G.mjs → billing-634WZLKG.mjs} +36 -14
- package/dist/cli/{billing-GGVKLFE6.js → billing-WLHXYC5Z.js} +101 -79
- package/dist/cli/{chunk-ZND34HL7.mjs → chunk-3QZ22IZO.mjs} +4 -4
- package/dist/cli/{chunk-UDIPEHNJ.js → chunk-46IVSO6O.js} +141 -11
- package/dist/cli/{chunk-GZV5F6CL.mjs → chunk-56RM5AQF.mjs} +79 -26
- package/dist/cli/{chunk-UM4ZE3P7.mjs → chunk-5W636CDP.mjs} +2 -2
- package/dist/cli/{chunk-W6WV6UME.js → chunk-63W4744F.js} +563 -555
- package/dist/cli/{chunk-OOLIEDIJ.mjs → chunk-6VBXS43D.mjs} +2 -2
- package/dist/cli/{chunk-B2R66UTW.mjs → chunk-7DGZCMXQ.mjs} +1 -1
- package/dist/cli/{chunk-7DDNACAQ.js → chunk-7FWHOKNS.js} +26 -26
- package/dist/cli/{chunk-YIY74KUF.mjs → chunk-EV4QJE4J.mjs} +1 -1
- package/dist/cli/{chunk-2HKPAZVJ.js → chunk-FKKNYKDY.js} +14 -3
- package/dist/cli/{chunk-DNYRAZSK.js → chunk-FLIABSY6.js} +48 -48
- package/dist/cli/{chunk-O5GPNPOC.js → chunk-GHHLLEZK.js} +4 -4
- package/dist/cli/{chunk-ZFKUVDOM.js → chunk-GKZZ32EV.js} +60 -60
- package/dist/cli/{chunk-LJWC5HSO.js → chunk-GS7GA7PI.js} +15 -15
- package/dist/cli/{chunk-7R6KQSFA.mjs → chunk-GTBS6LQH.mjs} +38 -22
- package/dist/cli/{chunk-2FPVWL4W.js → chunk-LNDGT7NV.js} +119 -66
- package/dist/cli/{chunk-SMGNDW7O.mjs → chunk-LQ5DD2UF.mjs} +2 -2
- package/dist/cli/{chunk-WWVE4HFN.mjs → chunk-MBI3BVSQ.mjs} +1 -1
- package/dist/cli/{chunk-KP7W5NO6.mjs → chunk-NTVTZAVZ.mjs} +13 -2
- package/dist/cli/{chunk-XVKQ6D4K.js → chunk-O2L46S3I.js} +2 -2
- package/dist/cli/{chunk-BC7FMQ2G.mjs → chunk-PH2N6GC7.mjs} +1 -1
- package/dist/cli/{chunk-6ENR652E.mjs → chunk-SDSS4OTO.mjs} +77 -69
- package/dist/cli/{chunk-YFCHBN3C.mjs → chunk-SZCUJ4AL.mjs} +1 -1
- package/dist/cli/{chunk-AGH6YP2T.js → chunk-UQV5M6HN.js} +3 -3
- package/dist/cli/{chunk-7MABE3ZK.mjs → chunk-VFC6CZLF.mjs} +135 -5
- package/dist/cli/{chunk-DNMV2L7Q.js → chunk-WHKTRZ3J.js} +6 -6
- package/dist/cli/{chunk-Y4LXIUHX.js → chunk-XUNMVZOW.js} +1 -1
- package/dist/cli/{chunk-LEEXRXQQ.js → chunk-YFP4UH2Y.js} +6 -6
- package/dist/cli/{chunk-ITFUZEHE.js → chunk-YGFQ7YSM.js} +51 -35
- package/dist/cli/{chunk-AKKQ26RX.mjs → chunk-ZYPFCBW5.mjs} +1 -1
- package/dist/cli/client-3CREIHGC.js +20 -0
- package/dist/cli/{client-ZABA5NMD.mjs → client-WYFGEJOX.mjs} +3 -3
- package/dist/cli/{csv-VECE3PWX.mjs → csv-BDZSDXLU.mjs} +3 -3
- package/dist/cli/{csv-4ZK5ZJAJ.js → csv-THMQDXCJ.js} +12 -12
- package/dist/cli/{db-UJPCDBV7.js → db-5BQJOZG7.js} +29 -29
- package/dist/cli/{db-6VE4OEWW.mjs → db-R2LTNLFM.mjs} +4 -4
- package/dist/cli/{describe-CFUZZ326.js → describe-F4G5H3SC.js} +17 -17
- package/dist/cli/{describe-W6X5G4JR.mjs → describe-WECII7FS.mjs} +10 -10
- package/dist/cli/{executions-AI4DTQQL.js → executions-HJRVD4M6.js} +6 -6
- package/dist/cli/{executions-ZZWB75DF.mjs → executions-HPRIRB73.mjs} +4 -4
- package/dist/cli/{feedback-IM5Z6T5K.mjs → feedback-5VVW5WW7.mjs} +3 -3
- package/dist/cli/{feedback-FYSNSYUU.js → feedback-GHGDH43D.js} +6 -6
- package/dist/cli/{git-YNYTK3YW.mjs → git-BBXML2UJ.mjs} +4 -4
- package/dist/cli/git-NNEBLRVP.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-4DTMYYUY.mjs → legacy-noops-IALOUAGL.mjs} +4 -4
- package/dist/cli/{legacy-noops-PHJE2XFK.js → legacy-noops-VNZZ3VVT.js} +7 -7
- package/dist/cli/{monitors-27JP76WE.js → monitors-MLP6IA2R.js} +85 -85
- package/dist/cli/{monitors-HUP4MVWJ.mjs → monitors-VDEB2FKS.mjs} +4 -4
- package/dist/cli/{org-RHVDMUKN.js → org-N6ADDGEV.js} +60 -60
- package/dist/cli/{org-L3B2RR4U.mjs → org-SDSSKY42.mjs} +4 -4
- package/dist/cli/play-UTIPBVDQ.js +153 -0
- package/dist/cli/{play-UXIJVYNF.mjs → play-VSTVY6PM.mjs} +9 -9
- package/dist/cli/{providers-VL6VY56M.js → providers-TJ42O6NN.js} +7 -7
- package/dist/cli/{providers-FABWTNKR.mjs → providers-UKC7KD3W.mjs} +4 -4
- package/dist/cli/{quickstart-IIPZ6DSY.js → quickstart-7S7NMCMX.js} +5 -5
- package/dist/cli/{quickstart-OA54A4IE.mjs → quickstart-WSKATNHJ.mjs} +3 -3
- package/dist/cli/{search-YDK4V2EW.mjs → search-6OS6VVCJ.mjs} +5 -5
- package/dist/cli/search-Y6UGKL5C.js +26 -0
- package/dist/cli/{secrets-JGU7ZRUW.js → secrets-GWLYB2KD.js} +13 -13
- package/dist/cli/{secrets-4MQF6RF6.mjs → secrets-QTTR5R5M.mjs} +4 -4
- package/dist/cli/{sessions-PTHOMSZ5.mjs → sessions-Q7MY5YYI.mjs} +4 -4
- package/dist/cli/{sessions-I7ZZYSYW.js → sessions-SUURWTVX.js} +5 -5
- package/dist/cli/{settings-X4ENSGNK.mjs → settings-3D5YDD2B.mjs} +7 -7
- package/dist/cli/{settings-ZUUBKIG6.js → settings-W4DYMYFA.js} +74 -74
- package/dist/cli/{setup-4UM6FCZL.mjs → setup-5F5OGYKW.mjs} +6 -6
- package/dist/cli/{setup-6L576TQE.js → setup-NIUADTDP.js} +41 -41
- package/dist/cli/skills-SHUL5UT7.js +28 -0
- package/dist/cli/{skills-U3BS5KUI.mjs → skills-TV3ORUIG.mjs} +4 -4
- package/dist/cli/tools-GNIVV4OF.js +40 -0
- package/dist/cli/{tools-O4PX6UVB.mjs → tools-YSZWAFKO.mjs} +7 -6
- package/dist/cli/{update-OHWSK2WN.mjs → update-FJAMLGLT.mjs} +6 -6
- package/dist/cli/update-U3XGY6IT.js +28 -0
- package/dist/cli/{workflow-QWTZBLT3.js → workflow-C6ZCM5S4.js} +15 -15
- package/dist/cli/{workflow-RVMGBMLX.mjs → workflow-HDHBYC7S.mjs} +5 -5
- package/dist/{client-wiWPZhnI.d.mts → client-D5XOQKsA.d.mts} +20 -1
- package/dist/{client-DHq8dJ56.d.ts → client-l-IoLh8Z.d.ts} +20 -1
- package/dist/{compiler-manifest-9TkZ_ykI.d.mts → compiler-manifest-82q4jtfQ.d.mts} +44 -17
- package/dist/{compiler-manifest-9TkZ_ykI.d.ts → compiler-manifest-82q4jtfQ.d.ts} +44 -17
- package/dist/{index-B-5_Xhud.d.mts → index-BPbW2XHF.d.mts} +1 -1
- package/dist/{index-ykksoEyR.d.ts → index-k0rquHIm.d.ts} +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +194 -69
- package/dist/index.mjs +162 -37
- package/dist/install-integrity.json +85 -84
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +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/package.json +2 -1
- package/dist/cli/auth-EKRB4GMP.js +0 -31
- package/dist/cli/client-55BDB4LE.js +0 -20
- package/dist/cli/git-VWXH6LCP.js +0 -23
- package/dist/cli/play-UKH4VFPF.js +0 -153
- package/dist/cli/search-JD2VTR4A.js +0 -26
- package/dist/cli/skills-TLPNCERR.js +0 -28
- package/dist/cli/tools-26JTFFU4.js +0 -39
- package/dist/cli/update-35RRCU2G.js +0 -28
|
@@ -15,7 +15,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkGHHLLEZKjs = require('./chunk-GHHLLEZK.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -82,6 +82,27 @@ function playInputExampleArgs(schema) {
|
|
|
82
82
|
return " --input '@<input.json>'";
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// src/billing-idempotency.ts
|
|
86
|
+
function requireBillingIdempotencyKey(value) {
|
|
87
|
+
const normalized = value.trim();
|
|
88
|
+
let valid = normalized.length > 0 && normalized.length <= 200 && normalized === value;
|
|
89
|
+
if (valid) {
|
|
90
|
+
try {
|
|
91
|
+
valid = new Headers({ "Idempotency-Key": value }).get("Idempotency-Key") === value;
|
|
92
|
+
} catch (e) {
|
|
93
|
+
valid = false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (!valid) {
|
|
97
|
+
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
98
|
+
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace and be valid HTTP header text.",
|
|
99
|
+
void 0,
|
|
100
|
+
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
|
|
85
106
|
// src/db/query.ts
|
|
86
107
|
function planCustomerDbQuery(input) {
|
|
87
108
|
if (typeof input.sql !== "string" || !input.sql.trim())
|
|
@@ -146,7 +167,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
146
167
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _2 => _2.code, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
147
168
|
// lost connections and explicitly unknown transaction resolution.
|
|
148
169
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
149
|
-
throw new (0,
|
|
170
|
+
throw new (0, _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError)(
|
|
150
171
|
error,
|
|
151
172
|
plan.request.body.operation_key
|
|
152
173
|
);
|
|
@@ -154,7 +175,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
154
175
|
throw error;
|
|
155
176
|
}
|
|
156
177
|
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
157
|
-
throw new (0,
|
|
178
|
+
throw new (0, _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError)(
|
|
158
179
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
159
180
|
"The SQL response did not contain a valid result.",
|
|
160
181
|
200,
|
|
@@ -165,7 +186,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
165
186
|
}
|
|
166
187
|
const operation = result.operation;
|
|
167
188
|
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
168
|
-
throw new (0,
|
|
189
|
+
throw new (0, _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError)(
|
|
169
190
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
170
191
|
"The server did not confirm the original atomic SQL operation.",
|
|
171
192
|
200,
|
|
@@ -861,7 +882,7 @@ function createSecretRedactionContext(initialValues = []) {
|
|
|
861
882
|
try {
|
|
862
883
|
const encoded = encodeURIComponent(secret);
|
|
863
884
|
if (encoded !== secret) literals.push(encoded);
|
|
864
|
-
} catch (
|
|
885
|
+
} catch (e2) {
|
|
865
886
|
}
|
|
866
887
|
const built = literals.map((literal) => ({
|
|
867
888
|
literal,
|
|
@@ -882,7 +903,7 @@ function createSecretRedactionContext(initialValues = []) {
|
|
|
882
903
|
try {
|
|
883
904
|
const encoded = encodeURIComponent(secret);
|
|
884
905
|
if (encoded !== secret && value.includes(encoded)) return true;
|
|
885
|
-
} catch (
|
|
906
|
+
} catch (e3) {
|
|
886
907
|
}
|
|
887
908
|
}
|
|
888
909
|
}
|
|
@@ -2172,7 +2193,7 @@ function bounded(value, maxBytes = MAX_BYTES) {
|
|
|
2172
2193
|
let encoded;
|
|
2173
2194
|
try {
|
|
2174
2195
|
encoded = JSON.stringify(value);
|
|
2175
|
-
} catch (
|
|
2196
|
+
} catch (e4) {
|
|
2176
2197
|
fail("Run event query must be bounded JSON without cycles.");
|
|
2177
2198
|
}
|
|
2178
2199
|
if (!encoded || new TextEncoder().encode(encoded).length > maxBytes)
|
|
@@ -2372,7 +2393,7 @@ function parseDsl(input) {
|
|
|
2372
2393
|
}
|
|
2373
2394
|
try {
|
|
2374
2395
|
return JSON.parse(input.slice(start, position));
|
|
2375
|
-
} catch (
|
|
2396
|
+
} catch (e5) {
|
|
2376
2397
|
fail("Run event DSL requires valid JSON scalars.");
|
|
2377
2398
|
}
|
|
2378
2399
|
};
|
|
@@ -2854,8 +2875,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2854
2875
|
}
|
|
2855
2876
|
const receivers = _optionalChain([process, 'access', _102 => _102.env, 'access', _103 => _103.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]);
|
|
2856
2877
|
return {
|
|
2857
|
-
[
|
|
2858
|
-
...receivers ? { [
|
|
2878
|
+
[_chunkGHHLLEZKjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2879
|
+
...receivers ? { [_chunkGHHLLEZKjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2859
2880
|
};
|
|
2860
2881
|
}
|
|
2861
2882
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2871,7 +2892,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2871
2892
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2872
2893
|
);
|
|
2873
2894
|
}
|
|
2874
|
-
return { [
|
|
2895
|
+
return { [_chunkGHHLLEZKjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2875
2896
|
}
|
|
2876
2897
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2877
2898
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3007,17 +3028,6 @@ var MONITOR_JOB_RECONCILIATION_STATES = [
|
|
|
3007
3028
|
"partial",
|
|
3008
3029
|
"mismatched"
|
|
3009
3030
|
];
|
|
3010
|
-
function requireTargetBillingIdempotencyKey(value) {
|
|
3011
|
-
const normalized = value.trim();
|
|
3012
|
-
if (normalized.length === 0 || normalized.length > 200 || normalized !== value) {
|
|
3013
|
-
throw new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
3014
|
-
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace.",
|
|
3015
|
-
void 0,
|
|
3016
|
-
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
3017
|
-
);
|
|
3018
|
-
}
|
|
3019
|
-
return normalized;
|
|
3020
|
-
}
|
|
3021
3031
|
function isRecord2(value) {
|
|
3022
3032
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
3023
3033
|
}
|
|
@@ -3172,8 +3182,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3172
3182
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3173
3183
|
*/
|
|
3174
3184
|
constructor(options) {
|
|
3175
|
-
this.config =
|
|
3176
|
-
this.http = new (0,
|
|
3185
|
+
this.config = _chunkGHHLLEZKjs.resolveConfig.call(void 0, options);
|
|
3186
|
+
this.http = new (0, _chunkGHHLLEZKjs.HttpClient)(this.config);
|
|
3177
3187
|
this.toolCalls = new ToolCalls(
|
|
3178
3188
|
this.http,
|
|
3179
3189
|
this.config.timeout,
|
|
@@ -3236,7 +3246,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3236
3246
|
"/api/v2/billing/auto-recharge/trigger",
|
|
3237
3247
|
{},
|
|
3238
3248
|
{
|
|
3239
|
-
"Idempotency-Key":
|
|
3249
|
+
"Idempotency-Key": requireBillingIdempotencyKey(
|
|
3240
3250
|
_nullishCoalesce(_optionalChain([options2, 'optionalAccess', _145 => _145.idempotencyKey]), () => ( globalThis.crypto.randomUUID()))
|
|
3241
3251
|
)
|
|
3242
3252
|
}
|
|
@@ -5671,13 +5681,14 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5671
5681
|
* requires confirmation.
|
|
5672
5682
|
*/
|
|
5673
5683
|
async topUpBillingBalance(options) {
|
|
5684
|
+
const idempotencyKey = options.idempotencyKey === void 0 ? void 0 : requireBillingIdempotencyKey(options.idempotencyKey);
|
|
5674
5685
|
return this.http.post(
|
|
5675
5686
|
"/api/v2/billing/top-up",
|
|
5676
5687
|
{
|
|
5677
5688
|
credits: options.credits,
|
|
5678
|
-
...
|
|
5689
|
+
...idempotencyKey !== void 0 ? { idempotency_key: idempotencyKey } : {}
|
|
5679
5690
|
},
|
|
5680
|
-
void 0,
|
|
5691
|
+
idempotencyKey === void 0 ? void 0 : { "Idempotency-Key": idempotencyKey },
|
|
5681
5692
|
// The idempotency key makes a retry at the product layer safe, but the
|
|
5682
5693
|
// CLI should not hide ambiguous local delivery failures behind implicit
|
|
5683
5694
|
// transport retries for a payment mutation.
|
|
@@ -5690,13 +5701,17 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5690
5701
|
* `client.billing.topUpWithReceipt(...)`.
|
|
5691
5702
|
*/
|
|
5692
5703
|
async topUpBillingBalanceWithReceipt(options) {
|
|
5704
|
+
const idempotencyKey = options.idempotencyKey === void 0 ? void 0 : requireBillingIdempotencyKey(options.idempotencyKey);
|
|
5693
5705
|
return this.http.post(
|
|
5694
5706
|
"/api/v2/billing/top-up",
|
|
5695
5707
|
{
|
|
5696
5708
|
credits: options.credits,
|
|
5697
|
-
...
|
|
5709
|
+
...idempotencyKey !== void 0 ? { idempotency_key: idempotencyKey } : {}
|
|
5710
|
+
},
|
|
5711
|
+
{
|
|
5712
|
+
"x-deepline-top-up-receipt": "operation-v1",
|
|
5713
|
+
...idempotencyKey !== void 0 ? { "Idempotency-Key": idempotencyKey } : {}
|
|
5698
5714
|
},
|
|
5699
|
-
{ "x-deepline-top-up-receipt": "operation-v1" },
|
|
5700
5715
|
{ maxRetries: 0, exactUrlOnly: true }
|
|
5701
5716
|
);
|
|
5702
5717
|
}
|
|
@@ -5761,7 +5776,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5761
5776
|
}
|
|
5762
5777
|
/** Update automatic recharge and return the server-verified configuration. */
|
|
5763
5778
|
async updateTargetAutoRecharge(options) {
|
|
5764
|
-
const idempotencyKey =
|
|
5779
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5765
5780
|
options.idempotencyKey
|
|
5766
5781
|
);
|
|
5767
5782
|
const response = await this.http.put(
|
|
@@ -5782,7 +5797,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5782
5797
|
* flow. The caller supplies an idempotency key for safe retries.
|
|
5783
5798
|
*/
|
|
5784
5799
|
async purchaseTargetBillingCredits(options) {
|
|
5785
|
-
const idempotencyKey =
|
|
5800
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5786
5801
|
options.idempotencyKey
|
|
5787
5802
|
);
|
|
5788
5803
|
return this.http.post(
|
|
@@ -5801,7 +5816,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5801
5816
|
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
5802
5817
|
);
|
|
5803
5818
|
}
|
|
5804
|
-
const idempotencyKey =
|
|
5819
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5805
5820
|
options.idempotencyKey
|
|
5806
5821
|
);
|
|
5807
5822
|
if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
|
|
@@ -5830,7 +5845,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5830
5845
|
* commercial operation.
|
|
5831
5846
|
*/
|
|
5832
5847
|
async transitionTargetBillingPlan(options) {
|
|
5833
|
-
const idempotencyKey =
|
|
5848
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5834
5849
|
options.idempotencyKey
|
|
5835
5850
|
);
|
|
5836
5851
|
return this.http.post(
|
|
@@ -5854,7 +5869,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
5854
5869
|
}
|
|
5855
5870
|
/** Create an additional workspace through the durable PAYG workflow. */
|
|
5856
5871
|
async createWorkspace(options) {
|
|
5857
|
-
const idempotencyKey =
|
|
5872
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5858
5873
|
options.idempotencyKey
|
|
5859
5874
|
);
|
|
5860
5875
|
const response = await this.http.post(
|
|
@@ -6491,4 +6506,5 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
6491
6506
|
|
|
6492
6507
|
|
|
6493
6508
|
|
|
6494
|
-
|
|
6509
|
+
|
|
6510
|
+
exports.CSV_HEADER_MATCHING_NOTE = CSV_HEADER_MATCHING_NOTE; exports.iterateCursorPages = iterateCursorPages; exports.playInputExampleArgs = playInputExampleArgs; exports.requireBillingIdempotencyKey = requireBillingIdempotencyKey; exports.planCustomerDbQuery = planCustomerDbQuery; exports.validateExecutionIdempotencyKey = validateExecutionIdempotencyKey; exports.PRODUCT_NOTIFICATION_EVENT_CATALOG = PRODUCT_NOTIFICATION_EVENT_CATALOG; exports.resolveLegacySlackNotification = resolveLegacySlackNotification; exports.RUN_EVENT_SEARCH_KIND_VALUES = RUN_EVENT_SEARCH_KIND_VALUES; exports.logProvenanceReaches = logProvenanceReaches; exports.logLevelReaches = logLevelReaches; exports.parseLogLevel = parseLogLevel; exports.classifyLogLine = classifyLogLine; exports.isTransientPlayRunReadError = isTransientPlayRunReadError; exports.encodeRunLogsCursor = encodeRunLogsCursor; exports.isRunLogsCursor = isRunLogsCursor; exports.RunEventQueryInputError = RunEventQueryInputError; exports.normalizeRunEventOperationRequest = normalizeRunEventOperationRequest; exports.isStopAllPlayRunsDryRunResult = isStopAllPlayRunsDryRunResult; exports.MONITOR_JOB_STATES = MONITOR_JOB_STATES; exports.MONITOR_JOB_PHASES = MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = MONITOR_JOB_RECONCILIATION_STATES; exports.DeeplineClient = DeeplineClient;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkYGFQ7YSMjs = require('./chunk-YGFQ7YSM.js');
|
|
7
|
+
require('./chunk-LA46MMTL.js');
|
|
8
|
+
require('./chunk-GHHLLEZK.js');
|
|
9
|
+
require('./chunk-XNYIZMNQ.js');
|
|
10
|
+
require('./chunk-XUNMVZOW.js');
|
|
11
|
+
require('./chunk-S6R3OX7B.js');
|
|
12
|
+
require('./chunk-7P5AA3SN.js');
|
|
13
|
+
require('./chunk-OG64RBAC.js');
|
|
14
|
+
require('./chunk-COGTRVWW.js');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.DeeplineClient = _chunkYGFQ7YSMjs.DeeplineClient; exports.MONITOR_JOB_PHASES = _chunkYGFQ7YSMjs.MONITOR_JOB_PHASES; exports.MONITOR_JOB_RECONCILIATION_STATES = _chunkYGFQ7YSMjs.MONITOR_JOB_RECONCILIATION_STATES; exports.MONITOR_JOB_STATES = _chunkYGFQ7YSMjs.MONITOR_JOB_STATES;
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
MONITOR_JOB_PHASES,
|
|
4
4
|
MONITOR_JOB_RECONCILIATION_STATES,
|
|
5
5
|
MONITOR_JOB_STATES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GTBS6LQH.mjs";
|
|
7
7
|
import "./chunk-CBVIJSHF.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-MBI3BVSQ.mjs";
|
|
9
9
|
import "./chunk-DLIRSHV6.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-SZCUJ4AL.mjs";
|
|
11
11
|
import "./chunk-6IKARAYD.mjs";
|
|
12
12
|
import "./chunk-NXGCO4JB.mjs";
|
|
13
13
|
import "./chunk-WZYKRD7T.mjs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
printCommandEnvelope,
|
|
5
5
|
printJson,
|
|
6
6
|
readCsvRows
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-7DGZCMXQ.mjs";
|
|
8
|
+
import "./chunk-MBI3BVSQ.mjs";
|
|
9
9
|
import "./chunk-DLIRSHV6.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-SZCUJ4AL.mjs";
|
|
11
11
|
import "./chunk-NXGCO4JB.mjs";
|
|
12
12
|
import "./chunk-WZYKRD7T.mjs";
|
|
13
13
|
import "./chunk-KRD6H754.mjs";
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunkWHKTRZ3Jjs = require('./chunk-WHKTRZ3J.js');
|
|
8
|
+
require('./chunk-GHHLLEZK.js');
|
|
9
9
|
require('./chunk-XNYIZMNQ.js');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-XUNMVZOW.js');
|
|
11
11
|
require('./chunk-7P5AA3SN.js');
|
|
12
12
|
require('./chunk-OG64RBAC.js');
|
|
13
13
|
require('./chunk-COGTRVWW.js');
|
|
@@ -126,7 +126,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
126
126
|
column.length,
|
|
127
127
|
...rows.map((row) => {
|
|
128
128
|
const value = _nullishCoalesce(row[column], () => ( ""));
|
|
129
|
-
return (verbose ? value :
|
|
129
|
+
return (verbose ? value : _chunkWHKTRZ3Jjs.clip.call(void 0, value, 42)).length;
|
|
130
130
|
})
|
|
131
131
|
)
|
|
132
132
|
])
|
|
@@ -136,7 +136,7 @@ function renderTable(rows, totalRows, verbose, footer = `showing ${rows.length}
|
|
|
136
136
|
const body = rows.map(
|
|
137
137
|
(row) => columns.map((column) => {
|
|
138
138
|
const raw = _nullishCoalesce(row[column], () => ( ""));
|
|
139
|
-
const display = verbose ? raw :
|
|
139
|
+
const display = verbose ? raw : _chunkWHKTRZ3Jjs.clip.call(void 0, raw, 42);
|
|
140
140
|
return display.padEnd(widths[column]);
|
|
141
141
|
}).join(" | ")
|
|
142
142
|
);
|
|
@@ -156,7 +156,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
156
156
|
{ exitCode: 2 }
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
|
-
const allRows =
|
|
159
|
+
const allRows = _chunkWHKTRZ3Jjs.readCsvRows.call(void 0, csvPath);
|
|
160
160
|
const [rowStart, rowEnd] = parseRowRange(options.rows);
|
|
161
161
|
const rows = options.summary && options.rows === void 0 ? allRows : selectRows(allRows, rowStart, rowEnd);
|
|
162
162
|
const { rows: selected, columns } = selectColumns(
|
|
@@ -169,7 +169,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
169
169
|
if (options.summary) {
|
|
170
170
|
const summaries = summarizeColumns(selected, columns);
|
|
171
171
|
if (format === "json") {
|
|
172
|
-
|
|
172
|
+
_chunkWHKTRZ3Jjs.printJson.call(void 0, {
|
|
173
173
|
rows: summaries,
|
|
174
174
|
total_rows: selected.length,
|
|
175
175
|
source_total_rows: allRows.length
|
|
@@ -178,7 +178,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
178
178
|
}
|
|
179
179
|
const displayRows = summaryDisplayRows(summaries);
|
|
180
180
|
if (format === "csv") {
|
|
181
|
-
process.stdout.write(
|
|
181
|
+
process.stdout.write(_chunkWHKTRZ3Jjs.csvStringFromRows.call(void 0, displayRows));
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
process.stdout.write(
|
|
@@ -193,7 +193,7 @@ async function handleCsvShow(path, options, command) {
|
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
195
|
if (format === "json") {
|
|
196
|
-
|
|
196
|
+
_chunkWHKTRZ3Jjs.printJson.call(void 0, {
|
|
197
197
|
rows: selected.map((row, index) => ({ __row: rowStart + index, ...row }))
|
|
198
198
|
});
|
|
199
199
|
return;
|
|
@@ -436,7 +436,7 @@ async function handleCsvRenderStart(options) {
|
|
|
436
436
|
if (log) {
|
|
437
437
|
detail = `
|
|
438
438
|
CSV render log:
|
|
439
|
-
${
|
|
439
|
+
${_chunkWHKTRZ3Jjs.clip.call(void 0, log, 2e3)}`;
|
|
440
440
|
}
|
|
441
441
|
} catch (e7) {
|
|
442
442
|
}
|
|
@@ -487,7 +487,7 @@ async function handleCsvRenderStatus(options) {
|
|
|
487
487
|
if (payload.pid) lines.push(`Render PID: ${payload.pid}`);
|
|
488
488
|
if (payload.url) lines.push(`Render URL: ${payload.url}`);
|
|
489
489
|
lines.push(`Render Health: ${payload.health_status}`);
|
|
490
|
-
|
|
490
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, payload, {
|
|
491
491
|
json: options.json,
|
|
492
492
|
text: `${lines.join("\n")}
|
|
493
493
|
`
|
|
@@ -523,7 +523,7 @@ async function handleCsvRenderStop(options) {
|
|
|
523
523
|
};
|
|
524
524
|
const text = stopped.length > 0 ? `Stopped CSV render process(es): ${stopped.join(" ")}
|
|
525
525
|
` : "No running CSV render process found.\n";
|
|
526
|
-
|
|
526
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
527
527
|
}
|
|
528
528
|
async function handleCsvRender(action, options) {
|
|
529
529
|
const normalized = _nullishCoalesce(action, () => ( "start"));
|
|
@@ -4,7 +4,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkYGFQ7YSMjs = require('./chunk-YGFQ7YSM.js');
|
|
8
8
|
require('./chunk-LA46MMTL.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -15,12 +15,12 @@ require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkWHKTRZ3Jjs = require('./chunk-WHKTRZ3J.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkGHHLLEZKjs = require('./chunk-GHHLLEZK.js');
|
|
22
22
|
require('./chunk-XNYIZMNQ.js');
|
|
23
|
-
require('./chunk-
|
|
23
|
+
require('./chunk-XUNMVZOW.js');
|
|
24
24
|
require('./chunk-S6R3OX7B.js');
|
|
25
25
|
|
|
26
26
|
|
|
@@ -47,8 +47,8 @@ function formatCell(value) {
|
|
|
47
47
|
return text.length > 80 ? `${text.slice(0, 77)}...` : text;
|
|
48
48
|
}
|
|
49
49
|
function tableLines(result) {
|
|
50
|
-
const rows =
|
|
51
|
-
const responseColumns =
|
|
50
|
+
const rows = _chunkWHKTRZ3Jjs.dataExportRows.call(void 0, customerDbRows(result));
|
|
51
|
+
const responseColumns = _chunkWHKTRZ3Jjs.dataExportColumns.call(void 0,
|
|
52
52
|
rows,
|
|
53
53
|
customerDbColumnNames(result)
|
|
54
54
|
);
|
|
@@ -94,7 +94,7 @@ function tableLines(result) {
|
|
|
94
94
|
return lines;
|
|
95
95
|
}
|
|
96
96
|
function customerDbRows(result) {
|
|
97
|
-
return
|
|
97
|
+
return _chunkWHKTRZ3Jjs.recordRows.call(void 0, result.rows);
|
|
98
98
|
}
|
|
99
99
|
function customerDbColumnNames(result) {
|
|
100
100
|
return result.columns.map((column) => column.name).filter(Boolean);
|
|
@@ -116,15 +116,15 @@ function collectErrorText(value) {
|
|
|
116
116
|
].filter(Boolean).join("\n");
|
|
117
117
|
}
|
|
118
118
|
function formatDbQueryError(sql, error) {
|
|
119
|
-
const text = error instanceof
|
|
119
|
+
const text = error instanceof _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError ? collectErrorText(error.cause) : collectErrorText(error);
|
|
120
120
|
const lower = text.toLowerCase();
|
|
121
121
|
const referencesStorage = /"storage"\.|storage\./i.test(sql);
|
|
122
122
|
const runIdColumnMissing = /column\s+"?run_id"?\s+does not exist/i.test(text) || /run_id.*does not exist/i.test(lower);
|
|
123
123
|
const relationMissing = /relation\s+["']?[^"']*storage[^"']*["']?\s+does not exist/i.test(text) || /42p01/i.test(text);
|
|
124
124
|
if (referencesStorage && relationMissing) {
|
|
125
125
|
return [
|
|
126
|
-
...error instanceof
|
|
127
|
-
error instanceof
|
|
126
|
+
...error instanceof _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
127
|
+
error instanceof _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError ? "The server reported that the referenced storage table does not exist." : "Customer DB query failed: the referenced storage table does not exist.",
|
|
128
128
|
"Play dataset tables are created only when the corresponding ctx.dataset(...).run(...) call executes. Pilot branches, early returns, and runs that fail before the dataset do not create that table.",
|
|
129
129
|
"Use `deepline runs get <run-id> --full --json` to inspect returned dataset handles, then export them with `deepline runs export <run-id> --dataset result.rows --out rows.csv`.",
|
|
130
130
|
`Original error: ${errorMessage(error)}`
|
|
@@ -132,7 +132,7 @@ function formatDbQueryError(sql, error) {
|
|
|
132
132
|
}
|
|
133
133
|
if (referencesStorage && runIdColumnMissing) {
|
|
134
134
|
return [
|
|
135
|
-
...error instanceof
|
|
135
|
+
...error instanceof _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError ? [error.message] : [],
|
|
136
136
|
"Customer DB query failed: storage dataset tables use `_run_id`, not `run_id`.",
|
|
137
137
|
"Prefer `deepline runs export <run-id> --dataset result.rows --out rows.csv` unless you are doing deep table debugging.",
|
|
138
138
|
`Original error: ${errorMessage(error)}`
|
|
@@ -147,7 +147,7 @@ function writeCustomerDbCsv(result, outPath) {
|
|
|
147
147
|
const resolved = _path.resolve.call(void 0, outPath);
|
|
148
148
|
_fs.writeFileSync.call(void 0,
|
|
149
149
|
resolved,
|
|
150
|
-
|
|
150
|
+
_chunkWHKTRZ3Jjs.dataExportCsvString.call(void 0, customerDbRows(result), customerDbColumnNames(result)),
|
|
151
151
|
"utf-8"
|
|
152
152
|
);
|
|
153
153
|
return resolved;
|
|
@@ -188,7 +188,7 @@ function dbQueryExportEnvelope(input) {
|
|
|
188
188
|
function renderDbQueryResult(result, query, options) {
|
|
189
189
|
const { sql, maxRows, operationKey } = query;
|
|
190
190
|
const { format, out: outPath, json: explicitJsonOutput = false } = options;
|
|
191
|
-
const jsonOutput = explicitJsonOutput ||
|
|
191
|
+
const jsonOutput = explicitJsonOutput || _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, );
|
|
192
192
|
const toolPayload = JSON.stringify({
|
|
193
193
|
sql,
|
|
194
194
|
result_mode: "rows",
|
|
@@ -199,7 +199,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
199
199
|
if (format === "csv") {
|
|
200
200
|
if (outPath) {
|
|
201
201
|
const exportedPath = writeCustomerDbCsv(result, outPath);
|
|
202
|
-
|
|
202
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
203
203
|
dbQueryExportEnvelope({
|
|
204
204
|
result,
|
|
205
205
|
format,
|
|
@@ -215,7 +215,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
215
215
|
);
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
219
219
|
dbQueryExportEnvelope({
|
|
220
220
|
result,
|
|
221
221
|
format,
|
|
@@ -225,7 +225,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
225
225
|
}),
|
|
226
226
|
{
|
|
227
227
|
json: explicitJsonOutput,
|
|
228
|
-
text:
|
|
228
|
+
text: _chunkWHKTRZ3Jjs.dataExportCsvString.call(void 0,
|
|
229
229
|
customerDbRows(result),
|
|
230
230
|
customerDbColumnNames(result)
|
|
231
231
|
)
|
|
@@ -234,14 +234,14 @@ function renderDbQueryResult(result, query, options) {
|
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
236
|
if (format === "markdown") {
|
|
237
|
-
const content =
|
|
237
|
+
const content = _chunkWHKTRZ3Jjs.markdownTableFromRows.call(void 0,
|
|
238
238
|
customerDbRows(result),
|
|
239
239
|
customerDbColumnNames(result)
|
|
240
240
|
);
|
|
241
241
|
if (outPath) {
|
|
242
242
|
const exportedPath = _path.resolve.call(void 0, outPath);
|
|
243
243
|
_fs.writeFileSync.call(void 0, exportedPath, content, "utf-8");
|
|
244
|
-
|
|
244
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
245
245
|
dbQueryExportEnvelope({
|
|
246
246
|
result,
|
|
247
247
|
format,
|
|
@@ -257,7 +257,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
257
257
|
);
|
|
258
258
|
return;
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
261
261
|
dbQueryExportEnvelope({
|
|
262
262
|
result,
|
|
263
263
|
format,
|
|
@@ -272,7 +272,7 @@ function renderDbQueryResult(result, query, options) {
|
|
|
272
272
|
);
|
|
273
273
|
return;
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
276
276
|
{
|
|
277
277
|
...result,
|
|
278
278
|
next: {
|
|
@@ -346,9 +346,9 @@ async function runDbQueryCommand(options) {
|
|
|
346
346
|
...maxRows === void 0 ? {} : { maxRows },
|
|
347
347
|
...operationKey === void 0 ? {} : { operationKey }
|
|
348
348
|
};
|
|
349
|
-
const plan =
|
|
349
|
+
const plan = _chunkYGFQ7YSMjs.planCustomerDbQuery.call(void 0, query);
|
|
350
350
|
if (options.dryRun) {
|
|
351
|
-
|
|
351
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
352
352
|
{
|
|
353
353
|
dryRun: true,
|
|
354
354
|
...plan,
|
|
@@ -361,11 +361,11 @@ async function runDbQueryCommand(options) {
|
|
|
361
361
|
...out === void 0 ? {} : { file: _path.resolve.call(void 0, out) }
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
|
-
{ json: options.json ||
|
|
364
|
+
{ json: options.json || _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, ) }
|
|
365
365
|
);
|
|
366
366
|
return 0;
|
|
367
367
|
}
|
|
368
|
-
const client = new (0,
|
|
368
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
369
369
|
const result = await client.db.query(query);
|
|
370
370
|
renderDbQueryResult(result, query, {
|
|
371
371
|
format,
|
|
@@ -374,8 +374,8 @@ async function runDbQueryCommand(options) {
|
|
|
374
374
|
});
|
|
375
375
|
return 0;
|
|
376
376
|
} catch (error) {
|
|
377
|
-
if (error instanceof
|
|
378
|
-
|
|
377
|
+
if (error instanceof _chunkGHHLLEZKjs.CustomerDbQueryOutcomeUnknownError && (options.json || _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, ))) {
|
|
378
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
379
379
|
{
|
|
380
380
|
ok: false,
|
|
381
381
|
error: {
|
|
@@ -423,8 +423,8 @@ function dbRepairPlainText(result) {
|
|
|
423
423
|
async function handleDbRepair(args) {
|
|
424
424
|
const providerIndex = args.indexOf("--provider");
|
|
425
425
|
const provider = providerIndex >= 0 ? _optionalChain([args, 'access', _9 => _9[providerIndex + 1], 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]) : void 0;
|
|
426
|
-
const jsonOutput =
|
|
427
|
-
const client = new (0,
|
|
426
|
+
const jsonOutput = _chunkWHKTRZ3Jjs.argsWantJson.call(void 0, args);
|
|
427
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
428
428
|
let result;
|
|
429
429
|
try {
|
|
430
430
|
result = await client.repairIngestionStorage(
|
|
@@ -440,7 +440,7 @@ async function handleDbRepair(args) {
|
|
|
440
440
|
console.error(errorMessage2(error));
|
|
441
441
|
return 1;
|
|
442
442
|
}
|
|
443
|
-
|
|
443
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
444
444
|
{
|
|
445
445
|
command: "db repair",
|
|
446
446
|
status: result.status,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient,
|
|
6
6
|
planCustomerDbQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GTBS6LQH.mjs";
|
|
8
8
|
import "./chunk-CBVIJSHF.mjs";
|
|
9
9
|
import {
|
|
10
10
|
argsWantJson,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
printCommandEnvelope,
|
|
16
16
|
recordRows,
|
|
17
17
|
shouldEmitJson
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7DGZCMXQ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
CustomerDbQueryOutcomeUnknownError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MBI3BVSQ.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-SZCUJ4AL.mjs";
|
|
24
24
|
import "./chunk-6IKARAYD.mjs";
|
|
25
25
|
import {
|
|
26
26
|
DeeplineError
|