silgi 0.8.40 → 0.8.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/_chunks/index.mjs +1 -1
- package/dist/cli/prepare.mjs +8 -5
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineCommand } from 'citty';
|
|
2
|
+
import consola$1, { consola } from 'consola';
|
|
2
3
|
import { join, resolve, isAbsolute, relative, dirname, basename, extname } from 'pathe';
|
|
3
4
|
import { devDependencies, version } from 'silgi/meta';
|
|
4
5
|
import { runtimeDir } from 'silgi/runtime/meta';
|
|
@@ -8,7 +9,6 @@ import { resolvePath, parseNodeModulePath, lookupNodeModuleSubpath, resolve as r
|
|
|
8
9
|
import { resolveAlias } from 'pathe/utils';
|
|
9
10
|
import { relativeWithDot, isDirectory, writeFile, resolveAlias as resolveAlias$1, resolvePath as resolvePath$1, normalizeTemplate, useLogger, addTemplate } from 'silgi/kit';
|
|
10
11
|
import { toExports, scanExports, createUnimport } from 'unimport';
|
|
11
|
-
import consola, { consola as consola$1 } from 'consola';
|
|
12
12
|
import { createJiti } from 'dev-jiti';
|
|
13
13
|
import { readPackageJSON } from 'pkg-types';
|
|
14
14
|
import { hash } from 'ohash';
|
|
@@ -273,7 +273,9 @@ async function readCoreFile(silgi) {
|
|
|
273
273
|
path
|
|
274
274
|
};
|
|
275
275
|
} catch (error) {
|
|
276
|
-
|
|
276
|
+
if (silgi.options.debug) {
|
|
277
|
+
console.error("Failed to read core.ts file:", error);
|
|
278
|
+
}
|
|
277
279
|
return {
|
|
278
280
|
context,
|
|
279
281
|
object: {
|
|
@@ -986,7 +988,7 @@ async function installModule(moduleToInstall, silgi = useSilgiCLI(), inlineOptio
|
|
|
986
988
|
}
|
|
987
989
|
}
|
|
988
990
|
|
|
989
|
-
const logger$1 = consola
|
|
991
|
+
const logger$1 = consola;
|
|
990
992
|
async function _resolveSilgiModule(mod, silgi) {
|
|
991
993
|
let _url;
|
|
992
994
|
let buildTimeModuleMeta = {};
|
|
@@ -1365,7 +1367,7 @@ async function scanFiles$1(silgi) {
|
|
|
1365
1367
|
if (caseCorrected) {
|
|
1366
1368
|
const original = relative(silgi.options.serverDir, dir);
|
|
1367
1369
|
const corrected = relative(silgi.options.serverDir, join(dirname(dir), caseCorrected));
|
|
1368
|
-
consola
|
|
1370
|
+
consola.warn(`Components not scanned from \`~/${corrected}\`. Did you mean to name the directory \`~/${original}\` instead?`);
|
|
1369
1371
|
}
|
|
1370
1372
|
}
|
|
1371
1373
|
}
|
|
@@ -1719,7 +1721,7 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
1719
1721
|
hooks,
|
|
1720
1722
|
// vfs: {}
|
|
1721
1723
|
_requiredModules: {},
|
|
1722
|
-
logger: consola
|
|
1724
|
+
logger: consola.withTag("silgi"),
|
|
1723
1725
|
close: () => silgi.hooks.callHook("close", silgi),
|
|
1724
1726
|
storage: void 0,
|
|
1725
1727
|
scanModules: [],
|
|
@@ -1807,6 +1809,7 @@ const prepare = defineCommand({
|
|
|
1807
1809
|
}
|
|
1808
1810
|
await generate();
|
|
1809
1811
|
await generate();
|
|
1812
|
+
consola$1.success("Prepare completed");
|
|
1810
1813
|
}
|
|
1811
1814
|
});
|
|
1812
1815
|
|
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED