deepline 0.3.324 → 0.3.326
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/client.ts +23 -25
- package/dist/bundling-sources/sdk/src/compat.ts +11 -6
- package/dist/bundling-sources/sdk/src/db/query.ts +172 -0
- package/dist/bundling-sources/sdk/src/errors.ts +35 -0
- package/dist/bundling-sources/sdk/src/index.ts +13 -0
- package/dist/bundling-sources/sdk/src/play.ts +34 -31
- package/dist/bundling-sources/sdk/src/plays/authoring-graph-path.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +2 -1
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +189 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +84 -10
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +9 -0
- package/dist/cli/auth-6STWK6UK.js +31 -0
- package/dist/cli/{auth-6KWNR6AI.mjs → auth-VON5FFUK.mjs} +4 -4
- package/dist/cli/{billing-VQ2NUJLB.mjs → billing-X6JUEFRE.mjs} +4 -4
- package/dist/cli/{billing-CLLWHIAT.js → billing-YI4RZI2O.js} +70 -70
- package/dist/cli/{chunk-NC2ZXG2Y.js → chunk-3NGWGFVL.js} +26 -26
- package/dist/cli/{chunk-5CQ554BM.mjs → chunk-4AB4Y6FF.mjs} +1 -1
- package/dist/cli/{chunk-EXKRHZRG.js → chunk-4LNBSQM4.js} +5928 -5730
- package/dist/cli/{chunk-G4F2AIQ5.js → chunk-5NXHSRRE.js} +6 -6
- package/dist/cli/{chunk-XNL3SEMC.js → chunk-AFNEQ43J.js} +8 -3
- package/dist/cli/{chunk-XSEMQ4II.js → chunk-AGH6YP2T.js} +2 -1
- package/dist/cli/chunk-AID3OYVJ.js +8 -0
- package/dist/cli/{chunk-HHZDWBSQ.mjs → chunk-BQJVMKWL.mjs} +1 -1
- package/dist/cli/{chunk-TJGJTB5T.mjs → chunk-BR7GGTAE.mjs} +24 -1
- package/dist/cli/{chunk-IXYR65PW.js → chunk-BUYZEUY4.js} +1 -1
- package/dist/cli/{chunk-GROXVGGW.js → chunk-CUUHQ3AO.js} +6 -6
- package/dist/cli/{chunk-NIOFMRYW.mjs → chunk-DFDXKOLR.mjs} +98 -113
- package/dist/cli/{chunk-GMO3NBE2.js → chunk-EMZ7Y5SW.js} +70 -67
- package/dist/cli/chunk-GVESPYSY.mjs +234 -0
- package/dist/cli/{chunk-N5E66DP3.js → chunk-GVYKY6T6.js} +344 -254
- package/dist/cli/{chunk-EHSI2DMO.mjs → chunk-IQCCGOQH.mjs} +4 -20
- package/dist/cli/{chunk-76VKBPOC.mjs → chunk-JOA6IKDE.mjs} +7 -2
- package/dist/cli/{chunk-3ZKAKQYC.mjs → chunk-KLWBAQ5A.mjs} +104 -14
- package/dist/cli/{chunk-PAA4FYCF.js → chunk-KZ4PCK4O.js} +29 -45
- package/dist/cli/chunk-LVEDPCLJ.js +234 -0
- package/dist/cli/{chunk-I7RLL7LN.mjs → chunk-M7CPVMDB.mjs} +1 -1
- package/dist/cli/{chunk-2UQUOUAW.js → chunk-MDQZQ3NY.js} +2 -2
- package/dist/cli/{chunk-V5PA6TCT.js → chunk-MKHSZA2X.js} +48 -48
- package/dist/cli/{chunk-LHJKYMTS.mjs → chunk-MOBZS4F3.mjs} +1 -1
- package/dist/cli/chunk-OVDNJAJN.mjs +8 -0
- package/dist/cli/{chunk-QM2Z4FQF.js → chunk-T33W6JUJ.js} +6 -6
- package/dist/cli/{chunk-DO2VA5UP.mjs → chunk-TDSNAC3C.mjs} +2 -2
- package/dist/cli/{chunk-D5YJHGST.js → chunk-TXVOB5J2.js} +29 -6
- package/dist/cli/{chunk-TZZNI2A4.js → chunk-TZQMFWLF.js} +147 -162
- package/dist/cli/{chunk-NQJQ3CLX.mjs → chunk-VGKVLADU.mjs} +3 -3
- package/dist/cli/{chunk-U2RPP53P.mjs → chunk-VKXGOQG5.mjs} +5674 -5476
- package/dist/cli/{chunk-AKM5JVPG.mjs → chunk-W74E5ETE.mjs} +12 -9
- package/dist/cli/{chunk-7PZFGB7L.mjs → chunk-YIY74KUF.mjs} +2 -1
- package/dist/cli/{chunk-5QZFWY7C.mjs → chunk-ZRN6YOF2.mjs} +2 -2
- package/dist/cli/client-TEBW2P24.js +20 -0
- package/dist/cli/{client-VHUKTDAZ.mjs → client-ZMOKUNL2.mjs} +3 -3
- package/dist/cli/{csv-5MZY7HU5.js → csv-HZRKEI7J.js} +12 -12
- package/dist/cli/{csv-7DA4APB6.mjs → csv-IICJHJZ4.mjs} +3 -3
- package/dist/cli/{db-ICG3FUVE.js → db-TM5NZF73.js} +226 -149
- package/dist/cli/{db-7UPW3N5U.mjs → db-X4B7YFNY.mjs} +214 -137
- package/dist/cli/{describe-VDRY2JCE.js → describe-BDBARWZJ.js} +28 -27
- package/dist/cli/{describe-ZAPGM5ND.mjs → describe-GMVS3LFC.mjs} +12 -11
- package/dist/cli/{executions-TK3C2FAQ.mjs → executions-447ZJMN4.mjs} +4 -4
- package/dist/cli/{executions-D5GYCY3A.js → executions-QX25UOQM.js} +6 -6
- package/dist/cli/{feedback-PZAZZUXF.js → feedback-4IXUTBX7.js} +6 -6
- package/dist/cli/{feedback-T4EIP5QR.mjs → feedback-JB7HHIC6.mjs} +3 -3
- package/dist/cli/git-C7C7DTEH.js +23 -0
- package/dist/cli/{git-WBFWIVO5.mjs → git-VID6KGAA.mjs} +4 -4
- package/dist/cli/index.js +105 -87
- package/dist/cli/index.mjs +65 -47
- package/dist/cli/{legacy-noops-LRBJWXRK.js → legacy-noops-3FYTCOZO.js} +7 -7
- package/dist/cli/{legacy-noops-DUCK7OKN.mjs → legacy-noops-SGR3G5WS.mjs} +4 -4
- package/dist/cli/{monitors-WYH5AQIO.mjs → monitors-SH4FOMBM.mjs} +4 -4
- package/dist/cli/{monitors-7S2SL62G.js → monitors-SP52UHS4.js} +85 -85
- package/dist/cli/{org-XCSMLTUW.mjs → org-B32MMIQT.mjs} +4 -4
- package/dist/cli/{org-EQNGGHPV.js → org-UQMX7JOR.js} +60 -60
- package/dist/cli/play-UCIWBN7U.js +153 -0
- package/dist/cli/{play-A5ISFBJM.mjs → play-XTE4LUP7.mjs} +11 -10
- package/dist/cli/{providers-DR2CLD3N.js → providers-JNMJJ2OH.js} +7 -7
- package/dist/cli/{providers-KHTZFQ5I.mjs → providers-RWLN6FUR.mjs} +4 -4
- package/dist/cli/{quickstart-NIRWI6YU.js → quickstart-HK6WZ342.js} +5 -5
- package/dist/cli/{quickstart-KT4LKORA.mjs → quickstart-IDB3Y375.mjs} +3 -3
- package/dist/cli/{search-WCEXPBAT.mjs → search-6D3IFNPT.mjs} +5 -5
- package/dist/cli/search-LUZ2S7DH.js +26 -0
- package/dist/cli/{secrets-QSFEZGVE.js → secrets-JOQB57IE.js} +13 -13
- package/dist/cli/{secrets-TN7DW3QR.mjs → secrets-TZ53CQ3D.mjs} +4 -4
- package/dist/cli/{sessions-WSE5FN4H.mjs → sessions-4MBDC4EK.mjs} +4 -4
- package/dist/cli/{sessions-LJS6W67T.js → sessions-QSAICDXX.js} +5 -5
- package/dist/cli/{settings-FGS3VYJN.js → settings-OTOCW7L7.js} +74 -74
- package/dist/cli/{settings-Z3V53A6J.mjs → settings-RKQFMLDU.mjs} +7 -7
- package/dist/cli/{setup-GMH4VJS3.mjs → setup-2S5TNTUB.mjs} +6 -6
- package/dist/cli/{setup-ZA234HEY.js → setup-AKZUDVYY.js} +41 -41
- package/dist/cli/skills-26LASHZF.js +28 -0
- package/dist/cli/{skills-7G2RZMYH.mjs → skills-AGZXDLSA.mjs} +4 -4
- package/dist/cli/{tools-7EE4BGXO.mjs → tools-7Y6RD6FY.mjs} +8 -7
- package/dist/cli/tools-L5VIJQWX.js +39 -0
- package/dist/cli/{update-O5QEWS7K.mjs → update-M7YGF67I.mjs} +6 -6
- package/dist/cli/update-MNHF6M2F.js +28 -0
- package/dist/cli/{workflow-KE54RUTR.mjs → workflow-CTVE7S7W.mjs} +5 -5
- package/dist/cli/{workflow-M5PAAW3O.js → workflow-NGMY425T.js} +15 -15
- package/dist/{client-BV68GMPo.d.ts → client-DHq8dJ56.d.ts} +45 -11
- package/dist/{client-D9ACjiRC.d.mts → client-wiWPZhnI.d.mts} +45 -11
- package/dist/{compiler-manifest-BXcZ4P4W.d.mts → compiler-manifest-9TkZ_ykI.d.mts} +717 -711
- package/dist/{compiler-manifest-BXcZ4P4W.d.ts → compiler-manifest-9TkZ_ykI.d.ts} +717 -711
- package/dist/index-B-5_Xhud.d.mts +75 -0
- package/dist/index-ykksoEyR.d.ts +75 -0
- package/dist/index.d.mts +52 -13
- package/dist/index.d.ts +52 -13
- package/dist/index.js +92 -28
- package/dist/index.mjs +91 -27
- package/dist/install-integrity.json +91 -84
- package/dist/plays/bundle-play-file.d.mts +7 -75
- package/dist/plays/bundle-play-file.d.ts +7 -75
- package/dist/plays/bundle-play-file.mjs +1 -1
- 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 +1 -1
- package/dist/cli/auth-LKSTC3YV.js +0 -31
- package/dist/cli/chunk-OWJZUE3Y.mjs +0 -103
- package/dist/cli/chunk-SDK3ZA2C.js +0 -103
- package/dist/cli/client-WMSTRUGP.js +0 -20
- package/dist/cli/git-73N6EUZ3.js +0 -23
- package/dist/cli/play-CLC2Z5SO.js +0 -152
- package/dist/cli/search-DM7IQS5F.js +0 -26
- package/dist/cli/skills-6APAQV6W.js +0 -28
- package/dist/cli/tools-EPYUFWPB.js +0 -38
- package/dist/cli/update-FPVX3XJC.js +0 -28
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/plays/local-play-execution.ts
|
|
2
|
+
function importedNodes(graph) {
|
|
3
|
+
const visited = /* @__PURE__ */ new Set();
|
|
4
|
+
const visiting = /* @__PURE__ */ new Set();
|
|
5
|
+
const ordered = [];
|
|
6
|
+
const names = /* @__PURE__ */ new Map();
|
|
7
|
+
const visit = (node) => {
|
|
8
|
+
if (visiting.has(node.filePath))
|
|
9
|
+
throw new Error(`Recursive imported Play graph at ${node.filePath}.`);
|
|
10
|
+
if (visited.has(node.filePath)) return;
|
|
11
|
+
visiting.add(node.filePath);
|
|
12
|
+
for (const dependency of node.importedPlayDependencies) {
|
|
13
|
+
const child = graph.nodes.get(dependency.filePath);
|
|
14
|
+
if (!child)
|
|
15
|
+
throw new Error(
|
|
16
|
+
`Missing bundled Play dependency ${dependency.filePath}.`
|
|
17
|
+
);
|
|
18
|
+
visit(child);
|
|
19
|
+
}
|
|
20
|
+
visiting.delete(node.filePath);
|
|
21
|
+
visited.add(node.filePath);
|
|
22
|
+
if (node === graph.root) return;
|
|
23
|
+
if (!node.playName)
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Imported Play ${node.filePath} must export definePlay(...).`
|
|
26
|
+
);
|
|
27
|
+
const existing = names.get(node.playName);
|
|
28
|
+
if (existing !== void 0 && existing !== node.filePath)
|
|
29
|
+
throw new Error(
|
|
30
|
+
`Imported Play name ${node.playName} belongs to more than one source file.`
|
|
31
|
+
);
|
|
32
|
+
names.set(node.playName, node.filePath);
|
|
33
|
+
ordered.push(node);
|
|
34
|
+
};
|
|
35
|
+
visit(graph.root);
|
|
36
|
+
return ordered;
|
|
37
|
+
}
|
|
38
|
+
function planLocalPlayExecution(graph, input = {}) {
|
|
39
|
+
const imports = importedNodes(graph).map((node) => ({
|
|
40
|
+
name: node.playName,
|
|
41
|
+
artifactHash: node.artifact.artifactHash,
|
|
42
|
+
graphHash: node.artifact.graphHash
|
|
43
|
+
}));
|
|
44
|
+
return {
|
|
45
|
+
command: "plays run",
|
|
46
|
+
root: {
|
|
47
|
+
name: graph.root.playName,
|
|
48
|
+
artifactHash: graph.root.artifact.artifactHash,
|
|
49
|
+
publication: "unpublished"
|
|
50
|
+
},
|
|
51
|
+
importedPlays: imports.map((node) => ({
|
|
52
|
+
...node,
|
|
53
|
+
publication: "pinned"
|
|
54
|
+
})),
|
|
55
|
+
effects: {
|
|
56
|
+
cloudMutations: imports.length ? [
|
|
57
|
+
"store_imported_execution_artifacts",
|
|
58
|
+
"stage_files_if_present",
|
|
59
|
+
"register_unpublished_root_revision",
|
|
60
|
+
"start_run"
|
|
61
|
+
] : [
|
|
62
|
+
"stage_files_if_present",
|
|
63
|
+
"register_unpublished_root_revision",
|
|
64
|
+
"start_run"
|
|
65
|
+
],
|
|
66
|
+
localWrites: input.runIdFile ? ["bundle_cache", "run_identity_file"] : ["bundle_cache"],
|
|
67
|
+
creditSpending: "tool_calls_may_spend",
|
|
68
|
+
recovery: "inspect_or_resume_original_run_id"
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
async function pinLocalPlayImports(client, graph) {
|
|
73
|
+
const imports = importedNodes(graph);
|
|
74
|
+
if (imports.length === 0) return graph;
|
|
75
|
+
for (const node of [...imports, graph.root]) {
|
|
76
|
+
if (!node.compilerManifest)
|
|
77
|
+
throw new Error(`Missing compiler manifest for ${node.filePath}.`);
|
|
78
|
+
}
|
|
79
|
+
const nodes = new Map(graph.nodes);
|
|
80
|
+
const stored = /* @__PURE__ */ new Map();
|
|
81
|
+
const withPins = (node) => {
|
|
82
|
+
const closure = /* @__PURE__ */ new Map();
|
|
83
|
+
for (const dependency of node.importedPlayDependencies) {
|
|
84
|
+
const child = nodes.get(dependency.filePath);
|
|
85
|
+
const pointer = stored.get(dependency.filePath);
|
|
86
|
+
if (!pointer)
|
|
87
|
+
throw new Error(`Imported Play ${dependency.filePath} was not stored.`);
|
|
88
|
+
for (const [name, pin] of Object.entries(
|
|
89
|
+
_nullishCoalesce(child.artifact.importedPlayArtifacts, () => ( {}))
|
|
90
|
+
))
|
|
91
|
+
closure.set(name, pin);
|
|
92
|
+
closure.set(child.playName, pointer);
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
...node,
|
|
96
|
+
artifact: {
|
|
97
|
+
...node.artifact,
|
|
98
|
+
...closure.size ? { importedPlayArtifacts: Object.fromEntries(closure) } : {}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
for (const original of imports) {
|
|
103
|
+
const node = withPins(original);
|
|
104
|
+
const result = await client.registerPlayArtifact({
|
|
105
|
+
name: node.playName,
|
|
106
|
+
sourceCode: node.sourceCode,
|
|
107
|
+
sourceFiles: node.sourceFiles,
|
|
108
|
+
description: _nullishCoalesce(node.playDescription, () => ( void 0)),
|
|
109
|
+
artifact: node.artifact,
|
|
110
|
+
compilerManifest: node.compilerManifest,
|
|
111
|
+
publish: false,
|
|
112
|
+
artifactOnly: true
|
|
113
|
+
});
|
|
114
|
+
if (typeof result.artifactStorageKey !== "string" || !result.artifactStorageKey.trim())
|
|
115
|
+
throw new Error(
|
|
116
|
+
`No immutable artifact identity was returned for ${node.playName}.`
|
|
117
|
+
);
|
|
118
|
+
stored.set(node.filePath, {
|
|
119
|
+
artifactStorageKey: result.artifactStorageKey,
|
|
120
|
+
artifactHash: node.artifact.artifactHash,
|
|
121
|
+
graphHash: node.artifact.graphHash
|
|
122
|
+
});
|
|
123
|
+
nodes.set(node.filePath, node);
|
|
124
|
+
}
|
|
125
|
+
const root = withPins(graph.root);
|
|
126
|
+
nodes.set(root.filePath, root);
|
|
127
|
+
return { root, nodes };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ../plays/bootstrap-routes.ts
|
|
131
|
+
var DEEPLINE_TOOL_CATEGORIES = [
|
|
132
|
+
"company_search",
|
|
133
|
+
"people_search",
|
|
134
|
+
"people_enrich",
|
|
135
|
+
"email_finder",
|
|
136
|
+
"email_verify",
|
|
137
|
+
"phone_finder",
|
|
138
|
+
"phone_verify",
|
|
139
|
+
"identity_resolution",
|
|
140
|
+
"reverse_lookup",
|
|
141
|
+
"enrichment",
|
|
142
|
+
"batch",
|
|
143
|
+
"premium",
|
|
144
|
+
"free"
|
|
145
|
+
];
|
|
146
|
+
var PLAY_BOOTSTRAP_TEMPLATES = [
|
|
147
|
+
"people-list",
|
|
148
|
+
"company-list",
|
|
149
|
+
"people-email",
|
|
150
|
+
"people-phone",
|
|
151
|
+
"company-people",
|
|
152
|
+
"company-people-email",
|
|
153
|
+
"company-people-phone"
|
|
154
|
+
];
|
|
155
|
+
var PLAY_BOOTSTRAP_SOURCE_KINDS = [
|
|
156
|
+
"csv",
|
|
157
|
+
"play",
|
|
158
|
+
"provider",
|
|
159
|
+
"providers"
|
|
160
|
+
];
|
|
161
|
+
var PLAY_BOOTSTRAP_STAGE_KINDS = [
|
|
162
|
+
"play",
|
|
163
|
+
"provider",
|
|
164
|
+
"providers"
|
|
165
|
+
];
|
|
166
|
+
var PLAY_BOOTSTRAP_FINDER_KINDS = [
|
|
167
|
+
"email_finder",
|
|
168
|
+
"phone_finder"
|
|
169
|
+
];
|
|
170
|
+
var PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = "company_search";
|
|
171
|
+
var PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = "people_search";
|
|
172
|
+
var PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = {
|
|
173
|
+
email_finder: "email_finder",
|
|
174
|
+
phone_finder: "phone_finder"
|
|
175
|
+
};
|
|
176
|
+
var PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = {
|
|
177
|
+
email_finder: "email",
|
|
178
|
+
phone_finder: "phone"
|
|
179
|
+
};
|
|
180
|
+
var PLAY_BOOTSTRAP_CONTACT_FIELDS = [
|
|
181
|
+
"first_name",
|
|
182
|
+
"last_name",
|
|
183
|
+
"domain",
|
|
184
|
+
"company_name",
|
|
185
|
+
"linkedin_url",
|
|
186
|
+
"title",
|
|
187
|
+
"email",
|
|
188
|
+
"phone"
|
|
189
|
+
];
|
|
190
|
+
var PLAY_BOOTSTRAP_COMPANY_FIELDS = [
|
|
191
|
+
"domain",
|
|
192
|
+
"company_domain",
|
|
193
|
+
"company_name",
|
|
194
|
+
"linkedin_url",
|
|
195
|
+
"website"
|
|
196
|
+
];
|
|
197
|
+
function isPlayBootstrapFinderKind(value) {
|
|
198
|
+
return PLAY_BOOTSTRAP_FINDER_KINDS.includes(value);
|
|
199
|
+
}
|
|
200
|
+
function isPlayBootstrapTemplate(value) {
|
|
201
|
+
return PLAY_BOOTSTRAP_TEMPLATES.includes(value);
|
|
202
|
+
}
|
|
203
|
+
function formatPlayBootstrapFinderKinds() {
|
|
204
|
+
return PLAY_BOOTSTRAP_FINDER_KINDS.join("|");
|
|
205
|
+
}
|
|
206
|
+
function formatPlayBootstrapTemplates() {
|
|
207
|
+
return PLAY_BOOTSTRAP_TEMPLATES.join("|");
|
|
208
|
+
}
|
|
209
|
+
function formatPlayBootstrapFinderKindsForSentence() {
|
|
210
|
+
const allButLast = PLAY_BOOTSTRAP_FINDER_KINDS.slice(0, -1);
|
|
211
|
+
const last = PLAY_BOOTSTRAP_FINDER_KINDS.at(-1);
|
|
212
|
+
return `${allButLast.join(", ")} or ${last}`;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
exports.planLocalPlayExecution = planLocalPlayExecution; exports.pinLocalPlayImports = pinLocalPlayImports; exports.DEEPLINE_TOOL_CATEGORIES = DEEPLINE_TOOL_CATEGORIES; exports.PLAY_BOOTSTRAP_TEMPLATES = PLAY_BOOTSTRAP_TEMPLATES; exports.PLAY_BOOTSTRAP_SOURCE_KINDS = PLAY_BOOTSTRAP_SOURCE_KINDS; exports.PLAY_BOOTSTRAP_STAGE_KINDS = PLAY_BOOTSTRAP_STAGE_KINDS; exports.PLAY_BOOTSTRAP_FINDER_KINDS = PLAY_BOOTSTRAP_FINDER_KINDS; exports.PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY; exports.PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY; exports.PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER; exports.PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER; exports.PLAY_BOOTSTRAP_CONTACT_FIELDS = PLAY_BOOTSTRAP_CONTACT_FIELDS; exports.PLAY_BOOTSTRAP_COMPANY_FIELDS = PLAY_BOOTSTRAP_COMPANY_FIELDS; exports.isPlayBootstrapFinderKind = isPlayBootstrapFinderKind; exports.isPlayBootstrapTemplate = isPlayBootstrapTemplate; exports.formatPlayBootstrapFinderKinds = formatPlayBootstrapFinderKinds; exports.formatPlayBootstrapTemplates = formatPlayBootstrapTemplates; exports.formatPlayBootstrapFinderKindsForSentence = formatPlayBootstrapFinderKindsForSentence;
|
|
@@ -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 _chunkEMZ7Y5SWjs = require('./chunk-EMZ7Y5SW.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 = _chunkEMZ7Y5SWjs.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,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkCUUHQ3AOjs = require('./chunk-CUUHQ3AO.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkGROXVGGWjs = require('./chunk-GROXVGGW.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkTXVOB5J2js = require('./chunk-TXVOB5J2.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ function statusBannerLine(value) {
|
|
|
52
52
|
return `Service notice: ${banner.message}`;
|
|
53
53
|
}
|
|
54
54
|
function envFilePath(baseUrl) {
|
|
55
|
-
return
|
|
55
|
+
return _chunkTXVOB5J2js.hostEnvFilePath.call(void 0, baseUrl);
|
|
56
56
|
}
|
|
57
57
|
function normalizeAuthScope(value) {
|
|
58
58
|
if (!value || value === "global") return "global";
|
|
@@ -65,7 +65,7 @@ function parseAuthScope(args) {
|
|
|
65
65
|
}
|
|
66
66
|
function pendingClaimPath(baseUrl, scope) {
|
|
67
67
|
if (scope === "folder") {
|
|
68
|
-
const target =
|
|
68
|
+
const target = _chunkTXVOB5J2js.resolveProjectPinTarget.call(void 0, );
|
|
69
69
|
if (!target.ok) {
|
|
70
70
|
throw new Error(
|
|
71
71
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -75,10 +75,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
75
75
|
}
|
|
76
76
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
77
77
|
}
|
|
78
|
-
return `${
|
|
78
|
+
return `${_chunkTXVOB5J2js.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkTXVOB5J2js.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
82
82
|
}
|
|
83
83
|
function savePendingClaim(baseUrl, claim) {
|
|
84
84
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -180,21 +180,21 @@ function parseRegisterWaitMode(args) {
|
|
|
180
180
|
function shouldWaitForRegisterClaim(mode) {
|
|
181
181
|
if (mode === "yes") return true;
|
|
182
182
|
if (mode === "no") return false;
|
|
183
|
-
return
|
|
183
|
+
return _chunkTXVOB5J2js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
184
184
|
}
|
|
185
185
|
function saveEnvValues(values, baseUrl, scope) {
|
|
186
186
|
const filtered = {
|
|
187
|
-
...values[
|
|
188
|
-
...values[
|
|
189
|
-
...values[
|
|
190
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
187
|
+
...values[_chunkTXVOB5J2js.HOST_URL_ENV] ? { [_chunkTXVOB5J2js.HOST_URL_ENV]: values[_chunkTXVOB5J2js.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkTXVOB5J2js.API_KEY_ENV] ? { [_chunkTXVOB5J2js.API_KEY_ENV]: values[_chunkTXVOB5J2js.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkTXVOB5J2js.ACTIVE_ORG_ID_ENV] ? { [_chunkTXVOB5J2js.ACTIVE_ORG_ID_ENV]: values[_chunkTXVOB5J2js.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkTXVOB5J2js.ACTIVE_ORG_NAME_ENV) ? { [_chunkTXVOB5J2js.ACTIVE_ORG_NAME_ENV]: values[_chunkTXVOB5J2js.ACTIVE_ORG_NAME_ENV] } : {},
|
|
191
191
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkTXVOB5J2js.FEATURES_ENV) ? { [_chunkTXVOB5J2js.FEATURES_ENV]: values[_chunkTXVOB5J2js.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkTXVOB5J2js.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkTXVOB5J2js.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function activeOrgEnvValues(data) {
|
|
@@ -202,21 +202,21 @@ function activeOrgEnvValues(data) {
|
|
|
202
202
|
if (!orgId) return {};
|
|
203
203
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
204
204
|
return {
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
...
|
|
205
|
+
[_chunkTXVOB5J2js.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkTXVOB5J2js.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkTXVOB5J2js.featureEnvValues.call(void 0, data)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
211
211
|
const headers = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkTXVOB5J2js.SDK_VERSION}`,
|
|
214
214
|
"X-Deepline-Client-Family": "sdk",
|
|
215
215
|
"X-Deepline-CLI-Family": "sdk",
|
|
216
|
-
"X-Deepline-Agent-Runtime":
|
|
217
|
-
"X-Deepline-CLI-Version":
|
|
218
|
-
"X-Deepline-SDK-Version":
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
216
|
+
"X-Deepline-Agent-Runtime": _chunkTXVOB5J2js.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkTXVOB5J2js.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkTXVOB5J2js.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkTXVOB5J2js.SDK_API_CONTRACT
|
|
220
220
|
};
|
|
221
221
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
222
222
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -254,7 +254,7 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
254
254
|
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
255
255
|
}
|
|
256
256
|
async function reportSetupCompleted(input) {
|
|
257
|
-
const apiKey = input.authScope === "folder" ?
|
|
257
|
+
const apiKey = input.authScope === "folder" ? _chunkTXVOB5J2js.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkTXVOB5J2js.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
258
258
|
if (!apiKey) return;
|
|
259
259
|
try {
|
|
260
260
|
await httpJson(
|
|
@@ -351,7 +351,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
async function handleRegister(args) {
|
|
354
|
-
const baseUrl =
|
|
354
|
+
const baseUrl = _chunkTXVOB5J2js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
355
355
|
let orgName = "";
|
|
356
356
|
let orgId = "";
|
|
357
357
|
let agentName = "";
|
|
@@ -406,19 +406,19 @@ async function handleRegister(args) {
|
|
|
406
406
|
});
|
|
407
407
|
saveEnvValues(
|
|
408
408
|
{
|
|
409
|
-
[
|
|
409
|
+
[_chunkTXVOB5J2js.HOST_URL_ENV]: baseUrl
|
|
410
410
|
},
|
|
411
411
|
baseUrl,
|
|
412
412
|
authScope
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
if (claimUrl) {
|
|
416
|
-
const shouldOpen = waitMode !== "no" &&
|
|
416
|
+
const shouldOpen = waitMode !== "no" && _chunkTXVOB5J2js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
417
417
|
console.log(
|
|
418
418
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
419
419
|
);
|
|
420
420
|
console.log(` ${claimUrl}`);
|
|
421
|
-
if (shouldOpen)
|
|
421
|
+
if (shouldOpen) _chunkCUUHQ3AOjs.openInBrowser.call(void 0, claimUrl);
|
|
422
422
|
}
|
|
423
423
|
if (data.cli_message) {
|
|
424
424
|
console.log(String(data.cli_message));
|
|
@@ -461,8 +461,8 @@ async function handleRegister(args) {
|
|
|
461
461
|
if (apiKey) {
|
|
462
462
|
saveEnvValues(
|
|
463
463
|
{
|
|
464
|
-
[
|
|
465
|
-
[
|
|
464
|
+
[_chunkTXVOB5J2js.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkTXVOB5J2js.API_KEY_ENV]: apiKey,
|
|
466
466
|
...activeOrgEnvValues(statusData)
|
|
467
467
|
},
|
|
468
468
|
baseUrl,
|
|
@@ -484,7 +484,7 @@ async function handleRegister(args) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
async function handleWait(args) {
|
|
487
|
-
const baseUrl =
|
|
487
|
+
const baseUrl = _chunkTXVOB5J2js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
488
488
|
let timeoutSeconds = 300;
|
|
489
489
|
let requestedScope;
|
|
490
490
|
if (args.includes("--auth-scope")) {
|
|
@@ -508,7 +508,7 @@ async function handleWait(args) {
|
|
|
508
508
|
const authScope = resumed.scope;
|
|
509
509
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _11 => _11.claimToken]), () => ( ""));
|
|
510
510
|
if (!pendingClaim) {
|
|
511
|
-
const scopedApiKey = authScope === "folder" ?
|
|
511
|
+
const scopedApiKey = authScope === "folder" ? _chunkTXVOB5J2js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkTXVOB5J2js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
512
512
|
if (scopedApiKey) {
|
|
513
513
|
console.log("Already connected.");
|
|
514
514
|
return EXIT_OK;
|
|
@@ -551,8 +551,8 @@ async function handleWait(args) {
|
|
|
551
551
|
if (apiKey) {
|
|
552
552
|
saveEnvValues(
|
|
553
553
|
{
|
|
554
|
-
[
|
|
555
|
-
[
|
|
554
|
+
[_chunkTXVOB5J2js.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkTXVOB5J2js.API_KEY_ENV]: apiKey,
|
|
556
556
|
...activeOrgEnvValues(data)
|
|
557
557
|
},
|
|
558
558
|
baseUrl,
|
|
@@ -576,9 +576,9 @@ async function handleWait(args) {
|
|
|
576
576
|
return EXIT_AUTH;
|
|
577
577
|
}
|
|
578
578
|
async function handleStatus(args) {
|
|
579
|
-
const baseUrl =
|
|
579
|
+
const baseUrl = _chunkTXVOB5J2js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkCUUHQ3AOjs.argsWantJson.call(void 0, args);
|
|
582
582
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
583
583
|
let authScope = null;
|
|
584
584
|
if (hasExplicitAuthScope) {
|
|
@@ -618,14 +618,14 @@ async function handleStatus(args) {
|
|
|
618
618
|
};
|
|
619
619
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
620
620
|
}
|
|
621
|
-
const apiKey = authScope === "folder" ?
|
|
621
|
+
const apiKey = authScope === "folder" ? _chunkTXVOB5J2js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkTXVOB5J2js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkTXVOB5J2js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
622
622
|
if (!apiKey) {
|
|
623
623
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
624
624
|
baseUrl,
|
|
625
625
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
626
626
|
);
|
|
627
627
|
if (pendingClaim) {
|
|
628
|
-
|
|
628
|
+
_chunkCUUHQ3AOjs.printCommandEnvelope.call(void 0,
|
|
629
629
|
{
|
|
630
630
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
631
631
|
status: "pending",
|
|
@@ -646,7 +646,7 @@ async function handleStatus(args) {
|
|
|
646
646
|
);
|
|
647
647
|
return EXIT_OK;
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
_chunkCUUHQ3AOjs.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -682,7 +682,7 @@ async function handleStatus(args) {
|
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
if (status === 401 || status === 403) {
|
|
685
|
-
|
|
685
|
+
_chunkCUUHQ3AOjs.printCommandEnvelope.call(void 0,
|
|
686
686
|
{
|
|
687
687
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
688
688
|
status: "unauthorized",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
console.error(`Auth status error (status ${status}).`);
|
|
713
713
|
return EXIT_SERVER;
|
|
714
714
|
}
|
|
715
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
715
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkTXVOB5J2js.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
716
716
|
clearSatisfiedPendingClaim(
|
|
717
717
|
baseUrl,
|
|
718
718
|
resolvedAuthScope,
|
|
@@ -740,28 +740,28 @@ async function handleStatus(args) {
|
|
|
740
740
|
if (apiKeyResp) {
|
|
741
741
|
saveEnvValues(
|
|
742
742
|
{
|
|
743
|
-
[
|
|
744
|
-
[
|
|
743
|
+
[_chunkTXVOB5J2js.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunkTXVOB5J2js.API_KEY_ENV]: apiKeyResp,
|
|
745
745
|
...activeOrgEnvValues(data)
|
|
746
746
|
},
|
|
747
747
|
baseUrl,
|
|
748
748
|
resolvedAuthScope
|
|
749
749
|
);
|
|
750
750
|
if (resolvedAuthScope === "folder") {
|
|
751
|
-
const target =
|
|
751
|
+
const target = _chunkTXVOB5J2js.resolveProjectPinTarget.call(void 0, );
|
|
752
752
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
753
753
|
} else {
|
|
754
754
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
758
|
-
saveEnvValues(
|
|
757
|
+
} else if (resolvedAuthScope === "folder" || _chunkTXVOB5J2js.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunkTXVOB5J2js.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkCUUHQ3AOjs.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunkTXVOB5J2js.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunkTXVOB5J2js.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -1,20 +1,20 @@
|
|
|
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 _chunkGVYKY6T6js = require('./chunk-GVYKY6T6.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCUUHQ3AOjs = require('./chunk-CUUHQ3AO.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkTXVOB5J2js = require('./chunk-TXVOB5J2.js');
|
|
11
11
|
|
|
12
12
|
// src/cli/search-ref.ts
|
|
13
13
|
var _fs = require('fs');
|
|
14
14
|
var _path = require('path');
|
|
15
15
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
16
16
|
function lastSearchPath() {
|
|
17
|
-
return _path.join.call(void 0,
|
|
17
|
+
return _path.join.call(void 0, _chunkTXVOB5J2js.sdkCliStateDirPath.call(void 0, _chunkTXVOB5J2js.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
18
18
|
}
|
|
19
19
|
function rememberSearchRef(searchRef) {
|
|
20
20
|
try {
|
|
@@ -97,7 +97,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
97
97
|
console.error(USAGE);
|
|
98
98
|
return 1;
|
|
99
99
|
}
|
|
100
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
100
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunkGVYKY6T6js.DeeplineClient)().search({
|
|
101
101
|
query,
|
|
102
102
|
types,
|
|
103
103
|
exclude,
|
|
@@ -111,7 +111,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
111
111
|
});
|
|
112
112
|
if (searchRef) rememberSearchRef(searchRef);
|
|
113
113
|
pointAtDescribe(result);
|
|
114
|
-
|
|
114
|
+
_chunkCUUHQ3AOjs.printCommandEnvelope.call(void 0, result, {
|
|
115
115
|
json: options.json === true
|
|
116
116
|
});
|
|
117
117
|
return 0;
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M7CPVMDB.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BR7GGTAE.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|