Skip to content

Commit 16198f3

Browse files
committedMar 7, 2024·
fix: 🐛 missing docs build, and docs update
1 parent 9a6b0bd commit 16198f3

File tree

10 files changed

+31
-7615
lines changed

10 files changed

+31
-7615
lines changed
 

‎CHANGELOG.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1+
## v2.0.0...v1.1.1
12

2-
3-
## v1.1.1...next
4-
5-
[compare changes](https://github.com/charlzyx/bunpkg/compare/v1.1.1...next)
3+
[compare changes](https://github.com/charlzyx/bunpkg/compare/v2.0.0...v1.1.1)
64

75
### 🚀 Enhancements
86

97
- 🎸 replace http tgz by Bun.gunzipSync, faster! ([3dd9743](https://github.com/charlzyx/bunpkg/commit/3dd9743))
8+
- 🎸 file browser ([2d44710](https://github.com/charlzyx/bunpkg/commit/2d44710))
9+
10+
### 🩹 Fixes
11+
12+
- 🐛 cors origin config fix ([663e3b3](https://github.com/charlzyx/bunpkg/commit/663e3b3))
1013

1114
### 💅 Refactors
1215

1316
- 💡 util -> common, use file stream ([7ec1671](https://github.com/charlzyx/bunpkg/commit/7ec1671))
1417
- 💡 npm/esm/meta split, and rewrite cache and check ([ccaf775](https://github.com/charlzyx/bunpkg/commit/ccaf775))
18+
- 💡 error handler, and docs update ([9a6b0bd](https://github.com/charlzyx/bunpkg/commit/9a6b0bd))
1519

1620
### ❤️ Contributors
1721

1822
- Charlzyx <charlzyx@qq.com>
19-
20-

‎Dockerfile

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
FROM node:18-alpine as docbuilder
2+
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
3+
# vocs build needs git
4+
RUN apk add git
5+
6+
WORKDIR /web
7+
8+
COPY package.json tsconfig.json vocs.config.ts ./
9+
COPY docs docs
10+
11+
RUN npm i --registry=https://registry.npmmirror.com && npm run docs:build
12+
113
FROM oven/bun:slim
214
# FROM oven/bun
315
WORKDIR /app
@@ -6,9 +18,10 @@ WORKDIR /app
618

719
COPY package.json bun.lockb bunfig.toml tsconfig.json bunpkg.sh ./
820
COPY src src
21+
COPY --from=docbuilder /web/docs/dist ./docs/dist
922

23+
# build server
1024
RUN bun install --production
11-
1225
# case by DOCKER ENV
1326
RUN rm -rf .env
1427

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { MetaBrowser } from '../components/MetaBrowser'
77
import { Codebox } from '../components/Codebox'
88

99
<HomePage.Root>
10-
<HomePage.Tagline>bunpkg 是受到 [unpkg](https://unpkg.com) 启发而开发的一个 NPM CDN 加速服务器, <br />
10+
<HomePage.Tagline>[bunpkg](https://bunpkg.pages.dev) 是受到 [unpkg](https://unpkg.com) 启发而开发的一个 NPM CDN 加速服务器, <br />
1111
自部署更加友好, 并提供了额外本地文件缓存等功能</HomePage.Tagline>
1212
<HomePage.Tagline>bunpkg is an alternative for unpkg. <br />but friendly for self-host deploy and file cache supported </HomePage.Tagline>
1313
</HomePage.Root>

‎bun.lockb

0 Bytes
Binary file not shown.

‎bunpkg.png

-791 KB
Binary file not shown.

‎docs/components/MetaBrowser/FilesTable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const FileTable = (props: {
8282
<div className="nav-box">
8383
<Flex justify="space-between">
8484
<Nav link={prefix} onClickLink={setPrefix}></Nav>
85-
<div>@{resp?.data?.info.version}</div>
85+
<div>@{resp?.data?.info?.version}</div>
8686
</Flex>
8787
</div>
8888
<Loading resp={resp} empty={props.pkgName ? "" : "Empty"}>

‎package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@
2121
"lru-cache": "^10.2.0",
2222
"mime": "^3.0.0",
2323
"nanotar": "^0.1.1",
24-
"ofetch": "^1.3.3",
25-
"semver": "^7.6.0",
2624
"validate-npm-package-name": "^5.0.0"
2725
},
2826
"devDependencies": {
2927
"@types/gunzip-maybe": "^1.4.2",
3028
"@types/mime": "^3.0.4",
31-
"@types/react": "^18.2.63",
32-
"react-tooltip": "^5.26.3",
33-
"@types/react-dom": "^18.2.20",
29+
"@types/react": "^18.2.64",
30+
"@types/react-dom": "^18.2.21",
3431
"@types/semver": "^7.5.8",
3532
"@types/tar-stream": "^3.1.3",
3633
"@types/validate-npm-package-name": "^4.0.2",
3734
"ahooks": "^3.7.10",
3835
"bun-types": "latest",
3936
"changelogen": "^0.5.5",
37+
"ofetch": "^1.3.3",
4038
"react-hot-toast": "^2.4.1",
41-
"vocs": "^1.0.0-alpha.42"
39+
"react-tooltip": "^5.26.3",
40+
"semver": "^7.6.0",
41+
"vocs": "^1.0.0-alpha.43"
4242
}
4343
}

‎src/common/fetch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const get = (url: string, json = true) => {
1111
return maybe;
1212
} else {
1313
const controller = new AbortController();
14-
const timeoutId = setTimeout(() => controller.abort(), 2000);
14+
const timeoutId = setTimeout(() => controller.abort(), 30 * 1000);
1515

1616
const headers: Record<string, string> = {
1717
"User-Agent": "bunpkg",

‎src/templates/BUNPKG.html

-7,552
This file was deleted.

‎src/templates/index.ts

-47
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.