zova-cli-set-front 1.2.20 → 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
|
@@ -367,11 +367,13 @@ class CliBinBuildRest extends BeanCliBase {
|
|
|
367
367
|
srcDir
|
|
368
368
|
}) {
|
|
369
369
|
let indexContent = `import type { IIconRecord } from 'zova-module-a-icon';
|
|
370
|
+
import type { TypePagePathSchema } from 'zova-module-a-router';
|
|
370
371
|
export type { IIconRecord } from 'zova-module-a-icon';
|
|
371
372
|
export type { IPagePathRecord } from 'zova-module-a-router';
|
|
372
373
|
`;
|
|
373
374
|
indexContent += await this._prepareResourcesIndex_rest(srcDir);
|
|
374
375
|
indexContent += await this._prepareResourcesIndex_icons(srcDir);
|
|
376
|
+
indexContent += await this._prepareResourcesIndex_pages(srcDir);
|
|
375
377
|
await fse.writeFile(path.join(srcDir, 'index.ts'), indexContent);
|
|
376
378
|
}
|
|
377
379
|
async _prepareResourcesIndex_rest(srcDir) {
|
|
@@ -399,6 +401,18 @@ export type { IPagePathRecord } from 'zova-module-a-router';
|
|
|
399
401
|
const content = `export function $iconName<K extends keyof IIconRecord>(name: K): any {
|
|
400
402
|
return name;
|
|
401
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
|
+
}
|
|
402
416
|
`;
|
|
403
417
|
return content;
|
|
404
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