@o3r/store-sync 12.3.0-prerelease.9 → 12.4.0-prerelease.0
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/store-sync",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.4.0-prerelease.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
"otter-module"
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@ama-sdk/core": "^12.
|
|
16
|
+
"@ama-sdk/core": "^12.4.0-prerelease.0",
|
|
17
17
|
"@angular-devkit/core": "^19.0.0",
|
|
18
18
|
"@angular-devkit/schematics": "^19.0.0",
|
|
19
19
|
"@ngrx/entity": "^19.0.0",
|
|
20
20
|
"@ngrx/store": "^19.0.0",
|
|
21
|
-
"@o3r/core": "^12.
|
|
22
|
-
"@o3r/logger": "^12.
|
|
23
|
-
"@o3r/schematics": "^12.
|
|
21
|
+
"@o3r/core": "^12.4.0-prerelease.0",
|
|
22
|
+
"@o3r/logger": "^12.4.0-prerelease.0",
|
|
23
|
+
"@o3r/schematics": "^12.4.0-prerelease.0",
|
|
24
24
|
"@schematics/angular": "^19.0.0",
|
|
25
25
|
"fast-deep-equal": "^3.1.3",
|
|
26
26
|
"rxjs": "^7.8.1",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@o3r/schematics": "^12.4.0-prerelease.0",
|
|
44
45
|
"tslib": "^2.6.2"
|
|
45
46
|
},
|
|
46
47
|
"schematics": "./collection.json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAcpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAmDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|
|
@@ -3,38 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ngAdd = void 0;
|
|
4
4
|
const path = require("node:path");
|
|
5
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
const schematics_2 = require("@o3r/schematics");
|
|
6
7
|
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
7
8
|
const devDependenciesToInstall = [
|
|
8
9
|
'fast-deep-equal'
|
|
9
10
|
];
|
|
10
|
-
const reportMissingSchematicsDep = (logger) => (reason) => {
|
|
11
|
-
logger.error(`[ERROR]: Adding store-sync has failed.
|
|
12
|
-
If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the store-sync package. Please run 'ng add @o3r/core' .
|
|
13
|
-
Otherwise, use the error message as guidance.`);
|
|
14
|
-
throw reason;
|
|
15
|
-
};
|
|
16
11
|
/**
|
|
17
12
|
* Add Otter store-sync to an Otter Project
|
|
18
13
|
* @param options
|
|
19
14
|
*/
|
|
20
15
|
function ngAddFn(options) {
|
|
21
|
-
return
|
|
16
|
+
return (tree, context) => {
|
|
22
17
|
// use dynamic import to properly raise an exception if it is not an Otter project.
|
|
23
|
-
const
|
|
24
|
-
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
|
18
|
+
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
25
19
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
26
|
-
const depsInfo = getO3rPeerDeps(packageJsonPath);
|
|
20
|
+
const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
|
|
27
21
|
const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
|
|
28
22
|
acc[dep] = {
|
|
29
23
|
inManifest: [{
|
|
30
24
|
range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
|
|
31
|
-
types: getProjectNewDependenciesTypes(workspaceProject)
|
|
25
|
+
types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
|
|
32
26
|
}],
|
|
33
27
|
ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
|
|
34
28
|
};
|
|
35
29
|
return acc;
|
|
36
|
-
}, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
|
|
37
|
-
Object.entries(getExternalDependenciesVersionRange(devDependenciesToInstall, packageJsonPath, context.logger))
|
|
30
|
+
}, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
|
|
31
|
+
Object.entries((0, schematics_2.getExternalDependenciesVersionRange)(devDependenciesToInstall, packageJsonPath, context.logger))
|
|
38
32
|
.forEach(([dep, range]) => {
|
|
39
33
|
dependencies[dep] = {
|
|
40
34
|
inManifest: [{
|
|
@@ -45,9 +39,9 @@ function ngAddFn(options) {
|
|
|
45
39
|
});
|
|
46
40
|
return (0, schematics_1.chain)([
|
|
47
41
|
// optional custom action dedicated to this module
|
|
48
|
-
options.skipLinter ? (0, schematics_1.noop)() : applyEsLintFix(),
|
|
42
|
+
options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
|
|
49
43
|
// add the missing Otter modules in the current project
|
|
50
|
-
setupDependencies({
|
|
44
|
+
(0, schematics_2.setupDependencies)({
|
|
51
45
|
projectName: options.projectName,
|
|
52
46
|
dependencies,
|
|
53
47
|
ngAddToRun: depsInfo.o3rPeerDeps
|
|
@@ -59,9 +53,6 @@ function ngAddFn(options) {
|
|
|
59
53
|
* Add Otter store-sync to an Otter Project
|
|
60
54
|
* @param options
|
|
61
55
|
*/
|
|
62
|
-
const ngAdd = (options) =>
|
|
63
|
-
const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
|
|
64
|
-
return createOtterSchematic(ngAddFn)(options);
|
|
65
|
-
};
|
|
56
|
+
const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
|
|
66
57
|
exports.ngAdd = ngAdd;
|
|
67
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@ import type { SchematicOptionObject } from '@o3r/schematics';
|
|
|
2
2
|
export interface NgAddSchematicsSchema extends SchematicOptionObject {
|
|
3
3
|
/** Project name */
|
|
4
4
|
projectName?: string | undefined;
|
|
5
|
-
/** Skip the linter process */
|
|
5
|
+
/** Skip the linter process which includes the run of EsLint and EditorConfig rules */
|
|
6
6
|
skipLinter: boolean;
|
|
7
7
|
/** Skip the install process */
|
|
8
8
|
skipInstall: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IAEpB,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IAErB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|