ttmg-pack 0.2.0 → 0.2.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/CHANGELOG.md +9 -1
- package/dist/index.js +1896 -3
- package/dist/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/openDataContext.d.ts +1 -1
- package/dist/utils/safeBuild.d.ts +11 -0
- package/package.json +2 -2
package/dist/utils/index.d.ts
CHANGED
|
@@ -20,3 +20,4 @@ export { getProjectSize } from './getProjectSize';
|
|
|
20
20
|
export { getGameEngine } from './getGameEngine';
|
|
21
21
|
export { overrideConfig } from './overrideConfig';
|
|
22
22
|
export { buildOpenDataContext, getOpenDataContextEntry, } from './openDataContext';
|
|
23
|
+
export { safeBuild } from './safeBuild';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuildOptions, BuildResult } from 'esbuild';
|
|
2
|
+
/**
|
|
3
|
+
* 确保一个异步函数在整个应用生命周期内只被执行一次。
|
|
4
|
+
* @param fn 一个返回 Promise 的初始化函数。
|
|
5
|
+
*/
|
|
6
|
+
export declare function ensureOnce(fn: () => Promise<void>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* 一个安全的、可以并发调用的 esbuild build 函数。
|
|
9
|
+
* 它会先等待全局的初始化完成后,再执行自己的 build 任务。
|
|
10
|
+
*/
|
|
11
|
+
export declare function safeBuild(options: BuildOptions): Promise<BuildResult>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ttmg-pack",
|
|
3
3
|
"author": "ttmg",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@babel/traverse": "^7.28.0",
|
|
22
22
|
"@babel/types": "^7.28.1",
|
|
23
23
|
"acorn": "8.15.0",
|
|
24
|
-
"esbuild": "
|
|
24
|
+
"esbuild": "0.25.9",
|
|
25
25
|
"glob": "11.0.3",
|
|
26
26
|
"magic-string": "0.30.17",
|
|
27
27
|
"node-fetch": "^2.7.0",
|