@glasstrace/sdk 0.4.0 → 0.4.2
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/{chunk-TJ6ETQPH.js → chunk-67H2JEI4.js} +11 -5
- package/dist/{chunk-TJ6ETQPH.js.map → chunk-67H2JEI4.js.map} +1 -1
- package/dist/{chunk-STECO33B.js → chunk-PLJVIWHN.js} +1 -1
- package/dist/chunk-PLJVIWHN.js.map +1 -0
- package/dist/{chunk-EC5IINUT.js → chunk-TVOYTJ7I.js} +17 -4
- package/dist/chunk-TVOYTJ7I.js.map +1 -0
- package/dist/cli/init.cjs +9 -3
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +3 -3
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +2 -2
- package/dist/index.cjs +102 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +77 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-EC5IINUT.js.map +0 -1
- package/dist/chunk-STECO33B.js.map +0 -1
package/dist/cli/init.cjs
CHANGED
|
@@ -15602,12 +15602,18 @@ function extractImports(fileContent) {
|
|
|
15602
15602
|
imports.push(importPath);
|
|
15603
15603
|
}
|
|
15604
15604
|
};
|
|
15605
|
-
const
|
|
15605
|
+
const esFromImportRegex = /\bimport\b[^'"]+\bfrom\s+['"]([^'"]+)['"]/g;
|
|
15606
|
+
const esSideEffectRegex = /\bimport\s+['"]([^'"]+)['"]/g;
|
|
15606
15607
|
let match;
|
|
15607
|
-
match =
|
|
15608
|
+
match = esFromImportRegex.exec(fileContent);
|
|
15608
15609
|
while (match !== null) {
|
|
15609
15610
|
addUnique(match[1]);
|
|
15610
|
-
match =
|
|
15611
|
+
match = esFromImportRegex.exec(fileContent);
|
|
15612
|
+
}
|
|
15613
|
+
match = esSideEffectRegex.exec(fileContent);
|
|
15614
|
+
while (match !== null) {
|
|
15615
|
+
addUnique(match[1]);
|
|
15616
|
+
match = esSideEffectRegex.exec(fileContent);
|
|
15611
15617
|
}
|
|
15612
15618
|
const requireRegex = /require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
15613
15619
|
match = requireRegex.exec(fileContent);
|