@aiao/rxdb-client-generator 0.0.9 → 0.0.11
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/{RxDBClientGenerator-6qmS8Mrd.js → RxDBClientGenerator-CnVT5HUD.js} +196 -195
- package/dist/build-client-lib-D18fixnL.js +165 -0
- package/dist/cli/analyze-file.d.ts +5 -0
- package/dist/cli/analyze-file.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/core/RxDBClientGenerator.d.ts +4 -0
- package/dist/core/RxDBClientGenerator.d.ts.map +1 -1
- package/dist/core/RxDBClientGenerator.utils.d.ts.map +1 -1
- package/dist/generators/RepositoryGeneratorBase.d.ts +2 -1
- package/dist/generators/RepositoryGeneratorBase.d.ts.map +1 -1
- package/dist/generators/entity-definition.d.ts.map +1 -1
- package/dist/generators/entity-properties.d.ts.map +1 -1
- package/dist/generators/entity-rules.d.ts.map +1 -1
- package/dist/generators/utils.d.ts +2 -1
- package/dist/generators/utils.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/vite.js +1 -1
- package/package.json +4 -4
- package/dist/build-client-lib-Bkh60Zeb.js +0 -162
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { PropertyType as d, RelationKind as f, ENTITY_BASE_METADATA_OPTIONS as
|
|
2
|
-
import { omit as
|
|
3
|
-
const
|
|
4
|
-
const t =
|
|
1
|
+
import { PropertyType as d, RelationKind as f, ENTITY_BASE_METADATA_OPTIONS as R, TREE_ADJACENCY_LIST_ENTITY_BASE_OPTIONS as P, getEntityMetadata as K, transitionMetadata as O } from "@aiao/rxdb";
|
|
2
|
+
import { omit as F, isNil as V, unionBy as v, capitalizeFirst as b, isFunction as U } from "@aiao/utils";
|
|
3
|
+
const J = (r, e) => {
|
|
4
|
+
const t = $(r, e), s = !!r.nullable;
|
|
5
5
|
let a = !0;
|
|
6
6
|
!s && Object.hasOwn(r, "default") && (a = !1);
|
|
7
|
-
const
|
|
7
|
+
const i = {
|
|
8
8
|
type: t,
|
|
9
9
|
name: r.name,
|
|
10
10
|
hasQuestionToken: s,
|
|
11
11
|
hasExclamationToken: a,
|
|
12
12
|
isReadonly: r.readonly
|
|
13
13
|
};
|
|
14
|
-
return V(r.default) || (
|
|
15
|
-
},
|
|
14
|
+
return V(r.default) || (i.initializer = Q(r)), i;
|
|
15
|
+
}, M = (r, e) => `${e.name}${r.name.charAt(0).toUpperCase() + r.name.slice(1)}KeyValue`, L = (r, e) => r.type !== d.keyValue || !("properties" in r) || !r.properties || r.properties.length === 0 ? "KeyValue" : M(r, e), H = (r, e) => r.type !== d.keyValue || !("properties" in r) || !r.properties || r.properties.length === 0 ? [] : r.properties.map((t) => ({
|
|
16
16
|
name: t.name,
|
|
17
|
-
type:
|
|
17
|
+
type: $(t, e),
|
|
18
18
|
hasQuestionToken: t.nullable || !1,
|
|
19
19
|
docs: t.displayName ? [t.displayName] : void 0
|
|
20
|
-
})),
|
|
20
|
+
})), $ = (r, e) => {
|
|
21
21
|
let t = "any";
|
|
22
22
|
switch (r.type) {
|
|
23
23
|
case d.uuid:
|
|
@@ -45,14 +45,14 @@ const Y = (r, e) => {
|
|
|
45
45
|
t = "number[]";
|
|
46
46
|
break;
|
|
47
47
|
case d.keyValue:
|
|
48
|
-
t =
|
|
48
|
+
t = L(r, e);
|
|
49
49
|
break;
|
|
50
50
|
case d.json:
|
|
51
51
|
t = "Record<string, any>";
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
54
|
return r.nullable && (t += " | null"), t;
|
|
55
|
-
},
|
|
55
|
+
}, Q = (r) => {
|
|
56
56
|
switch (r.type) {
|
|
57
57
|
case d.string:
|
|
58
58
|
return `'${String(r.default)}'`;
|
|
@@ -62,38 +62,40 @@ const Y = (r, e) => {
|
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
return "";
|
|
65
|
-
},
|
|
66
|
-
if (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
}, D = (r, e = /* @__PURE__ */ new Set()) => {
|
|
66
|
+
if (r == null) return e;
|
|
67
|
+
if (typeof r == "object")
|
|
68
|
+
if (Array.isArray(r))
|
|
69
|
+
for (const t of r)
|
|
70
|
+
D(t, e);
|
|
71
|
+
else
|
|
72
|
+
for (const t in r)
|
|
73
|
+
Object.prototype.hasOwnProperty.call(r, t) && (e.add(t), D(r[t], e));
|
|
72
74
|
return e;
|
|
73
75
|
}, w = /* @__PURE__ */ new Map();
|
|
74
76
|
Object.keys(d).forEach((r) => {
|
|
75
77
|
const e = d[r];
|
|
76
|
-
w.set(e, r);
|
|
78
|
+
typeof e == "string" && w.set(e, r);
|
|
77
79
|
});
|
|
78
|
-
const
|
|
80
|
+
const j = /* @__PURE__ */ new Map();
|
|
79
81
|
Object.keys(f).forEach((r) => {
|
|
80
82
|
const e = f[r];
|
|
81
|
-
|
|
83
|
+
typeof e == "string" && j.set(e, r);
|
|
82
84
|
});
|
|
83
|
-
function
|
|
84
|
-
const e =
|
|
85
|
+
function q(r) {
|
|
86
|
+
const e = F(r, ["propertyMap", "relationMap", "indexMap"]), t = D(e);
|
|
85
87
|
let s = JSON.stringify(e, null, 2);
|
|
86
|
-
return new Set(r.properties.map((
|
|
87
|
-
const n = w.get(
|
|
88
|
-
s = s.replaceAll(`"type": "${
|
|
88
|
+
return new Set(r.properties.map((i) => i.type).filter(Boolean)).forEach((i) => {
|
|
89
|
+
const n = w.get(i);
|
|
90
|
+
n && (s = s.replaceAll(`"type": "${i}"`, `"type": PropertyType.${n}`));
|
|
89
91
|
}), r.relations && new Set(r.relations.map((n) => n.kind)).forEach((n) => {
|
|
90
|
-
const
|
|
91
|
-
s = s.replaceAll(`"kind": "${n}"`, `"kind": RelationKind.${
|
|
92
|
-
}), t.forEach((
|
|
93
|
-
|
|
92
|
+
const o = j.get(n);
|
|
93
|
+
o && (s = s.replaceAll(`"kind": "${n}"`, `"kind": RelationKind.${o}`));
|
|
94
|
+
}), t.forEach((i) => {
|
|
95
|
+
i.includes("-") || i.includes(" ") || (s = s.replaceAll(`"${i}":`, `${i}:`));
|
|
94
96
|
}), s;
|
|
95
97
|
}
|
|
96
|
-
const
|
|
98
|
+
const z = ({
|
|
97
99
|
classProperties: r,
|
|
98
100
|
metadata: e,
|
|
99
101
|
file: t,
|
|
@@ -103,19 +105,19 @@ const q = ({
|
|
|
103
105
|
name: `${e.name}InitData`,
|
|
104
106
|
isExported: !0,
|
|
105
107
|
docs: ["初始化数据"]
|
|
106
|
-
}),
|
|
108
|
+
}), i = (n, o = !1) => {
|
|
107
109
|
if (n.type === d.keyValue && "properties" in n && n.properties && n.properties.length > 0) {
|
|
108
|
-
const y =
|
|
110
|
+
const y = M(n, e), g = t.addInterface({
|
|
109
111
|
name: y,
|
|
110
112
|
isExported: !0,
|
|
111
113
|
docs: [n.displayName || `${n.name} keyValue 类型`]
|
|
112
114
|
});
|
|
113
|
-
|
|
115
|
+
H(n, e).forEach((m) => {
|
|
114
116
|
g.addProperty(m);
|
|
115
117
|
});
|
|
116
118
|
}
|
|
117
|
-
const c =
|
|
118
|
-
l.push(n.displayName || n.name), u && l.push(`@default ${u}`), c.type === "UUID" && s.add("UUID"),
|
|
119
|
+
const c = J(n, e), { initializer: u, ...h } = c, l = [];
|
|
120
|
+
l.push(n.displayName || n.name), u && l.push(`@default ${u}`), c.type === "UUID" && s.add("UUID"), o || a.addProperty({
|
|
119
121
|
name: c.name,
|
|
120
122
|
type: c.type,
|
|
121
123
|
hasQuestionToken: !0,
|
|
@@ -127,27 +129,25 @@ const q = ({
|
|
|
127
129
|
docs: l
|
|
128
130
|
});
|
|
129
131
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
e.properties.forEach((n) => {
|
|
133
|
+
i(n);
|
|
132
134
|
}), Array.from(e.computedPropertyMap.values()).forEach((n) => {
|
|
133
|
-
let
|
|
134
|
-
e.repository === "GraphRepository" || e.extends.includes("GraphRepository") ?
|
|
135
|
+
let o = e.features || {};
|
|
136
|
+
e.repository === "GraphRepository" || e.extends.includes("GraphRepository") ? o = e.features?.graph || {} : (e.repository === "TreeRepository" || e.extends.includes("TreeRepository")) && (o = e.features?.tree || {}), o[n.name] && i(n, !0);
|
|
135
137
|
});
|
|
136
|
-
},
|
|
138
|
+
}, S = (r) => {
|
|
137
139
|
const e = r.propertyMap.get("id");
|
|
138
|
-
|
|
139
|
-
switch (e
|
|
140
|
+
if (!e) return "UUID";
|
|
141
|
+
switch (e.type) {
|
|
140
142
|
case d.uuid:
|
|
141
|
-
|
|
142
|
-
break;
|
|
143
|
+
return "UUID";
|
|
143
144
|
case d.string:
|
|
144
|
-
|
|
145
|
-
break;
|
|
145
|
+
return "string";
|
|
146
146
|
case d.integer:
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
return "number";
|
|
148
|
+
default:
|
|
149
|
+
return "UUID";
|
|
149
150
|
}
|
|
150
|
-
return t;
|
|
151
151
|
}, W = ({
|
|
152
152
|
classProperties: r,
|
|
153
153
|
metadata: e,
|
|
@@ -163,16 +163,16 @@ const q = ({
|
|
|
163
163
|
case f.ONE_TO_ONE:
|
|
164
164
|
case f.MANY_TO_ONE:
|
|
165
165
|
{
|
|
166
|
-
const
|
|
166
|
+
const i = `RelationEntityObservable<typeof ${a.mappedEntity}>`, n = a.displayName || a.name;
|
|
167
167
|
r.push({
|
|
168
168
|
name: a.name + "$",
|
|
169
169
|
// 关系属性名使用$后缀,表示可观察对象
|
|
170
|
-
type:
|
|
170
|
+
type: i,
|
|
171
171
|
isReadonly: !0,
|
|
172
172
|
// 关系属性是只读的,通过set/remove方法修改
|
|
173
173
|
docs: [n]
|
|
174
174
|
});
|
|
175
|
-
const
|
|
175
|
+
const o = s.getMetadata(a.mappedEntity, a.mappedNamespace), c = S(o);
|
|
176
176
|
r.push({
|
|
177
177
|
name: a.name + "Id",
|
|
178
178
|
// 外键ID属性
|
|
@@ -191,31 +191,31 @@ const q = ({
|
|
|
191
191
|
case f.ONE_TO_MANY:
|
|
192
192
|
case f.MANY_TO_MANY:
|
|
193
193
|
{
|
|
194
|
-
const
|
|
194
|
+
const i = a.displayName || a.name, n = `RelationEntitiesObservable<${a.mappedEntity}>`;
|
|
195
195
|
r.push({
|
|
196
196
|
name: a.name + "$",
|
|
197
197
|
// 关系集合属性名使用$后缀
|
|
198
198
|
isReadonly: !0,
|
|
199
199
|
// 关系属性是只读的,通过add/remove方法修改
|
|
200
200
|
type: n,
|
|
201
|
-
docs: [
|
|
201
|
+
docs: [i]
|
|
202
202
|
}), t.add("RelationEntitiesObservable");
|
|
203
203
|
}
|
|
204
204
|
break;
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}, Z = (r, e, t) => {
|
|
208
|
-
const s = /* @__PURE__ */ new Set(), { name: a } = e,
|
|
209
|
-
|
|
210
|
-
const
|
|
208
|
+
const s = /* @__PURE__ */ new Set(), { name: a } = e, i = e.extends[0] || "", n = [];
|
|
209
|
+
i.includes("TreeAdjacencyListEntityBase") ? n.push("ITreeEntity") : i.includes("EntityBase") && n.push("IEntity"), s.add(i);
|
|
210
|
+
const o = t.addClass({
|
|
211
211
|
name: a,
|
|
212
212
|
isExported: !0,
|
|
213
|
-
extends:
|
|
213
|
+
extends: i,
|
|
214
214
|
implements: n.sort(),
|
|
215
215
|
decorators: [],
|
|
216
216
|
hasDeclareKeyword: !0
|
|
217
217
|
});
|
|
218
|
-
|
|
218
|
+
o.addJsDoc(`${e.displayName}`);
|
|
219
219
|
const c = [];
|
|
220
220
|
c.push({
|
|
221
221
|
type: `${a}StaticTypes`,
|
|
@@ -227,7 +227,7 @@ const q = ({
|
|
|
227
227
|
docs: ["静态类型"],
|
|
228
228
|
isExported: !0
|
|
229
229
|
}), h = [];
|
|
230
|
-
|
|
230
|
+
z({
|
|
231
231
|
classProperties: c,
|
|
232
232
|
file: t,
|
|
233
233
|
metadata: e,
|
|
@@ -238,10 +238,10 @@ const q = ({
|
|
|
238
238
|
rxdbNamedImports: s,
|
|
239
239
|
generator: r
|
|
240
240
|
});
|
|
241
|
-
const l = e.repository ||
|
|
241
|
+
const l = e.repository || I, y = r.getRepositoryGenerator(l);
|
|
242
242
|
if (y) {
|
|
243
|
-
if (l !==
|
|
244
|
-
const p = r.getRepositoryGenerator(
|
|
243
|
+
if (l !== I) {
|
|
244
|
+
const p = r.getRepositoryGenerator(I);
|
|
245
245
|
p && p.generate({
|
|
246
246
|
metadata: e,
|
|
247
247
|
classProperties: c,
|
|
@@ -262,9 +262,9 @@ const q = ({
|
|
|
262
262
|
staticTypesInterface: u
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
|
-
|
|
265
|
+
o.addProperties(
|
|
266
266
|
c.sort((p, m) => p.isStatic && !m.isStatic ? -1 : !p.isStatic && m.isStatic ? 1 : p.isReadonly && !m.isReadonly ? -1 : !p.isReadonly && m.isReadonly ? 1 : p.name.localeCompare(m.name))
|
|
267
|
-
),
|
|
267
|
+
), o.addConstructor({
|
|
268
268
|
parameters: [
|
|
269
269
|
{
|
|
270
270
|
name: "initData",
|
|
@@ -277,7 +277,7 @@ const q = ({
|
|
|
277
277
|
const g = v(h, (p) => p.name).sort(
|
|
278
278
|
(p, m) => p.isStatic && !m.isStatic ? -1 : !p.isStatic && m.isStatic ? 1 : p.name.localeCompare(m.name)
|
|
279
279
|
);
|
|
280
|
-
return
|
|
280
|
+
return o.addMethods(g), {
|
|
281
281
|
rxdbNamedImports: s
|
|
282
282
|
};
|
|
283
283
|
}, X = {
|
|
@@ -290,7 +290,7 @@ const q = ({
|
|
|
290
290
|
[d.stringArray]: "StringArray",
|
|
291
291
|
[d.numberArray]: "NumberArray",
|
|
292
292
|
[d.keyValue]: "KeyValue"
|
|
293
|
-
},
|
|
293
|
+
}, A = (r) => X[r] ?? null, C = (r, e, t) => {
|
|
294
294
|
const s = r.length > 0 ? r.map((a) => a.key).join(".") + "." : "";
|
|
295
295
|
return t ? `${s}${e}.${t}` : `${s}${e}`;
|
|
296
296
|
}, ee = (r, e, t) => {
|
|
@@ -303,41 +303,41 @@ const q = ({
|
|
|
303
303
|
s = "number";
|
|
304
304
|
break;
|
|
305
305
|
case d.keyValue:
|
|
306
|
-
s = `Partial<${
|
|
306
|
+
s = `Partial<${M(r, e)}>`;
|
|
307
307
|
break;
|
|
308
308
|
default:
|
|
309
|
-
t.length > 0 && (s =
|
|
309
|
+
t.length > 0 && (s = $(r, e));
|
|
310
310
|
}
|
|
311
311
|
return s;
|
|
312
|
-
},
|
|
312
|
+
}, E = (r, e, t, s, a) => ({
|
|
313
313
|
rule: `${r}Rules`,
|
|
314
314
|
entity: e,
|
|
315
315
|
key: t,
|
|
316
316
|
valueType: s,
|
|
317
317
|
subRuleGroup: a
|
|
318
318
|
}), te = (r, e, t, s, a) => {
|
|
319
|
-
r.type !== d.keyValue || !("properties" in r) || !r.properties || r.properties.forEach((
|
|
320
|
-
const n =
|
|
319
|
+
r.type !== d.keyValue || !("properties" in r) || !r.properties || r.properties.forEach((i) => {
|
|
320
|
+
const n = A(i.type);
|
|
321
321
|
if (!n) return;
|
|
322
|
-
const
|
|
323
|
-
a.push(
|
|
322
|
+
const o = C(t, s, i.name), c = $(i, e);
|
|
323
|
+
a.push(E(n, e.name, o, c));
|
|
324
324
|
});
|
|
325
325
|
}, se = (r, e = []) => {
|
|
326
326
|
const t = [];
|
|
327
327
|
return Array.from(r.propertyMap.keys()).forEach((s) => {
|
|
328
|
-
const a = r.propertyMap.get(s),
|
|
329
|
-
if (
|
|
330
|
-
const n = ee(a, r, e),
|
|
331
|
-
t.push(
|
|
328
|
+
const a = r.propertyMap.get(s), i = A(a.type);
|
|
329
|
+
if (i) {
|
|
330
|
+
const n = ee(a, r, e), o = C(e, s);
|
|
331
|
+
t.push(E(i, r.name, o, n));
|
|
332
332
|
}
|
|
333
333
|
te(a, r, e, s, t);
|
|
334
334
|
}), t;
|
|
335
335
|
}, re = (r, e, t) => {
|
|
336
336
|
e.foreignKeyNames.forEach((s) => {
|
|
337
|
-
const a =
|
|
338
|
-
if (!
|
|
339
|
-
const
|
|
340
|
-
t.push(
|
|
337
|
+
const a = e.foreignKeyRelationMap.get(s);
|
|
338
|
+
if (!a) return;
|
|
339
|
+
const n = r.getMetadata(a.mappedEntity, a.mappedNamespace)?.propertyMap.get("id")?.type, o = n && A(n) || "UUID";
|
|
340
|
+
t.push(E(o, e.name, s));
|
|
341
341
|
});
|
|
342
342
|
}, ne = (r) => {
|
|
343
343
|
switch (r.kind) {
|
|
@@ -347,26 +347,26 @@ const q = ({
|
|
|
347
347
|
default:
|
|
348
348
|
return [];
|
|
349
349
|
}
|
|
350
|
-
}, oe = (r, e, t, s) => !!(r.some((
|
|
350
|
+
}, oe = (r, e, t, s) => !!(r.some((i) => i.entity === s.name) || r.length > 0 && e === t), ie = (r, e, t, s, a, i) => {
|
|
351
351
|
Array.from(e.relationMap.keys()).filter((n) => !s.includes(n)).forEach((n) => {
|
|
352
|
-
const
|
|
353
|
-
if (!
|
|
352
|
+
const o = e.relationMap.get(n);
|
|
353
|
+
if (!o)
|
|
354
354
|
throw new Error("relation is empty");
|
|
355
|
-
const c = r.getMetadata(
|
|
355
|
+
const c = r.getMetadata(o.mappedEntity, o.mappedNamespace);
|
|
356
356
|
if (!c)
|
|
357
|
-
throw new Error(`generator_entity_rules: metadata "${
|
|
358
|
-
if (oe(
|
|
357
|
+
throw new Error(`generator_entity_rules: metadata "${o.mappedEntity}" not found`);
|
|
358
|
+
if (oe(i, c, t, e))
|
|
359
359
|
return;
|
|
360
|
-
if (
|
|
360
|
+
if (i.length === 0) {
|
|
361
361
|
const l = `${c.name}RuleGroup`;
|
|
362
|
-
a.push(
|
|
362
|
+
a.push(E("RelationExists", e.name, n, void 0, l));
|
|
363
363
|
}
|
|
364
|
-
if (
|
|
364
|
+
if (i.length >= r.config.relationQueryDeep)
|
|
365
365
|
return;
|
|
366
|
-
const u = ne(
|
|
367
|
-
|
|
366
|
+
const u = ne(o), h = [...i, { key: n, entity: e.name }];
|
|
367
|
+
N(r, c, t, u, a, h);
|
|
368
368
|
});
|
|
369
|
-
},
|
|
369
|
+
}, N = (r, e, t, s = [], a = [], i = []) => (t = t ?? e, a.push(...se(e, i)), re(r, e, a), ie(r, e, t, s, a, i), a), k = (r, e) => r.map(({ rule: t, entity: s, key: a, valueType: i, subRuleGroup: n }) => (e.add(t), n ? `${t}<'${a}', ${n}>` : i ? a.includes(".") ? (e.add(`Relation${t}`), `Relation${t}<'${a}', ${i}>`) : `${t}<${s}, '${a}', ${i}>` : a.includes(".") ? (e.add(`Relation${t}`), `Relation${t}<'${a}'>`) : `${t}<${s}, '${a}'>`));
|
|
370
370
|
class ae {
|
|
371
371
|
generate(e) {
|
|
372
372
|
this.generateProperties(e), this.generateMethods(e);
|
|
@@ -394,7 +394,7 @@ class ae {
|
|
|
394
394
|
* 共享工具:添加静态查询方法
|
|
395
395
|
*/
|
|
396
396
|
addStaticMethod(e, t) {
|
|
397
|
-
const { classMethods: s, staticTypesInterface: a, rxdbNamedImports:
|
|
397
|
+
const { classMethods: s, staticTypesInterface: a, rxdbNamedImports: i } = e, n = [t.metHodDoc || `${t.method} 查询`, "@param options 查询选项"];
|
|
398
398
|
t.example && n.push("@example", t.example), s.push({
|
|
399
399
|
name: t.method,
|
|
400
400
|
returnType: `Observable<${t.returnType}>`,
|
|
@@ -412,9 +412,9 @@ class ae {
|
|
|
412
412
|
type: t.options,
|
|
413
413
|
docs: ["查询选项"]
|
|
414
414
|
});
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
!/^[a-z]/.test(c) && c.match(/^(Find|Count|Get)/) &&
|
|
415
|
+
const o = t.options.match(/\b([A-Z]\w+Options)\b/g);
|
|
416
|
+
o && o.forEach((c) => {
|
|
417
|
+
!/^[a-z]/.test(c) && c.match(/^(Find|Count|Get)/) && i.add(c);
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
/**
|
|
@@ -431,22 +431,19 @@ class ae {
|
|
|
431
431
|
* 共享工具:获取 ID 类型
|
|
432
432
|
*/
|
|
433
433
|
getIdType(e) {
|
|
434
|
-
|
|
435
|
-
if (!t) return "UUID";
|
|
436
|
-
const { type: s } = t;
|
|
437
|
-
return s === "uuid" ? "UUID" : s === "string" ? "string" : s === "number" || s === "integer" ? "number" : "UUID";
|
|
434
|
+
return S(e);
|
|
438
435
|
}
|
|
439
436
|
}
|
|
440
|
-
class
|
|
437
|
+
class B extends ae {
|
|
441
438
|
name = "Repository";
|
|
442
439
|
generateMethods(e) {
|
|
443
|
-
const { metadata: t, file: s, rxdbNamedImports: a, staticTypesInterface:
|
|
444
|
-
|
|
440
|
+
const { metadata: t, file: s, rxdbNamedImports: a, staticTypesInterface: i } = e, { name: n } = t, o = S(t);
|
|
441
|
+
i.addProperty({
|
|
445
442
|
name: "idType",
|
|
446
|
-
type:
|
|
443
|
+
type: o,
|
|
447
444
|
docs: ["id 类型"]
|
|
448
445
|
});
|
|
449
|
-
const c =
|
|
446
|
+
const c = N(e.generator, t), u = k(c, a), h = `
|
|
450
447
|
|` + c.map((p) => `'${p.key}'`).join(`
|
|
451
448
|
|`);
|
|
452
449
|
s.addTypeAlias({
|
|
@@ -473,11 +470,11 @@ ${n}Rule>`,
|
|
|
473
470
|
});
|
|
474
471
|
const g = (p) => ({
|
|
475
472
|
method: p,
|
|
476
|
-
options: `${
|
|
473
|
+
options: `${b(p)}Options<typeof ${n},${n}RuleGroup,${l}>`
|
|
477
474
|
});
|
|
478
475
|
this.addStaticMethod(e, {
|
|
479
476
|
method: "get",
|
|
480
|
-
options: `${
|
|
477
|
+
options: `${o}`,
|
|
481
478
|
returnType: n,
|
|
482
479
|
metHodDoc: "根据 ID 获取单个实体",
|
|
483
480
|
example: `${n}.get('123').subscribe(entity => console.log(entity));`,
|
|
@@ -514,7 +511,7 @@ ${n}Rule>`,
|
|
|
514
511
|
optionsIsRequired: !0
|
|
515
512
|
}), this.addStaticMethod(e, {
|
|
516
513
|
method: "count",
|
|
517
|
-
options: `${
|
|
514
|
+
options: `${b("count")}Options<typeof ${n},${n}RuleGroup>`,
|
|
518
515
|
returnType: "number",
|
|
519
516
|
metHodDoc: "统计实体数量",
|
|
520
517
|
example: `${n}.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));`,
|
|
@@ -534,69 +531,69 @@ ${n}Rule>`,
|
|
|
534
531
|
});
|
|
535
532
|
}
|
|
536
533
|
}
|
|
537
|
-
class ce extends
|
|
534
|
+
class ce extends B {
|
|
538
535
|
name = "TreeRepository";
|
|
539
536
|
generateMethods(e) {
|
|
540
|
-
const { metadata: t, rxdbNamedImports: s, generator: a, file:
|
|
537
|
+
const { metadata: t, rxdbNamedImports: s, generator: a, file: i, staticTypesInterface: n } = e, { name: o } = t, c = N(a, t).filter(
|
|
541
538
|
(y) => y.key.startsWith("children.") && y.key !== "children.id"
|
|
542
|
-
), u =
|
|
543
|
-
|
|
544
|
-
name: `${
|
|
539
|
+
), u = k(c, s), h = c.map((y) => `'${y.key}'`).join(" | ");
|
|
540
|
+
i.addTypeAlias({
|
|
541
|
+
name: `${o}TreeRule`,
|
|
545
542
|
type: Array.from(new Set(u)).join(`
|
|
546
543
|
| `),
|
|
547
544
|
hasDeclareKeyword: !0,
|
|
548
545
|
docs: ["TreeRule"]
|
|
549
|
-
}),
|
|
550
|
-
name: `${
|
|
551
|
-
type: `RuleGroupBase<typeof ${
|
|
546
|
+
}), i.addTypeAlias({
|
|
547
|
+
name: `${o}TreeRuleGroup`,
|
|
548
|
+
type: `RuleGroupBase<typeof ${o}, ${h}, ${o}TreeRule>`,
|
|
552
549
|
hasDeclareKeyword: !0,
|
|
553
550
|
docs: ["TreeRuleGroup"],
|
|
554
551
|
isExported: !0
|
|
555
552
|
}), n.addProperty({
|
|
556
553
|
name: "entity",
|
|
557
|
-
type: `${
|
|
554
|
+
type: `${o}`,
|
|
558
555
|
docs: ["查询的实体"]
|
|
559
|
-
}), s.add(
|
|
560
|
-
const l = `FindTreeOptions<typeof ${
|
|
556
|
+
}), s.add(b("FindTreeOptions"));
|
|
557
|
+
const l = `FindTreeOptions<typeof ${o},${o}TreeRuleGroup>`;
|
|
561
558
|
this.addStaticMethod(e, {
|
|
562
559
|
method: "findDescendants",
|
|
563
560
|
options: l,
|
|
564
|
-
returnType: `${
|
|
561
|
+
returnType: `${o}[]`,
|
|
565
562
|
metHodDoc: "查询子孙实体(包含自身)",
|
|
566
563
|
example: `// 查询某节点的所有后代
|
|
567
|
-
${
|
|
564
|
+
${o}.findDescendants({ entityId: root.id }).subscribe(list => console.log(list));
|
|
568
565
|
|
|
569
566
|
// 仅查询直接子节点(level 1)
|
|
570
|
-
${
|
|
567
|
+
${o}.findDescendants({ entityId: root.id, level: 1 }).subscribe(children => console.log(children));`
|
|
571
568
|
}), this.addStaticMethod(e, {
|
|
572
569
|
method: "countDescendants",
|
|
573
570
|
options: l,
|
|
574
571
|
returnType: "number",
|
|
575
572
|
metHodDoc: "统计子孙实体数量(不包含自身)",
|
|
576
573
|
example: `// 统计某节点下的后代数量
|
|
577
|
-
${
|
|
574
|
+
${o}.countDescendants({ entityId: root.id }).subscribe(count => console.log(count));`
|
|
578
575
|
}), this.addStaticMethod(e, {
|
|
579
576
|
method: "findAncestors",
|
|
580
577
|
options: l,
|
|
581
|
-
returnType: `${
|
|
578
|
+
returnType: `${o}[]`,
|
|
582
579
|
metHodDoc: "查询祖先实体(包含自身)",
|
|
583
580
|
example: `// 查询某节点的所有祖先(面包屑导航)
|
|
584
|
-
${
|
|
581
|
+
${o}.findAncestors({ entityId: grand.id }).subscribe(ancestors => console.log(ancestors));
|
|
585
582
|
|
|
586
583
|
// 仅查询直接父节点(level 1)
|
|
587
|
-
${
|
|
584
|
+
${o}.findAncestors({ entityId: grand.id, level: 1 }).subscribe(parents => console.log(parents));`
|
|
588
585
|
}), this.addStaticMethod(e, {
|
|
589
586
|
method: "countAncestors",
|
|
590
587
|
options: l,
|
|
591
588
|
returnType: "number",
|
|
592
589
|
metHodDoc: "统计祖先实体数量(不包含自身)",
|
|
593
590
|
example: `// 统计某节点的祖先层级深度
|
|
594
|
-
${
|
|
591
|
+
${o}.countAncestors({ entityId: grand.id }).subscribe(depth => console.log(depth));`
|
|
595
592
|
});
|
|
596
593
|
}
|
|
597
594
|
}
|
|
598
|
-
var
|
|
599
|
-
class
|
|
595
|
+
var G = /* @__PURE__ */ ((r) => (r.Var = "var", r.Let = "let", r.Const = "const", r))(G || {});
|
|
596
|
+
class T {
|
|
600
597
|
/**
|
|
601
598
|
* 渲染单个参数
|
|
602
599
|
*/
|
|
@@ -628,7 +625,7 @@ class $ {
|
|
|
628
625
|
*/
|
|
629
626
|
static renderJsDoc(e, t = 0) {
|
|
630
627
|
if (!e?.length) return "";
|
|
631
|
-
const s = " ".repeat(t), a = e.map((
|
|
628
|
+
const s = " ".repeat(t), a = e.map((i) => `${s} * ${i}`).join(`
|
|
632
629
|
`);
|
|
633
630
|
return `${s}/**
|
|
634
631
|
${a}
|
|
@@ -639,20 +636,20 @@ ${s} */
|
|
|
639
636
|
* 渲染属性
|
|
640
637
|
*/
|
|
641
638
|
static renderProperty(e, t, s = !0) {
|
|
642
|
-
const a = " ".repeat(t),
|
|
643
|
-
return e.docs?.length &&
|
|
644
|
-
`),
|
|
639
|
+
const a = " ".repeat(t), i = [];
|
|
640
|
+
return e.docs?.length && i.push(this.renderJsDoc(e.docs, t)), i.push(a), e.isStatic && i.push("static "), e.isReadonly && i.push("readonly "), i.push(e.name), e.hasQuestionToken && i.push("?"), e.type && i.push(`: ${e.type}`), !s && e.initializer && i.push(` = ${e.initializer}`), i.push(`;
|
|
641
|
+
`), i.join("");
|
|
645
642
|
}
|
|
646
643
|
/**
|
|
647
644
|
* 渲染接口块
|
|
648
645
|
*/
|
|
649
646
|
static renderInterfaceBlock(e, t, s) {
|
|
650
|
-
const a = " ".repeat(t),
|
|
651
|
-
return e.docs?.length &&
|
|
647
|
+
const a = " ".repeat(t), i = [];
|
|
648
|
+
return e.docs?.length && i.push(this.renderJsDoc(e.docs, t)), i.push(a), s && e.isExported && i.push("export "), i.push(`interface ${e.name}`), e.extends?.length && i.push(` extends ${e.extends.join(", ")}`), i.push(` {
|
|
652
649
|
`), e.properties?.length && e.properties.forEach((n) => {
|
|
653
|
-
|
|
654
|
-
}),
|
|
655
|
-
`),
|
|
650
|
+
i.push(this.renderProperty(n, t + 2));
|
|
651
|
+
}), i.push(`${a}}
|
|
652
|
+
`), i.join("");
|
|
656
653
|
}
|
|
657
654
|
/**
|
|
658
655
|
* 渲染导入声明
|
|
@@ -698,28 +695,28 @@ ${s} */
|
|
|
698
695
|
if (!t) return "";
|
|
699
696
|
const s = [], a = e.jsDoc?.length ? e.jsDoc : [t];
|
|
700
697
|
s.push(this.renderJsDoc(a)), s.push(`export declare class ${t}`);
|
|
701
|
-
const
|
|
702
|
-
if (
|
|
703
|
-
const
|
|
704
|
-
|
|
698
|
+
const i = e.getBaseClass();
|
|
699
|
+
if (i) {
|
|
700
|
+
const o = i.getName();
|
|
701
|
+
o && s.push(` extends ${o}`);
|
|
705
702
|
}
|
|
706
703
|
const n = e.getImplements();
|
|
707
704
|
if (n.length) {
|
|
708
|
-
const
|
|
709
|
-
s.push(` implements ${
|
|
705
|
+
const o = n.map((c) => c.getText()).join(", ");
|
|
706
|
+
s.push(` implements ${o}`);
|
|
710
707
|
}
|
|
711
708
|
if (s.push(` {
|
|
712
|
-
`), e.properties?.length && e.properties.forEach((
|
|
713
|
-
s.push(this.renderProperty(
|
|
709
|
+
`), e.properties?.length && e.properties.forEach((o) => {
|
|
710
|
+
s.push(this.renderProperty(o, 2, !1));
|
|
714
711
|
}), e.constructorData) {
|
|
715
|
-
const { parameters:
|
|
716
|
-
c?.length && s.push(this.renderJsDoc(c, 2)), s.push(` constructor(${this.renderParameterList(
|
|
712
|
+
const { parameters: o, docs: c } = e.constructorData;
|
|
713
|
+
c?.length && s.push(this.renderJsDoc(c, 2)), s.push(` constructor(${this.renderParameterList(o)});
|
|
717
714
|
`);
|
|
718
715
|
}
|
|
719
|
-
return e.methods?.length && e.methods.forEach((
|
|
720
|
-
|
|
716
|
+
return e.methods?.length && e.methods.forEach((o) => {
|
|
717
|
+
o.docs?.length && s.push(this.renderJsDoc(o.docs, 2));
|
|
721
718
|
const c = [" "];
|
|
722
|
-
|
|
719
|
+
o.isStatic && c.push("static "), c.push(`${o.name}(${this.renderParameterList(o.parameters)})`), o.returnType && c.push(`: ${o.returnType}`), c.push(`;
|
|
723
720
|
`), s.push(c.join(""));
|
|
724
721
|
}), s.push(`}
|
|
725
722
|
|
|
@@ -803,7 +800,7 @@ class pe {
|
|
|
803
800
|
return this.structure.name || "";
|
|
804
801
|
}
|
|
805
802
|
}
|
|
806
|
-
class
|
|
803
|
+
class _ {
|
|
807
804
|
filePath;
|
|
808
805
|
classes = [];
|
|
809
806
|
interfaces = [];
|
|
@@ -829,7 +826,7 @@ class P {
|
|
|
829
826
|
const s = this.modules[this.modules.length - 1];
|
|
830
827
|
return s.interfaces || (s.interfaces = []), s.interfaces.push(t), {
|
|
831
828
|
addProperty: (a) => {
|
|
832
|
-
const
|
|
829
|
+
const i = this.modules[this.modules.length - 1], n = i.interfaces[i.interfaces.length - 1];
|
|
833
830
|
n.properties || (n.properties = []), n.properties.push(a);
|
|
834
831
|
}
|
|
835
832
|
};
|
|
@@ -853,13 +850,13 @@ class P {
|
|
|
853
850
|
}
|
|
854
851
|
getText() {
|
|
855
852
|
return this.fileContent ? this.fileContent : [
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
this.interfaces.map((t) =>
|
|
853
|
+
T.renderImports(this.imports),
|
|
854
|
+
T.renderTypeAliases(this.typeAliases),
|
|
855
|
+
T.renderModules(this.modules),
|
|
856
|
+
this.interfaces.map((t) => T.renderInterfaceBlock(t, 0, !0) + `
|
|
860
857
|
`).join(""),
|
|
861
|
-
this.classes.map((t) =>
|
|
862
|
-
|
|
858
|
+
this.classes.map((t) => T.renderClass(t)).join(""),
|
|
859
|
+
T.renderVariables(this.variables)
|
|
863
860
|
].join("");
|
|
864
861
|
}
|
|
865
862
|
setContent(e) {
|
|
@@ -875,28 +872,28 @@ class P {
|
|
|
875
872
|
class le {
|
|
876
873
|
files = /* @__PURE__ */ new Map();
|
|
877
874
|
createSourceFile(e, t) {
|
|
878
|
-
const s = new
|
|
875
|
+
const s = new _(e);
|
|
879
876
|
return t && s.setContent(t), this.files.set(e, s), s;
|
|
880
877
|
}
|
|
881
878
|
addSourceFileAtPath(e) {
|
|
882
|
-
const t = new
|
|
879
|
+
const t = new _(e);
|
|
883
880
|
return this.files.set(e, t), t;
|
|
884
881
|
}
|
|
885
882
|
getSourceFiles() {
|
|
886
883
|
return Array.from(this.files.values());
|
|
887
884
|
}
|
|
888
885
|
}
|
|
889
|
-
const x = (r, e =
|
|
890
|
-
class
|
|
886
|
+
const Y = "public", I = "Repository", ge = "TreeRepository", Te = "GraphRepository", ue = "EntityBase", he = "TreeAdjacencyListEntityBase", ye = "TreeEntityBase", x = (r, e = Y) => `${e}_${r}`;
|
|
887
|
+
class $e {
|
|
891
888
|
/**
|
|
892
889
|
* Repository 生成器注册表
|
|
893
890
|
* 用于支持可扩展的 Repository 类型
|
|
894
891
|
*/
|
|
895
892
|
repositoryGenerators = /* @__PURE__ */ new Map();
|
|
896
893
|
entityMetadataOptionsMap = /* @__PURE__ */ new Map([
|
|
897
|
-
[
|
|
898
|
-
[
|
|
899
|
-
[
|
|
894
|
+
[ue, [R]],
|
|
895
|
+
[he, [P, R]],
|
|
896
|
+
[ye, [P, R]]
|
|
900
897
|
]);
|
|
901
898
|
metadataOptionsSet = /* @__PURE__ */ new Set();
|
|
902
899
|
metadataSet = /* @__PURE__ */ new Set();
|
|
@@ -906,7 +903,7 @@ class ye {
|
|
|
906
903
|
relationQueryDeep: 3
|
|
907
904
|
};
|
|
908
905
|
constructor(e) {
|
|
909
|
-
Object.assign(this.config, e), this.config.relationQueryDeep < 1 && (this.config.relationQueryDeep = 1), this.registerRepositoryGenerator(new
|
|
906
|
+
Object.assign(this.config, e), this.config.relationQueryDeep < 1 && (this.config.relationQueryDeep = 1), this.registerRepositoryGenerator(new B()), this.registerRepositoryGenerator(new ce());
|
|
910
907
|
}
|
|
911
908
|
/**
|
|
912
909
|
* 添加实体配置
|
|
@@ -915,10 +912,10 @@ class ye {
|
|
|
915
912
|
addEntity(e, t) {
|
|
916
913
|
let s;
|
|
917
914
|
if (U(e))
|
|
918
|
-
s =
|
|
915
|
+
s = K(e);
|
|
919
916
|
else {
|
|
920
917
|
const a = e;
|
|
921
|
-
t = t || a.extends?.length && this.entityMetadataOptionsMap.get(a.extends[0]) || [], s =
|
|
918
|
+
t = t || a.extends?.length && this.entityMetadataOptionsMap.get(a.extends[0]) || [], s = O(e, t);
|
|
922
919
|
}
|
|
923
920
|
this.metadataSet.add(s), this.metadataMap.set(`${s.namespace}_${s.name}`, s);
|
|
924
921
|
}
|
|
@@ -927,7 +924,7 @@ class ye {
|
|
|
927
924
|
}
|
|
928
925
|
registerAbstractMetadata(e, t) {
|
|
929
926
|
this.entityMetadataOptionsMap.set(e, t), t.forEach((s) => {
|
|
930
|
-
const a =
|
|
927
|
+
const a = O(s);
|
|
931
928
|
this.metadataMap.set(x(s.name, s.namespace), a);
|
|
932
929
|
});
|
|
933
930
|
}
|
|
@@ -969,21 +966,21 @@ class ye {
|
|
|
969
966
|
generateEntityJsFile() {
|
|
970
967
|
const { project: e, metadataSet: t } = this;
|
|
971
968
|
let s = "";
|
|
972
|
-
const a = /* @__PURE__ */ new Set(["Entity", "__decorateClass"]),
|
|
973
|
-
const c = this.getMetadata(
|
|
969
|
+
const a = /* @__PURE__ */ new Set(["Entity", "__decorateClass"]), i = (o) => {
|
|
970
|
+
const c = this.getMetadata(o.mappedEntity, o.mappedNamespace);
|
|
974
971
|
if (c?.relations)
|
|
975
972
|
return c.relations.find(
|
|
976
|
-
(u) => u.kind === f.MANY_TO_MANY && u.name ===
|
|
973
|
+
(u) => u.kind === f.MANY_TO_MANY && u.name === o.mappedProperty && u.mappedProperty === o.name
|
|
977
974
|
);
|
|
978
975
|
};
|
|
979
|
-
t.forEach((
|
|
980
|
-
|
|
981
|
-
if (c.kind === f.MANY_TO_MANY && !
|
|
976
|
+
t.forEach((o) => {
|
|
977
|
+
o.relations.forEach((c) => {
|
|
978
|
+
if (c.kind === f.MANY_TO_MANY && !i(c))
|
|
982
979
|
throw new Error("mapped relation not found");
|
|
983
980
|
});
|
|
984
|
-
}), t.forEach((
|
|
985
|
-
const c =
|
|
986
|
-
c && a.add(c),
|
|
981
|
+
}), t.forEach((o) => {
|
|
982
|
+
const c = o.extends[0], { name: u } = o, h = u, l = q(o);
|
|
983
|
+
c && a.add(c), o.properties.length && a.add("PropertyType"), o.relations.length && a.add("RelationKind"), s += `
|
|
987
984
|
let ${h} = class ${c ? "extends " + c : ""} {};`, s += `
|
|
988
985
|
${h} = __decorateClass(
|
|
989
986
|
[
|
|
@@ -992,7 +989,7 @@ ${h} = __decorateClass(
|
|
|
992
989
|
${h}
|
|
993
990
|
);`;
|
|
994
991
|
}), s = `import { ${Array.from(a).sort().join(", ")} } from '@aiao/rxdb';` + s;
|
|
995
|
-
const n = Array.from(t.values()).map((
|
|
992
|
+
const n = Array.from(t.values()).map((o) => o.name).sort().join(", ");
|
|
996
993
|
s += `
|
|
997
994
|
const ENTITIES = [ ${n} ];`, s += `
|
|
998
995
|
export { ENTITIES, ${n} };`, e.createSourceFile("index.js", s);
|
|
@@ -1002,7 +999,7 @@ export { ENTITIES, ${n} };`, e.createSourceFile("index.js", s);
|
|
|
1002
999
|
* @private
|
|
1003
1000
|
*/
|
|
1004
1001
|
generateAllEntityDefinition() {
|
|
1005
|
-
const { project: e, metadataSet: t } = this, s = e.createSourceFile("index.d.ts"),
|
|
1002
|
+
const { project: e, metadataSet: t } = this, s = e.createSourceFile("index.d.ts"), i = s.addModule({
|
|
1006
1003
|
name: '"@aiao/rxdb"',
|
|
1007
1004
|
hasDeclareKeyword: !0,
|
|
1008
1005
|
docs: ["rxdb"]
|
|
@@ -1010,20 +1007,20 @@ export { ENTITIES, ${n} };`, e.createSourceFile("index.js", s);
|
|
|
1010
1007
|
name: "RxDB",
|
|
1011
1008
|
docs: ["RxDB"]
|
|
1012
1009
|
}), n = /* @__PURE__ */ new Set(["EntityType", "IEntity", "ITreeEntity", "RuleGroupBase", "UUID"]);
|
|
1013
|
-
t.forEach((
|
|
1014
|
-
const { rxdbNamedImports: c } = Z(this,
|
|
1010
|
+
t.forEach((o) => {
|
|
1011
|
+
const { rxdbNamedImports: c } = Z(this, o, s);
|
|
1015
1012
|
c.forEach((l) => n.add(l));
|
|
1016
|
-
const { name: u } =
|
|
1017
|
-
|
|
1018
|
-
name:
|
|
1013
|
+
const { name: u } = o, h = u;
|
|
1014
|
+
o.namespace && o.namespace !== Y ? i.addProperty({
|
|
1015
|
+
name: o.namespace,
|
|
1019
1016
|
type: `{
|
|
1020
1017
|
${h}: typeof ${h};
|
|
1021
1018
|
}`,
|
|
1022
|
-
docs: [
|
|
1023
|
-
}) :
|
|
1019
|
+
docs: [o.displayName]
|
|
1020
|
+
}) : i.addProperty({
|
|
1024
1021
|
name: h,
|
|
1025
1022
|
type: `typeof ${h}`,
|
|
1026
|
-
docs: [
|
|
1023
|
+
docs: [o.displayName]
|
|
1027
1024
|
});
|
|
1028
1025
|
}), s.addImportDeclaration({
|
|
1029
1026
|
namedImports: Array.from(n).filter(Boolean).sort(),
|
|
@@ -1034,7 +1031,7 @@ ${h}: typeof ${h};
|
|
|
1034
1031
|
isTypeOnly: !0,
|
|
1035
1032
|
moduleSpecifier: "rxjs"
|
|
1036
1033
|
}), s.addVariableStatement({
|
|
1037
|
-
declarationKind:
|
|
1034
|
+
declarationKind: G.Const,
|
|
1038
1035
|
hasDeclareKeyword: !0,
|
|
1039
1036
|
isExported: !0,
|
|
1040
1037
|
declarations: [
|
|
@@ -1047,6 +1044,10 @@ ${h}: typeof ${h};
|
|
|
1047
1044
|
}
|
|
1048
1045
|
}
|
|
1049
1046
|
export {
|
|
1050
|
-
|
|
1051
|
-
|
|
1047
|
+
Y as N,
|
|
1048
|
+
Te as R,
|
|
1049
|
+
I as a,
|
|
1050
|
+
ge as b,
|
|
1051
|
+
ae as c,
|
|
1052
|
+
$e as d
|
|
1052
1053
|
};
|