@barcidev/ngx-autogen 0.1.47 → 0.1.50
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/package.json
CHANGED
package/src/ngrx/store/index.js
CHANGED
|
@@ -55,7 +55,7 @@ function resolveStoreContext(workspace, options) {
|
|
|
55
55
|
// Resolución de Rutas (Lógica de Directorio Actual)
|
|
56
56
|
const fullPath = process.cwd();
|
|
57
57
|
const srcIndex = fullPath.lastIndexOf("src");
|
|
58
|
-
let relativePath = srcIndex !== -1
|
|
58
|
+
let relativePath = options.path || srcIndex !== -1
|
|
59
59
|
? fullPath.substring(srcIndex)
|
|
60
60
|
: (0, core_1.join)((0, core_1.normalize)("src"), "app");
|
|
61
61
|
let movePath = (0, core_1.normalize)(relativePath);
|
package/src/transloco/index.js
CHANGED
|
@@ -142,12 +142,14 @@ function resolveComponentContext(tree, options) {
|
|
|
142
142
|
(0, path_1.normalize)(srcIndex !== -1
|
|
143
143
|
? fullPath.substring(srcIndex)
|
|
144
144
|
: (0, path_1.join)((0, path_1.normalize)("src"), "app"));
|
|
145
|
+
let componentName = options.name;
|
|
145
146
|
const directory = tree.getDir(path);
|
|
146
147
|
const componentFile = directory.subfiles.find((f) => f.endsWith(".component.ts")) ||
|
|
147
148
|
directory.subfiles.find((f) => f.endsWith(".ts"));
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
if (!options.name) {
|
|
150
|
+
componentName =
|
|
151
|
+
(componentFile === null || componentFile === void 0 ? void 0 : componentFile.replace(".component.ts", "").replace(".ts", "")) || "file";
|
|
152
|
+
}
|
|
151
153
|
if (!componentName)
|
|
152
154
|
throw new schematics_1.SchematicsException("❌ No se pudo determinar el nombre del componente.");
|
|
153
155
|
return { path, componentFile, componentName };
|