conductor-node-mcp 12.42.0 → 12.43.0
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/code-tool.d.mts +44 -2
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +44 -2
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +22 -153
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +22 -117
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +3 -0
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +3 -0
- package/docs-search-tool.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool.ts +32 -148
- package/src/docs-search-tool.ts +7 -0
- package/src/server.ts +1 -1
- package/code-tool-paths.cjs +0 -6
- package/code-tool-paths.cjs.map +0 -1
- package/code-tool-paths.d.cts +0 -2
- package/code-tool-paths.d.cts.map +0 -1
- package/code-tool-worker.d.mts +0 -5
- package/code-tool-worker.d.mts.map +0 -1
- package/code-tool-worker.d.ts +0 -5
- package/code-tool-worker.d.ts.map +0 -1
- package/code-tool-worker.js +0 -440
- package/code-tool-worker.js.map +0 -1
- package/code-tool-worker.mjs +0 -435
- package/code-tool-worker.mjs.map +0 -1
- package/src/code-tool-paths.cts +0 -3
- package/src/code-tool-worker.ts +0 -488
package/code-tool-worker.js
DELETED
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
-
const node_util_1 = __importDefault(require("node:util"));
|
|
9
|
-
const fuse_js_1 = __importDefault(require("fuse.js"));
|
|
10
|
-
const typescript_1 = __importDefault(require("typescript"));
|
|
11
|
-
const conductor_node_1 = require("conductor-node");
|
|
12
|
-
function getRunFunctionSource(code) {
|
|
13
|
-
const sourceFile = typescript_1.default.createSourceFile('code.ts', code, typescript_1.default.ScriptTarget.Latest, true);
|
|
14
|
-
const printer = typescript_1.default.createPrinter();
|
|
15
|
-
for (const statement of sourceFile.statements) {
|
|
16
|
-
// Check for top-level function declarations
|
|
17
|
-
if (typescript_1.default.isFunctionDeclaration(statement)) {
|
|
18
|
-
if (statement.name?.text === 'run') {
|
|
19
|
-
return {
|
|
20
|
-
type: 'declaration',
|
|
21
|
-
client: statement.parameters[0]?.name.getText(),
|
|
22
|
-
code: printer.printNode(typescript_1.default.EmitHint.Unspecified, statement.body, sourceFile),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
// Check for variable declarations: const run = () => {} or const run = function() {}
|
|
27
|
-
if (typescript_1.default.isVariableStatement(statement)) {
|
|
28
|
-
for (const declaration of statement.declarationList.declarations) {
|
|
29
|
-
if (typescript_1.default.isIdentifier(declaration.name) &&
|
|
30
|
-
declaration.name.text === 'run' &&
|
|
31
|
-
// Check if it's initialized with a function
|
|
32
|
-
declaration.initializer &&
|
|
33
|
-
(typescript_1.default.isFunctionExpression(declaration.initializer) || typescript_1.default.isArrowFunction(declaration.initializer))) {
|
|
34
|
-
return {
|
|
35
|
-
type: 'expression',
|
|
36
|
-
client: declaration.initializer.parameters[0]?.name.getText(),
|
|
37
|
-
code: printer.printNode(typescript_1.default.EmitHint.Unspecified, declaration.initializer, sourceFile),
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
function getTSDiagnostics(code) {
|
|
46
|
-
const functionSource = getRunFunctionSource(code);
|
|
47
|
-
const codeWithImport = [
|
|
48
|
-
'import { Conductor } from "conductor-node";',
|
|
49
|
-
functionSource.type === 'declaration' ?
|
|
50
|
-
`async function run(${functionSource.client}: Conductor)`
|
|
51
|
-
: `const run: (${functionSource.client}: Conductor) => Promise<unknown> =`,
|
|
52
|
-
functionSource.code,
|
|
53
|
-
].join('\n');
|
|
54
|
-
const sourcePath = node_path_1.default.resolve('code.ts');
|
|
55
|
-
const ast = typescript_1.default.createSourceFile(sourcePath, codeWithImport, typescript_1.default.ScriptTarget.Latest, true);
|
|
56
|
-
const options = typescript_1.default.getDefaultCompilerOptions();
|
|
57
|
-
options.target = typescript_1.default.ScriptTarget.Latest;
|
|
58
|
-
options.module = typescript_1.default.ModuleKind.NodeNext;
|
|
59
|
-
options.moduleResolution = typescript_1.default.ModuleResolutionKind.NodeNext;
|
|
60
|
-
const host = typescript_1.default.createCompilerHost(options, true);
|
|
61
|
-
const newHost = {
|
|
62
|
-
...host,
|
|
63
|
-
getSourceFile: (...args) => {
|
|
64
|
-
if (node_path_1.default.resolve(args[0]) === sourcePath) {
|
|
65
|
-
return ast;
|
|
66
|
-
}
|
|
67
|
-
return host.getSourceFile(...args);
|
|
68
|
-
},
|
|
69
|
-
readFile: (...args) => {
|
|
70
|
-
if (node_path_1.default.resolve(args[0]) === sourcePath) {
|
|
71
|
-
return codeWithImport;
|
|
72
|
-
}
|
|
73
|
-
return host.readFile(...args);
|
|
74
|
-
},
|
|
75
|
-
fileExists: (...args) => {
|
|
76
|
-
if (node_path_1.default.resolve(args[0]) === sourcePath) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
return host.fileExists(...args);
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
const program = typescript_1.default.createProgram({
|
|
83
|
-
options,
|
|
84
|
-
rootNames: [sourcePath],
|
|
85
|
-
host: newHost,
|
|
86
|
-
});
|
|
87
|
-
const diagnostics = typescript_1.default.getPreEmitDiagnostics(program, ast);
|
|
88
|
-
return diagnostics.map((d) => {
|
|
89
|
-
const message = typescript_1.default.flattenDiagnosticMessageText(d.messageText, '\n');
|
|
90
|
-
if (!d.file || !d.start)
|
|
91
|
-
return `- ${message}`;
|
|
92
|
-
const { line: tsLine } = typescript_1.default.getLineAndCharacterOfPosition(d.file, d.start);
|
|
93
|
-
// We add two lines in the beginning, for the client import and the function declaration.
|
|
94
|
-
// So the actual (zero-based) line number is tsLine - 2.
|
|
95
|
-
const lineNumber = tsLine - 2;
|
|
96
|
-
const line = code.split('\n').at(lineNumber)?.trim();
|
|
97
|
-
return line ? `- ${message}\n at line ${lineNumber + 1}\n ${line}` : `- ${message}`;
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
const fuse = new fuse_js_1.default([
|
|
101
|
-
'conductor.authSessions.create',
|
|
102
|
-
'conductor.endUsers.create',
|
|
103
|
-
'conductor.endUsers.delete',
|
|
104
|
-
'conductor.endUsers.list',
|
|
105
|
-
'conductor.endUsers.passthrough',
|
|
106
|
-
'conductor.endUsers.retrieve',
|
|
107
|
-
'conductor.qbd.healthCheck',
|
|
108
|
-
'conductor.qbd.accountTaxLines.list',
|
|
109
|
-
'conductor.qbd.accounts.create',
|
|
110
|
-
'conductor.qbd.accounts.list',
|
|
111
|
-
'conductor.qbd.accounts.retrieve',
|
|
112
|
-
'conductor.qbd.accounts.update',
|
|
113
|
-
'conductor.qbd.billCheckPayments.create',
|
|
114
|
-
'conductor.qbd.billCheckPayments.delete',
|
|
115
|
-
'conductor.qbd.billCheckPayments.list',
|
|
116
|
-
'conductor.qbd.billCheckPayments.retrieve',
|
|
117
|
-
'conductor.qbd.billCheckPayments.update',
|
|
118
|
-
'conductor.qbd.billCreditCardPayments.create',
|
|
119
|
-
'conductor.qbd.billCreditCardPayments.delete',
|
|
120
|
-
'conductor.qbd.billCreditCardPayments.list',
|
|
121
|
-
'conductor.qbd.billCreditCardPayments.retrieve',
|
|
122
|
-
'conductor.qbd.bills.create',
|
|
123
|
-
'conductor.qbd.bills.delete',
|
|
124
|
-
'conductor.qbd.bills.list',
|
|
125
|
-
'conductor.qbd.bills.retrieve',
|
|
126
|
-
'conductor.qbd.bills.update',
|
|
127
|
-
'conductor.qbd.buildAssemblies.create',
|
|
128
|
-
'conductor.qbd.buildAssemblies.delete',
|
|
129
|
-
'conductor.qbd.buildAssemblies.list',
|
|
130
|
-
'conductor.qbd.buildAssemblies.retrieve',
|
|
131
|
-
'conductor.qbd.buildAssemblies.update',
|
|
132
|
-
'conductor.qbd.checks.create',
|
|
133
|
-
'conductor.qbd.checks.delete',
|
|
134
|
-
'conductor.qbd.checks.list',
|
|
135
|
-
'conductor.qbd.checks.retrieve',
|
|
136
|
-
'conductor.qbd.checks.update',
|
|
137
|
-
'conductor.qbd.classes.create',
|
|
138
|
-
'conductor.qbd.classes.list',
|
|
139
|
-
'conductor.qbd.classes.retrieve',
|
|
140
|
-
'conductor.qbd.classes.update',
|
|
141
|
-
'conductor.qbd.company.retrieve',
|
|
142
|
-
'conductor.qbd.creditCardCharges.create',
|
|
143
|
-
'conductor.qbd.creditCardCharges.delete',
|
|
144
|
-
'conductor.qbd.creditCardCharges.list',
|
|
145
|
-
'conductor.qbd.creditCardCharges.retrieve',
|
|
146
|
-
'conductor.qbd.creditCardCharges.update',
|
|
147
|
-
'conductor.qbd.creditCardCredits.create',
|
|
148
|
-
'conductor.qbd.creditCardCredits.delete',
|
|
149
|
-
'conductor.qbd.creditCardCredits.list',
|
|
150
|
-
'conductor.qbd.creditCardCredits.retrieve',
|
|
151
|
-
'conductor.qbd.creditCardCredits.update',
|
|
152
|
-
'conductor.qbd.creditCardRefunds.create',
|
|
153
|
-
'conductor.qbd.creditCardRefunds.delete',
|
|
154
|
-
'conductor.qbd.creditCardRefunds.list',
|
|
155
|
-
'conductor.qbd.creditCardRefunds.retrieve',
|
|
156
|
-
'conductor.qbd.creditMemos.create',
|
|
157
|
-
'conductor.qbd.creditMemos.delete',
|
|
158
|
-
'conductor.qbd.creditMemos.list',
|
|
159
|
-
'conductor.qbd.creditMemos.retrieve',
|
|
160
|
-
'conductor.qbd.creditMemos.update',
|
|
161
|
-
'conductor.qbd.currencies.create',
|
|
162
|
-
'conductor.qbd.currencies.list',
|
|
163
|
-
'conductor.qbd.currencies.retrieve',
|
|
164
|
-
'conductor.qbd.currencies.update',
|
|
165
|
-
'conductor.qbd.customerTypes.create',
|
|
166
|
-
'conductor.qbd.customerTypes.list',
|
|
167
|
-
'conductor.qbd.customerTypes.retrieve',
|
|
168
|
-
'conductor.qbd.customers.create',
|
|
169
|
-
'conductor.qbd.customers.list',
|
|
170
|
-
'conductor.qbd.customers.retrieve',
|
|
171
|
-
'conductor.qbd.customers.update',
|
|
172
|
-
'conductor.qbd.dateDrivenTerms.create',
|
|
173
|
-
'conductor.qbd.dateDrivenTerms.list',
|
|
174
|
-
'conductor.qbd.dateDrivenTerms.retrieve',
|
|
175
|
-
'conductor.qbd.deletedListObjects.list',
|
|
176
|
-
'conductor.qbd.deletedTransactions.list',
|
|
177
|
-
'conductor.qbd.discountItems.create',
|
|
178
|
-
'conductor.qbd.discountItems.list',
|
|
179
|
-
'conductor.qbd.discountItems.retrieve',
|
|
180
|
-
'conductor.qbd.discountItems.update',
|
|
181
|
-
'conductor.qbd.employees.create',
|
|
182
|
-
'conductor.qbd.employees.list',
|
|
183
|
-
'conductor.qbd.employees.retrieve',
|
|
184
|
-
'conductor.qbd.employees.update',
|
|
185
|
-
'conductor.qbd.estimates.create',
|
|
186
|
-
'conductor.qbd.estimates.delete',
|
|
187
|
-
'conductor.qbd.estimates.list',
|
|
188
|
-
'conductor.qbd.estimates.retrieve',
|
|
189
|
-
'conductor.qbd.estimates.update',
|
|
190
|
-
'conductor.qbd.inventoryAdjustments.create',
|
|
191
|
-
'conductor.qbd.inventoryAdjustments.delete',
|
|
192
|
-
'conductor.qbd.inventoryAdjustments.list',
|
|
193
|
-
'conductor.qbd.inventoryAdjustments.retrieve',
|
|
194
|
-
'conductor.qbd.inventoryAdjustments.update',
|
|
195
|
-
'conductor.qbd.inventoryAssemblyItems.create',
|
|
196
|
-
'conductor.qbd.inventoryAssemblyItems.list',
|
|
197
|
-
'conductor.qbd.inventoryAssemblyItems.retrieve',
|
|
198
|
-
'conductor.qbd.inventoryAssemblyItems.update',
|
|
199
|
-
'conductor.qbd.inventoryItems.create',
|
|
200
|
-
'conductor.qbd.inventoryItems.list',
|
|
201
|
-
'conductor.qbd.inventoryItems.retrieve',
|
|
202
|
-
'conductor.qbd.inventoryItems.update',
|
|
203
|
-
'conductor.qbd.inventorySites.create',
|
|
204
|
-
'conductor.qbd.inventorySites.list',
|
|
205
|
-
'conductor.qbd.inventorySites.retrieve',
|
|
206
|
-
'conductor.qbd.inventorySites.update',
|
|
207
|
-
'conductor.qbd.invoices.create',
|
|
208
|
-
'conductor.qbd.invoices.delete',
|
|
209
|
-
'conductor.qbd.invoices.list',
|
|
210
|
-
'conductor.qbd.invoices.retrieve',
|
|
211
|
-
'conductor.qbd.invoices.update',
|
|
212
|
-
'conductor.qbd.itemGroups.create',
|
|
213
|
-
'conductor.qbd.itemGroups.list',
|
|
214
|
-
'conductor.qbd.itemGroups.retrieve',
|
|
215
|
-
'conductor.qbd.itemGroups.update',
|
|
216
|
-
'conductor.qbd.itemReceipts.create',
|
|
217
|
-
'conductor.qbd.itemReceipts.delete',
|
|
218
|
-
'conductor.qbd.itemReceipts.list',
|
|
219
|
-
'conductor.qbd.itemReceipts.retrieve',
|
|
220
|
-
'conductor.qbd.itemReceipts.update',
|
|
221
|
-
'conductor.qbd.itemSites.list',
|
|
222
|
-
'conductor.qbd.itemSites.retrieve',
|
|
223
|
-
'conductor.qbd.journalEntries.create',
|
|
224
|
-
'conductor.qbd.journalEntries.delete',
|
|
225
|
-
'conductor.qbd.journalEntries.list',
|
|
226
|
-
'conductor.qbd.journalEntries.retrieve',
|
|
227
|
-
'conductor.qbd.journalEntries.update',
|
|
228
|
-
'conductor.qbd.nonInventoryItems.create',
|
|
229
|
-
'conductor.qbd.nonInventoryItems.list',
|
|
230
|
-
'conductor.qbd.nonInventoryItems.retrieve',
|
|
231
|
-
'conductor.qbd.nonInventoryItems.update',
|
|
232
|
-
'conductor.qbd.otherChargeItems.create',
|
|
233
|
-
'conductor.qbd.otherChargeItems.list',
|
|
234
|
-
'conductor.qbd.otherChargeItems.retrieve',
|
|
235
|
-
'conductor.qbd.otherChargeItems.update',
|
|
236
|
-
'conductor.qbd.otherNames.create',
|
|
237
|
-
'conductor.qbd.otherNames.list',
|
|
238
|
-
'conductor.qbd.otherNames.retrieve',
|
|
239
|
-
'conductor.qbd.otherNames.update',
|
|
240
|
-
'conductor.qbd.paymentMethods.create',
|
|
241
|
-
'conductor.qbd.paymentMethods.list',
|
|
242
|
-
'conductor.qbd.paymentMethods.retrieve',
|
|
243
|
-
'conductor.qbd.payrollWageItems.create',
|
|
244
|
-
'conductor.qbd.payrollWageItems.list',
|
|
245
|
-
'conductor.qbd.payrollWageItems.retrieve',
|
|
246
|
-
'conductor.qbd.preferences.retrieve',
|
|
247
|
-
'conductor.qbd.priceLevels.create',
|
|
248
|
-
'conductor.qbd.priceLevels.list',
|
|
249
|
-
'conductor.qbd.priceLevels.retrieve',
|
|
250
|
-
'conductor.qbd.priceLevels.update',
|
|
251
|
-
'conductor.qbd.purchaseOrders.create',
|
|
252
|
-
'conductor.qbd.purchaseOrders.delete',
|
|
253
|
-
'conductor.qbd.purchaseOrders.list',
|
|
254
|
-
'conductor.qbd.purchaseOrders.retrieve',
|
|
255
|
-
'conductor.qbd.purchaseOrders.update',
|
|
256
|
-
'conductor.qbd.receivePayments.create',
|
|
257
|
-
'conductor.qbd.receivePayments.delete',
|
|
258
|
-
'conductor.qbd.receivePayments.list',
|
|
259
|
-
'conductor.qbd.receivePayments.retrieve',
|
|
260
|
-
'conductor.qbd.receivePayments.update',
|
|
261
|
-
'conductor.qbd.salesOrders.create',
|
|
262
|
-
'conductor.qbd.salesOrders.delete',
|
|
263
|
-
'conductor.qbd.salesOrders.list',
|
|
264
|
-
'conductor.qbd.salesOrders.retrieve',
|
|
265
|
-
'conductor.qbd.salesOrders.update',
|
|
266
|
-
'conductor.qbd.salesReceipts.create',
|
|
267
|
-
'conductor.qbd.salesReceipts.delete',
|
|
268
|
-
'conductor.qbd.salesReceipts.list',
|
|
269
|
-
'conductor.qbd.salesReceipts.retrieve',
|
|
270
|
-
'conductor.qbd.salesReceipts.update',
|
|
271
|
-
'conductor.qbd.salesRepresentatives.create',
|
|
272
|
-
'conductor.qbd.salesRepresentatives.list',
|
|
273
|
-
'conductor.qbd.salesRepresentatives.retrieve',
|
|
274
|
-
'conductor.qbd.salesRepresentatives.update',
|
|
275
|
-
'conductor.qbd.salesTaxCodes.create',
|
|
276
|
-
'conductor.qbd.salesTaxCodes.list',
|
|
277
|
-
'conductor.qbd.salesTaxCodes.retrieve',
|
|
278
|
-
'conductor.qbd.salesTaxCodes.update',
|
|
279
|
-
'conductor.qbd.salesTaxItems.create',
|
|
280
|
-
'conductor.qbd.salesTaxItems.list',
|
|
281
|
-
'conductor.qbd.salesTaxItems.retrieve',
|
|
282
|
-
'conductor.qbd.salesTaxItems.update',
|
|
283
|
-
'conductor.qbd.serviceItems.create',
|
|
284
|
-
'conductor.qbd.serviceItems.list',
|
|
285
|
-
'conductor.qbd.serviceItems.retrieve',
|
|
286
|
-
'conductor.qbd.serviceItems.update',
|
|
287
|
-
'conductor.qbd.standardTerms.create',
|
|
288
|
-
'conductor.qbd.standardTerms.list',
|
|
289
|
-
'conductor.qbd.standardTerms.retrieve',
|
|
290
|
-
'conductor.qbd.subtotalItems.create',
|
|
291
|
-
'conductor.qbd.subtotalItems.list',
|
|
292
|
-
'conductor.qbd.subtotalItems.retrieve',
|
|
293
|
-
'conductor.qbd.subtotalItems.update',
|
|
294
|
-
'conductor.qbd.templates.list',
|
|
295
|
-
'conductor.qbd.timeTrackingActivities.create',
|
|
296
|
-
'conductor.qbd.timeTrackingActivities.delete',
|
|
297
|
-
'conductor.qbd.timeTrackingActivities.list',
|
|
298
|
-
'conductor.qbd.timeTrackingActivities.retrieve',
|
|
299
|
-
'conductor.qbd.timeTrackingActivities.update',
|
|
300
|
-
'conductor.qbd.transactions.list',
|
|
301
|
-
'conductor.qbd.transactions.retrieve',
|
|
302
|
-
'conductor.qbd.transfers.create',
|
|
303
|
-
'conductor.qbd.transfers.list',
|
|
304
|
-
'conductor.qbd.transfers.retrieve',
|
|
305
|
-
'conductor.qbd.transfers.update',
|
|
306
|
-
'conductor.qbd.unitOfMeasureSets.create',
|
|
307
|
-
'conductor.qbd.unitOfMeasureSets.list',
|
|
308
|
-
'conductor.qbd.unitOfMeasureSets.retrieve',
|
|
309
|
-
'conductor.qbd.vendorCredits.create',
|
|
310
|
-
'conductor.qbd.vendorCredits.delete',
|
|
311
|
-
'conductor.qbd.vendorCredits.list',
|
|
312
|
-
'conductor.qbd.vendorCredits.retrieve',
|
|
313
|
-
'conductor.qbd.vendorCredits.update',
|
|
314
|
-
'conductor.qbd.vendors.create',
|
|
315
|
-
'conductor.qbd.vendors.list',
|
|
316
|
-
'conductor.qbd.vendors.retrieve',
|
|
317
|
-
'conductor.qbd.vendors.update',
|
|
318
|
-
], { threshold: 1, shouldSort: true });
|
|
319
|
-
function getMethodSuggestions(fullyQualifiedMethodName) {
|
|
320
|
-
return fuse
|
|
321
|
-
.search(fullyQualifiedMethodName)
|
|
322
|
-
.map(({ item }) => item)
|
|
323
|
-
.slice(0, 5);
|
|
324
|
-
}
|
|
325
|
-
const proxyToObj = new WeakMap();
|
|
326
|
-
const objToProxy = new WeakMap();
|
|
327
|
-
function makeSdkProxy(obj, { path, isBelievedBad = false }) {
|
|
328
|
-
let proxy = objToProxy.get(obj);
|
|
329
|
-
if (!proxy) {
|
|
330
|
-
proxy = new Proxy(obj, {
|
|
331
|
-
get(target, prop, receiver) {
|
|
332
|
-
const propPath = [...path, String(prop)];
|
|
333
|
-
const value = Reflect.get(target, prop, receiver);
|
|
334
|
-
if (isBelievedBad || (!(prop in target) && value === undefined)) {
|
|
335
|
-
// If we're accessing a path that doesn't exist, it will probably eventually error.
|
|
336
|
-
// Let's proxy it and mark it bad so that we can control the error message.
|
|
337
|
-
// We proxy an empty class so that an invocation or construction attempt is possible.
|
|
338
|
-
return makeSdkProxy(class {
|
|
339
|
-
}, { path: propPath, isBelievedBad: true });
|
|
340
|
-
}
|
|
341
|
-
if (value !== null && (typeof value === 'object' || typeof value === 'function')) {
|
|
342
|
-
return makeSdkProxy(value, { path: propPath, isBelievedBad });
|
|
343
|
-
}
|
|
344
|
-
return value;
|
|
345
|
-
},
|
|
346
|
-
apply(target, thisArg, args) {
|
|
347
|
-
if (isBelievedBad || typeof target !== 'function') {
|
|
348
|
-
const fullyQualifiedMethodName = path.join('.');
|
|
349
|
-
const suggestions = getMethodSuggestions(fullyQualifiedMethodName);
|
|
350
|
-
throw new Error(`${fullyQualifiedMethodName} is not a function. Did you mean: ${suggestions.join(', ')}`);
|
|
351
|
-
}
|
|
352
|
-
return Reflect.apply(target, proxyToObj.get(thisArg) ?? thisArg, args);
|
|
353
|
-
},
|
|
354
|
-
construct(target, args, newTarget) {
|
|
355
|
-
if (isBelievedBad || typeof target !== 'function') {
|
|
356
|
-
const fullyQualifiedMethodName = path.join('.');
|
|
357
|
-
const suggestions = getMethodSuggestions(fullyQualifiedMethodName);
|
|
358
|
-
throw new Error(`${fullyQualifiedMethodName} is not a constructor. Did you mean: ${suggestions.join(', ')}`);
|
|
359
|
-
}
|
|
360
|
-
return Reflect.construct(target, args, newTarget);
|
|
361
|
-
},
|
|
362
|
-
});
|
|
363
|
-
objToProxy.set(obj, proxy);
|
|
364
|
-
proxyToObj.set(proxy, obj);
|
|
365
|
-
}
|
|
366
|
-
return proxy;
|
|
367
|
-
}
|
|
368
|
-
function parseError(code, error) {
|
|
369
|
-
if (!(error instanceof Error))
|
|
370
|
-
return;
|
|
371
|
-
const message = error.name ? `${error.name}: ${error.message}` : error.message;
|
|
372
|
-
try {
|
|
373
|
-
// Deno uses V8; the first "<anonymous>:LINE:COLUMN" is the top of stack.
|
|
374
|
-
const lineNumber = error.stack?.match(/<anonymous>:([0-9]+):[0-9]+/)?.[1];
|
|
375
|
-
// -1 for the zero-based indexing
|
|
376
|
-
const line = lineNumber &&
|
|
377
|
-
code
|
|
378
|
-
.split('\n')
|
|
379
|
-
.at(parseInt(lineNumber, 10) - 1)
|
|
380
|
-
?.trim();
|
|
381
|
-
return line ? `${message}\n at line ${lineNumber}\n ${line}` : message;
|
|
382
|
-
}
|
|
383
|
-
catch {
|
|
384
|
-
return message;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
const fetch = async (req) => {
|
|
388
|
-
const { opts, code } = (await req.json());
|
|
389
|
-
const runFunctionSource = code ? getRunFunctionSource(code) : null;
|
|
390
|
-
if (!runFunctionSource) {
|
|
391
|
-
const message = code ?
|
|
392
|
-
'The code is missing a top-level `run` function.'
|
|
393
|
-
: 'The code argument is missing. Provide one containing a top-level `run` function.';
|
|
394
|
-
return Response.json({
|
|
395
|
-
message: `${message} Write code within this template:\n\n\`\`\`\nasync function run(conductor) {\n // Fill this out\n}\n\`\`\``,
|
|
396
|
-
logLines: [],
|
|
397
|
-
errLines: [],
|
|
398
|
-
}, { status: 400, statusText: 'Code execution error' });
|
|
399
|
-
}
|
|
400
|
-
const diagnostics = getTSDiagnostics(code);
|
|
401
|
-
if (diagnostics.length > 0) {
|
|
402
|
-
return Response.json({
|
|
403
|
-
message: `The code contains TypeScript diagnostics:\n${diagnostics.join('\n')}`,
|
|
404
|
-
logLines: [],
|
|
405
|
-
errLines: [],
|
|
406
|
-
}, { status: 400, statusText: 'Code execution error' });
|
|
407
|
-
}
|
|
408
|
-
const conductor = new conductor_node_1.Conductor({
|
|
409
|
-
...opts,
|
|
410
|
-
});
|
|
411
|
-
const logLines = [];
|
|
412
|
-
const errLines = [];
|
|
413
|
-
const console = {
|
|
414
|
-
log: (...args) => {
|
|
415
|
-
logLines.push(node_util_1.default.format(...args));
|
|
416
|
-
},
|
|
417
|
-
error: (...args) => {
|
|
418
|
-
errLines.push(node_util_1.default.format(...args));
|
|
419
|
-
},
|
|
420
|
-
};
|
|
421
|
-
try {
|
|
422
|
-
let run_ = async (conductor) => { };
|
|
423
|
-
eval(`${code}\nrun_ = run;`);
|
|
424
|
-
const result = await run_(makeSdkProxy(conductor, { path: ['conductor'] }));
|
|
425
|
-
return Response.json({
|
|
426
|
-
result,
|
|
427
|
-
logLines,
|
|
428
|
-
errLines,
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
catch (e) {
|
|
432
|
-
return Response.json({
|
|
433
|
-
message: parseError(code, e),
|
|
434
|
-
logLines,
|
|
435
|
-
errLines,
|
|
436
|
-
}, { status: 400, statusText: 'Code execution error' });
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
exports.default = { fetch };
|
|
440
|
-
//# sourceMappingURL=code-tool-worker.js.map
|
package/code-tool-worker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool-worker.js","sourceRoot":"","sources":["src/code-tool-worker.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;AAEtF,0DAA6B;AAC7B,0DAA6B;AAE7B,sDAA2B;AAC3B,4DAA4B;AAG5B,mDAA2C;AAE3C,SAAS,oBAAoB,CAAC,IAAY;IAKxC,MAAM,UAAU,GAAG,oBAAE,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,oBAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACtF,MAAM,OAAO,GAAG,oBAAE,CAAC,aAAa,EAAE,CAAC;IAEnC,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;QAC9C,4CAA4C;QAC5C,IAAI,oBAAE,CAAC,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;YACxC,IAAI,SAAS,CAAC,IAAI,EAAE,IAAI,KAAK,KAAK,EAAE,CAAC;gBACnC,OAAO;oBACL,IAAI,EAAE,aAAa;oBACnB,MAA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