gg-mysql-connector 1.0.32 → 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.
@@ -247,7 +247,16 @@ class ModelGenerator {
247
247
  }
248
248
  }
249
249
  const fileName = `${params.appName}_model_const.ts`;
250
- const code = `export const ${params.appName}_const = { ${array.join(",")} }`;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg-mysql-connector",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -315,7 +315,18 @@ export default class ModelGenerator {
315
315
  }
316
316
  }
317
317
  const fileName = `${params.appName}_model_const.ts`
318
- const code = `export const ${params.appName}_const = { ${array.join(",")} }`
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(",")} }`
319
330
 
320
331
  for (let row of params.outputDirectory) {
321
332
  const serverFilePath = path.join(row, fileName)