@vxrn/utils 2.0.0-beta.33.1 → 2.0.0-beta.362.1
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/dist/cjs/createMessageSocket.cjs +115 -121
- package/dist/cjs/createMessageSocket.native.cjs +166 -0
- package/dist/cjs/createMessageSocket.native.js +152 -166
- package/dist/cjs/createMessageSocket.native.js.map +1 -1
- package/dist/cjs/detectPackageManager.cjs +76 -72
- package/dist/cjs/detectPackageManager.native.cjs +106 -0
- package/dist/cjs/detectPackageManager.native.js +82 -77
- package/dist/cjs/detectPackageManager.native.js.map +1 -1
- package/dist/cjs/exec.cjs +43 -45
- package/dist/cjs/exec.native.cjs +65 -0
- package/dist/cjs/exec.native.js +48 -49
- package/dist/cjs/exec.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +26 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/mustReplace.cjs +27 -35
- package/dist/cjs/mustReplace.native.cjs +60 -0
- package/dist/cjs/mustReplace.native.js +44 -60
- package/dist/cjs/mustReplace.native.js.map +1 -1
- package/dist/cjs/nativeAppManifest.cjs +328 -0
- package/dist/cjs/nativeAppManifest.native.cjs +445 -0
- package/dist/cjs/nativeAppManifest.native.js +447 -0
- package/dist/cjs/nativeAppManifest.native.js.map +1 -0
- package/dist/cjs/publicEnv.cjs +38 -0
- package/dist/cjs/publicEnv.native.cjs +57 -0
- package/dist/cjs/publicEnv.native.js +59 -0
- package/dist/cjs/publicEnv.native.js.map +1 -0
- package/dist/esm/createMessageSocket.mjs +103 -103
- package/dist/esm/createMessageSocket.mjs.map +1 -1
- package/dist/esm/createMessageSocket.native.js +139 -148
- package/dist/esm/createMessageSocket.native.js.map +1 -1
- package/dist/esm/detectPackageManager.mjs +65 -55
- package/dist/esm/detectPackageManager.mjs.map +1 -1
- package/dist/esm/detectPackageManager.native.js +71 -61
- package/dist/esm/detectPackageManager.native.js.map +1 -1
- package/dist/esm/exec.mjs +29 -27
- package/dist/esm/exec.mjs.map +1 -1
- package/dist/esm/exec.native.js +34 -32
- package/dist/esm/exec.native.js.map +1 -1
- package/dist/esm/index.js +13 -7
- package/dist/esm/index.mjs +13 -7
- package/dist/esm/index.native.js +13 -7
- package/dist/esm/mustReplace.mjs +15 -17
- package/dist/esm/mustReplace.mjs.map +1 -1
- package/dist/esm/mustReplace.native.js +32 -43
- package/dist/esm/mustReplace.native.js.map +1 -1
- package/dist/esm/nativeAppManifest.mjs +305 -0
- package/dist/esm/nativeAppManifest.mjs.map +1 -0
- package/dist/esm/nativeAppManifest.native.js +420 -0
- package/dist/esm/nativeAppManifest.native.js.map +1 -0
- package/dist/esm/publicEnv.mjs +14 -0
- package/dist/esm/publicEnv.mjs.map +1 -0
- package/dist/esm/publicEnv.native.js +31 -0
- package/dist/esm/publicEnv.native.js.map +1 -0
- package/package.json +18 -5
- package/src/index.ts +1 -0
- package/src/nativeAppManifest.test.ts +360 -0
- package/src/nativeAppManifest.ts +702 -0
- package/src/publicEnv.ts +19 -0
- package/types/createMessageSocket.d.ts +1 -1
- package/types/createMessageSocket.d.ts.map +1 -1
- package/types/detectPackageManager.d.ts.map +1 -1
- package/types/exec.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/nativeAppManifest.d.ts +180 -0
- package/types/nativeAppManifest.d.ts.map +1 -0
- package/types/publicEnv.d.ts +9 -0
- package/types/publicEnv.d.ts.map +1 -0
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"@vxrn/debug\"), module.exports);\n__reExport(index_exports, require(\"@vxrn/resolve\"), module.exports);\n__reExport(index_exports, require(\"./createMessageSocket\"), module.exports);\n__reExport(index_exports, require(\"./detectPackageManager\"), module.exports);\n__reExport(index_exports, require(\"./exec\"), module.exports);\n__reExport(index_exports, require(\"./mustReplace\"), module.exports);\n__reExport(index_exports, require(\"./publicEnv\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,aAAa,GAAG,OAAO,OAAO;AAChE,WAAW,eAAe,QAAQ,eAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,iCAAuB,GAAG,OAAO,OAAO;AAC1E,WAAW,eAAe,QAAQ,kCAAwB,GAAG,OAAO,OAAO;AAC3E,WAAW,eAAe,QAAQ,kBAAQ,GAAG,OAAO,OAAO;AAC3D,WAAW,eAAe,QAAQ,yBAAe,GAAG,OAAO,OAAO;AAClE,WAAW,eAAe,QAAQ,uBAAa,GAAG,OAAO,OAAO"}
|
package/dist/cjs/mustReplace.cjs
CHANGED
|
@@ -3,47 +3,39 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var mustReplace_exports = {};
|
|
24
|
-
__export(mustReplace_exports, {
|
|
25
|
-
mustReplace: () => mustReplace
|
|
26
|
-
});
|
|
22
|
+
__export(mustReplace_exports, { mustReplace: () => mustReplace });
|
|
27
23
|
module.exports = __toCommonJS(mustReplace_exports);
|
|
28
24
|
var import_node_fs = require("node:fs");
|
|
29
25
|
var import_node_os = require("node:os");
|
|
30
26
|
var import_node_path = require("node:path");
|
|
31
27
|
function mustReplace(source, replacements) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
sourceOut = sourceOut.replace(find, replace);
|
|
47
|
-
}
|
|
48
|
-
return sourceOut;
|
|
49
|
-
}
|
|
28
|
+
let sourceOut = source;
|
|
29
|
+
for (const { find, replace, optional } of replacements) {
|
|
30
|
+
if (!optional) {
|
|
31
|
+
const found = find instanceof RegExp ? find.test(sourceOut) : sourceOut.includes(find);
|
|
32
|
+
if (!found) {
|
|
33
|
+
const tmpPath = (0, import_node_path.join)((0, import_node_os.tmpdir)(), `replace-error-${Math.random()}`);
|
|
34
|
+
(0, import_node_fs.writeFileSync)(tmpPath, sourceOut, "utf-8");
|
|
35
|
+
throw new Error(`Substring or pattern "${find}" not found in the string, replacing in source: ${tmpPath}.`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
sourceOut = sourceOut.replace(find, replace);
|
|
39
|
+
}
|
|
40
|
+
return sourceOut;
|
|
41
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
|
+
var mustReplace_exports = {};
|
|
24
|
+
__export(mustReplace_exports, { mustReplace: () => mustReplace });
|
|
25
|
+
module.exports = __toCommonJS(mustReplace_exports);
|
|
26
|
+
var import_fs = require("fs");
|
|
27
|
+
var import_os = require("os");
|
|
28
|
+
var import_path = require("path");
|
|
29
|
+
function mustReplace(source, replacements) {
|
|
30
|
+
var sourceOut = source;
|
|
31
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
32
|
+
try {
|
|
33
|
+
for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
34
|
+
var { find, replace, optional } = _step.value;
|
|
35
|
+
if (!optional) {
|
|
36
|
+
var found = find instanceof RegExp ? find.test(sourceOut) : sourceOut.includes(find);
|
|
37
|
+
if (!found) {
|
|
38
|
+
var tmpPath = (0, import_path.join)((0, import_os.tmpdir)(), `replace-error-${Math.random()}`);
|
|
39
|
+
(0, import_fs.writeFileSync)(tmpPath, sourceOut, "utf-8");
|
|
40
|
+
throw new Error(`Substring or pattern "${find}" not found in the string, replacing in source: ${tmpPath}.`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
sourceOut = sourceOut.replace(find, replace);
|
|
44
|
+
}
|
|
45
|
+
} catch (err) {
|
|
46
|
+
_didIteratorError = true;
|
|
47
|
+
_iteratorError = err;
|
|
48
|
+
} finally {
|
|
49
|
+
try {
|
|
50
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
51
|
+
_iterator.return();
|
|
52
|
+
}
|
|
53
|
+
} finally {
|
|
54
|
+
if (_didIteratorError) {
|
|
55
|
+
throw _iteratorError;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return sourceOut;
|
|
60
|
+
}
|
|
@@ -5,74 +5,58 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
23
|
var mustReplace_exports = {};
|
|
26
|
-
__export(mustReplace_exports, {
|
|
27
|
-
mustReplace: () => mustReplace
|
|
28
|
-
});
|
|
24
|
+
__export(mustReplace_exports, { mustReplace: () => mustReplace });
|
|
29
25
|
module.exports = __toCommonJS(mustReplace_exports);
|
|
30
26
|
var import_fs = require("fs");
|
|
31
27
|
var import_os = require("os");
|
|
32
28
|
var import_path = require("path");
|
|
33
|
-
function _instanceof(left, right) {
|
|
34
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
35
|
-
return !!right[Symbol.hasInstance](left);
|
|
36
|
-
} else {
|
|
37
|
-
return left instanceof right;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
29
|
function mustReplace(source, replacements) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (_didIteratorError) {
|
|
72
|
-
throw _iteratorError;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return sourceOut;
|
|
30
|
+
var sourceOut = source;
|
|
31
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
32
|
+
try {
|
|
33
|
+
for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
34
|
+
var { find, replace, optional } = _step.value;
|
|
35
|
+
if (!optional) {
|
|
36
|
+
var found = find instanceof RegExp ? find.test(sourceOut) : sourceOut.includes(find);
|
|
37
|
+
if (!found) {
|
|
38
|
+
var tmpPath = (0, import_path.join)((0, import_os.tmpdir)(), `replace-error-${Math.random()}`);
|
|
39
|
+
(0, import_fs.writeFileSync)(tmpPath, sourceOut, "utf-8");
|
|
40
|
+
throw new Error(`Substring or pattern "${find}" not found in the string, replacing in source: ${tmpPath}.`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
sourceOut = sourceOut.replace(find, replace);
|
|
44
|
+
}
|
|
45
|
+
} catch (err) {
|
|
46
|
+
_didIteratorError = true;
|
|
47
|
+
_iteratorError = err;
|
|
48
|
+
} finally {
|
|
49
|
+
try {
|
|
50
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
51
|
+
_iterator.return();
|
|
52
|
+
}
|
|
53
|
+
} finally {
|
|
54
|
+
if (_didIteratorError) {
|
|
55
|
+
throw _iteratorError;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return sourceOut;
|
|
77
60
|
}
|
|
61
|
+
|
|
78
62
|
//# sourceMappingURL=mustReplace.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"mustReplace.native.js","names":[],"sources":["cjs/mustReplace.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar mustReplace_exports = {};\n__export(mustReplace_exports, {\n mustReplace: () => mustReplace\n});\nmodule.exports = __toCommonJS(mustReplace_exports);\nvar import_fs = require(\"fs\");\nvar import_os = require(\"os\");\nvar import_path = require(\"path\");\nfunction mustReplace(source, replacements) {\n var sourceOut = source;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = replacements[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var { find, replace, optional } = _step.value;\n if (!optional) {\n var found = find instanceof RegExp ? find.test(sourceOut) : sourceOut.includes(find);\n if (!found) {\n var tmpPath = (0, import_path.join)((0, import_os.tmpdir)(), `replace-error-${Math.random()}`);\n (0, import_fs.writeFileSync)(tmpPath, sourceOut, \"utf-8\");\n throw new Error(`Substring or pattern \"${find}\" not found in the string, replacing in source: ${tmpPath}.`);\n }\n }\n sourceOut = sourceOut.replace(find, replace);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return sourceOut;\n}\n//# sourceMappingURL=mustReplace.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,sBAAsB,CAAC;AAC3B,SAAS,qBAAqB,EAC5B,mBAAmB,YACrB,CAAC;AACD,OAAO,UAAU,aAAa,mBAAmB;AACjD,IAAI,YAAY,QAAQ,IAAI;AAC5B,IAAI,YAAY,QAAQ,IAAI;AAC5B,IAAI,cAAc,QAAQ,MAAM;AAChC,SAAS,YAAY,QAAQ,cAAc;CACzC,IAAI,YAAY;CAChB,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,aAAa,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GAC7J,IAAI,EAAE,MAAM,SAAS,aAAa,MAAM;GACxC,IAAI,CAAC,UAAU;IACb,IAAI,QAAQ,gBAAgB,SAAS,KAAK,KAAK,SAAS,IAAI,UAAU,SAAS,IAAI;IACnF,IAAI,CAAC,OAAO;KACV,IAAI,WAAW,GAAG,YAAY,KAAI,EAAG,GAAG,UAAU,OAAM,CAAE,GAAG,iBAAiB,KAAK,OAAO,GAAG;KAC7F,CAAC,GAAG,UAAU,cAAa,CAAE,SAAS,WAAW,OAAO;KACxD,MAAM,IAAI,MAAM,yBAAyB,KAAK,kDAAkD,QAAQ,EAAE;IAC5G;GACF;GACA,YAAY,UAAU,QAAQ,MAAM,OAAO;EAC7C;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var nativeAppManifest_exports = {};
|
|
22
|
+
__export(nativeAppManifest_exports, {
|
|
23
|
+
expoClientFromNativeApp: () => expoClientFromNativeApp,
|
|
24
|
+
validateNativeApp: () => validateNativeApp
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(nativeAppManifest_exports);
|
|
27
|
+
const TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;
|
|
28
|
+
const SCHEME = /^[a-z][a-z0-9+.-]*$/i;
|
|
29
|
+
const VERSION = /^\d+\.\d+\.\d+/;
|
|
30
|
+
const BUILD_NUMBER = /^[A-Za-z0-9.]+$/;
|
|
31
|
+
const REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/;
|
|
32
|
+
const DEPLOYMENT_TARGET = /^\d+\.\d+$/;
|
|
33
|
+
const HEX_COLOR = /^#[\da-f]{6}$/i;
|
|
34
|
+
const FONT_FILE = /\.(ttf|otf)$/i;
|
|
35
|
+
const ORIENTATIONS = [
|
|
36
|
+
"portrait",
|
|
37
|
+
"landscape",
|
|
38
|
+
"default"
|
|
39
|
+
];
|
|
40
|
+
const USER_INTERFACE_STYLES = [
|
|
41
|
+
"light",
|
|
42
|
+
"dark",
|
|
43
|
+
"automatic"
|
|
44
|
+
];
|
|
45
|
+
function fail(message) {
|
|
46
|
+
throw new Error(`[one] invalid native.app: ${message}`);
|
|
47
|
+
}
|
|
48
|
+
function validateNativeApp(manifest, platform) {
|
|
49
|
+
if (!manifest || typeof manifest !== "object") fail("manifest must be an object");
|
|
50
|
+
if (!manifest.name || typeof manifest.name !== "string") fail("name is required");
|
|
51
|
+
if (!TARGET_NAME.test(manifest.name)) {
|
|
52
|
+
fail(`name "${manifest.name}" must start with a letter and contain only letters, digits, and underscore`);
|
|
53
|
+
}
|
|
54
|
+
const schemes = manifest.scheme === void 0 ? [] : Array.isArray(manifest.scheme) ? manifest.scheme : [manifest.scheme];
|
|
55
|
+
for (const scheme of schemes) {
|
|
56
|
+
if (typeof scheme !== "string" || !SCHEME.test(scheme)) {
|
|
57
|
+
fail(`scheme "${scheme}" must be a valid uri scheme`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (manifest.orientation !== void 0 && !ORIENTATIONS.includes(manifest.orientation)) {
|
|
61
|
+
fail(`orientation "${manifest.orientation}" must be ${ORIENTATIONS.join(", ")}`);
|
|
62
|
+
}
|
|
63
|
+
if (manifest.userInterfaceStyle !== void 0 && !USER_INTERFACE_STYLES.includes(manifest.userInterfaceStyle)) {
|
|
64
|
+
fail(`userInterfaceStyle "${manifest.userInterfaceStyle}" must be ${USER_INTERFACE_STYLES.join(", ")}`);
|
|
65
|
+
}
|
|
66
|
+
if (manifest.fonts !== void 0) {
|
|
67
|
+
const names = /* @__PURE__ */ new Set();
|
|
68
|
+
for (const font of manifest.fonts) {
|
|
69
|
+
if (typeof font !== "string" || !FONT_FILE.test(font)) {
|
|
70
|
+
fail(`fonts entry "${font}" must be a .ttf or .otf file path`);
|
|
71
|
+
}
|
|
72
|
+
const name = font.split("/").pop() ?? font;
|
|
73
|
+
if (names.has(name)) fail(`fonts lists ${name} twice`);
|
|
74
|
+
names.add(name);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {
|
|
78
|
+
fail(`version "${manifest.version}" must start with major.minor.patch`);
|
|
79
|
+
}
|
|
80
|
+
if (manifest.icon !== void 0 && (!manifest.icon.source || !HEX_COLOR.test(manifest.icon.backgroundColor))) {
|
|
81
|
+
fail("icon requires source and a six-digit hex backgroundColor");
|
|
82
|
+
}
|
|
83
|
+
if (manifest.ios?.alternateIcons !== void 0) {
|
|
84
|
+
if (!manifest.icon) fail("ios.alternateIcons requires a primary icon");
|
|
85
|
+
const entries = Object.entries(manifest.ios.alternateIcons);
|
|
86
|
+
if (entries.length === 0) fail("ios.alternateIcons requires at least one icon");
|
|
87
|
+
for (const [name, icon] of entries) {
|
|
88
|
+
if (name === "AppIcon" || !TARGET_NAME.test(name)) {
|
|
89
|
+
fail(`ios.alternateIcons name "${name}" must be an identifier other than AppIcon`);
|
|
90
|
+
}
|
|
91
|
+
if (!icon?.source || !HEX_COLOR.test(icon.backgroundColor)) {
|
|
92
|
+
fail(`ios.alternateIcons.${name} requires source and a six-digit hex backgroundColor`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (manifest.ios?.backgroundTasks !== void 0) {
|
|
97
|
+
const tasks = manifest.ios.backgroundTasks;
|
|
98
|
+
if (!tasks || tasks.refresh !== void 0 && !Array.isArray(tasks.refresh) || tasks.processing !== void 0 && !Array.isArray(tasks.processing)) {
|
|
99
|
+
fail("ios.backgroundTasks refresh and processing must be arrays of identifiers");
|
|
100
|
+
}
|
|
101
|
+
const identifiers = [...tasks.refresh ?? [], ...tasks.processing ?? []];
|
|
102
|
+
if (!identifiers.length || new Set(identifiers).size !== identifiers.length) {
|
|
103
|
+
fail("ios.backgroundTasks needs distinct refresh or processing identifiers");
|
|
104
|
+
}
|
|
105
|
+
for (const identifier of identifiers) {
|
|
106
|
+
if (typeof identifier !== "string" || !REVERSE_DNS.test(identifier)) {
|
|
107
|
+
fail(`ios.backgroundTasks identifier "${identifier}" must use reverse DNS notation`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (manifest.ios?.appIntents !== void 0) {
|
|
112
|
+
const actions = manifest.ios.appIntents?.actions;
|
|
113
|
+
if (!Array.isArray(actions) || actions.length === 0) {
|
|
114
|
+
fail("ios.appIntents.actions must be a non-empty array");
|
|
115
|
+
}
|
|
116
|
+
const ids = /* @__PURE__ */ new Set();
|
|
117
|
+
for (const action of actions) {
|
|
118
|
+
if (!action || typeof action !== "object" || typeof action.id !== "string" || !action.id.trim() || typeof action.title !== "string" || !action.title.trim() || action.textParameterTitle !== void 0 && (typeof action.textParameterTitle !== "string" || !action.textParameterTitle.trim()) || typeof action.shortcutPhrase !== "string" || action.shortcutPhrase.split("{app}").length !== 2 || !action.shortcutPhrase.replace("{app}", "").trim()) {
|
|
119
|
+
fail("ios.appIntents actions need unique non-empty id/title, optional textParameterTitle, and a shortcutPhrase with one {app}");
|
|
120
|
+
}
|
|
121
|
+
if (ids.has(action.id)) fail(`ios.appIntents action "${action.id}" is duplicated`);
|
|
122
|
+
ids.add(action.id);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (manifest.splash !== void 0 && (!manifest.splash.source || !HEX_COLOR.test(manifest.splash.backgroundColor) || manifest.splash.width !== void 0 && (!Number.isFinite(manifest.splash.width) || manifest.splash.width < 1 || manifest.splash.width > 288))) {
|
|
126
|
+
fail("splash requires source, a six-digit hex backgroundColor, and width from 1 to 288");
|
|
127
|
+
}
|
|
128
|
+
if (manifest.splash?.dark !== void 0 && !HEX_COLOR.test(manifest.splash.dark.backgroundColor)) {
|
|
129
|
+
fail("splash.dark requires a six-digit hex backgroundColor");
|
|
130
|
+
}
|
|
131
|
+
if (manifest.splash?.dark?.backgroundImage !== void 0 && manifest.splash.backgroundImage === void 0) {
|
|
132
|
+
fail("splash.dark.backgroundImage needs splash.backgroundImage for the light launch");
|
|
133
|
+
}
|
|
134
|
+
if (manifest.splash?.resizeMode !== void 0 && manifest.splash.resizeMode !== "contain" && manifest.splash.resizeMode !== "cover") {
|
|
135
|
+
fail(`splash.resizeMode "${manifest.splash.resizeMode}" must be contain or cover`);
|
|
136
|
+
}
|
|
137
|
+
if (manifest.imagePicker?.camera !== void 0 && (typeof manifest.imagePicker.camera !== "string" || manifest.imagePicker.camera.trim() === "")) {
|
|
138
|
+
fail("imagePicker.camera must be a non-empty string");
|
|
139
|
+
}
|
|
140
|
+
if (manifest.photoLibrary !== void 0 && (!manifest.photoLibrary || manifest.photoLibrary.addOnly === void 0 && manifest.photoLibrary.readWrite === void 0)) {
|
|
141
|
+
fail("photoLibrary must configure addOnly or readWrite");
|
|
142
|
+
}
|
|
143
|
+
if (manifest.photoLibrary?.addOnly !== void 0 && (typeof manifest.photoLibrary.addOnly !== "string" || manifest.photoLibrary.addOnly.trim() === "")) {
|
|
144
|
+
fail("photoLibrary.addOnly must be a non-empty string");
|
|
145
|
+
}
|
|
146
|
+
if (manifest.photoLibrary?.readWrite !== void 0 && (typeof manifest.photoLibrary.readWrite !== "string" || manifest.photoLibrary.readWrite.trim() === "")) {
|
|
147
|
+
fail("photoLibrary.readWrite must be a non-empty string");
|
|
148
|
+
}
|
|
149
|
+
if (manifest.contacts !== void 0 && (!manifest.contacts || typeof manifest.contacts.usage !== "string" || manifest.contacts.usage.trim() === "")) {
|
|
150
|
+
fail("contacts.usage must be a non-empty string");
|
|
151
|
+
}
|
|
152
|
+
if (manifest.calendar !== void 0) {
|
|
153
|
+
if (!manifest.calendar || manifest.calendar.usage === void 0 && manifest.calendar.remindersUsage === void 0) {
|
|
154
|
+
fail("calendar.usage or calendar.remindersUsage must be a non-empty string");
|
|
155
|
+
}
|
|
156
|
+
if (manifest.calendar.usage !== void 0 && (typeof manifest.calendar.usage !== "string" || manifest.calendar.usage.trim() === "")) {
|
|
157
|
+
fail("calendar.usage must be a non-empty string");
|
|
158
|
+
}
|
|
159
|
+
if (manifest.calendar.remindersUsage !== void 0 && (typeof manifest.calendar.remindersUsage !== "string" || manifest.calendar.remindersUsage.trim() === "")) {
|
|
160
|
+
fail("calendar.remindersUsage must be a non-empty string");
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (manifest.location !== void 0 && (!manifest.location || typeof manifest.location.whenInUse !== "string" || manifest.location.whenInUse.trim() === "")) {
|
|
164
|
+
fail("location.whenInUse must be a non-empty string");
|
|
165
|
+
}
|
|
166
|
+
if (manifest.location?.background !== void 0 && typeof manifest.location.background !== "boolean") {
|
|
167
|
+
fail("location.background must be a boolean");
|
|
168
|
+
}
|
|
169
|
+
if (manifest.audio !== void 0) {
|
|
170
|
+
if (!manifest.audio || typeof manifest.audio !== "object") {
|
|
171
|
+
fail("audio must configure microphone or background playback");
|
|
172
|
+
}
|
|
173
|
+
if (manifest.audio.microphone !== void 0 && (typeof manifest.audio.microphone !== "string" || manifest.audio.microphone.trim() === "")) {
|
|
174
|
+
fail("audio.microphone must be a non-empty string");
|
|
175
|
+
}
|
|
176
|
+
if (manifest.audio.background !== void 0 && typeof manifest.audio.background !== "boolean") {
|
|
177
|
+
fail("audio.background must be a boolean");
|
|
178
|
+
}
|
|
179
|
+
if (manifest.audio.microphone === void 0 && manifest.audio.background !== true) {
|
|
180
|
+
fail("audio must configure microphone or background playback");
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (manifest.ios?.faceIdUsageDescription !== void 0 && (typeof manifest.ios.faceIdUsageDescription !== "string" || manifest.ios.faceIdUsageDescription.trim() === "")) {
|
|
184
|
+
fail("ios.faceIdUsageDescription must be a non-empty string");
|
|
185
|
+
}
|
|
186
|
+
if (manifest.speech !== void 0 && (typeof manifest.speech?.recognition !== "string" || manifest.speech.recognition.trim() === "" || typeof manifest.speech.microphone !== "string" || manifest.speech.microphone.trim() === "")) {
|
|
187
|
+
fail("speech.recognition and speech.microphone must be non-empty strings");
|
|
188
|
+
}
|
|
189
|
+
if (manifest.notifications !== void 0) {
|
|
190
|
+
if (typeof manifest.notifications !== "object" || manifest.notifications.push !== void 0 && typeof manifest.notifications.push !== "boolean") {
|
|
191
|
+
fail("notifications.push must be a boolean");
|
|
192
|
+
}
|
|
193
|
+
const aps = manifest.notifications.apsEnvironment;
|
|
194
|
+
if (aps !== void 0 && aps !== "development" && aps !== "production") {
|
|
195
|
+
fail(`notifications.apsEnvironment "${aps}" must be development or production`);
|
|
196
|
+
}
|
|
197
|
+
if (aps !== void 0 && !manifest.notifications.push) {
|
|
198
|
+
fail("notifications.apsEnvironment needs notifications.push");
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const accent = manifest.ios?.accentColor;
|
|
202
|
+
if (accent !== void 0 && (!HEX_COLOR.test(accent.light) || accent.dark !== void 0 && !HEX_COLOR.test(accent.dark))) {
|
|
203
|
+
fail("ios.accentColor light and dark must be six-digit hex colors");
|
|
204
|
+
}
|
|
205
|
+
if (manifest.pictureInPicture !== void 0 && typeof manifest.pictureInPicture !== "boolean") {
|
|
206
|
+
fail("pictureInPicture must be a boolean");
|
|
207
|
+
}
|
|
208
|
+
if (manifest.updates !== void 0) {
|
|
209
|
+
if (typeof manifest.updates.runtimeVersion !== "string" || manifest.updates.runtimeVersion.trim() === "") {
|
|
210
|
+
fail("updates.runtimeVersion must be a non-empty string");
|
|
211
|
+
}
|
|
212
|
+
if (manifest.updates.url !== void 0 && (typeof manifest.updates.url !== "string" || manifest.updates.url.trim() === "")) {
|
|
213
|
+
fail("updates.url must be a non-empty string");
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (!platform || platform === "ios") {
|
|
217
|
+
if (!manifest.ios?.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {
|
|
218
|
+
fail(`ios.bundleId "${manifest.ios?.bundleId}" must be reverse-dns`);
|
|
219
|
+
}
|
|
220
|
+
if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {
|
|
221
|
+
fail(`ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`);
|
|
222
|
+
}
|
|
223
|
+
if (manifest.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(manifest.ios.buildNumber)) {
|
|
224
|
+
fail(`ios.buildNumber "${manifest.ios.buildNumber}" must contain only letters, digits, and dots`);
|
|
225
|
+
}
|
|
226
|
+
const widgets = manifest.ios.widgets;
|
|
227
|
+
if (widgets) {
|
|
228
|
+
if (!manifest.ios.deploymentTarget || Number(manifest.ios.deploymentTarget) < 17) {
|
|
229
|
+
fail("ios.widgets requires ios.deploymentTarget of 17.0 or newer");
|
|
230
|
+
}
|
|
231
|
+
if (!/^group\.[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/.test(widgets.appGroup)) {
|
|
232
|
+
fail("ios.widgets.appGroup must be a reverse-dns App Group beginning with group.");
|
|
233
|
+
}
|
|
234
|
+
if (!/^[A-Za-z][A-Za-z0-9._-]*$/.test(widgets.kind)) {
|
|
235
|
+
fail("ios.widgets.kind must be a non-empty WidgetKit kind");
|
|
236
|
+
}
|
|
237
|
+
if (!widgets.displayName?.trim() || !widgets.description?.trim()) {
|
|
238
|
+
fail("ios.widgets.displayName and description must be non-empty strings");
|
|
239
|
+
}
|
|
240
|
+
if (widgets.pushNotifications !== void 0 && typeof widgets.pushNotifications !== "boolean") {
|
|
241
|
+
fail("ios.widgets.pushNotifications must be a boolean");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (!platform || platform === "android") {
|
|
246
|
+
if (!manifest.android?.applicationId || !REVERSE_DNS.test(manifest.android.applicationId)) {
|
|
247
|
+
fail(`android.applicationId "${manifest.android?.applicationId}" must be reverse-dns`);
|
|
248
|
+
}
|
|
249
|
+
if (manifest.android.minSdk !== void 0 && (!Number.isInteger(manifest.android.minSdk) || manifest.android.minSdk < 21 || manifest.android.minSdk > 36)) {
|
|
250
|
+
fail(`android.minSdk "${manifest.android.minSdk}" must be an integer from 21 to 36`);
|
|
251
|
+
}
|
|
252
|
+
if (manifest.android.versionCode !== void 0 && (!Number.isInteger(manifest.android.versionCode) || manifest.android.versionCode < 1)) {
|
|
253
|
+
fail(`android.versionCode "${manifest.android.versionCode}" must be a positive integer`);
|
|
254
|
+
}
|
|
255
|
+
for (const key of ["targetSdk", "compileSdk"]) {
|
|
256
|
+
const value = manifest.android[key];
|
|
257
|
+
if (value !== void 0 && (!Number.isInteger(value) || value < 21)) {
|
|
258
|
+
fail(`android.${key} "${value}" must be an api level integer`);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (manifest.android.shrinkResources && !manifest.android.minify) {
|
|
262
|
+
fail("android.shrinkResources needs android.minify");
|
|
263
|
+
}
|
|
264
|
+
for (const link of manifest.android.appLinks ?? []) {
|
|
265
|
+
if (!link.host || !REVERSE_DNS.test(link.host)) {
|
|
266
|
+
fail(`android.appLinks host "${link.host}" must be a domain`);
|
|
267
|
+
}
|
|
268
|
+
if (link.pathPrefix !== void 0 && !link.pathPrefix.startsWith("/")) {
|
|
269
|
+
fail(`android.appLinks pathPrefix "${link.pathPrefix}" must start with /`);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const adaptiveIcon = manifest.android.adaptiveIcon;
|
|
273
|
+
if (adaptiveIcon !== void 0 && (!adaptiveIcon.foreground || adaptiveIcon.backgroundColor !== void 0 && !HEX_COLOR.test(adaptiveIcon.backgroundColor))) {
|
|
274
|
+
fail("android.adaptiveIcon requires foreground, and backgroundColor must be six-digit hex");
|
|
275
|
+
}
|
|
276
|
+
if (manifest.android.googleMapsApiKey !== void 0 && (typeof manifest.android.googleMapsApiKey !== "string" || manifest.android.googleMapsApiKey.trim() === "")) {
|
|
277
|
+
fail("android.googleMapsApiKey must be a non-empty string");
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return manifest;
|
|
281
|
+
}
|
|
282
|
+
function expoClientFromNativeApp(app) {
|
|
283
|
+
return {
|
|
284
|
+
name: app.displayName ?? app.name,
|
|
285
|
+
slug: app.name,
|
|
286
|
+
scheme: app.scheme,
|
|
287
|
+
version: app.version,
|
|
288
|
+
orientation: app.orientation,
|
|
289
|
+
userInterfaceStyle: app.userInterfaceStyle ?? "automatic",
|
|
290
|
+
icon: app.icon?.source,
|
|
291
|
+
splash: app.splash && {
|
|
292
|
+
image: app.splash.source,
|
|
293
|
+
backgroundImage: app.splash.backgroundImage,
|
|
294
|
+
backgroundColor: app.splash.backgroundColor,
|
|
295
|
+
imageWidth: app.splash.width,
|
|
296
|
+
resizeMode: app.splash.resizeMode,
|
|
297
|
+
dark: app.splash.dark && {
|
|
298
|
+
image: app.splash.dark.source,
|
|
299
|
+
backgroundImage: app.splash.dark.backgroundImage,
|
|
300
|
+
backgroundColor: app.splash.dark.backgroundColor
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
plugins: app.fonts?.length ? [["expo-font", { fonts: app.fonts }]] : void 0,
|
|
304
|
+
ios: app.ios && {
|
|
305
|
+
bundleIdentifier: app.ios.bundleId,
|
|
306
|
+
buildNumber: app.ios.buildNumber,
|
|
307
|
+
supportsTablet: app.ios.tablet,
|
|
308
|
+
associatedDomains: app.ios.associatedDomains,
|
|
309
|
+
usesAppleSignIn: app.ios.usesAppleSignIn,
|
|
310
|
+
googleServicesFile: app.ios.googleServicesFile,
|
|
311
|
+
infoPlist: app.ios.infoPlist,
|
|
312
|
+
entitlements: app.ios.entitlements
|
|
313
|
+
},
|
|
314
|
+
android: app.android && {
|
|
315
|
+
package: app.android.applicationId,
|
|
316
|
+
versionCode: app.android.versionCode,
|
|
317
|
+
permissions: app.android.permissions,
|
|
318
|
+
blockedPermissions: app.android.blockedPermissions,
|
|
319
|
+
googleServicesFile: app.android.googleServicesFile,
|
|
320
|
+
adaptiveIcon: app.android.adaptiveIcon && {
|
|
321
|
+
foregroundImage: app.android.adaptiveIcon.foreground,
|
|
322
|
+
backgroundImage: app.android.adaptiveIcon.background,
|
|
323
|
+
backgroundColor: app.android.adaptiveIcon.backgroundColor,
|
|
324
|
+
monochromeImage: app.android.adaptiveIcon.monochrome
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
}
|