mobiletto-orm-typedef-gen 2.1.3 → 2.1.5
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/lib/cjs/generate.js +4 -0
- package/lib/esm/generate.js +4 -0
- package/package.json +2 -2
package/lib/cjs/generate.js
CHANGED
|
@@ -137,6 +137,10 @@ export const generate = (typeDef, templatePath, opts) => {
|
|
|
137
137
|
allData = data + allData;
|
|
138
138
|
}
|
|
139
139
|
if (opts === null || opts === void 0 ? void 0 : opts.outfile) {
|
|
140
|
+
const outDir = dirname(opts.outfile);
|
|
141
|
+
if (!fs.existsSync(outDir)) {
|
|
142
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
143
|
+
}
|
|
140
144
|
fs.writeFileSync(opts.outfile, allData);
|
|
141
145
|
}
|
|
142
146
|
return allData;
|
package/lib/esm/generate.js
CHANGED
|
@@ -137,6 +137,10 @@ export const generate = (typeDef, templatePath, opts) => {
|
|
|
137
137
|
allData = data + allData;
|
|
138
138
|
}
|
|
139
139
|
if (opts === null || opts === void 0 ? void 0 : opts.outfile) {
|
|
140
|
+
const outDir = dirname(opts.outfile);
|
|
141
|
+
if (!fs.existsSync(outDir)) {
|
|
142
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
143
|
+
}
|
|
140
144
|
fs.writeFileSync(opts.outfile, allData);
|
|
141
145
|
}
|
|
142
146
|
return allData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobiletto-orm-typedef-gen",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "generate various files based on mobiletto-orm-typedef definitions",
|
|
6
6
|
"keywords": [
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"handlebars": "^4.7.7",
|
|
59
|
-
"mobiletto-orm-typedef": "^2.1.
|
|
59
|
+
"mobiletto-orm-typedef": "^2.1.13"
|
|
60
60
|
}
|
|
61
61
|
}
|