@tamagui/helpers-node 1.124.16 → 1.124.18

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.
@@ -23,7 +23,7 @@ __export(getTamaguiDefaultPath_exports, {
23
23
  getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
24
24
  });
25
25
  module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
26
- var import_path = require("path"),
26
+ var import_node_path = require("node:path"),
27
27
  import_fs_extra = require("fs-extra");
28
28
  let cachedPath = "";
29
29
  async function getDefaultTamaguiConfigPath({
@@ -31,7 +31,7 @@ async function getDefaultTamaguiConfigPath({
31
31
  cache = !0
32
32
  }) {
33
33
  if (cache && cachedPath) return cachedPath;
34
- const defaultPaths = ["tamagui.config.ts", (0, import_path.join)("src", "tamagui.config.ts")].map(p => (0, import_path.join)(cwd, p)),
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
35
  existing = (await Promise.all(defaultPaths.map(path => (0, import_fs_extra.pathExists)(path)))).findIndex(x => !!x),
36
36
  found = defaultPaths[existing];
37
37
  if (!found) throw new Error("No found tamagui.config.ts");
@@ -17,7 +17,7 @@ __export(getTamaguiDefaultPath_exports, {
17
17
  getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
18
18
  });
19
19
  module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
20
- var import_path = require("path"), import_fs_extra = require("fs-extra");
20
+ var import_node_path = require("node:path"), import_fs_extra = require("fs-extra");
21
21
  let cachedPath = "";
22
22
  async function getDefaultTamaguiConfigPath({
23
23
  cwd = ".",
@@ -25,8 +25,8 @@ async function getDefaultTamaguiConfigPath({
25
25
  }) {
26
26
  if (cache && cachedPath)
27
27
  return cachedPath;
28
- const defaultPaths = ["tamagui.config.ts", (0, import_path.join)("src", "tamagui.config.ts")].map(
29
- (p) => (0, import_path.join)(cwd, p)
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
30
  ), existing = (await Promise.all(defaultPaths.map((path) => (0, import_fs_extra.pathExists)(path)))).findIndex((x) => !!x), found = defaultPaths[existing];
31
31
  if (!found)
32
32
  throw new Error("No found tamagui.config.ts");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/getTamaguiDefaultPath.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB,iBAErB,kBAA2B;AAE3B,IAAI,aAAa;AAEjB,eAAsB,4BAA4B;AAAA,EAChD,MAAM;AAAA,EACN,QAAQ;AACV,GAIG;AACD,MAAI,SAAS;AACX,WAAO;AAGT,QAAM,eAAe,CAAC,yBAAqB,kBAAK,OAAO,mBAAmB,CAAC,EAAE;AAAA,IAAI,CAAC,UAChF,kBAAK,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;",
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
5
  "names": []
6
6
  }
@@ -18,16 +18,16 @@ __export(getTamaguiDefaultPath_exports, {
18
18
  getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
19
19
  });
20
20
  module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
21
- var import_path = require("path"), import_fs_extra = require("fs-extra"), cachedPath = "";
21
+ var import_node_path = require("node:path"), import_fs_extra = require("fs-extra"), cachedPath = "";
22
22
  async function getDefaultTamaguiConfigPath(param) {
23
23
  var { cwd = ".", cache = !0 } = param;
24
24
  if (cache && cachedPath)
25
25
  return cachedPath;
26
26
  var defaultPaths = [
27
27
  "tamagui.config.ts",
28
- (0, import_path.join)("src", "tamagui.config.ts")
28
+ (0, import_node_path.join)("src", "tamagui.config.ts")
29
29
  ].map(function(p) {
30
- return (0, import_path.join)(cwd, p);
30
+ return (0, import_node_path.join)(cwd, p);
31
31
  }), existing = (await Promise.all(defaultPaths.map(function(path) {
32
32
  return (0, import_fs_extra.pathExists)(path);
33
33
  }))).findIndex(function(x) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/Users/n8/tamagui/code/core/helpers-node/src/getTamaguiDefaultPath.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;kBAAqB,iBAErB,kBAA2B,qBAEvBA,aAAa;AAEjB,eAAsBC,4BAA4B;MAAA,EAChDC,MAAM,KACNC,QAAQ,GAAI,IAFoC;AAQhD,MAAIA,SAASH;AACX,WAAOA;AAGT,MAAMI,eAAe;IAAC;QAAqBC,kBAAK,OAAO,mBAAA;IAAsBC,IAAI,SAACC,GAAAA;eAChFF,kBAAKH,KAAKK,CAAAA;MAENC,YACJ,MAAMC,QAAQC,IAAIN,aAAaE,IAAI,SAACK,MAAAA;eAASC,4BAAWD,IAAAA;OACxDE,UAAU,SAACC,GAAAA;WAAM,CAAC,CAACA;MACfC,QAAQX,aAAaI,QAAAA;AAC3B,MAAI,CAACO;AACH,UAAM,IAAIC,MAAM,4BAA4B;AAG9ChB,sBAAae,OACNA;AACT;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;uBAAqB,sBAErB,kBAA2B,qBAEvBA,aAAa;AAEjB,eAAsBC,4BAA4B;MAAA,EAChDC,MAAM,KACNC,QAAQ,GAAI,IAFoC;AAQhD,MAAIA,SAASH;AACX,WAAOA;AAGT,MAAMI,eAAe;IAAC;QAAqBC,uBAAK,OAAO,mBAAA;IAAsBC,IAAI,SAACC,GAAAA;eAChFF,uBAAKH,KAAKK,CAAAA;MAENC,YACJ,MAAMC,QAAQC,IAAIN,aAAaE,IAAI,SAACK,MAAAA;eAASC,4BAAWD,IAAAA;OACxDE,UAAU,SAACC,GAAAA;WAAM,CAAC,CAACA;MACfC,QAAQX,aAAaI,QAAAA;AAC3B,MAAI,CAACO;AACH,UAAM,IAAIC,MAAM,4BAA4B;AAG9ChB,sBAAae,OACNA;AACT;",
5
5
  "names": ["cachedPath", "getDefaultTamaguiConfigPath", "cwd", "cache", "defaultPaths", "join", "map", "p", "existing", "Promise", "all", "path", "pathExists", "findIndex", "x", "found", "Error"]
6
6
  }
@@ -18,7 +18,9 @@ __export(getTamaguiOptions_exports, {
18
18
  });
19
19
  module.exports = __toCommonJS(getTamaguiOptions_exports);
20
20
  var import_readTamaguiOptions = require("./readTamaguiOptions");
21
- async function getTamaguiOptions({ cwd = "." }) {
21
+ async function getTamaguiOptions({
22
+ cwd = "."
23
+ }) {
22
24
  return (await (0, import_readTamaguiOptions.readTamaguiOptions)({ cwd })).options;
23
25
  }
24
26
  //# sourceMappingURL=getTamaguiOptions.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/getTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;AAEnC,eAAsB,kBAAkB,EAAE,MAAM,IAAI,GAAqB;AACvE,UAAQ,UAAM,8CAAmB,EAAE,IAAI,CAAC,GAAG;AAC7C;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAmC;AAEnC,eAAsB,kBAAkB;AAAA,EACtC,MAAM;AACR,GAA6E;AAC3E,UAAQ,UAAM,8CAAmB,EAAE,IAAI,CAAC,GAAG;AAC7C;",
5
5
  "names": []
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/Users/n8/tamagui/code/core/helpers-node/src/getTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;gCAAmC;AAEnC,eAAsBA,kBAAkB,OAA+B;MAA/B,EAAEC,MAAM,IAAG,IAAX;AACtC,UAAQ,UAAMC,8CAAmB;IAAED;EAAI,CAAA,GAAIE;AAC7C;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;gCAAmC;AAEnC,eAAsBA,kBAAkB,OAErB;MAFqB,EACtCC,MAAM,IAAG,IAD6B;AAGtC,UAAQ,UAAMC,8CAAmB;IAAED;EAAI,CAAA,GAAIE;AAC7C;",
5
5
  "names": ["getTamaguiOptions", "cwd", "readTamaguiOptions", "options"]
6
6
  }
@@ -23,13 +23,13 @@ __export(readTamaguiOptions_exports, {
23
23
  readTamaguiOptions: () => readTamaguiOptions
24
24
  });
25
25
  module.exports = __toCommonJS(readTamaguiOptions_exports);
26
- var import_path = require("path"),
26
+ var import_node_path = require("node:path"),
27
27
  import_fs_extra = require("fs-extra"),
28
28
  import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions.cjs");
29
29
  async function readTamaguiOptions({
30
30
  cwd = "."
31
31
  }) {
32
- const filePath = (0, import_path.join)(cwd, "tamagui.json");
32
+ const filePath = (0, import_node_path.join)(cwd, "tamagui.json");
33
33
  if (!(await (0, import_fs_extra.pathExists)(filePath))) return {
34
34
  exists: !1,
35
35
  options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
@@ -17,9 +17,9 @@ __export(readTamaguiOptions_exports, {
17
17
  readTamaguiOptions: () => readTamaguiOptions
18
18
  });
19
19
  module.exports = __toCommonJS(readTamaguiOptions_exports);
20
- var import_path = require("path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
20
+ var import_node_path = require("node:path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
21
21
  async function readTamaguiOptions({ cwd = "." }) {
22
- const filePath = (0, import_path.join)(cwd, "tamagui.json");
22
+ const filePath = (0, import_node_path.join)(cwd, "tamagui.json");
23
23
  if (!await (0, import_fs_extra.pathExists)(filePath))
24
24
  return {
25
25
  exists: !1,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/readTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB,iBAGrB,kBAAqC,qBAErC,kCAAyC;AAEzC,eAAsB,mBAAmB,EAAE,MAAM,IAAI,GAAoB;AACvE,QAAM,eAAW,kBAAK,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;",
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
5
  "names": []
6
6
  }
@@ -18,9 +18,9 @@ __export(readTamaguiOptions_exports, {
18
18
  readTamaguiOptions: () => readTamaguiOptions
19
19
  });
20
20
  module.exports = __toCommonJS(readTamaguiOptions_exports);
21
- var import_path = require("path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
21
+ var import_node_path = require("node:path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
22
22
  async function readTamaguiOptions(param) {
23
- var { cwd = "." } = param, filePath = (0, import_path.join)(cwd, "tamagui.json");
23
+ var { cwd = "." } = param, filePath = (0, import_node_path.join)(cwd, "tamagui.json");
24
24
  if (!await (0, import_fs_extra.pathExists)(filePath))
25
25
  return {
26
26
  exists: !1,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/Users/n8/tamagui/code/core/helpers-node/src/readTamaguiOptions.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;kBAAqB,iBAGrB,kBAAqC,qBAErC,kCAAyC;AAEzC,eAAsBA,mBAAmB,OAA8B;MAA9B,EAAEC,MAAM,IAAG,IAAX,OACjCC,eAAWC,kBAAKF,KAAK,cAAA;AAE3B,MAAI,CAAE,UAAMG,4BAAWF,QAAAA;AACrB,WAAO;MACLG,QAAQ;MACRC,SAAS,UAAMC,0DAAyB;QAAEN;MAAI,CAAA;IAChD;AAGF,MAAI;AACF,QAAMK,UAAW,UAAME,0BAASN,QAAAA;AAEhC,QAAI,CAACO,MAAMC,QAAQJ,QAAQK,UAAU;AACnC,YAAM,IAAIC,MAAM,kCAAkC;AAGpD,WAAO;MACLP,QAAQ;MACRC,SAAS;QACP,GAAI,CAACA,QAAQO,UAAW,UAAMN,0DAAyB;UAAEN;QAAI,CAAA;QAC7D,GAAGK;MACL;IACF;EACF,SAASQ,KAAU;AACjBC,mBAAQC,MAAM,+BAA+BF,IAAIG,OAAO,IAAIH,IAAII,KAAK,EAAE,GAEhE;MACLb,QAAQ;MACRC,SAAS,UAAMC,0DAAyB;QAAEN;MAAI,CAAA;IAChD;EACF;AACF;",
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;;;;uBAAqB,sBAGrB,kBAAqC,qBAErC,kCAAyC;AAEzC,eAAsBA,mBAAmB,OAA8B;MAA9B,EAAEC,MAAM,IAAG,IAAX,OAIjCC,eAAWC,uBAAKF,KAAK,cAAA;AAE3B,MAAI,CAAE,UAAMG,4BAAWF,QAAAA;AACrB,WAAO;MACLG,QAAQ;MACRC,SAAS,UAAMC,0DAAyB;QAAEN;MAAI,CAAA;IAChD;AAGF,MAAI;AACF,QAAMK,UAAW,UAAME,0BAASN,QAAAA;AAEhC,QAAI,CAACO,MAAMC,QAAQJ,QAAQK,UAAU;AACnC,YAAM,IAAIC,MAAM,kCAAkC;AAGpD,WAAO;MACLP,QAAQ;MACRC,SAAS;QACP,GAAI,CAACA,QAAQO,UAAW,UAAMN,0DAAyB;UAAEN;QAAI,CAAA;QAC7D,GAAGK;MACL;IACF;EACF,SAASQ,KAAU;AACjBC,mBAAQC,MAAM,+BAA+BF,IAAIG,OAAO,IAAIH,IAAII,KAAK,EAAE,GAEhE;MACLb,QAAQ;MACRC,SAAS,UAAMC,0DAAyB;QAAEN;MAAI,CAAA;IAChD;EACF;AACF;",
5
5
  "names": ["readTamaguiOptions", "cwd", "filePath", "join", "pathExists", "exists", "options", "getDefaultTamaguiOptions", "readJSON", "Array", "isArray", "components", "Error", "config", "err", "console", "error", "message", "stack"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/helpers-node",
3
- "version": "1.124.16",
3
+ "version": "1.124.18",
4
4
  "source": "src/index.ts",
5
5
  "types": "./types/index.d.ts",
6
6
  "main": "./dist",
@@ -16,10 +16,10 @@
16
16
  "clean:build": "tamagui-build clean:build"
17
17
  },
18
18
  "dependencies": {
19
- "@tamagui/types": "1.124.16"
19
+ "@tamagui/types": "1.124.18"
20
20
  },
21
21
  "devDependencies": {
22
- "@tamagui/build": "1.124.16",
22
+ "@tamagui/build": "1.124.18",
23
23
  "fs-extra": "^11.2.0"
24
24
  },
25
25
  "publishConfig": {
@@ -1,4 +1,4 @@
1
- import { join } from 'path'
1
+ import { join } from 'node:path'
2
2
 
3
3
  import { pathExists } from 'fs-extra'
4
4
 
@@ -11,7 +11,7 @@ export async function getDefaultTamaguiConfigPath({
11
11
  cwd?: string
12
12
  // TODO this isn't passed down / could avoid
13
13
  cache?: boolean
14
- }) {
14
+ }): Promise<string> {
15
15
  if (cache && cachedPath) {
16
16
  return cachedPath
17
17
  }
@@ -1,5 +1,7 @@
1
1
  import { readTamaguiOptions } from './readTamaguiOptions'
2
2
 
3
- export async function getTamaguiOptions({ cwd = '.' }: { cwd?: string }) {
3
+ export async function getTamaguiOptions({
4
+ cwd = '.',
5
+ }: { cwd?: string }): Promise<import('@tamagui/types/types').TamaguiOptions> {
4
6
  return (await readTamaguiOptions({ cwd })).options
5
7
  }
@@ -1,11 +1,14 @@
1
- import { join } from 'path'
1
+ import { join } from 'node:path'
2
2
 
3
3
  import type { TamaguiOptions } from '@tamagui/types'
4
4
  import { pathExists, readJSON } from 'fs-extra'
5
5
 
6
6
  import { getDefaultTamaguiOptions } from './getDefaultTamaguiOptions'
7
7
 
8
- export async function readTamaguiOptions({ cwd = '.' }: { cwd: string }) {
8
+ export async function readTamaguiOptions({ cwd = '.' }: { cwd: string }): Promise<{
9
+ exists: boolean
10
+ options: TamaguiOptions
11
+ }> {
9
12
  const filePath = join(cwd, 'tamagui.json')
10
13
 
11
14
  if (!(await pathExists(filePath))) {
@@ -1,5 +1,4 @@
1
- import type { TamaguiOptions } from '@tamagui/types';
2
- export declare function getDefaultTamaguiOptions({ cwd, }: {
3
- cwd: string;
4
- }): Promise<TamaguiOptions>;
1
+ import type { TamaguiOptions } from "@tamagui/types";
2
+ export declare function getDefaultTamaguiOptions({ cwd }: { cwd: string }): Promise<TamaguiOptions>;
3
+
5
4
  //# sourceMappingURL=getDefaultTamaguiOptions.d.ts.map
@@ -1 +1,11 @@
1
- {"version":3,"file":"getDefaultTamaguiOptions.d.ts","sourceRoot":"","sources":["../src/getDefaultTamaguiOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAIpD,wBAAsB,wBAAwB,CAAC,EAC7C,GAAS,GACV,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,OAAO,CAAC,cAAc,CAAC,CAM1B"}
1
+ {
2
+ "mappings": "AAAA,cAAc,sBAAsB,gBAAgB;AAIpD,OAAO,iBAAe,yBAAyB,EAC7C,KAGD,EAFE,EACD,YACD,IAAG,QAAQ",
3
+ "names": [],
4
+ "sources": [
5
+ "src/getDefaultTamaguiOptions.ts"
6
+ ],
7
+ "sourcesContent": [
8
+ "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
11
+ }
@@ -1,5 +1,6 @@
1
- export declare function getDefaultTamaguiConfigPath({ cwd, cache, }: {
2
- cwd?: string;
3
- cache?: boolean;
1
+ export declare function getDefaultTamaguiConfigPath({ cwd, cache }: {
2
+ cwd?: string;
3
+ cache?: boolean;
4
4
  }): Promise<string>;
5
+
5
6
  //# sourceMappingURL=getTamaguiDefaultPath.d.ts.map
@@ -1 +1,11 @@
1
- {"version":3,"file":"getTamaguiDefaultPath.d.ts","sourceRoot":"","sources":["../src/getTamaguiDefaultPath.ts"],"names":[],"mappings":"AAMA,wBAAsB,2BAA2B,CAAC,EAChD,GAAS,EACT,KAAY,GACb,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,mBAkBA"}
1
+ {
2
+ "mappings": "AAMA,OAAO,iBAAe,4BAA4B,EAChD,KACA,OAKD,EAJE;CACD;CAEA;AACD,IAAG",
3
+ "names": [],
4
+ "sources": [
5
+ "src/getTamaguiDefaultPath.ts"
6
+ ],
7
+ "sourcesContent": [
8
+ "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
11
+ }
@@ -1,4 +1,3 @@
1
- export declare function getTamaguiOptions({ cwd }: {
2
- cwd?: string;
3
- }): Promise<import("@tamagui/types").TamaguiOptions>;
1
+ export declare function getTamaguiOptions({ cwd }: { cwd?: string }): Promise<import("@tamagui/types/types").TamaguiOptions>;
2
+
4
3
  //# sourceMappingURL=getTamaguiOptions.d.ts.map
@@ -1 +1,11 @@
1
- {"version":3,"file":"getTamaguiOptions.d.ts","sourceRoot":"","sources":["../src/getTamaguiOptions.ts"],"names":[],"mappings":"AAEA,wBAAsB,iBAAiB,CAAC,EAAE,GAAS,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,oDAEtE"}
1
+ {
2
+ "mappings": "AAEA,OAAO,iBAAe,kBAAkB,EACtC,KACiB,EAAhB,EAAE,aAAc,IAAG,eAAe,wBAAwB",
3
+ "names": [],
4
+ "sources": [
5
+ "src/getTamaguiOptions.ts"
6
+ ],
7
+ "sourcesContent": [
8
+ "import { readTamaguiOptions } from './readTamaguiOptions'\n\nexport async function getTamaguiOptions({\n cwd = '.',\n}: { cwd?: string }): Promise<import('@tamagui/types/types').TamaguiOptions> {\n return (await readTamaguiOptions({ cwd })).options\n}\n"
9
+ ],
10
+ "version": 3
11
+ }
package/types/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export * from './readTamaguiOptions';
2
- export * from './getTamaguiDefaultPath';
3
- export * from './getTamaguiOptions';
1
+ export * from "./readTamaguiOptions";
2
+ export * from "./getTamaguiDefaultPath";
3
+ export * from "./getTamaguiOptions";
4
+
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1,11 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA"}
1
+ {
2
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc",
3
+ "names": [],
4
+ "sources": [
5
+ "src/index.ts"
6
+ ],
7
+ "sourcesContent": [
8
+ "export * from './readTamaguiOptions'\nexport * from './getTamaguiDefaultPath'\nexport * from './getTamaguiOptions'\n"
9
+ ],
10
+ "version": 3
11
+ }
@@ -1,8 +1,7 @@
1
- import type { TamaguiOptions } from '@tamagui/types';
2
- export declare function readTamaguiOptions({ cwd }: {
3
- cwd: string;
4
- }): Promise<{
5
- exists: boolean;
6
- options: TamaguiOptions;
1
+ import type { TamaguiOptions } from "@tamagui/types";
2
+ export declare function readTamaguiOptions({ cwd }: { cwd: string }): Promise<{
3
+ exists: boolean;
4
+ options: TamaguiOptions;
7
5
  }>;
6
+
8
7
  //# sourceMappingURL=readTamaguiOptions.d.ts.map
@@ -1 +1,11 @@
1
- {"version":3,"file":"readTamaguiOptions.d.ts","sourceRoot":"","sources":["../src/readTamaguiOptions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAKpD,wBAAsB,kBAAkB,CAAC,EAAE,GAAS,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE;;;GAgCtE"}
1
+ {
2
+ "mappings": "AAEA,cAAc,sBAAsB,gBAAgB;AAKpD,OAAO,iBAAe,mBAAmB,EAAE,KAA4B,EAAf,EAAE,YAAa,IAAG,QAAQ;CAChF;CACA,SAAS;AACV",
3
+ "names": [],
4
+ "sources": [
5
+ "src/readTamaguiOptions.ts"
6
+ ],
7
+ "sourcesContent": [
8
+ "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
11
+ }