@514labs/moose-lib 0.6.262 → 0.6.263
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/{browserCompatible-CC6Jamxn.d.ts → browserCompatible-Bqhjy4pn.d.ts} +1 -1
- package/dist/{browserCompatible-GsBQtLKo.d.mts → browserCompatible-DTtKuO-Y.d.mts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +38 -2
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +38 -2
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +1 -1
- package/dist/dmv2/index.d.ts +1 -1
- package/dist/dmv2/index.js +38 -2
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +38 -2
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-B1HsstjQ.d.mts → index-CQB6bk1i.d.mts} +4 -0
- package/dist/{index-B1HsstjQ.d.ts → index-CQB6bk1i.d.ts} +4 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +38 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -2
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +2 -0
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +2 -0
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/dmv2/index.mjs
CHANGED
|
@@ -387,8 +387,35 @@ function getSourceFileInfo(stack) {
|
|
|
387
387
|
}
|
|
388
388
|
return {};
|
|
389
389
|
}
|
|
390
|
+
function getSourceLocationFromStack(stack) {
|
|
391
|
+
if (!stack) return void 0;
|
|
392
|
+
const lines = stack.split("\n");
|
|
393
|
+
for (const line of lines.slice(1)) {
|
|
394
|
+
if (shouldSkipStackLine(line)) {
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
const v8Match = line.match(/at\s+(?:.*?\s+\()?(.+):(\d+):(\d+)\)?/);
|
|
398
|
+
if (v8Match) {
|
|
399
|
+
return {
|
|
400
|
+
file: v8Match[1],
|
|
401
|
+
line: parseInt(v8Match[2], 10),
|
|
402
|
+
column: parseInt(v8Match[3], 10)
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
const smMatch = line.match(/(?:.*@)?(.+):(\d+):(\d+)/);
|
|
406
|
+
if (smMatch) {
|
|
407
|
+
return {
|
|
408
|
+
file: smMatch[1],
|
|
409
|
+
line: parseInt(smMatch[2], 10),
|
|
410
|
+
column: parseInt(smMatch[3], 10)
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return void 0;
|
|
415
|
+
}
|
|
390
416
|
function getSourceFileFromStack(stack) {
|
|
391
|
-
|
|
417
|
+
const location = getSourceLocationFromStack(stack);
|
|
418
|
+
return location?.file;
|
|
392
419
|
}
|
|
393
420
|
|
|
394
421
|
// src/dmv2/typedBase.ts
|
|
@@ -2201,6 +2228,10 @@ var SqlResource = class {
|
|
|
2201
2228
|
pushesDataTo;
|
|
2202
2229
|
/** @internal Source file path where this resource was defined */
|
|
2203
2230
|
sourceFile;
|
|
2231
|
+
/** @internal Source line number where this resource was defined */
|
|
2232
|
+
sourceLine;
|
|
2233
|
+
/** @internal Source column number where this resource was defined */
|
|
2234
|
+
sourceColumn;
|
|
2204
2235
|
/**
|
|
2205
2236
|
* Creates a new SqlResource instance.
|
|
2206
2237
|
* @param name The name of the resource.
|
|
@@ -2226,7 +2257,12 @@ var SqlResource = class {
|
|
|
2226
2257
|
this.pullsDataFrom = options?.pullsDataFrom ?? [];
|
|
2227
2258
|
this.pushesDataTo = options?.pushesDataTo ?? [];
|
|
2228
2259
|
const stack = new Error().stack;
|
|
2229
|
-
|
|
2260
|
+
const location = getSourceLocationFromStack(stack);
|
|
2261
|
+
if (location) {
|
|
2262
|
+
this.sourceFile = location.file;
|
|
2263
|
+
this.sourceLine = location.line;
|
|
2264
|
+
this.sourceColumn = location.column;
|
|
2265
|
+
}
|
|
2230
2266
|
}
|
|
2231
2267
|
};
|
|
2232
2268
|
|