@expofp/offline 3.0.0-alpha.14 → 3.0.0-alpha.16
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 +10 -58
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
## Offline: generating ZIPs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `@expofp/offline` package provides a CLI (`expofp-offline`) that creates self-contained ZIP archives of floor plans. The ZIP can be opened in any browser without internet connectivity.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx expofp-
|
|
8
|
+
npx @expofp/offline@<tag-or-version> <manifest-url> [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| Argument | Description |
|
|
14
|
-
| -------------- | ----------------------------------- |
|
|
15
|
-
| `manifest-url` | URL to the floor plan manifest JSON |
|
|
16
|
-
|
|
17
|
-
### Options
|
|
11
|
+
Use a dist-tag or exact version to match the deployed floor plan (e.g. `@latest`, `@next`, `@customer1`, `@3.0.0-alpha.9`).
|
|
18
12
|
|
|
19
13
|
| Option | Description | Default |
|
|
20
14
|
| ----------------- | ------------------- | ------------- |
|
|
@@ -25,55 +19,13 @@ npx expofp-offline <manifest-url> [options]
|
|
|
25
19
|
### Example
|
|
26
20
|
|
|
27
21
|
```bash
|
|
28
|
-
npx expofp
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Programmatic API
|
|
32
|
-
|
|
33
|
-
### `buildOfflineZip(manifest, options): Promise<Blob>`
|
|
34
|
-
|
|
35
|
-
Generates a complete offline ZIP archive as a `Blob`. Works in both browser and Node.js.
|
|
36
|
-
|
|
37
|
-
```ts
|
|
38
|
-
import { buildOfflineZip } from '@expofp/offline';
|
|
39
|
-
|
|
40
|
-
const blob = await buildOfflineZip(
|
|
41
|
-
{ $ref: 'https://demo.expofp.com/manifest.json' },
|
|
42
|
-
{ runtimeBaseUrl: 'https://cdn.expofp.com/runtime/' },
|
|
43
|
-
);
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### `downloadOfflineZip(manifest, options): Promise<void>`
|
|
47
|
-
|
|
48
|
-
Builds the ZIP and triggers a browser download. Browser-only.
|
|
49
|
-
|
|
50
|
-
```ts
|
|
51
|
-
import { downloadOfflineZip } from '@expofp/offline';
|
|
52
|
-
|
|
53
|
-
await downloadOfflineZip(manifest, {
|
|
54
|
-
runtimeBaseUrl: 'https://cdn.expofp.com/runtime/',
|
|
55
|
-
});
|
|
22
|
+
npx @expofp/offline@next https://demo.expofp.com/manifest.json -o offline.zip
|
|
56
23
|
```
|
|
57
24
|
|
|
58
|
-
###
|
|
59
|
-
|
|
60
|
-
Builds the ZIP and writes it to disk. Node.js-only.
|
|
25
|
+
### Debugging
|
|
61
26
|
|
|
62
|
-
|
|
63
|
-
import { saveOfflineZip } from '@expofp/offline';
|
|
27
|
+
Enable debug output with the `DEBUG` env variable:
|
|
64
28
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Options
|
|
71
|
-
|
|
72
|
-
```ts
|
|
73
|
-
interface OfflineOptions {
|
|
74
|
-
/** Base URL of the @expofp/floorplan runtime assets */
|
|
75
|
-
runtimeBaseUrl: string;
|
|
76
|
-
/** AbortSignal to cancel the operation */
|
|
77
|
-
signal?: AbortSignal;
|
|
78
|
-
}
|
|
29
|
+
```bash
|
|
30
|
+
DEBUG=efp:offline:* npx @expofp/offline https://...
|
|
79
31
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/offline",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tool for creating offline copies of ExpoFP floor plans",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"debug": "^4.4.3",
|
|
32
32
|
"tslib": "^2.3.0",
|
|
33
|
-
"@expofp/
|
|
34
|
-
"@expofp/
|
|
35
|
-
"@expofp/utils": "3.0.0-alpha.
|
|
36
|
-
"@expofp/
|
|
33
|
+
"@expofp/floorplan": "3.0.0-alpha.16",
|
|
34
|
+
"@expofp/resolve": "3.0.0-alpha.16",
|
|
35
|
+
"@expofp/utils": "3.0.0-alpha.16",
|
|
36
|
+
"@expofp/data": "3.0.0-alpha.16"
|
|
37
37
|
}
|
|
38
38
|
}
|