@tamagui/helpers-node 1.110.5 → 1.111.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/getDefaultTamaguiOptions.native.js +10 -137
- package/dist/getDefaultTamaguiOptions.native.js.map +2 -2
- package/dist/getTamaguiDefaultPath.native.js +18 -147
- package/dist/getTamaguiDefaultPath.native.js.map +2 -2
- package/dist/getTamaguiOptions.native.js +5 -133
- package/dist/getTamaguiOptions.native.js.map +1 -1
- package/dist/readTamaguiOptions.native.js +25 -211
- package/dist/readTamaguiOptions.native.js.map +2 -2
- package/package.json +3 -3
|
@@ -19,144 +19,17 @@ __export(getDefaultTamaguiOptions_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(getDefaultTamaguiOptions_exports);
|
|
21
21
|
var import_getTamaguiDefaultPath = require("./getTamaguiDefaultPath");
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return function() {
|
|
33
|
-
var self = this, args = arguments;
|
|
34
|
-
return new Promise(function(resolve, reject) {
|
|
35
|
-
var gen = fn.apply(self, args);
|
|
36
|
-
function _next(value) {
|
|
37
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
38
|
-
}
|
|
39
|
-
function _throw(err) {
|
|
40
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
41
|
-
}
|
|
42
|
-
_next(void 0);
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function _ts_generator(thisArg, body) {
|
|
47
|
-
var f, y, t, g, _ = {
|
|
48
|
-
label: 0,
|
|
49
|
-
sent: function() {
|
|
50
|
-
if (t[0] & 1) throw t[1];
|
|
51
|
-
return t[1];
|
|
52
|
-
},
|
|
53
|
-
trys: [],
|
|
54
|
-
ops: []
|
|
22
|
+
async function getDefaultTamaguiOptions(param) {
|
|
23
|
+
var { cwd = "." } = param;
|
|
24
|
+
return {
|
|
25
|
+
platform: "native",
|
|
26
|
+
components: [
|
|
27
|
+
"tamagui"
|
|
28
|
+
],
|
|
29
|
+
config: await (0, import_getTamaguiDefaultPath.getDefaultTamaguiConfigPath)({
|
|
30
|
+
cwd
|
|
31
|
+
})
|
|
55
32
|
};
|
|
56
|
-
return g = {
|
|
57
|
-
next: verb(0),
|
|
58
|
-
throw: verb(1),
|
|
59
|
-
return: verb(2)
|
|
60
|
-
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
|
61
|
-
return this;
|
|
62
|
-
}), g;
|
|
63
|
-
function verb(n) {
|
|
64
|
-
return function(v) {
|
|
65
|
-
return step([
|
|
66
|
-
n,
|
|
67
|
-
v
|
|
68
|
-
]);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function step(op) {
|
|
72
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
73
|
-
for (; _; ) try {
|
|
74
|
-
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
75
|
-
switch (y = 0, t && (op = [
|
|
76
|
-
op[0] & 2,
|
|
77
|
-
t.value
|
|
78
|
-
]), op[0]) {
|
|
79
|
-
case 0:
|
|
80
|
-
case 1:
|
|
81
|
-
t = op;
|
|
82
|
-
break;
|
|
83
|
-
case 4:
|
|
84
|
-
return _.label++, {
|
|
85
|
-
value: op[1],
|
|
86
|
-
done: !1
|
|
87
|
-
};
|
|
88
|
-
case 5:
|
|
89
|
-
_.label++, y = op[1], op = [
|
|
90
|
-
0
|
|
91
|
-
];
|
|
92
|
-
continue;
|
|
93
|
-
case 7:
|
|
94
|
-
op = _.ops.pop(), _.trys.pop();
|
|
95
|
-
continue;
|
|
96
|
-
default:
|
|
97
|
-
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
98
|
-
_ = 0;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
102
|
-
_.label = op[1];
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
106
|
-
_.label = t[1], t = op;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
if (t && _.label < t[2]) {
|
|
110
|
-
_.label = t[2], _.ops.push(op);
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
t[2] && _.ops.pop(), _.trys.pop();
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
op = body.call(thisArg, _);
|
|
117
|
-
} catch (e) {
|
|
118
|
-
op = [
|
|
119
|
-
6,
|
|
120
|
-
e
|
|
121
|
-
], y = 0;
|
|
122
|
-
} finally {
|
|
123
|
-
f = t = 0;
|
|
124
|
-
}
|
|
125
|
-
if (op[0] & 5) throw op[1];
|
|
126
|
-
return {
|
|
127
|
-
value: op[0] ? op[1] : void 0,
|
|
128
|
-
done: !0
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function getDefaultTamaguiOptions(_) {
|
|
133
|
-
return _getDefaultTamaguiOptions.apply(this, arguments);
|
|
134
|
-
}
|
|
135
|
-
function _getDefaultTamaguiOptions() {
|
|
136
|
-
return _getDefaultTamaguiOptions = _async_to_generator(function(param) {
|
|
137
|
-
var _param_cwd, cwd, _tmp;
|
|
138
|
-
return _ts_generator(this, function(_state) {
|
|
139
|
-
switch (_state.label) {
|
|
140
|
-
case 0:
|
|
141
|
-
return _param_cwd = param.cwd, cwd = _param_cwd === void 0 ? "." : _param_cwd, _tmp = {
|
|
142
|
-
platform: "native",
|
|
143
|
-
components: [
|
|
144
|
-
"tamagui"
|
|
145
|
-
]
|
|
146
|
-
}, [
|
|
147
|
-
4,
|
|
148
|
-
(0, import_getTamaguiDefaultPath.getDefaultTamaguiConfigPath)({
|
|
149
|
-
cwd
|
|
150
|
-
})
|
|
151
|
-
];
|
|
152
|
-
case 1:
|
|
153
|
-
return [
|
|
154
|
-
2,
|
|
155
|
-
(_tmp.config = _state.sent(), _tmp)
|
|
156
|
-
];
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}), _getDefaultTamaguiOptions.apply(this, arguments);
|
|
160
33
|
}
|
|
161
34
|
// Annotate the CommonJS export names for ESM import in node:
|
|
162
35
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/Users/n8/tamagui/code/core/helpers-node/src/getDefaultTamaguiOptions.ts"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["getDefaultTamaguiOptions", "cwd", "platform", "components", "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAEA;;;;;mCAA4C;AAE5C,eAAsBA,yBAAyB,OAI9C;MAJ8C,EAC7CC,MAAM,IAAG,IADoC;AAK7C,SAAO;IACLC,UAAU;IACVC,YAAY;MAAC;;IACbC,QAAQ,UAAMC,0DAA4B;MAAEJ;IAAI,CAAA;EAClD;AACF;",
|
|
5
|
+
"names": ["getDefaultTamaguiOptions", "cwd", "platform", "components", "config", "getDefaultTamaguiConfigPath"]
|
|
6
6
|
}
|
|
@@ -18,153 +18,24 @@ __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");
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
function _throw(err) {
|
|
40
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
41
|
-
}
|
|
42
|
-
_next(void 0);
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function _ts_generator(thisArg, body) {
|
|
47
|
-
var f, y, t, g, _ = {
|
|
48
|
-
label: 0,
|
|
49
|
-
sent: function() {
|
|
50
|
-
if (t[0] & 1) throw t[1];
|
|
51
|
-
return t[1];
|
|
52
|
-
},
|
|
53
|
-
trys: [],
|
|
54
|
-
ops: []
|
|
55
|
-
};
|
|
56
|
-
return g = {
|
|
57
|
-
next: verb(0),
|
|
58
|
-
throw: verb(1),
|
|
59
|
-
return: verb(2)
|
|
60
|
-
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
|
61
|
-
return this;
|
|
62
|
-
}), g;
|
|
63
|
-
function verb(n) {
|
|
64
|
-
return function(v) {
|
|
65
|
-
return step([
|
|
66
|
-
n,
|
|
67
|
-
v
|
|
68
|
-
]);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function step(op) {
|
|
72
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
73
|
-
for (; _; ) try {
|
|
74
|
-
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
75
|
-
switch (y = 0, t && (op = [
|
|
76
|
-
op[0] & 2,
|
|
77
|
-
t.value
|
|
78
|
-
]), op[0]) {
|
|
79
|
-
case 0:
|
|
80
|
-
case 1:
|
|
81
|
-
t = op;
|
|
82
|
-
break;
|
|
83
|
-
case 4:
|
|
84
|
-
return _.label++, {
|
|
85
|
-
value: op[1],
|
|
86
|
-
done: !1
|
|
87
|
-
};
|
|
88
|
-
case 5:
|
|
89
|
-
_.label++, y = op[1], op = [
|
|
90
|
-
0
|
|
91
|
-
];
|
|
92
|
-
continue;
|
|
93
|
-
case 7:
|
|
94
|
-
op = _.ops.pop(), _.trys.pop();
|
|
95
|
-
continue;
|
|
96
|
-
default:
|
|
97
|
-
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
98
|
-
_ = 0;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
102
|
-
_.label = op[1];
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
106
|
-
_.label = t[1], t = op;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
if (t && _.label < t[2]) {
|
|
110
|
-
_.label = t[2], _.ops.push(op);
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
t[2] && _.ops.pop(), _.trys.pop();
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
op = body.call(thisArg, _);
|
|
117
|
-
} catch (e) {
|
|
118
|
-
op = [
|
|
119
|
-
6,
|
|
120
|
-
e
|
|
121
|
-
], y = 0;
|
|
122
|
-
} finally {
|
|
123
|
-
f = t = 0;
|
|
124
|
-
}
|
|
125
|
-
if (op[0] & 5) throw op[1];
|
|
126
|
-
return {
|
|
127
|
-
value: op[0] ? op[1] : void 0,
|
|
128
|
-
done: !0
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
var cachedPath = "";
|
|
133
|
-
function getDefaultTamaguiConfigPath(_) {
|
|
134
|
-
return _getDefaultTamaguiConfigPath.apply(this, arguments);
|
|
135
|
-
}
|
|
136
|
-
function _getDefaultTamaguiConfigPath() {
|
|
137
|
-
return _getDefaultTamaguiConfigPath = _async_to_generator(function(param) {
|
|
138
|
-
var _param_cwd, cwd, _param_cache, cache, defaultPaths, existing, found;
|
|
139
|
-
return _ts_generator(this, function(_state) {
|
|
140
|
-
switch (_state.label) {
|
|
141
|
-
case 0:
|
|
142
|
-
return _param_cwd = param.cwd, cwd = _param_cwd === void 0 ? "." : _param_cwd, _param_cache = param.cache, cache = _param_cache === void 0 ? !0 : _param_cache, cache && cachedPath ? [
|
|
143
|
-
2,
|
|
144
|
-
cachedPath
|
|
145
|
-
] : (defaultPaths = [
|
|
146
|
-
"tamagui.config.ts",
|
|
147
|
-
(0, import_path.join)("src", "tamagui.config.ts")
|
|
148
|
-
].map(function(p) {
|
|
149
|
-
return (0, import_path.join)(cwd, p);
|
|
150
|
-
}), [
|
|
151
|
-
4,
|
|
152
|
-
Promise.all(defaultPaths.map(function(path) {
|
|
153
|
-
return (0, import_fs_extra.pathExists)(path);
|
|
154
|
-
}))
|
|
155
|
-
]);
|
|
156
|
-
case 1:
|
|
157
|
-
if (existing = _state.sent().findIndex(function(x) {
|
|
158
|
-
return !!x;
|
|
159
|
-
}), found = defaultPaths[existing], !found)
|
|
160
|
-
throw new Error("No found tamagui.config.ts");
|
|
161
|
-
return cachedPath = found, [
|
|
162
|
-
2,
|
|
163
|
-
found
|
|
164
|
-
];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
}), _getDefaultTamaguiConfigPath.apply(this, arguments);
|
|
21
|
+
var import_path = require("path"), import_fs_extra = require("fs-extra"), cachedPath = "";
|
|
22
|
+
async function getDefaultTamaguiConfigPath(param) {
|
|
23
|
+
var { cwd = ".", cache = !0 } = param;
|
|
24
|
+
if (cache && cachedPath)
|
|
25
|
+
return cachedPath;
|
|
26
|
+
var defaultPaths = [
|
|
27
|
+
"tamagui.config.ts",
|
|
28
|
+
(0, import_path.join)("src", "tamagui.config.ts")
|
|
29
|
+
].map(function(p) {
|
|
30
|
+
return (0, import_path.join)(cwd, p);
|
|
31
|
+
}), existing = (await Promise.all(defaultPaths.map(function(path) {
|
|
32
|
+
return (0, import_fs_extra.pathExists)(path);
|
|
33
|
+
}))).findIndex(function(x) {
|
|
34
|
+
return !!x;
|
|
35
|
+
}), found = defaultPaths[existing];
|
|
36
|
+
if (!found)
|
|
37
|
+
throw new Error("No found tamagui.config.ts");
|
|
38
|
+
return cachedPath = found, found;
|
|
168
39
|
}
|
|
169
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
170
41
|
0 && (module.exports = {
|
|
@@ -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": "
|
|
5
|
-
"names": ["cachedPath", "getDefaultTamaguiConfigPath", "cwd", "cache", "defaultPaths", "
|
|
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;",
|
|
5
|
+
"names": ["cachedPath", "getDefaultTamaguiConfigPath", "cwd", "cache", "defaultPaths", "join", "map", "p", "existing", "Promise", "all", "path", "pathExists", "findIndex", "x", "found", "Error"]
|
|
6
6
|
}
|
|
@@ -19,139 +19,11 @@ __export(getTamaguiOptions_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(getTamaguiOptions_exports);
|
|
21
21
|
var import_readTamaguiOptions = require("./readTamaguiOptions");
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
|
|
30
|
-
}
|
|
31
|
-
function _async_to_generator(fn) {
|
|
32
|
-
return function() {
|
|
33
|
-
var self = this, args = arguments;
|
|
34
|
-
return new Promise(function(resolve, reject) {
|
|
35
|
-
var gen = fn.apply(self, args);
|
|
36
|
-
function _next(value) {
|
|
37
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
38
|
-
}
|
|
39
|
-
function _throw(err) {
|
|
40
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
41
|
-
}
|
|
42
|
-
_next(void 0);
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function _ts_generator(thisArg, body) {
|
|
47
|
-
var f, y, t, g, _ = {
|
|
48
|
-
label: 0,
|
|
49
|
-
sent: function() {
|
|
50
|
-
if (t[0] & 1) throw t[1];
|
|
51
|
-
return t[1];
|
|
52
|
-
},
|
|
53
|
-
trys: [],
|
|
54
|
-
ops: []
|
|
55
|
-
};
|
|
56
|
-
return g = {
|
|
57
|
-
next: verb(0),
|
|
58
|
-
throw: verb(1),
|
|
59
|
-
return: verb(2)
|
|
60
|
-
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
|
61
|
-
return this;
|
|
62
|
-
}), g;
|
|
63
|
-
function verb(n) {
|
|
64
|
-
return function(v) {
|
|
65
|
-
return step([
|
|
66
|
-
n,
|
|
67
|
-
v
|
|
68
|
-
]);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
function step(op) {
|
|
72
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
73
|
-
for (; _; ) try {
|
|
74
|
-
if (f = 1, y && (t = op[0] & 2 ? y.return : op[0] ? y.throw || ((t = y.return) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
75
|
-
switch (y = 0, t && (op = [
|
|
76
|
-
op[0] & 2,
|
|
77
|
-
t.value
|
|
78
|
-
]), op[0]) {
|
|
79
|
-
case 0:
|
|
80
|
-
case 1:
|
|
81
|
-
t = op;
|
|
82
|
-
break;
|
|
83
|
-
case 4:
|
|
84
|
-
return _.label++, {
|
|
85
|
-
value: op[1],
|
|
86
|
-
done: !1
|
|
87
|
-
};
|
|
88
|
-
case 5:
|
|
89
|
-
_.label++, y = op[1], op = [
|
|
90
|
-
0
|
|
91
|
-
];
|
|
92
|
-
continue;
|
|
93
|
-
case 7:
|
|
94
|
-
op = _.ops.pop(), _.trys.pop();
|
|
95
|
-
continue;
|
|
96
|
-
default:
|
|
97
|
-
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
98
|
-
_ = 0;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
102
|
-
_.label = op[1];
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
106
|
-
_.label = t[1], t = op;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
if (t && _.label < t[2]) {
|
|
110
|
-
_.label = t[2], _.ops.push(op);
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
t[2] && _.ops.pop(), _.trys.pop();
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
op = body.call(thisArg, _);
|
|
117
|
-
} catch (e) {
|
|
118
|
-
op = [
|
|
119
|
-
6,
|
|
120
|
-
e
|
|
121
|
-
], y = 0;
|
|
122
|
-
} finally {
|
|
123
|
-
f = t = 0;
|
|
124
|
-
}
|
|
125
|
-
if (op[0] & 5) throw op[1];
|
|
126
|
-
return {
|
|
127
|
-
value: op[0] ? op[1] : void 0,
|
|
128
|
-
done: !0
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function getTamaguiOptions(_) {
|
|
133
|
-
return _getTamaguiOptions.apply(this, arguments);
|
|
134
|
-
}
|
|
135
|
-
function _getTamaguiOptions() {
|
|
136
|
-
return _getTamaguiOptions = _async_to_generator(function(param) {
|
|
137
|
-
var _param_cwd, cwd;
|
|
138
|
-
return _ts_generator(this, function(_state) {
|
|
139
|
-
switch (_state.label) {
|
|
140
|
-
case 0:
|
|
141
|
-
return _param_cwd = param.cwd, cwd = _param_cwd === void 0 ? "." : _param_cwd, [
|
|
142
|
-
4,
|
|
143
|
-
(0, import_readTamaguiOptions.readTamaguiOptions)({
|
|
144
|
-
cwd
|
|
145
|
-
})
|
|
146
|
-
];
|
|
147
|
-
case 1:
|
|
148
|
-
return [
|
|
149
|
-
2,
|
|
150
|
-
_state.sent().options
|
|
151
|
-
];
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
}), _getTamaguiOptions.apply(this, arguments);
|
|
22
|
+
async function getTamaguiOptions(param) {
|
|
23
|
+
var { cwd = "." } = param;
|
|
24
|
+
return (await (0, import_readTamaguiOptions.readTamaguiOptions)({
|
|
25
|
+
cwd
|
|
26
|
+
})).options;
|
|
155
27
|
}
|
|
156
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
157
29
|
0 && (module.exports = {
|
|
@@ -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": "
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;gCAAmC;AAEnC,eAAsBA,kBAAkB,OAA+B;MAA/B,EAAEC,MAAM,IAAG,IAAX;AACtC,UAAQ,UAAMC,8CAAmB;IAAED;EAAI,CAAA,GAAIE;AAC7C;",
|
|
5
5
|
"names": ["getTamaguiOptions", "cwd", "readTamaguiOptions", "options"]
|
|
6
6
|
}
|
|
@@ -19,223 +19,37 @@ __export(readTamaguiOptions_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(readTamaguiOptions_exports);
|
|
21
21
|
var import_path = require("path"), import_fs_extra = require("fs-extra"), import_getDefaultTamaguiOptions = require("./getDefaultTamaguiOptions");
|
|
22
|
-
function
|
|
22
|
+
async function readTamaguiOptions(param) {
|
|
23
|
+
var { cwd = "." } = param, filePath = (0, import_path.join)(cwd, "tamagui.json");
|
|
24
|
+
if (!await (0, import_fs_extra.pathExists)(filePath))
|
|
25
|
+
return {
|
|
26
|
+
exists: !1,
|
|
27
|
+
options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
|
|
28
|
+
cwd
|
|
29
|
+
})
|
|
30
|
+
};
|
|
23
31
|
try {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return new Promise(function(resolve, reject) {
|
|
35
|
-
var gen = fn.apply(self, args);
|
|
36
|
-
function _next(value) {
|
|
37
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
38
|
-
}
|
|
39
|
-
function _throw(err) {
|
|
40
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
32
|
+
var options = await (0, import_fs_extra.readJSON)(filePath);
|
|
33
|
+
if (!Array.isArray(options.components))
|
|
34
|
+
throw new Error("Invalid components: not string[]");
|
|
35
|
+
return {
|
|
36
|
+
exists: !0,
|
|
37
|
+
options: {
|
|
38
|
+
...!options.config && await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
|
|
39
|
+
cwd
|
|
40
|
+
}),
|
|
41
|
+
...options
|
|
41
42
|
}
|
|
42
|
-
_next(void 0);
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function _define_property(obj, key, value) {
|
|
47
|
-
return key in obj ? Object.defineProperty(obj, key, {
|
|
48
|
-
value,
|
|
49
|
-
enumerable: !0,
|
|
50
|
-
configurable: !0,
|
|
51
|
-
writable: !0
|
|
52
|
-
}) : obj[key] = value, obj;
|
|
53
|
-
}
|
|
54
|
-
function _object_spread(target) {
|
|
55
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
56
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
57
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
58
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
59
|
-
}))), ownKeys.forEach(function(key) {
|
|
60
|
-
_define_property(target, key, source[key]);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
return target;
|
|
64
|
-
}
|
|
65
|
-
function _ts_generator(thisArg, body) {
|
|
66
|
-
var f, y, t, g, _ = {
|
|
67
|
-
label: 0,
|
|
68
|
-
sent: function() {
|
|
69
|
-
if (t[0] & 1) throw t[1];
|
|
70
|
-
return t[1];
|
|
71
|
-
},
|
|
72
|
-
trys: [],
|
|
73
|
-
ops: []
|
|
74
|
-
};
|
|
75
|
-
return g = {
|
|
76
|
-
next: verb(0),
|
|
77
|
-
throw: verb(1),
|
|
78
|
-
return: verb(2)
|
|
79
|
-
}, typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
|
80
|
-
return this;
|
|
81
|
-
}), g;
|
|
82
|
-
function verb(n) {
|
|
83
|
-
return function(v) {
|
|
84
|
-
return step([
|
|
85
|
-
n,
|
|
86
|
-
v
|
|
87
|
-
]);
|
|
88
43
|
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
op[0] & 2,
|
|
96
|
-
t.value
|
|
97
|
-
]), op[0]) {
|
|
98
|
-
case 0:
|
|
99
|
-
case 1:
|
|
100
|
-
t = op;
|
|
101
|
-
break;
|
|
102
|
-
case 4:
|
|
103
|
-
return _.label++, {
|
|
104
|
-
value: op[1],
|
|
105
|
-
done: !1
|
|
106
|
-
};
|
|
107
|
-
case 5:
|
|
108
|
-
_.label++, y = op[1], op = [
|
|
109
|
-
0
|
|
110
|
-
];
|
|
111
|
-
continue;
|
|
112
|
-
case 7:
|
|
113
|
-
op = _.ops.pop(), _.trys.pop();
|
|
114
|
-
continue;
|
|
115
|
-
default:
|
|
116
|
-
if (t = _.trys, !(t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
117
|
-
_ = 0;
|
|
118
|
-
continue;
|
|
119
|
-
}
|
|
120
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
121
|
-
_.label = op[1];
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
125
|
-
_.label = t[1], t = op;
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
if (t && _.label < t[2]) {
|
|
129
|
-
_.label = t[2], _.ops.push(op);
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
t[2] && _.ops.pop(), _.trys.pop();
|
|
133
|
-
continue;
|
|
134
|
-
}
|
|
135
|
-
op = body.call(thisArg, _);
|
|
136
|
-
} catch (e) {
|
|
137
|
-
op = [
|
|
138
|
-
6,
|
|
139
|
-
e
|
|
140
|
-
], y = 0;
|
|
141
|
-
} finally {
|
|
142
|
-
f = t = 0;
|
|
143
|
-
}
|
|
144
|
-
if (op[0] & 5) throw op[1];
|
|
145
|
-
return {
|
|
146
|
-
value: op[0] ? op[1] : void 0,
|
|
147
|
-
done: !0
|
|
44
|
+
} catch (err) {
|
|
45
|
+
return console.error(`Error reading tamagui.json: ${err.message} ${err.stack}`), {
|
|
46
|
+
exists: !1,
|
|
47
|
+
options: await (0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
|
|
48
|
+
cwd
|
|
49
|
+
})
|
|
148
50
|
};
|
|
149
51
|
}
|
|
150
52
|
}
|
|
151
|
-
function readTamaguiOptions(_) {
|
|
152
|
-
return _readTamaguiOptions.apply(this, arguments);
|
|
153
|
-
}
|
|
154
|
-
function _readTamaguiOptions() {
|
|
155
|
-
return _readTamaguiOptions = _async_to_generator(function(param) {
|
|
156
|
-
var _param_cwd, cwd, filePath, _tmp, options, _tmp1, _tmp2, _tmp3, err, _tmp4;
|
|
157
|
-
return _ts_generator(this, function(_state) {
|
|
158
|
-
switch (_state.label) {
|
|
159
|
-
case 0:
|
|
160
|
-
return _param_cwd = param.cwd, cwd = _param_cwd === void 0 ? "." : _param_cwd, filePath = (0, import_path.join)(cwd, "tamagui.json"), [
|
|
161
|
-
4,
|
|
162
|
-
(0, import_fs_extra.pathExists)(filePath)
|
|
163
|
-
];
|
|
164
|
-
case 1:
|
|
165
|
-
return _state.sent() ? [
|
|
166
|
-
3,
|
|
167
|
-
3
|
|
168
|
-
] : (_tmp = {
|
|
169
|
-
exists: !1
|
|
170
|
-
}, [
|
|
171
|
-
4,
|
|
172
|
-
(0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
|
|
173
|
-
cwd
|
|
174
|
-
})
|
|
175
|
-
]);
|
|
176
|
-
case 2:
|
|
177
|
-
return [
|
|
178
|
-
2,
|
|
179
|
-
(_tmp.options = _state.sent(), _tmp)
|
|
180
|
-
];
|
|
181
|
-
case 3:
|
|
182
|
-
return _state.trys.push([
|
|
183
|
-
3,
|
|
184
|
-
7,
|
|
185
|
-
,
|
|
186
|
-
9
|
|
187
|
-
]), [
|
|
188
|
-
4,
|
|
189
|
-
(0, import_fs_extra.readJSON)(filePath)
|
|
190
|
-
];
|
|
191
|
-
case 4:
|
|
192
|
-
if (options = _state.sent(), !Array.isArray(options.components))
|
|
193
|
-
throw new Error("Invalid components: not string[]");
|
|
194
|
-
return _tmp1 = {
|
|
195
|
-
exists: !0
|
|
196
|
-
}, _tmp2 = [
|
|
197
|
-
{}
|
|
198
|
-
], _tmp3 = !options.config, _tmp3 ? [
|
|
199
|
-
4,
|
|
200
|
-
(0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
|
|
201
|
-
cwd
|
|
202
|
-
})
|
|
203
|
-
] : [
|
|
204
|
-
3,
|
|
205
|
-
6
|
|
206
|
-
];
|
|
207
|
-
case 5:
|
|
208
|
-
_tmp3 = _state.sent(), _state.label = 6;
|
|
209
|
-
case 6:
|
|
210
|
-
return [
|
|
211
|
-
2,
|
|
212
|
-
(_tmp1.options = _object_spread.apply(void 0, _tmp2.concat([
|
|
213
|
-
_tmp3,
|
|
214
|
-
options
|
|
215
|
-
])), _tmp1)
|
|
216
|
-
];
|
|
217
|
-
case 7:
|
|
218
|
-
return err = _state.sent(), console.error("Error reading tamagui.json: ".concat(err.message, " ").concat(err.stack)), _tmp4 = {
|
|
219
|
-
exists: !1
|
|
220
|
-
}, [
|
|
221
|
-
4,
|
|
222
|
-
(0, import_getDefaultTamaguiOptions.getDefaultTamaguiOptions)({
|
|
223
|
-
cwd
|
|
224
|
-
})
|
|
225
|
-
];
|
|
226
|
-
case 8:
|
|
227
|
-
return [
|
|
228
|
-
2,
|
|
229
|
-
(_tmp4.options = _state.sent(), _tmp4)
|
|
230
|
-
];
|
|
231
|
-
case 9:
|
|
232
|
-
return [
|
|
233
|
-
2
|
|
234
|
-
];
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
}), _readTamaguiOptions.apply(this, arguments);
|
|
238
|
-
}
|
|
239
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
240
54
|
0 && (module.exports = {
|
|
241
55
|
readTamaguiOptions
|
|
@@ -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": "
|
|
5
|
-
"names": ["readTamaguiOptions", "cwd", "filePath", "
|
|
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;",
|
|
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.
|
|
3
|
+
"version": "1.111.1",
|
|
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.
|
|
19
|
+
"@tamagui/types": "1.111.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@tamagui/build": "1.
|
|
22
|
+
"@tamagui/build": "1.111.1",
|
|
23
23
|
"fs-extra": "^11.2.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|