zova-cli-set-front 1.2.19 → 1.2.21
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/index.js
CHANGED
|
@@ -247,7 +247,8 @@ class CliBinBuildRest extends BeanCliBase {
|
|
|
247
247
|
_prepareBundleModules() {
|
|
248
248
|
const modules = [];
|
|
249
249
|
for (const module of this.modulesMeta.modulesArray) {
|
|
250
|
-
|
|
250
|
+
const moduleRoot = module.root.replaceAll('\\', '/');
|
|
251
|
+
if (moduleRoot.includes('/src/module/') || moduleRoot.includes('/src/suite/')) {
|
|
251
252
|
modules.push(module.info.fullName);
|
|
252
253
|
}
|
|
253
254
|
}
|
|
@@ -366,11 +367,13 @@ class CliBinBuildRest extends BeanCliBase {
|
|
|
366
367
|
srcDir
|
|
367
368
|
}) {
|
|
368
369
|
let indexContent = `import type { IIconRecord } from 'zova-module-a-icon';
|
|
370
|
+
import type { TypePagePathSchema } from 'zova-module-a-router';
|
|
369
371
|
export type { IIconRecord } from 'zova-module-a-icon';
|
|
370
372
|
export type { IPagePathRecord } from 'zova-module-a-router';
|
|
371
373
|
`;
|
|
372
374
|
indexContent += await this._prepareResourcesIndex_rest(srcDir);
|
|
373
375
|
indexContent += await this._prepareResourcesIndex_icons(srcDir);
|
|
376
|
+
indexContent += await this._prepareResourcesIndex_pages(srcDir);
|
|
374
377
|
await fse.writeFile(path.join(srcDir, 'index.ts'), indexContent);
|
|
375
378
|
}
|
|
376
379
|
async _prepareResourcesIndex_rest(srcDir) {
|
|
@@ -398,6 +401,18 @@ export type { IPagePathRecord } from 'zova-module-a-router';
|
|
|
398
401
|
const content = `export function $iconName<K extends keyof IIconRecord>(name: K): any {
|
|
399
402
|
return name;
|
|
400
403
|
}
|
|
404
|
+
`;
|
|
405
|
+
return content;
|
|
406
|
+
}
|
|
407
|
+
async _prepareResourcesIndex_pages(_srcDir) {
|
|
408
|
+
const content = `declare module 'zova-module-a-router' {
|
|
409
|
+
export interface IPagePathRecord {
|
|
410
|
+
'/': TypePagePathSchema<undefined, undefined>;
|
|
411
|
+
'presetLogin': TypePagePathSchema<undefined, undefined>;
|
|
412
|
+
'presetErrorExpired': TypePagePathSchema<undefined, undefined>;
|
|
413
|
+
'presetResource': TypePagePathSchema<undefined, undefined>;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
401
416
|
`;
|
|
402
417
|
return content;
|
|
403
418
|
}
|
|
@@ -24,5 +24,6 @@ export declare class CliBinBuildRest extends BeanCliBase {
|
|
|
24
24
|
_prepareResourcesIndex({ srcDir }: IBinBuildRestContext): Promise<void>;
|
|
25
25
|
_prepareResourcesIndex_rest(srcDir: string): Promise<string>;
|
|
26
26
|
_prepareResourcesIndex_icons(_srcDir: string): Promise<string>;
|
|
27
|
+
_prepareResourcesIndex_pages(_srcDir: string): Promise<string>;
|
|
27
28
|
}
|
|
28
29
|
export {};
|
package/package.json
CHANGED