silgi 0.37.39 → 0.37.41
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/build.mjs +1 -1
- package/dist/cli/build.mjs +5 -4
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/init.mjs +1 -1
- package/dist/cli/install.mjs +1 -1
- package/dist/cli/types.mjs +8 -1
- package/dist/cli/watch.mjs +1 -1
- package/package.json +2 -2
package/dist/build.mjs
CHANGED
package/dist/cli/build.mjs
CHANGED
|
@@ -18,8 +18,8 @@ import { defu } from 'defu';
|
|
|
18
18
|
import { resolveModuleURL } from 'exsolve';
|
|
19
19
|
import { withTrailingSlash, isRelative } from 'ufo';
|
|
20
20
|
import { readdir, readFile } from 'node:fs/promises';
|
|
21
|
-
import { globby } from 'globby';
|
|
22
21
|
import { parseAsync } from 'oxc-parser';
|
|
22
|
+
import { glob } from 'tinyglobby';
|
|
23
23
|
import ignore from 'ignore';
|
|
24
24
|
import { klona } from 'klona';
|
|
25
25
|
import { createStorage, builtinDrivers } from 'unstorage';
|
|
@@ -330,7 +330,8 @@ async function registerModuleExportScan(silgi) {
|
|
|
330
330
|
if (!module.entryPath) {
|
|
331
331
|
continue;
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const path = module.meta._packageName ? module.entryPath.replace(/\.mjs$/, "Types.d.mts") : module.entryPath;
|
|
334
|
+
const moduleTypes = await promises.readFile(path, "utf8").catch(() => "");
|
|
334
335
|
const normalisedModuleTypes = moduleTypes.replace(/export\s*\{.*?\}/gs, (match) => match.replace(/\b(type|interface)\b/g, ""));
|
|
335
336
|
for (const e of findTypeExports(normalisedModuleTypes)) {
|
|
336
337
|
moduleReExports.push(e);
|
|
@@ -753,7 +754,7 @@ async function scanSilgiExports(path, packageName, silgiInstance = useSilgiCLI()
|
|
|
753
754
|
return;
|
|
754
755
|
}
|
|
755
756
|
try {
|
|
756
|
-
const matchedFiles = await
|
|
757
|
+
const matchedFiles = await glob(serverDirectory, {
|
|
757
758
|
cwd: silgiInstance.options.rootDir,
|
|
758
759
|
ignore: silgiInstance.options.ignore
|
|
759
760
|
});
|
|
@@ -1397,7 +1398,7 @@ async function scanFiles(silgi, name) {
|
|
|
1397
1398
|
return files;
|
|
1398
1399
|
}
|
|
1399
1400
|
async function scanDir(silgi, dir, name) {
|
|
1400
|
-
const fileNames = await
|
|
1401
|
+
const fileNames = await glob(join(name, GLOB_SCAN_PATTERN), {
|
|
1401
1402
|
cwd: dir,
|
|
1402
1403
|
dot: true,
|
|
1403
1404
|
ignore: silgi.options.ignore,
|
package/dist/cli/index.mjs
CHANGED
package/dist/cli/init.mjs
CHANGED
package/dist/cli/install.mjs
CHANGED
package/dist/cli/types.mjs
CHANGED
|
@@ -76,7 +76,14 @@ const SilgiCLIDefaults = {
|
|
|
76
76
|
presets: [],
|
|
77
77
|
virtualImports: ["#silgiImports"]
|
|
78
78
|
},
|
|
79
|
-
ignore: [
|
|
79
|
+
ignore: [
|
|
80
|
+
"**/*.stories.{js,cts,mts,ts,jsx,tsx}",
|
|
81
|
+
"**/*.{spec,test}.{js,cts,mts,ts,jsx,tsx}",
|
|
82
|
+
"**/*.d.{cts,mts,ts}",
|
|
83
|
+
"**/.{pnpm-store,vercel,netlify,output,git,cache,data}",
|
|
84
|
+
".silgi",
|
|
85
|
+
"**/-*.*"
|
|
86
|
+
],
|
|
80
87
|
// Dev
|
|
81
88
|
dev: false,
|
|
82
89
|
// devServer: { watch: [] },
|
package/dist/cli/watch.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silgi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.37.
|
|
4
|
+
"version": "0.37.41",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -108,7 +108,6 @@
|
|
|
108
108
|
"dotenv": "^16.5.0",
|
|
109
109
|
"escape-string-regexp": "^5.0.0",
|
|
110
110
|
"exsolve": "^1.0.5",
|
|
111
|
-
"globby": "^14.1.0",
|
|
112
111
|
"hookable": "^5.5.3",
|
|
113
112
|
"ignore": "^7.0.4",
|
|
114
113
|
"klona": "^2.0.6",
|
|
@@ -128,6 +127,7 @@
|
|
|
128
127
|
"semver": "^7.7.1",
|
|
129
128
|
"srvx": "^0.6.0",
|
|
130
129
|
"std-env": "^3.9.0",
|
|
130
|
+
"tinyglobby": "^0.2.13",
|
|
131
131
|
"ufo": "^1.6.1",
|
|
132
132
|
"unadapter": "^0.1.2",
|
|
133
133
|
"unctx": "^2.4.1",
|