@meddleware/token-deployer-ui 0.0.32 → 0.0.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/token-deployer-ui",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "type": "module",
5
5
  "license": "0BSD",
6
6
  "repository": {
@@ -49,13 +49,13 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@meddleware/design-tokens": "^0.1.9",
52
- "@meddleware/sui-token-client": "^0.0.9",
52
+ "@meddleware/sui-token-client": "^0.0.10",
53
53
  "@meddleware/ui": "^0.1.31",
54
- "@meddleware/walrus-client": "^0.0.26",
55
- "@meddleware/walrus-relay": "^0.1.29",
54
+ "@meddleware/walrus-client": "^0.0.27",
55
+ "@meddleware/walrus-relay": "^0.1.30",
56
56
  "@mysten/move-bytecode-template": "~0.4.1",
57
- "@mysten/sui": "^2.33.2",
58
- "@mysten/walrus": "~1.2.32",
57
+ "@mysten/sui": "^2.34.0",
58
+ "@mysten/walrus": "~1.2.33",
59
59
  "vue": "^3.5.0"
60
60
  },
61
61
  "peerDependencies": {
@@ -73,28 +73,28 @@
73
73
  "@vue/eslint-config-typescript": "^14.9.0",
74
74
  "@vue/test-utils": "^2.4.0",
75
75
  "autoprefixer": "^10.4.20",
76
- "eslint": "^10.11.0",
76
+ "eslint": "^10.12.0",
77
77
  "eslint-plugin-vue": "^10.11.1",
78
78
  "eslint-plugin-vuejs-accessibility": "^2.6.0",
79
- "html-validate": "^11.16.1",
79
+ "html-validate": "^11.16.2",
80
80
  "html-validate-vue": "^9.3.1",
81
81
  "jiti": "^2.7.0",
82
- "jsdom": "^29.1.1",
82
+ "jsdom": "^30.1.2",
83
83
  "oxfmt": "^0.72.0",
84
- "oxlint": "~1.76.0",
84
+ "oxlint": "~1.86.0",
85
85
  "playwright": "^1.62.0",
86
- "postcss": "^8.4.49",
86
+ "postcss": "^8.5.29",
87
87
  "postcss-html": "^2.0.0",
88
88
  "start-server-and-test": "^3.0.11",
89
- "stylelint": "^17.15.0",
89
+ "stylelint": "^17.16.0",
90
90
  "stylelint-config-standard": "^40.0.0",
91
91
  "typedoc": "^0.28.20",
92
92
  "typescript": "~6.0.0",
93
- "vite": "^8.1.5",
93
+ "vite": "^8.3.2",
94
94
  "vite-plugin-vue-devtools": "^8.1.5",
95
- "vitest": "~5.0.2",
95
+ "vitest": "~5.0.3",
96
96
  "vue-eslint-parser": "^10.4.1",
97
- "vue-tsc": "~3.3.0"
97
+ "vue-tsc": "~3.3.12"
98
98
  },
99
99
  "engines": {
100
100
  "node": "^22.18.0 || >=24.12.0"
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
- // Lists the coins the connected wallet has deployed (owned TreasuryCap<T> objects). Read-only,
2
+ // Lists the coins the connected wallet deployed or controls (an owned TreasuryCap<T> or MetadataCap<T>, or a
3
+ // held coin whose package the wallet published — a fixed supply with frozen metadata has no capability). Read-only,
3
4
  // mirroring access-gate's "My Gates". Loads on mount and whenever the address or network changes.
4
5
  import { computed, ref, watch } from 'vue'
5
6
  import {
@@ -62,7 +63,7 @@ defineExpose({ reload: load })
62
63
  No deployed tokens found for this wallet. Deploy one from the <strong>Deploy</strong> tab.
63
64
  </p>
64
65
  <ul v-else class="my-tokens__list">
65
- <li v-for="t in tokens" :key="t.treasuryCapId" class="my-tokens__item">
66
+ <li v-for="t in tokens" :key="t.coinType" class="my-tokens__item">
66
67
  <div class="my-tokens__label">{{ t.label }}</div>
67
68
  <dl class="my-tokens__meta">
68
69
  <dt>Coin type</dt>
@@ -78,7 +79,7 @@ defineExpose({ reload: load })
78
79
  </CopyableAddress>
79
80
  </dd>
80
81
  <dt>Treasury cap</dt>
81
- <dd>
82
+ <dd v-if="t.treasuryCapId">
82
83
  <CopyableAddress :address="t.treasuryCapId" label="Copy treasury cap id">
83
84
  <ExplorerLink
84
85
  v-if="explorerNetwork"
@@ -87,6 +88,18 @@ defineExpose({ reload: load })
87
88
  />
88
89
  </CopyableAddress>
89
90
  </dd>
91
+ <dd v-else>None — the supply is fixed, or the cap is held elsewhere</dd>
92
+ <dt>Metadata cap</dt>
93
+ <dd v-if="t.metadataCapId">
94
+ <CopyableAddress :address="t.metadataCapId" label="Copy metadata cap id">
95
+ <ExplorerLink
96
+ v-if="explorerNetwork"
97
+ :href="suiExplorerUrl('object', t.metadataCapId, explorerNetwork)"
98
+ :value="t.metadataCapId"
99
+ />
100
+ </CopyableAddress>
101
+ </dd>
102
+ <dd v-else>None — the metadata is frozen, or the cap is held elsewhere</dd>
90
103
  </dl>
91
104
  </li>
92
105
  </ul>
package/src/lib/github.ts CHANGED
@@ -53,6 +53,12 @@ export interface GithubRepoResult {
53
53
  htmlUrl: string
54
54
  }
55
55
 
56
+ /**
57
+ * Fetch options for every call that carries the token: an HTTP redirect is an error (the token must never
58
+ * follow a `Location`), no cookies, no cache.
59
+ */
60
+ const SENSITIVE_FETCH = { redirect: 'error', credentials: 'omit', cache: 'no-store' } as const
61
+
56
62
  function ghHeaders(token: string): HeadersInit {
57
63
  return {
58
64
  Authorization: `Bearer ${token}`,
@@ -106,6 +112,7 @@ export async function createRepoAndPush(args: CreateRepoAndPushArgs): Promise<Gi
106
112
  assertHttps(apiBase)
107
113
 
108
114
  const createRes = await fetcher(`${apiBase}/user/repos`, {
115
+ ...SENSITIVE_FETCH,
109
116
  method: 'POST',
110
117
  headers: ghHeaders(args.token),
111
118
  body: JSON.stringify({
@@ -130,6 +137,7 @@ export async function createRepoAndPush(args: CreateRepoAndPushArgs): Promise<Gi
130
137
  const putRes = await fetcher(
131
138
  `${apiBase}/repos/${owner}/${encodeURIComponent(repo.name)}/contents/${encodePath(path)}`,
132
139
  {
140
+ ...SENSITIVE_FETCH,
133
141
  method: 'PUT',
134
142
  headers: ghHeaders(args.token),
135
143
  body: JSON.stringify({