@gmcb/cli 0.7.1 → 0.7.2
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/CHANGELOG.md +8 -0
- package/lib/apis/index.js +20 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.7.2](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.1...@gmcb/cli@0.7.2) (2026-07-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @gmcb/cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [0.7.1](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.0...@gmcb/cli@0.7.1) (2026-07-06)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @gmcb/cli
|
package/lib/apis/index.js
CHANGED
|
@@ -205,26 +205,30 @@ async function publishVersion(params) {
|
|
|
205
205
|
versionId = newId;
|
|
206
206
|
}
|
|
207
207
|
const urls = Array.isArray(remoteUrl) ? remoteUrl : [remoteUrl || ''];
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
let fullUrl = '';
|
|
209
|
+
let resUrl = '';
|
|
210
|
+
if (publishType == 1) {
|
|
211
|
+
fullUrl = urls.find((u) => !/\.(zip|wgt)$/i.test(u)) || '';
|
|
212
|
+
resUrl = urls.find((u) => /\.(zip|wgt)$/i.test(u)) || '';
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
fullUrl = urls.find((u) => !/\.zip$/i.test(u)) || '';
|
|
216
|
+
resUrl = urls.find((u) => /\.zip$/i.test(u)) || '';
|
|
217
|
+
}
|
|
218
|
+
let fallbackFullUrl = existingVersion?.fullPackageUrl || latest?.fullPackageUrl || '';
|
|
219
|
+
let fallbackResUrl = existingVersion?.resourcePackageUrl || latest?.resourcePackageUrl || '';
|
|
210
220
|
if (config_1.CONFIG_DATA.publish?.updateMode != null) {
|
|
211
221
|
const isHotUpdate = config_1.CONFIG_DATA.publish.updateMode == 2;
|
|
212
222
|
const hotResUrl = isHotUpdate ? (config_1.CONFIG_DATA.publish['_remoteResourceUrl'] || '') : '';
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
resourcePackageUrl: hotResUrl,
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
const fallbackFullUrl = existingVersion?.fullPackageUrl || latest?.fullPackageUrl || '';
|
|
221
|
-
const fallbackResUrl = existingVersion?.resourcePackageUrl || latest?.resourcePackageUrl || '';
|
|
222
|
-
await postVersion({
|
|
223
|
-
id: versionId,
|
|
224
|
-
fullPackageUrl: fullUrl || fallbackFullUrl,
|
|
225
|
-
resourcePackageUrl: resUrl || fallbackResUrl,
|
|
226
|
-
});
|
|
223
|
+
resUrl = hotResUrl;
|
|
224
|
+
fallbackFullUrl = '';
|
|
225
|
+
fallbackResUrl = '';
|
|
227
226
|
}
|
|
227
|
+
await postVersion({
|
|
228
|
+
id: versionId,
|
|
229
|
+
fullPackageUrl: fullUrl || fallbackFullUrl,
|
|
230
|
+
resourcePackageUrl: resUrl || fallbackResUrl,
|
|
231
|
+
});
|
|
228
232
|
}
|
|
229
233
|
catch (err) {
|
|
230
234
|
console.error(err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gmcb/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "工茂草本前端命令行工具",
|
|
5
5
|
"author": "yinjiazeng@163.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"@types/rimraf": "^4.0.5",
|
|
60
60
|
"@types/user-home": "^2.0.2"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "cae047773a0db2ebffdfdb45f86070c19ba07631"
|
|
63
63
|
}
|