vona-module-a-orm 5.1.6 → 5.1.8
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/entity/metadata/generate.ts +2 -1
- package/cli/model/metadata/generate.ts +2 -2
- package/dist/.metadata/index.d.ts +25 -25
- package/dist/.metadata/index.d.ts.map +1 -1
- package/dist/index.js +24 -24
- package/dist/index.js.map +1 -1
- package/dist-cli/entity/metadata/generate.js +2 -1
- package/dist-cli/model/metadata/generate.js +2 -2
- package/package.json +1 -1
- package/src/.metadata/index.ts +39 -39
- package/src/bean/bean.model/bean.model_utils.ts +1 -1
|
@@ -23,8 +23,9 @@ export default async function (options) {
|
|
|
23
23
|
if (contentColumns.length === 0 &&
|
|
24
24
|
contentEntityMetas.length === 0 &&
|
|
25
25
|
contentRecords.length === 0 &&
|
|
26
|
-
contentFields.length === 0)
|
|
26
|
+
contentFields.length === 0) {
|
|
27
27
|
return '';
|
|
28
|
+
}
|
|
28
29
|
// combine
|
|
29
30
|
const content = `/** ${sceneName}: begin */
|
|
30
31
|
${contentColumns.join('\n')}
|
|
@@ -9,8 +9,8 @@ export default async function (options) {
|
|
|
9
9
|
for (const globFile of globFiles) {
|
|
10
10
|
const { className, beanName, fileContent, beanNameCapitalize } = globFile;
|
|
11
11
|
const ast = cli.helper.gogocode(fileContent);
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const _reg = `@Model<$$$0>({$$$1})export class ${className} extends $$$2 {}`;
|
|
13
|
+
const astNodes = ast.find(_reg).match.$$$1;
|
|
14
14
|
const entityName = __parseEntityName(__getAstNode(astNodes, 'entity'));
|
|
15
15
|
const relations = __parseRelations(__getAstNode(astNodes, 'relations'));
|
|
16
16
|
const magics = __parseMagics(cli, ast, globFile, entityName);
|
package/package.json
CHANGED
package/src/.metadata/index.ts
CHANGED
|
@@ -194,6 +194,45 @@ declare module 'vona-module-a-event' {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
/** event: end */
|
|
197
|
+
/** hmr: begin */
|
|
198
|
+
export * from '../bean/hmr.entity.ts';
|
|
199
|
+
export * from '../bean/hmr.model.ts';
|
|
200
|
+
|
|
201
|
+
import 'vona';
|
|
202
|
+
declare module 'vona' {
|
|
203
|
+
|
|
204
|
+
export interface IHmrRecord {
|
|
205
|
+
'a-orm:entity': never;
|
|
206
|
+
'a-orm:model': never;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
declare module 'vona-module-a-orm' {
|
|
212
|
+
|
|
213
|
+
export interface HmrEntity {
|
|
214
|
+
/** @internal */
|
|
215
|
+
get scope(): ScopeModuleAOrm;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface HmrEntity {
|
|
219
|
+
get $beanFullName(): 'a-orm.hmr.entity';
|
|
220
|
+
get $onionName(): 'a-orm:entity';
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface HmrModel {
|
|
225
|
+
/** @internal */
|
|
226
|
+
get scope(): ScopeModuleAOrm;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface HmrModel {
|
|
230
|
+
get $beanFullName(): 'a-orm.hmr.model';
|
|
231
|
+
get $onionName(): 'a-orm:model';
|
|
232
|
+
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/** hmr: end */
|
|
197
236
|
/** queue: begin */
|
|
198
237
|
export * from '../bean/queue.doubleDelete.ts';
|
|
199
238
|
|
|
@@ -252,45 +291,6 @@ declare module 'vona-module-a-orm' {
|
|
|
252
291
|
}
|
|
253
292
|
}
|
|
254
293
|
/** schedule: end */
|
|
255
|
-
/** hmr: begin */
|
|
256
|
-
export * from '../bean/hmr.entity.ts';
|
|
257
|
-
export * from '../bean/hmr.model.ts';
|
|
258
|
-
|
|
259
|
-
import 'vona';
|
|
260
|
-
declare module 'vona' {
|
|
261
|
-
|
|
262
|
-
export interface IHmrRecord {
|
|
263
|
-
'a-orm:entity': never;
|
|
264
|
-
'a-orm:model': never;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
declare module 'vona-module-a-orm' {
|
|
270
|
-
|
|
271
|
-
export interface HmrEntity {
|
|
272
|
-
/** @internal */
|
|
273
|
-
get scope(): ScopeModuleAOrm;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export interface HmrEntity {
|
|
277
|
-
get $beanFullName(): 'a-orm.hmr.entity';
|
|
278
|
-
get $onionName(): 'a-orm:entity';
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export interface HmrModel {
|
|
283
|
-
/** @internal */
|
|
284
|
-
get scope(): ScopeModuleAOrm;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export interface HmrModel {
|
|
288
|
-
get $beanFullName(): 'a-orm.hmr.model';
|
|
289
|
-
get $onionName(): 'a-orm:model';
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
/** hmr: end */
|
|
294
294
|
/** config: begin */
|
|
295
295
|
export * from '../config/config.ts';
|
|
296
296
|
import type { config } from '../config/config.ts';
|
|
@@ -319,7 +319,7 @@ export class BeanModelUtils<TRecord extends {}> extends BeanModelMeta<TRecord> {
|
|
|
319
319
|
protected _ellipsisLogger(str: string) {
|
|
320
320
|
const maxLength = this.scopeOrm.config.logger.maxLength;
|
|
321
321
|
if (str.length > maxLength) {
|
|
322
|
-
str = str.substring(0, maxLength)
|
|
322
|
+
str = `${str.substring(0, maxLength)} ...`;
|
|
323
323
|
}
|
|
324
324
|
return str;
|
|
325
325
|
}
|