@@ -21,13 +21,13 @@ This project aims to provide a lightweight API server as the proxy, which caches
21
21
> [ !IMPORTANT]
22
22
> This project is still in the early stage of development. Pin your dependencies on usage, and feedback are greatly welcomed.
23
23
24
- ## API
24
+ ## API Endpoints
25
25
26
26
An example server is deployed at https://npm.antfu.dev/ . You can also deploy your own instance.
27
27
28
28
### ` GET /:pkg `
29
29
30
- #### Get the Latest Version
30
+ #### 📦 Get the Latest Version
31
31
32
32
``` sh
33
33
curl https://npm.antfu.dev/vite
@@ -44,7 +44,7 @@ Returns
44
44
}
45
45
```
46
46
47
- #### Get the Latest Version of a Tag
47
+ #### 📦 Get the Latest Version of a Tag
48
48
49
49
``` sh
50
50
curl https://npm.antfu.dev/vite@alpha
@@ -61,7 +61,7 @@ Returns
61
61
}
62
62
```
63
63
64
- #### Get the Latest Version of a Range
64
+ #### 📦 Get the Latest Version of a Range
65
65
66
66
``` sh
67
67
curl https://npm.antfu.dev/vite@^2.1.0
@@ -78,7 +78,7 @@ Returns
78
78
}
79
79
```
80
80
81
- #### Resolve Multiple Packages
81
+ #### 📦 Resolve Multiple Packages
82
82
83
83
Use ` + ` to separate the package specs.
84
84
@@ -113,7 +113,7 @@ Returns an array of objects:
113
113
114
114
### ` GET /versions/:pkg `
115
115
116
- #### Get All Versions and Tags of a Package
116
+ #### 📦 Get All Versions and Tags of a Package
117
117
118
118
``` sh
119
119
curl https://npm.antfu.dev/versions/vite
@@ -143,6 +143,14 @@ curl https://npm.antfu.dev/versions/vite
143
143
}
144
144
```
145
145
146
+ #### 📦 Get All Versions and Tags of Multiple Packages
147
+
148
+ Use ` + ` to separate the package names.
149
+
150
+ ``` sh
151
+ curl https://npm.antfu.dev/versions/vite+vue+nuxt
152
+ ```
153
+
146
154
## JavaScript API
147
155
148
156
You can also use the JavaScript API to resolve the versions.
0 commit comments