@fluidgrids/workflows 2026.1028.2 → 2026.1030.1
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/README.md +181 -11
- package/dist/{activation-BBh1p82z.d.cts → activation-DqUfpHzk.d.cts} +1 -1
- package/dist/{activation-DnhG7SmF.d.ts → activation-xpx1oWuo.d.ts} +1 -1
- package/dist/{chunk-VRHHBPT6.js → chunk-2D3MYIIF.js} +1212 -128
- package/dist/chunk-3U2NU7YC.cjs +124 -0
- package/dist/{chunk-NEIUQASE.cjs → chunk-4QKB4ARC.cjs} +3 -3
- package/dist/{chunk-GBQ33SIZ.cjs → chunk-54FLQNUM.cjs} +12 -1
- package/dist/chunk-5HIVIV53.js +330 -0
- package/dist/chunk-5MFVJM76.js +1222 -0
- package/dist/{chunk-JD2VQIDZ.cjs → chunk-672KMMBK.cjs} +2 -2
- package/dist/{chunk-C5OLWZ42.js → chunk-6A2FGSUS.js} +22 -14
- package/dist/{chunk-XKJA7KX3.js → chunk-6OLN6BMB.js} +52 -3
- package/dist/{chunk-6FSHT5IL.js → chunk-7EZIANC7.js} +1 -1
- package/dist/{chunk-2J6TF7YI.cjs → chunk-A5SXCA62.cjs} +10 -3
- package/dist/{chunk-BO6OVILK.js → chunk-AC6ZEXVR.js} +10 -4
- package/dist/{chunk-ABFZWYHT.js → chunk-AE5Q6ZAJ.js} +315 -50
- package/dist/chunk-C4F5KJTI.js +293 -0
- package/dist/{chunk-IISBRUWJ.js → chunk-G5H32GIG.js} +1 -1
- package/dist/chunk-GEQDGUGB.cjs +2719 -0
- package/dist/{chunk-XHXIDVEC.js → chunk-HCM7ZC7Q.js} +1 -1
- package/dist/chunk-HMZUGSMU.cjs +1554 -0
- package/dist/{chunk-SAOBPYYJ.cjs → chunk-IQPXHQQQ.cjs} +8 -4
- package/dist/{chunk-P6TA5EZT.cjs → chunk-ISOIA7NV.cjs} +335 -58
- package/dist/chunk-JSC75O5C.cjs +167 -0
- package/dist/chunk-M272AHEX.js +25 -0
- package/dist/{chunk-BD7ZPG53.js → chunk-NWQ5WRLE.js} +10 -2
- package/dist/chunk-ODZ2IAR2.cjs +1247 -0
- package/dist/chunk-Q4MWQNJK.cjs +28 -0
- package/dist/{chunk-HWJZVOG7.js → chunk-SR7TR5KX.js} +6 -2
- package/dist/{chunk-FEW3JBYA.cjs → chunk-TCTE7DX5.cjs} +3 -3
- package/dist/{chunk-623FVQSN.cjs → chunk-TYF56RGB.cjs} +123 -0
- package/dist/chunk-VA4OFR72.cjs +324 -0
- package/dist/chunk-VU5S5A7V.js +150 -0
- package/dist/chunk-YEHR4NNE.js +1522 -0
- package/dist/{chunk-FMSW2HDF.cjs → chunk-ZCGKGDCL.cjs} +23 -15
- package/dist/codegen/index.d.cts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/collect-6NIEufHd.d.ts +103 -0
- package/dist/collect-CcTCKqx6.d.cts +103 -0
- package/dist/{file-BOoHZgoQ.d.cts → file-BxYpwjRQ.d.cts} +1007 -21
- package/dist/{file-yuPCFU5b.d.ts → file-CFdPQJI9.d.ts} +1007 -21
- package/dist/history/index.cjs +375 -86
- package/dist/history/index.d.cts +590 -12
- package/dist/history/index.d.ts +590 -12
- package/dist/history/index.js +50 -4
- package/dist/index.cjs +156 -50
- package/dist/index.d.cts +38 -58
- package/dist/index.d.ts +38 -58
- package/dist/index.js +6 -4
- package/dist/interceptors-CNcr2dlk.d.ts +159 -0
- package/dist/interceptors-CqkNZVfI.d.cts +159 -0
- package/dist/ir/index.cjs +362 -38
- package/dist/ir/index.d.cts +282 -7
- package/dist/ir/index.d.ts +282 -7
- package/dist/ir/index.js +329 -23
- package/dist/{lower-BzmUz0sq.d.cts → lower-BtRfIW2A.d.cts} +56 -8
- package/dist/{lower-_-iT4HYs.d.ts → lower-CpsMFOFX.d.ts} +56 -8
- package/dist/{manifest-C8N6HDYl.d.ts → manifest-D-I_twys.d.ts} +1 -1
- package/dist/{manifest-0OLw0i7k.d.cts → manifest-DahBQVM8.d.cts} +1 -1
- package/dist/node-evaluator-DGQDPSPI.cjs +24 -0
- package/dist/node-evaluator-LEEVD7H7.js +14 -0
- package/dist/payload-fields-BVRQn2yH.d.cts +122 -0
- package/dist/payload-fields-oOBWxDiG.d.ts +122 -0
- package/dist/quickjs/index.cjs +28 -27
- package/dist/quickjs/index.d.cts +6 -6
- package/dist/quickjs/index.d.ts +6 -6
- package/dist/quickjs/index.js +10 -9
- package/dist/roundtrip/index.cjs +259 -51
- package/dist/roundtrip/index.d.cts +100 -9
- package/dist/roundtrip/index.d.ts +100 -9
- package/dist/roundtrip/index.js +177 -11
- package/dist/runtime/index.cjs +21 -20
- package/dist/runtime/index.d.cts +184 -15
- package/dist/runtime/index.d.ts +184 -15
- package/dist/runtime/index.js +8 -7
- package/dist/testing/index.cjs +1122 -115
- package/dist/testing/index.d.cts +294 -13
- package/dist/testing/index.d.ts +294 -13
- package/dist/testing/index.js +1086 -84
- package/dist/{types-DV-HX_Gt.d.ts → types-Bv2i4cBX.d.cts} +244 -33
- package/dist/{types-CpBBjaGX.d.cts → types-DGx-b9eq.d.ts} +244 -33
- package/dist/{types-BGoPzgcl.d.ts → types-V7jEEUaL.d.cts} +20 -1
- package/dist/{types-BGoPzgcl.d.cts → types-V7jEEUaL.d.ts} +20 -1
- package/dist/{workflow-Bpr3vnA_.d.ts → workflow-B18OeF7g.d.ts} +2 -2
- package/dist/workflow-BGnv8SS6.d.ts +803 -0
- package/dist/{workflow-FXUkpIBc.d.cts → workflow-BJPFv3cp.d.cts} +2 -2
- package/dist/workflow-DS32Gtws.d.cts +803 -0
- package/fixtures/histories/activity-options-updated.history.json +159 -0
- package/fixtures/histories/activity-paused-unpaused.history.json +160 -0
- package/fixtures/histories/auto-upgrade-patched.history.json +276 -0
- package/fixtures/histories/benign-failure.history.json +146 -0
- package/fixtures/histories/cancel-activity-try-cancel.history.json +150 -0
- package/fixtures/histories/child-cancel-wait-requested.history.json +217 -0
- package/fixtures/histories/child-options-roundtrip.history.json +192 -0
- package/fixtures/histories/codec-opaque.history.json +229 -0
- package/fixtures/histories/continue-as-new-last-result.history.json +86 -0
- package/fixtures/histories/continue-as-new-options.history.json +99 -0
- package/fixtures/histories/continue-as-new-r1-long-task-queue.history.json +78 -0
- package/fixtures/histories/continue-as-new-r1-retry-options.history.json +83 -0
- package/fixtures/histories/dynamic-workflow.history.json +150 -0
- package/fixtures/histories/execution-timeout-chain.history.json +98 -0
- package/fixtures/histories/external-cancel-resolved.history.json +123 -0
- package/fixtures/histories/external-cancel-unknown-target.history.json +127 -0
- package/fixtures/histories/failure-error-types-fails-run.history.json +144 -0
- package/fixtures/histories/handler-drain-warn.history.json +222 -0
- package/fixtures/histories/heartbeat-details-on-retry.history.json +145 -0
- package/fixtures/histories/interceptor-headers.history.json +339 -0
- package/fixtures/histories/local-activity-abandoned-at-completion.history.json +73 -0
- package/fixtures/histories/local-activity-cancelled-in-scope.history.json +118 -0
- package/fixtures/histories/local-activity-completed.history.json +157 -0
- package/fixtures/histories/local-activity-failed.history.json +93 -0
- package/fixtures/histories/local-activity-retry-in-task.history.json +88 -0
- package/fixtures/histories/query-custom.history.json +213 -0
- package/fixtures/histories/query-default-handler.history.json +120 -0
- package/fixtures/histories/reset-forked-reapplied-signals.history.json +239 -0
- package/fixtures/histories/reset-reapplied-update-admitted.history.json +228 -0
- package/fixtures/histories/run-retry-last-failure.history.json +90 -0
- package/fixtures/histories/run-timeout.history.json +159 -0
- package/fixtures/histories/schedule-to-start-timeout.history.json +132 -0
- package/fixtures/histories/search-attributes-upserted.history.json +177 -0
- package/fixtures/histories/start-delay-signal-ends-delay.history.json +155 -0
- package/fixtures/histories/typeerror-task-retry-100.history.json +137 -0
- package/fixtures/histories/update-accepted-completed.history.json +45 -30
- package/fixtures/histories/update-default-handler.history.json +246 -0
- package/fixtures/histories/update-handler-awaits-activity.history.json +196 -0
- package/fixtures/histories/update-not-handled.history.json +138 -0
- package/fixtures/histories/update-rejected-no-event.history.json +190 -0
- package/fixtures/histories/update-with-start-admitted.history.json +150 -0
- package/fixtures/histories/user-activity-cancel.history.json +149 -0
- package/fixtures/histories/user-activity-retry.history.json +143 -0
- package/fixtures/histories/user-activity.history.json +149 -0
- package/package.json +1 -1
- package/schema/bridge-v2.schema.json +1062 -0
- package/schema/history-file.schema.json +538 -83
- package/schema/ir-v2.schema.json +290 -0
- package/schema/payload-fields.json +162 -0
- package/schema/run-event.schema.json +503 -82
- package/schema/workflow-command.schema.json +372 -69
- package/schema/workflow-task.schema.json +924 -171
- package/dist/assemble-BLqQ8lSu.d.cts +0 -39
- package/dist/assemble-DWgaXHd-.d.ts +0 -39
- package/dist/chunk-DHTLALBL.cjs +0 -80
- package/dist/chunk-DJYMDLV5.js +0 -227
- package/dist/chunk-I5LR3D2K.js +0 -869
- package/dist/chunk-M4BBAERY.cjs +0 -1635
- package/dist/chunk-N23SKIG4.js +0 -73
- package/dist/chunk-PZCVF76Q.cjs +0 -868
- package/dist/chunk-QQ6ULXHI.cjs +0 -885
- package/dist/chunk-UK3WM7YZ.cjs +0 -75
- package/dist/chunk-VOKMAAJP.js +0 -848
- package/dist/node-evaluator-4MSDKWOG.cjs +0 -22
- package/dist/node-evaluator-SX4LEYQC.js +0 -12
- package/dist/workflow-C2a05WUJ.d.ts +0 -444
- package/dist/workflow-J-yYixny.d.cts +0 -444
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { N as NodeManifest } from '../manifest-
|
|
1
|
+
import { W as WorkflowDefinition, J as JsonObject, a as Json } from '../types-V7jEEUaL.cjs';
|
|
2
|
+
import { f as LayoutSidecar } from '../collect-CcTCKqx6.cjs';
|
|
3
|
+
import { N as NodeManifest } from '../manifest-DahBQVM8.cjs';
|
|
4
4
|
import { P as PathSegment } from '../expressions-DhHaqyar.cjs';
|
|
5
|
-
import { V as VendoredDeps, a as VendoredPackage, E as Evaluator } from '../lower-
|
|
6
|
-
export { B as BuildBundleOptions, b as BuiltBundle, D as
|
|
5
|
+
import { V as VendoredDeps, a as VendoredPackage, E as Evaluator } from '../lower-BtRfIW2A.cjs';
|
|
6
|
+
export { B as BuildBundleOptions, b as BuiltBundle, D as DYNAMIC_EXPORT, c as DeterminismViolationError, d as ESBUILD_VERSION, e as EVALUATION_GLOBAL, L as LowerIssue, f as LowerOptions, g as LowerResult, h as LoweredWorkflow, N as NODE_BUILTINS, i as buildBundle, j as bundleProject, k as bundleSourceHash, l as defaultEntries, m as durableFeatures, n as durableScanModules, o as lower, r as resolvePackageEntry, s as scanDurableSources, p as splitSpecifier } from '../lower-BtRfIW2A.cjs';
|
|
7
7
|
import { E as EsbuildApi } from '../lower-types-DQNBfWQn.cjs';
|
|
8
8
|
export { B as BuildDiagnostic, a as BuildDiagnosticLocation, L as LowerError, b as LowerFailureReason } from '../lower-types-DQNBfWQn.cjs';
|
|
9
|
-
import '../workflow-
|
|
10
|
-
import '../workflow-
|
|
11
|
-
import '../types-
|
|
9
|
+
import '../workflow-BJPFv3cp.cjs';
|
|
10
|
+
import '../workflow-DS32Gtws.cjs';
|
|
11
|
+
import '../types-Bv2i4cBX.cjs';
|
|
12
12
|
import '../hash-CZkTXPCX.cjs';
|
|
13
13
|
import 'esbuild';
|
|
14
14
|
|
|
@@ -236,6 +236,8 @@ interface SourceArchive {
|
|
|
236
236
|
lock?: string;
|
|
237
237
|
/** Vendored packages by name. */
|
|
238
238
|
vendored?: Record<string, VendoredPackage>;
|
|
239
|
+
/** The bundle's source map (`buildBundle(…, { sourcemap: 'external' }).map`, R2). */
|
|
240
|
+
map?: string;
|
|
239
241
|
}
|
|
240
242
|
declare const SOURCE_ARCHIVE_MAX_BYTES: number;
|
|
241
243
|
/** Pack a source archive. */
|
|
@@ -247,6 +249,95 @@ declare function unpackSources(data: Uint8Array, options?: {
|
|
|
247
249
|
/** The vendored packages of an archive as `buildBundle` takes them. */
|
|
248
250
|
declare function archiveDeps(archive: SourceArchive): VendoredDeps;
|
|
249
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Read a bundle's source map (C-SOURCEMAP): map a position in the bundle back
|
|
254
|
+
* to the workflow source, so `__stack_trace` and `__enhanced_stack_trace` name
|
|
255
|
+
* the original TypeScript line (11 §2.21). The service keeps the map in the
|
|
256
|
+
* source archive (`map`) and applies it to the stacks a query returns.
|
|
257
|
+
*
|
|
258
|
+
* Only version 3 maps with `mappings` are read; index maps (`sections`) are
|
|
259
|
+
* not produced by `buildBundle` and are refused.
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
/** The file name the isolates give a workflow bundle in stack traces. */
|
|
263
|
+
declare const BUNDLE_FILE_NAME = "workflow-bundle.mjs";
|
|
264
|
+
/** A position in the original source. Lines are 1-based, columns 0-based. */
|
|
265
|
+
interface SourcePosition {
|
|
266
|
+
source: string;
|
|
267
|
+
line: number;
|
|
268
|
+
column: number;
|
|
269
|
+
name?: string;
|
|
270
|
+
}
|
|
271
|
+
/** Maps a bundle position (1-based line, 0-based column) to its source position. */
|
|
272
|
+
interface SourceMapper {
|
|
273
|
+
/** Without a column, the first mapped segment of the line is used. */
|
|
274
|
+
lookup(line: number, column?: number): SourcePosition | undefined;
|
|
275
|
+
}
|
|
276
|
+
/** Decode one segment's base64 VLQ numbers. */
|
|
277
|
+
declare function decodeVlq(segment: string): number[];
|
|
278
|
+
/** Parse a version 3 source map. */
|
|
279
|
+
declare function createSourceMapper(mapText: string): SourceMapper;
|
|
280
|
+
/**
|
|
281
|
+
* Rewrite the bundle frames of a stack text (`at fn (workflow-bundle.mjs:12:5)`)
|
|
282
|
+
* to source positions (`at fn (workflows/order.ts:7:11)`). Other frames are kept.
|
|
283
|
+
*/
|
|
284
|
+
declare function mapStackTrace(stack: string, mapper: SourceMapper, bundleFile?: string): string;
|
|
285
|
+
/**
|
|
286
|
+
* Map the locations of an `__enhanced_stack_trace` value in place of their
|
|
287
|
+
* bundle positions; a location keeps `bundleLine`/`bundleColumn` with the
|
|
288
|
+
* original position. Anything that is not the SDK's shape is returned as is.
|
|
289
|
+
*/
|
|
290
|
+
declare function mapEnhancedStackTrace(value: Json, mapper: SourceMapper, bundleFile?: string): Json;
|
|
291
|
+
/** The source positions of the bundle frames of a stack text, innermost first. */
|
|
292
|
+
declare function sourceLocations(stack: string, mapper: SourceMapper, bundleFile?: string): SourcePosition[];
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Bundle features a call site can show (the option-level ones come from the
|
|
296
|
+
* declarations). Phase C (C-R1) adds `userActivity`, `updates`, `queries`,
|
|
297
|
+
* `searchAttributes`, `dynamic` and `interceptors`.
|
|
298
|
+
*/
|
|
299
|
+
type SourceFeature = 'localActivity' | 'externalCancel' | 'childOptions' | 'canOptions' | 'userActivity' | 'updates' | 'queries' | 'searchAttributes' | 'dynamic' | 'interceptors';
|
|
300
|
+
/** Default handlers a module registers, which open the interface (11 §2.29). */
|
|
301
|
+
interface OpenHandlers {
|
|
302
|
+
signals: boolean;
|
|
303
|
+
queries: boolean;
|
|
304
|
+
updates: boolean;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* The text between the parenthesis at `open` and its match, skipping string
|
|
308
|
+
* and template literals and comments. Unbalanced text runs to the end.
|
|
309
|
+
*/
|
|
310
|
+
declare function callArguments(text: string, open: number): string;
|
|
311
|
+
/** Split `text` at commas that are not nested in brackets, literals or comments. */
|
|
312
|
+
declare function splitTopLevel(text: string): string[];
|
|
313
|
+
/**
|
|
314
|
+
* The top-level entries of an object literal (`{ a: 1, b }`): key and value
|
|
315
|
+
* text. Undefined when `text` is not an object literal or spreads another
|
|
316
|
+
* object, whose keys cannot be known.
|
|
317
|
+
*/
|
|
318
|
+
declare function objectEntries(text: string): Map<string, string> | undefined;
|
|
319
|
+
/**
|
|
320
|
+
* `text` with its comments replaced by spaces (string and template literals
|
|
321
|
+
* are kept, so offsets and bracket access still read the same).
|
|
322
|
+
*/
|
|
323
|
+
declare function withoutAllComments(text: string): string;
|
|
324
|
+
/** The milliseconds of a literal duration (`30000`, `'45s'`), or undefined for anything else. */
|
|
325
|
+
declare function literalDurationMs(value: string): number | undefined;
|
|
326
|
+
/** What one module's source shows. */
|
|
327
|
+
interface DurableSourceFindings {
|
|
328
|
+
features: SourceFeature[];
|
|
329
|
+
/** `startToCloseTimeout` literals of local activities above the cap, in milliseconds. */
|
|
330
|
+
localActivityTimeouts: number[];
|
|
331
|
+
/** Local activities given a function (user local activities, not run yet). */
|
|
332
|
+
userLocalActivities: number;
|
|
333
|
+
/** Default handlers the module registers. */
|
|
334
|
+
open: OpenHandlers;
|
|
335
|
+
/** User-activity implementations the module creates (`implementActivity` and the like). */
|
|
336
|
+
activityImplementations: string[];
|
|
337
|
+
}
|
|
338
|
+
/** Read one tier-2 module (or a module a tier-2 workflow may call). */
|
|
339
|
+
declare function scanDurableSource(source: string): DurableSourceFindings;
|
|
340
|
+
|
|
250
341
|
interface NodeVmEvaluatorOptions {
|
|
251
342
|
/** Wall-clock budget for evaluating the bundle. Default 5000 ms. */
|
|
252
343
|
timeoutMs?: number;
|
|
@@ -319,4 +410,4 @@ declare const PY_PROJECT_MODULE = "fluidgrids_workflows.project";
|
|
|
319
410
|
*/
|
|
320
411
|
declare const PY_LINE_LENGTH = 88;
|
|
321
412
|
|
|
322
|
-
export { EsbuildApi, Evaluator, type ExportCodeOptions, type ExportCodeResult, type ExportedFile, type FidelityItem, type FidelityItemKind, type FidelityReport, LiftError, type LiftHeader, type LiftOptions, type LiftResult, type NodeVmEvaluatorOptions, PY_LINE_LENGTH, PY_PROJECT_MODULE, PY_SDK_MODULE, type PlanOptions, type PreparedLift, SOURCE_ARCHIVE_MAX_BYTES, type SourceArchive, TS_FORMAT_OPTIONS, TS_NODES_IMPORT, type VendorOptions, VendoredDeps, VendoredPackage, archiveDeps, checkFidelity, createNodeVmEvaluator, exportWorkflowCode, liftToPython, liftToTypeScript, packSources, prepareLift, unpackSources, vendorDependencies };
|
|
413
|
+
export { BUNDLE_FILE_NAME, type DurableSourceFindings, EsbuildApi, Evaluator, type ExportCodeOptions, type ExportCodeResult, type ExportedFile, type FidelityItem, type FidelityItemKind, type FidelityReport, LiftError, type LiftHeader, type LiftOptions, type LiftResult, type NodeVmEvaluatorOptions, PY_LINE_LENGTH, PY_PROJECT_MODULE, PY_SDK_MODULE, type PlanOptions, type PreparedLift, SOURCE_ARCHIVE_MAX_BYTES, type SourceArchive, type SourceFeature, type SourceMapper, type SourcePosition, TS_FORMAT_OPTIONS, TS_NODES_IMPORT, type VendorOptions, VendoredDeps, VendoredPackage, archiveDeps, callArguments, checkFidelity, createNodeVmEvaluator, createSourceMapper, decodeVlq, exportWorkflowCode, liftToPython, liftToTypeScript, literalDurationMs, mapEnhancedStackTrace, mapStackTrace, objectEntries, packSources, prepareLift, scanDurableSource, sourceLocations, splitTopLevel, unpackSources, vendorDependencies, withoutAllComments };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { N as NodeManifest } from '../manifest-
|
|
1
|
+
import { W as WorkflowDefinition, J as JsonObject, a as Json } from '../types-V7jEEUaL.js';
|
|
2
|
+
import { f as LayoutSidecar } from '../collect-6NIEufHd.js';
|
|
3
|
+
import { N as NodeManifest } from '../manifest-D-I_twys.js';
|
|
4
4
|
import { P as PathSegment } from '../expressions-DhHaqyar.js';
|
|
5
|
-
import { V as VendoredDeps, a as VendoredPackage, E as Evaluator } from '../lower-
|
|
6
|
-
export { B as BuildBundleOptions, b as BuiltBundle, D as
|
|
5
|
+
import { V as VendoredDeps, a as VendoredPackage, E as Evaluator } from '../lower-CpsMFOFX.js';
|
|
6
|
+
export { B as BuildBundleOptions, b as BuiltBundle, D as DYNAMIC_EXPORT, c as DeterminismViolationError, d as ESBUILD_VERSION, e as EVALUATION_GLOBAL, L as LowerIssue, f as LowerOptions, g as LowerResult, h as LoweredWorkflow, N as NODE_BUILTINS, i as buildBundle, j as bundleProject, k as bundleSourceHash, l as defaultEntries, m as durableFeatures, n as durableScanModules, o as lower, r as resolvePackageEntry, s as scanDurableSources, p as splitSpecifier } from '../lower-CpsMFOFX.js';
|
|
7
7
|
import { E as EsbuildApi } from '../lower-types-DQNBfWQn.js';
|
|
8
8
|
export { B as BuildDiagnostic, a as BuildDiagnosticLocation, L as LowerError, b as LowerFailureReason } from '../lower-types-DQNBfWQn.js';
|
|
9
|
-
import '../workflow-
|
|
10
|
-
import '../workflow-
|
|
11
|
-
import '../types-
|
|
9
|
+
import '../workflow-B18OeF7g.js';
|
|
10
|
+
import '../workflow-BGnv8SS6.js';
|
|
11
|
+
import '../types-DGx-b9eq.js';
|
|
12
12
|
import '../hash-CZkTXPCX.js';
|
|
13
13
|
import 'esbuild';
|
|
14
14
|
|
|
@@ -236,6 +236,8 @@ interface SourceArchive {
|
|
|
236
236
|
lock?: string;
|
|
237
237
|
/** Vendored packages by name. */
|
|
238
238
|
vendored?: Record<string, VendoredPackage>;
|
|
239
|
+
/** The bundle's source map (`buildBundle(…, { sourcemap: 'external' }).map`, R2). */
|
|
240
|
+
map?: string;
|
|
239
241
|
}
|
|
240
242
|
declare const SOURCE_ARCHIVE_MAX_BYTES: number;
|
|
241
243
|
/** Pack a source archive. */
|
|
@@ -247,6 +249,95 @@ declare function unpackSources(data: Uint8Array, options?: {
|
|
|
247
249
|
/** The vendored packages of an archive as `buildBundle` takes them. */
|
|
248
250
|
declare function archiveDeps(archive: SourceArchive): VendoredDeps;
|
|
249
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Read a bundle's source map (C-SOURCEMAP): map a position in the bundle back
|
|
254
|
+
* to the workflow source, so `__stack_trace` and `__enhanced_stack_trace` name
|
|
255
|
+
* the original TypeScript line (11 §2.21). The service keeps the map in the
|
|
256
|
+
* source archive (`map`) and applies it to the stacks a query returns.
|
|
257
|
+
*
|
|
258
|
+
* Only version 3 maps with `mappings` are read; index maps (`sections`) are
|
|
259
|
+
* not produced by `buildBundle` and are refused.
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
/** The file name the isolates give a workflow bundle in stack traces. */
|
|
263
|
+
declare const BUNDLE_FILE_NAME = "workflow-bundle.mjs";
|
|
264
|
+
/** A position in the original source. Lines are 1-based, columns 0-based. */
|
|
265
|
+
interface SourcePosition {
|
|
266
|
+
source: string;
|
|
267
|
+
line: number;
|
|
268
|
+
column: number;
|
|
269
|
+
name?: string;
|
|
270
|
+
}
|
|
271
|
+
/** Maps a bundle position (1-based line, 0-based column) to its source position. */
|
|
272
|
+
interface SourceMapper {
|
|
273
|
+
/** Without a column, the first mapped segment of the line is used. */
|
|
274
|
+
lookup(line: number, column?: number): SourcePosition | undefined;
|
|
275
|
+
}
|
|
276
|
+
/** Decode one segment's base64 VLQ numbers. */
|
|
277
|
+
declare function decodeVlq(segment: string): number[];
|
|
278
|
+
/** Parse a version 3 source map. */
|
|
279
|
+
declare function createSourceMapper(mapText: string): SourceMapper;
|
|
280
|
+
/**
|
|
281
|
+
* Rewrite the bundle frames of a stack text (`at fn (workflow-bundle.mjs:12:5)`)
|
|
282
|
+
* to source positions (`at fn (workflows/order.ts:7:11)`). Other frames are kept.
|
|
283
|
+
*/
|
|
284
|
+
declare function mapStackTrace(stack: string, mapper: SourceMapper, bundleFile?: string): string;
|
|
285
|
+
/**
|
|
286
|
+
* Map the locations of an `__enhanced_stack_trace` value in place of their
|
|
287
|
+
* bundle positions; a location keeps `bundleLine`/`bundleColumn` with the
|
|
288
|
+
* original position. Anything that is not the SDK's shape is returned as is.
|
|
289
|
+
*/
|
|
290
|
+
declare function mapEnhancedStackTrace(value: Json, mapper: SourceMapper, bundleFile?: string): Json;
|
|
291
|
+
/** The source positions of the bundle frames of a stack text, innermost first. */
|
|
292
|
+
declare function sourceLocations(stack: string, mapper: SourceMapper, bundleFile?: string): SourcePosition[];
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Bundle features a call site can show (the option-level ones come from the
|
|
296
|
+
* declarations). Phase C (C-R1) adds `userActivity`, `updates`, `queries`,
|
|
297
|
+
* `searchAttributes`, `dynamic` and `interceptors`.
|
|
298
|
+
*/
|
|
299
|
+
type SourceFeature = 'localActivity' | 'externalCancel' | 'childOptions' | 'canOptions' | 'userActivity' | 'updates' | 'queries' | 'searchAttributes' | 'dynamic' | 'interceptors';
|
|
300
|
+
/** Default handlers a module registers, which open the interface (11 §2.29). */
|
|
301
|
+
interface OpenHandlers {
|
|
302
|
+
signals: boolean;
|
|
303
|
+
queries: boolean;
|
|
304
|
+
updates: boolean;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* The text between the parenthesis at `open` and its match, skipping string
|
|
308
|
+
* and template literals and comments. Unbalanced text runs to the end.
|
|
309
|
+
*/
|
|
310
|
+
declare function callArguments(text: string, open: number): string;
|
|
311
|
+
/** Split `text` at commas that are not nested in brackets, literals or comments. */
|
|
312
|
+
declare function splitTopLevel(text: string): string[];
|
|
313
|
+
/**
|
|
314
|
+
* The top-level entries of an object literal (`{ a: 1, b }`): key and value
|
|
315
|
+
* text. Undefined when `text` is not an object literal or spreads another
|
|
316
|
+
* object, whose keys cannot be known.
|
|
317
|
+
*/
|
|
318
|
+
declare function objectEntries(text: string): Map<string, string> | undefined;
|
|
319
|
+
/**
|
|
320
|
+
* `text` with its comments replaced by spaces (string and template literals
|
|
321
|
+
* are kept, so offsets and bracket access still read the same).
|
|
322
|
+
*/
|
|
323
|
+
declare function withoutAllComments(text: string): string;
|
|
324
|
+
/** The milliseconds of a literal duration (`30000`, `'45s'`), or undefined for anything else. */
|
|
325
|
+
declare function literalDurationMs(value: string): number | undefined;
|
|
326
|
+
/** What one module's source shows. */
|
|
327
|
+
interface DurableSourceFindings {
|
|
328
|
+
features: SourceFeature[];
|
|
329
|
+
/** `startToCloseTimeout` literals of local activities above the cap, in milliseconds. */
|
|
330
|
+
localActivityTimeouts: number[];
|
|
331
|
+
/** Local activities given a function (user local activities, not run yet). */
|
|
332
|
+
userLocalActivities: number;
|
|
333
|
+
/** Default handlers the module registers. */
|
|
334
|
+
open: OpenHandlers;
|
|
335
|
+
/** User-activity implementations the module creates (`implementActivity` and the like). */
|
|
336
|
+
activityImplementations: string[];
|
|
337
|
+
}
|
|
338
|
+
/** Read one tier-2 module (or a module a tier-2 workflow may call). */
|
|
339
|
+
declare function scanDurableSource(source: string): DurableSourceFindings;
|
|
340
|
+
|
|
250
341
|
interface NodeVmEvaluatorOptions {
|
|
251
342
|
/** Wall-clock budget for evaluating the bundle. Default 5000 ms. */
|
|
252
343
|
timeoutMs?: number;
|
|
@@ -319,4 +410,4 @@ declare const PY_PROJECT_MODULE = "fluidgrids_workflows.project";
|
|
|
319
410
|
*/
|
|
320
411
|
declare const PY_LINE_LENGTH = 88;
|
|
321
412
|
|
|
322
|
-
export { EsbuildApi, Evaluator, type ExportCodeOptions, type ExportCodeResult, type ExportedFile, type FidelityItem, type FidelityItemKind, type FidelityReport, LiftError, type LiftHeader, type LiftOptions, type LiftResult, type NodeVmEvaluatorOptions, PY_LINE_LENGTH, PY_PROJECT_MODULE, PY_SDK_MODULE, type PlanOptions, type PreparedLift, SOURCE_ARCHIVE_MAX_BYTES, type SourceArchive, TS_FORMAT_OPTIONS, TS_NODES_IMPORT, type VendorOptions, VendoredDeps, VendoredPackage, archiveDeps, checkFidelity, createNodeVmEvaluator, exportWorkflowCode, liftToPython, liftToTypeScript, packSources, prepareLift, unpackSources, vendorDependencies };
|
|
413
|
+
export { BUNDLE_FILE_NAME, type DurableSourceFindings, EsbuildApi, Evaluator, type ExportCodeOptions, type ExportCodeResult, type ExportedFile, type FidelityItem, type FidelityItemKind, type FidelityReport, LiftError, type LiftHeader, type LiftOptions, type LiftResult, type NodeVmEvaluatorOptions, PY_LINE_LENGTH, PY_PROJECT_MODULE, PY_SDK_MODULE, type PlanOptions, type PreparedLift, SOURCE_ARCHIVE_MAX_BYTES, type SourceArchive, type SourceFeature, type SourceMapper, type SourcePosition, TS_FORMAT_OPTIONS, TS_NODES_IMPORT, type VendorOptions, VendoredDeps, VendoredPackage, archiveDeps, callArguments, checkFidelity, createNodeVmEvaluator, createSourceMapper, decodeVlq, exportWorkflowCode, liftToPython, liftToTypeScript, literalDurationMs, mapEnhancedStackTrace, mapStackTrace, objectEntries, packSources, prepareLift, scanDurableSource, sourceLocations, splitTopLevel, unpackSources, vendorDependencies, withoutAllComments };
|
package/dist/roundtrip/index.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
export { createNodeVmEvaluator } from '../chunk-
|
|
2
|
-
import { diffDefinitions } from '../chunk-
|
|
1
|
+
export { createNodeVmEvaluator } from '../chunk-HCM7ZC7Q.js';
|
|
2
|
+
import { diffDefinitions } from '../chunk-7EZIANC7.js';
|
|
3
3
|
import { renderTypeScript, generateNodeClients, pyWorkflowName, NameAllocator, referencedLater, formatLines, formatImport, clientNames, pyString, snakeCase, pyNumber, PY_KEYWORDS } from '../chunk-SMCANK3F.js';
|
|
4
4
|
export { PY_LINE_LENGTH, TS_FORMAT_OPTIONS, TS_NODES_IMPORT } from '../chunk-SMCANK3F.js';
|
|
5
5
|
import { operationsOf, isTriggerOperation } from '../chunk-QAN5MZEM.js';
|
|
6
|
-
import { LowerError, lower } from '../chunk-
|
|
7
|
-
export { DeterminismViolationError, ESBUILD_VERSION, EVALUATION_GLOBAL, LowerError, NODE_BUILTINS, buildBundle, bundleProject, bundleSourceHash, defaultEntries, lower, resolvePackageEntry, scanDurableSources, splitSpecifier } from '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import { assembleRecording, LAYOUT_FORMAT_VERSION, LAYOUT_FORMAT, defineWorkflow, nodes, trigger, op, internalNodes, triggers, edge, defaultEdgeId } from '../chunk-
|
|
10
|
-
import { normalizeDefinition, irHash } from '../chunk-
|
|
6
|
+
import { LowerError, lower } from '../chunk-5MFVJM76.js';
|
|
7
|
+
export { DYNAMIC_EXPORT, DeterminismViolationError, ESBUILD_VERSION, EVALUATION_GLOBAL, LowerError, NODE_BUILTINS, buildBundle, bundleProject, bundleSourceHash, callArguments, defaultEntries, durableFeatures, durableScanModules, literalDurationMs, lower, objectEntries, resolvePackageEntry, scanDurableSource, scanDurableSources, splitSpecifier, splitTopLevel, withoutAllComments } from '../chunk-5MFVJM76.js';
|
|
8
|
+
import '../chunk-6OLN6BMB.js';
|
|
9
|
+
import { assembleRecording, LAYOUT_FORMAT_VERSION, LAYOUT_FORMAT, defineWorkflow, nodes, trigger, op, internalNodes, triggers, edge, defaultEdgeId } from '../chunk-SR7TR5KX.js';
|
|
10
|
+
import { normalizeDefinition, irHash } from '../chunk-NWQ5WRLE.js';
|
|
11
11
|
import '../chunk-5LUIDMF4.js';
|
|
12
12
|
import { PREDICATE_OPERATORS, BuilderError, and, or, expr, RESERVED_REF_KEYS } from '../chunk-JZ4TOOLN.js';
|
|
13
13
|
import { canonicalJson, stableStringify } from '../chunk-E2VK7J2C.js';
|
|
14
14
|
import { parseTemplate } from '../chunk-7AAZGVKD.js';
|
|
15
15
|
import { isRecord, setOwn, deepEqual } from '../chunk-PMCM2OH4.js';
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
16
|
+
import { parseStack } from '../chunk-M272AHEX.js';
|
|
17
|
+
import '../chunk-C4F5KJTI.js';
|
|
18
|
+
import '../chunk-LNUQE6D6.js';
|
|
19
|
+
import '../chunk-AC6ZEXVR.js';
|
|
20
|
+
import '../chunk-5HIVIV53.js';
|
|
18
21
|
import { readFileSync, existsSync, readdirSync, statSync } from 'fs';
|
|
19
22
|
import { resolve, join, dirname, relative, sep } from 'path';
|
|
20
23
|
import { gzipSync, gunzipSync } from 'zlib';
|
|
@@ -60,7 +63,9 @@ var HELPER_METHODS = {
|
|
|
60
63
|
"internal:noop": "noop"
|
|
61
64
|
};
|
|
62
65
|
var INTERNAL_DESCRIPTOR_NAMES = {
|
|
63
|
-
"internal:code-workflow": "codeWorkflow"
|
|
66
|
+
"internal:code-workflow": "codeWorkflow",
|
|
67
|
+
"internal:signal-run": "signalRun",
|
|
68
|
+
"internal:set-search-attributes": "setSearchAttributes"
|
|
64
69
|
};
|
|
65
70
|
var TRIGGER_NAMES = {
|
|
66
71
|
"internal:api": "api",
|
|
@@ -1445,6 +1450,7 @@ function packSources(archive) {
|
|
|
1445
1450
|
if (archive.lock !== void 0) value2["lock"] = archive.lock;
|
|
1446
1451
|
if (archive.vendored !== void 0 && Object.keys(archive.vendored).length > 0)
|
|
1447
1452
|
value2["vendored"] = archive.vendored;
|
|
1453
|
+
if (archive.map !== void 0) value2["map"] = archive.map;
|
|
1448
1454
|
const text = canonicalJson(value2);
|
|
1449
1455
|
const zipped = gzipSync(Buffer.from(text, "utf8"), { level: 9 });
|
|
1450
1456
|
zipped[GZIP_OS_BYTE] = 255;
|
|
@@ -1488,6 +1494,10 @@ function unpackSources(data, options2 = {}) {
|
|
|
1488
1494
|
if (typeof parsed["lock"] !== "string") throw new LowerError("lock must be a string");
|
|
1489
1495
|
archive.lock = parsed["lock"];
|
|
1490
1496
|
}
|
|
1497
|
+
if (parsed["map"] !== void 0) {
|
|
1498
|
+
if (typeof parsed["map"] !== "string") throw new LowerError("map must be a string");
|
|
1499
|
+
archive.map = parsed["map"];
|
|
1500
|
+
}
|
|
1491
1501
|
if (parsed["vendored"] !== void 0) {
|
|
1492
1502
|
if (!isRecord(parsed["vendored"])) throw new LowerError("vendored must be an object");
|
|
1493
1503
|
const vendored = {};
|
|
@@ -1512,6 +1522,162 @@ function archiveDeps(archive) {
|
|
|
1512
1522
|
return archive.vendored ?? {};
|
|
1513
1523
|
}
|
|
1514
1524
|
|
|
1525
|
+
// src/roundtrip/source-map.ts
|
|
1526
|
+
var BUNDLE_FILE_NAME = "workflow-bundle.mjs";
|
|
1527
|
+
var BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1528
|
+
var BASE64_VALUE = new Map([...BASE64].map((char, index) => [char, index]));
|
|
1529
|
+
function decodeVlq(segment) {
|
|
1530
|
+
const values = [];
|
|
1531
|
+
let value2 = 0;
|
|
1532
|
+
let shift = 0;
|
|
1533
|
+
for (const char of segment) {
|
|
1534
|
+
const digit = BASE64_VALUE.get(char);
|
|
1535
|
+
if (digit === void 0) throw new LowerError(`Invalid source map character "${char}"`);
|
|
1536
|
+
value2 += (digit & 31) * 2 ** shift;
|
|
1537
|
+
if (digit & 32) {
|
|
1538
|
+
shift += 5;
|
|
1539
|
+
continue;
|
|
1540
|
+
}
|
|
1541
|
+
values.push(value2 % 2 === 1 ? -Math.floor(value2 / 2) : Math.floor(value2 / 2));
|
|
1542
|
+
value2 = 0;
|
|
1543
|
+
shift = 0;
|
|
1544
|
+
}
|
|
1545
|
+
if (shift !== 0) throw new LowerError("A source map segment ends in the middle of a number");
|
|
1546
|
+
return values;
|
|
1547
|
+
}
|
|
1548
|
+
function createSourceMapper(mapText) {
|
|
1549
|
+
let parsed;
|
|
1550
|
+
try {
|
|
1551
|
+
parsed = JSON.parse(mapText);
|
|
1552
|
+
} catch {
|
|
1553
|
+
throw new LowerError("The source map is not JSON");
|
|
1554
|
+
}
|
|
1555
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
|
|
1556
|
+
throw new LowerError("The source map is not an object");
|
|
1557
|
+
const record = parsed;
|
|
1558
|
+
const sources = record["sources"];
|
|
1559
|
+
const names = Array.isArray(record["names"]) ? record["names"].map(String) : [];
|
|
1560
|
+
const mappings = record["mappings"];
|
|
1561
|
+
if (record["version"] !== 3 || !Array.isArray(sources) || typeof mappings !== "string")
|
|
1562
|
+
throw new LowerError("Only version 3 source maps with mappings are supported");
|
|
1563
|
+
const sourceNames = sources.map(String);
|
|
1564
|
+
const lines = [];
|
|
1565
|
+
let source = 0;
|
|
1566
|
+
let line = 0;
|
|
1567
|
+
let sourceColumn = 0;
|
|
1568
|
+
let name = 0;
|
|
1569
|
+
for (const lineText of mappings.split(";")) {
|
|
1570
|
+
const segments = [];
|
|
1571
|
+
let column = 0;
|
|
1572
|
+
for (const text of lineText.split(",")) {
|
|
1573
|
+
if (text === "") continue;
|
|
1574
|
+
const values = decodeVlq(text);
|
|
1575
|
+
column += values[0] ?? 0;
|
|
1576
|
+
if (values.length < 4) continue;
|
|
1577
|
+
source += values[1] ?? 0;
|
|
1578
|
+
line += values[2] ?? 0;
|
|
1579
|
+
sourceColumn += values[3] ?? 0;
|
|
1580
|
+
const segment = { column, source, line, sourceColumn };
|
|
1581
|
+
if (values.length >= 5) {
|
|
1582
|
+
name += values[4] ?? 0;
|
|
1583
|
+
segment.name = name;
|
|
1584
|
+
}
|
|
1585
|
+
segments.push(segment);
|
|
1586
|
+
}
|
|
1587
|
+
segments.sort((a, b) => a.column - b.column);
|
|
1588
|
+
lines.push(segments);
|
|
1589
|
+
}
|
|
1590
|
+
return {
|
|
1591
|
+
lookup(atLine, atColumn) {
|
|
1592
|
+
const segments = lines[atLine - 1];
|
|
1593
|
+
if (!segments || segments.length === 0) return void 0;
|
|
1594
|
+
let found = segments[0];
|
|
1595
|
+
if (atColumn !== void 0) {
|
|
1596
|
+
found = void 0;
|
|
1597
|
+
for (const segment of segments) {
|
|
1598
|
+
if (segment.column > atColumn) break;
|
|
1599
|
+
found = segment;
|
|
1600
|
+
}
|
|
1601
|
+
found ??= segments[0];
|
|
1602
|
+
}
|
|
1603
|
+
if (!found) return void 0;
|
|
1604
|
+
const sourceName = sourceNames[found.source];
|
|
1605
|
+
if (sourceName === void 0) return void 0;
|
|
1606
|
+
const position = {
|
|
1607
|
+
source: sourceName,
|
|
1608
|
+
line: found.line + 1,
|
|
1609
|
+
column: found.sourceColumn
|
|
1610
|
+
};
|
|
1611
|
+
const mappedName = found.name !== void 0 ? names[found.name] : void 0;
|
|
1612
|
+
if (mappedName !== void 0) position.name = mappedName;
|
|
1613
|
+
return position;
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
function isBundleFile(path, bundleFile) {
|
|
1618
|
+
return path !== void 0 && (path === bundleFile || path.endsWith(`/${bundleFile}`));
|
|
1619
|
+
}
|
|
1620
|
+
function mapStackTrace(stack, mapper, bundleFile = BUNDLE_FILE_NAME) {
|
|
1621
|
+
const frame = new RegExp(
|
|
1622
|
+
`${bundleFile.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}:(\\d+)(?::(\\d+))?`,
|
|
1623
|
+
"g"
|
|
1624
|
+
);
|
|
1625
|
+
return stack.split("\n").map(
|
|
1626
|
+
(line) => line.replace(frame, (whole, lineText, columnText) => {
|
|
1627
|
+
const position = mapper.lookup(
|
|
1628
|
+
Number(lineText),
|
|
1629
|
+
columnText !== void 0 ? Number(columnText) - 1 : void 0
|
|
1630
|
+
);
|
|
1631
|
+
return position ? `${position.source}:${position.line}:${position.column + 1}` : whole;
|
|
1632
|
+
})
|
|
1633
|
+
).join("\n");
|
|
1634
|
+
}
|
|
1635
|
+
function mapEnhancedStackTrace(value2, mapper, bundleFile = BUNDLE_FILE_NAME) {
|
|
1636
|
+
if (typeof value2 !== "object" || value2 === null || Array.isArray(value2)) return value2;
|
|
1637
|
+
const stacks = value2["stacks"];
|
|
1638
|
+
if (!Array.isArray(stacks)) return value2;
|
|
1639
|
+
const mappedStacks = stacks.map((stack) => {
|
|
1640
|
+
if (typeof stack !== "object" || stack === null || Array.isArray(stack)) return stack;
|
|
1641
|
+
const locations = stack["locations"];
|
|
1642
|
+
if (!Array.isArray(locations)) return stack;
|
|
1643
|
+
return {
|
|
1644
|
+
...stack,
|
|
1645
|
+
locations: locations.map((location) => {
|
|
1646
|
+
if (typeof location !== "object" || location === null || Array.isArray(location))
|
|
1647
|
+
return location;
|
|
1648
|
+
const filePath = typeof location["filePath"] === "string" ? location["filePath"] : void 0;
|
|
1649
|
+
const line = typeof location["line"] === "number" ? location["line"] : void 0;
|
|
1650
|
+
const column = typeof location["column"] === "number" ? location["column"] : void 0;
|
|
1651
|
+
if (!isBundleFile(filePath, bundleFile) || line === void 0) return location;
|
|
1652
|
+
const position = mapper.lookup(line, column !== void 0 ? column - 1 : void 0);
|
|
1653
|
+
if (!position) return location;
|
|
1654
|
+
const out = {
|
|
1655
|
+
...location,
|
|
1656
|
+
filePath: position.source,
|
|
1657
|
+
line: position.line,
|
|
1658
|
+
column: position.column + 1,
|
|
1659
|
+
bundleLine: line
|
|
1660
|
+
};
|
|
1661
|
+
if (column !== void 0) out["bundleColumn"] = column;
|
|
1662
|
+
return out;
|
|
1663
|
+
})
|
|
1664
|
+
};
|
|
1665
|
+
});
|
|
1666
|
+
return { ...value2, stacks: mappedStacks };
|
|
1667
|
+
}
|
|
1668
|
+
function sourceLocations(stack, mapper, bundleFile = BUNDLE_FILE_NAME) {
|
|
1669
|
+
const out = [];
|
|
1670
|
+
for (const location of parseStack(stack)) {
|
|
1671
|
+
if (!isBundleFile(location.filePath, bundleFile) || location.line === void 0) continue;
|
|
1672
|
+
const position = mapper.lookup(
|
|
1673
|
+
location.line,
|
|
1674
|
+
location.column !== void 0 ? location.column - 1 : void 0
|
|
1675
|
+
);
|
|
1676
|
+
if (position) out.push(position);
|
|
1677
|
+
}
|
|
1678
|
+
return out;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1515
1681
|
// src/roundtrip/fidelity.ts
|
|
1516
1682
|
var LOSSY_KINDS = /* @__PURE__ */ new Set([
|
|
1517
1683
|
"layout-omitted",
|
|
@@ -1566,4 +1732,4 @@ async function exportWorkflowCode(definition, options2) {
|
|
|
1566
1732
|
return { format: options2.format, files, fidelity, irHash: irHash(definition) };
|
|
1567
1733
|
}
|
|
1568
1734
|
|
|
1569
|
-
export { LiftError, PY_PROJECT_MODULE, PY_SDK_MODULE, SOURCE_ARCHIVE_MAX_BYTES, archiveDeps, checkFidelity, exportWorkflowCode, liftToPython, liftToTypeScript, packSources, prepareLift, unpackSources, vendorDependencies };
|
|
1735
|
+
export { BUNDLE_FILE_NAME, LiftError, PY_PROJECT_MODULE, PY_SDK_MODULE, SOURCE_ARCHIVE_MAX_BYTES, archiveDeps, checkFidelity, createSourceMapper, decodeVlq, exportWorkflowCode, liftToPython, liftToTypeScript, mapEnhancedStackTrace, mapStackTrace, packSources, prepareLift, sourceLocations, unpackSources, vendorDependencies };
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunkGEQDGUGB_cjs = require('../chunk-GEQDGUGB.cjs');
|
|
4
|
+
require('../chunk-ZCGKGDCL.cjs');
|
|
5
|
+
require('../chunk-Q4MWQNJK.cjs');
|
|
6
6
|
var chunkL24YIZY7_cjs = require('../chunk-L24YIZY7.cjs');
|
|
7
|
-
require('../chunk-
|
|
8
|
-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-VA4OFR72.cjs');
|
|
8
|
+
require('../chunk-FR7KYWRO.cjs');
|
|
9
|
+
var chunkISOIA7NV_cjs = require('../chunk-ISOIA7NV.cjs');
|
|
10
|
+
require('../chunk-A5SXCA62.cjs');
|
|
11
|
+
require('../chunk-TYF56RGB.cjs');
|
|
11
12
|
require('../chunk-Z2Y65YOY.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
Object.defineProperty(exports, "CommandIds", {
|
|
16
17
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkGEQDGUGB_cjs.CommandIds; }
|
|
18
19
|
});
|
|
19
20
|
Object.defineProperty(exports, "RUNTIME_GLOBAL", {
|
|
20
21
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkGEQDGUGB_cjs.RUNTIME_GLOBAL; }
|
|
22
23
|
});
|
|
23
24
|
Object.defineProperty(exports, "SDK_NAME", {
|
|
24
25
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkGEQDGUGB_cjs.SDK_NAME; }
|
|
26
27
|
});
|
|
27
28
|
Object.defineProperty(exports, "WorkflowExecution", {
|
|
28
29
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkGEQDGUGB_cjs.WorkflowExecution; }
|
|
30
31
|
});
|
|
31
32
|
Object.defineProperty(exports, "buildWorkflowRegistry", {
|
|
32
33
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkGEQDGUGB_cjs.buildWorkflowRegistry; }
|
|
34
35
|
});
|
|
35
36
|
Object.defineProperty(exports, "createWorkflowRuntime", {
|
|
36
37
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkGEQDGUGB_cjs.createWorkflowRuntime; }
|
|
38
39
|
});
|
|
39
40
|
Object.defineProperty(exports, "installWorkflowRuntime", {
|
|
40
41
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkGEQDGUGB_cjs.installWorkflowRuntime; }
|
|
42
43
|
});
|
|
43
44
|
Object.defineProperty(exports, "isPatchMarkerId", {
|
|
44
45
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkGEQDGUGB_cjs.isPatchMarkerId; }
|
|
46
47
|
});
|
|
47
48
|
Object.defineProperty(exports, "isRuntimeAbi", {
|
|
48
49
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkGEQDGUGB_cjs.isRuntimeAbi; }
|
|
50
51
|
});
|
|
51
52
|
Object.defineProperty(exports, "matchActivation", {
|
|
52
53
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkGEQDGUGB_cjs.matchActivation; }
|
|
54
55
|
});
|
|
55
56
|
Object.defineProperty(exports, "mismatch", {
|
|
56
57
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkGEQDGUGB_cjs.mismatch; }
|
|
58
59
|
});
|
|
59
60
|
Object.defineProperty(exports, "patchMarkerId", {
|
|
60
61
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkGEQDGUGB_cjs.patchMarkerId; }
|
|
62
63
|
});
|
|
63
64
|
Object.defineProperty(exports, "SHIM_HOOK", {
|
|
64
65
|
enumerable: true,
|
|
@@ -86,5 +87,5 @@ Object.defineProperty(exports, "uuidFrom", {
|
|
|
86
87
|
});
|
|
87
88
|
Object.defineProperty(exports, "splitActivations", {
|
|
88
89
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkISOIA7NV_cjs.splitActivations; }
|
|
90
91
|
});
|