silgi 0.41.55 → 0.41.56
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/cli/build.mjs +5 -15
- package/dist/cli/index.mjs +1 -1
- package/package.json +1 -1
package/dist/cli/build.mjs
CHANGED
|
@@ -649,20 +649,10 @@ function transformImportPath(path, packageName, relativeTo) {
|
|
|
649
649
|
return importPath;
|
|
650
650
|
}
|
|
651
651
|
function registerExportsWithHooks(silgiInstance, runtimeExports, typeExports, packageName) {
|
|
652
|
-
function getIgnoredPatterns() {
|
|
653
|
-
const ignored = silgiInstance.options.watchOptions?.ignored;
|
|
654
|
-
if (!ignored)
|
|
655
|
-
return [];
|
|
656
|
-
if (Array.isArray(ignored))
|
|
657
|
-
return ignored.filter((v) => typeof v === "string");
|
|
658
|
-
if (typeof ignored === "string")
|
|
659
|
-
return [ignored];
|
|
660
|
-
return [];
|
|
661
|
-
}
|
|
662
652
|
silgiInstance.hook("before:scan.ts", (options) => {
|
|
663
|
-
const
|
|
653
|
+
const ignored = Array.isArray(silgiInstance.options.watchOptions?.ignored) ? silgiInstance.options.watchOptions.ignored : [];
|
|
664
654
|
for (const { exportName, path, uniqueId, category } of runtimeExports) {
|
|
665
|
-
if (isWatchedPath(path,
|
|
655
|
+
if (!isWatchedPath(path, ignored)) {
|
|
666
656
|
silgiInstance.options.devServer.watch.push(path);
|
|
667
657
|
}
|
|
668
658
|
switch (category) {
|
|
@@ -689,9 +679,9 @@ function registerExportsWithHooks(silgiInstance, runtimeExports, typeExports, pa
|
|
|
689
679
|
}
|
|
690
680
|
});
|
|
691
681
|
silgiInstance.hook("before:schema.ts", (options) => {
|
|
692
|
-
const
|
|
682
|
+
const ignored = Array.isArray(silgiInstance.options.watchOptions?.ignored) ? silgiInstance.options.watchOptions.ignored : [];
|
|
693
683
|
for (const { exportName, path, uniqueId, category } of typeExports) {
|
|
694
|
-
if (isWatchedPath(path,
|
|
684
|
+
if (!isWatchedPath(path, ignored)) {
|
|
695
685
|
silgiInstance.options.devServer.watch.push(path);
|
|
696
686
|
}
|
|
697
687
|
if (category === "shared" || category === "context") {
|
|
@@ -842,7 +832,7 @@ async function scanSilgiExports(path, packageName, silgiInstance = useSilgiCLI()
|
|
|
842
832
|
}
|
|
843
833
|
}
|
|
844
834
|
function isWatchedPath(path, ignoredPatterns) {
|
|
845
|
-
return
|
|
835
|
+
return micromatch.isMatch(path, ignoredPatterns);
|
|
846
836
|
}
|
|
847
837
|
|
|
848
838
|
const MissingModuleMatcher = /Cannot find module\s+['"]?([^'")\s]+)['"]?/i;
|
package/dist/cli/index.mjs
CHANGED