@meddleware/token-deployer-ui 0.0.10 → 0.0.11

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 (87) hide show
  1. package/README.md +8 -5
  2. package/package.json +19 -8
  3. package/src/App.vue +1 -1
  4. package/src/component-styles.css +39 -57
  5. package/src/components/GithubPush.vue +2 -2
  6. package/src/components/IconPicker.vue +44 -75
  7. package/src/components/LicensePicker.vue +2 -2
  8. package/src/components/ResultPanel.vue +2 -2
  9. package/src/components/ReviewPanel.vue +11 -3
  10. package/src/components/TokenDeployerView.vue +52 -48
  11. package/src/components/WalletBar.vue +12 -1
  12. package/src/components/WalrusBlobBrowser.vue +4 -4
  13. package/src/composables/useWalrusRelay.ts +1 -2
  14. package/src/config.ts +19 -17
  15. package/src/lib/buildPublishTx.ts +0 -10
  16. package/src/lib/deploy.ts +9 -3
  17. package/src/lib/deployExecutor.ts +18 -45
  18. package/src/lib/template.ts +3 -0
  19. package/src/lib/walrus-constants.ts +2 -2
  20. package/src/main.ts +4 -6
  21. package/src/styles.css +22 -0
  22. package/.claude/move-language-reference/SKILL.md +0 -445
  23. package/.claude/skills/move-language-reference/SKILL.md +0 -445
  24. package/.claude/skills/sui-move-bootcamp/SKILL.md +0 -128
  25. package/.claude/sui-move-bootcamp/SKILL.md +0 -128
  26. package/.editorconfig +0 -8
  27. package/.env.example +0 -72
  28. package/.gitattributes +0 -1
  29. package/.github/workflows/docker-publish.yml +0 -348
  30. package/.github/workflows/e2e-realchain.yml +0 -64
  31. package/.github/workflows/node-ci.yml +0 -43
  32. package/.github/workflows/npm-publish.yml +0 -83
  33. package/.htmlvalidate.mjs +0 -30
  34. package/.oxfmtrc.json +0 -5
  35. package/.oxlintrc.json +0 -10
  36. package/.vscode/extensions.json +0 -9
  37. package/AGENTS.md +0 -39
  38. package/CLAUDE.md +0 -166
  39. package/Dockerfile +0 -96
  40. package/eslint.config.ts +0 -63
  41. package/index.html +0 -22
  42. package/playwright.config.ts +0 -30
  43. package/postcss.config.js +0 -8
  44. package/public/CNAME +0 -1
  45. package/public/_headers +0 -12
  46. package/public/_redirects +0 -1
  47. package/public/favicon.ico +0 -0
  48. package/public/favicon.svg +0 -5
  49. package/public/og-image.png +0 -0
  50. package/public/robots.txt +0 -3
  51. package/public/sitemap.xml +0 -8
  52. package/scripts/e2e-browser.mjs +0 -15
  53. package/scripts/e2e-deploy.mjs +0 -227
  54. package/scripts/e2e-localnet.mjs +0 -67
  55. package/scripts/e2e-walrus-browser.mjs +0 -112
  56. package/scripts/gen-og-image.mjs +0 -31
  57. package/scripts/publish-localnet.mjs +0 -56
  58. package/scripts/regen-template.sh +0 -45
  59. package/scripts/sync-template-src.sh +0 -36
  60. package/scripts/verify-bytecode.mjs +0 -49
  61. package/src/__tests__/App.spec.js +0 -11
  62. package/src/composables/useAccessGate.ts +0 -127
  63. package/src/lib/accessGate.ts +0 -155
  64. package/src/lib/walrus.ts +0 -155
  65. package/stylelint.config.js +0 -33
  66. package/test-results/.last-run.json +0 -4
  67. package/tests/accessGate.test.ts +0 -113
  68. package/tests/buildPublishTx.test.ts +0 -243
  69. package/tests/deploy.test.ts +0 -149
  70. package/tests/errors.test.ts +0 -32
  71. package/tests/generatePackage.test.ts +0 -193
  72. package/tests/github.test.ts +0 -61
  73. package/tests/licenses.test.ts +0 -81
  74. package/tests/listMyTokens.test.ts +0 -30
  75. package/tests/template.test.ts +0 -93
  76. package/tests/templateArtifact.test.ts +0 -61
  77. package/tests/templateParity.test.ts +0 -55
  78. package/tests/useAccessGate.test.ts +0 -97
  79. package/tests/useWallet.test.ts +0 -74
  80. package/tests/useWalrusRelayGating.test.ts +0 -30
  81. package/tests/validation.test.ts +0 -117
  82. package/tests/walrusUpload.test.ts +0 -93
  83. package/tests/walrus_url_patch.test.ts +0 -26
  84. package/tsconfig.json +0 -19
  85. package/typedoc.json +0 -34
  86. package/vite.config.ts +0 -73
  87. package/vitest.config.ts +0 -10
package/.env.example DELETED
@@ -1,72 +0,0 @@
1
- # Copy to .env (or set in the Cloudflare Pages dashboard) before deploying.
2
- # All are optional; sensible public defaults are used when unset.
3
- #
4
- # Canonical domain: sui-token-deployer.meddleware.co.uk (k8s SPA, primary)
5
- # GitHub Pages mirror: meddleware.github.io/vault/token-deployer-ui/
6
-
7
- # Operator fee (MIST) split from the user's gas coin into your treasury.
8
- # Default 1 SUI (1000000000 MIST) — trivial, ~7.5x under competitor pricing.
9
- VITE_FEE_MIST=1000000000
10
-
11
- # Operator treasury addresses per network (REQUIRED for the fee to be collected).
12
- # The committed operator defaults live in `.env.production` (auto-loaded by
13
- # `vite build`). A production build FAILS if a selectable network's treasury is
14
- # still the zero address, so revenue can never silently burn — set both below or
15
- # in `.env.production`. Set VITE_ALLOW_UNSET_TREASURY=1 to bypass (dev/e2e only).
16
- VITE_FEE_TREASURY_TESTNET=0xe6b2810abfc5a6f37a375f73e3ba76cfc37584196e453255ad3c9ca2f0ede0ed
17
- VITE_FEE_TREASURY_MAINNET=0xe6b2810abfc5a6f37a375f73e3ba76cfc37584196e453255ad3c9ca2f0ede0ed
18
-
19
- # Optional gRPC fullnode overrides. Set a paid/private endpoint for production to avoid
20
- # public rate limits. These must be gRPC(-web) endpoints — public fullnodes have deprecated
21
- # JSON-RPC. The same VITE_RPC_TESTNET is what the real-chain e2e (npm run e2e:testnet)
22
- # builds against; point E2E_RPC at the same endpoint.
23
- # VITE_RPC_TESTNET=https://fullnode.testnet.sui.io:443
24
- # VITE_RPC_MAINNET=https://fullnode.mainnet.sui.io:443
25
-
26
- # Optional publish gas budget (MIST).
27
- # VITE_PUBLISH_GAS_BUDGET=500000000
28
-
29
- # --- Walrus icon upload -----------------------------------------------------
30
- # Operator's own upload relay per network. Set these to a relay YOU run (the
31
- # stock mysten/walrus-upload-relay container) to collect the native per-upload
32
- # tip as revenue. Unset → the public Mysten relay is used (uploads still work
33
- # but tip Mysten, not you). See the relay runbook in README.md / CLAUDE.md.
34
- # VITE_WALRUS_RELAY_TESTNET=https://sui-walrus-relay-testnet.meddleware.co.uk
35
- # VITE_WALRUS_RELAY_MAINNET=https://sui-walrus-relay.meddleware.co.uk
36
-
37
- # Optional separate gRPC fullnode for the Walrus icon-upload client. Defaults to
38
- # VITE_RPC_* (also gRPC); set only if Walrus traffic should use a different node.
39
- # VITE_WALRUS_RPC_TESTNET=https://fullnode.testnet.sui.io:443
40
- # VITE_WALRUS_RPC_MAINNET=https://fullnode.mainnet.sui.io:443
41
-
42
- # Client-side max relay tip (MIST). COUPLING: the Walrus SDK hard-fails an upload
43
- # if your relay's tip exceeds this, so keep it comfortably ABOVE the relay tip.
44
- # Default 0.05 SUI. Raising the relay tip past this needs a frontend redeploy.
45
- # VITE_WALRUS_MAX_TIP_MIST=50000000
46
-
47
- # NFT-gated relay access (OPTIONAL). If your operator relay runs behind an
48
- # `nft-gate` gateway, set these to require holders of the access NFT. When UNSET,
49
- # the relay behaves exactly as before (no gating). Values come from the
50
- # access_gate publish (`.env.<network>`: ACCESS_GATE_PACKAGE_ID, ACCESS_GATE_GATE_ID,
51
- # and ACCESS_NFT_TYPE or SOULBOUND_NFT_TYPE). Set all three (PACKAGE/ID/NFT_TYPE)
52
- # to enable. Per-network isolation is automatic (the NFT type embeds the package id).
53
- # VITE_ACCESS_GATE_PACKAGE_TESTNET=0x…
54
- # VITE_ACCESS_GATE_ID_TESTNET=0x…
55
- # VITE_ACCESS_GATE_NFT_TYPE_TESTNET=0x…::access_gate::SoulboundAccessNFT
56
- # VITE_ACCESS_GATE_SOULBOUND_TESTNET=true # selects consume vs consume_soulbound
57
- # VITE_ACCESS_GATE_PRICE_MIST_TESTNET=0 # display + purchase price
58
- # VITE_ACCESS_GATE_PACKAGE_MAINNET=0x…
59
- # VITE_ACCESS_GATE_ID_MAINNET=0x…
60
- # VITE_ACCESS_GATE_NFT_TYPE_MAINNET=0x…::access_gate::SoulboundAccessNFT
61
- # VITE_ACCESS_GATE_SOULBOUND_MAINNET=true
62
- # VITE_ACCESS_GATE_PRICE_MIST_MAINNET=0
63
-
64
- # Icon constraints (UX/cost guard only — the authoritative cap is the edge body
65
- # limit in front of the relay). Default 100 KiB; PNG/JPEG/WebP/SVG.
66
- # VITE_ICON_MAX_BYTES=102400
67
- # VITE_ICON_ALLOWED_TYPES=image/png,image/jpeg,image/webp,image/svg+xml
68
-
69
- # Public site origin for canonical/OpenGraph/JSON-LD URLs (index.html). Committed
70
- # defaults live in .env.production / .env.development; a staging deploy should set
71
- # this so it never claims the production URL.
72
- # VITE_PUBLIC_URL=https://sui-token-deployer.meddleware.co.uk
package/.gitattributes DELETED
@@ -1 +0,0 @@
1
- * text=auto eol=lf
@@ -1,348 +0,0 @@
1
- name: Publish (Docker)
2
- on:
3
- push:
4
- tags:
5
- - "v*"
6
-
7
- env:
8
- IMAGE: token-deployer-ui
9
-
10
- jobs:
11
- verify:
12
- name: Verify (type-check + test)
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v7.0.1
16
- - uses: actions/setup-node@v7.0.0
17
- with:
18
- node-version: '24'
19
- - name: Install dependencies
20
- run: npm ci
21
- - name: Audit dependencies
22
- run: npm audit --audit-level=high
23
- - name: Type-check
24
- run: npm run type-check --if-present
25
- - name: Unit tests
26
- run: npm run test --if-present
27
-
28
- build-docker-amd64-public:
29
- name: Docker amd64 (quay.io + Docker Hub)
30
- runs-on: ubuntu-latest
31
- needs: verify
32
- permissions:
33
- contents: read
34
- steps:
35
- - uses: actions/checkout@v7.0.1
36
- - uses: docker/setup-buildx-action@v4.3.0
37
-
38
- - name: Log in to quay.io
39
- uses: docker/login-action@v4.6.0
40
- with:
41
- registry: quay.io
42
- username: ${{ secrets.QUAY_USERNAME }}
43
- password: ${{ secrets.QUAY_TOKEN }}
44
-
45
- - name: Log in to Docker Hub
46
- uses: docker/login-action@v4.6.0
47
- with:
48
- registry: docker.io
49
- username: ${{ secrets.DOCKERHUB_USERNAME }}
50
- password: ${{ secrets.DOCKERHUB_TOKEN }}
51
-
52
- - name: Build and push (linux/amd64)
53
- uses: docker/build-push-action@v7.3.0
54
- with:
55
- context: .
56
- platforms: linux/amd64
57
- push: true
58
- tags: |
59
- quay.io/${{ vars.QUAY_NAMESPACE }}/${{ env.IMAGE }}:${{ github.sha }}-amd64
60
- docker.io/${{ vars.DOCKERHUB_NAMESPACE }}/${{ env.IMAGE }}:${{ github.sha }}-amd64
61
- cache-from: type=gha,scope=amd64-public
62
- cache-to: type=gha,scope=amd64-public,mode=max
63
- build-args: |
64
- VITE_NETWORK=${{ vars.VITE_NETWORK || 'testnet' }}
65
- VITE_FEE_TREASURY_TESTNET=${{ vars.VITE_FEE_TREASURY_TESTNET }}
66
- VITE_FEE_TREASURY_MAINNET=${{ vars.VITE_FEE_TREASURY_MAINNET }}
67
- VITE_FEE_MIST=${{ vars.VITE_FEE_MIST }}
68
- VITE_WALRUS_RELAY_TESTNET=${{ vars.VITE_WALRUS_RELAY_TESTNET }}
69
- VITE_WALRUS_RELAY_MAINNET=${{ vars.VITE_WALRUS_RELAY_MAINNET }}
70
- VITE_ACCESS_GATE_ID_TESTNET=${{ vars.VITE_ACCESS_GATE_ID_TESTNET }}
71
- VITE_ACCESS_GATE_NFT_TYPE_TESTNET=${{ vars.VITE_ACCESS_GATE_NFT_TYPE_TESTNET }}
72
- VITE_ACCESS_GATE_SOULBOUND_TESTNET=${{ vars.VITE_ACCESS_GATE_SOULBOUND_TESTNET }}
73
- VITE_ACCESS_GATE_PRICE_MIST_TESTNET=${{ vars.VITE_ACCESS_GATE_PRICE_MIST_TESTNET }}
74
- VITE_ACCESS_GATE_ID_MAINNET=${{ vars.VITE_ACCESS_GATE_ID_MAINNET }}
75
- VITE_ACCESS_GATE_NFT_TYPE_MAINNET=${{ vars.VITE_ACCESS_GATE_NFT_TYPE_MAINNET }}
76
- VITE_ACCESS_GATE_SOULBOUND_MAINNET=${{ vars.VITE_ACCESS_GATE_SOULBOUND_MAINNET }}
77
- VITE_ACCESS_GATE_PRICE_MIST_MAINNET=${{ vars.VITE_ACCESS_GATE_PRICE_MIST_MAINNET }}
78
- VITE_WALRUS_MAX_TIP_MIST=${{ vars.VITE_WALRUS_MAX_TIP_MIST }}
79
- VITE_PUBLIC_URL=${{ vars.VITE_PUBLIC_URL }}
80
-
81
- build-docker-arm64-public:
82
- name: Docker arm64 (quay.io + Docker Hub)
83
- runs-on: ubuntu-24.04-arm
84
- needs: verify
85
- permissions:
86
- contents: read
87
- steps:
88
- - uses: actions/checkout@v7.0.1
89
- - uses: docker/setup-buildx-action@v4.3.0
90
-
91
- - name: Log in to quay.io
92
- uses: docker/login-action@v4.6.0
93
- with:
94
- registry: quay.io
95
- username: ${{ secrets.QUAY_USERNAME }}
96
- password: ${{ secrets.QUAY_TOKEN }}
97
-
98
- - name: Log in to Docker Hub
99
- uses: docker/login-action@v4.6.0
100
- with:
101
- registry: docker.io
102
- username: ${{ secrets.DOCKERHUB_USERNAME }}
103
- password: ${{ secrets.DOCKERHUB_TOKEN }}
104
-
105
- - name: Build and push (linux/arm64)
106
- uses: docker/build-push-action@v7.3.0
107
- with:
108
- context: .
109
- platforms: linux/arm64
110
- push: true
111
- tags: |
112
- quay.io/${{ vars.QUAY_NAMESPACE }}/${{ env.IMAGE }}:${{ github.sha }}-arm64
113
- docker.io/${{ vars.DOCKERHUB_NAMESPACE }}/${{ env.IMAGE }}:${{ github.sha }}-arm64
114
- cache-from: type=gha,scope=arm64-public
115
- cache-to: type=gha,scope=arm64-public,mode=max
116
- build-args: |
117
- VITE_NETWORK=${{ vars.VITE_NETWORK || 'testnet' }}
118
- VITE_FEE_TREASURY_TESTNET=${{ vars.VITE_FEE_TREASURY_TESTNET }}
119
- VITE_FEE_TREASURY_MAINNET=${{ vars.VITE_FEE_TREASURY_MAINNET }}
120
- VITE_FEE_MIST=${{ vars.VITE_FEE_MIST }}
121
- VITE_WALRUS_RELAY_TESTNET=${{ vars.VITE_WALRUS_RELAY_TESTNET }}
122
- VITE_WALRUS_RELAY_MAINNET=${{ vars.VITE_WALRUS_RELAY_MAINNET }}
123
- VITE_ACCESS_GATE_ID_TESTNET=${{ vars.VITE_ACCESS_GATE_ID_TESTNET }}
124
- VITE_ACCESS_GATE_NFT_TYPE_TESTNET=${{ vars.VITE_ACCESS_GATE_NFT_TYPE_TESTNET }}
125
- VITE_ACCESS_GATE_SOULBOUND_TESTNET=${{ vars.VITE_ACCESS_GATE_SOULBOUND_TESTNET }}
126
- VITE_ACCESS_GATE_PRICE_MIST_TESTNET=${{ vars.VITE_ACCESS_GATE_PRICE_MIST_TESTNET }}
127
- VITE_ACCESS_GATE_ID_MAINNET=${{ vars.VITE_ACCESS_GATE_ID_MAINNET }}
128
- VITE_ACCESS_GATE_NFT_TYPE_MAINNET=${{ vars.VITE_ACCESS_GATE_NFT_TYPE_MAINNET }}
129
- VITE_ACCESS_GATE_SOULBOUND_MAINNET=${{ vars.VITE_ACCESS_GATE_SOULBOUND_MAINNET }}
130
- VITE_ACCESS_GATE_PRICE_MIST_MAINNET=${{ vars.VITE_ACCESS_GATE_PRICE_MIST_MAINNET }}
131
- VITE_WALRUS_MAX_TIP_MIST=${{ vars.VITE_WALRUS_MAX_TIP_MIST }}
132
- VITE_PUBLIC_URL=${{ vars.VITE_PUBLIC_URL }}
133
-
134
- merge-docker-public:
135
- name: Merge + sign (quay.io + Docker Hub)
136
- needs: [build-docker-amd64-public, build-docker-arm64-public]
137
- runs-on: ubuntu-latest
138
- permissions:
139
- contents: read
140
- id-token: write
141
- attestations: write
142
- steps:
143
- - uses: docker/setup-buildx-action@v4.3.0
144
-
145
- - name: Log in to quay.io
146
- uses: docker/login-action@v4.6.0
147
- with:
148
- registry: quay.io
149
- username: ${{ secrets.QUAY_USERNAME }}
150
- password: ${{ secrets.QUAY_TOKEN }}
151
-
152
- - name: Log in to Docker Hub
153
- uses: docker/login-action@v4.6.0
154
- with:
155
- registry: docker.io
156
- username: ${{ secrets.DOCKERHUB_USERNAME }}
157
- password: ${{ secrets.DOCKERHUB_TOKEN }}
158
-
159
- - name: Compute final tags and labels
160
- id: meta
161
- uses: docker/metadata-action@v6.2.0
162
- with:
163
- images: |
164
- quay.io/${{ vars.QUAY_NAMESPACE }}/${{ env.IMAGE }}
165
- docker.io/${{ vars.DOCKERHUB_NAMESPACE }}/${{ env.IMAGE }}
166
- tags: |
167
- type=semver,pattern={{version}}
168
- type=semver,pattern={{major}}.{{minor}}
169
- flavor: |
170
- latest=auto
171
-
172
- - name: Merge multi-arch manifests
173
- id: merge
174
- env:
175
- QUAY_NS: ${{ vars.QUAY_NAMESPACE }}
176
- DOCKERHUB_NS: ${{ vars.DOCKERHUB_NAMESPACE }}
177
- SHA: ${{ github.sha }}
178
- run: |
179
- QUAY_SRC="quay.io/${QUAY_NS}/${IMAGE}:${SHA}"
180
- HUB_SRC="docker.io/${DOCKERHUB_NS}/${IMAGE}:${SHA}"
181
-
182
- QUAY_FLAGS=""
183
- HUB_FLAGS=""
184
- while IFS= read -r tag; do
185
- if [[ "$tag" == quay.io/* ]]; then
186
- QUAY_FLAGS="$QUAY_FLAGS --tag $tag"
187
- elif [[ "$tag" == docker.io/* ]]; then
188
- HUB_FLAGS="$HUB_FLAGS --tag $tag"
189
- fi
190
- done <<< "${{ steps.meta.outputs.tags }}"
191
-
192
- docker buildx imagetools create $QUAY_FLAGS "${QUAY_SRC}-amd64" "${QUAY_SRC}-arm64"
193
- docker buildx imagetools create $HUB_FLAGS "${HUB_SRC}-amd64" "${HUB_SRC}-arm64"
194
-
195
- PRIMARY=$(echo "${{ steps.meta.outputs.tags }}" | grep 'quay.io' | grep -v 'latest' | head -1)
196
- DIGEST=$(docker buildx imagetools inspect "${PRIMARY}" --format '{{.Manifest.Digest}}')
197
- echo "digest=${DIGEST}" >> "$GITHUB_OUTPUT"
198
-
199
- - uses: sigstore/cosign-installer@v4.1.2
200
-
201
- - name: Sign images (keyless)
202
- env:
203
- DIGEST: ${{ steps.merge.outputs.digest }}
204
- QUAY_NS: ${{ vars.QUAY_NAMESPACE }}
205
- DOCKERHUB_NS: ${{ vars.DOCKERHUB_NAMESPACE }}
206
- run: |
207
- cosign sign --yes "quay.io/${QUAY_NS}/${IMAGE}@${DIGEST}"
208
- cosign sign --yes "docker.io/${DOCKERHUB_NS}/${IMAGE}@${DIGEST}"
209
-
210
- - name: Attest build provenance (quay.io)
211
- uses: actions/attest-build-provenance@v4.2.2
212
- continue-on-error: true
213
- with:
214
- subject-name: quay.io/${{ vars.QUAY_NAMESPACE }}/${{ env.IMAGE }}
215
- subject-digest: ${{ steps.merge.outputs.digest }}
216
- push-to-registry: true
217
-
218
- - name: Attest build provenance (Docker Hub)
219
- uses: actions/attest-build-provenance@v4.2.2
220
- continue-on-error: true
221
- with:
222
- subject-name: docker.io/${{ vars.DOCKERHUB_NAMESPACE }}/${{ env.IMAGE }}
223
- subject-digest: ${{ steps.merge.outputs.digest }}
224
- push-to-registry: true
225
-
226
- - name: Summary
227
- run: echo "Published & signed @ ${{ steps.merge.outputs.digest }}" >> "$GITHUB_STEP_SUMMARY"
228
-
229
- # ── Self-hosted registry (best-effort) ─────────────────────────────────────
230
-
231
- build-docker-amd64-private:
232
- name: Docker amd64 (self-hosted registry)
233
- runs-on: ubuntu-latest
234
- needs: verify
235
- continue-on-error: true
236
- permissions:
237
- contents: read
238
- steps:
239
- - uses: actions/checkout@v7.0.1
240
- - uses: docker/setup-buildx-action@v4.3.0
241
-
242
- - name: Log in to self-hosted registry
243
- uses: docker/login-action@v4.6.0
244
- with:
245
- registry: ${{ vars.PRIVATE_REGISTRY }}
246
- username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
247
- password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
248
-
249
- - name: Build and push (linux/amd64)
250
- uses: docker/build-push-action@v7.3.0
251
- with:
252
- context: .
253
- platforms: linux/amd64
254
- push: true
255
- tags: ${{ vars.PRIVATE_REGISTRY }}/${{ vars.PRIVATE_NAMESPACE }}/${{ env.IMAGE }}:${{ github.sha }}-amd64
256
- cache-from: type=gha,scope=amd64-private
257
- cache-to: type=gha,scope=amd64-private,mode=max
258
- build-args: |
259
- VITE_NETWORK=${{ vars.VITE_NETWORK || 'testnet' }}
260
- VITE_FEE_TREASURY_TESTNET=${{ vars.VITE_FEE_TREASURY_TESTNET }}
261
- VITE_FEE_TREASURY_MAINNET=${{ vars.VITE_FEE_TREASURY_MAINNET }}
262
- VITE_FEE_MIST=${{ vars.VITE_FEE_MIST }}
263
- VITE_WALRUS_RELAY_TESTNET=${{ vars.VITE_WALRUS_RELAY_TESTNET }}
264
- VITE_ACCESS_GATE_ID_TESTNET=${{ vars.VITE_ACCESS_GATE_ID_TESTNET }}
265
- VITE_ACCESS_GATE_NFT_TYPE_TESTNET=${{ vars.VITE_ACCESS_GATE_NFT_TYPE_TESTNET }}
266
- VITE_ACCESS_GATE_SOULBOUND_TESTNET=${{ vars.VITE_ACCESS_GATE_SOULBOUND_TESTNET }}
267
- VITE_ACCESS_GATE_PRICE_MIST_TESTNET=${{ vars.VITE_ACCESS_GATE_PRICE_MIST_TESTNET }}
268
- VITE_WALRUS_MAX_TIP_MIST=${{ vars.VITE_WALRUS_MAX_TIP_MIST }}
269
-
270
- build-docker-arm64-private:
271
- name: Docker arm64 (self-hosted registry)
272
- runs-on: ubuntu-24.04-arm
273
- needs: verify
274
- continue-on-error: true
275
- permissions:
276
- contents: read
277
- steps:
278
- - uses: actions/checkout@v7.0.1
279
- - uses: docker/setup-buildx-action@v4.3.0
280
-
281
- - name: Log in to self-hosted registry
282
- uses: docker/login-action@v4.6.0
283
- with:
284
- registry: ${{ vars.PRIVATE_REGISTRY }}
285
- username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
286
- password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
287
-
288
- - name: Build and push (linux/arm64)
289
- uses: docker/build-push-action@v7.3.0
290
- with:
291
- context: .
292
- platforms: linux/arm64
293
- push: true
294
- tags: ${{ vars.PRIVATE_REGISTRY }}/${{ vars.PRIVATE_NAMESPACE }}/${{ env.IMAGE }}:${{ github.sha }}-arm64
295
- cache-from: type=gha,scope=arm64-private
296
- cache-to: type=gha,scope=arm64-private,mode=max
297
- build-args: |
298
- VITE_NETWORK=${{ vars.VITE_NETWORK || 'testnet' }}
299
- VITE_FEE_TREASURY_TESTNET=${{ vars.VITE_FEE_TREASURY_TESTNET }}
300
- VITE_FEE_TREASURY_MAINNET=${{ vars.VITE_FEE_TREASURY_MAINNET }}
301
- VITE_FEE_MIST=${{ vars.VITE_FEE_MIST }}
302
- VITE_WALRUS_RELAY_TESTNET=${{ vars.VITE_WALRUS_RELAY_TESTNET }}
303
- VITE_ACCESS_GATE_ID_TESTNET=${{ vars.VITE_ACCESS_GATE_ID_TESTNET }}
304
- VITE_ACCESS_GATE_NFT_TYPE_TESTNET=${{ vars.VITE_ACCESS_GATE_NFT_TYPE_TESTNET }}
305
- VITE_ACCESS_GATE_SOULBOUND_TESTNET=${{ vars.VITE_ACCESS_GATE_SOULBOUND_TESTNET }}
306
- VITE_ACCESS_GATE_PRICE_MIST_TESTNET=${{ vars.VITE_ACCESS_GATE_PRICE_MIST_TESTNET }}
307
- VITE_WALRUS_MAX_TIP_MIST=${{ vars.VITE_WALRUS_MAX_TIP_MIST }}
308
-
309
- merge-docker-private:
310
- name: Merge (self-hosted registry)
311
- needs: [build-docker-amd64-private, build-docker-arm64-private]
312
- runs-on: ubuntu-latest
313
- continue-on-error: true
314
- permissions:
315
- contents: read
316
- steps:
317
- - uses: docker/setup-buildx-action@v4.3.0
318
-
319
- - name: Log in to self-hosted registry
320
- uses: docker/login-action@v4.6.0
321
- with:
322
- registry: ${{ vars.PRIVATE_REGISTRY }}
323
- username: ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
324
- password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }}
325
-
326
- - name: Compute tags
327
- id: meta
328
- uses: docker/metadata-action@v6.2.0
329
- with:
330
- images: ${{ vars.PRIVATE_REGISTRY }}/${{ vars.PRIVATE_NAMESPACE }}/${{ env.IMAGE }}
331
- tags: |
332
- type=semver,pattern={{version}}
333
- type=semver,pattern={{major}}.{{minor}}
334
- flavor: |
335
- latest=auto
336
-
337
- - name: Merge multi-arch manifests
338
- env:
339
- SHA: ${{ github.sha }}
340
- REG: ${{ vars.PRIVATE_REGISTRY }}
341
- NS: ${{ vars.PRIVATE_NAMESPACE }}
342
- run: |
343
- SRC="${REG}/${NS}/${IMAGE}:${SHA}"
344
- FLAGS=""
345
- while IFS= read -r tag; do
346
- FLAGS="$FLAGS --tag $tag"
347
- done <<< "${{ steps.meta.outputs.tags }}"
348
- docker buildx imagetools create $FLAGS "${SRC}-amd64" "${SRC}-arm64"
@@ -1,64 +0,0 @@
1
- # Real-chain deploy e2e for blockchain/sui/apps/token-deployer-ui.
2
- #
3
- # MANUAL ONLY (workflow_dispatch). This workflow publishes a REAL token and spends REAL SUI, so
4
- # it is never triggered on push or pull_request — it must be started by hand and mainnet requires
5
- # an explicit confirmation input. The automatic gates for the package remain `npm test` (Vitest)
6
- # and `npm run test:e2e` (Cypress, fully mocked), which should live in a separate always-on CI job.
7
- #
8
- # Secrets required (repository or environment secrets):
9
- # SUI_PRIV_TESTNET / SUI_PRIV_MAINNET — bech32 suiprivkey1… for a funded deployer key.
10
- # FEE_TREASURY_TESTNET / FEE_TREASURY_MAINNET — operator treasury address (fee recipient).
11
- # RPC_TESTNET / RPC_MAINNET (optional) — gRPC endpoint override (defaults to the public fullnodes).
12
-
13
- name: token-deployer real-chain e2e
14
-
15
- on:
16
- workflow_dispatch:
17
- inputs:
18
- network:
19
- description: Target network (mainnet publishes a REAL token and spends REAL SUI)
20
- required: true
21
- default: testnet
22
- type: choice
23
- options:
24
- - testnet
25
- - mainnet
26
- confirm_mainnet:
27
- description: Type "1" to confirm a mainnet run (ignored for testnet)
28
- required: false
29
- default: ""
30
-
31
- defaults:
32
- run:
33
- working-directory: blockchain/sui/apps/token-deployer-ui
34
-
35
- jobs:
36
- deploy-e2e:
37
- runs-on: ubuntu-latest
38
- steps:
39
- - uses: actions/checkout@v4
40
-
41
- - uses: actions/setup-node@v4
42
- with:
43
- node-version: 22
44
-
45
- - name: Install dependencies
46
- run: npm ci
47
-
48
- - name: Install Playwright Chromium
49
- run: npx playwright install --with-deps chromium
50
-
51
- - name: Run real-chain deploy e2e
52
- env:
53
- # Select the funded key + treasury + RPC for the chosen network.
54
- SUI_PRIV: ${{ inputs.network == 'mainnet' && secrets.SUI_PRIV_MAINNET || secrets.SUI_PRIV_TESTNET }}
55
- VITE_FEE_TREASURY_TESTNET: ${{ secrets.FEE_TREASURY_TESTNET }}
56
- VITE_FEE_TREASURY_MAINNET: ${{ secrets.FEE_TREASURY_MAINNET }}
57
- VITE_RPC_TESTNET: ${{ secrets.RPC_TESTNET }}
58
- VITE_RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
59
- E2E_RPC: ${{ inputs.network == 'mainnet' && secrets.RPC_MAINNET || secrets.RPC_TESTNET }}
60
- E2E_FEE_ADDR: ${{ inputs.network == 'mainnet' && secrets.FEE_TREASURY_MAINNET || secrets.FEE_TREASURY_TESTNET }}
61
- # Mainnet fail-safe: only proceeds when the operator typed "1".
62
- E2E_MAINNET_CONFIRM: ${{ inputs.network == 'mainnet' && inputs.confirm_mainnet || '' }}
63
- # CHROME_PATH intentionally unset — the harness falls back to Playwright's bundled Chromium.
64
- run: npm run "e2e:${{ inputs.network }}"
@@ -1,43 +0,0 @@
1
- name: Node CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
-
9
- jobs:
10
- ci:
11
- name: Lint, type-check, test, build
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - uses: actions/checkout@v7.0.1
16
-
17
- - uses: actions/setup-node@v6.5.0
18
- with:
19
- node-version: '24'
20
-
21
- - name: Install dependencies
22
- run: npm ci
23
-
24
- - name: Audit dependencies
25
- run: npm audit --audit-level=high
26
-
27
- - name: Type-check
28
- run: npm run type-check
29
-
30
- - name: Lint CSS (stylelint)
31
- run: npm run lint:css --if-present
32
-
33
- - name: Lint JS (eslint + vuejs-a11y)
34
- run: npm run lint:js --if-present
35
-
36
- - name: Lint HTML (html-validate)
37
- run: npm run lint:html --if-present
38
-
39
- - name: Unit tests
40
- run: npm test
41
-
42
- - name: Build (dev — treasury guard bypassed for CI)
43
- run: VITE_ALLOW_UNSET_TREASURY=1 npm run build
@@ -1,83 +0,0 @@
1
- name: Publish (npm)
2
-
3
- # Publishes the app's library entry (@meddleware/token-deployer-ui) to npmjs on a v* tag, so it can be
4
- # embedded by the dashboard. npm is a SECONDARY output here (the app also ships a
5
- # container image via docker-publish.yml), so publication is opt-in via the
6
- # repository variable NPM_PUBLISH and gated on a self-contained `verify` job.
7
- # Authentication uses npm OIDC trusted publishing — no long-lived NPM_TOKEN.
8
-
9
- on:
10
- push:
11
- tags:
12
- - 'v*'
13
-
14
- permissions:
15
- contents: read
16
-
17
- jobs:
18
- verify:
19
- name: Verify (type-check + test)
20
- runs-on: ubuntu-latest
21
- steps:
22
- - uses: actions/checkout@v7.0.1
23
- - uses: actions/setup-node@v7.0.0
24
- with:
25
- node-version: '24'
26
- - name: Install dependencies
27
- run: npm ci
28
- - name: Audit dependencies
29
- run: npm audit --audit-level=high
30
- - name: Type-check
31
- run: npm run type-check --if-present
32
- - name: Unit tests
33
- run: npm run test --if-present
34
-
35
- publish-npm:
36
- name: npmjs (@meddleware/token-deployer-ui)
37
- needs: verify
38
- runs-on: ubuntu-latest
39
- permissions:
40
- contents: read
41
- id-token: write # required for OIDC trusted publishing
42
- steps:
43
- - uses: actions/checkout@v7.0.1
44
- - uses: actions/setup-node@v7.0.0
45
- with:
46
- node-version: '24'
47
- registry-url: 'https://registry.npmjs.org'
48
- # Trusted publishing (OIDC) requires npm >= 11.5.1; Node 24 ships an older npm.
49
- - name: Upgrade npm for trusted publishing
50
- run: npm install -g npm@latest
51
- - name: Install dependencies
52
- run: npm ci
53
- # No build step: the npm package ships TypeScript source (exports → ./src),
54
- # not the compiled SPA. The treasury-gated `vite build` belongs to
55
- # docker-publish.yml, which injects the real treasury via build-args.
56
- - name: Publish to npmjs (OIDC, idempotent, opt-in)
57
- env:
58
- NPM_PUBLISH: ${{ vars.NPM_PUBLISH }}
59
- run: |
60
- if [ "${NPM_PUBLISH}" != "true" ]; then
61
- echo "::warning::npm publishing not configured — set repository variable NPM_PUBLISH=true and configure an npmjs trusted publisher to enable it. Skipping npm publication."
62
- exit 0
63
- fi
64
- VERSION=$(node -p "require('./package.json').version")
65
- NAME=$(node -p "require('./package.json').name")
66
- ENC=$(printf '%s' "$NAME" | sed 's#/#%2f#')
67
- # Check the registry directly — `npm view` can transiently miss a freshly
68
- # first-published version and then attempt a re-publish. A 200 means it's live.
69
- if [ "$(curl -s -o /dev/null -w '%{http_code}' "https://registry.npmjs.org/${ENC}/${VERSION}")" = "200" ]; then
70
- echo "::notice::v${VERSION} already published to npmjs — skipping."
71
- else
72
- # Publish, but treat a "version already exists" error as success so a
73
- # manually-published version (or a registry race) leaves the job green.
74
- set +e; OUT=$(npm publish 2>&1); RC=$?; set -e
75
- printf '%s\n' "$OUT"
76
- if [ "$RC" -ne 0 ]; then
77
- if printf '%s' "$OUT" | grep -qiE 'cannot publish over|previously published|EPUBLISHCONFLICT'; then
78
- echo "::notice::v${VERSION} already published — treating as success."
79
- else
80
- exit "$RC"
81
- fi
82
- fi
83
- fi
package/.htmlvalidate.mjs DELETED
@@ -1,30 +0,0 @@
1
- // html-validate over the Vue SFC templates (via html-validate-vue): checks element nesting and
2
- // content models (e.g. no <p> inside <ul>, no button inside a label) on top of the eslint a11y gate.
3
- export default {
4
- plugins: ['html-validate-vue'],
5
- extends: ['html-validate:recommended', 'html-validate-vue:recommended'],
6
- elements: [
7
- 'html5',
8
- // @meddleware/ui components that render a single native element, described to the validator so
9
- // content models / form rules see through them (keys are lowercased tag names).
10
- {
11
- uibutton: { inherit: 'button' },
12
- uitoolbarbutton: { inherit: 'button' },
13
- uiselect: { inherit: 'select' },
14
- uinotice: { inherit: 'p' },
15
- },
16
- ],
17
- transform: {
18
- '^.*\\.vue$': 'html-validate-vue',
19
- },
20
- rules: {
21
- // Vue components are written in PascalCase (<UiStatusDot>, <KeepAlive>).
22
- 'element-case': ['error', { style: ['lowercase', 'pascalcase'] }],
23
- 'element-name': ['error', { pattern: '^(?:[a-z][a-z0-9\\-._]*-[a-z0-9\\-._]*|[A-Z][A-Za-z0-9]*)$' }],
24
- // role="list" on styled lists is a deliberate Safari/VoiceOver workaround: WebKit drops list
25
- // semantics when list-style is removed, so the explicit role must stay (matches the eslint
26
- // vuejs-accessibility/no-redundant-roles override).
27
- 'no-redundant-role': 'off',
28
- 'prefer-native-element': ['error', { exclude: ['list'] }],
29
- },
30
- }
package/.oxfmtrc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
- "semi": false,
4
- "singleQuote": true
5
- }
package/.oxlintrc.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["eslint", "unicorn", "oxc", "vue", "vitest"],
4
- "env": {
5
- "browser": true
6
- },
7
- "categories": {
8
- "correctness": "error"
9
- }
10
- }
@@ -1,9 +0,0 @@
1
- {
2
- "recommendations": [
3
- "Vue.volar",
4
- "vitest.explorer",
5
- "dbaeumer.vscode-eslint",
6
- "EditorConfig.EditorConfig",
7
- "oxc.oxc-vscode"
8
- ]
9
- }