@lukoweb/apitogo 0.1.44 → 0.1.45
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/cli.js +12 -3
- package/package.json +1 -1
- package/src/config/loader.ts +13 -2
package/dist/cli/cli.js
CHANGED
|
@@ -3787,9 +3787,18 @@ function loadEnv(configEnv, rootDir) {
|
|
|
3787
3787
|
);
|
|
3788
3788
|
return { publicEnv: publicEnv2, envPrefix: envPrefix2 };
|
|
3789
3789
|
}
|
|
3790
|
+
function isWatchableConfigDependency(depPath) {
|
|
3791
|
+
return !depPath.startsWith("\0virtual:") && !depPath.startsWith("virtual:");
|
|
3792
|
+
}
|
|
3793
|
+
function getWatchableConfigDependencies(config2) {
|
|
3794
|
+
return [
|
|
3795
|
+
config2.__meta.configPath,
|
|
3796
|
+
...config2.__meta.dependencies.filter(isWatchableConfigDependency)
|
|
3797
|
+
];
|
|
3798
|
+
}
|
|
3790
3799
|
async function hasConfigChanged() {
|
|
3791
3800
|
if (!config || !modifiedTimes) return true;
|
|
3792
|
-
const files =
|
|
3801
|
+
const files = getWatchableConfigDependencies(config);
|
|
3793
3802
|
try {
|
|
3794
3803
|
const hasChanged = await Promise.all(
|
|
3795
3804
|
files.map(async (depPath) => {
|
|
@@ -3805,7 +3814,7 @@ async function hasConfigChanged() {
|
|
|
3805
3814
|
}
|
|
3806
3815
|
async function updateModifiedTimes() {
|
|
3807
3816
|
if (!config) return;
|
|
3808
|
-
const files =
|
|
3817
|
+
const files = getWatchableConfigDependencies(config);
|
|
3809
3818
|
modifiedTimes = /* @__PURE__ */ new Map();
|
|
3810
3819
|
await Promise.all(
|
|
3811
3820
|
files.map(async (depPath) => {
|
|
@@ -4124,7 +4133,7 @@ import {
|
|
|
4124
4133
|
// package.json
|
|
4125
4134
|
var package_default = {
|
|
4126
4135
|
name: "@lukoweb/apitogo",
|
|
4127
|
-
version: "0.1.
|
|
4136
|
+
version: "0.1.45",
|
|
4128
4137
|
type: "module",
|
|
4129
4138
|
sideEffects: [
|
|
4130
4139
|
"**/*.css",
|
package/package.json
CHANGED
package/src/config/loader.ts
CHANGED
|
@@ -152,10 +152,21 @@ function loadEnv(configEnv: ConfigEnv, rootDir: string) {
|
|
|
152
152
|
return { publicEnv, envPrefix };
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
function isWatchableConfigDependency(depPath: string): boolean {
|
|
156
|
+
return !depPath.startsWith("\0virtual:") && !depPath.startsWith("virtual:");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function getWatchableConfigDependencies(config: ConfigWithMeta): string[] {
|
|
160
|
+
return [
|
|
161
|
+
config.__meta.configPath,
|
|
162
|
+
...config.__meta.dependencies.filter(isWatchableConfigDependency),
|
|
163
|
+
];
|
|
164
|
+
}
|
|
165
|
+
|
|
155
166
|
async function hasConfigChanged() {
|
|
156
167
|
if (!config || !modifiedTimes) return true;
|
|
157
168
|
|
|
158
|
-
const files =
|
|
169
|
+
const files = getWatchableConfigDependencies(config);
|
|
159
170
|
|
|
160
171
|
try {
|
|
161
172
|
const hasChanged = await Promise.all(
|
|
@@ -175,7 +186,7 @@ async function hasConfigChanged() {
|
|
|
175
186
|
async function updateModifiedTimes() {
|
|
176
187
|
if (!config) return;
|
|
177
188
|
|
|
178
|
-
const files =
|
|
189
|
+
const files = getWatchableConfigDependencies(config);
|
|
179
190
|
|
|
180
191
|
modifiedTimes = new Map();
|
|
181
192
|
|