@o3r/mobile 10.2.0-prerelease.13 → 10.2.0-prerelease.15
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/mobile",
|
|
3
|
-
"version": "10.2.0-prerelease.
|
|
3
|
+
"version": "10.2.0-prerelease.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@capacitor/device": "^5.0.0",
|
|
44
44
|
"@capacitor/preferences": "^5.0.0",
|
|
45
45
|
"@ngrx/store": "~17.1.0",
|
|
46
|
-
"@o3r/core": "^10.2.0-prerelease.
|
|
47
|
-
"@o3r/logger": "^10.2.0-prerelease.
|
|
48
|
-
"@o3r/schematics": "^10.2.0-prerelease.
|
|
49
|
-
"@o3r/store-sync": "^10.2.0-prerelease.
|
|
46
|
+
"@o3r/core": "^10.2.0-prerelease.15",
|
|
47
|
+
"@o3r/logger": "^10.2.0-prerelease.15",
|
|
48
|
+
"@o3r/schematics": "^10.2.0-prerelease.15",
|
|
49
|
+
"@o3r/store-sync": "^10.2.0-prerelease.15",
|
|
50
50
|
"@schematics/angular": "~17.2.0",
|
|
51
51
|
"fast-deep-equal": "^3.1.3",
|
|
52
52
|
"rxjs": "^7.8.1"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AA0CtD;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAGtD,CAAC"}
|
|
@@ -2,51 +2,51 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAdd = void 0;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const schematics_2 = require("@o3r/schematics");
|
|
6
5
|
const path = require("node:path");
|
|
7
6
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
7
|
+
const reportMissingSchematicsDep = (logger) => (reason) => {
|
|
8
|
+
logger.error(`[ERROR]: Adding @o3r/mobile has failed.
|
|
9
|
+
If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the mobile package. Please run 'ng add @o3r/core' .
|
|
10
|
+
Otherwise, use the error message as guidance.`);
|
|
11
|
+
throw reason;
|
|
12
|
+
};
|
|
8
13
|
/**
|
|
9
14
|
* Add Otter mobile to an Angular Project
|
|
10
15
|
* @param options ng add options
|
|
11
16
|
*/
|
|
12
17
|
function ngAddFn(options) {
|
|
13
18
|
/* ng add rules */
|
|
14
|
-
return async (tree
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
])(tree, context);
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
// o3r mobile needs o3r/core as peer dep. o3r/core will install o3r/schematics
|
|
40
|
-
context.logger.error(`[ERROR]: Adding @o3r/mobile has failed.
|
|
41
|
-
If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the mobile package. Please run 'ng add @o3r/core' .
|
|
42
|
-
Otherwise, use the error message as guidance.`);
|
|
43
|
-
throw (e);
|
|
44
|
-
}
|
|
19
|
+
return async (tree) => {
|
|
20
|
+
const { getPackageInstallConfig, getProjectNewDependenciesTypes, setupDependencies, getO3rPeerDeps, getWorkspaceConfig, removePackages } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
21
|
+
const depsInfo = getO3rPeerDeps(path.resolve(__dirname, '..', '..', 'package.json'));
|
|
22
|
+
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
|
23
|
+
const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
|
|
24
|
+
acc[dep] = {
|
|
25
|
+
inManifest: [{
|
|
26
|
+
range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
|
|
27
|
+
types: getProjectNewDependenciesTypes(workspaceProject)
|
|
28
|
+
}],
|
|
29
|
+
ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
|
|
30
|
+
};
|
|
31
|
+
return acc;
|
|
32
|
+
}, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
|
|
33
|
+
return (0, schematics_1.chain)([
|
|
34
|
+
removePackages(['@otter/mobile']),
|
|
35
|
+
setupDependencies({
|
|
36
|
+
projectName: options.projectName,
|
|
37
|
+
dependencies,
|
|
38
|
+
ngAddToRun: depsInfo.o3rPeerDeps
|
|
39
|
+
})
|
|
40
|
+
]);
|
|
45
41
|
};
|
|
46
42
|
}
|
|
47
43
|
/**
|
|
48
44
|
* Add Otter mobile to an Angular Project
|
|
49
45
|
* @param options ng add options
|
|
50
46
|
*/
|
|
51
|
-
|
|
47
|
+
const ngAdd = (options) => async (_, { logger }) => {
|
|
48
|
+
const { createSchematicWithMetricsIfInstalled } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
|
|
49
|
+
return createSchematicWithMetricsIfInstalled(ngAddFn)(options);
|
|
50
|
+
};
|
|
51
|
+
exports.ngAdd = ngAdd;
|
|
52
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AACzD,kCAAkC;AAGlC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;AAE5E,MAAM,0BAA0B,GAAG,CAAC,MAA2C,EAAE,EAAE,CAAC,CAAC,MAAW,EAAE,EAAE;IAClG,MAAM,CAAC,KAAK,CAAC;;8CAE+B,CAAC,CAAC;IAC9C,MAAM,MAAM,CAAC;AACf,CAAC,CAAC;AAEF;;;GAGG;AACH,SAAS,OAAO,CAAC,OAA8B;IAC7C,kBAAkB;IAClB,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;QAC3K,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC;QACrF,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACnH,MAAM,YAAY,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG;gBACT,UAAU,EAAE,CAAC;wBACX,KAAK,EAAE,GAAG,OAAO,CAAC,e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