@tamagui/helpers-node 2.0.0-rc.4 → 2.0.0-rc.40

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.
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var getDefaultTamaguiOptions_exports = {};
22
24
  __export(getDefaultTamaguiOptions_exports, {
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var getDefaultTamaguiOptions_exports = {};
24
26
  __export(getDefaultTamaguiOptions_exports, {
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getDefaultTamaguiOptions_exports","__export","getDefaultTamaguiOptions","module","exports","import_getTamaguiDefaultPath","require","param","cwd","platform","components","config","getDefaultTamaguiConfigPath"],"sources":["../src/getDefaultTamaguiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gCAAA;AAAAC,QAAA,CAAAD,gCAAA;EAAAE,wBAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,gCAA4C;AAE5C,IAAAK,4BAAsB,GAAAC,OAAyB;AAAA,eACvCJ,yBAAAK,KAAA;EACR,IAE4B;IAAAC,GAAA;EAAA,IAAAD,KAAA;EAC1B,OAAO;IACLE,QAAA,EAAU;IACVC,UAAA,EAAY,CACZ,SAAQ,CACV;IACFC,MAAA,YAAAN,4BAAA,CAAAO,2BAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getDefaultTamaguiOptions_exports","__export","getDefaultTamaguiOptions","module","exports","import_getTamaguiDefaultPath","require","param","cwd","platform","components","config","getDefaultTamaguiConfigPath"],"sources":["../src/getDefaultTamaguiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gCAAA;AAAAC,QAAA,CAAAD,gCAAA;EAAAE,wBAAA,EAAAA,CAAA,KAAAA;AAAA;AAEAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,gCAA4C;AAE5C,IAAAK,4BAAsB,GAAAC,OAAyB;AAAA,eACvCJ,yBAAAK,KAAA;EACR,IAE4B;IAAAC,GAAA;EAAA,IAAAD,KAAA;EAC1B,OAAO;IACLE,QAAA,EAAU;IACVC,UAAA,EAAY,CACZ,SAAQ,CACV;IACFC,MAAA,YAAAN,4BAAA,CAAAO,2BAAA","ignoreList":[]}
@@ -3,37 +3,44 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var getTamaguiDefaultPath_exports = {};
22
24
  __export(getTamaguiDefaultPath_exports, {
23
25
  getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
24
26
  });
25
27
  module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
26
- var import_node_path = require("node:path"),
27
- import_fs_extra = require("fs-extra");
28
+ var import_node_path = require("node:path");
29
+ var import_fs_extra = require("fs-extra");
28
30
  let cachedPath = "";
29
31
  async function getDefaultTamaguiConfigPath({
30
32
  cwd = ".",
31
- cache = !0
33
+ cache = true
32
34
  }) {
33
- if (cache && cachedPath) return cachedPath;
34
- const defaultPaths = ["tamagui.config.ts", (0, import_node_path.join)("src", "tamagui.config.ts")].map(p => (0, import_node_path.join)(cwd, p)),
35
- existing = (await Promise.all(defaultPaths.map(path => (0, import_fs_extra.pathExists)(path)))).findIndex(x => !!x),
36
- found = defaultPaths[existing];
37
- if (!found) throw new Error("No found tamagui.config.ts");
38
- return cachedPath = found, found;
35
+ if (cache && cachedPath) {
36
+ return cachedPath;
37
+ }
38
+ const defaultPaths = ["tamagui.config.ts", (0, import_node_path.join)("src", "tamagui.config.ts")].map(p => (0, import_node_path.join)(cwd, p));
39
+ const existing = (await Promise.all(defaultPaths.map(path => (0, import_fs_extra.pathExists)(path)))).findIndex(x => !!x);
40
+ const found = defaultPaths[existing];
41
+ if (!found) {
42
+ throw new Error(`No found tamagui.config.ts`);
43
+ }
44
+ cachedPath = found;
45
+ return found;
39
46
  }
@@ -5,45 +5,52 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var getTamaguiDefaultPath_exports = {};
24
26
  __export(getTamaguiDefaultPath_exports, {
25
27
  getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
26
28
  });
27
29
  module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
28
- var import_path = require("path"),
29
- import_fs_extra = require("fs-extra"),
30
- cachedPath = "";
30
+ var import_path = require("path");
31
+ var import_fs_extra = require("fs-extra");
32
+ var cachedPath = "";
31
33
  async function getDefaultTamaguiConfigPath(param) {
32
34
  var {
33
35
  cwd = ".",
34
- cache = !0
36
+ cache = true
35
37
  } = param;
36
- if (cache && cachedPath) return cachedPath;
38
+ if (cache && cachedPath) {
39
+ return cachedPath;
40
+ }
37
41
  var defaultPaths = ["tamagui.config.ts", (0, import_path.join)("src", "tamagui.config.ts")].map(function (p) {
38
- return (0, import_path.join)(cwd, p);
39
- }),
40
- existing = (await Promise.all(defaultPaths.map(function (path) {
41
- return (0, import_fs_extra.pathExists)(path);
42
- }))).findIndex(function (x) {
43
- return !!x;
44
- }),
45
- found = defaultPaths[existing];
46
- if (!found) throw new Error("No found tamagui.config.ts");
47
- return cachedPath = found, found;
42
+ return (0, import_path.join)(cwd, p);
43
+ });
44
+ var existing = (await Promise.all(defaultPaths.map(function (path) {
45
+ return (0, import_fs_extra.pathExists)(path);
46
+ }))).findIndex(function (x) {
47
+ return !!x;
48
+ });
49
+ var found = defaultPaths[existing];
50
+ if (!found) {
51
+ throw new Error(`No found tamagui.config.ts`);
52
+ }
53
+ cachedPath = found;
54
+ return found;
48
55
  }
49
56
  //# sourceMappingURL=getTamaguiDefaultPath.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getTamaguiDefaultPath_exports","__export","getDefaultTamaguiConfigPath","module","exports","import_path","require","import_fs_extra","cachedPath","param","cwd","cache","defaultPaths","join","map","p","existing","Promise","all","path","pathExists","findIndex","x"],"sources":["../src/getTamaguiDefaultPath.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,6BAAA;AAAAC,QAAA,CAAAD,6BAAA;EAAAE,2BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,6BAErB;AAEA,IAAIK,WAAA,GAAaC,OAAA;EAAAC,eAAA,GAAAD,OAAA;EAAAE,UAAA;AAEjB,eAAsBN,4BAA4BO,KAAA;EAChD;IAAMC,GAAA;IAAAC,KAAA;EAAA,IAAAF,KAAA;EACN,IAAAE,KAAQ,IAAAH,UAAA,EAKU,OAAAA,UAAA;EAClB,IAAII,YAAS,IACX,mBAAO,EAGT,IAAMP,WAAA,CAAAQ,IAAgB,4BAAqB,EAAkC,CAAIC,GAAC,WAChFC,CAAA;MACF,OACM,IAAAV,WACE,CAAAQ,IAAQ,EAAAH,GAAI,EAAAK,CAAA;IAGpB;IAAIC,QAAC,UAAAC,OAAA,CAAAC,GAAA,CAAAN,YAAA,CAAAE,GAAA,WAAAK,IAAA;MACH,OAAM,IAAIZ,eAAM,CAAAa,UAAA,EAAAD,IAAA,CAA4B;IAG9C,KAAAE,SAAA,WAAaC,CAAA,EACN;MACT,SAAAA,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getTamaguiDefaultPath_exports","__export","getDefaultTamaguiConfigPath","module","exports","import_path","require","import_fs_extra","cachedPath","param","cwd","cache","defaultPaths","join","map","p","existing","Promise","all","path","pathExists","findIndex","x","found"],"sources":["../src/getTamaguiDefaultPath.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,6BAAA;AAAAC,QAAA,CAAAD,6BAAA;EAAAE,2BAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,6BAAA;AAErB,IAAAK,WAAA,GAAAC,OAA2B;AAE3B,IAAIC,eAAa,GAAAD,OAAA;AAEjB,IAAAE,UAAA,GAAsB;AAA4B,eAC1CN,4BAAAO,KAAA;EACN;IAAAC,GAAQ;IAAAC,KAAA;EAAA,IAAAF,KAAA;EACV,IAIoBE,KAAA,IAAAH,UAAA;IAClB,OAAIA,UAAS;EACX;EACF,IAAAI,YAAA,IAEA,mBAAqB,EAA4D,CAAC,GAAAP,WAChF,CAAAQ,IAAA,4BAAW,EACb,CAAAC,GAAA,WAAAC,CAAA;IACA,OAAM,IAAAV,WACE,CAAAQ,IAAA,EAAAH,GAAQ,EAAIK,CAAA;EAEpB;EACA,IAAIC,QAAQ,UAAAC,OAAA,CAAAC,GAAA,CAAAN,YAAA,CAAAE,GAAA,WAAAK,IAAA;IACV,OAAM,IAAIZ,eAAM,CAAAa,UAAA,EAAAD,IAAA,CAA4B;EAC9C,KAAAE,SAAA,WAAAC,CAAA;IAEA,SAAAA,CAAA;EACA;EACF,IAAAC,KAAA,GAAAX,YAAA,CAAAI,QAAA","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var getTamaguiOptions_exports = {};
22
24
  __export(getTamaguiOptions_exports, {
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var getTamaguiOptions_exports = {};
24
26
  __export(getTamaguiOptions_exports, {
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getTamaguiOptions_exports","__export","getTamaguiOptions","module","exports","import_readTamaguiOptions","require","param","cwd","readTamaguiOptions"],"sources":["../src/getTamaguiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,yBAAA;AAAAC,QAAA,CAAAD,yBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,yBAAmC;AAEnC,IAAAK,yBAAsB,GAAAC,OAAkB;AAAA,eAChCJ,kBAAAK,KAAA;EACR,IAE2D;IAAAC,GAAA;EAAA,IAAAD,KAAA;EACzD,QAAQ,UAAMF,yBAAA,CAAAI,kBAAA,EAAmB;IACnCD","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","getTamaguiOptions_exports","__export","getTamaguiOptions","module","exports","import_readTamaguiOptions","require","param","cwd","readTamaguiOptions"],"sources":["../src/getTamaguiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,yBAAA;AAAAC,QAAA,CAAAD,yBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,yBAAmC;AAEnC,IAAAK,yBAAsB,GAAAC,OAAkB;AAAA,eAChCJ,kBAAAK,KAAA;EACR,IAE2D;IAAAC,GAAA;EAAA,IAAAD,KAAA;EACzD,QAAQ,UAAMF,yBAAA,CAAAI,kBAAA,EAAmB;IACnCD","ignoreList":[]}
package/dist/index.cjs CHANGED
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
7
8
  get: () => from[key],
8
9
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
10
  });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
15
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
16
+ value: true
15
17
  }), mod);
16
18
  var index_exports = {};
17
19
  module.exports = __toCommonJS(index_exports);
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
9
10
  get: () => from[key],
10
11
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
12
  });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
17
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
18
+ value: true
17
19
  }), mod);
18
20
  var index_exports = {};
19
21
  module.exports = __toCommonJS(index_exports);
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCAFd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCAAAH,MADd,CAAAC,OAAA;AAEAC,UAAA,CAAAH,aAAA,EAAcI,OAAA,oCAFd,GAAAH,MAAA,CAAAC,OAAA","ignoreList":[]}
@@ -3,44 +3,50 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var readTamaguiOptions_exports = {};
22
24
  __export(readTamaguiOptions_exports, {
23
25
  readTamaguiOptions: () => readTamaguiOptions
24
26
  });
25
27
  module.exports = __toCommonJS(readTamaguiOptions_exports);
26
- var import_node_path = require("node:path"),
27
- import_fs_extra = require("fs-extra"),
28
- import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions.cjs");
28
+ var import_node_path = require("node:path");
29
+ var import_fs_extra = require("fs-extra");
30
+ var import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions.cjs");
29
31
  async function readTamaguiOptions({
30
32
  cwd = "."
31
33
  }) {
32
34
  const filePath = (0, import_node_path.join)(cwd, "tamagui.json");
33
- if (!(await (0, import_fs_extra.pathExists)(filePath))) return {
34
- exists: !1,
35
- options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
36
- cwd
37
- })
38
- };
35
+ if (!(await (0, import_fs_extra.pathExists)(filePath))) {
36
+ return {
37
+ exists: false,
38
+ options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
39
+ cwd
40
+ })
41
+ };
42
+ }
39
43
  try {
40
44
  const options = await (0, import_fs_extra.readJSON)(filePath);
41
- if (!Array.isArray(options.components)) throw new Error("Invalid components: not string[]");
45
+ if (!Array.isArray(options.components)) {
46
+ throw new Error(`Invalid components: not string[]`);
47
+ }
42
48
  return {
43
- exists: !0,
49
+ exists: true,
44
50
  options: {
45
51
  ...(!options.config && (await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
46
52
  cwd
@@ -49,8 +55,9 @@ async function readTamaguiOptions({
49
55
  }
50
56
  };
51
57
  } catch (err) {
52
- return console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`), {
53
- exists: !1,
58
+ console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`);
59
+ return {
60
+ exists: false,
54
61
  options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
55
62
  cwd
56
63
  })
@@ -5,45 +5,51 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
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, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var readTamaguiOptions_exports = {};
24
26
  __export(readTamaguiOptions_exports, {
25
27
  readTamaguiOptions: () => readTamaguiOptions
26
28
  });
27
29
  module.exports = __toCommonJS(readTamaguiOptions_exports);
28
- var import_path = require("path"),
29
- import_fs_extra = require("fs-extra"),
30
- import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions.native.js");
30
+ var import_path = require("path");
31
+ var import_fs_extra = require("fs-extra");
32
+ var import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions.native.js");
31
33
  async function readTamaguiOptions(param) {
32
34
  var {
33
- cwd = "."
34
- } = param,
35
- filePath = (0, import_path.join)(cwd, "tamagui.json");
36
- if (!(await (0, import_fs_extra.pathExists)(filePath))) return {
37
- exists: !1,
38
- options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
39
- cwd
40
- })
41
- };
35
+ cwd = "."
36
+ } = param;
37
+ var filePath = (0, import_path.join)(cwd, "tamagui.json");
38
+ if (!(await (0, import_fs_extra.pathExists)(filePath))) {
39
+ return {
40
+ exists: false,
41
+ options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
42
+ cwd
43
+ })
44
+ };
45
+ }
42
46
  try {
43
47
  var options = await (0, import_fs_extra.readJSON)(filePath);
44
- if (!Array.isArray(options.components)) throw new Error("Invalid components: not string[]");
48
+ if (!Array.isArray(options.components)) {
49
+ throw new Error(`Invalid components: not string[]`);
50
+ }
45
51
  return {
46
- exists: !0,
52
+ exists: true,
47
53
  options: {
48
54
  ...(!options.config && (await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
49
55
  cwd
@@ -52,8 +58,9 @@ async function readTamaguiOptions(param) {
52
58
  }
53
59
  };
54
60
  } catch (err) {
55
- return console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`), {
56
- exists: !1,
61
+ console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`);
62
+ return {
63
+ exists: false,
57
64
  options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
58
65
  cwd
59
66
  })
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","readTamaguiOptions_exports","__export","readTamaguiOptions","module","exports","import_path","require","import_fs_extra","import_getDefaultTamaguiOptions","param","cwd","filePath","join","pathExists","exists","options","getDefaultTamaguiOptions","readJSON","Array","isArray","components","Error","config","err","console","error","message","stack"],"sources":["../src/readTamaguiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,0BAGrB;AAIA,IAAAK,WAAsB,GAAAC,OAAA;EAAmBC,eAGtC,GAAAD,OAAA;EAAAE,+BAAA,GAAAF,OAAA;AACD,eAAMJ,kBAAWA,CAAAO,KAAA;EAEjB,IAAI;MAAEC,GAAA;IAAM,IAAAD,KAAA;IAAAE,QAAA,OAAAN,WAAmB,CAAAO,IAAA,EAAAF,GAAA;EAC7B,YAAO,IAAAH,eAAA,CAAAM,UAAA,EAAAF,QAAA,WACL;IACAG,MAAA,GAAS;IACXC,OAAA,YAAAP,+BAAA,CAAAQ,wBAAA;MAGEN;IACF;EAEA;EACE;IAGF,IAAAK,OAAO,aAAAR,eAAA,CAAAU,QAAA,EAAAN,QAAA;IAAA,IACL,CAAAO,KAAQ,CAAAC,OAAA,CAAAJ,OAAA,CAAAK,UAAA,GACR,UAASC,KAAA;IAAA,OACH;MAA0DP,MAC3D;MACLC,OAAA;QACF,KAAAA,OAAA,CAAAO,MAAA,eAAAd,+BAAA,CAAAQ,wBAAA;UACFN;QACE;QAGE,GAAAK;MACA;IACF;EACF,SAAAQ,GAAA;IACF,OAAAC,OAAA,CAAAC,KAAA,gCAAAF,GAAA,CAAAG,OAAA,IAAAH,GAAA,CAAAI,KAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","readTamaguiOptions_exports","__export","readTamaguiOptions","module","exports","import_path","require","import_fs_extra","import_getDefaultTamaguiOptions","param","cwd","filePath","join","pathExists","exists","options","getDefaultTamaguiOptions","readJSON","Array","isArray","components","Error","config","err","console","error","message","stack"],"sources":["../src/readTamaguiOptions.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,0BAAA;AAAAC,QAAA,CAAAD,0BAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAqB,CAAAK,0BAAA;AAGrB,IAAAK,WAAA,GAAAC,OAAqC;AAErC,IAAAC,eAAA,GAAAD,OAAA,WAAyC;AAEzC,IAAAE,+BAAyC,GAAEF,OAAM,CAAI,sCAGlD;AACD,eAAMJ,kBAAWA,CAAAO,KAAA;EAEjB,IAAI;IAAEC,GAAA;EAAM,IAAAD,KAAA;EACV,IAAAE,QAAO,OAAAN,WAAA,CAAAO,IAAA,EAAAF,GAAA;EAAA,IACL,SAAQ,GAAAH,eAAA,CAAAM,UAAA,EAAAF,QAAA;IAAA,OACR;MACFG,MAAA;MACFC,OAAA,YAAAP,+BAAA,CAAAQ,wBAAA;QAEIN;MACF;IAEA;EACE;EAAkD,IACpD;IAEA,IAAAK,OAAO,aAAAR,eAAA,CAAAU,QAAA,EAAAN,QAAA;IAAA,IACL,CAAAO,KAAQ,CAAAC,OAAA,CAAAJ,OAAA,CAAAK,UAAA;MACR,UAASC,KAAA;IAAA;IACuD,OAC3D;MACLP,MAAA;MACFC,OAAA;QACF,IAAS,CAAAA,OAAU,CAAAO,MAAA,eAAAd,+BAAA,CAAAQ,wBAAA;UACjBN;QAEA;QACE,GAAAK;MACA;IACF;EACF,SAAAQ,GAAA;IACFC,OAAA,CAAAC,KAAA,gCAAAF,GAAA,CAAAG,OAAA,IAAAH,GAAA,CAAAI,KAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/helpers-node",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.0-rc.40",
4
4
  "source": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -20,10 +20,10 @@
20
20
  "clean:build": "tamagui-build clean:build"
21
21
  },
22
22
  "dependencies": {
23
- "@tamagui/types": "2.0.0-rc.4"
23
+ "@tamagui/types": "2.0.0-rc.40"
24
24
  },
25
25
  "devDependencies": {
26
- "@tamagui/build": "2.0.0-rc.4",
26
+ "@tamagui/build": "2.0.0-rc.40",
27
27
  "fs-extra": "^11.2.0"
28
28
  }
29
29
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/getDefaultTamaguiOptions.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "import type { TamaguiOptions } from '@tamagui/types'\n\nimport { getDefaultTamaguiConfigPath } from './getTamaguiDefaultPath'\n\nexport async function getDefaultTamaguiOptions({\n cwd = '.',\n}: {\n cwd: string\n}): Promise<TamaguiOptions> {\n return {\n platform: 'native',\n components: ['tamagui'],\n config: await getDefaultTamaguiConfigPath({ cwd }),\n }\n}\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/getTamaguiDefaultPath.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "import { join } from 'node:path'\n\nimport { pathExists } from 'fs-extra'\n\nlet cachedPath = ''\n\nexport async function getDefaultTamaguiConfigPath({\n cwd = '.',\n cache = true,\n}: {\n cwd?: string\n // TODO this isn't passed down / could avoid\n cache?: boolean\n}): Promise<string> {\n if (cache && cachedPath) {\n return cachedPath\n }\n\n const defaultPaths = ['tamagui.config.ts', join('src', 'tamagui.config.ts')].map((p) =>\n join(cwd, p)\n )\n const existing = (\n await Promise.all(defaultPaths.map((path) => pathExists(path)))\n ).findIndex((x) => !!x)\n const found = defaultPaths[existing]\n if (!found) {\n throw new Error(`No found tamagui.config.ts`)\n }\n\n cachedPath = found\n return found\n}\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/getTamaguiOptions.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "import { readTamaguiOptions } from './readTamaguiOptions'\n\nexport async function getTamaguiOptions({\n cwd = '.',\n}: {\n cwd?: string\n}): Promise<import('@tamagui/types/types').TamaguiOptions> {\n return (await readTamaguiOptions({ cwd })).options\n}\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/index.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "export * from './readTamaguiOptions'\nexport * from './getTamaguiDefaultPath'\nexport * from './getTamaguiOptions'\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -4,8 +4,8 @@
4
4
  "sources": [
5
5
  "src/readTamaguiOptions.ts"
6
6
  ],
7
+ "version": 3,
7
8
  "sourcesContent": [
8
9
  "import { join } from 'node:path'\n\nimport type { TamaguiOptions } from '@tamagui/types'\nimport { pathExists, readJSON } from 'fs-extra'\n\nimport { getDefaultTamaguiOptions } from './getDefaultTamaguiOptions'\n\nexport async function readTamaguiOptions({ cwd = '.' }: { cwd: string }): Promise<{\n exists: boolean\n options: TamaguiOptions\n}> {\n const filePath = join(cwd, 'tamagui.json')\n\n if (!(await pathExists(filePath))) {\n return {\n exists: false,\n options: await getDefaultTamaguiOptions({ cwd }),\n }\n }\n\n try {\n const options = (await readJSON(filePath)) as TamaguiOptions\n\n if (!Array.isArray(options.components)) {\n throw new Error(`Invalid components: not string[]`)\n }\n\n return {\n exists: true,\n options: {\n ...(!options.config && (await getDefaultTamaguiOptions({ cwd }))),\n ...options,\n },\n }\n } catch (err: any) {\n console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`)\n\n return {\n exists: false,\n options: await getDefaultTamaguiOptions({ cwd }),\n }\n }\n}\n"
9
- ],
10
- "version": 3
10
+ ]
11
11
  }
@@ -1,30 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var getDefaultTamaguiOptions_exports = {};
16
- __export(getDefaultTamaguiOptions_exports, {
17
- getDefaultTamaguiOptions: () => getDefaultTamaguiOptions
18
- });
19
- module.exports = __toCommonJS(getDefaultTamaguiOptions_exports);
20
- var import_getTamaguiDefaultPath = require("./getTamaguiDefaultPath");
21
- async function getDefaultTamaguiOptions({
22
- cwd = "."
23
- }) {
24
- return {
25
- platform: "native",
26
- components: ["tamagui"],
27
- config: await (0, import_getTamaguiDefaultPath.getDefaultTamaguiConfigPath)({ cwd })
28
- };
29
- }
30
- //# sourceMappingURL=getDefaultTamaguiOptions.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/getDefaultTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mCAA4C;AAE5C,eAAsB,yBAAyB;AAAA,EAC7C,MAAM;AACR,GAE4B;AAC1B,SAAO;AAAA,IACL,UAAU;AAAA,IACV,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ,UAAM,0DAA4B,EAAE,IAAI,CAAC;AAAA,EACnD;AACF;",
5
- "names": []
6
- }
@@ -1,35 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var getTamaguiDefaultPath_exports = {};
16
- __export(getTamaguiDefaultPath_exports, {
17
- getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
18
- });
19
- module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
20
- var import_node_path = require("node:path"), import_fs_extra = require("fs-extra");
21
- let cachedPath = "";
22
- async function getDefaultTamaguiConfigPath({
23
- cwd = ".",
24
- cache = !0
25
- }) {
26
- if (cache && cachedPath)
27
- return cachedPath;
28
- const defaultPaths = ["tamagui.config.ts", (0, import_node_path.join)("src", "tamagui.config.ts")].map(
29
- (p) => (0, import_node_path.join)(cwd, p)
30
- ), existing = (await Promise.all(defaultPaths.map((path) => (0, import_fs_extra.pathExists)(path)))).findIndex((x) => !!x), found = defaultPaths[existing];
31
- if (!found)
32
- throw new Error("No found tamagui.config.ts");
33
- return cachedPath = found, found;
34
- }
35
- //# sourceMappingURL=getTamaguiDefaultPath.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/getTamaguiDefaultPath.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAqB,sBAErB,kBAA2B;AAE3B,IAAI,aAAa;AAEjB,eAAsB,4BAA4B;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AACV,GAIoB;AAClB,MAAI,SAAS;AACX,WAAO;AAGT,QAAM,eAAe,CAAC,yBAAqB,uBAAK,OAAO,mBAAmB,CAAC,EAAE;AAAA,IAAI,CAAC,UAChF,uBAAK,KAAK,CAAC;AAAA,EACb,GACM,YACJ,MAAM,QAAQ,IAAI,aAAa,IAAI,CAAC,aAAS,4BAAW,IAAI,CAAC,CAAC,GAC9D,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,GAChB,QAAQ,aAAa,QAAQ;AACnC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,4BAA4B;AAG9C,sBAAa,OACN;AACT;",
5
- "names": []
6
- }
@@ -1,26 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var getTamaguiOptions_exports = {};
16
- __export(getTamaguiOptions_exports, {
17
- getTamaguiOptions: () => getTamaguiOptions
18
- });
19
- module.exports = __toCommonJS(getTamaguiOptions_exports);
20
- var import_readTamaguiOptions = require("./readTamaguiOptions");
21
- async function getTamaguiOptions({
22
- cwd = "."
23
- }) {
24
- return (await (0, import_readTamaguiOptions.readTamaguiOptions)({ cwd })).options;
25
- }
26
- //# sourceMappingURL=getTamaguiOptions.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/getTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;AAEnC,eAAsB,kBAAkB;AAAA,EACtC,MAAM;AACR,GAE2D;AACzD,UAAQ,UAAM,8CAAmB,EAAE,IAAI,CAAC,GAAG;AAC7C;",
5
- "names": []
6
- }
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var index_exports = {};
13
- module.exports = __toCommonJS(index_exports);
14
- __reExport(index_exports, require("./readTamaguiOptions"), module.exports);
15
- __reExport(index_exports, require("./getTamaguiDefaultPath"), module.exports);
16
- __reExport(index_exports, require("./getTamaguiOptions"), module.exports);
17
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,iCAAd;AACA,0BAAc,oCADd;AAEA,0BAAc,gCAFd;",
5
- "names": []
6
- }
@@ -1,46 +0,0 @@
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)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
- var readTamaguiOptions_exports = {};
16
- __export(readTamaguiOptions_exports, {
17
- readTamaguiOptions: () => readTamaguiOptions
18
- });
19
- module.exports = __toCommonJS(readTamaguiOptions_exports);
20
- var import_node_path = require("node:path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
21
- async function readTamaguiOptions({ cwd = "." }) {
22
- const filePath = (0, import_node_path.join)(cwd, "tamagui.json");
23
- if (!await (0, import_fs_extra.pathExists)(filePath))
24
- return {
25
- exists: !1,
26
- options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({ cwd })
27
- };
28
- try {
29
- const options = await (0, import_fs_extra.readJSON)(filePath);
30
- if (!Array.isArray(options.components))
31
- throw new Error("Invalid components: not string[]");
32
- return {
33
- exists: !0,
34
- options: {
35
- ...!options.config && await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({ cwd }),
36
- ...options
37
- }
38
- };
39
- } catch (err) {
40
- return console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`), {
41
- exists: !1,
42
- options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({ cwd })
43
- };
44
- }
45
- }
46
- //# sourceMappingURL=readTamaguiOptions.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/readTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAqB,sBAGrB,kBAAqC,qBAErC,kCAAyC;AAEzC,eAAsB,mBAAmB,EAAE,MAAM,IAAI,GAGlD;AACD,QAAM,eAAW,uBAAK,KAAK,cAAc;AAEzC,MAAI,CAAE,UAAM,4BAAW,QAAQ;AAC7B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,UAAM,0DAAyB,EAAE,IAAI,CAAC;AAAA,IACjD;AAGF,MAAI;AACF,UAAM,UAAW,UAAM,0BAAS,QAAQ;AAExC,QAAI,CAAC,MAAM,QAAQ,QAAQ,UAAU;AACnC,YAAM,IAAI,MAAM,kCAAkC;AAGpD,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,GAAI,CAAC,QAAQ,UAAW,UAAM,0DAAyB,EAAE,IAAI,CAAC;AAAA,QAC9D,GAAG;AAAA,MACL;AAAA,IACF;AAAA,EACF,SAAS,KAAU;AACjB,mBAAQ,MAAM,+BAA+B,IAAI,OAAO,IAAI,IAAI,KAAK,EAAE,GAEhE;AAAA,MACL,QAAQ;AAAA,MACR,SAAS,UAAM,0DAAyB,EAAE,IAAI,CAAC;AAAA,IACjD;AAAA,EACF;AACF;",
5
- "names": []
6
- }