silgi 0.23.5 → 0.23.7
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 +1 -1
- package/dist/kit/index.d.mts +8 -2
- package/dist/kit/index.d.ts +8 -2
- package/dist/kit/index.mjs +5 -5
- package/package.json +1 -1
package/dist/_chunks/index.mjs
CHANGED
package/dist/cli/prepare.mjs
CHANGED
|
@@ -1658,7 +1658,6 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
1658
1658
|
const routeRules = createRouteRules();
|
|
1659
1659
|
routeRules.importRules(options.routeRules ?? {});
|
|
1660
1660
|
silgi.routeRules = routeRules;
|
|
1661
|
-
useCLIRuntimeConfig(silgi);
|
|
1662
1661
|
if (silgiCLICtx.tryUse()) {
|
|
1663
1662
|
silgiCLICtx.unset();
|
|
1664
1663
|
silgiCLICtx.set(silgi);
|
|
@@ -1680,6 +1679,7 @@ async function createSilgiCLI(config = {}, opts = {}) {
|
|
|
1680
1679
|
await scanModules$1(silgi);
|
|
1681
1680
|
await scanExportFile(silgi);
|
|
1682
1681
|
await installModules(silgi, true);
|
|
1682
|
+
useCLIRuntimeConfig(silgi);
|
|
1683
1683
|
await writeScanFiles(silgi);
|
|
1684
1684
|
silgi.storage = await createStorageCLI(silgi);
|
|
1685
1685
|
silgi.hooks.hook("close", async () => {
|
package/dist/kit/index.d.mts
CHANGED
|
@@ -156,6 +156,12 @@ declare const MODE_RE: RegExp;
|
|
|
156
156
|
declare function hasSilgiModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
157
157
|
declare function hasInstalledModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
158
158
|
declare const baseHeaderBannerComment: string[];
|
|
159
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Process file paths based on configuration settings
|
|
161
|
+
*
|
|
162
|
+
* @param path - The source file path to process
|
|
163
|
+
* @returns The processed path with extensions and trailing slashes handled
|
|
164
|
+
*/
|
|
165
|
+
declare function processFilePath(path: string): string;
|
|
160
166
|
|
|
161
|
-
export { MODE_RE,
|
|
167
|
+
export { MODE_RE, addTemplate, applyEnv, baseHeaderBannerComment, createResolver, defineSilgiModule, defineSilgiPreset, directoryToURL, filterInPlace, genEnsureSafeVar, getAllEntries, getIpAddress, hasError, hasInstalledModule, hasSilgiModule, hash, initRuntimeConfig, ipAddress, isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, parseServices, prettyPath, processFilePath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, serviceParseModule, toArray, tryResolveModule, useLogger, useRequest, useResponse, useSilgiRuntimeConfig, writeFile };
|
package/dist/kit/index.d.ts
CHANGED
|
@@ -156,6 +156,12 @@ declare const MODE_RE: RegExp;
|
|
|
156
156
|
declare function hasSilgiModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
157
157
|
declare function hasInstalledModule(moduleKey: string, silgi?: SilgiCLI): boolean;
|
|
158
158
|
declare const baseHeaderBannerComment: string[];
|
|
159
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Process file paths based on configuration settings
|
|
161
|
+
*
|
|
162
|
+
* @param path - The source file path to process
|
|
163
|
+
* @returns The processed path with extensions and trailing slashes handled
|
|
164
|
+
*/
|
|
165
|
+
declare function processFilePath(path: string): string;
|
|
160
166
|
|
|
161
|
-
export { MODE_RE,
|
|
167
|
+
export { MODE_RE, addTemplate, applyEnv, baseHeaderBannerComment, createResolver, defineSilgiModule, defineSilgiPreset, directoryToURL, filterInPlace, genEnsureSafeVar, getAllEntries, getIpAddress, hasError, hasInstalledModule, hasSilgiModule, hash, initRuntimeConfig, ipAddress, isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, parseServices, prettyPath, processFilePath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, serviceParseModule, toArray, tryResolveModule, useLogger, useRequest, useResponse, useSilgiRuntimeConfig, writeFile };
|
package/dist/kit/index.mjs
CHANGED
|
@@ -488,13 +488,13 @@ const baseHeaderBannerComment = [
|
|
|
488
488
|
"/* prettier-ignore */",
|
|
489
489
|
"/* tslint:disable */"
|
|
490
490
|
];
|
|
491
|
-
function
|
|
491
|
+
function processFilePath(path) {
|
|
492
492
|
const silgi = useSilgiCLI();
|
|
493
|
+
const cleanPath = path.endsWith("/") ? path.slice(0, -1) : path;
|
|
493
494
|
if (silgi.options.typescript.removeFileExtension) {
|
|
494
|
-
|
|
495
|
-
return src;
|
|
495
|
+
return cleanPath.replace(/\.ts$/, "");
|
|
496
496
|
}
|
|
497
|
-
return
|
|
497
|
+
return cleanPath;
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
function addTemplate(_template) {
|
|
@@ -627,4 +627,4 @@ function isValidIp(ip) {
|
|
|
627
627
|
return false;
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
export { MODE_RE,
|
|
630
|
+
export { MODE_RE, addTemplate, applyEnv, baseHeaderBannerComment, createResolver, defineSilgiModule, defineSilgiPreset, directoryToURL, filterInPlace, genEnsureSafeVar, getAllEntries, getIpAddress, hasError, hasInstalledModule, hasSilgiModule, hash, initRuntimeConfig, ipAddress, isDirectory$1 as isDirectory, isH3, isNitro, isNuxt, normalizeTemplate, parseServices, prettyPath, processFilePath, relativeWithDot, resolveAlias, resolvePath, resolveSilgiModule, resolveSilgiPath, serviceParseModule, toArray, tryResolveModule, useLogger, useRequest, useResponse, useSilgiRuntimeConfig, writeFile };
|