@openfairygui/functions 0.2.0-alpha.19 → 0.2.0-alpha.20
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/README.md +7 -2
- package/dist/index.cjs +3 -920
- package/dist/index.d.cts +2 -46
- package/dist/index.d.ts +3 -47
- package/dist/index.js +2 -919
- package/dist/node.cjs +138 -10
- package/dist/node.d.cts +7 -2
- package/dist/node.d.ts +8 -3
- package/dist/node.js +138 -11
- package/dist/{publish-DsPK0SJ1.js → publish-BJ_eelME.js} +1973 -2070
- package/dist/{publish-D7268_u4.cjs → publish-xFWT9Slz.cjs} +1973 -2070
- package/dist/restore-BW2xacB3.cjs +936 -0
- package/dist/{codegen-B8ZM1F4j.d.cts → restore-BeWaJNjR.d.cts} +49 -3
- package/dist/restore-Clk62n0O.js +931 -0
- package/dist/{codegen-CfbDHuFt.d.ts → restore-Dh0-Nvms.d.ts} +50 -4
- package/dist/web.cjs +4 -2
- package/dist/web.d.ts +1 -1
- package/dist/web.js +4 -2
- package/package.json +5 -2
- package/src/adapters/node/restore.ts +187 -0
- package/src/adapters/web/publish.ts +1 -247
- package/src/adapters/web/raster.ts +251 -0
- package/src/atlas/font.ts +95 -0
- package/src/atlas/inputs.ts +515 -0
- package/src/atlas/jta.ts +211 -0
- package/src/atlas/packing.ts +767 -0
- package/src/atlas.ts +23 -1639
- package/src/node.ts +4 -0
- package/src/publish/external-resources.ts +117 -0
- package/src/publish/options.ts +180 -0
- package/src/publish/package-context.ts +608 -0
- package/src/publish/resource-references.ts +210 -0
- package/src/publish.ts +21 -1130
- package/src/restore-internals/font.ts +100 -0
- package/src/restore-internals/movie-clip.ts +104 -0
- package/src/restore-internals/output-transaction.ts +164 -0
- package/src/restore.ts +14 -329
- /package/dist/{atlas-CDn6TirX.d.ts → atlas-C6tbl7nn.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -13,16 +13,21 @@ npm install --save @openfairygui/core @openfairygui/functions
|
|
|
13
13
|
```ts
|
|
14
14
|
import { NodeIO } from '@openfairygui/core/node';
|
|
15
15
|
import { inspect } from '@openfairygui/functions';
|
|
16
|
-
import { publishNode } from '@openfairygui/functions/node';
|
|
16
|
+
import { publishNode, restoreNode } from '@openfairygui/functions/node';
|
|
17
17
|
|
|
18
18
|
const io = new NodeIO();
|
|
19
19
|
const doc = await io.readProject('./MyProject/MyProject.fairy');
|
|
20
20
|
|
|
21
21
|
const report = inspect(doc);
|
|
22
22
|
await publishNode({ document: doc, output: './release' });
|
|
23
|
+
|
|
24
|
+
await restoreNode({
|
|
25
|
+
inputDir: './release',
|
|
26
|
+
output: './restored-project',
|
|
27
|
+
});
|
|
23
28
|
```
|
|
24
29
|
|
|
25
|
-
`publishNode` owns the standard Node filesystem, Sharp raster backend, and project plugin discovery.
|
|
30
|
+
`publishNode` owns the standard Node filesystem, Sharp raster backend, and project plugin discovery. `restoreNode` owns the Node filesystem and Sharp image extraction required by trusted-local artifact recovery. The root `publish()` and `restore()` exports remain the lower-level capability-injected workflows for custom hosts.
|
|
26
31
|
|
|
27
32
|
## Browser LayaBox publish
|
|
28
33
|
|