made-market 0.4.0 → 0.4.1
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/bin/made-market.mjs +4 -4
- package/package.json +1 -1
- package/src/install.mjs +1 -1
package/bin/made-market.mjs
CHANGED
|
@@ -105,7 +105,7 @@ async function resolveViaApi(ids, server) {
|
|
|
105
105
|
const base = String(server).replace(/\/+$/, '');
|
|
106
106
|
const packages = [];
|
|
107
107
|
for (const id of ids) {
|
|
108
|
-
const response = await fetch(`${base}/api/packages/${encodeURIComponent(id)}`, { signal: AbortSignal.timeout(
|
|
108
|
+
const response = await fetch(`${base}/api/packages/${encodeURIComponent(id)}`, { signal: AbortSignal.timeout(30000) });
|
|
109
109
|
if (!response.ok) throw new Error(`查询 ${id} 失败:HTTP ${response.status}`);
|
|
110
110
|
const versions = await response.json();
|
|
111
111
|
const latest = versions.reduce((best, item) => (!best || semverGreater(item.version, best.version) ? item : best), null);
|
|
@@ -222,8 +222,8 @@ async function main() {
|
|
|
222
222
|
console.log('\n下一步:');
|
|
223
223
|
console.log(' 1. 改掉 market.json / theme.json(或 plugin.mjs)里的占位文案');
|
|
224
224
|
console.log(` 2. 本地校验:npx made-market validate ${dir}`);
|
|
225
|
-
console.log(` 3. 注册并发布:npx made-market register <用户名> --server https://made-
|
|
226
|
-
console.log(` npx made-market publish ${dir} --server https://made-
|
|
225
|
+
console.log(` 3. 注册并发布:npx made-market register <用户名> --server https://market.made-world.link`);
|
|
226
|
+
console.log(` npx made-market publish ${dir} --server https://market.made-world.link`);
|
|
227
227
|
console.log(' 开发文档见市场主页「开发者指南」。');
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
@@ -273,7 +273,7 @@ async function main() {
|
|
|
273
273
|
let entry;
|
|
274
274
|
if (!staticRegistry) {
|
|
275
275
|
const base = listServer();
|
|
276
|
-
const response = await fetch(`${base}/api/packages/${encodeURIComponent(id)}`, { signal: AbortSignal.timeout(
|
|
276
|
+
const response = await fetch(`${base}/api/packages/${encodeURIComponent(id)}`, { signal: AbortSignal.timeout(30000) });
|
|
277
277
|
if (!response.ok) throw new Error(`服务上没有包 ${id}(HTTP ${response.status})`);
|
|
278
278
|
const versions = await response.json();
|
|
279
279
|
entry = versions.reduce((best, item) => (!best || semverGreater(item.version, best.version) ? item : best), null);
|
package/package.json
CHANGED
package/src/install.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import { extractTar } from '../lib/tar.mjs';
|
|
|
22
22
|
const BUNDLED_REGISTRY = path.join(PKG_ROOT, 'registry', 'index.json');
|
|
23
23
|
|
|
24
24
|
/** 官方市场:install/list/search 不带参数时的默认来源。 */
|
|
25
|
-
export const DEFAULT_SERVER = 'https://made-
|
|
25
|
+
export const DEFAULT_SERVER = 'https://market.made-world.link';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* 索引来源:显式 --registry > $MADE_MARKET_REGISTRY > $MADE_MARKET_SERVER > 官方市场。
|