zova-module-a-bean 5.1.36 → 5.1.37
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/cli/controller/metadata/generate.ts +6 -8
- package/cli/controller/metadata/generateFileComponent.ts +3 -3
- package/cli/controller/metadata/generateFilePage.ts +3 -3
- package/cli/controller/metadata/generateMetaComponent.ts +2 -2
- package/cli/controller/metadata/generateMetaPage.ts +4 -4
- package/cli/controller/metadata/types.ts +0 -1
- package/dist/.metadata/index.d.ts +6 -6
- package/dist/.metadata/index.d.ts.map +1 -1
- package/dist/.metadata/this.d.ts +1 -1
- package/dist/bean/sys.onion.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/bean.d.ts +2 -2
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/useAopMethod.d.ts +1 -1
- package/dist/service/aop.d.ts +4 -4
- package/dist/service/onion_.d.ts +2 -2
- package/dist/types/aop.d.ts +2 -2
- package/dist/types/aop.d.ts.map +1 -1
- package/dist/types/aopMethod.d.ts +2 -2
- package/dist/types/index.d.ts +6 -6
- package/dist-cli/controller/metadata/generate.js +6 -8
- package/dist-cli/controller/metadata/generateFileComponent.js +3 -3
- package/dist-cli/controller/metadata/generateFilePage.js +3 -3
- package/dist-cli/controller/metadata/generateMetaComponent.js +2 -2
- package/dist-cli/controller/metadata/generateMetaPage.js +4 -4
- package/package.json +2 -2
- package/src/.metadata/index.ts +7 -7
- package/src/.metadata/this.ts +1 -1
- package/src/bean/sys.onion.ts +3 -3
- package/src/index.ts +3 -3
- package/src/lib/bean.ts +2 -2
- package/src/lib/index.ts +4 -4
- package/src/lib/useAopMethod.ts +2 -2
- package/src/service/aop.ts +5 -5
- package/src/service/onion_.ts +3 -3
- package/src/types/aop.ts +2 -2
- package/src/types/aopMethod.ts +2 -2
- package/src/types/index.ts +6 -6
|
@@ -41,14 +41,13 @@ function _parseControllerInfo(
|
|
|
41
41
|
globFile: IGlobBeanFile,
|
|
42
42
|
): IControllerInfo | undefined {
|
|
43
43
|
const { className, fileContent, fileNameJSRelative, file } = globFile;
|
|
44
|
-
const matches = fileNameJSRelative.match(
|
|
44
|
+
const matches = fileNameJSRelative.match(/^\.\.\/(page|component)\/(.+?)\/controller(\.tsx?)$/);
|
|
45
45
|
if (!matches) return;
|
|
46
46
|
const type = matches[1];
|
|
47
47
|
if (!['page', 'component'].includes(type)) return;
|
|
48
48
|
const name = matches[2];
|
|
49
49
|
const nameCapitalize = toUpperCaseFirstChar(name);
|
|
50
|
-
const
|
|
51
|
-
const controllerExtTs = controllerExtJs.replace('.js', '.ts');
|
|
50
|
+
const controllerExtTs = matches[3];
|
|
52
51
|
// componentOptions
|
|
53
52
|
const componentOptionsMatched = fileContent.match(
|
|
54
53
|
/static \$componentOptions[^=]* = (\{[\s\S]*?\});/,
|
|
@@ -80,7 +79,7 @@ function _parseControllerInfo(
|
|
|
80
79
|
const fileRenderFirst = path.join(options.modulePath, `src/${type}/${name}/render.tsx`);
|
|
81
80
|
const hasRenderFirst = fse.existsSync(fileRenderFirst);
|
|
82
81
|
const classNameRenderFirst = `Render${type === 'page' ? 'Page' : ''}${nameCapitalize}`;
|
|
83
|
-
const importRenderFirst = `import { ${classNameRenderFirst} } from '../../${type}/${name}/render.
|
|
82
|
+
const importRenderFirst = `import { ${classNameRenderFirst} } from '../../${type}/${name}/render.tsx';`;
|
|
84
83
|
const fileRenderOthers = globbySync(`src/${type}/${name}/render.*.tsx`, {
|
|
85
84
|
cwd: options.modulePath,
|
|
86
85
|
});
|
|
@@ -92,13 +91,13 @@ function _parseControllerInfo(
|
|
|
92
91
|
);
|
|
93
92
|
const importRenderOthers: string[] = nameRenderOthers.map(
|
|
94
93
|
item =>
|
|
95
|
-
`import { ${`Render${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/render.${item}.
|
|
94
|
+
`import { ${`Render${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/render.${item}.tsx';`,
|
|
96
95
|
);
|
|
97
96
|
// style
|
|
98
97
|
const fileStyleFirst = path.join(options.modulePath, `src/${type}/${name}/style.ts`);
|
|
99
98
|
const hasStyleFirst = fse.existsSync(fileStyleFirst);
|
|
100
99
|
const classNameStyleFirst = `Style${type === 'page' ? 'Page' : ''}${nameCapitalize}`;
|
|
101
|
-
const importStyleFirst = `import { ${classNameStyleFirst} } from '../../${type}/${name}/style.
|
|
100
|
+
const importStyleFirst = `import { ${classNameStyleFirst} } from '../../${type}/${name}/style.ts';`;
|
|
102
101
|
const fileStyleOthers = globbySync(`src/${type}/${name}/style.*.ts`, { cwd: options.modulePath });
|
|
103
102
|
const nameStyleOthers: string[] = fileStyleOthers.map(item => /style\.(.*)\.ts/.exec(item)![1]);
|
|
104
103
|
const classNameStyleOthers: string[] = nameStyleOthers.map(
|
|
@@ -106,14 +105,13 @@ function _parseControllerInfo(
|
|
|
106
105
|
);
|
|
107
106
|
const importStyleOthers: string[] = nameStyleOthers.map(
|
|
108
107
|
item =>
|
|
109
|
-
`import { ${`Style${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/style.${item}.
|
|
108
|
+
`import { ${`Style${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/style.${item}.ts';`,
|
|
110
109
|
);
|
|
111
110
|
// ok
|
|
112
111
|
return {
|
|
113
112
|
type,
|
|
114
113
|
name,
|
|
115
114
|
nameCapitalize,
|
|
116
|
-
controllerExtJs,
|
|
117
115
|
controllerExtTs,
|
|
118
116
|
componentOptions,
|
|
119
117
|
hasComponentOptions,
|
|
@@ -16,7 +16,7 @@ export async function generateFileComponent(
|
|
|
16
16
|
type,
|
|
17
17
|
name,
|
|
18
18
|
nameCapitalize,
|
|
19
|
-
|
|
19
|
+
controllerExtTs,
|
|
20
20
|
hasComponentOptions,
|
|
21
21
|
nameProps,
|
|
22
22
|
hasProps,
|
|
@@ -61,7 +61,7 @@ export async function generateFileComponent(
|
|
|
61
61
|
if (hasProps) _contentImportTypeController.push(nameProps);
|
|
62
62
|
if (_contentImportTypeController.length > 0) {
|
|
63
63
|
contentImports.push(
|
|
64
|
-
`import type { ${_contentImportTypeController.join(', ')} } from '../../component/${name}/controller${
|
|
64
|
+
`import type { ${_contentImportTypeController.join(', ')} } from '../../component/${name}/controller${controllerExtTs}';`,
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
if (type === 'component' && name === 'routedDialog') {
|
|
@@ -74,7 +74,7 @@ export async function generateFileComponent(
|
|
|
74
74
|
contentImports.push("import { prepareComponentOptions, useController } from 'zova';");
|
|
75
75
|
// controller
|
|
76
76
|
contentImports.push(
|
|
77
|
-
`import { ${className} } from '../../component/${name}/controller${
|
|
77
|
+
`import { ${className} } from '../../component/${name}/controller${controllerExtTs}';`,
|
|
78
78
|
);
|
|
79
79
|
// render
|
|
80
80
|
if (hasRenderFirst) {
|
|
@@ -15,7 +15,7 @@ export async function generateFilePage(
|
|
|
15
15
|
const {
|
|
16
16
|
name,
|
|
17
17
|
nameCapitalize,
|
|
18
|
-
|
|
18
|
+
controllerExtTs,
|
|
19
19
|
importRenderFirst,
|
|
20
20
|
hasRenderFirst,
|
|
21
21
|
classNameRenderFirst,
|
|
@@ -29,7 +29,7 @@ export async function generateFilePage(
|
|
|
29
29
|
// controller
|
|
30
30
|
contentImports.push("import { createZovaComponentPage } from 'zova';");
|
|
31
31
|
contentImports.push(
|
|
32
|
-
`import { ControllerPage${nameCapitalize} } from '../../page/${name}/controller${
|
|
32
|
+
`import { ControllerPage${nameCapitalize} } from '../../page/${name}/controller${controllerExtTs}';`,
|
|
33
33
|
);
|
|
34
34
|
// render
|
|
35
35
|
if (hasRenderFirst) {
|
|
@@ -45,7 +45,7 @@ export async function generateFilePage(
|
|
|
45
45
|
if (hasSchemaQuery) _contentImports_parts.push(nameSchemaQuery);
|
|
46
46
|
if (_contentImports_parts.length > 0) {
|
|
47
47
|
contentImports.push(
|
|
48
|
-
`import { ${_contentImports_parts.join(', ')} } from '../../page/${name}/controller${
|
|
48
|
+
`import { ${_contentImports_parts.join(', ')} } from '../../page/${name}/controller${controllerExtTs}';`,
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
//
|
|
@@ -19,8 +19,8 @@ export function generateMetaComponent(
|
|
|
19
19
|
const { name, nameCapitalize } = controllerInfo;
|
|
20
20
|
const componentFullName = `${moduleName}:${name}`;
|
|
21
21
|
const componentName2 = `Z${nameCapitalize}`;
|
|
22
|
-
contentImports.push(`export * from './component/${name}.
|
|
23
|
-
contentImports.push(`import { ${componentName2} } from './component/${name}.
|
|
22
|
+
contentImports.push(`export * from './component/${name}.ts';`);
|
|
23
|
+
contentImports.push(`import { ${componentName2} } from './component/${name}.ts';`);
|
|
24
24
|
contentComponents.push(`'${name}': ${componentName2},`);
|
|
25
25
|
contentRecords.push(`'${componentFullName}': ${className};`);
|
|
26
26
|
contentRecords2.push(`'${componentFullName}': typeof ${componentName2};`);
|
|
@@ -28,13 +28,13 @@ export async function generateMetaPage(
|
|
|
28
28
|
const { name, hasSchemaParams, hasSchemaQuery } = controllerInfo;
|
|
29
29
|
const namespace = `NS${className}`;
|
|
30
30
|
const namespaceRest = _combineModuleNameControllerName(moduleName, className);
|
|
31
|
-
contentImports.push(`export * from './page/${name}.
|
|
31
|
+
contentImports.push(`export * from './page/${name}.ts';`);
|
|
32
32
|
if (hasSchemaParams || hasSchemaQuery) {
|
|
33
|
-
contentImports.push(`import { ${namespace} } from './page/${name}.
|
|
33
|
+
contentImports.push(`import { ${namespace} } from './page/${name}.ts';`);
|
|
34
34
|
// rest
|
|
35
35
|
const restIndexFileRelative = path.relative(
|
|
36
36
|
srcDirRest,
|
|
37
|
-
path.join(options.modulePath, `src/.metadata/page/${name}.
|
|
37
|
+
path.join(options.modulePath, `src/.metadata/page/${name}.ts`),
|
|
38
38
|
);
|
|
39
39
|
contentImportsRest.push(
|
|
40
40
|
`import { ${namespace} as ${namespaceRest} } from '${restIndexFileRelative}';`,
|
|
@@ -102,7 +102,7 @@ export async function generateMetaPage(
|
|
|
102
102
|
// combine
|
|
103
103
|
const content = `/** pages: begin */
|
|
104
104
|
${contentImports.join('\n')}
|
|
105
|
-
export * from '../routes.
|
|
105
|
+
export * from '../routes.ts';
|
|
106
106
|
${contentPathRecords.length > 0 ? "import { TypePagePathSchema } from 'zova-module-a-router';" : ''}
|
|
107
107
|
import 'zova';
|
|
108
108
|
declare module 'zova-module-a-router' {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** sys: begin */
|
|
2
|
-
export * from '../bean/sys.onion.
|
|
2
|
+
export * from '../bean/sys.onion.ts';
|
|
3
3
|
import 'zova';
|
|
4
4
|
declare module 'zova' {
|
|
5
5
|
}
|
|
@@ -13,7 +13,7 @@ declare module 'zova-module-a-bean' {
|
|
|
13
13
|
}
|
|
14
14
|
/** sys: end */
|
|
15
15
|
/** sys: begin */
|
|
16
|
-
import { SysOnion } from '../bean/sys.onion.
|
|
16
|
+
import type { SysOnion } from '../bean/sys.onion.ts';
|
|
17
17
|
import 'zova';
|
|
18
18
|
declare module 'zova' {
|
|
19
19
|
interface IBeanRecordGeneral {
|
|
@@ -22,8 +22,8 @@ declare module 'zova' {
|
|
|
22
22
|
}
|
|
23
23
|
/** sys: end */
|
|
24
24
|
/** service: begin */
|
|
25
|
-
export * from '../service/aop.
|
|
26
|
-
export * from '../service/onion_.
|
|
25
|
+
export * from '../service/aop.ts';
|
|
26
|
+
export * from '../service/onion_.ts';
|
|
27
27
|
import 'zova-module-a-bean';
|
|
28
28
|
declare module 'zova-module-a-bean' {
|
|
29
29
|
interface IServiceRecord {
|
|
@@ -40,7 +40,7 @@ declare module 'zova-module-a-bean' {
|
|
|
40
40
|
}
|
|
41
41
|
/** service: end */
|
|
42
42
|
/** service: begin */
|
|
43
|
-
import { ServiceAop } from '../service/aop.
|
|
43
|
+
import type { ServiceAop } from '../service/aop.ts';
|
|
44
44
|
import 'zova';
|
|
45
45
|
declare module 'zova' {
|
|
46
46
|
interface IBeanRecordGeneral {
|
|
@@ -49,7 +49,7 @@ declare module 'zova' {
|
|
|
49
49
|
}
|
|
50
50
|
/** service: end */
|
|
51
51
|
/** monkeySys: begin */
|
|
52
|
-
export * from '../monkeySys.
|
|
52
|
+
export * from '../monkeySys.ts';
|
|
53
53
|
/** monkeySys: end */
|
|
54
54
|
/** scope: begin */
|
|
55
55
|
import { BeanScopeBase, type BeanScopeUtil } from 'zova';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,iBAAiB;AACjB,cAAc,sBAAsB,CAAC;AAErC,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;CAGrB;AACD,OAAO,QAAQ,oBAAoB,CAAC;IAE5B,UAAiB,QAAQ;KAGxB;IAED,UAAiB,QAAQ;QACvB,IAAI,aAAa,IAAI,kBAAkB,CAAC;QACxC,IAAI,UAAU,IAAI,cAAc,CAAC;KAElC;CACR;AACD,eAAe;AACf,iBAAiB;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,iBAAiB;AACjB,cAAc,sBAAsB,CAAC;AAErC,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;CAGrB;AACD,OAAO,QAAQ,oBAAoB,CAAC;IAE5B,UAAiB,QAAQ;KAGxB;IAED,UAAiB,QAAQ;QACvB,IAAI,aAAa,IAAI,kBAAkB,CAAC;QACxC,IAAI,UAAU,IAAI,cAAc,CAAC;KAElC;CACR;AACD,eAAe;AACf,iBAAiB;AACjB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,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ptionsMatch, IOnionOptionsMeta } from '../types/onion.
|
|
2
|
+
import type { IOnionOptionsEnable, IOnionOptionsMatch, IOnionOptionsMeta } from '../types/onion.ts';
|
|
3
3
|
export declare class SysOnion extends BeanBase {
|
|
4
4
|
private __instances;
|
|
5
5
|
protected __get__(prop: string): any;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './.metadata/index.
|
|
2
|
-
export * from './lib/index.
|
|
3
|
-
export * from './types/index.
|
|
1
|
+
export * from './.metadata/index.ts';
|
|
2
|
+
export * from './lib/index.ts';
|
|
3
|
+
export * from './types/index.ts';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/lib/bean.ts","../src/service/onion_.ts","../src/bean/sys.onion.ts","../src/types/aopMethod.ts","../src/service/aop.ts","../src/monkeySys.ts","../src/lib/scope.ts","../src/.metadata/index.ts","../src/lib/useAopMethod.ts","../src/types/onion.ts"],"sourcesContent":["import { createBeanDecorator } from 'zova';\nexport function Sys() {\n return createBeanDecorator('sys', 'sys');\n}\nexport function Bean() {\n return createBeanDecorator('bean', 'ctx');\n}\nexport function Service() {\n return createBeanDecorator('service', 'ctx');\n}\nexport function Tool() {\n return createBeanDecorator('tool', 'app');\n}\nexport function Data() {\n return createBeanDecorator('data', 'new');\n}\nexport function Controller() {\n return createBeanDecorator('controller', 'ctx');\n}\nexport function Render() {\n return createBeanDecorator('render', 'ctx');\n}\nexport function Style() {\n return createBeanDecorator('style', 'ctx');\n}\nexport function Aop(options) {\n return createBeanDecorator('aop', 'sys', true, options);\n}\nexport function AopMethod(options) {\n return createBeanDecorator('aopMethod', 'sys', true, options);\n}","var _dec, _dec2, _dec3, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { compose as _compose } from '@cabloy/compose';\nimport { swapDeps } from '@cabloy/deps';\nimport { getOnionScenesMeta } from '@cabloy/module-info';\nimport { appResource, BeanSimple, cast, deepExtend, ProxyDisable } from 'zova';\nimport { Service } from '../lib/bean.js';\n\n// const SymbolOnionsEnabled = Symbol('SymbolOnionsEnabled');\n// const SymbolOnionsEnabledWrapped = Symbol('SymbolOnionsEnabledWrapped');\n\nexport let ServiceOnion = (_dec = ProxyDisable(), _dec2 = Service(), _dec3 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec(_class = _dec2(_class = _dec3(_class = class ServiceOnion extends BeanSimple {\n constructor(...args) {\n super(...args);\n this.sysOnion = void 0;\n this.sceneName = void 0;\n this.sceneMeta = void 0;\n this.onionsAll = void 0;\n }\n // private [SymbolOnionsEnabled]: Record<string, IOnionSlice<OPTIONS, ONIONNAME>[]> = {};\n // private [SymbolOnionsEnabledWrapped]: Record<string, Function[]> = {};\n\n __init__(sceneName, sysOnion) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n const modulesMeta = this.sys.meta.module.getModulesMeta();\n if (!modulesMeta) {\n throw new Error('module registry has been disposed');\n }\n this.sysOnion = sysOnion;\n this.sceneName = sceneName;\n this.sceneMeta = getOnionScenesMeta(modulesMeta.modules)[this.sceneName];\n if (this.sceneMeta.optionsPackage) {\n this._initOnionsAll(modulesMeta);\n this._swapOnions(this.onionsAll);\n }\n }\n _initOnionsAll(modulesMeta) {\n this.onionsAll = [];\n for (const moduleName in modulesMeta.modules) {\n const module = modulesMeta.modules[moduleName];\n const nodeItems = module.info.onionsMeta?.onionsConfig?.[this.sceneName];\n if (!nodeItems) continue;\n for (const itemName in nodeItems) {\n let itemOptions = nodeItems[itemName];\n // extend config\n const onionName = `${moduleName}:${itemName}`;\n const optionsConfig = this.sys.config.onions[this.sceneName]?.[onionName];\n if (optionsConfig) {\n itemOptions = deepExtend({}, itemOptions, optionsConfig);\n }\n this.onionsAll.push({\n name: onionName,\n options: itemOptions\n });\n }\n }\n }\n _swapOnions(onions) {\n swapDeps(onions, {\n name: 'name',\n dependencies: item => {\n const onionOptions = cast(item).options;\n return onionOptions.dependencies;\n },\n dependents: item => {\n const onionOptions = cast(item).options;\n return onionOptions.dependents;\n }\n });\n }\n\n // getOnionsEnabled(selector?: string) {\n // if (!selector) selector = '';\n // if (!this[SymbolOnionsEnabled][selector]) {\n // this[SymbolOnionsEnabled][selector] = this.onionsGlobal.filter(onionSlice => {\n // const onionOptions = onionSlice.beanOptions.options as IOnionOptionsEnable & IOnionOptionsMatch<string>;\n // return this.sysOnion.checkOnionOptionsEnabled(onionOptions, selector);\n // }) as unknown as IOnionSlice<OPTIONS, ONIONNAME>[];\n // }\n // return this[SymbolOnionsEnabled][selector];\n // }\n\n // getOnionsEnabledOfMeta(beanName: string, selector?: string) {\n // return this.getOnionsEnabled(selector).filter(item => item.beanOptions.name === beanName);\n // }\n\n // getOnionsEnabledWrapped(wrapFn: Function, selector?: string) {\n // if (!selector) selector = '';\n // if (!this[SymbolOnionsEnabledWrapped][selector]) {\n // const onions = this.getOnionsEnabled(selector);\n // this[SymbolOnionsEnabledWrapped][selector] = onions.map(item => {\n // return wrapFn(item);\n // });\n // }\n // return this[SymbolOnionsEnabledWrapped][selector];\n // }\n\n // getOnionSlice(onionName: ONIONNAME): IOnionSlice<OPTIONS, ONIONNAME> {\n // return this.onionsNormal[onionName];\n // }\n\n // getOnionOptions<OPTIONS>(onionName: ONIONNAME): OPTIONS | undefined {\n // return this.getOnionSlice(onionName).beanOptions.options as OPTIONS | undefined;\n // }\n\n async loadOnionsFromPackage(selector, matchThis, ...matchArgs) {\n // onionItems\n const onionItems = this.getOnionsEnabled(this.onionsAll, selector, matchThis, ...matchArgs);\n // loadOnions\n return await this.loadOnions(onionItems, selector, matchThis, ...matchArgs);\n }\n async loadOnions(onionItems, selector, matchThis, ...matchArgs) {\n if (!Array.isArray(onionItems)) onionItems = [onionItems];\n if (onionItems.length === 0) return [];\n // load modules\n const moduleNames = onionItems.map(item => item.name.split(':')[0]);\n await this._loadModules(moduleNames);\n // onion slices\n const onionSlices = [];\n for (const item of onionItems) {\n const beanFullName = item.name.replace(':', `.${this.sceneName}.`);\n const beanOptions = appResource.getBean(beanFullName);\n if (!beanOptions) throw new Error(`behavior not found: ${beanFullName}`);\n // options\n let options;\n if (beanOptions.optionsPrimitive) {\n options = item.options !== undefined ? item.options : beanOptions.options;\n } else {\n options = item.options !== undefined ? deepExtend({}, beanOptions.options, item.options) : beanOptions.options;\n }\n // ok\n onionSlices.push({\n name: item.name,\n options,\n beanFullName\n });\n }\n // optionsPackage\n if (this.sceneMeta.optionsPackage) return onionSlices;\n // swap\n this._swapOnions(onionSlices);\n // filter\n return this.getOnionsEnabled(onionSlices, selector, matchThis, ...matchArgs);\n }\n getOnionsEnabled(onions, selector, matchThis, ...matchArgs) {\n if (!onions) return [];\n return onions.filter(onionItem => {\n const onionOptions = onionItem.options;\n return this.sysOnion.checkOnionOptionsEnabled(onionOptions, selector, matchThis, ...matchArgs);\n });\n }\n compose(onions, executeCustom) {\n // fns\n const fns = [];\n for (const item of onions) {\n fns.push(this._wrapOnion(item, executeCustom));\n }\n // compose\n return _compose(fns);\n }\n async _loadModules(moduleNames) {\n // load modules\n moduleNames = Array.from(new Set(moduleNames)).filter(item => !this.sys.meta.module.get(item));\n await this.sys.meta.module.loadModules(moduleNames);\n }\n\n /** internal */\n _wrapOnion(item, executeCustom) {\n const fn = (data, next) => {\n return executeCustom(item, data, next);\n };\n fn._name = item.name;\n return fn;\n }\n}) || _class) || _class) || _class);","var _dec, _dec2, _dec3, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { checkMeta, isNil, matchSelector } from '@cabloy/utils';\nimport { BeanBase, ProxyDisable } from 'zova';\nimport { Sys } from '../lib/bean.js';\nimport { ServiceOnion } from '../service/onion_.js';\nexport let SysOnion = (_dec = ProxyDisable(), _dec2 = Sys(), _dec3 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec(_class = _dec2(_class = _dec3(_class = class SysOnion extends BeanBase {\n constructor(...args) {\n super(...args);\n this.__instances = {};\n }\n __get__(prop) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n if (!this.__instances[prop]) {\n this.__instances[prop] = this.bean._newBeanSimple(ServiceOnion, false, prop, this);\n }\n return this.__instances[prop];\n }\n checkOnionOptionsEnabled(options, selector, matchThis, ...matchArgs) {\n if (options.enable === false) return false;\n if (!this.checkOnionOptionsMeta(options.meta)) return false;\n if (isNil(selector) || selector === false) return true;\n if (isNil(options.match) && isNil(options.ignore)) return true;\n return !isNil(options.match) && __onionMatchSelector(options.match, selector, matchThis, ...matchArgs) || !isNil(options.ignore) && !__onionMatchSelector(options.ignore, selector, matchThis, ...matchArgs);\n }\n checkOnionOptionsMeta(meta) {\n return checkMeta(meta, this.sys.config.meta);\n }\n}) || _class) || _class) || _class);\nfunction __onionMatchSelector(match, selector, matchThis, ...matchArgs) {\n return matchSelector(match, selector, matchThis, ...matchArgs);\n}","export const SymbolDecoratorUseAopMethod = Symbol('SymbolDecoratorUseAopMethod');","var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { appMetadata, appResource, BeanBase, ProxyDisable, Use } from 'zova';\nimport { SysOnion } from '../bean/sys.onion.js';\nimport { Service } from '../lib/bean.js';\nimport { SymbolDecoratorUseAopMethod } from '../types/aopMethod.js';\nexport let ServiceAop = (_dec = ProxyDisable(), _dec2 = Service(), _dec3 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec4 = Use(), _dec5 = Reflect.metadata(\"design:type\", typeof SysOnion === \"undefined\" ? Object : SysOnion), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class ServiceAop extends BeanBase {\n constructor(...args) {\n super(...args);\n _initializerDefineProperty(this, \"$$sysOnion\", _descriptor, this);\n }\n async findAopsMatched(beanFullName) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n // beanOptions\n const beanOptions = appResource.getBean(beanFullName);\n if (!beanOptions) return;\n // loadOnions\n return await this.$$sysOnion.aop.loadOnionsFromPackage(beanOptions.beanFullName);\n }\n async findAopMethodsMatched(beanFullName) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n // beanOptions\n const beanOptions = appResource.getBean(beanFullName);\n if (!beanOptions) return;\n const aopMethodsMatchedAll = {};\n const uses = appMetadata.getMetadata(SymbolDecoratorUseAopMethod, beanOptions.beanClass.prototype);\n for (const prop in uses) {\n const onionItems = [];\n const aopMethods = uses[prop];\n for (const aopMethod of aopMethods) {\n onionItems.push({\n name: aopMethod.onionName,\n options: aopMethod.options\n });\n }\n // load onions\n const onionSlices = await this.$$sysOnion.aopMethod.loadOnions(onionItems);\n // aopMethodsMatched\n const aopMethodsMatched = [];\n for (const onionSlice of onionSlices) {\n const beanInstance = await this.sys.bean._getBean(onionSlice.beanFullName, true);\n aopMethodsMatched.push({\n onionName: onionSlice.name,\n beanInstance,\n options: onionSlice.options\n });\n }\n aopMethodsMatchedAll[prop] = aopMethodsMatched;\n }\n return Object.keys(aopMethodsMatchedAll).length === 0 ? undefined : aopMethodsMatchedAll;\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$sysOnion\", [_dec4, _dec5], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class) || _class);","import { BeanSimple } from 'zova';\nexport class MonkeySys extends BeanSimple {\n async sysInitialize() {\n const modulesMeta = this.sys.meta.module.getModulesMeta();\n if (!modulesMeta) {\n throw new Error('module registry has been disposed');\n }\n let beansPreload = [];\n for (const moduleName in modulesMeta.modules) {\n const module = modulesMeta.modules[moduleName];\n if (!module.info.onionsMeta?.beansPreload) continue;\n beansPreload = beansPreload.concat(module.info.onionsMeta?.beansPreload);\n }\n const promises = beansPreload.map(item => {\n return this.sys.bean._getBean(item, false);\n });\n await Promise.all(promises);\n }\n}","import { createBeanDecorator } from 'zova';\nexport function Scope() {\n return createBeanDecorator('scope', 'app', false);\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** sys: begin */\nexport * from '../bean/sys.onion.js';\nimport 'zova';\n/** sys: end */\n/** sys: begin */\nimport { SysOnion } from '../bean/sys.onion.js';\nimport 'zova';\n/** sys: end */\n/** service: begin */\nexport * from '../service/aop.js';\nexport * from '../service/onion_.js';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\nimport { ServiceAop } from '../service/aop.js';\nimport 'zova';\n/** service: end */\n/** monkeySys: begin */\nexport * from '../monkeySys.js';\n/** monkeySys: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from '../lib/scope.js';\nexport let ScopeModuleABean = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec(_class = _dec2(_class = class ScopeModuleABean extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","import { appMetadata, registerMappedClassMetadataKey } from 'zova';\nimport { SymbolDecoratorUseAopMethod } from '../types/aopMethod.js';\nexport function UseAopMethod(aopMethodName, options) {\n return function (target, prop, descriptor) {\n registerMappedClassMetadataKey(target, SymbolDecoratorUseAopMethod);\n const uses = appMetadata.getOwnMetadataMap(true, SymbolDecoratorUseAopMethod, target);\n if (!uses[prop]) uses[prop] = [];\n uses[prop].push({\n onionName: aopMethodName,\n options\n });\n return descriptor;\n };\n}","export const SymbolUseOnionLocal = Symbol('SymbolUseOnionLocal');\nexport const SymbolUseOnionOptions = Symbol('SymbolUseOnionOptions');"],"mappings":";;;;;;;AACA,SAAgB,MAAM;CACpB,OAAO,oBAAoB,OAAO,KAAK;AACzC;AACA,SAAgB,OAAO;CACrB,OAAO,oBAAoB,QAAQ,KAAK;AAC1C;AACA,SAAgB,UAAU;CACxB,OAAO,oBAAoB,WAAW,KAAK;AAC7C;AACA,SAAgB,OAAO;CACrB,OAAO,oBAAoB,QAAQ,KAAK;AAC1C;AACA,SAAgB,OAAO;CACrB,OAAO,oBAAoB,QAAQ,KAAK;AAC1C;AACA,SAAgB,aAAa;CAC3B,OAAO,oBAAoB,cAAc,KAAK;AAChD;AACA,SAAgB,SAAS;CACvB,OAAO,oBAAoB,UAAU,KAAK;AAC5C;AACA,SAAgB,QAAQ;CACtB,OAAO,oBAAoB,SAAS,KAAK;AAC3C;AACA,SAAgB,IAAI,SAAS;CAC3B,OAAO,oBAAoB,OAAO,OAAO,MAAM,OAAO;AACxD;AACA,SAAgB,UAAU,SAAS;CACjC,OAAO,oBAAoB,aAAa,OAAO,MAAM,OAAO;AAC9D;;;AC9BA,IAAI;AAAM,IAAA;AAAO,IAAA;AAAO,IAAA;AAWxB,IAAW,gBAAgB,SAAO,aAAa,GAAG,UAAQ,QAAQ,GAAG,UAAQ,SAAa,EACxF,QAAQ,SACV,CAAC,GAAG,OAAK,WAAS,QAAM,WAAS,QAAM,WAAS,MAAM,qBAAqB,WAAW;CACpF,YAAY,GAAG,MAAM;EACnB,MAAM,GAAG,IAAI;EACb,KAAK,WAAW,KAAK;EACrB,KAAK,YAAY,KAA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,OAAO,SAAU,QAAQ,MAAM,YAAY;EACzC,+BAA+B,QAAQ,2BAA2B;EAClE,MAAM,OAAO,YAAY,kBAAkB,MAAM,6BAA6B,MAAM;EACpF,IAAI,CAAC,KAAK,OAAO,KAAK,QAAQ,CAAC;EAC/B,KAAK,KAAK,CAAC,KAAK;GACd,WAAW;GACX;EACF,CAAC;EACD,OAAO;CACT;AACF;;;ACbA,IAAa,sBAAsB,OAAO,qBAAqB;AAC/D,IAAa,wBAAwB,OAAO,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dec","_dec2","_dec3","_class","__z_BeanInfo","_compose","_dec","_dec2","_dec3","_class","__z_BeanInfo","_dec","_dec2","_class","__z_BeanInfo","__z_BeanInfo"],"sources":["../src/lib/bean.ts","../src/service/onion_.ts","../src/bean/sys.onion.ts","../src/types/aopMethod.ts","../src/service/aop.ts","../src/monkeySys.ts","../src/lib/scope.ts","../src/.metadata/index.ts","../src/lib/useAopMethod.ts","../src/types/onion.ts"],"sourcesContent":["import { createBeanDecorator } from 'zova';\nexport function Sys() {\n return createBeanDecorator('sys', 'sys');\n}\nexport function Bean() {\n return createBeanDecorator('bean', 'ctx');\n}\nexport function Service() {\n return createBeanDecorator('service', 'ctx');\n}\nexport function Tool() {\n return createBeanDecorator('tool', 'app');\n}\nexport function Data() {\n return createBeanDecorator('data', 'new');\n}\nexport function Controller() {\n return createBeanDecorator('controller', 'ctx');\n}\nexport function Render() {\n return createBeanDecorator('render', 'ctx');\n}\nexport function Style() {\n return createBeanDecorator('style', 'ctx');\n}\nexport function Aop(options) {\n return createBeanDecorator('aop', 'sys', true, options);\n}\nexport function AopMethod(options) {\n return createBeanDecorator('aopMethod', 'sys', true, options);\n}","var _dec, _dec2, _dec3, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { compose as _compose } from '@cabloy/compose';\nimport { swapDeps } from '@cabloy/deps';\nimport { getOnionScenesMeta } from '@cabloy/module-info';\nimport { appResource, BeanSimple, cast, deepExtend, ProxyDisable } from 'zova';\nimport { Service } from '../lib/bean.ts';\n\n// const SymbolOnionsEnabled = Symbol('SymbolOnionsEnabled');\n// const SymbolOnionsEnabledWrapped = Symbol('SymbolOnionsEnabledWrapped');\n\nexport let ServiceOnion = (_dec = ProxyDisable(), _dec2 = Service(), _dec3 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec(_class = _dec2(_class = _dec3(_class = class ServiceOnion extends BeanSimple {\n constructor(...args) {\n super(...args);\n this.sysOnion = void 0;\n this.sceneName = void 0;\n this.sceneMeta = void 0;\n this.onionsAll = void 0;\n }\n // private [SymbolOnionsEnabled]: Record<string, IOnionSlice<OPTIONS, ONIONNAME>[]> = {};\n // private [SymbolOnionsEnabledWrapped]: Record<string, Function[]> = {};\n\n __init__(sceneName, sysOnion) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n const modulesMeta = this.sys.meta.module.getModulesMeta();\n if (!modulesMeta) {\n throw new Error('module registry has been disposed');\n }\n this.sysOnion = sysOnion;\n this.sceneName = sceneName;\n this.sceneMeta = getOnionScenesMeta(modulesMeta.modules)[this.sceneName];\n if (this.sceneMeta.optionsPackage) {\n this._initOnionsAll(modulesMeta);\n this._swapOnions(this.onionsAll);\n }\n }\n _initOnionsAll(modulesMeta) {\n this.onionsAll = [];\n for (const moduleName in modulesMeta.modules) {\n const module = modulesMeta.modules[moduleName];\n const nodeItems = module.info.onionsMeta?.onionsConfig?.[this.sceneName];\n if (!nodeItems) continue;\n for (const itemName in nodeItems) {\n let itemOptions = nodeItems[itemName];\n // extend config\n const onionName = `${moduleName}:${itemName}`;\n const optionsConfig = this.sys.config.onions[this.sceneName]?.[onionName];\n if (optionsConfig) {\n itemOptions = deepExtend({}, itemOptions, optionsConfig);\n }\n this.onionsAll.push({\n name: onionName,\n options: itemOptions\n });\n }\n }\n }\n _swapOnions(onions) {\n swapDeps(onions, {\n name: 'name',\n dependencies: item => {\n const onionOptions = cast(item).options;\n return onionOptions.dependencies;\n },\n dependents: item => {\n const onionOptions = cast(item).options;\n return onionOptions.dependents;\n }\n });\n }\n\n // getOnionsEnabled(selector?: string) {\n // if (!selector) selector = '';\n // if (!this[SymbolOnionsEnabled][selector]) {\n // this[SymbolOnionsEnabled][selector] = this.onionsGlobal.filter(onionSlice => {\n // const onionOptions = onionSlice.beanOptions.options as IOnionOptionsEnable & IOnionOptionsMatch<string>;\n // return this.sysOnion.checkOnionOptionsEnabled(onionOptions, selector);\n // }) as unknown as IOnionSlice<OPTIONS, ONIONNAME>[];\n // }\n // return this[SymbolOnionsEnabled][selector];\n // }\n\n // getOnionsEnabledOfMeta(beanName: string, selector?: string) {\n // return this.getOnionsEnabled(selector).filter(item => item.beanOptions.name === beanName);\n // }\n\n // getOnionsEnabledWrapped(wrapFn: Function, selector?: string) {\n // if (!selector) selector = '';\n // if (!this[SymbolOnionsEnabledWrapped][selector]) {\n // const onions = this.getOnionsEnabled(selector);\n // this[SymbolOnionsEnabledWrapped][selector] = onions.map(item => {\n // return wrapFn(item);\n // });\n // }\n // return this[SymbolOnionsEnabledWrapped][selector];\n // }\n\n // getOnionSlice(onionName: ONIONNAME): IOnionSlice<OPTIONS, ONIONNAME> {\n // return this.onionsNormal[onionName];\n // }\n\n // getOnionOptions<OPTIONS>(onionName: ONIONNAME): OPTIONS | undefined {\n // return this.getOnionSlice(onionName).beanOptions.options as OPTIONS | undefined;\n // }\n\n async loadOnionsFromPackage(selector, matchThis, ...matchArgs) {\n // onionItems\n const onionItems = this.getOnionsEnabled(this.onionsAll, selector, matchThis, ...matchArgs);\n // loadOnions\n return await this.loadOnions(onionItems, selector, matchThis, ...matchArgs);\n }\n async loadOnions(onionItems, selector, matchThis, ...matchArgs) {\n if (!Array.isArray(onionItems)) onionItems = [onionItems];\n if (onionItems.length === 0) return [];\n // load modules\n const moduleNames = onionItems.map(item => item.name.split(':')[0]);\n await this._loadModules(moduleNames);\n // onion slices\n const onionSlices = [];\n for (const item of onionItems) {\n const beanFullName = item.name.replace(':', `.${this.sceneName}.`);\n const beanOptions = appResource.getBean(beanFullName);\n if (!beanOptions) throw new Error(`behavior not found: ${beanFullName}`);\n // options\n let options;\n if (beanOptions.optionsPrimitive) {\n options = item.options !== undefined ? item.options : beanOptions.options;\n } else {\n options = item.options !== undefined ? deepExtend({}, beanOptions.options, item.options) : beanOptions.options;\n }\n // ok\n onionSlices.push({\n name: item.name,\n options,\n beanFullName\n });\n }\n // optionsPackage\n if (this.sceneMeta.optionsPackage) return onionSlices;\n // swap\n this._swapOnions(onionSlices);\n // filter\n return this.getOnionsEnabled(onionSlices, selector, matchThis, ...matchArgs);\n }\n getOnionsEnabled(onions, selector, matchThis, ...matchArgs) {\n if (!onions) return [];\n return onions.filter(onionItem => {\n const onionOptions = onionItem.options;\n return this.sysOnion.checkOnionOptionsEnabled(onionOptions, selector, matchThis, ...matchArgs);\n });\n }\n compose(onions, executeCustom) {\n // fns\n const fns = [];\n for (const item of onions) {\n fns.push(this._wrapOnion(item, executeCustom));\n }\n // compose\n return _compose(fns);\n }\n async _loadModules(moduleNames) {\n // load modules\n moduleNames = Array.from(new Set(moduleNames)).filter(item => !this.sys.meta.module.get(item));\n await this.sys.meta.module.loadModules(moduleNames);\n }\n\n /** internal */\n _wrapOnion(item, executeCustom) {\n const fn = (data, next) => {\n return executeCustom(item, data, next);\n };\n fn._name = item.name;\n return fn;\n }\n}) || _class) || _class) || _class);","var _dec, _dec2, _dec3, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { checkMeta, isNil, matchSelector } from '@cabloy/utils';\nimport { BeanBase, ProxyDisable } from 'zova';\nimport { Sys } from '../lib/bean.ts';\nimport { ServiceOnion } from '../service/onion_.ts';\nexport let SysOnion = (_dec = ProxyDisable(), _dec2 = Sys(), _dec3 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec(_class = _dec2(_class = _dec3(_class = class SysOnion extends BeanBase {\n constructor(...args) {\n super(...args);\n this.__instances = {};\n }\n __get__(prop) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n if (!this.__instances[prop]) {\n this.__instances[prop] = this.bean._newBeanSimple(ServiceOnion, false, prop, this);\n }\n return this.__instances[prop];\n }\n checkOnionOptionsEnabled(options, selector, matchThis, ...matchArgs) {\n if (options.enable === false) return false;\n if (!this.checkOnionOptionsMeta(options.meta)) return false;\n if (isNil(selector) || selector === false) return true;\n if (isNil(options.match) && isNil(options.ignore)) return true;\n return !isNil(options.match) && __onionMatchSelector(options.match, selector, matchThis, ...matchArgs) || !isNil(options.ignore) && !__onionMatchSelector(options.ignore, selector, matchThis, ...matchArgs);\n }\n checkOnionOptionsMeta(meta) {\n return checkMeta(meta, this.sys.config.meta);\n }\n}) || _class) || _class) || _class);\nfunction __onionMatchSelector(match, selector, matchThis, ...matchArgs) {\n return matchSelector(match, selector, matchThis, ...matchArgs);\n}","export const SymbolDecoratorUseAopMethod = Symbol('SymbolDecoratorUseAopMethod');","var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { appMetadata, appResource, BeanBase, ProxyDisable, Use } from 'zova';\nimport { SysOnion } from '../bean/sys.onion.ts';\nimport { Service } from '../lib/bean.ts';\nimport { SymbolDecoratorUseAopMethod } from '../types/aopMethod.ts';\nexport let ServiceAop = (_dec = ProxyDisable(), _dec2 = Service(), _dec3 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec4 = Use(), _dec5 = Reflect.metadata(\"design:type\", typeof SysOnion === \"undefined\" ? Object : SysOnion), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class ServiceAop extends BeanBase {\n constructor(...args) {\n super(...args);\n _initializerDefineProperty(this, \"$$sysOnion\", _descriptor, this);\n }\n async findAopsMatched(beanFullName) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n // beanOptions\n const beanOptions = appResource.getBean(beanFullName);\n if (!beanOptions) return;\n // loadOnions\n return await this.$$sysOnion.aop.loadOnionsFromPackage(beanOptions.beanFullName);\n }\n async findAopMethodsMatched(beanFullName) {\n if (process.env.DEV && this.bean.containerType !== 'sys') {\n throw new Error('should in sys container');\n }\n // beanOptions\n const beanOptions = appResource.getBean(beanFullName);\n if (!beanOptions) return;\n const aopMethodsMatchedAll = {};\n const uses = appMetadata.getMetadata(SymbolDecoratorUseAopMethod, beanOptions.beanClass.prototype);\n for (const prop in uses) {\n const onionItems = [];\n const aopMethods = uses[prop];\n for (const aopMethod of aopMethods) {\n onionItems.push({\n name: aopMethod.onionName,\n options: aopMethod.options\n });\n }\n // load onions\n const onionSlices = await this.$$sysOnion.aopMethod.loadOnions(onionItems);\n // aopMethodsMatched\n const aopMethodsMatched = [];\n for (const onionSlice of onionSlices) {\n const beanInstance = await this.sys.bean._getBean(onionSlice.beanFullName, true);\n aopMethodsMatched.push({\n onionName: onionSlice.name,\n beanInstance,\n options: onionSlice.options\n });\n }\n aopMethodsMatchedAll[prop] = aopMethodsMatched;\n }\n return Object.keys(aopMethodsMatchedAll).length === 0 ? undefined : aopMethodsMatchedAll;\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$sysOnion\", [_dec4, _dec5], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class) || _class);","import { BeanSimple } from 'zova';\nexport class MonkeySys extends BeanSimple {\n async sysInitialize() {\n const modulesMeta = this.sys.meta.module.getModulesMeta();\n if (!modulesMeta) {\n throw new Error('module registry has been disposed');\n }\n let beansPreload = [];\n for (const moduleName in modulesMeta.modules) {\n const module = modulesMeta.modules[moduleName];\n if (!module.info.onionsMeta?.beansPreload) continue;\n beansPreload = beansPreload.concat(module.info.onionsMeta?.beansPreload);\n }\n const promises = beansPreload.map(item => {\n return this.sys.bean._getBean(item, false);\n });\n await Promise.all(promises);\n }\n}","import { createBeanDecorator } from 'zova';\nexport function Scope() {\n return createBeanDecorator('scope', 'app', false);\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** sys: begin */\nexport * from '../bean/sys.onion.ts';\nimport 'zova';\n/** sys: end */\n/** sys: begin */\n\nimport 'zova';\n/** sys: end */\n/** service: begin */\nexport * from '../service/aop.ts';\nexport * from '../service/onion_.ts';\nimport 'zova-module-a-bean';\n/** service: end */\n/** service: begin */\n\nimport 'zova';\n/** service: end */\n/** monkeySys: begin */\nexport * from '../monkeySys.ts';\n/** monkeySys: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from '../lib/scope.ts';\nexport let ScopeModuleABean = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-bean\"\n}), _dec(_class = _dec2(_class = class ScopeModuleABean extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","import { appMetadata, registerMappedClassMetadataKey } from 'zova';\nimport { SymbolDecoratorUseAopMethod } from '../types/aopMethod.ts';\nexport function UseAopMethod(aopMethodName, options) {\n return function (target, prop, descriptor) {\n registerMappedClassMetadataKey(target, SymbolDecoratorUseAopMethod);\n const uses = appMetadata.getOwnMetadataMap(true, SymbolDecoratorUseAopMethod, target);\n if (!uses[prop]) uses[prop] = [];\n uses[prop].push({\n onionName: aopMethodName,\n options\n });\n return descriptor;\n };\n}","export const SymbolUseOnionLocal = Symbol('SymbolUseOnionLocal');\nexport const SymbolUseOnionOptions = Symbol('SymbolUseOnionOptions');"],"mappings":";;;;;;;AACA,SAAgB,MAAM;CACpB,OAAO,oBAAoB,OAAO,KAAK;AACzC;AACA,SAAgB,OAAO;CACrB,OAAO,oBAAoB,QAAQ,KAAK;AAC1C;AACA,SAAgB,UAAU;CACxB,OAAO,oBAAoB,WAAW,KAAK;AAC7C;AACA,SAAgB,OAAO;CACrB,OAAO,oBAAoB,QAAQ,KAAK;AAC1C;AACA,SAAgB,OAAO;CACrB,OAAO,oBAAoB,QAAQ,KAAK;AAC1C;AACA,SAAgB,aAAa;CAC3B,OAAO,oBAAoB,cAAc,KAAK;AAChD;AACA,SAAgB,SAAS;CACvB,OAAO,oBAAoB,UAAU,KAAK;AAC5C;AACA,SAAgB,QAAQ;CACtB,OAAO,oBAAoB,SAAS,KAAK;AAC3C;AACA,SAAgB,IAAI,SAAS;CAC3B,OAAO,oBAAoB,OAAO,OAAO,MAAM,OAAO;AACxD;AACA,SAAgB,UAAU,SAAS;CACjC,OAAO,oBAAoB,aAAa,OAAO,MAAM,OAAO;AAC9D;;;AC9BA,IAAIA;AAAMC,IAAAA;AAAOC,IAAAA;AAAOC,IAAAA;AAWxB,IAAW,gBAAgB,SAAO,aAAa,GAAG,UAAQ,QAAQ,GAAG,UAAQC,SAAa,EACxF,QAAQ,SACV,CAAC,GAAGJ,OAAK,WAASC,QAAM,WAASC,QAAM,WAAS,MAAM,qBAAqB,WAAW;CACpF,YAAY,GAAG,MAAM;EACnB,MAAM,GAAG,IAAI;EACb,KAAK,WAAW,KAAK;EACrB,KAAK,YAAY,KAAK;EACtB,KAAK,YAAY,KAAK;EACtB,KAAK,YAAY,KAAK;CACxB;CAIA,SAAS,WAAW,UAAU;EAC5B,IA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EAClE,MAAM,OAAO,YAAY,kBAAkB,MAAM,6BAA6B,MAAM;EACpF,IAAI,CAAC,KAAK,OAAO,KAAK,QAAQ,CAAC;EAC/B,KAAK,KAAK,CAAC,KAAK;GACd,WAAW;GACX;EACF,CAAC;EACD,OAAO;CACT;AACF;;;ACbA,IAAa,sBAAsB,OAAO,qBAAqB;AAC/D,IAAa,wBAAwB,OAAO,uBAAuB"}
|
package/dist/lib/bean.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IDecoratorAopOptions } from '../types/aop.
|
|
2
|
-
import type { IDecoratorAopMethodOptions } from '../types/aopMethod.
|
|
1
|
+
import type { IDecoratorAopOptions } from '../types/aop.ts';
|
|
2
|
+
import type { IDecoratorAopMethodOptions } from '../types/aopMethod.ts';
|
|
3
3
|
export declare function Sys(): ClassDecorator;
|
|
4
4
|
export declare function Bean(): ClassDecorator;
|
|
5
5
|
export declare function Service(): ClassDecorator;
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './bean.
|
|
2
|
-
export * from './scope.
|
|
3
|
-
export * from './useAopMethod.
|
|
4
|
-
export * from './utils.
|
|
1
|
+
export * from './bean.ts';
|
|
2
|
+
export * from './scope.ts';
|
|
3
|
+
export * from './useAopMethod.ts';
|
|
4
|
+
export * from './utils.ts';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IAopMethodRecord } from '../types/aopMethod.
|
|
1
|
+
import type { IAopMethodRecord } from '../types/aopMethod.ts';
|
|
2
2
|
export declare function UseAopMethod<T extends keyof IAopMethodRecord>(aopMethodName: T, options?: Partial<IAopMethodRecord[T]>): PropertyDescriptor & MethodDecorator;
|
|
3
3
|
//# sourceMappingURL=useAopMethod.d.ts.map
|
package/dist/service/aop.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Constructable, IBeanRecord } from 'zova';
|
|
2
2
|
import { BeanBase } from 'zova';
|
|
3
|
-
import type { IAopRecord, IDecoratorAopOptions } from '../types/aop.
|
|
4
|
-
import type { IOnionSlice } from '../types/onion.
|
|
5
|
-
import { SysOnion } from '../bean/sys.onion.
|
|
6
|
-
import { IUseAopMethodPropMetadata } from '../types/aopMethod.
|
|
3
|
+
import type { IAopRecord, IDecoratorAopOptions } from '../types/aop.ts';
|
|
4
|
+
import type { IOnionSlice } from '../types/onion.ts';
|
|
5
|
+
import { SysOnion } from '../bean/sys.onion.ts';
|
|
6
|
+
import { IUseAopMethodPropMetadata } from '../types/aopMethod.ts';
|
|
7
7
|
type AopMethodsMatchedAll = Record<string, IUseAopMethodPropMetadata[]>;
|
|
8
8
|
export declare class ServiceAop extends BeanBase {
|
|
9
9
|
$$sysOnion: SysOnion;
|
package/dist/service/onion_.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { OnionSceneMeta } from '@cabloy/module-info';
|
|
2
2
|
import type { Next } from 'zova';
|
|
3
3
|
import { BeanSimple } from 'zova';
|
|
4
|
-
import type { IOnionExecuteCustom, IOnionItem, IOnionSlice } from '../types/onion.
|
|
5
|
-
import { SysOnion } from '../bean/sys.onion.
|
|
4
|
+
import type { IOnionExecuteCustom, IOnionItem, IOnionSlice } from '../types/onion.ts';
|
|
5
|
+
import { SysOnion } from '../bean/sys.onion.ts';
|
|
6
6
|
export declare class ServiceOnion<OPTIONS, ONIONNAME extends string> extends BeanSimple {
|
|
7
7
|
protected sysOnion: SysOnion;
|
|
8
8
|
sceneName: string;
|
package/dist/types/aop.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IBeanRecord, Next, NextSync, OmitNever } from 'zova';
|
|
2
|
-
import type { ServiceOnion } from '../service/onion_.
|
|
3
|
-
import type { IOnionOptionsDeps, IOnionOptionsEnable, IOnionOptionsMatch } from './onion';
|
|
2
|
+
import type { ServiceOnion } from '../service/onion_.ts';
|
|
3
|
+
import type { IOnionOptionsDeps, IOnionOptionsEnable, IOnionOptionsMatch } from './onion.ts';
|
|
4
4
|
export type AopActionNext<P, R> = R extends Promise<any> ? Next<P, Awaited<R>> : NextSync<P, R>;
|
|
5
5
|
export type AopActionInit<T extends {}> = AopAction<T, '__init__'>;
|
|
6
6
|
export type AopActionDispose<T extends {}> = AopAction<T, '__dispose__'>;
|
package/dist/types/aop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aop.d.ts","sourceRoot":"","sources":["../../src/types/aop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"aop.d.ts","sourceRoot":"","sources":["../../src/types/aop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE7F,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAGhG,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,EAAE,IAAI,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AAEnE,MAAM,MAAM,gBAAgB,CAAC,CA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AAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAElG,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,SAAS,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,IAE9E,CACE,KAAK,EAAE,IAAI,SAAS,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,EAC7F,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EACrC,SAAS,EAAE,CAAC,KAEX,OAAO,CAAC;AAEb,MAAM,WAAW,UAAU;CAAG;AAE9B,MAAM,WAAW,oBACf,SACE,mBAAmB,EACnB,kBAAkB,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAC9C,iBAAiB,CAAC,MAAM,UAAU,CAAC;CAAG;AAE1C,OAAO,QAAQ,oBAAoB,CAAC;IAClC,UAAiB,QAAQ;QACvB,GAAG,EAAE,YAAY,CAAC,oBAAoB,EAAE,MAAM,UAAU,CAAC,CAAC;KAC3D;CACF;AAED,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,YAAY;QAC3B,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;KAC5B;IAED,UAAiB,gBAAgB;QAC/B,GAAG,EAAE,KAAK,CAAC;KACZ;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Next, NextSync, OmitNever } from 'zova';
|
|
2
|
-
import type { ServiceOnion } from '../service/onion_.
|
|
3
|
-
import type { IOnionOptionsEnable } from './onion.
|
|
2
|
+
import type { ServiceOnion } from '../service/onion_.ts';
|
|
3
|
+
import type { IOnionOptionsEnable } from './onion.ts';
|
|
4
4
|
export declare const SymbolDecoratorUseAopMethod: unique symbol;
|
|
5
5
|
export interface IUseAopMethodPropMetadata<T extends keyof IAopMethodRecord = never> {
|
|
6
6
|
beanInstance?: any;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './aop.
|
|
2
|
-
export * from './aopMethod.
|
|
3
|
-
export * from './bean.
|
|
4
|
-
export * from './component.
|
|
5
|
-
export * from './onion.
|
|
6
|
-
export * from './service.
|
|
1
|
+
export * from './aop.ts';
|
|
2
|
+
export * from './aopMethod.ts';
|
|
3
|
+
export * from './bean.ts';
|
|
4
|
+
export * from './component.ts';
|
|
5
|
+
export * from './onion.ts';
|
|
6
|
+
export * from './service.ts';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -32,7 +32,7 @@ export default async function (options) {
|
|
|
32
32
|
}
|
|
33
33
|
function _parseControllerInfo(options, globFile) {
|
|
34
34
|
const { className, fileContent, fileNameJSRelative, file } = globFile;
|
|
35
|
-
const matches = fileNameJSRelative.match(
|
|
35
|
+
const matches = fileNameJSRelative.match(/^\.\.\/(page|component)\/(.+?)\/controller(\.tsx?)$/);
|
|
36
36
|
if (!matches)
|
|
37
37
|
return;
|
|
38
38
|
const type = matches[1];
|
|
@@ -40,8 +40,7 @@ function _parseControllerInfo(options, globFile) {
|
|
|
40
40
|
return;
|
|
41
41
|
const name = matches[2];
|
|
42
42
|
const nameCapitalize = toUpperCaseFirstChar(name);
|
|
43
|
-
const
|
|
44
|
-
const controllerExtTs = controllerExtJs.replace('.js', '.ts');
|
|
43
|
+
const controllerExtTs = matches[3];
|
|
45
44
|
// componentOptions
|
|
46
45
|
const componentOptionsMatched = fileContent.match(/static \$componentOptions[^=]* = (\{[\s\S]*?\});/);
|
|
47
46
|
const componentOptions = componentOptionsMatched ? componentOptionsMatched[1] : '';
|
|
@@ -71,28 +70,27 @@ function _parseControllerInfo(options, globFile) {
|
|
|
71
70
|
const fileRenderFirst = path.join(options.modulePath, `src/${type}/${name}/render.tsx`);
|
|
72
71
|
const hasRenderFirst = fse.existsSync(fileRenderFirst);
|
|
73
72
|
const classNameRenderFirst = `Render${type === 'page' ? 'Page' : ''}${nameCapitalize}`;
|
|
74
|
-
const importRenderFirst = `import { ${classNameRenderFirst} } from '../../${type}/${name}/render.
|
|
73
|
+
const importRenderFirst = `import { ${classNameRenderFirst} } from '../../${type}/${name}/render.tsx';`;
|
|
75
74
|
const fileRenderOthers = globbySync(`src/${type}/${name}/render.*.tsx`, {
|
|
76
75
|
cwd: options.modulePath,
|
|
77
76
|
});
|
|
78
77
|
const nameRenderOthers = fileRenderOthers.map(item => /render\.(.*)\.tsx/.exec(item)[1]);
|
|
79
78
|
const classNameRenderOthers = nameRenderOthers.map(item => `Render${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`);
|
|
80
|
-
const importRenderOthers = nameRenderOthers.map(item => `import { ${`Render${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/render.${item}.
|
|
79
|
+
const importRenderOthers = nameRenderOthers.map(item => `import { ${`Render${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/render.${item}.tsx';`);
|
|
81
80
|
// style
|
|
82
81
|
const fileStyleFirst = path.join(options.modulePath, `src/${type}/${name}/style.ts`);
|
|
83
82
|
const hasStyleFirst = fse.existsSync(fileStyleFirst);
|
|
84
83
|
const classNameStyleFirst = `Style${type === 'page' ? 'Page' : ''}${nameCapitalize}`;
|
|
85
|
-
const importStyleFirst = `import { ${classNameStyleFirst} } from '../../${type}/${name}/style.
|
|
84
|
+
const importStyleFirst = `import { ${classNameStyleFirst} } from '../../${type}/${name}/style.ts';`;
|
|
86
85
|
const fileStyleOthers = globbySync(`src/${type}/${name}/style.*.ts`, { cwd: options.modulePath });
|
|
87
86
|
const nameStyleOthers = fileStyleOthers.map(item => /style\.(.*)\.ts/.exec(item)[1]);
|
|
88
87
|
const classNameStyleOthers = nameStyleOthers.map(item => `Style${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`);
|
|
89
|
-
const importStyleOthers = nameStyleOthers.map(item => `import { ${`Style${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/style.${item}.
|
|
88
|
+
const importStyleOthers = nameStyleOthers.map(item => `import { ${`Style${type === 'page' ? 'Page' : ''}${toUpperCaseFirstChar(item)}`} } from '../../${type}/${name}/style.${item}.ts';`);
|
|
90
89
|
// ok
|
|
91
90
|
return {
|
|
92
91
|
type,
|
|
93
92
|
name,
|
|
94
93
|
nameCapitalize,
|
|
95
|
-
controllerExtJs,
|
|
96
94
|
controllerExtTs,
|
|
97
95
|
componentOptions,
|
|
98
96
|
hasComponentOptions,
|
|
@@ -2,7 +2,7 @@ import { combineContentRenderAndStyle } from "./utils.js";
|
|
|
2
2
|
export async function generateFileComponent(options, globFile, controllerInfo) {
|
|
3
3
|
const { moduleName } = options;
|
|
4
4
|
const { className } = globFile;
|
|
5
|
-
const { type, name, nameCapitalize,
|
|
5
|
+
const { type, name, nameCapitalize, controllerExtTs, hasComponentOptions, nameProps, hasProps, hasGeneric, nameModels, hasModels, hasModelValue, generic, genericKeys, generateImports, importRenderFirst, hasRenderFirst, classNameRenderFirst, importStyleFirst, hasStyleFirst, classNameStyleFirst, } = controllerInfo;
|
|
6
6
|
const contentImports = [];
|
|
7
7
|
if (generateImports) {
|
|
8
8
|
contentImports.push(...generateImports);
|
|
@@ -28,7 +28,7 @@ export async function generateFileComponent(options, globFile, controllerInfo) {
|
|
|
28
28
|
if (hasProps)
|
|
29
29
|
_contentImportTypeController.push(nameProps);
|
|
30
30
|
if (_contentImportTypeController.length > 0) {
|
|
31
|
-
contentImports.push(`import type { ${_contentImportTypeController.join(', ')} } from '../../component/${name}/controller${
|
|
31
|
+
contentImports.push(`import type { ${_contentImportTypeController.join(', ')} } from '../../component/${name}/controller${controllerExtTs}';`);
|
|
32
32
|
}
|
|
33
33
|
if (type === 'component' && name === 'routedDialog') {
|
|
34
34
|
contentImports.push("import { routeLocationKey, routerKey, routerViewLocationKey, viewDepthKey } from '@cabloy/vue-router';", "import { computed, provide, shallowReactive } from 'vue';");
|
|
@@ -36,7 +36,7 @@ export async function generateFileComponent(options, globFile, controllerInfo) {
|
|
|
36
36
|
contentImports.push("import { defineComponent } from 'vue'");
|
|
37
37
|
contentImports.push("import { prepareComponentOptions, useController } from 'zova';");
|
|
38
38
|
// controller
|
|
39
|
-
contentImports.push(`import { ${className} } from '../../component/${name}/controller${
|
|
39
|
+
contentImports.push(`import { ${className} } from '../../component/${name}/controller${controllerExtTs}';`);
|
|
40
40
|
// render
|
|
41
41
|
if (hasRenderFirst) {
|
|
42
42
|
contentImports.push(importRenderFirst);
|
|
@@ -2,12 +2,12 @@ import { combineContentRenderAndStyle } from "./utils.js";
|
|
|
2
2
|
export async function generateFilePage(options, globFile, controllerInfo) {
|
|
3
3
|
const { moduleName } = options;
|
|
4
4
|
const { className } = globFile;
|
|
5
|
-
const { name, nameCapitalize,
|
|
5
|
+
const { name, nameCapitalize, controllerExtTs, importRenderFirst, hasRenderFirst, classNameRenderFirst, importStyleFirst, hasStyleFirst, classNameStyleFirst, hasComponentOptions, } = controllerInfo;
|
|
6
6
|
const { nameSchemaParams, hasSchemaParams, nameSchemaQuery, hasSchemaQuery } = controllerInfo;
|
|
7
7
|
const contentImports = [];
|
|
8
8
|
// controller
|
|
9
9
|
contentImports.push("import { createZovaComponentPage } from 'zova';");
|
|
10
|
-
contentImports.push(`import { ControllerPage${nameCapitalize} } from '../../page/${name}/controller${
|
|
10
|
+
contentImports.push(`import { ControllerPage${nameCapitalize} } from '../../page/${name}/controller${controllerExtTs}';`);
|
|
11
11
|
// render
|
|
12
12
|
if (hasRenderFirst) {
|
|
13
13
|
contentImports.push(importRenderFirst);
|
|
@@ -23,7 +23,7 @@ export async function generateFilePage(options, globFile, controllerInfo) {
|
|
|
23
23
|
if (hasSchemaQuery)
|
|
24
24
|
_contentImports_parts.push(nameSchemaQuery);
|
|
25
25
|
if (_contentImports_parts.length > 0) {
|
|
26
|
-
contentImports.push(`import { ${_contentImports_parts.join(', ')} } from '../../page/${name}/controller${
|
|
26
|
+
contentImports.push(`import { ${_contentImports_parts.join(', ')} } from '../../page/${name}/controller${controllerExtTs}';`);
|
|
27
27
|
}
|
|
28
28
|
//
|
|
29
29
|
const _contentRecords2_parts = [];
|
|
@@ -11,8 +11,8 @@ export function generateMetaComponent(options, globFiles) {
|
|
|
11
11
|
const { name, nameCapitalize } = controllerInfo;
|
|
12
12
|
const componentFullName = `${moduleName}:${name}`;
|
|
13
13
|
const componentName2 = `Z${nameCapitalize}`;
|
|
14
|
-
contentImports.push(`export * from './component/${name}.
|
|
15
|
-
contentImports.push(`import { ${componentName2} } from './component/${name}.
|
|
14
|
+
contentImports.push(`export * from './component/${name}.ts';`);
|
|
15
|
+
contentImports.push(`import { ${componentName2} } from './component/${name}.ts';`);
|
|
16
16
|
contentComponents.push(`'${name}': ${componentName2},`);
|
|
17
17
|
contentRecords.push(`'${componentFullName}': ${className};`);
|
|
18
18
|
contentRecords2.push(`'${componentFullName}': typeof ${componentName2};`);
|
|
@@ -20,11 +20,11 @@ export async function generateMetaPage(options, globFiles) {
|
|
|
20
20
|
const { name, hasSchemaParams, hasSchemaQuery } = controllerInfo;
|
|
21
21
|
const namespace = `NS${className}`;
|
|
22
22
|
const namespaceRest = _combineModuleNameControllerName(moduleName, className);
|
|
23
|
-
contentImports.push(`export * from './page/${name}.
|
|
23
|
+
contentImports.push(`export * from './page/${name}.ts';`);
|
|
24
24
|
if (hasSchemaParams || hasSchemaQuery) {
|
|
25
|
-
contentImports.push(`import { ${namespace} } from './page/${name}.
|
|
25
|
+
contentImports.push(`import { ${namespace} } from './page/${name}.ts';`);
|
|
26
26
|
// rest
|
|
27
|
-
const restIndexFileRelative = path.relative(srcDirRest, path.join(options.modulePath, `src/.metadata/page/${name}.
|
|
27
|
+
const restIndexFileRelative = path.relative(srcDirRest, path.join(options.modulePath, `src/.metadata/page/${name}.ts`));
|
|
28
28
|
contentImportsRest.push(`import { ${namespace} as ${namespaceRest} } from '${restIndexFileRelative}';`);
|
|
29
29
|
}
|
|
30
30
|
// controller.tsx
|
|
@@ -87,7 +87,7 @@ export async function generateMetaPage(options, globFiles) {
|
|
|
87
87
|
// combine
|
|
88
88
|
const content = `/** pages: begin */
|
|
89
89
|
${contentImports.join('\n')}
|
|
90
|
-
export * from '../routes.
|
|
90
|
+
export * from '../routes.ts';
|
|
91
91
|
${contentPathRecords.length > 0 ? "import { TypePagePathSchema } from 'zova-module-a-router';" : ''}
|
|
92
92
|
import 'zova';
|
|
93
93
|
declare module 'zova-module-a-router' {
|
package/package.json
CHANGED
package/src/.metadata/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable
|
|
2
2
|
/** sys: begin */
|
|
3
|
-
export * from '../bean/sys.onion.
|
|
3
|
+
export * from '../bean/sys.onion.ts';
|
|
4
4
|
|
|
5
5
|
import 'zova';
|
|
6
6
|
declare module 'zova' {
|
|
@@ -22,7 +22,7 @@ declare module 'zova-module-a-bean' {
|
|
|
22
22
|
}
|
|
23
23
|
/** sys: end */
|
|
24
24
|
/** sys: begin */
|
|
25
|
-
import { SysOnion } from '../bean/sys.onion.
|
|
25
|
+
import type { SysOnion } from '../bean/sys.onion.ts';
|
|
26
26
|
import 'zova';
|
|
27
27
|
declare module 'zova' {
|
|
28
28
|
export interface IBeanRecordGeneral {
|
|
@@ -31,8 +31,8 @@ declare module 'zova' {
|
|
|
31
31
|
}
|
|
32
32
|
/** sys: end */
|
|
33
33
|
/** service: begin */
|
|
34
|
-
export * from '../service/aop.
|
|
35
|
-
export * from '../service/onion_.
|
|
34
|
+
export * from '../service/aop.ts';
|
|
35
|
+
export * from '../service/onion_.ts';
|
|
36
36
|
|
|
37
37
|
import 'zova-module-a-bean';
|
|
38
38
|
declare module 'zova-module-a-bean' {
|
|
@@ -58,7 +58,7 @@ declare module 'zova-module-a-bean' {
|
|
|
58
58
|
}
|
|
59
59
|
/** service: end */
|
|
60
60
|
/** service: begin */
|
|
61
|
-
import { ServiceAop } from '../service/aop.
|
|
61
|
+
import type { ServiceAop } from '../service/aop.ts';
|
|
62
62
|
import 'zova';
|
|
63
63
|
declare module 'zova' {
|
|
64
64
|
export interface IBeanRecordGeneral {
|
|
@@ -67,11 +67,11 @@ declare module 'zova' {
|
|
|
67
67
|
}
|
|
68
68
|
/** service: end */
|
|
69
69
|
/** monkeySys: begin */
|
|
70
|
-
export * from '../monkeySys.
|
|
70
|
+
export * from '../monkeySys.ts';
|
|
71
71
|
/** monkeySys: end */
|
|
72
72
|
/** scope: begin */
|
|
73
73
|
import { BeanScopeBase, type BeanScopeUtil } from 'zova';
|
|
74
|
-
import { Scope } from '../lib/scope.
|
|
74
|
+
import { Scope } from '../lib/scope.ts';
|
|
75
75
|
|
|
76
76
|
@Scope()
|
|
77
77
|
export class ScopeModuleABean extends BeanScopeBase {}
|
package/src/.metadata/this.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const __ThisModule__ = 'a-bean';
|
|
2
|
-
export { ScopeModuleABean as ScopeModule } from './index.
|
|
2
|
+
export { ScopeModuleABean as ScopeModule } from './index.ts';
|
package/src/bean/sys.onion.ts
CHANGED
|
@@ -6,10 +6,10 @@ import type {
|
|
|
6
6
|
IOnionOptionsMatch,
|
|
7
7
|
IOnionOptionsMeta,
|
|
8
8
|
TypeOnionOptionsMatchRules,
|
|
9
|
-
} from '../types/onion.
|
|
9
|
+
} from '../types/onion.ts';
|
|
10
10
|
|
|
11
|
-
import { Sys } from '../lib/bean.
|
|
12
|
-
import { ServiceOnion } from '../service/onion_.
|
|
11
|
+
import { Sys } from '../lib/bean.ts';
|
|
12
|
+
import { ServiceOnion } from '../service/onion_.ts';
|
|
13
13
|
|
|
14
14
|
@ProxyDisable()
|
|
15
15
|
@Sys()
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './.metadata/index.
|
|
2
|
-
export * from './lib/index.
|
|
3
|
-
export * from './types/index.
|
|
1
|
+
export * from './.metadata/index.ts';
|
|
2
|
+
export * from './lib/index.ts';
|
|
3
|
+
export * from './types/index.ts';
|
package/src/lib/bean.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBeanDecorator } from 'zova';
|
|
2
2
|
|
|
3
|
-
import type { IDecoratorAopOptions } from '../types/aop.
|
|
4
|
-
import type { IDecoratorAopMethodOptions } from '../types/aopMethod.
|
|
3
|
+
import type { IDecoratorAopOptions } from '../types/aop.ts';
|
|
4
|
+
import type { IDecoratorAopMethodOptions } from '../types/aopMethod.ts';
|
|
5
5
|
|
|
6
6
|
export function Sys(): ClassDecorator {
|
|
7
7
|
return createBeanDecorator('sys', 'sys');
|
package/src/lib/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './bean.
|
|
2
|
-
export * from './scope.
|
|
3
|
-
export * from './useAopMethod.
|
|
4
|
-
export * from './utils.
|
|
1
|
+
export * from './bean.ts';
|
|
2
|
+
export * from './scope.ts';
|
|
3
|
+
export * from './useAopMethod.ts';
|
|
4
|
+
export * from './utils.ts';
|
package/src/lib/useAopMethod.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { MetadataKey } from 'zova';
|
|
|
2
2
|
|
|
3
3
|
import { appMetadata, registerMappedClassMetadataKey } from 'zova';
|
|
4
4
|
|
|
5
|
-
import type { IAopMethodRecord, IUseAopMethodPropMetadata } from '../types/aopMethod.
|
|
5
|
+
import type { IAopMethodRecord, IUseAopMethodPropMetadata } from '../types/aopMethod.ts';
|
|
6
6
|
|
|
7
|
-
import { SymbolDecoratorUseAopMethod } from '../types/aopMethod.
|
|
7
|
+
import { SymbolDecoratorUseAopMethod } from '../types/aopMethod.ts';
|
|
8
8
|
|
|
9
9
|
export function UseAopMethod<T extends keyof IAopMethodRecord>(
|
|
10
10
|
aopMethodName: T,
|
package/src/service/aop.ts
CHANGED
|
@@ -2,17 +2,17 @@ import type { BeanAopMethodBase, Constructable, IBeanRecord } from 'zova';
|
|
|
2
2
|
|
|
3
3
|
import { appMetadata, appResource, BeanBase, ProxyDisable, Use } from 'zova';
|
|
4
4
|
|
|
5
|
-
import type { IAopRecord, IDecoratorAopOptions } from '../types/aop.
|
|
6
|
-
import type { IOnionItem, IOnionSlice } from '../types/onion.
|
|
5
|
+
import type { IAopRecord, IDecoratorAopOptions } from '../types/aop.ts';
|
|
6
|
+
import type { IOnionItem, IOnionSlice } from '../types/onion.ts';
|
|
7
7
|
|
|
8
|
-
import { SysOnion } from '../bean/sys.onion.
|
|
9
|
-
import { Service } from '../lib/bean.
|
|
8
|
+
import { SysOnion } from '../bean/sys.onion.ts';
|
|
9
|
+
import { Service } from '../lib/bean.ts';
|
|
10
10
|
import {
|
|
11
11
|
IAopMethodRecord,
|
|
12
12
|
IDecoratorAopMethodOptions,
|
|
13
13
|
IUseAopMethodPropMetadata,
|
|
14
14
|
SymbolDecoratorUseAopMethod,
|
|
15
|
-
} from '../types/aopMethod.
|
|
15
|
+
} from '../types/aopMethod.ts';
|
|
16
16
|
|
|
17
17
|
type AopMethodsMatchedAll = Record<string, IUseAopMethodPropMetadata[]>;
|
|
18
18
|
|
package/src/service/onion_.ts
CHANGED
|
@@ -16,10 +16,10 @@ import type {
|
|
|
16
16
|
IOnionOptionsMatch,
|
|
17
17
|
IOnionSlice,
|
|
18
18
|
TypeOnionOptionsMatchRule,
|
|
19
|
-
} from '../types/onion.
|
|
19
|
+
} from '../types/onion.ts';
|
|
20
20
|
|
|
21
|
-
import { SysOnion } from '../bean/sys.onion.
|
|
22
|
-
import { Service } from '../lib/bean.
|
|
21
|
+
import { SysOnion } from '../bean/sys.onion.ts';
|
|
22
|
+
import { Service } from '../lib/bean.ts';
|
|
23
23
|
|
|
24
24
|
// const SymbolOnionsEnabled = Symbol('SymbolOnionsEnabled');
|
|
25
25
|
// const SymbolOnionsEnabledWrapped = Symbol('SymbolOnionsEnabledWrapped');
|
package/src/types/aop.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IBeanRecord, Next, NextSync, OmitNever } from 'zova';
|
|
2
2
|
|
|
3
|
-
import type { ServiceOnion } from '../service/onion_.
|
|
4
|
-
import type { IOnionOptionsDeps, IOnionOptionsEnable, IOnionOptionsMatch } from './onion';
|
|
3
|
+
import type { ServiceOnion } from '../service/onion_.ts';
|
|
4
|
+
import type { IOnionOptionsDeps, IOnionOptionsEnable, IOnionOptionsMatch } from './onion.ts';
|
|
5
5
|
|
|
6
6
|
export type AopActionNext<P, R> = R extends Promise<any> ? Next<P, Awaited<R>> : NextSync<P, R>;
|
|
7
7
|
|
package/src/types/aopMethod.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Next, NextSync, OmitNever } from 'zova';
|
|
2
2
|
|
|
3
|
-
import type { ServiceOnion } from '../service/onion_.
|
|
4
|
-
import type { IOnionOptionsEnable } from './onion.
|
|
3
|
+
import type { ServiceOnion } from '../service/onion_.ts';
|
|
4
|
+
import type { IOnionOptionsEnable } from './onion.ts';
|
|
5
5
|
|
|
6
6
|
export const SymbolDecoratorUseAopMethod = Symbol('SymbolDecoratorUseAopMethod');
|
|
7
7
|
export interface IUseAopMethodPropMetadata<T extends keyof IAopMethodRecord = never> {
|
package/src/types/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './aop.
|
|
2
|
-
export * from './aopMethod.
|
|
3
|
-
export * from './bean.
|
|
4
|
-
export * from './component.
|
|
5
|
-
export * from './onion.
|
|
6
|
-
export * from './service.
|
|
1
|
+
export * from './aop.ts';
|
|
2
|
+
export * from './aopMethod.ts';
|
|
3
|
+
export * from './bean.ts';
|
|
4
|
+
export * from './component.ts';
|
|
5
|
+
export * from './onion.ts';
|
|
6
|
+
export * from './service.ts';
|