gg-mysql-connector 1.0.14 → 1.0.23
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/.gitlab-ci.yml +13 -0
- package/dist/ModelGenerator.d.ts +1 -1
- package/dist/ModelGenerator.js +1 -1
- package/package.json +4 -3
- package/src/ModelGenerator.ts +2 -2
package/.gitlab-ci.yml
ADDED
package/dist/ModelGenerator.d.ts
CHANGED
package/dist/ModelGenerator.js
CHANGED
|
@@ -155,7 +155,7 @@ class ModelGenerator {
|
|
|
155
155
|
}
|
|
156
156
|
const fileName = `${params.appName}_INF.ts`;
|
|
157
157
|
const code = `export default interface ${params.appName}_INF { ${array.join("\n")} }`;
|
|
158
|
-
params.
|
|
158
|
+
params.outputDirectory.forEach(async (tempPath) => {
|
|
159
159
|
const serverFilePath = path_1.default.join(tempPath, fileName);
|
|
160
160
|
await fs_1.default.writeFileSync(serverFilePath, code);
|
|
161
161
|
console.log("save to ", serverFilePath);
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gg-mysql-connector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
-
"build": "tsc && npm version patch"
|
|
8
|
+
"build": "tsc && npm version patch --no-git-tag-version"
|
|
9
9
|
},
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"path": "^0.12.7"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/node": "^22.7.5"
|
|
20
|
+
"@types/node": "^22.7.5",
|
|
21
|
+
"typescript": "^5.6.3"
|
|
21
22
|
}
|
|
22
23
|
}
|
package/src/ModelGenerator.ts
CHANGED
|
@@ -126,7 +126,7 @@ export default class ModelGenerator {
|
|
|
126
126
|
async generateModelInterface(params: {
|
|
127
127
|
appName: string
|
|
128
128
|
model: MyModel[]
|
|
129
|
-
|
|
129
|
+
outputDirectory: string[]
|
|
130
130
|
}) {
|
|
131
131
|
const isTableNameExistInModel = (tableName: string) => {
|
|
132
132
|
if (tableName === "sessions") return true
|
|
@@ -207,7 +207,7 @@ export default class ModelGenerator {
|
|
|
207
207
|
params.appName
|
|
208
208
|
}_INF { ${array.join("\n")} }`
|
|
209
209
|
|
|
210
|
-
params.
|
|
210
|
+
params.outputDirectory.forEach(async (tempPath) => {
|
|
211
211
|
const serverFilePath = path.join(tempPath, fileName)
|
|
212
212
|
await fs.writeFileSync(serverFilePath, code)
|
|
213
213
|
console.log("save to ", serverFilePath)
|