mobiletto-orm-typedef-gen 2.1.32 → 2.1.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/lib/cjs/generate.js +1 -1
- package/lib/esm/generate.js +1 -1
- package/package.json +1 -1
package/lib/cjs/generate.js
CHANGED
|
@@ -139,7 +139,7 @@ export const generate = (typeDef, templatePath, opts) => {
|
|
|
139
139
|
if (lastSlash === -1 || lastSlash === templatePath.length - 1) {
|
|
140
140
|
throw new MobilettoOrmError(`invalid template path: ${templatePath}`);
|
|
141
141
|
}
|
|
142
|
-
const endPath = templatePath.substring(0, lastSlash).replace(
|
|
142
|
+
const endPath = templatePath.substring(0, lastSlash).replace(/[^A-Z0-9_./-]/gi, "") + templatePath.substring(lastSlash);
|
|
143
143
|
if (endPath !== templatePath) {
|
|
144
144
|
throw new MobilettoOrmError(`invalid template path: ${templatePath}`);
|
|
145
145
|
}
|
package/lib/esm/generate.js
CHANGED
|
@@ -139,7 +139,7 @@ export const generate = (typeDef, templatePath, opts) => {
|
|
|
139
139
|
if (lastSlash === -1 || lastSlash === templatePath.length - 1) {
|
|
140
140
|
throw new MobilettoOrmError(`invalid template path: ${templatePath}`);
|
|
141
141
|
}
|
|
142
|
-
const endPath = templatePath.substring(0, lastSlash).replace(
|
|
142
|
+
const endPath = templatePath.substring(0, lastSlash).replace(/[^A-Z0-9_./-]/gi, "") + templatePath.substring(lastSlash);
|
|
143
143
|
if (endPath !== templatePath) {
|
|
144
144
|
throw new MobilettoOrmError(`invalid template path: ${templatePath}`);
|
|
145
145
|
}
|