@zktx.io/walrus-sites-preview 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. package/README.md +9 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -14,18 +14,6 @@ Installable CLI to preview Walrus Sites locally:
14
14
  npm i -D @zktx.io/walrus-sites-preview
15
15
  ```
16
16
 
17
- ## Run (recommended via `npx`)
18
-
19
- ```sh
20
- npx preview -testnet -id 0xYOUR_SITE_OBJECT_ID -port 3000
21
- ```
22
-
23
- This starts a local server at `http://localhost:3000`. Running `preview` without options prints help.
24
-
25
- You can inspect the effective config at `http://localhost:3000/__config`.
26
-
27
- If you prefer a file-based config, create `config.json` next to your `package.json` and pass overrides as needed (the CLI flags win).
28
-
29
17
  ## Run (via npm script)
30
18
 
31
19
  Add this to your project:
@@ -46,6 +34,12 @@ Then run:
46
34
  npm run preview:testnet
47
35
  ```
48
36
 
37
+ This starts a local server at `http://localhost:3000`.
38
+
39
+ You can inspect the effective config at `http://localhost:3000/__config`.
40
+
41
+ If you prefer a file-based config, create `config.json` next to your `package.json` and pass overrides as needed (the CLI flags win).
42
+
49
43
  To pass arguments dynamically, use `--`:
50
44
 
51
45
  ```sh
@@ -57,8 +51,9 @@ npm run preview -- -testnet -id 0xYOUR_SITE_OBJECT_ID -port 3000
57
51
  This section is for maintainers of this package. Consumers don’t need to build `dist/` manually (it ships in the npm package).
58
52
 
59
53
  - Vendored from the walrus-sites portal codebase:
60
- - `portal/worker` `./portal-worker`
61
- - `portal/common` → `./portal-common`
54
+ - Source repo: https://github.com/MystenLabs/walrus-sites/tree/main/portal
55
+ - `portal/worker` → `./portal-worker`
56
+ - `portal/common` → `./portal-common`
62
57
  - Source: `./portal-worker/src` (service worker TS) and `./portal-worker/static` (static assets)
63
58
  - Shared libs: `./portal-common/lib/src` (shared implementation used by the worker)
64
59
  - Build configs: `./webpack.config.*.cjs` (kept in this repo, not published)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zktx.io/walrus-sites-preview",
3
3
  "description": "Local preview CLI for Walrus Sites (fetch from Sui + Walrus, or serve bundled static portal dist).",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "preview": "preview.mjs"