adminforth 1.2.60 → 1.2.62
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.
|
@@ -217,13 +217,13 @@ class CodeInjector {
|
|
|
217
217
|
dereference: true, // needed to dereference types
|
|
218
218
|
});
|
|
219
219
|
if (process.env.HEAVY_DEBUG) {
|
|
220
|
-
console.log('🪲 await fsExtra.copy
|
|
220
|
+
console.log('🪲 await fsExtra.copy copy single file', src, dest);
|
|
221
221
|
}
|
|
222
222
|
})));
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
225
|
if (process.env.HEAVY_DEBUG) {
|
|
226
|
-
console.log(`🪲 await fsExtra.copy from ${path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'spa')}, ${CodeInjector.SPA_TMP_PATH}`);
|
|
226
|
+
console.log(`🪲 await fsExtra.copy from ${path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'spa')}, -> ${CodeInjector.SPA_TMP_PATH}`);
|
|
227
227
|
}
|
|
228
228
|
// try to rm SPA_TMP_PATH/src/types directory
|
|
229
229
|
try {
|
|
@@ -235,10 +235,11 @@ class CodeInjector {
|
|
|
235
235
|
// overwrite can't be used to not destroy cache
|
|
236
236
|
yield fsExtra.copy(path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'spa'), CodeInjector.SPA_TMP_PATH, {
|
|
237
237
|
filter: (src) => {
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
const filterPasses = !src.includes('/adminforth/spa/node_modules') && !src.includes('/adminforth/spa/dist');
|
|
239
|
+
if (process.env.HEAVY_DEBUG && !filterPasses) {
|
|
240
|
+
console.log('🪲 await fsExtra.copy filtered out', src);
|
|
240
241
|
}
|
|
241
|
-
return
|
|
242
|
+
return filterPasses;
|
|
242
243
|
},
|
|
243
244
|
dereference: true, // needed to dereference types
|
|
244
245
|
});
|
package/dist/modules/utils.js
CHANGED
|
@@ -173,6 +173,7 @@ export const currentFileDir = (metaUrl) => {
|
|
|
173
173
|
}
|
|
174
174
|
return __dirname;
|
|
175
175
|
};
|
|
176
|
+
// in both bundeled and dev mode this always points to the root of the adminforth package (where package.json is)
|
|
176
177
|
export const ADMIN_FORTH_ABSOLUTE_PATH = path.join(currentFileDir(import.meta.url), '..');
|
|
177
178
|
const package_json = JSON.parse(fs.readFileSync(path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'package.json'), 'utf8'));
|
|
178
179
|
export const ADMINFORTH_VERSION = package_json.version;
|
package/modules/codeInjector.ts
CHANGED
|
@@ -230,13 +230,13 @@ class CodeInjector implements ICodeInjector {
|
|
|
230
230
|
dereference: true, // needed to dereference types
|
|
231
231
|
});
|
|
232
232
|
if (process.env.HEAVY_DEBUG) {
|
|
233
|
-
console.log('🪲 await fsExtra.copy
|
|
233
|
+
console.log('🪲 await fsExtra.copy copy single file', src, dest);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
}));
|
|
237
237
|
} else {
|
|
238
238
|
if (process.env.HEAVY_DEBUG) {
|
|
239
|
-
console.log(`🪲 await fsExtra.copy from ${path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'spa')}, ${CodeInjector.SPA_TMP_PATH}`);
|
|
239
|
+
console.log(`🪲 await fsExtra.copy from ${path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'spa')}, -> ${CodeInjector.SPA_TMP_PATH}`);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
// try to rm SPA_TMP_PATH/src/types directory
|
|
@@ -249,11 +249,12 @@ class CodeInjector implements ICodeInjector {
|
|
|
249
249
|
// overwrite can't be used to not destroy cache
|
|
250
250
|
await fsExtra.copy(path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'spa'), CodeInjector.SPA_TMP_PATH, {
|
|
251
251
|
filter: (src) => {
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
const filterPasses = !src.includes('/adminforth/spa/node_modules') && !src.includes('/adminforth/spa/dist')
|
|
253
|
+
if (process.env.HEAVY_DEBUG && !filterPasses) {
|
|
254
|
+
console.log('🪲 await fsExtra.copy filtered out', src);
|
|
254
255
|
}
|
|
255
256
|
|
|
256
|
-
return
|
|
257
|
+
return filterPasses
|
|
257
258
|
},
|
|
258
259
|
dereference: true, // needed to dereference types
|
|
259
260
|
});
|
package/modules/utils.ts
CHANGED
|
@@ -178,6 +178,7 @@ export const currentFileDir = (metaUrl) => {
|
|
|
178
178
|
return __dirname;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
// in both bundeled and dev mode this always points to the root of the adminforth package (where package.json is)
|
|
181
182
|
export const ADMIN_FORTH_ABSOLUTE_PATH = path.join(currentFileDir(import.meta.url), '..');
|
|
182
183
|
|
|
183
184
|
const package_json = JSON.parse(fs.readFileSync(path.join(ADMIN_FORTH_ABSOLUTE_PATH, 'package.json'), 'utf8'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adminforth",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.62",
|
|
4
4
|
"description": "OpenSource Vue3 powered forth-generation admin panel",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"prepareDist": "cp -rL spa dist/",
|
|
11
11
|
"rollout": "tsc && npm run prepareDist && npm version patch && npm publish && npm run rollout-doc",
|
|
12
12
|
"rollout-doc": "cd documentation && npm run build && npm run deploy",
|
|
13
|
-
"docs": "typedoc"
|
|
13
|
+
"docs": "typedoc",
|
|
14
|
+
"postinstall": "ln -sf types spa/src/types"
|
|
14
15
|
},
|
|
15
16
|
"author": "devforth.io",
|
|
16
17
|
"license": "ISC",
|