@hanzogui/static-worker 4.4.0 → 7.0.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.
- package/dist/cjs/index.cjs +18 -18
- package/dist/esm/index.js +16 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +16 -16
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +30 -30
- package/types/index.d.ts +14 -14
- package/types/index.d.ts.map +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -39,9 +39,9 @@ __export(index_exports, {
|
|
|
39
39
|
extractToNative: () => extractToNative,
|
|
40
40
|
getPoolStats: () => getPoolStats,
|
|
41
41
|
getPragmaOptions: () => getPragmaOptions,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
loadHanzogui: () => loadHanzogui,
|
|
43
|
+
loadHanzoguiBuildConfig: () => loadHanzoguiBuildConfig,
|
|
44
|
+
watchHanzoguiConfig: () => watchHanzoguiConfig
|
|
45
45
|
});
|
|
46
46
|
module.exports = __toCommonJS(index_exports);
|
|
47
47
|
var import_node_url = require("node:url");
|
|
@@ -60,10 +60,10 @@ const getWorkerPath = () => {
|
|
|
60
60
|
}
|
|
61
61
|
return require.resolve("@hanzogui/static/worker").replace(/\.mjs$/, ".js");
|
|
62
62
|
};
|
|
63
|
-
const POOL_KEY = "
|
|
64
|
-
const CLOSING_KEY = "
|
|
65
|
-
const TASK_COUNT_KEY = "
|
|
66
|
-
const RECYCLING_KEY = "
|
|
63
|
+
const POOL_KEY = "__hanzogui_piscina_pool__";
|
|
64
|
+
const CLOSING_KEY = "__hanzogui_piscina_closing__";
|
|
65
|
+
const TASK_COUNT_KEY = "__hanzogui_piscina_task_count__";
|
|
66
|
+
const RECYCLING_KEY = "__hanzogui_piscina_recycling__";
|
|
67
67
|
const MAX_TASKS_BEFORE_RECYCLE = 1e3;
|
|
68
68
|
function getSharedPool() {
|
|
69
69
|
return globalThis[POOL_KEY] ?? null;
|
|
@@ -114,7 +114,7 @@ function createPool() {
|
|
|
114
114
|
if (isClosing() || isRecycling()) return;
|
|
115
115
|
const message = err && typeof err === "object" && "message" in err ? String(err.message) : "";
|
|
116
116
|
if (message.includes("Terminating worker thread")) return;
|
|
117
|
-
console.error("[
|
|
117
|
+
console.error("[hanzogui] Worker pool error:", err);
|
|
118
118
|
});
|
|
119
119
|
return pool;
|
|
120
120
|
}
|
|
@@ -126,14 +126,14 @@ function getPool() {
|
|
|
126
126
|
}
|
|
127
127
|
return pool;
|
|
128
128
|
}
|
|
129
|
-
async function
|
|
129
|
+
async function loadHanzogui(options) {
|
|
130
130
|
const pool = getPool();
|
|
131
131
|
const task = {
|
|
132
132
|
type: "extractToClassNames",
|
|
133
133
|
source: "// dummy",
|
|
134
134
|
sourcePath: "__dummy__.tsx",
|
|
135
135
|
options: {
|
|
136
|
-
components: ["
|
|
136
|
+
components: ["hanzogui"],
|
|
137
137
|
...options
|
|
138
138
|
},
|
|
139
139
|
shouldPrintDebug: false
|
|
@@ -146,7 +146,7 @@ async function loadGui(options) {
|
|
|
146
146
|
success: true
|
|
147
147
|
};
|
|
148
148
|
} catch (error) {
|
|
149
|
-
console.error("[static-worker] Error loading
|
|
149
|
+
console.error("[static-worker] Error loading Hanzogui config:", error);
|
|
150
150
|
throw error;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -194,16 +194,16 @@ async function recyclePool(options) {
|
|
|
194
194
|
process.stderr.write = originalStderr;
|
|
195
195
|
process.stdout.write = originalStdout;
|
|
196
196
|
});
|
|
197
|
-
console.log(` \u267B\uFE0F [
|
|
197
|
+
console.log(` \u267B\uFE0F [hanzogui] recycled worker pool (${Date.now() - start}ms)`);
|
|
198
198
|
} finally {
|
|
199
199
|
setRecycling(false);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
async function
|
|
202
|
+
async function loadHanzoguiBuildConfig(hanzoguiOptions) {
|
|
203
203
|
const {
|
|
204
204
|
default: Static
|
|
205
205
|
} = await import("@hanzogui/static");
|
|
206
|
-
return Static.
|
|
206
|
+
return Static.loadHanzoguiBuildConfigAsync(hanzoguiOptions);
|
|
207
207
|
}
|
|
208
208
|
async function extractToClassNames(params) {
|
|
209
209
|
const {
|
|
@@ -227,7 +227,7 @@ async function extractToClassNames(params) {
|
|
|
227
227
|
name: "runTask"
|
|
228
228
|
});
|
|
229
229
|
if (!result.success) {
|
|
230
|
-
const errorMessage = [`[
|
|
230
|
+
const errorMessage = [`[hanzogui-extract] Error processing file: ${sourcePath || "(unknown)"}`, ``, result.error, result.stack ? `
|
|
231
231
|
${result.stack}` : ""].filter(Boolean).join("\n");
|
|
232
232
|
throw new Error(errorMessage);
|
|
233
233
|
}
|
|
@@ -250,7 +250,7 @@ async function extractToNative(sourceFileName, sourceCode, options) {
|
|
|
250
250
|
name: "runTask"
|
|
251
251
|
});
|
|
252
252
|
if (!result.success) {
|
|
253
|
-
const errorMessage = [`[
|
|
253
|
+
const errorMessage = [`[hanzogui-extract] Error processing file: ${sourceFileName || "(unknown)"}`, ``, result.error, result.stack ? `
|
|
254
254
|
${result.stack}` : ""].filter(Boolean).join("\n");
|
|
255
255
|
throw new Error(errorMessage);
|
|
256
256
|
}
|
|
@@ -261,11 +261,11 @@ ${result.stack}` : ""].filter(Boolean).join("\n");
|
|
|
261
261
|
}
|
|
262
262
|
return result.data;
|
|
263
263
|
}
|
|
264
|
-
async function
|
|
264
|
+
async function watchHanzoguiConfig(options) {
|
|
265
265
|
const {
|
|
266
266
|
default: Static
|
|
267
267
|
} = await import("@hanzogui/static");
|
|
268
|
-
const watcher = await Static.
|
|
268
|
+
const watcher = await Static.watchHanzoguiConfig(options);
|
|
269
269
|
if (!watcher) {
|
|
270
270
|
return;
|
|
271
271
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -13,10 +13,10 @@ const getWorkerPath = () => {
|
|
|
13
13
|
}
|
|
14
14
|
return require.resolve("@hanzogui/static/worker").replace(/\.mjs$/, ".js");
|
|
15
15
|
};
|
|
16
|
-
const POOL_KEY = "
|
|
17
|
-
const CLOSING_KEY = "
|
|
18
|
-
const TASK_COUNT_KEY = "
|
|
19
|
-
const RECYCLING_KEY = "
|
|
16
|
+
const POOL_KEY = "__hanzogui_piscina_pool__";
|
|
17
|
+
const CLOSING_KEY = "__hanzogui_piscina_closing__";
|
|
18
|
+
const TASK_COUNT_KEY = "__hanzogui_piscina_task_count__";
|
|
19
|
+
const RECYCLING_KEY = "__hanzogui_piscina_recycling__";
|
|
20
20
|
const MAX_TASKS_BEFORE_RECYCLE = 1e3;
|
|
21
21
|
function getSharedPool() {
|
|
22
22
|
return globalThis[POOL_KEY] ?? null;
|
|
@@ -67,7 +67,7 @@ function createPool() {
|
|
|
67
67
|
if (isClosing() || isRecycling()) return;
|
|
68
68
|
const message = err && typeof err === "object" && "message" in err ? String(err.message) : "";
|
|
69
69
|
if (message.includes("Terminating worker thread")) return;
|
|
70
|
-
console.error("[
|
|
70
|
+
console.error("[hanzogui] Worker pool error:", err);
|
|
71
71
|
});
|
|
72
72
|
return pool;
|
|
73
73
|
}
|
|
@@ -79,14 +79,14 @@ function getPool() {
|
|
|
79
79
|
}
|
|
80
80
|
return pool;
|
|
81
81
|
}
|
|
82
|
-
async function
|
|
82
|
+
async function loadHanzogui(options) {
|
|
83
83
|
const pool = getPool();
|
|
84
84
|
const task = {
|
|
85
85
|
type: "extractToClassNames",
|
|
86
86
|
source: "// dummy",
|
|
87
87
|
sourcePath: "__dummy__.tsx",
|
|
88
88
|
options: {
|
|
89
|
-
components: ["
|
|
89
|
+
components: ["hanzogui"],
|
|
90
90
|
...options
|
|
91
91
|
},
|
|
92
92
|
shouldPrintDebug: false
|
|
@@ -99,7 +99,7 @@ async function loadGui(options) {
|
|
|
99
99
|
success: true
|
|
100
100
|
};
|
|
101
101
|
} catch (error) {
|
|
102
|
-
console.error("[static-worker] Error loading
|
|
102
|
+
console.error("[static-worker] Error loading Hanzogui config:", error);
|
|
103
103
|
throw error;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -147,16 +147,16 @@ async function recyclePool(options) {
|
|
|
147
147
|
process.stderr.write = originalStderr;
|
|
148
148
|
process.stdout.write = originalStdout;
|
|
149
149
|
});
|
|
150
|
-
console.log(` \u267B\uFE0F [
|
|
150
|
+
console.log(` \u267B\uFE0F [hanzogui] recycled worker pool (${Date.now() - start}ms)`);
|
|
151
151
|
} finally {
|
|
152
152
|
setRecycling(false);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
155
|
+
async function loadHanzoguiBuildConfig(hanzoguiOptions) {
|
|
156
156
|
const {
|
|
157
157
|
default: Static
|
|
158
158
|
} = await import("@hanzogui/static");
|
|
159
|
-
return Static.
|
|
159
|
+
return Static.loadHanzoguiBuildConfigAsync(hanzoguiOptions);
|
|
160
160
|
}
|
|
161
161
|
async function extractToClassNames(params) {
|
|
162
162
|
const {
|
|
@@ -180,7 +180,7 @@ async function extractToClassNames(params) {
|
|
|
180
180
|
name: "runTask"
|
|
181
181
|
});
|
|
182
182
|
if (!result.success) {
|
|
183
|
-
const errorMessage = [`[
|
|
183
|
+
const errorMessage = [`[hanzogui-extract] Error processing file: ${sourcePath || "(unknown)"}`, ``, result.error, result.stack ? `
|
|
184
184
|
${result.stack}` : ""].filter(Boolean).join("\n");
|
|
185
185
|
throw new Error(errorMessage);
|
|
186
186
|
}
|
|
@@ -203,7 +203,7 @@ async function extractToNative(sourceFileName, sourceCode, options) {
|
|
|
203
203
|
name: "runTask"
|
|
204
204
|
});
|
|
205
205
|
if (!result.success) {
|
|
206
|
-
const errorMessage = [`[
|
|
206
|
+
const errorMessage = [`[hanzogui-extract] Error processing file: ${sourceFileName || "(unknown)"}`, ``, result.error, result.stack ? `
|
|
207
207
|
${result.stack}` : ""].filter(Boolean).join("\n");
|
|
208
208
|
throw new Error(errorMessage);
|
|
209
209
|
}
|
|
@@ -214,11 +214,11 @@ ${result.stack}` : ""].filter(Boolean).join("\n");
|
|
|
214
214
|
}
|
|
215
215
|
return result.data;
|
|
216
216
|
}
|
|
217
|
-
async function
|
|
217
|
+
async function watchHanzoguiConfig(options) {
|
|
218
218
|
const {
|
|
219
219
|
default: Static
|
|
220
220
|
} = await import("@hanzogui/static");
|
|
221
|
-
const watcher = await Static.
|
|
221
|
+
const watcher = await Static.watchHanzoguiConfig(options);
|
|
222
222
|
if (!watcher) {
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
@@ -267,5 +267,5 @@ function getPoolStats() {
|
|
|
267
267
|
utilization: pool.utilization
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
export { clearWorkerCache, destroyPool, extractToClassNames, extractToNative, getPoolStats, getPragmaOptions,
|
|
270
|
+
export { clearWorkerCache, destroyPool, extractToClassNames, extractToNative, getPoolStats, getPragmaOptions, loadHanzogui, loadHanzoguiBuildConfig, watchHanzoguiConfig };
|
|
271
271
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fileURLToPath","Piscina","getPragmaOptions","props","default","Static","getWorkerPath","import","meta","url","workerPath","resolve","replace","require","POOL_KEY","CLOSING_KEY","TASK_COUNT_KEY","RECYCLING_KEY","MAX_TASKS_BEFORE_RECYCLE","getSharedPool","globalThis","setSharedPool","pool","isClosing","setClosing","value","isRecycling","setRecycling","getTaskCount","incrementTaskCount","count","resetTaskCount","createPool","filename","minThreads","maxThreads","idleTimeout","Number","POSITIVE_INFINITY","on","err","message","String","includes","console","error","getPool","
|
|
1
|
+
{"version":3,"names":["fileURLToPath","Piscina","getPragmaOptions","props","default","Static","getWorkerPath","import","meta","url","workerPath","resolve","replace","require","POOL_KEY","CLOSING_KEY","TASK_COUNT_KEY","RECYCLING_KEY","MAX_TASKS_BEFORE_RECYCLE","getSharedPool","globalThis","setSharedPool","pool","isClosing","setClosing","value","isRecycling","setRecycling","getTaskCount","incrementTaskCount","count","resetTaskCount","createPool","filename","minThreads","maxThreads","idleTimeout","Number","POSITIVE_INFINITY","on","err","message","String","includes","console","error","getPool","loadHanzogui","options","task","type","source","sourcePath","components","shouldPrintDebug","run","name","success","recyclePool","oldPool","start","Date","now","originalStderr","process","stderr","write","bind","originalStdout","stdout","filter","chunk","args","str","toString","newPool","warmupTask","_skipBuildLog","removeAllListeners","destroy","catch","setTimeout","log","loadHanzoguiBuildConfig","hanzoguiOptions","loadHanzoguiBuildConfigAsync","extractToClassNames","params","Error","result","errorMessage","stack","Boolean","join","data","extractToNative","sourceFileName","sourceCode","watchHanzoguiConfig","watcher","originalDispose","dispose","clearWorkerCache","destroyPool","close","getPoolStats","threads","length","queueSize","completed","duration","utilization"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAWA,SAASA,aAAA,QAAqB;AAC9B,OAAOC,OAAA,MAAa;AAKb,MAAMC,gBAAA,GAAmB,MAAOC,KAAA,IAA4C;EACjF,MAAM;IAAEC,OAAA,EAASC;EAAO,IAAI,MAAM,OAAO,kBAAkB;EAC3D,OAAOA,MAAA,CAAOH,gBAAA,CAAiBC,KAAK;AACtC;AAGA,MAAMG,aAAA,GAAgBA,CAAA,KAAM;EAG1B,IAAI,OAAOC,MAAA,CAAAC,IAAA,KAAgB,eAAeD,MAAA,CAAAC,IAAA,CAAYC,GAAA,EAAK;IACzD,MAAMC,UAAA,GAAaV,aAAA,CAAcO,MAAA,CAAAC,IAAA,CAAYG,OAAA,CAAQ,yBAAyB,CAAC;IAE/E,OAAOD,UAAA,CAAWE,OAAA,CAAQ,UAAU,KAAK;EAC3C;EAGA,OAAOC,OAAA,CAAAF,OAAA,CAAgB,yBAAyB,EAAEC,OAAA,CAAQ,UAAU,KAAK;AAC3E;AAGA,MAAME,QAAA,GAAW;AACjB,MAAMC,WAAA,GAAc;AACpB,MAAMC,cAAA,GAAiB;AACvB,MAAMC,aAAA,GAAgB;AAMtB,MAAMC,wBAAA,GAA2B;AAEjC,SAASC,cAAA,EAAgC;EACvC,OAAQ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AsBA,iBAAA,EAAkC;EACtD,MAAMhF,IAAA,GAAOH,aAAA,CAAc;EAC3B,IAAI,CAACG,IAAA,IAAQC,SAAA,CAAU,GAAG;EAE1B,MAAM0B,IAAA,GAAO;IAAEC,IAAA,EAAM;EAAa;EAClC,MAAM5B,IAAA,CAAKiC,GAAA,CAAIN,IAAA,EAAM;IAAEO,IAAA,EAAM;EAAU,CAAC;AAC1C;AAMA,eAAsB+C,YAAA,EAA6B;EACjD,MAAMjF,IAAA,GAAOH,aAAA,CAAc;EAC3B,IAAIG,IAAA,EAAM;IACRE,UAAA,CAAW,IAAI;IACf,IAAI;MACF,MAAMF,IAAA,CAAKkF,KAAA,CAAM;IACnB,UAAE;MACAnF,aAAA,CAAc,IAAI;MAClBG,UAAA,CAAW,KAAK;IAClB;EACF;AACF;AAKO,SAASiF,aAAA,EAAe;EAC7B,MAAMnF,IAAA,GAAOH,aAAA,CAAc;EAC3B,IAAI,CAACG,IAAA,EAAM;IACT,OAAO;EACT;EACA,OAAO;IACLoF,OAAA,EAASpF,IAAA,CAAKoF,OAAA,CAAQC,MAAA;IACtBC,SAAA,EAAWtF,IAAA,CAAKsF,SAAA;IAChBC,SAAA,EAAWvF,IAAA,CAAKuF,SAAA;IAChBC,QAAA,EAAUxF,IAAA,CAAKwF,QAAA;IACfC,WAAA,EAAazF,IAAA,CAAKyF;EACpB;AACF","ignoreList":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -13,10 +13,10 @@ const getWorkerPath = () => {
|
|
|
13
13
|
}
|
|
14
14
|
return require.resolve("@hanzogui/static/worker").replace(/\.mjs$/, ".js");
|
|
15
15
|
};
|
|
16
|
-
const POOL_KEY = "
|
|
17
|
-
const CLOSING_KEY = "
|
|
18
|
-
const TASK_COUNT_KEY = "
|
|
19
|
-
const RECYCLING_KEY = "
|
|
16
|
+
const POOL_KEY = "__hanzogui_piscina_pool__";
|
|
17
|
+
const CLOSING_KEY = "__hanzogui_piscina_closing__";
|
|
18
|
+
const TASK_COUNT_KEY = "__hanzogui_piscina_task_count__";
|
|
19
|
+
const RECYCLING_KEY = "__hanzogui_piscina_recycling__";
|
|
20
20
|
const MAX_TASKS_BEFORE_RECYCLE = 1e3;
|
|
21
21
|
function getSharedPool() {
|
|
22
22
|
return globalThis[POOL_KEY] ?? null;
|
|
@@ -67,7 +67,7 @@ function createPool() {
|
|
|
67
67
|
if (isClosing() || isRecycling()) return;
|
|
68
68
|
const message = err && typeof err === "object" && "message" in err ? String(err.message) : "";
|
|
69
69
|
if (message.includes("Terminating worker thread")) return;
|
|
70
|
-
console.error("[
|
|
70
|
+
console.error("[hanzogui] Worker pool error:", err);
|
|
71
71
|
});
|
|
72
72
|
return pool;
|
|
73
73
|
}
|
|
@@ -79,14 +79,14 @@ function getPool() {
|
|
|
79
79
|
}
|
|
80
80
|
return pool;
|
|
81
81
|
}
|
|
82
|
-
async function
|
|
82
|
+
async function loadHanzogui(options) {
|
|
83
83
|
const pool = getPool();
|
|
84
84
|
const task = {
|
|
85
85
|
type: "extractToClassNames",
|
|
86
86
|
source: "// dummy",
|
|
87
87
|
sourcePath: "__dummy__.tsx",
|
|
88
88
|
options: {
|
|
89
|
-
components: ["
|
|
89
|
+
components: ["hanzogui"],
|
|
90
90
|
...options
|
|
91
91
|
},
|
|
92
92
|
shouldPrintDebug: false
|
|
@@ -99,7 +99,7 @@ async function loadGui(options) {
|
|
|
99
99
|
success: true
|
|
100
100
|
};
|
|
101
101
|
} catch (error) {
|
|
102
|
-
console.error("[static-worker] Error loading
|
|
102
|
+
console.error("[static-worker] Error loading Hanzogui config:", error);
|
|
103
103
|
throw error;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -147,16 +147,16 @@ async function recyclePool(options) {
|
|
|
147
147
|
process.stderr.write = originalStderr;
|
|
148
148
|
process.stdout.write = originalStdout;
|
|
149
149
|
});
|
|
150
|
-
console.log(` \u267B\uFE0F [
|
|
150
|
+
console.log(` \u267B\uFE0F [hanzogui] recycled worker pool (${Date.now() - start}ms)`);
|
|
151
151
|
} finally {
|
|
152
152
|
setRecycling(false);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
async function
|
|
155
|
+
async function loadHanzoguiBuildConfig(hanzoguiOptions) {
|
|
156
156
|
const {
|
|
157
157
|
default: Static
|
|
158
158
|
} = await import("@hanzogui/static");
|
|
159
|
-
return Static.
|
|
159
|
+
return Static.loadHanzoguiBuildConfigAsync(hanzoguiOptions);
|
|
160
160
|
}
|
|
161
161
|
async function extractToClassNames(params) {
|
|
162
162
|
const {
|
|
@@ -180,7 +180,7 @@ async function extractToClassNames(params) {
|
|
|
180
180
|
name: "runTask"
|
|
181
181
|
});
|
|
182
182
|
if (!result.success) {
|
|
183
|
-
const errorMessage = [`[
|
|
183
|
+
const errorMessage = [`[hanzogui-extract] Error processing file: ${sourcePath || "(unknown)"}`, ``, result.error, result.stack ? `
|
|
184
184
|
${result.stack}` : ""].filter(Boolean).join("\n");
|
|
185
185
|
throw new Error(errorMessage);
|
|
186
186
|
}
|
|
@@ -203,7 +203,7 @@ async function extractToNative(sourceFileName, sourceCode, options) {
|
|
|
203
203
|
name: "runTask"
|
|
204
204
|
});
|
|
205
205
|
if (!result.success) {
|
|
206
|
-
const errorMessage = [`[
|
|
206
|
+
const errorMessage = [`[hanzogui-extract] Error processing file: ${sourceFileName || "(unknown)"}`, ``, result.error, result.stack ? `
|
|
207
207
|
${result.stack}` : ""].filter(Boolean).join("\n");
|
|
208
208
|
throw new Error(errorMessage);
|
|
209
209
|
}
|
|
@@ -214,11 +214,11 @@ ${result.stack}` : ""].filter(Boolean).join("\n");
|
|
|
214
214
|
}
|
|
215
215
|
return result.data;
|
|
216
216
|
}
|
|
217
|
-
async function
|
|
217
|
+
async function watchHanzoguiConfig(options) {
|
|
218
218
|
const {
|
|
219
219
|
default: Static
|
|
220
220
|
} = await import("@hanzogui/static");
|
|
221
|
-
const watcher = await Static.
|
|
221
|
+
const watcher = await Static.watchHanzoguiConfig(options);
|
|
222
222
|
if (!watcher) {
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
@@ -267,5 +267,5 @@ function getPoolStats() {
|
|
|
267
267
|
utilization: pool.utilization
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
export { clearWorkerCache, destroyPool, extractToClassNames, extractToNative, getPoolStats, getPragmaOptions,
|
|
270
|
+
export { clearWorkerCache, destroyPool, extractToClassNames, extractToNative, getPoolStats, getPragmaOptions, loadHanzogui, loadHanzoguiBuildConfig, watchHanzoguiConfig };
|
|
271
271
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fileURLToPath","Piscina","getPragmaOptions","props","default","Static","getWorkerPath","import","meta","url","workerPath","resolve","replace","require","POOL_KEY","CLOSING_KEY","TASK_COUNT_KEY","RECYCLING_KEY","MAX_TASKS_BEFORE_RECYCLE","getSharedPool","globalThis","setSharedPool","pool","isClosing","setClosing","value","isRecycling","setRecycling","getTaskCount","incrementTaskCount","count","resetTaskCount","createPool","filename","minThreads","maxThreads","idleTimeout","Number","POSITIVE_INFINITY","on","err","message","String","includes","console","error","getPool","
|
|
1
|
+
{"version":3,"names":["fileURLToPath","Piscina","getPragmaOptions","props","default","Static","getWorkerPath","import","meta","url","workerPath","resolve","replace","require","POOL_KEY","CLOSING_KEY","TASK_COUNT_KEY","RECYCLING_KEY","MAX_TASKS_BEFORE_RECYCLE","getSharedPool","globalThis","setSharedPool","pool","isClosing","setClosing","value","isRecycling","setRecycling","getTaskCount","incrementTaskCount","count","resetTaskCount","createPool","filename","minThreads","maxThreads","idleTimeout","Number","POSITIVE_INFINITY","on","err","message","String","includes","console","error","getPool","loadHanzogui","options","task","type","source","sourcePath","components","shouldPrintDebug","run","name","success","recyclePool","oldPool","start","Date","now","originalStderr","process","stderr","write","bind","originalStdout","stdout","filter","chunk","args","str","toString","newPool","warmupTask","_skipBuildLog","removeAllListeners","destroy","catch","setTimeout","log","loadHanzoguiBuildConfig","hanzoguiOptions","loadHanzoguiBuildConfigAsync","extractToClassNames","params","Error","result","errorMessage","stack","Boolean","join","data","extractToNative","sourceFileName","sourceCode","watchHanzoguiConfig","watcher","originalDispose","dispose","clearWorkerCache","destroyPool","close","getPoolStats","threads","length","queueSize","completed","duration","utilization"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAWA,SAASA,aAAA,QAAqB;AAC9B,OAAOC,OAAA,MAAa;AAKb,MAAMC,gBAAA,GAAmB,MAAOC,KAAA,IAA4C;EACjF,MAAM;IAAEC,OAAA,EAASC;EAAO,IAAI,MAAM,OAAO,kBAAkB;EAC3D,OAAOA,MAAA,CAAOH,gBAAA,CAAiBC,KAAK;AACtC;AAGA,MAAMG,aAAA,GAAgBA,CAAA,KAAM;EAG1B,IAAI,OAAOC,MAAA,CAAAC,IAAA,KAAgB,eAAeD,MAAA,CAAAC,IAAA,CAAYC,GAAA,EAAK;IACzD,MAAMC,UAAA,GAAaV,aAAA,CAAcO,MAAA,CAAAC,IAAA,CAAYG,OAAA,CAAQ,yBAAyB,CAAC;IAE/E,OAAOD,UAAA,CAAWE,OAAA,CAAQ,UAAU,KAAK;EAC3C;EAGA,OAAOC,OAAA,CAAAF,OAAA,CAAgB,yBAAyB,EAAEC,OAAA,CAAQ,UAAU,KAAK;AAC3E;AAGA,MAAME,QAAA,GAAW;AACjB,MAAMC,WAAA,GAAc;AACpB,MAAMC,cAAA,GAAiB;AACvB,MAAMC,aAAA,GAAgB;AAMtB,MAAMC,wBAAA,GAA2B;AAEjC,SAASC,cAAA,EAAgC;EACvC,OAAQC,UAAA,CAAmBN,QAAQ,KAAK;AAC1C;AAEA,SAASO,cAAcC,IAAA,EAAsB;EAC3C;EAAEF,UAAA,CAAmBN,QAAQ,IAAIQ,IAAA;AACnC;AAEA,SAASC,UAAA,EAAqB;EAC5B,OAAQH,UAAA,CAAmBL,WAAW,MAAM;AAC9C;AAEA,SAASS,WAAWC,KAAA,EAAgB;E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AM;EAAU,CAAC;AAC1C;AAMA,eAAsB+C,YAAA,EAA6B;EACjD,MAAMjF,IAAA,GAAOH,aAAA,CAAc;EAC3B,IAAIG,IAAA,EAAM;IACRE,UAAA,CAAW,IAAI;IACf,IAAI;MACF,MAAMF,IAAA,CAAKkF,KAAA,CAAM;IACnB,UAAE;MACAnF,aAAA,CAAc,IAAI;MAClBG,UAAA,CAAW,KAAK;IAClB;EACF;AACF;AAKO,SAASiF,aAAA,EAAe;EAC7B,MAAMnF,IAAA,GAAOH,aAAA,CAAc;EAC3B,IAAI,CAACG,IAAA,EAAM;IACT,OAAO;EACT;EACA,OAAO;IACLoF,OAAA,EAASpF,IAAA,CAAKoF,OAAA,CAAQC,MAAA;IACtBC,SAAA,EAAWtF,IAAA,CAAKsF,SAAA;IAChBC,SAAA,EAAWvF,IAAA,CAAKuF,SAAA;IAChBC,QAAA,EAAUxF,IAAA,CAAKwF,QAAA;IACfC,WAAA,EAAazF,IAAA,CAAKyF;EACpB;AACF","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/static-worker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
|
-
"build": "
|
|
30
|
-
"watch": "
|
|
31
|
-
"clean": "
|
|
32
|
-
"clean:build": "
|
|
29
|
+
"build": "hanzogui-build --skip-native",
|
|
30
|
+
"watch": "hanzogui-build --skip-native --watch",
|
|
31
|
+
"clean": "hanzogui-build clean",
|
|
32
|
+
"clean:build": "hanzogui-build clean:build",
|
|
33
33
|
"test": "vitest run",
|
|
34
34
|
"test:web": "bun run test",
|
|
35
35
|
"test:watch": "vitest"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@hanzogui/static": "
|
|
39
|
-
"@hanzogui/types": "
|
|
38
|
+
"@hanzogui/static": "7.0.0",
|
|
39
|
+
"@hanzogui/types": "7.0.0",
|
|
40
40
|
"piscina": "^4.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@hanzogui/build": "
|
|
43
|
+
"@hanzogui/build": "7.0.0",
|
|
44
44
|
"vitest": "4.0.4"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @hanzogui/static-worker
|
|
3
3
|
*
|
|
4
|
-
* Pure worker-based API for
|
|
4
|
+
* Pure worker-based API for Hanzogui static extraction.
|
|
5
5
|
* All operations run in a worker thread for better performance and isolation.
|
|
6
6
|
*
|
|
7
7
|
* This package provides a clean async API that wraps @hanzogui/static's worker
|
|
8
8
|
* implementation without exposing any sync/legacy APIs.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type { HanzoguiOptions } from '@hanzogui/types'
|
|
12
12
|
import { fileURLToPath } from 'node:url'
|
|
13
13
|
import Piscina from 'piscina'
|
|
14
14
|
|
|
15
|
-
export type { ExtractedResponse,
|
|
16
|
-
export type {
|
|
15
|
+
export type { ExtractedResponse, HanzoguiProjectInfo } from '@hanzogui/static'
|
|
16
|
+
export type { HanzoguiOptions } from '@hanzogui/types'
|
|
17
17
|
|
|
18
18
|
export const getPragmaOptions = async (props: { source: string; path: string }) => {
|
|
19
19
|
const { default: Static } = await import('@hanzogui/static')
|
|
@@ -35,10 +35,10 @@ const getWorkerPath = () => {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// Use globalThis to share pool across module instances (Vite environments)
|
|
38
|
-
const POOL_KEY = '
|
|
39
|
-
const CLOSING_KEY = '
|
|
40
|
-
const TASK_COUNT_KEY = '
|
|
41
|
-
const RECYCLING_KEY = '
|
|
38
|
+
const POOL_KEY = '__hanzogui_piscina_pool__'
|
|
39
|
+
const CLOSING_KEY = '__hanzogui_piscina_closing__'
|
|
40
|
+
const TASK_COUNT_KEY = '__hanzogui_piscina_task_count__'
|
|
41
|
+
const RECYCLING_KEY = '__hanzogui_piscina_recycling__'
|
|
42
42
|
|
|
43
43
|
// recycle worker after this many tasks to prevent RSS bloat from V8 memory fragmentation
|
|
44
44
|
// Node.js worker threads don't release memory properly - see https://github.com/nodejs/node/issues/51868
|
|
@@ -107,7 +107,7 @@ function createPool(): Piscina {
|
|
|
107
107
|
err && typeof err === 'object' && 'message' in err ? String(err.message) : ''
|
|
108
108
|
// Suppress termination errors (can still occur during explicit close/destroy)
|
|
109
109
|
if (message.includes('Terminating worker thread')) return
|
|
110
|
-
console.error('[
|
|
110
|
+
console.error('[hanzogui] Worker pool error:', err)
|
|
111
111
|
})
|
|
112
112
|
|
|
113
113
|
return pool
|
|
@@ -126,11 +126,11 @@ function getPool(): Piscina {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
|
-
* Load
|
|
129
|
+
* Load Hanzogui configuration in worker
|
|
130
130
|
* Sends a warmup task to trigger config loading
|
|
131
131
|
* bundleConfig auto-detects if files exist and skips rebuild
|
|
132
132
|
*/
|
|
133
|
-
export async function
|
|
133
|
+
export async function loadHanzogui(options: Partial<HanzoguiOptions>): Promise<any> {
|
|
134
134
|
const pool = getPool()
|
|
135
135
|
|
|
136
136
|
// use extractToClassNames with a dummy request to trigger config loading
|
|
@@ -140,7 +140,7 @@ export async function loadGui(options: Partial<GuiOptions>): Promise<any> {
|
|
|
140
140
|
source: '// dummy',
|
|
141
141
|
sourcePath: '__dummy__.tsx',
|
|
142
142
|
options: {
|
|
143
|
-
components: ['
|
|
143
|
+
components: ['hanzogui'],
|
|
144
144
|
...options,
|
|
145
145
|
},
|
|
146
146
|
shouldPrintDebug: false,
|
|
@@ -150,7 +150,7 @@ export async function loadGui(options: Partial<GuiOptions>): Promise<any> {
|
|
|
150
150
|
await pool.run(task, { name: 'runTask' })
|
|
151
151
|
return { success: true }
|
|
152
152
|
} catch (error) {
|
|
153
|
-
console.error('[static-worker] Error loading
|
|
153
|
+
console.error('[static-worker] Error loading Hanzogui config:', error)
|
|
154
154
|
throw error
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -160,7 +160,7 @@ export async function loadGui(options: Partial<GuiOptions>): Promise<any> {
|
|
|
160
160
|
* Creates new pool, swaps immediately, then destroys old pool
|
|
161
161
|
* V8 doesn't return memory to OS, so we need to restart the worker periodically
|
|
162
162
|
*/
|
|
163
|
-
async function recyclePool(options:
|
|
163
|
+
async function recyclePool(options: HanzoguiOptions): Promise<void> {
|
|
164
164
|
if (isClosing() || isRecycling()) return
|
|
165
165
|
|
|
166
166
|
const oldPool = getSharedPool()
|
|
@@ -217,31 +217,31 @@ async function recyclePool(options: GuiOptions): Promise<void> {
|
|
|
217
217
|
process.stdout.write = originalStdout
|
|
218
218
|
})
|
|
219
219
|
|
|
220
|
-
console.log(` ♻️ [
|
|
220
|
+
console.log(` ♻️ [hanzogui] recycled worker pool (${Date.now() - start}ms)`)
|
|
221
221
|
} finally {
|
|
222
222
|
setRecycling(false)
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
|
-
* Load
|
|
227
|
+
* Load Hanzogui build configuration asynchronously
|
|
228
228
|
* Uses esbuild-wasm to avoid EPIPE errors from native esbuild service lifecycle
|
|
229
229
|
*/
|
|
230
|
-
export async function
|
|
231
|
-
|
|
232
|
-
): Promise<
|
|
230
|
+
export async function loadHanzoguiBuildConfig(
|
|
231
|
+
hanzoguiOptions: Partial<HanzoguiOptions> | undefined
|
|
232
|
+
): Promise<HanzoguiOptions> {
|
|
233
233
|
const { default: Static } = await import('@hanzogui/static')
|
|
234
234
|
|
|
235
|
-
return Static.
|
|
235
|
+
return Static.loadHanzoguiBuildConfigAsync(hanzoguiOptions)
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
|
-
* Extract
|
|
239
|
+
* Extract Hanzogui components to className-based CSS for web
|
|
240
240
|
*/
|
|
241
241
|
export async function extractToClassNames(params: {
|
|
242
242
|
source: string | Buffer
|
|
243
243
|
sourcePath?: string
|
|
244
|
-
options:
|
|
244
|
+
options: HanzoguiOptions
|
|
245
245
|
shouldPrintDebug?: boolean | 'verbose'
|
|
246
246
|
}): Promise<any> {
|
|
247
247
|
const { source, sourcePath = '', options, shouldPrintDebug = false } = params
|
|
@@ -263,7 +263,7 @@ export async function extractToClassNames(params: {
|
|
|
263
263
|
|
|
264
264
|
if (!result.success) {
|
|
265
265
|
const errorMessage = [
|
|
266
|
-
`[
|
|
266
|
+
`[hanzogui-extract] Error processing file: ${sourcePath || '(unknown)'}`,
|
|
267
267
|
``,
|
|
268
268
|
result.error,
|
|
269
269
|
result.stack ? `\n${result.stack}` : '',
|
|
@@ -286,12 +286,12 @@ export async function extractToClassNames(params: {
|
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
|
-
* Extract
|
|
289
|
+
* Extract Hanzogui components to React Native StyleSheet format
|
|
290
290
|
*/
|
|
291
291
|
export async function extractToNative(
|
|
292
292
|
sourceFileName: string,
|
|
293
293
|
sourceCode: string,
|
|
294
|
-
options:
|
|
294
|
+
options: HanzoguiOptions
|
|
295
295
|
): Promise<any> {
|
|
296
296
|
const task = {
|
|
297
297
|
type: 'extractToNative',
|
|
@@ -305,7 +305,7 @@ export async function extractToNative(
|
|
|
305
305
|
|
|
306
306
|
if (!result.success) {
|
|
307
307
|
const errorMessage = [
|
|
308
|
-
`[
|
|
308
|
+
`[hanzogui-extract] Error processing file: ${sourceFileName || '(unknown)'}`,
|
|
309
309
|
``,
|
|
310
310
|
result.error,
|
|
311
311
|
result.stack ? `\n${result.stack}` : '',
|
|
@@ -328,15 +328,15 @@ export async function extractToNative(
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
|
-
* Watch
|
|
331
|
+
* Watch Hanzogui config for changes and reload when it changes
|
|
332
332
|
*/
|
|
333
|
-
export async function
|
|
334
|
-
options:
|
|
333
|
+
export async function watchHanzoguiConfig(
|
|
334
|
+
options: HanzoguiOptions
|
|
335
335
|
): Promise<{ dispose: () => void } | undefined> {
|
|
336
336
|
// For now, we'll use the static package's watcher directly
|
|
337
337
|
// This could be improved to use worker-based watching
|
|
338
338
|
const { default: Static } = await import('@hanzogui/static')
|
|
339
|
-
const watcher = await Static.
|
|
339
|
+
const watcher = await Static.watchHanzoguiConfig(options)
|
|
340
340
|
|
|
341
341
|
if (!watcher) {
|
|
342
342
|
return
|
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @hanzogui/static-worker
|
|
3
3
|
*
|
|
4
|
-
* Pure worker-based API for
|
|
4
|
+
* Pure worker-based API for Hanzogui static extraction.
|
|
5
5
|
* All operations run in a worker thread for better performance and isolation.
|
|
6
6
|
*
|
|
7
7
|
* This package provides a clean async API that wraps @hanzogui/static's worker
|
|
8
8
|
* implementation without exposing any sync/legacy APIs.
|
|
9
9
|
*/
|
|
10
|
-
import type {
|
|
11
|
-
export type { ExtractedResponse,
|
|
12
|
-
export type {
|
|
10
|
+
import type { HanzoguiOptions } from '@hanzogui/types';
|
|
11
|
+
export type { ExtractedResponse, HanzoguiProjectInfo } from '@hanzogui/static';
|
|
12
|
+
export type { HanzoguiOptions } from '@hanzogui/types';
|
|
13
13
|
export declare const getPragmaOptions: (props: {
|
|
14
14
|
source: string;
|
|
15
15
|
path: string;
|
|
@@ -18,33 +18,33 @@ export declare const getPragmaOptions: (props: {
|
|
|
18
18
|
shouldDisable: boolean;
|
|
19
19
|
}>;
|
|
20
20
|
/**
|
|
21
|
-
* Load
|
|
21
|
+
* Load Hanzogui configuration in worker
|
|
22
22
|
* Sends a warmup task to trigger config loading
|
|
23
23
|
* bundleConfig auto-detects if files exist and skips rebuild
|
|
24
24
|
*/
|
|
25
|
-
export declare function
|
|
25
|
+
export declare function loadHanzogui(options: Partial<HanzoguiOptions>): Promise<any>;
|
|
26
26
|
/**
|
|
27
|
-
* Load
|
|
27
|
+
* Load Hanzogui build configuration asynchronously
|
|
28
28
|
* Uses esbuild-wasm to avoid EPIPE errors from native esbuild service lifecycle
|
|
29
29
|
*/
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function loadHanzoguiBuildConfig(hanzoguiOptions: Partial<HanzoguiOptions> | undefined): Promise<HanzoguiOptions>;
|
|
31
31
|
/**
|
|
32
|
-
* Extract
|
|
32
|
+
* Extract Hanzogui components to className-based CSS for web
|
|
33
33
|
*/
|
|
34
34
|
export declare function extractToClassNames(params: {
|
|
35
35
|
source: string | Buffer;
|
|
36
36
|
sourcePath?: string;
|
|
37
|
-
options:
|
|
37
|
+
options: HanzoguiOptions;
|
|
38
38
|
shouldPrintDebug?: boolean | 'verbose';
|
|
39
39
|
}): Promise<any>;
|
|
40
40
|
/**
|
|
41
|
-
* Extract
|
|
41
|
+
* Extract Hanzogui components to React Native StyleSheet format
|
|
42
42
|
*/
|
|
43
|
-
export declare function extractToNative(sourceFileName: string, sourceCode: string, options:
|
|
43
|
+
export declare function extractToNative(sourceFileName: string, sourceCode: string, options: HanzoguiOptions): Promise<any>;
|
|
44
44
|
/**
|
|
45
|
-
* Watch
|
|
45
|
+
* Watch Hanzogui config for changes and reload when it changes
|
|
46
46
|
*/
|
|
47
|
-
export declare function
|
|
47
|
+
export declare function watchHanzoguiConfig(options: HanzoguiOptions): Promise<{
|
|
48
48
|
dispose: () => void;
|
|
49
49
|
} | undefined>;
|
|
50
50
|
/**
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","s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