gg-mysql-connector 1.0.33 → 1.0.34
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/ModelGenerator.js +10 -1
- package/package.json +1 -1
- package/src/ModelGenerator.ts +12 -3
package/dist/ModelGenerator.js
CHANGED
|
@@ -247,7 +247,16 @@ class ModelGenerator {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
const fileName = `${params.appName}_model_const.ts`;
|
|
250
|
-
const code = `
|
|
250
|
+
const code = `
|
|
251
|
+
type paramType = "number" | "string" | "any" | string[] | number[]
|
|
252
|
+
interface constInterface {
|
|
253
|
+
[keytable: string]: {
|
|
254
|
+
[key: string]: paramType
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
export const ${params.appName}_model_const : constInterface = { ${array.join(",")} }`;
|
|
251
260
|
for (let row of params.outputDirectory) {
|
|
252
261
|
const serverFilePath = path_1.default.join(row, fileName);
|
|
253
262
|
await fs_1.default.writeFileSync(serverFilePath, code);
|
package/package.json
CHANGED
package/src/ModelGenerator.ts
CHANGED
|
@@ -315,9 +315,18 @@ export default class ModelGenerator {
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
const fileName = `${params.appName}_model_const.ts`
|
|
318
|
-
const code = `
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
const code = `
|
|
319
|
+
type paramType = "number" | "string" | "any" | string[] | number[]
|
|
320
|
+
interface constInterface {
|
|
321
|
+
[keytable: string]: {
|
|
322
|
+
[key: string]: paramType
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
export const ${
|
|
328
|
+
params.appName
|
|
329
|
+
}_model_const : constInterface = { ${array.join(",")} }`
|
|
321
330
|
|
|
322
331
|
for (let row of params.outputDirectory) {
|
|
323
332
|
const serverFilePath = path.join(row, fileName)
|