pixifact 0.6.1 → 0.8.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/LICENSE +21 -0
- package/README.md +30 -29
- package/dist/client.d.ts +23 -0
- package/dist/compiler/compileScenes.js +13 -4
- package/dist/compiler/typescriptCompiler.js +2 -2
- package/dist/compiler-node/runtimeVite.js +96 -23
- package/dist/compiler-node/vite.d.ts +16 -6
- package/dist/compiler-node/vite.js +418 -32
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +6 -0
- package/dist/platform/{wechat → minigame}/adapter.d.ts +7 -6
- package/dist/platform/{wechat → minigame}/adapter.js +10 -8
- package/dist/platform/minigame/application.d.ts +4 -0
- package/dist/platform/minigame/application.js +53 -0
- package/dist/platform/minigame/fetch.d.ts +2 -0
- package/dist/platform/{wechat → minigame}/fetch.js +13 -15
- package/dist/platform/minigame/index.d.ts +8 -0
- package/dist/platform/minigame/index.js +8 -0
- package/dist/platform/minigame/input.d.ts +16 -0
- package/dist/platform/{wechat → minigame}/input.js +18 -19
- package/dist/platform/minigame/lifecycle.d.ts +15 -0
- package/dist/platform/{wechat → minigame}/lifecycle.js +5 -7
- package/dist/platform/{wechat → minigame}/runtime.d.ts +5 -5
- package/dist/platform/{wechat → minigame}/runtime.js +14 -20
- package/dist/platform/minigame/subpackage.d.ts +3 -0
- package/dist/platform/minigame/subpackage.js +36 -0
- package/dist/platform/{wechat → minigame}/types.d.ts +24 -21
- package/dist/platform/minigame/types.js +1 -0
- package/dist/platform/web/index.d.ts +2 -0
- package/dist/platform/web/index.js +6 -0
- package/dist/project/index.d.ts +5 -24
- package/dist/project/index.js +45 -59
- package/dist/runtime-dev/index.d.ts +1 -1
- package/dist/runtime-dev/protocol.d.ts +12 -1
- package/dist/runtime-dev/runtimeClient.js +21 -1
- package/dist/scene/index.d.ts +0 -1
- package/dist/scene/index.js +0 -1
- package/package.json +16 -7
- package/dist/platform/wechat/application.d.ts +0 -32
- package/dist/platform/wechat/application.js +0 -79
- package/dist/platform/wechat/fetch.d.ts +0 -1
- package/dist/platform/wechat/index.d.ts +0 -4
- package/dist/platform/wechat/index.js +0 -3
- package/dist/platform/wechat/input.d.ts +0 -12
- package/dist/platform/wechat/lifecycle.d.ts +0 -14
- package/dist/platform/wechat/subpackage.d.ts +0 -1
- package/dist/platform/wechat/subpackage.js +0 -27
- package/dist/platform/wechat/types.js +0 -3
- package/dist/scene/sceneAssetRuntime.d.ts +0 -11
- package/dist/scene/sceneAssetRuntime.js +0 -43
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 youxia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
1
|
# Pixifact
|
|
2
2
|
|
|
3
|
-
Pixifact 是基于 PixiJS v8
|
|
4
|
-
|
|
5
|
-
`pixifact` 包提供项目配置解析、runtime 节点、compiler API 和生成 Scene 的运行时支持。CLI 和项目脚手架分别由 `pixifact-cli`、`create-pixifact` 提供。
|
|
3
|
+
Pixifact 是基于 PixiJS v8、面向 AI 可编辑 `.scene` 工作流的 Scene / UI / 轻场景语义层。
|
|
6
4
|
|
|
7
5
|
## 安装
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
8
|
bun add pixifact pixi.js
|
|
9
|
+
bun add -d pixifact-cli vite
|
|
11
10
|
```
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
只在需要时安装小游戏平台包:
|
|
14
13
|
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import { prepareSceneClass, scene } from 'pixifact/scene';
|
|
19
|
-
import { createWechatPixiApplication } from 'pixifact/platform/wechat';
|
|
14
|
+
```bash
|
|
15
|
+
bun add @pixifact/platform-wechat
|
|
16
|
+
bun add @pixifact/platform-douyin
|
|
20
17
|
```
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
## Vite
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
```ts
|
|
22
|
+
import { defineConfig } from 'vite';
|
|
23
|
+
import { pixifact } from 'pixifact/compiler-node';
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
bun add -d pixifact-cli
|
|
25
|
+
export default defineConfig({ plugins: [pixifact()] });
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
pixifact scene validate --all
|
|
34
|
-
pixifact compile-scenes
|
|
35
|
-
```
|
|
28
|
+
Web、微信和抖音共享 `src/main.ts`。平台由当前 Vite mode env 中的 `VITE_PLATFORM=web|wechat|douyin` 选择;小游戏还需要 `VITE_APP_ID`。
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
```ts
|
|
31
|
+
import 'pixifact:scenes';
|
|
32
|
+
import { Assets } from 'pixi.js';
|
|
33
|
+
import { createApplication } from 'pixifact:platform';
|
|
34
|
+
import manifest from 'pixifact:assets';
|
|
38
35
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
pixifact build --target wechat
|
|
42
|
-
pixifact dev --target wechat
|
|
36
|
+
const app = await createApplication();
|
|
37
|
+
await Assets.init({ manifest });
|
|
43
38
|
```
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
`createApplication()` 返回原生 PixiJS `Application`,不隐式初始化 Assets。Scene 纹理和业务 JSON、音频、字体、资源包都沿用 PixiJS `Assets.load()` / `Assets.loadBundle()`。
|
|
46
41
|
|
|
47
42
|
## Scene 工作流
|
|
48
43
|
|
|
49
|
-
|
|
44
|
+
```bash
|
|
45
|
+
pixifact scene validate --all
|
|
46
|
+
pixifact compile-scenes
|
|
47
|
+
pixifact validate --mode production
|
|
48
|
+
pixifact build --mode production
|
|
49
|
+
```
|
|
50
50
|
|
|
51
|
-
`.pixifact/generated
|
|
51
|
+
项目相对 `.scene` 是 source of truth;不要编辑 `.pixifact/generated/**`。解析、校验和生成 API 位于 `pixifact/compiler`,Node/Vite 插件位于 `pixifact/compiler-node`,runtime 与 Scene API 分别位于 `pixifact/runtime` 和 `pixifact/scene`。
|
|
52
|
+
|
|
53
|
+
微信和抖音构建配置见仓库文档:[微信小游戏](https://github.com/hxg2050/pixifact/blob/main/docs/zh/wechat-minigame.md)、[抖音小游戏](https://github.com/hxg2050/pixifact/blob/main/docs/zh/douyin-minigame.md)。
|
|
52
54
|
|
|
53
55
|
## 环境要求
|
|
54
56
|
|
|
55
57
|
- Bun
|
|
56
58
|
- PixiJS v8
|
|
57
|
-
|
|
58
|
-
桌面编辑器不包含在 npm runtime 包中。
|
|
59
|
+
- Vite 6 或更高版本
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare module 'pixifact:platform' {
|
|
2
|
+
import type { Application, ApplicationOptions } from 'pixi.js';
|
|
3
|
+
|
|
4
|
+
export function createApplication(
|
|
5
|
+
options?: Partial<ApplicationOptions>,
|
|
6
|
+
): Promise<Application>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module 'pixifact:assets' {
|
|
10
|
+
import type { AssetsManifest } from 'pixi.js';
|
|
11
|
+
|
|
12
|
+
const manifest: AssetsManifest;
|
|
13
|
+
export default manifest;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ImportMetaEnv {
|
|
17
|
+
readonly VITE_APP_ID?: string;
|
|
18
|
+
readonly VITE_PLATFORM: 'web' | 'wechat' | 'douyin';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface ImportMeta {
|
|
22
|
+
readonly env: ImportMetaEnv;
|
|
23
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { access, mkdir, readdir, readFile, rename, writeFile } from 'node:fs/promises';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import { fileURLToPath } from 'node:url';
|
|
4
5
|
import { builtinSceneAssetIds, builtinSceneNameFromAssetId, isBuiltinSceneAssetId, } from './builtinScenes.js';
|
|
@@ -123,7 +124,7 @@ export async function compileScenes(options) {
|
|
|
123
124
|
collectTemplateTextures(template, projectAssets);
|
|
124
125
|
}
|
|
125
126
|
await mkdir(path.dirname(generatedFile), { recursive: true });
|
|
126
|
-
await
|
|
127
|
+
await writeGeneratedFile(generatedFile, code);
|
|
127
128
|
if (record.kind === 'project') {
|
|
128
129
|
projectRegistryImports.push(`import ${JSON.stringify(generatedSceneModuleImport(scenePath))};`);
|
|
129
130
|
}
|
|
@@ -131,11 +132,19 @@ export async function compileScenes(options) {
|
|
|
131
132
|
builtinRegistryImports.push(`import ${JSON.stringify(generatedSceneModuleImport(scenePath))};`);
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
await
|
|
135
|
+
await writeGeneratedFile(path.join(generatedDir, 'scenes.generated.ts'), `${[
|
|
135
136
|
...builtinRegistryImports,
|
|
136
137
|
...projectRegistryImports,
|
|
137
138
|
].join('\n')}\n`);
|
|
138
|
-
await
|
|
139
|
+
await writeGeneratedFile(path.join(generatedDir, generatedSceneAssetsFileName), `${JSON.stringify([...projectAssets].sort(), null, 2)}\n`);
|
|
140
|
+
}
|
|
141
|
+
async function writeGeneratedFile(filePath, content) {
|
|
142
|
+
if (await exists(filePath) && await readFile(filePath, 'utf8') === content) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const temporaryPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
|
|
146
|
+
await writeFile(temporaryPath, content);
|
|
147
|
+
await rename(temporaryPath, filePath);
|
|
139
148
|
}
|
|
140
149
|
async function readProjectConfig(projectRoot) {
|
|
141
150
|
const configPath = path.join(projectRoot, pixifactProjectConfigFileName);
|
|
@@ -186,15 +186,15 @@ class CompileContext {
|
|
|
186
186
|
if (this.#textures.size === 0) {
|
|
187
187
|
return `export async function ${this.#prepareFunctionName()}() {}`;
|
|
188
188
|
}
|
|
189
|
+
this.#pixiImports.add('Assets');
|
|
189
190
|
this.#pixiImports.add('Texture');
|
|
190
|
-
this.#runtimeImports.add('loadSceneTexture');
|
|
191
191
|
const entries = [...this.#textures.entries()];
|
|
192
192
|
return [
|
|
193
193
|
...entries.map(([, variable]) => `let ${variable}: Texture;`),
|
|
194
194
|
'',
|
|
195
195
|
`export async function ${this.#prepareFunctionName()}() {`,
|
|
196
196
|
` [${entries.map(([, variable]) => variable).join(', ')}] = await Promise.all([`,
|
|
197
|
-
...entries.map(([texture]) => `
|
|
197
|
+
...entries.map(([texture]) => ` Assets.load<Texture>(${JSON.stringify(texture)}),`),
|
|
198
198
|
' ]);',
|
|
199
199
|
'}',
|
|
200
200
|
].join('\n');
|
|
@@ -9,8 +9,10 @@ const runtimeAnnounceEvent = 'pixifact:runtime:announce';
|
|
|
9
9
|
const runtimeRequestEvent = 'pixifact:runtime:request';
|
|
10
10
|
const runtimeResponseEvent = 'pixifact:runtime:response';
|
|
11
11
|
const runtimeApiRoot = '/__pixifact_runtime__';
|
|
12
|
+
const runtimeScreenshotPath = `${runtimeApiRoot}/screenshot`;
|
|
12
13
|
const virtualRuntimeClientId = 'virtual:pixifact-runtime-client';
|
|
13
14
|
const resolvedVirtualRuntimeClientId = `\0${virtualRuntimeClientId}`;
|
|
15
|
+
const pngSignature = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
|
|
14
16
|
function isRecord(value) {
|
|
15
17
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
16
18
|
}
|
|
@@ -57,6 +59,27 @@ function isRuntimeRequest(value) {
|
|
|
57
59
|
&& typeof value.key === 'string'
|
|
58
60
|
&& value.key.length > 0;
|
|
59
61
|
}
|
|
62
|
+
function runtimeScreenshotResult(value) {
|
|
63
|
+
if (!isRecord(value)
|
|
64
|
+
|| typeof value.runtimeId !== 'string'
|
|
65
|
+
|| !Number.isInteger(value.width)
|
|
66
|
+
|| Number(value.width) <= 0
|
|
67
|
+
|| !Number.isInteger(value.height)
|
|
68
|
+
|| Number(value.height) <= 0
|
|
69
|
+
|| typeof value.dataUrl !== 'string') {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
const match = value.dataUrl.match(/^data:image\/png;base64,([A-Za-z0-9+/]+={0,2})$/);
|
|
73
|
+
const png = match ? Buffer.from(match[1], 'base64') : undefined;
|
|
74
|
+
if (!png || !png.subarray(0, pngSignature.length).equals(pngSignature))
|
|
75
|
+
return undefined;
|
|
76
|
+
return {
|
|
77
|
+
runtimeId: value.runtimeId,
|
|
78
|
+
width: Number(value.width),
|
|
79
|
+
height: Number(value.height),
|
|
80
|
+
png,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
60
83
|
export function createRuntimeHostSession(options) {
|
|
61
84
|
const requestTimeoutMs = options.requestTimeoutMs ?? 5_000;
|
|
62
85
|
const now = options.now ?? (() => new Date());
|
|
@@ -96,6 +119,29 @@ export function createRuntimeHostSession(options) {
|
|
|
96
119
|
}
|
|
97
120
|
}
|
|
98
121
|
}
|
|
122
|
+
function forwardRequest(runtime, request, responseType) {
|
|
123
|
+
const requestId = `runtime-${++requestSequence}`;
|
|
124
|
+
return new Promise((resolve) => {
|
|
125
|
+
const timeout = setTimeout(() => {
|
|
126
|
+
settle(requestId, jsonResponse({
|
|
127
|
+
ok: false,
|
|
128
|
+
error: 'Pixifact Runtime request timed out.',
|
|
129
|
+
}, 504));
|
|
130
|
+
}, requestTimeoutMs);
|
|
131
|
+
pending.set(requestId, {
|
|
132
|
+
resolve,
|
|
133
|
+
runtimeId: runtime.runtimeId,
|
|
134
|
+
socket: runtime.socket,
|
|
135
|
+
responseType,
|
|
136
|
+
timeout,
|
|
137
|
+
});
|
|
138
|
+
runtime.socket.send(runtimeRequestEvent, {
|
|
139
|
+
requestId,
|
|
140
|
+
runtimeId: runtime.runtimeId,
|
|
141
|
+
request,
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
99
145
|
function message(socket, event, data) {
|
|
100
146
|
if (!sockets.has(socket))
|
|
101
147
|
return;
|
|
@@ -122,9 +168,38 @@ export function createRuntimeHostSession(options) {
|
|
|
122
168
|
const current = pending.get(data.requestId);
|
|
123
169
|
if (!current || current.socket !== socket || current.runtimeId !== data.runtimeId)
|
|
124
170
|
return;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
171
|
+
if (!data.ok) {
|
|
172
|
+
settle(data.requestId, jsonResponse({ ok: false, error: data.error }, 422));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (current.responseType === 'json') {
|
|
176
|
+
settle(data.requestId, jsonResponse(data.result));
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const screenshot = runtimeScreenshotResult(data.result);
|
|
180
|
+
if (!screenshot) {
|
|
181
|
+
settle(data.requestId, jsonResponse({
|
|
182
|
+
ok: false,
|
|
183
|
+
error: 'Pixifact Runtime returned invalid screenshot data.',
|
|
184
|
+
}, 502));
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (screenshot.runtimeId !== data.runtimeId) {
|
|
188
|
+
settle(data.requestId, jsonResponse({
|
|
189
|
+
ok: false,
|
|
190
|
+
error: 'Pixifact Runtime returned a screenshot for a different runtime.',
|
|
191
|
+
}, 502));
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
settle(data.requestId, new Response(screenshot.png, {
|
|
195
|
+
headers: {
|
|
196
|
+
'cache-control': 'no-store',
|
|
197
|
+
'content-type': 'image/png',
|
|
198
|
+
'x-pixifact-height': String(screenshot.height),
|
|
199
|
+
'x-pixifact-runtime': screenshot.runtimeId,
|
|
200
|
+
'x-pixifact-width': String(screenshot.width),
|
|
201
|
+
},
|
|
202
|
+
}));
|
|
128
203
|
}
|
|
129
204
|
async function fetchRequest(request) {
|
|
130
205
|
const pathname = new URL(request.url).pathname;
|
|
@@ -150,6 +225,23 @@ export function createRuntimeHostSession(options) {
|
|
|
150
225
|
.sort((left, right) => left.connectedAt.localeCompare(right.connectedAt)),
|
|
151
226
|
});
|
|
152
227
|
}
|
|
228
|
+
if (pathname === runtimeScreenshotPath) {
|
|
229
|
+
if (request.method !== 'POST') {
|
|
230
|
+
return jsonResponse({ ok: false, error: 'Pixifact Runtime screenshot requests require POST.' }, 405);
|
|
231
|
+
}
|
|
232
|
+
const body = await request.json();
|
|
233
|
+
if (!isRecord(body) || typeof body.runtimeId !== 'string') {
|
|
234
|
+
return jsonResponse({ ok: false, error: 'Pixifact Runtime screenshot request is invalid.' }, 400);
|
|
235
|
+
}
|
|
236
|
+
const runtime = runtimes.get(body.runtimeId);
|
|
237
|
+
if (!runtime) {
|
|
238
|
+
return jsonResponse({
|
|
239
|
+
ok: false,
|
|
240
|
+
error: `Pixifact Runtime "${body.runtimeId}" is not connected.`,
|
|
241
|
+
}, 404);
|
|
242
|
+
}
|
|
243
|
+
return forwardRequest(runtime, { type: 'screenshot' }, 'screenshot');
|
|
244
|
+
}
|
|
153
245
|
if (pathname !== `${runtimeApiRoot}/request`)
|
|
154
246
|
return undefined;
|
|
155
247
|
if (request.method !== 'POST') {
|
|
@@ -166,26 +258,7 @@ export function createRuntimeHostSession(options) {
|
|
|
166
258
|
error: `Pixifact Runtime "${body.runtimeId}" is not connected.`,
|
|
167
259
|
}, 404);
|
|
168
260
|
}
|
|
169
|
-
|
|
170
|
-
return new Promise((resolve) => {
|
|
171
|
-
const timeout = setTimeout(() => {
|
|
172
|
-
settle(requestId, jsonResponse({
|
|
173
|
-
ok: false,
|
|
174
|
-
error: 'Pixifact Runtime request timed out.',
|
|
175
|
-
}, 504));
|
|
176
|
-
}, requestTimeoutMs);
|
|
177
|
-
pending.set(requestId, {
|
|
178
|
-
resolve,
|
|
179
|
-
runtimeId: runtime.runtimeId,
|
|
180
|
-
socket: runtime.socket,
|
|
181
|
-
timeout,
|
|
182
|
-
});
|
|
183
|
-
runtime.socket.send(runtimeRequestEvent, {
|
|
184
|
-
requestId,
|
|
185
|
-
runtimeId: runtime.runtimeId,
|
|
186
|
-
request: body.request,
|
|
187
|
-
});
|
|
188
|
-
});
|
|
261
|
+
return forwardRequest(runtime, body.request, 'json');
|
|
189
262
|
}
|
|
190
263
|
return {
|
|
191
264
|
open,
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { type Plugin } from 'vite';
|
|
2
|
+
export type PixifactPlatform = 'web' | 'wechat' | 'douyin';
|
|
3
|
+
export interface PixifactPluginOptions {
|
|
2
4
|
projectRoot?: string | URL;
|
|
3
|
-
generatedDir?: string;
|
|
4
5
|
}
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export interface PixifactBuildReport {
|
|
7
|
+
mainPackageBytes: number;
|
|
8
|
+
outputDirectory: string;
|
|
9
|
+
platform: PixifactPlatform;
|
|
10
|
+
subpackages: Record<string, number>;
|
|
11
|
+
totalPackageBytes: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function pixifact(options?: PixifactPluginOptions): Plugin[];
|
|
14
|
+
export declare function pixifactBuildReporter(platform: PixifactPlatform, onReport: (report: PixifactBuildReport) => void): Plugin;
|
|
15
|
+
export declare function loadPixifactEnv(projectRoot: string, mode: string): {
|
|
16
|
+
env: Record<string, string>;
|
|
17
|
+
platform: PixifactPlatform;
|
|
9
18
|
};
|
|
19
|
+
export declare function fileExists(filePath: string): Promise<boolean>;
|