Skip to content

Commit 1a1fd8e

Browse files
committed
chore: prepare auto-release
1 parent 98878c5 commit 1a1fd8e

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

.github/workflows/module.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: pnpm run typecheck
4949

5050
- name: Test
51-
run: pnpm run test run
51+
run: pnpm run test
5252

5353
- name: Publish
54-
run: pnpx pkg-pr-new publish --compact --no-template --pnpm
54+
run: pnpx pkg-pr-new publish --no-template --pnpm

package.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "nuxt-studio",
33
"version": "0.0.1",
44
"description": "Nuxt Studio for Nuxt Content",
5-
"repository": "@nuxt-content/studio",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/nuxt-content/studio.git"
8+
},
69
"license": "MIT",
710
"type": "module",
811
"exports": {
@@ -20,6 +23,9 @@
2023
"default": "./dist/app/service-worker.js"
2124
}
2225
},
26+
"files": [
27+
"dist"
28+
],
2329
"main": "./dist/module/module.mjs",
2430
"scripts": {
2531
"prepack": "nuxt-module-build build src/module; vite build src/app",
@@ -76,5 +82,16 @@
7682
"minimark": "^0.2.0",
7783
"ofetch": "^1.4.1",
7884
"unstorage": "^1.17.1"
79-
}
85+
},
86+
"keywords": [
87+
"nuxt",
88+
"content",
89+
"nuxt-module",
90+
"studio",
91+
"editor",
92+
"preview",
93+
"cms",
94+
"markdown",
95+
"mdc"
96+
]
8097
}

src/app/src/composables/useGit.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ export const useGit = createSharedComposable(({ owner, repo, token, branch, root
3131
}
3232
return ghFile
3333
}
34-
catch (error: any) {
34+
catch (error) {
3535
// Handle different types of errors gracefully
36-
if (error.status === 404) {
36+
if ((error as { status?: number }).status === 404) {
3737
console.warn(`File not found on GitHub: ${path}`)
3838
return null
3939
}
40-
40+
4141
console.error(`Failed to fetch file from GitHub: ${path}`, error)
42-
42+
4343
// For development, show alert. In production, you might want to use a toast notification
4444
if (process.env.NODE_ENV === 'development') {
45-
alert(`Failed to fetch file: ${path}\n${error.message || error}`)
45+
alert(`Failed to fetch file: ${path}\n${(error as { message?: string }).message || error}`)
4646
}
47-
47+
4848
return null
4949
}
5050
}
@@ -83,7 +83,8 @@ export const useGit = createSharedComposable(({ owner, repo, token, branch, root
8383
type: 'blob',
8484
sha: null,
8585
})
86-
} else {
86+
}
87+
else {
8788
// For new/modified files, create blob and use its sha
8889
const blobData = await $api(`/git/blobs`, {
8990
method: 'POST',

0 commit comments

Comments
 (0)