@vxrn/utils 2.0.0-beta.51.1 → 2.0.0-beta.53.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/index.cjs +1 -0
- package/dist/cjs/index.native.cjs +1 -0
- package/dist/cjs/index.native.js +1 -0
- package/dist/cjs/index.native.js.map +1 -1
- 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/index.js +2 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.native.js +2 -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 +8 -3
- package/src/index.ts +1 -0
- package/src/publicEnv.ts +19 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/publicEnv.d.ts +9 -0
- package/types/publicEnv.d.ts.map +1 -0
package/dist/cjs/index.cjs
CHANGED
|
@@ -21,3 +21,4 @@ __reExport(index_exports, require("./createMessageSocket.cjs"), module.exports);
|
|
|
21
21
|
__reExport(index_exports, require("./detectPackageManager.cjs"), module.exports);
|
|
22
22
|
__reExport(index_exports, require("./exec.cjs"), module.exports);
|
|
23
23
|
__reExport(index_exports, require("./mustReplace.cjs"), module.exports);
|
|
24
|
+
__reExport(index_exports, require("./publicEnv.cjs"), module.exports);
|
|
@@ -23,3 +23,4 @@ __reExport(index_exports, require("./createMessageSocket.native.js"), module.exp
|
|
|
23
23
|
__reExport(index_exports, require("./detectPackageManager.native.js"), module.exports);
|
|
24
24
|
__reExport(index_exports, require("./exec.native.js"), module.exports);
|
|
25
25
|
__reExport(index_exports, require("./mustReplace.native.js"), module.exports);
|
|
26
|
+
__reExport(index_exports, require("./publicEnv.native.js"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -23,5 +23,6 @@ __reExport(index_exports, require("./createMessageSocket.native.js"), module.exp
|
|
|
23
23
|
__reExport(index_exports, require("./detectPackageManager.native.js"), module.exports);
|
|
24
24
|
__reExport(index_exports, require("./exec.native.js"), module.exports);
|
|
25
25
|
__reExport(index_exports, require("./mustReplace.native.js"), module.exports);
|
|
26
|
+
__reExport(index_exports, require("./publicEnv.native.js"), module.exports);
|
|
26
27
|
|
|
27
28
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
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//# 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"}
|
|
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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 publicEnv_exports = {};
|
|
22
|
+
__export(publicEnv_exports, {
|
|
23
|
+
EXPO_PUBLIC_PREFIX: () => EXPO_PUBLIC_PREFIX,
|
|
24
|
+
ONE_PUBLIC_PREFIX: () => ONE_PUBLIC_PREFIX,
|
|
25
|
+
withExpoPublicEnvAliases: () => withExpoPublicEnvAliases
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(publicEnv_exports);
|
|
28
|
+
const ONE_PUBLIC_PREFIX = "ONE_PUBLIC_";
|
|
29
|
+
const EXPO_PUBLIC_PREFIX = "EXPO_PUBLIC_";
|
|
30
|
+
function withExpoPublicEnvAliases(env) {
|
|
31
|
+
const aliased = { ...env };
|
|
32
|
+
for (const [key, value] of Object.entries(env)) {
|
|
33
|
+
if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue;
|
|
34
|
+
const expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;
|
|
35
|
+
if (!(expoKey in aliased)) aliased[expoKey] = value;
|
|
36
|
+
}
|
|
37
|
+
return aliased;
|
|
38
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 publicEnv_exports = {};
|
|
24
|
+
__export(publicEnv_exports, {
|
|
25
|
+
EXPO_PUBLIC_PREFIX: () => EXPO_PUBLIC_PREFIX,
|
|
26
|
+
ONE_PUBLIC_PREFIX: () => ONE_PUBLIC_PREFIX,
|
|
27
|
+
withExpoPublicEnvAliases: () => withExpoPublicEnvAliases
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(publicEnv_exports);
|
|
30
|
+
var ONE_PUBLIC_PREFIX = "ONE_PUBLIC_";
|
|
31
|
+
var EXPO_PUBLIC_PREFIX = "EXPO_PUBLIC_";
|
|
32
|
+
function withExpoPublicEnvAliases(env) {
|
|
33
|
+
var aliased = { ...env };
|
|
34
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
35
|
+
try {
|
|
36
|
+
for (var _iterator = Object.entries(env)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
37
|
+
var [key, value] = _step.value;
|
|
38
|
+
if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue;
|
|
39
|
+
var expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;
|
|
40
|
+
if (!(expoKey in aliased)) aliased[expoKey] = value;
|
|
41
|
+
}
|
|
42
|
+
} catch (err) {
|
|
43
|
+
_didIteratorError = true;
|
|
44
|
+
_iteratorError = err;
|
|
45
|
+
} finally {
|
|
46
|
+
try {
|
|
47
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
48
|
+
_iterator.return();
|
|
49
|
+
}
|
|
50
|
+
} finally {
|
|
51
|
+
if (_didIteratorError) {
|
|
52
|
+
throw _iteratorError;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return aliased;
|
|
57
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 publicEnv_exports = {};
|
|
24
|
+
__export(publicEnv_exports, {
|
|
25
|
+
EXPO_PUBLIC_PREFIX: () => EXPO_PUBLIC_PREFIX,
|
|
26
|
+
ONE_PUBLIC_PREFIX: () => ONE_PUBLIC_PREFIX,
|
|
27
|
+
withExpoPublicEnvAliases: () => withExpoPublicEnvAliases
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(publicEnv_exports);
|
|
30
|
+
var ONE_PUBLIC_PREFIX = "ONE_PUBLIC_";
|
|
31
|
+
var EXPO_PUBLIC_PREFIX = "EXPO_PUBLIC_";
|
|
32
|
+
function withExpoPublicEnvAliases(env) {
|
|
33
|
+
var aliased = { ...env };
|
|
34
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
35
|
+
try {
|
|
36
|
+
for (var _iterator = Object.entries(env)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
37
|
+
var [key, value] = _step.value;
|
|
38
|
+
if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue;
|
|
39
|
+
var expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;
|
|
40
|
+
if (!(expoKey in aliased)) aliased[expoKey] = value;
|
|
41
|
+
}
|
|
42
|
+
} catch (err) {
|
|
43
|
+
_didIteratorError = true;
|
|
44
|
+
_iteratorError = err;
|
|
45
|
+
} finally {
|
|
46
|
+
try {
|
|
47
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
48
|
+
_iterator.return();
|
|
49
|
+
}
|
|
50
|
+
} finally {
|
|
51
|
+
if (_didIteratorError) {
|
|
52
|
+
throw _iteratorError;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return aliased;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=publicEnv.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicEnv.native.js","names":[],"sources":["cjs/publicEnv.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 publicEnv_exports = {};\n__export(publicEnv_exports, {\n EXPO_PUBLIC_PREFIX: () => EXPO_PUBLIC_PREFIX,\n ONE_PUBLIC_PREFIX: () => ONE_PUBLIC_PREFIX,\n withExpoPublicEnvAliases: () => withExpoPublicEnvAliases\n});\nmodule.exports = __toCommonJS(publicEnv_exports);\nvar ONE_PUBLIC_PREFIX = \"ONE_PUBLIC_\";\nvar EXPO_PUBLIC_PREFIX = \"EXPO_PUBLIC_\";\nfunction withExpoPublicEnvAliases(env) {\n var aliased = {\n ...env\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(env)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue;\n var expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;\n if (!(expoKey in aliased)) aliased[expoKey] = value;\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 aliased;\n}\n//# sourceMappingURL=publicEnv.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,oBAAoB,CAAC;AACzB,SAAS,mBAAmB;CAC1B,0BAA0B;CAC1B,yBAAyB;CACzB,gCAAgC;AAClC,CAAC;AACD,OAAO,UAAU,aAAa,iBAAiB;AAC/C,IAAI,oBAAoB;AACxB,IAAI,qBAAqB;AACzB,SAAS,yBAAyB,KAAK;CACrC,IAAI,UAAU,EACZ,GAAG,IACL;CACA,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,OAAO,QAAQ,GAAG,CAAC,CAAC,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GACpK,IAAI,CAAC,KAAK,SAAS,MAAM;GACzB,IAAI,CAAC,IAAI,WAAW,iBAAiB,GAAG;GACxC,IAAI,UAAU,GAAG,qBAAqB,IAAI,MAAM,kBAAkB,MAAM;GACxE,IAAI,EAAE,WAAW,UAAU,QAAQ,WAAW;EAChD;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"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.mjs
CHANGED
package/dist/esm/index.native.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const ONE_PUBLIC_PREFIX = "ONE_PUBLIC_";
|
|
2
|
+
const EXPO_PUBLIC_PREFIX = "EXPO_PUBLIC_";
|
|
3
|
+
function withExpoPublicEnvAliases(env) {
|
|
4
|
+
const aliased = { ...env };
|
|
5
|
+
for (const [key, value] of Object.entries(env)) {
|
|
6
|
+
if (!key.startsWith("ONE_PUBLIC_")) continue;
|
|
7
|
+
const expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;
|
|
8
|
+
if (!(expoKey in aliased)) aliased[expoKey] = value;
|
|
9
|
+
}
|
|
10
|
+
return aliased;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { EXPO_PUBLIC_PREFIX, ONE_PUBLIC_PREFIX, withExpoPublicEnvAliases };
|
|
14
|
+
//# sourceMappingURL=publicEnv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicEnv.js","names":[],"sources":["esm/publicEnv.js"],"sourcesContent":["const ONE_PUBLIC_PREFIX = \"ONE_PUBLIC_\";\nconst EXPO_PUBLIC_PREFIX = \"EXPO_PUBLIC_\";\nfunction withExpoPublicEnvAliases(env) {\n const aliased = { ...env };\n for (const [key, value] of Object.entries(env)) {\n if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue;\n const expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;\n if (!(expoKey in aliased)) aliased[expoKey] = value;\n }\n return aliased;\n}\nexport {\n EXPO_PUBLIC_PREFIX,\n ONE_PUBLIC_PREFIX,\n withExpoPublicEnvAliases\n};\n//# sourceMappingURL=publicEnv.js.map\n"],"mappings":";AAAA,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAC3B,SAAS,yBAAyB,KAAK;CACrC,MAAM,UAAU,EAAE,GAAG,IAAI;CACzB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,GAAG;EAC9C,IAAI,CAAC,IAAI,wBAA4B,GAAG;EACxC,MAAM,UAAU,GAAG,qBAAqB,IAAI,MAAM,kBAAkB,MAAM;EAC1E,IAAI,EAAE,WAAW,UAAU,QAAQ,WAAW;CAChD;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var ONE_PUBLIC_PREFIX = "ONE_PUBLIC_";
|
|
2
|
+
var EXPO_PUBLIC_PREFIX = "EXPO_PUBLIC_";
|
|
3
|
+
function withExpoPublicEnvAliases(env) {
|
|
4
|
+
var aliased = { ...env };
|
|
5
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
6
|
+
try {
|
|
7
|
+
for (var _iterator = Object.entries(env)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
8
|
+
var [key, value] = _step.value;
|
|
9
|
+
if (!key.startsWith("ONE_PUBLIC_")) continue;
|
|
10
|
+
var expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;
|
|
11
|
+
if (!(expoKey in aliased)) aliased[expoKey] = value;
|
|
12
|
+
}
|
|
13
|
+
} catch (err) {
|
|
14
|
+
_didIteratorError = true;
|
|
15
|
+
_iteratorError = err;
|
|
16
|
+
} finally {
|
|
17
|
+
try {
|
|
18
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
19
|
+
_iterator.return();
|
|
20
|
+
}
|
|
21
|
+
} finally {
|
|
22
|
+
if (_didIteratorError) {
|
|
23
|
+
throw _iteratorError;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return aliased;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { EXPO_PUBLIC_PREFIX, ONE_PUBLIC_PREFIX, withExpoPublicEnvAliases };
|
|
31
|
+
//# sourceMappingURL=publicEnv.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicEnv.native.js","names":[],"sources":["esm/publicEnv.native.js"],"sourcesContent":["var ONE_PUBLIC_PREFIX = \"ONE_PUBLIC_\";\nvar EXPO_PUBLIC_PREFIX = \"EXPO_PUBLIC_\";\nfunction withExpoPublicEnvAliases(env) {\n var aliased = {\n ...env\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(env)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue;\n var expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`;\n if (!(expoKey in aliased)) aliased[expoKey] = value;\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 aliased;\n}\nexport {\n EXPO_PUBLIC_PREFIX,\n ONE_PUBLIC_PREFIX,\n withExpoPublicEnvAliases\n};\n//# sourceMappingURL=publicEnv.js.map\n"],"mappings":";AAAA,IAAI,oBAAoB;AACxB,IAAI,qBAAqB;AACzB,SAAS,yBAAyB,KAAK;CACrC,IAAI,UAAU,EACZ,GAAG,IACL;CACA,IAAI,4BAA4B,MAAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,OAAO,QAAQ,GAAG,CAAC,CAAC,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GACpK,IAAI,CAAC,KAAK,SAAS,MAAM;GACzB,IAAI,CAAC,IAAI,wBAA4B,GAAG;GACxC,IAAI,UAAU,GAAG,qBAAqB,IAAI,MAAM,kBAAkB,MAAM;GACxE,IAAI,EAAE,WAAW,UAAU,QAAQ,WAAW;EAChD;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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxrn/utils",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.53.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
"types": "./types/index.d.ts",
|
|
14
14
|
"import": "./dist/esm/index.mjs",
|
|
15
15
|
"require": "./dist/cjs/index.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./publicEnv": {
|
|
18
|
+
"types": "./types/publicEnv.d.ts",
|
|
19
|
+
"import": "./dist/esm/publicEnv.mjs",
|
|
20
|
+
"require": "./dist/cjs/publicEnv.cjs"
|
|
16
21
|
}
|
|
17
22
|
},
|
|
18
23
|
"files": [
|
|
@@ -30,8 +35,8 @@
|
|
|
30
35
|
"typecheck": "tsc --noEmit"
|
|
31
36
|
},
|
|
32
37
|
"dependencies": {
|
|
33
|
-
"@vxrn/debug": "2.0.0-beta.
|
|
34
|
-
"@vxrn/resolve": "2.0.0-beta.
|
|
38
|
+
"@vxrn/debug": "2.0.0-beta.53.1",
|
|
39
|
+
"@vxrn/resolve": "2.0.0-beta.53.1",
|
|
35
40
|
"ws": "^8.21.0"
|
|
36
41
|
},
|
|
37
42
|
"devDependencies": {
|
package/src/index.ts
CHANGED
package/src/publicEnv.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const ONE_PUBLIC_PREFIX = 'ONE_PUBLIC_'
|
|
2
|
+
export const EXPO_PUBLIC_PREFIX = 'EXPO_PUBLIC_'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Expose One public values under Expo's established same-suffix names for
|
|
6
|
+
* package compatibility. Explicit Expo values win; Expo input never creates a
|
|
7
|
+
* One-owned name.
|
|
8
|
+
*/
|
|
9
|
+
export function withExpoPublicEnvAliases<T>(env: Record<string, T>): Record<string, T> {
|
|
10
|
+
const aliased = { ...env }
|
|
11
|
+
|
|
12
|
+
for (const [key, value] of Object.entries(env)) {
|
|
13
|
+
if (!key.startsWith(ONE_PUBLIC_PREFIX)) continue
|
|
14
|
+
const expoKey = `${EXPO_PUBLIC_PREFIX}${key.slice(ONE_PUBLIC_PREFIX.length)}`
|
|
15
|
+
if (!(expoKey in aliased)) aliased[expoKey] = value
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return aliased
|
|
19
|
+
}
|
package/types/index.d.ts
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ONE_PUBLIC_PREFIX = "ONE_PUBLIC_";
|
|
2
|
+
export declare const EXPO_PUBLIC_PREFIX = "EXPO_PUBLIC_";
|
|
3
|
+
/**
|
|
4
|
+
* Expose One public values under Expo's established same-suffix names for
|
|
5
|
+
* package compatibility. Explicit Expo values win; Expo input never creates a
|
|
6
|
+
* One-owned name.
|
|
7
|
+
*/
|
|
8
|
+
export declare function withExpoPublicEnvAliases<T>(env: Record<string, T>): Record<string, T>;
|
|
9
|
+
//# sourceMappingURL=publicEnv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicEnv.d.ts","sourceRoot":"","sources":["../src/publicEnv.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,gBAAgB,CAAA;AAC9C,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAEhD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAUrF"}
|