@barcidev/ngx-autogen 0.1.5 → 0.1.7
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/ng-add/index.js
CHANGED
|
@@ -18,12 +18,12 @@ function ngAdd(options) {
|
|
|
18
18
|
}
|
|
19
19
|
const mainVersion = parseInt(angularCoreVer.replace(/[^\d.]/g, "").split(".")[0], 10);
|
|
20
20
|
if (mainVersion < 20) {
|
|
21
|
-
_context.logger.error(`❌ Error: ngx-
|
|
21
|
+
_context.logger.error(`❌ Error: @barcidev/ngx-autogen requires Angular v20 or higher. Detected: v${mainVersion}`);
|
|
22
22
|
return tree; // Stop execution
|
|
23
23
|
}
|
|
24
24
|
const ngrxVersion = `^${mainVersion}.0.0`;
|
|
25
25
|
_context.logger.info(`📦 Configuring dependencies for Angular v${mainVersion}...`);
|
|
26
|
-
const packageName = "ngx-autogen";
|
|
26
|
+
const packageName = "@barcidev/ngx-autogen";
|
|
27
27
|
packageJson.dependencies = Object.assign(Object.assign({}, packageJson.dependencies), { "@ngrx/signals": ngrxVersion });
|
|
28
28
|
if (packageJson.dependencies[packageName]) {
|
|
29
29
|
const currentVer = packageJson.dependencies[packageName];
|
|
@@ -56,13 +56,13 @@ function updateAngularJson(tree, options) {
|
|
|
56
56
|
if (!workspace.cli)
|
|
57
57
|
workspace.cli = {};
|
|
58
58
|
const collections = workspace.cli.schematicCollections || [];
|
|
59
|
-
if (!collections.includes("ngx-autogen")) {
|
|
60
|
-
collections.push("ngx-autogen");
|
|
59
|
+
if (!collections.includes("@barcidev/ngx-autogen")) {
|
|
60
|
+
collections.push("@barcidev/ngx-autogen");
|
|
61
61
|
workspace.cli.schematicCollections = collections;
|
|
62
62
|
}
|
|
63
63
|
if (!workspace.schematics)
|
|
64
64
|
workspace.schematics = {};
|
|
65
|
-
workspace.schematics["ngx-autogen:all"] = {
|
|
65
|
+
workspace.schematics["@barcidev/ngx-autogen:all"] = {
|
|
66
66
|
pk: options.pk,
|
|
67
67
|
lang: options.lang,
|
|
68
68
|
};
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
})
|
|
12
12
|
export class <%= classify(name) %>Service {
|
|
13
13
|
|
|
14
|
-
add<%= classify(name) %>$(
|
|
14
|
+
add<%= classify(name) %>$(payload: Add<%= classify(name) %>): Observable<number> {
|
|
15
15
|
return of(0);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ export class <%= classify(name) %>Service {
|
|
|
23
23
|
return of([]);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
update<%= classify(name) %>$(
|
|
26
|
+
update<%= classify(name) %>$(payload: Update<%= classify(name) %>): Observable<boolean> {
|
|
27
27
|
return of(true);
|
|
28
28
|
}
|
|
29
29
|
}
|
package/src/ngrx/store/index.js
CHANGED
|
@@ -56,7 +56,7 @@ function signalStore(options) {
|
|
|
56
56
|
return (tree) => __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
var _a;
|
|
58
58
|
const workspace = yield (0, workspace_1.getWorkspace)(tree);
|
|
59
|
-
const globalConfig = (_a = workspace.extensions.schematics) === null || _a === void 0 ? void 0 : _a["ngx-autogen:all"];
|
|
59
|
+
const globalConfig = (_a = workspace.extensions.schematics) === null || _a === void 0 ? void 0 : _a["@barcidev/ngx-autogen:all"];
|
|
60
60
|
if (globalConfig && globalConfig.pk && !options.pk) {
|
|
61
61
|
options.pk = globalConfig.pk;
|
|
62
62
|
}
|