@meddleware/token-deployer-ui 0.0.33 → 0.0.35

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/package.json +17 -15
  2. package/src/lib/github.ts +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/token-deployer-ui",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "type": "module",
5
5
  "license": "0BSD",
6
6
  "repository": {
@@ -45,17 +45,19 @@
45
45
  "gen:og-image": "node scripts/gen-og-image.mjs",
46
46
  "lint:css": "stylelint \"src/**/*.{css,vue}\"",
47
47
  "lint:js": "eslint .",
48
- "lint:html": "html-validate \"src/**/*.vue\""
48
+ "lint:html": "html-validate \"src/**/*.vue\"",
49
+ "licenses": "node scripts/third-party-licenses.mjs",
50
+ "check:licenses": "node scripts/third-party-licenses.mjs --check"
49
51
  },
50
52
  "dependencies": {
51
53
  "@meddleware/design-tokens": "^0.1.9",
52
54
  "@meddleware/sui-token-client": "^0.0.10",
53
55
  "@meddleware/ui": "^0.1.31",
54
- "@meddleware/walrus-client": "^0.0.26",
55
- "@meddleware/walrus-relay": "^0.1.29",
56
+ "@meddleware/walrus-client": "^0.0.27",
57
+ "@meddleware/walrus-relay": "^0.1.30",
56
58
  "@mysten/move-bytecode-template": "~0.4.1",
57
- "@mysten/sui": "^2.33.2",
58
- "@mysten/walrus": "~1.2.32",
59
+ "@mysten/sui": "^2.34.0",
60
+ "@mysten/walrus": "~1.2.33",
59
61
  "vue": "^3.5.0"
60
62
  },
61
63
  "peerDependencies": {
@@ -73,28 +75,28 @@
73
75
  "@vue/eslint-config-typescript": "^14.9.0",
74
76
  "@vue/test-utils": "^2.4.0",
75
77
  "autoprefixer": "^10.4.20",
76
- "eslint": "^10.11.0",
78
+ "eslint": "^10.12.0",
77
79
  "eslint-plugin-vue": "^10.11.1",
78
80
  "eslint-plugin-vuejs-accessibility": "^2.6.0",
79
- "html-validate": "^11.16.1",
81
+ "html-validate": "^11.16.2",
80
82
  "html-validate-vue": "^9.3.1",
81
83
  "jiti": "^2.7.0",
82
- "jsdom": "^29.1.1",
84
+ "jsdom": "^30.1.2",
83
85
  "oxfmt": "^0.72.0",
84
- "oxlint": "~1.76.0",
86
+ "oxlint": "~1.86.0",
85
87
  "playwright": "^1.62.0",
86
- "postcss": "^8.4.49",
88
+ "postcss": "^8.5.29",
87
89
  "postcss-html": "^2.0.0",
88
90
  "start-server-and-test": "^3.0.11",
89
- "stylelint": "^17.15.0",
91
+ "stylelint": "^17.16.0",
90
92
  "stylelint-config-standard": "^40.0.0",
91
93
  "typedoc": "^0.28.20",
92
94
  "typescript": "~6.0.0",
93
- "vite": "^8.1.5",
95
+ "vite": "^8.3.2",
94
96
  "vite-plugin-vue-devtools": "^8.1.5",
95
- "vitest": "~5.0.2",
97
+ "vitest": "~5.0.3",
96
98
  "vue-eslint-parser": "^10.4.1",
97
- "vue-tsc": "~3.3.0"
99
+ "vue-tsc": "~3.3.12"
98
100
  },
99
101
  "engines": {
100
102
  "node": "^22.18.0 || >=24.12.0"
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({