@o3r/configuration 11.6.0-prerelease.20 → 11.6.0-prerelease.21
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/migration.json +5 -0
- package/package.json +5 -5
- package/schematics/configuration-to-component/templates/__name__.config.ts.template +1 -1
- package/schematics/ng-update/v11-6/index.d.ts +6 -0
- package/schematics/ng-update/v11-6/index.d.ts.map +1 -0
- package/schematics/ng-update/v11-6/index.js +22 -0
package/migration.json
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
"version": "10.3.0-alpha.0",
|
|
6
6
|
"description": "Updates of @o3r/configuration to v10.3.*",
|
|
7
7
|
"factory": "./schematics/ng-update/v10-3/index#updateV10_3"
|
|
8
|
+
},
|
|
9
|
+
"migration-v11_6": {
|
|
10
|
+
"version": "11.6.0-prerelease.0",
|
|
11
|
+
"description": "Updates of @o3r/configuration to v11.6.*",
|
|
12
|
+
"factory": "./schematics/ng-update/v11-6/index#updateV116"
|
|
8
13
|
}
|
|
9
14
|
}
|
|
10
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/configuration",
|
|
3
|
-
"version": "11.6.0-prerelease.
|
|
3
|
+
"version": "11.6.0-prerelease.21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@angular/platform-browser-dynamic": "~18.2.0",
|
|
53
53
|
"@ngrx/entity": "~18.0.0",
|
|
54
54
|
"@ngrx/store": "~18.0.0",
|
|
55
|
-
"@o3r/core": "^11.6.0-prerelease.
|
|
56
|
-
"@o3r/logger": "^11.6.0-prerelease.
|
|
57
|
-
"@o3r/schematics": "^11.6.0-prerelease.
|
|
58
|
-
"@o3r/testing": "^11.6.0-prerelease.
|
|
55
|
+
"@o3r/core": "^11.6.0-prerelease.21",
|
|
56
|
+
"@o3r/logger": "^11.6.0-prerelease.21",
|
|
57
|
+
"@o3r/schematics": "^11.6.0-prerelease.21",
|
|
58
|
+
"@o3r/testing": "^11.6.0-prerelease.21",
|
|
59
59
|
"@schematics/angular": "~18.2.0",
|
|
60
60
|
"cheerio": "^1.0.0-rc.10",
|
|
61
61
|
"express-interceptor": "^1.2.0",
|
|
@@ -3,6 +3,6 @@ import {computeItemIdentifier} from '@o3r/core';
|
|
|
3
3
|
|
|
4
4
|
export interface <%=componentConfig%> extends Configuration {}
|
|
5
5
|
|
|
6
|
-
export const <%=configKey%>_DEFAULT_CONFIG:
|
|
6
|
+
export const <%=configKey%>_DEFAULT_CONFIG: Readonly<<%=componentConfig%>> = {} as const;
|
|
7
7
|
|
|
8
8
|
export const <%=configKey%>_CONFIG_ID = computeItemIdentifier('<%=componentConfig%>', '<%=projectName%>');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v11-6/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAEL,MAAM,4BAA4B,CAAC;AAqBpC;;GAEG;AACH,eAAO,MAAM,UAAU,4BAAsD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateV116 = void 0;
|
|
4
|
+
const schematics_1 = require("@o3r/schematics");
|
|
5
|
+
const regexp = /DEFAULT_CONFIG\s*:\s*(?:Readonly<)?([A-Z][\w]*)(?:>)?\s*=\s*({[^;]+})\s*(as\s*const)?\s*;/g;
|
|
6
|
+
function updateV116Fn() {
|
|
7
|
+
return (tree) => {
|
|
8
|
+
const files = (0, schematics_1.findFilesInTree)(tree.getDir(''), (filePath) => /config\.ts$/.test(filePath));
|
|
9
|
+
files.forEach(({ content, path }) => {
|
|
10
|
+
const str = content.toString();
|
|
11
|
+
const newContent = str.replaceAll(regexp, 'DEFAULT_CONFIG: Readonly<$1> = $2 as const;');
|
|
12
|
+
if (newContent !== str) {
|
|
13
|
+
tree.overwrite(path, newContent);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Update of Otter configuration V11.6
|
|
20
|
+
*/
|
|
21
|
+
exports.updateV116 = (0, schematics_1.createSchematicWithMetricsIfInstalled)(updateV116Fn);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|