@tamagui/helpers-node 1.114.4 → 1.115.0

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,28 +3,35 @@ 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)
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);
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, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
15
21
  var getDefaultTamaguiOptions_exports = {};
16
22
  __export(getDefaultTamaguiOptions_exports, {
17
23
  getDefaultTamaguiOptions: () => getDefaultTamaguiOptions
18
24
  });
19
25
  module.exports = __toCommonJS(getDefaultTamaguiOptions_exports);
20
- var import_getTamaguiDefaultPath = require("./getTamaguiDefaultPath");
26
+ var import_getTamaguiDefaultPath = require("./getTamaguiDefaultPath.cjs");
21
27
  async function getDefaultTamaguiOptions({
22
28
  cwd = "."
23
29
  }) {
24
30
  return {
25
31
  platform: "native",
26
32
  components: ["tamagui"],
27
- config: await (0, import_getTamaguiDefaultPath.getDefaultTamaguiConfigPath)({ cwd })
33
+ config: await (0, import_getTamaguiDefaultPath.getDefaultTamaguiConfigPath)({
34
+ cwd
35
+ })
28
36
  };
29
- }
30
- //# sourceMappingURL=getDefaultTamaguiOptions.js.map
37
+ }
@@ -0,0 +1,39 @@
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: !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, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var getTamaguiDefaultPath_exports = {};
22
+ __export(getTamaguiDefaultPath_exports, {
23
+ getDefaultTamaguiConfigPath: () => getDefaultTamaguiConfigPath
24
+ });
25
+ module.exports = __toCommonJS(getTamaguiDefaultPath_exports);
26
+ var import_path = require("path"),
27
+ import_fs_extra = require("fs-extra");
28
+ let cachedPath = "";
29
+ async function getDefaultTamaguiConfigPath({
30
+ cwd = ".",
31
+ cache = !0
32
+ }) {
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)),
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;
39
+ }
@@ -0,0 +1,33 @@
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: !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, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var getTamaguiOptions_exports = {};
22
+ __export(getTamaguiOptions_exports, {
23
+ getTamaguiOptions: () => getTamaguiOptions
24
+ });
25
+ module.exports = __toCommonJS(getTamaguiOptions_exports);
26
+ var import_readTamaguiOptions = require("./readTamaguiOptions.cjs");
27
+ async function getTamaguiOptions({
28
+ cwd = "."
29
+ }) {
30
+ return (await (0, import_readTamaguiOptions.readTamaguiOptions)({
31
+ cwd
32
+ })).options;
33
+ }
package/dist/index.cjs ADDED
@@ -0,0 +1,20 @@
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") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
+ get: () => from[key],
8
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
+ });
10
+ return to;
11
+ },
12
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
+ value: !0
15
+ }), mod);
16
+ var src_exports = {};
17
+ module.exports = __toCommonJS(src_exports);
18
+ __reExport(src_exports, require("./readTamaguiOptions.cjs"), module.exports);
19
+ __reExport(src_exports, require("./getTamaguiDefaultPath.cjs"), module.exports);
20
+ __reExport(src_exports, require("./getTamaguiOptions.cjs"), module.exports);
@@ -0,0 +1,59 @@
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: !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, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
21
+ var readTamaguiOptions_exports = {};
22
+ __export(readTamaguiOptions_exports, {
23
+ readTamaguiOptions: () => readTamaguiOptions
24
+ });
25
+ module.exports = __toCommonJS(readTamaguiOptions_exports);
26
+ var import_path = require("path"),
27
+ import_fs_extra = require("fs-extra"),
28
+ import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions.cjs");
29
+ async function readTamaguiOptions({
30
+ cwd = "."
31
+ }) {
32
+ const filePath = (0, import_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
+ };
39
+ try {
40
+ const options = await (0, import_fs_extra.readJSON)(filePath);
41
+ if (!Array.isArray(options.components)) throw new Error("Invalid components: not string[]");
42
+ return {
43
+ exists: !0,
44
+ options: {
45
+ ...(!options.config && (await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
46
+ cwd
47
+ }))),
48
+ ...options
49
+ }
50
+ };
51
+ } catch (err) {
52
+ return console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`), {
53
+ exists: !1,
54
+ options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
55
+ cwd
56
+ })
57
+ };
58
+ }
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/helpers-node",
3
- "version": "1.114.4",
3
+ "version": "1.115.0",
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.114.4"
19
+ "@tamagui/types": "1.115.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@tamagui/build": "1.114.4",
22
+ "@tamagui/build": "1.115.0",
23
23
  "fs-extra": "^11.2.0"
24
24
  },
25
25
  "publishConfig": {
@@ -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_path = require("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_path.join)("src", "tamagui.config.ts")].map(
29
- (p) => (0, import_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,24 +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({ cwd = "." }) {
22
- return (await (0, import_readTamaguiOptions.readTamaguiOptions)({ cwd })).options;
23
- }
24
- //# sourceMappingURL=getTamaguiOptions.js.map
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 src_exports = {};
13
- module.exports = __toCommonJS(src_exports);
14
- __reExport(src_exports, require("./readTamaguiOptions"), module.exports);
15
- __reExport(src_exports, require("./getTamaguiDefaultPath"), module.exports);
16
- __reExport(src_exports, require("./getTamaguiOptions"), module.exports);
17
- //# sourceMappingURL=index.js.map
@@ -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_path = require("path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
21
- async function readTamaguiOptions({ cwd = "." }) {
22
- const filePath = (0, import_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
File without changes