@tamagui/static-worker 1.136.6 → 1.136.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +181 -0
- package/dist/cjs/index.js +155 -0
- package/dist/cjs/index.js.map +6 -0
- package/dist/esm/index.js +132 -0
- package/dist/esm/index.js.map +6 -0
- package/dist/esm/index.mjs +138 -0
- package/dist/esm/index.mjs.map +1 -0
- package/package.json +8 -7
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
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, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
32
|
+
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
|
+
clearWorkerCache: () => clearWorkerCache,
|
|
35
|
+
destroyPool: () => destroyPool,
|
|
36
|
+
extractToClassNames: () => extractToClassNames,
|
|
37
|
+
extractToNative: () => extractToNative,
|
|
38
|
+
getPoolStats: () => getPoolStats,
|
|
39
|
+
getPragmaOptions: () => getPragmaOptions,
|
|
40
|
+
loadTamagui: () => loadTamagui,
|
|
41
|
+
loadTamaguiBuildConfig: () => loadTamaguiBuildConfig,
|
|
42
|
+
watchTamaguiConfig: () => watchTamaguiConfig
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(index_exports);
|
|
45
|
+
var import_node_url = require("node:url"),
|
|
46
|
+
import_piscina = __toESM(require("piscina"), 1);
|
|
47
|
+
const import_meta = {},
|
|
48
|
+
getPragmaOptions = async props => {
|
|
49
|
+
const {
|
|
50
|
+
default: Static
|
|
51
|
+
} = await import("@tamagui/static");
|
|
52
|
+
return Static.getPragmaOptions(props);
|
|
53
|
+
},
|
|
54
|
+
getWorkerPath = () => typeof import_meta < "u" && import_meta.url ? (0, import_node_url.fileURLToPath)(import_meta.resolve("@tamagui/static/worker")).replace(/\.mjs$/, ".js") : require.resolve("@tamagui/static/worker").replace(/\.mjs$/, ".js");
|
|
55
|
+
let piscinaPool = null,
|
|
56
|
+
isClosing = !1;
|
|
57
|
+
function getPool() {
|
|
58
|
+
return piscinaPool || (piscinaPool = new import_piscina.default({
|
|
59
|
+
filename: getWorkerPath(),
|
|
60
|
+
// Single worker for state consistency and simpler caching
|
|
61
|
+
minThreads: 1,
|
|
62
|
+
maxThreads: 1,
|
|
63
|
+
idleTimeout: 6e4
|
|
64
|
+
// 60s - keep alive for config watching
|
|
65
|
+
})), piscinaPool;
|
|
66
|
+
}
|
|
67
|
+
async function loadTamagui(options) {
|
|
68
|
+
const pool = getPool(),
|
|
69
|
+
task = {
|
|
70
|
+
type: "extractToClassNames",
|
|
71
|
+
source: "// dummy",
|
|
72
|
+
sourcePath: "__dummy__.tsx",
|
|
73
|
+
options: {
|
|
74
|
+
components: ["tamagui"],
|
|
75
|
+
...options
|
|
76
|
+
},
|
|
77
|
+
shouldPrintDebug: !1
|
|
78
|
+
};
|
|
79
|
+
try {
|
|
80
|
+
return await pool.run(task, {
|
|
81
|
+
name: "runTask"
|
|
82
|
+
}), {
|
|
83
|
+
success: !0
|
|
84
|
+
};
|
|
85
|
+
} catch (error) {
|
|
86
|
+
throw console.error("[static-worker] Error loading Tamagui config:", error), error;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async function extractToClassNames(params) {
|
|
90
|
+
const {
|
|
91
|
+
source,
|
|
92
|
+
sourcePath = "",
|
|
93
|
+
options,
|
|
94
|
+
shouldPrintDebug = !1
|
|
95
|
+
} = params;
|
|
96
|
+
if (typeof source != "string") throw new Error("`source` must be a string of javascript");
|
|
97
|
+
const task = {
|
|
98
|
+
type: "extractToClassNames",
|
|
99
|
+
source,
|
|
100
|
+
sourcePath,
|
|
101
|
+
options,
|
|
102
|
+
shouldPrintDebug
|
|
103
|
+
},
|
|
104
|
+
result = await getPool().run(task, {
|
|
105
|
+
name: "runTask"
|
|
106
|
+
});
|
|
107
|
+
if (!result.success) {
|
|
108
|
+
const errorMessage = [`[tamagui-extract] Error processing file: ${sourcePath || "(unknown)"}`, "", result.error, result.stack ? `
|
|
109
|
+
${result.stack}` : ""].filter(Boolean).join(`
|
|
110
|
+
`);
|
|
111
|
+
throw new Error(errorMessage);
|
|
112
|
+
}
|
|
113
|
+
return result.data;
|
|
114
|
+
}
|
|
115
|
+
async function extractToNative(sourceFileName, sourceCode, options) {
|
|
116
|
+
const task = {
|
|
117
|
+
type: "extractToNative",
|
|
118
|
+
sourceFileName,
|
|
119
|
+
sourceCode,
|
|
120
|
+
options
|
|
121
|
+
},
|
|
122
|
+
result = await getPool().run(task, {
|
|
123
|
+
name: "runTask"
|
|
124
|
+
});
|
|
125
|
+
if (!result.success) {
|
|
126
|
+
const errorMessage = [`[tamagui-extract] Error processing file: ${sourceFileName || "(unknown)"}`, "", result.error, result.stack ? `
|
|
127
|
+
${result.stack}` : ""].filter(Boolean).join(`
|
|
128
|
+
`);
|
|
129
|
+
throw new Error(errorMessage);
|
|
130
|
+
}
|
|
131
|
+
return result.data;
|
|
132
|
+
}
|
|
133
|
+
async function watchTamaguiConfig(options) {
|
|
134
|
+
const {
|
|
135
|
+
default: Static
|
|
136
|
+
} = await import("@tamagui/static"),
|
|
137
|
+
watcher = await Static.watchTamaguiConfig(options);
|
|
138
|
+
if (!watcher) return;
|
|
139
|
+
const originalDispose = watcher.dispose;
|
|
140
|
+
return {
|
|
141
|
+
dispose: () => {
|
|
142
|
+
originalDispose(), piscinaPool && clearWorkerCache();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
async function loadTamaguiBuildConfig(tamaguiOptions) {
|
|
147
|
+
const {
|
|
148
|
+
default: Static
|
|
149
|
+
} = await import("@tamagui/static");
|
|
150
|
+
return Static.loadTamaguiBuildConfigSync(tamaguiOptions);
|
|
151
|
+
}
|
|
152
|
+
async function clearWorkerCache() {
|
|
153
|
+
if (!piscinaPool || isClosing) return;
|
|
154
|
+
const task = {
|
|
155
|
+
type: "clearCache"
|
|
156
|
+
};
|
|
157
|
+
await piscinaPool.run(task, {
|
|
158
|
+
name: "runTask"
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
async function destroyPool() {
|
|
162
|
+
if (piscinaPool) {
|
|
163
|
+
isClosing = !0;
|
|
164
|
+
try {
|
|
165
|
+
await piscinaPool.destroy();
|
|
166
|
+
} catch (err) {
|
|
167
|
+
if (err && typeof err == "object" && "message" in err && !String(err.message).includes("Terminating worker thread")) throw err;
|
|
168
|
+
} finally {
|
|
169
|
+
piscinaPool = null, isClosing = !1;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function getPoolStats() {
|
|
174
|
+
return piscinaPool ? {
|
|
175
|
+
threads: piscinaPool.threads.length,
|
|
176
|
+
queueSize: piscinaPool.queueSize,
|
|
177
|
+
completed: piscinaPool.completed,
|
|
178
|
+
duration: piscinaPool.duration,
|
|
179
|
+
utilization: piscinaPool.utilization
|
|
180
|
+
} : null;
|
|
181
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
clearWorkerCache: () => clearWorkerCache,
|
|
26
|
+
destroyPool: () => destroyPool,
|
|
27
|
+
extractToClassNames: () => extractToClassNames,
|
|
28
|
+
extractToNative: () => extractToNative,
|
|
29
|
+
getPoolStats: () => getPoolStats,
|
|
30
|
+
getPragmaOptions: () => getPragmaOptions,
|
|
31
|
+
loadTamagui: () => loadTamagui,
|
|
32
|
+
loadTamaguiBuildConfig: () => loadTamaguiBuildConfig,
|
|
33
|
+
watchTamaguiConfig: () => watchTamaguiConfig
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
var import_node_url = require("node:url"), import_piscina = __toESM(require("piscina"), 1);
|
|
37
|
+
const import_meta = {}, getPragmaOptions = async (props) => {
|
|
38
|
+
const { default: Static } = await import("@tamagui/static");
|
|
39
|
+
return Static.getPragmaOptions(props);
|
|
40
|
+
}, getWorkerPath = () => typeof import_meta < "u" && import_meta.url ? (0, import_node_url.fileURLToPath)(import_meta.resolve("@tamagui/static/worker")).replace(/\.mjs$/, ".js") : require.resolve("@tamagui/static/worker").replace(/\.mjs$/, ".js");
|
|
41
|
+
let piscinaPool = null, isClosing = !1;
|
|
42
|
+
function getPool() {
|
|
43
|
+
return piscinaPool || (piscinaPool = new import_piscina.default({
|
|
44
|
+
filename: getWorkerPath(),
|
|
45
|
+
// Single worker for state consistency and simpler caching
|
|
46
|
+
minThreads: 1,
|
|
47
|
+
maxThreads: 1,
|
|
48
|
+
idleTimeout: 6e4
|
|
49
|
+
// 60s - keep alive for config watching
|
|
50
|
+
})), piscinaPool;
|
|
51
|
+
}
|
|
52
|
+
async function loadTamagui(options) {
|
|
53
|
+
const pool = getPool(), task = {
|
|
54
|
+
type: "extractToClassNames",
|
|
55
|
+
source: "// dummy",
|
|
56
|
+
sourcePath: "__dummy__.tsx",
|
|
57
|
+
options: {
|
|
58
|
+
components: ["tamagui"],
|
|
59
|
+
...options
|
|
60
|
+
},
|
|
61
|
+
shouldPrintDebug: !1
|
|
62
|
+
};
|
|
63
|
+
try {
|
|
64
|
+
return await pool.run(task, { name: "runTask" }), { success: !0 };
|
|
65
|
+
} catch (error) {
|
|
66
|
+
throw console.error("[static-worker] Error loading Tamagui config:", error), error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function extractToClassNames(params) {
|
|
70
|
+
const { source, sourcePath = "", options, shouldPrintDebug = !1 } = params;
|
|
71
|
+
if (typeof source != "string")
|
|
72
|
+
throw new Error("`source` must be a string of javascript");
|
|
73
|
+
const task = {
|
|
74
|
+
type: "extractToClassNames",
|
|
75
|
+
source,
|
|
76
|
+
sourcePath,
|
|
77
|
+
options,
|
|
78
|
+
shouldPrintDebug
|
|
79
|
+
}, result = await getPool().run(task, { name: "runTask" });
|
|
80
|
+
if (!result.success) {
|
|
81
|
+
const errorMessage = [
|
|
82
|
+
`[tamagui-extract] Error processing file: ${sourcePath || "(unknown)"}`,
|
|
83
|
+
"",
|
|
84
|
+
result.error,
|
|
85
|
+
result.stack ? `
|
|
86
|
+
${result.stack}` : ""
|
|
87
|
+
].filter(Boolean).join(`
|
|
88
|
+
`);
|
|
89
|
+
throw new Error(errorMessage);
|
|
90
|
+
}
|
|
91
|
+
return result.data;
|
|
92
|
+
}
|
|
93
|
+
async function extractToNative(sourceFileName, sourceCode, options) {
|
|
94
|
+
const task = {
|
|
95
|
+
type: "extractToNative",
|
|
96
|
+
sourceFileName,
|
|
97
|
+
sourceCode,
|
|
98
|
+
options
|
|
99
|
+
}, result = await getPool().run(task, { name: "runTask" });
|
|
100
|
+
if (!result.success) {
|
|
101
|
+
const errorMessage = [
|
|
102
|
+
`[tamagui-extract] Error processing file: ${sourceFileName || "(unknown)"}`,
|
|
103
|
+
"",
|
|
104
|
+
result.error,
|
|
105
|
+
result.stack ? `
|
|
106
|
+
${result.stack}` : ""
|
|
107
|
+
].filter(Boolean).join(`
|
|
108
|
+
`);
|
|
109
|
+
throw new Error(errorMessage);
|
|
110
|
+
}
|
|
111
|
+
return result.data;
|
|
112
|
+
}
|
|
113
|
+
async function watchTamaguiConfig(options) {
|
|
114
|
+
const { default: Static } = await import("@tamagui/static"), watcher = await Static.watchTamaguiConfig(options);
|
|
115
|
+
if (!watcher)
|
|
116
|
+
return;
|
|
117
|
+
const originalDispose = watcher.dispose;
|
|
118
|
+
return {
|
|
119
|
+
dispose: () => {
|
|
120
|
+
originalDispose(), piscinaPool && clearWorkerCache();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
async function loadTamaguiBuildConfig(tamaguiOptions) {
|
|
125
|
+
const { default: Static } = await import("@tamagui/static");
|
|
126
|
+
return Static.loadTamaguiBuildConfigSync(tamaguiOptions);
|
|
127
|
+
}
|
|
128
|
+
async function clearWorkerCache() {
|
|
129
|
+
if (!piscinaPool || isClosing) return;
|
|
130
|
+
const task = { type: "clearCache" };
|
|
131
|
+
await piscinaPool.run(task, { name: "runTask" });
|
|
132
|
+
}
|
|
133
|
+
async function destroyPool() {
|
|
134
|
+
if (piscinaPool) {
|
|
135
|
+
isClosing = !0;
|
|
136
|
+
try {
|
|
137
|
+
await piscinaPool.destroy();
|
|
138
|
+
} catch (err) {
|
|
139
|
+
if (err && typeof err == "object" && "message" in err && !String(err.message).includes("Terminating worker thread"))
|
|
140
|
+
throw err;
|
|
141
|
+
} finally {
|
|
142
|
+
piscinaPool = null, isClosing = !1;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function getPoolStats() {
|
|
147
|
+
return piscinaPool ? {
|
|
148
|
+
threads: piscinaPool.threads.length,
|
|
149
|
+
queueSize: piscinaPool.queueSize,
|
|
150
|
+
completed: piscinaPool.completed,
|
|
151
|
+
duration: piscinaPool.duration,
|
|
152
|
+
utilization: piscinaPool.utilization
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AAA,IACL,SAAS,MAAM;AACb,sBAAgB,GACZ,eAEF,iBAAiB;AAAA,IAErB;AAAA,EACF;AACF;AAMA,eAAsB,uBACpB,gBACyB;AAEzB,QAAM,EAAE,SAAS,OAAO,IAAI,MAAM,OAAO,iBAAiB;AAE1D,SAAO,OAAO,2BAA2B,cAAc;AACzD;AAMA,eAAsB,mBAAkC;AACtD,MAAI,CAAC,eAAe,UAAW;AAE/B,QAAM,OAAO,EAAE,MAAM,aAAa;AAClC,QAAM,YAAY,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AACjD;AAMA,eAAsB,cAA6B;AACjD,MAAI,aAAa;AACf,gBAAY;AACZ,QAAI;AACF,YAAM,YAAY,QAAQ;AAAA,IAC5B,SAAS,KAAK;AAGZ,UAAI,OAAO,OAAO,OAAQ,YAAY,aAAa,OAE7C,CADY,OAAO,IAAI,OAAO,EACrB,SAAS,2BAA2B;AAC/C,cAAM;AAAA,IAGZ,UAAE;AACA,oBAAc,MACd,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAKO,SAAS,eAAe;AAC7B,SAAK,cAGE;AAAA,IACL,SAAS,YAAY,QAAQ;AAAA,IAC7B,WAAW,YAAY;AAAA,IACvB,WAAW,YAAY;AAAA,IACvB,UAAU,YAAY;AAAA,IACtB,aAAa,YAAY;AAAA,EAC3B,IARS;AASX;",
|
|
5
|
+
"names": ["Piscina"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import Piscina from "piscina";
|
|
3
|
+
const getPragmaOptions = async (props) => {
|
|
4
|
+
const { default: Static } = await import("@tamagui/static");
|
|
5
|
+
return Static.getPragmaOptions(props);
|
|
6
|
+
}, getWorkerPath = () => typeof import.meta < "u" && import.meta.url ? fileURLToPath(import.meta.resolve("@tamagui/static/worker")).replace(/\.mjs$/, ".js") : require.resolve("@tamagui/static/worker").replace(/\.mjs$/, ".js");
|
|
7
|
+
let piscinaPool = null, isClosing = !1;
|
|
8
|
+
function getPool() {
|
|
9
|
+
return piscinaPool || (piscinaPool = new Piscina({
|
|
10
|
+
filename: getWorkerPath(),
|
|
11
|
+
// Single worker for state consistency and simpler caching
|
|
12
|
+
minThreads: 1,
|
|
13
|
+
maxThreads: 1,
|
|
14
|
+
idleTimeout: 6e4
|
|
15
|
+
// 60s - keep alive for config watching
|
|
16
|
+
})), piscinaPool;
|
|
17
|
+
}
|
|
18
|
+
async function loadTamagui(options) {
|
|
19
|
+
const pool = getPool(), task = {
|
|
20
|
+
type: "extractToClassNames",
|
|
21
|
+
source: "// dummy",
|
|
22
|
+
sourcePath: "__dummy__.tsx",
|
|
23
|
+
options: {
|
|
24
|
+
components: ["tamagui"],
|
|
25
|
+
...options
|
|
26
|
+
},
|
|
27
|
+
shouldPrintDebug: !1
|
|
28
|
+
};
|
|
29
|
+
try {
|
|
30
|
+
return await pool.run(task, { name: "runTask" }), { success: !0 };
|
|
31
|
+
} catch (error) {
|
|
32
|
+
throw console.error("[static-worker] Error loading Tamagui config:", error), error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function extractToClassNames(params) {
|
|
36
|
+
const { source, sourcePath = "", options, shouldPrintDebug = !1 } = params;
|
|
37
|
+
if (typeof source != "string")
|
|
38
|
+
throw new Error("`source` must be a string of javascript");
|
|
39
|
+
const task = {
|
|
40
|
+
type: "extractToClassNames",
|
|
41
|
+
source,
|
|
42
|
+
sourcePath,
|
|
43
|
+
options,
|
|
44
|
+
shouldPrintDebug
|
|
45
|
+
}, result = await getPool().run(task, { name: "runTask" });
|
|
46
|
+
if (!result.success) {
|
|
47
|
+
const errorMessage = [
|
|
48
|
+
`[tamagui-extract] Error processing file: ${sourcePath || "(unknown)"}`,
|
|
49
|
+
"",
|
|
50
|
+
result.error,
|
|
51
|
+
result.stack ? `
|
|
52
|
+
${result.stack}` : ""
|
|
53
|
+
].filter(Boolean).join(`
|
|
54
|
+
`);
|
|
55
|
+
throw new Error(errorMessage);
|
|
56
|
+
}
|
|
57
|
+
return result.data;
|
|
58
|
+
}
|
|
59
|
+
async function extractToNative(sourceFileName, sourceCode, options) {
|
|
60
|
+
const task = {
|
|
61
|
+
type: "extractToNative",
|
|
62
|
+
sourceFileName,
|
|
63
|
+
sourceCode,
|
|
64
|
+
options
|
|
65
|
+
}, result = await getPool().run(task, { name: "runTask" });
|
|
66
|
+
if (!result.success) {
|
|
67
|
+
const errorMessage = [
|
|
68
|
+
`[tamagui-extract] Error processing file: ${sourceFileName || "(unknown)"}`,
|
|
69
|
+
"",
|
|
70
|
+
result.error,
|
|
71
|
+
result.stack ? `
|
|
72
|
+
${result.stack}` : ""
|
|
73
|
+
].filter(Boolean).join(`
|
|
74
|
+
`);
|
|
75
|
+
throw new Error(errorMessage);
|
|
76
|
+
}
|
|
77
|
+
return result.data;
|
|
78
|
+
}
|
|
79
|
+
async function watchTamaguiConfig(options) {
|
|
80
|
+
const { default: Static } = await import("@tamagui/static"), watcher = await Static.watchTamaguiConfig(options);
|
|
81
|
+
if (!watcher)
|
|
82
|
+
return;
|
|
83
|
+
const originalDispose = watcher.dispose;
|
|
84
|
+
return {
|
|
85
|
+
dispose: () => {
|
|
86
|
+
originalDispose(), piscinaPool && clearWorkerCache();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
async function loadTamaguiBuildConfig(tamaguiOptions) {
|
|
91
|
+
const { default: Static } = await import("@tamagui/static");
|
|
92
|
+
return Static.loadTamaguiBuildConfigSync(tamaguiOptions);
|
|
93
|
+
}
|
|
94
|
+
async function clearWorkerCache() {
|
|
95
|
+
if (!piscinaPool || isClosing) return;
|
|
96
|
+
const task = { type: "clearCache" };
|
|
97
|
+
await piscinaPool.run(task, { name: "runTask" });
|
|
98
|
+
}
|
|
99
|
+
async function destroyPool() {
|
|
100
|
+
if (piscinaPool) {
|
|
101
|
+
isClosing = !0;
|
|
102
|
+
try {
|
|
103
|
+
await piscinaPool.destroy();
|
|
104
|
+
} catch (err) {
|
|
105
|
+
if (err && typeof err == "object" && "message" in err && !String(err.message).includes("Terminating worker thread"))
|
|
106
|
+
throw err;
|
|
107
|
+
} finally {
|
|
108
|
+
piscinaPool = null, isClosing = !1;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function getPoolStats() {
|
|
113
|
+
return piscinaPool ? {
|
|
114
|
+
threads: piscinaPool.threads.length,
|
|
115
|
+
queueSize: piscinaPool.queueSize,
|
|
116
|
+
completed: piscinaPool.completed,
|
|
117
|
+
duration: piscinaPool.duration,
|
|
118
|
+
utilization: piscinaPool.utilization
|
|
119
|
+
} : null;
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
clearWorkerCache,
|
|
123
|
+
destroyPool,
|
|
124
|
+
extractToClassNames,
|
|
125
|
+
extractToNative,
|
|
126
|
+
getPoolStats,
|
|
127
|
+
getPragmaOptions,
|
|
128
|
+
loadTamagui,
|
|
129
|
+
loadTamaguiBuildConfig,
|
|
130
|
+
watchTamaguiConfig
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings": "AAYA,SAAS,qBAAqB;AAC9B,OAAO,aAAa;AAQb,MAAM,mBAAmB,OAAO,UAGjC;AACJ,QAAM,EAAE,SAAS,OAAO,IAAI,MAAM,OAAO,iBAAiB;AAC1D,SAAO,OAAO,iBAAiB,KAAK;AACtC,GAGM,gBAAgB,MAGhB,OAAO,cAAgB,OAAe,YAAY,MACjC,cAAc,YAAY,QAAQ,wBAAwB,CAAC,EAE5D,QAAQ,UAAU,KAAK,IAIpC,gBAAgB,wBAAwB,EAAE,QAAQ,UAAU,KAAK;AAG1E,IAAI,cAA8B,MAC9B,YAAY;AAKhB,SAAS,UAAmB;AAC1B,SAAK,gBACH,cAAc,IAAI,QAAQ;AAAA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AA,IAC7B,WAAW,YAAY;AAAA,IACvB,WAAW,YAAY;AAAA,IACvB,UAAU,YAAY;AAAA,IACtB,aAAa,YAAY;AAAA,EAC3B,IARS;AASX;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import Piscina from "piscina";
|
|
3
|
+
const getPragmaOptions = async props => {
|
|
4
|
+
const {
|
|
5
|
+
default: Static
|
|
6
|
+
} = await import("@tamagui/static");
|
|
7
|
+
return Static.getPragmaOptions(props);
|
|
8
|
+
},
|
|
9
|
+
getWorkerPath = () => typeof import.meta < "u" && import.meta.url ? fileURLToPath(import.meta.resolve("@tamagui/static/worker")).replace(/\.mjs$/, ".js") : require.resolve("@tamagui/static/worker").replace(/\.mjs$/, ".js");
|
|
10
|
+
let piscinaPool = null,
|
|
11
|
+
isClosing = !1;
|
|
12
|
+
function getPool() {
|
|
13
|
+
return piscinaPool || (piscinaPool = new Piscina({
|
|
14
|
+
filename: getWorkerPath(),
|
|
15
|
+
// Single worker for state consistency and simpler caching
|
|
16
|
+
minThreads: 1,
|
|
17
|
+
maxThreads: 1,
|
|
18
|
+
idleTimeout: 6e4
|
|
19
|
+
// 60s - keep alive for config watching
|
|
20
|
+
})), piscinaPool;
|
|
21
|
+
}
|
|
22
|
+
async function loadTamagui(options) {
|
|
23
|
+
const pool = getPool(),
|
|
24
|
+
task = {
|
|
25
|
+
type: "extractToClassNames",
|
|
26
|
+
source: "// dummy",
|
|
27
|
+
sourcePath: "__dummy__.tsx",
|
|
28
|
+
options: {
|
|
29
|
+
components: ["tamagui"],
|
|
30
|
+
...options
|
|
31
|
+
},
|
|
32
|
+
shouldPrintDebug: !1
|
|
33
|
+
};
|
|
34
|
+
try {
|
|
35
|
+
return await pool.run(task, {
|
|
36
|
+
name: "runTask"
|
|
37
|
+
}), {
|
|
38
|
+
success: !0
|
|
39
|
+
};
|
|
40
|
+
} catch (error) {
|
|
41
|
+
throw console.error("[static-worker] Error loading Tamagui config:", error), error;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async function extractToClassNames(params) {
|
|
45
|
+
const {
|
|
46
|
+
source,
|
|
47
|
+
sourcePath = "",
|
|
48
|
+
options,
|
|
49
|
+
shouldPrintDebug = !1
|
|
50
|
+
} = params;
|
|
51
|
+
if (typeof source != "string") throw new Error("`source` must be a string of javascript");
|
|
52
|
+
const task = {
|
|
53
|
+
type: "extractToClassNames",
|
|
54
|
+
source,
|
|
55
|
+
sourcePath,
|
|
56
|
+
options,
|
|
57
|
+
shouldPrintDebug
|
|
58
|
+
},
|
|
59
|
+
result = await getPool().run(task, {
|
|
60
|
+
name: "runTask"
|
|
61
|
+
});
|
|
62
|
+
if (!result.success) {
|
|
63
|
+
const errorMessage = [`[tamagui-extract] Error processing file: ${sourcePath || "(unknown)"}`, "", result.error, result.stack ? `
|
|
64
|
+
${result.stack}` : ""].filter(Boolean).join(`
|
|
65
|
+
`);
|
|
66
|
+
throw new Error(errorMessage);
|
|
67
|
+
}
|
|
68
|
+
return result.data;
|
|
69
|
+
}
|
|
70
|
+
async function extractToNative(sourceFileName, sourceCode, options) {
|
|
71
|
+
const task = {
|
|
72
|
+
type: "extractToNative",
|
|
73
|
+
sourceFileName,
|
|
74
|
+
sourceCode,
|
|
75
|
+
options
|
|
76
|
+
},
|
|
77
|
+
result = await getPool().run(task, {
|
|
78
|
+
name: "runTask"
|
|
79
|
+
});
|
|
80
|
+
if (!result.success) {
|
|
81
|
+
const errorMessage = [`[tamagui-extract] Error processing file: ${sourceFileName || "(unknown)"}`, "", result.error, result.stack ? `
|
|
82
|
+
${result.stack}` : ""].filter(Boolean).join(`
|
|
83
|
+
`);
|
|
84
|
+
throw new Error(errorMessage);
|
|
85
|
+
}
|
|
86
|
+
return result.data;
|
|
87
|
+
}
|
|
88
|
+
async function watchTamaguiConfig(options) {
|
|
89
|
+
const {
|
|
90
|
+
default: Static
|
|
91
|
+
} = await import("@tamagui/static"),
|
|
92
|
+
watcher = await Static.watchTamaguiConfig(options);
|
|
93
|
+
if (!watcher) return;
|
|
94
|
+
const originalDispose = watcher.dispose;
|
|
95
|
+
return {
|
|
96
|
+
dispose: () => {
|
|
97
|
+
originalDispose(), piscinaPool && clearWorkerCache();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
async function loadTamaguiBuildConfig(tamaguiOptions) {
|
|
102
|
+
const {
|
|
103
|
+
default: Static
|
|
104
|
+
} = await import("@tamagui/static");
|
|
105
|
+
return Static.loadTamaguiBuildConfigSync(tamaguiOptions);
|
|
106
|
+
}
|
|
107
|
+
async function clearWorkerCache() {
|
|
108
|
+
if (!piscinaPool || isClosing) return;
|
|
109
|
+
const task = {
|
|
110
|
+
type: "clearCache"
|
|
111
|
+
};
|
|
112
|
+
await piscinaPool.run(task, {
|
|
113
|
+
name: "runTask"
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
async function destroyPool() {
|
|
117
|
+
if (piscinaPool) {
|
|
118
|
+
isClosing = !0;
|
|
119
|
+
try {
|
|
120
|
+
await piscinaPool.destroy();
|
|
121
|
+
} catch (err) {
|
|
122
|
+
if (err && typeof err == "object" && "message" in err && !String(err.message).includes("Terminating worker thread")) throw err;
|
|
123
|
+
} finally {
|
|
124
|
+
piscinaPool = null, isClosing = !1;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function getPoolStats() {
|
|
129
|
+
return piscinaPool ? {
|
|
130
|
+
threads: piscinaPool.threads.length,
|
|
131
|
+
queueSize: piscinaPool.queueSize,
|
|
132
|
+
completed: piscinaPool.completed,
|
|
133
|
+
duration: piscinaPool.duration,
|
|
134
|
+
utilization: piscinaPool.utilization
|
|
135
|
+
} : null;
|
|
136
|
+
}
|
|
137
|
+
export { clearWorkerCache, destroyPool, extractToClassNames, extractToNative, getPoolStats, getPragmaOptions, loadTamagui, loadTamaguiBuildConfig, watchTamaguiConfig };
|
|
138
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fileURLToPath","Piscina","getPragmaOptions","props","default","Static","getWorkerPath","import","meta","url","resolve","replace","require","piscinaPool","isClosing","getPool","filename","minThreads","maxThreads","idleTimeout","loadTamagui","options","pool","task","type","source","sourcePath","components","shouldPrintDebug","run","name","success","error","console","extractToClassNames","params","Error","result","errorMessage","stack","filter","Boolean","join","data","extractToNative","sourceFileName","sourceCode","watchTamaguiConfig","watcher","originalDispose","dispose","clearWorkerCache","loadTamaguiBuildConfig","tamaguiOptions","loadTamaguiBuildConfigSync","destroyPool","destroy","err","String","message","includes","getPoolStats","threads","length","queueSize","completed","duration","utilization"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAYA,SAASA,aAAA,QAAqB;AAC9B,OAAOC,OAAA,MAAa;AAQb,MAAMC,gBAAA,GAAmB,MAAOC,KAAA,IAGjC;IACJ,MAAM;MAAEC,OAAA,EAASC;IAAO,IAAI,MAAM,OAAO,iBAAiB;IAC1D,OAAOA,MAAA,CAAOH,gBAAA,CAAiBC,KAAK;EACtC;EAGMG,aAAA,GAAgBA,CAAA,KAGhB,OAAOC,MAAA,CAAAC,IAAA,GAAgB,OAAeD,MAAA,CAAAC,IAAA,CAAYC,GAAA,GACjCT,aAAA,CAAcO,MAAA,CAAAC,IAAA,CAAYE,OAAA,CAAQ,wBAAwB,CAAC,EAE5DC,OAAA,CAAQ,UAAU,KAAK,IAIpCC,OAAA,CAAAF,OAAA,CAAgB,wBAAwB,EAAEC,OAAA,CAAQ,UAAU,KAAK;AAG1E,IAAIE,WAAA,GAA8B;EAC9BC,SAAA,GAAY;AAKhB,SAASC,QAAA,EAAmB;EAC1B,OAAKF,WAAA,KACHA,WAAA,GAAc,IAAIZ,OAAA,CAAQ;IACxBe,QAAA,EAAUV,aAAA,CAAc;IAAA;IAExBW,UAAA,EAAY;IACZC,UAAA,EAAY;IACZC,WAAA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,GAAO;IAAEC,IAAA,EAAM;EAAa;EAClC,MAAMX,WAAA,CAAYgB,GAAA,CAAIN,IAAA,EAAM;IAAEO,IAAA,EAAM;EAAU,CAAC;AACjD;AAMA,eAAsByB,YAAA,EAA6B;EACjD,IAAI1C,WAAA,EAAa;IACfC,SAAA,GAAY;IACZ,IAAI;MACF,MAAMD,WAAA,CAAY2C,OAAA,CAAQ;IAC5B,SAASC,GAAA,EAAK;MAGZ,IAAIA,GAAA,IAAO,OAAOA,GAAA,IAAQ,YAAY,aAAaA,GAAA,IAE7C,CADYC,MAAA,CAAOD,GAAA,CAAIE,OAAO,EACrBC,QAAA,CAAS,2BAA2B,GAC/C,MAAMH,GAAA;IAGZ,UAAE;MACA5C,WAAA,GAAc,MACdC,SAAA,GAAY;IACd;EACF;AACF;AAKO,SAAS+C,aAAA,EAAe;EAC7B,OAAKhD,WAAA,GAGE;IACLiD,OAAA,EAASjD,WAAA,CAAYiD,OAAA,CAAQC,MAAA;IAC7BC,SAAA,EAAWnD,WAAA,CAAYmD,SAAA;IACvBC,SAAA,EAAWpD,WAAA,CAAYoD,SAAA;IACvBC,QAAA,EAAUrD,WAAA,CAAYqD,QAAA;IACtBC,WAAA,EAAatD,WAAA,CAAYsD;EAC3B,IARS;AASX","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/static-worker",
|
|
3
|
-
"version": "1.136.
|
|
3
|
+
"version": "1.136.8",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"
|
|
7
|
+
"main": "dist/cjs",
|
|
8
|
+
"module": "dist/esm",
|
|
8
9
|
"files": [
|
|
9
10
|
"src",
|
|
10
11
|
"types",
|
|
@@ -24,8 +25,8 @@
|
|
|
24
25
|
"./package.json": "./package.json",
|
|
25
26
|
".": {
|
|
26
27
|
"types": "./types/index.d.ts",
|
|
27
|
-
"require": "./dist/index.
|
|
28
|
-
"import": "./dist/index.
|
|
28
|
+
"require": "./dist/cjs/index.cjs",
|
|
29
|
+
"import": "./dist/esm/index.mjs"
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
"publishConfig": {
|
|
@@ -33,12 +34,12 @@
|
|
|
33
34
|
},
|
|
34
35
|
"license": "MIT",
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@tamagui/static": "1.136.
|
|
37
|
-
"@tamagui/types": "1.136.
|
|
37
|
+
"@tamagui/static": "1.136.8",
|
|
38
|
+
"@tamagui/types": "1.136.8",
|
|
38
39
|
"piscina": "^4.7.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.136.
|
|
42
|
+
"@tamagui/build": "1.136.8",
|
|
42
43
|
"vitest": "^4.0.4"
|
|
43
44
|
}
|
|
44
45
|
}
|