@vertesia/build-tools 1.6.0-dev.20260912.110338Z → 1.6.0-dev.20260918.061604Z
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/import-transform/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC7B,2DAA2D;IAC3D,WAAW,EAAE,eAAe,CAAC;IAE7B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAElB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IAEnB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IAEjB,8CAA8C;IAC9C,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/import-transform/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC7B,2DAA2D;IAC3D,WAAW,EAAE,eAAe,CAAC;IAE7B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAElB,2DAA2D;IAC3D,UAAU,EAAE,MAAM,CAAC;IAEnB,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IAEjB,8CAA8C;IAC9C,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC1B;AAsBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAE,CA6BvG"}
|
|
@@ -12,20 +12,7 @@
|
|
|
12
12
|
* re-exports (`export … from`) and dynamic `import()` in one pass, and still yields the source
|
|
13
13
|
* offsets the rewriter needs.
|
|
14
14
|
*/
|
|
15
|
-
import {
|
|
16
|
-
/**
|
|
17
|
-
* `es-module-lexer` is WASM-backed and must be initialised before the first `parse`.
|
|
18
|
-
*
|
|
19
|
-
* Initialised synchronously and once, so `detectQueryImports` stays a plain function — making it
|
|
20
|
-
* async would push a promise through the scanner and every caller for no benefit.
|
|
21
|
-
*/
|
|
22
|
-
let initialised = false;
|
|
23
|
-
function ensureInitialised() {
|
|
24
|
-
if (!initialised) {
|
|
25
|
-
initSync();
|
|
26
|
-
initialised = true;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
15
|
+
import { parse } from 'es-module-lexer/minimal';
|
|
29
16
|
const QUOTES = new Set(["'", '"', '`']);
|
|
30
17
|
/**
|
|
31
18
|
* Locate the quotes around a specifier.
|
|
@@ -53,7 +40,7 @@ function quoteBounds(source, start, end) {
|
|
|
53
40
|
* stop, not quietly emit less. `transformImports` adds the file path to the message.
|
|
54
41
|
*/
|
|
55
42
|
export function detectQueryImports(content, transformers) {
|
|
56
|
-
|
|
43
|
+
// The minimal build preserves the v2 import offsets and initialises synchronously on first parse in Node.js.
|
|
57
44
|
const [imports] = parse(content);
|
|
58
45
|
const occurrences = [];
|
|
59
46
|
for (const entry of imports) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detector.js","sourceRoot":"","sources":["../../src/import-transform/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"detector.js","sourceRoot":"","sources":["../../src/import-transform/detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAoBhD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;A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AC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,WAAW,EAAE,CAAC;YACf,SAAS;QACb,CAAC;QACD,WAAW,CAAC,IAAI,CAAC;YACb,WAAW;YACX,SAAS;YACT,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAoB;SACvD,CAAC,CAAC;IACP,CAAC;IAED,OAAO,WAAW,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/build-tools",
|
|
3
|
-
"version": "1.6.0-dev.
|
|
3
|
+
"version": "1.6.0-dev.20260918.061604Z",
|
|
4
4
|
"description": "Build tools for Vertesia projects - import transformers (skill / template / prompt / raw), esbuild widget bundler, vertesia-build CLI, and a Vite dev plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"@vertesia/tsconfig": "0.1.0",
|
|
31
31
|
"typescript": "7.0.2",
|
|
32
32
|
"vite": "8.2.2",
|
|
33
|
-
"vitest": "
|
|
33
|
+
"vitest": "5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@llumiverse/common": "1.6.0-dev.
|
|
37
|
-
"@vertesia/common": "1.6.0-dev.
|
|
38
|
-
"@vertesia/studio-utils": "1.6.0-dev.
|
|
36
|
+
"@llumiverse/common": "1.6.0-dev.20260918.055633Z",
|
|
37
|
+
"@vertesia/common": "1.6.0-dev.20260918.061604Z",
|
|
38
|
+
"@vertesia/studio-utils": "1.6.0-dev.20260918.061604Z",
|
|
39
39
|
"ajv": "^8.20.0",
|
|
40
|
-
"es-module-lexer": "^
|
|
40
|
+
"es-module-lexer": "^3.0.2",
|
|
41
41
|
"esbuild": "^0.28.2",
|
|
42
42
|
"js-yaml": "^5.4.1",
|
|
43
43
|
"zod": "^4.5.4"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"zod",
|
|
76
76
|
"validation"
|
|
77
77
|
],
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "ea552337206e77c256478b76e19b4235e70bf769",
|
|
79
79
|
"scripts": {
|
|
80
80
|
"lint": "biome lint src",
|
|
81
81
|
"test": "vitest run",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* offsets the rewriter needs.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { parse } from 'es-module-lexer/minimal';
|
|
17
17
|
import type { TransformerRule } from '../core/types.js';
|
|
18
18
|
|
|
19
19
|
export interface ImportOccurrence {
|
|
@@ -33,20 +33,6 @@ export interface ImportOccurrence {
|
|
|
33
33
|
quote: "'" | '"' | '`';
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* `es-module-lexer` is WASM-backed and must be initialised before the first `parse`.
|
|
38
|
-
*
|
|
39
|
-
* Initialised synchronously and once, so `detectQueryImports` stays a plain function — making it
|
|
40
|
-
* async would push a promise through the scanner and every caller for no benefit.
|
|
41
|
-
*/
|
|
42
|
-
let initialised = false;
|
|
43
|
-
function ensureInitialised(): void {
|
|
44
|
-
if (!initialised) {
|
|
45
|
-
initSync();
|
|
46
|
-
initialised = true;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
36
|
const QUOTES = new Set(["'", '"', '`']);
|
|
51
37
|
|
|
52
38
|
/**
|
|
@@ -76,8 +62,7 @@ function quoteBounds(source: string, start: number, end: number): { quoteStart:
|
|
|
76
62
|
* stop, not quietly emit less. `transformImports` adds the file path to the message.
|
|
77
63
|
*/
|
|
78
64
|
export function detectQueryImports(content: string, transformers: TransformerRule[]): ImportOccurrence[] {
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
// The minimal build preserves the v2 import offsets and initialises synchronously on first parse in Node.js.
|
|
81
66
|
const [imports] = parse(content);
|
|
82
67
|
|
|
83
68
|
const occurrences: ImportOccurrence[] = [];
|