@lark-apaas/fullstack-cli 1.1.6-alpha.4 → 1.1.6-alpha.5
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/dist/index.js +10 -13
- package/package.json +1 -1
- package/templates/scripts/build.sh +7 -0
package/dist/index.js
CHANGED
|
@@ -807,23 +807,20 @@ async function installOne(nameWithVersion) {
|
|
|
807
807
|
const { name, version: requestedVersion } = parsePluginName(nameWithVersion);
|
|
808
808
|
try {
|
|
809
809
|
console.log(`[action-plugin] Installing ${name}@${requestedVersion}...`);
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
if (
|
|
810
|
+
const actualVersion = getPackageVersion(name);
|
|
811
|
+
if (actualVersion && requestedVersion !== "latest") {
|
|
812
|
+
if (actualVersion === requestedVersion) {
|
|
813
813
|
console.log(`[action-plugin] Plugin ${name}@${requestedVersion} is already installed`);
|
|
814
|
-
return { name, version:
|
|
814
|
+
return { name, version: actualVersion, success: true, skipped: true };
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
|
-
if (
|
|
818
|
-
const
|
|
819
|
-
if (
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
console.log(`[action-plugin] Plugin ${name} is already up to date (version: ${installedVer})`);
|
|
823
|
-
return { name, version: installedVer, success: true, skipped: true };
|
|
824
|
-
}
|
|
825
|
-
console.log(`[action-plugin] Found newer version: ${latestInfo.version} (installed: ${installedVer})`);
|
|
817
|
+
if (actualVersion && requestedVersion === "latest") {
|
|
818
|
+
const latestInfo = await getPluginVersion(name, "latest");
|
|
819
|
+
if (actualVersion === latestInfo.version) {
|
|
820
|
+
console.log(`[action-plugin] Plugin ${name} is already up to date (version: ${actualVersion})`);
|
|
821
|
+
return { name, version: actualVersion, success: true, skipped: true };
|
|
826
822
|
}
|
|
823
|
+
console.log(`[action-plugin] Found newer version: ${latestInfo.version} (installed: ${actualVersion})`);
|
|
827
824
|
}
|
|
828
825
|
const downloadResult = await downloadPlugin(name, requestedVersion);
|
|
829
826
|
tgzPath = downloadResult.tgzPath;
|
package/package.json
CHANGED
|
@@ -18,6 +18,13 @@ print_time() {
|
|
|
18
18
|
echo " ⏱️ 耗时: ${seconds}.$(printf "%03d" $ms)s"
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
# ==================== 步骤 0 ====================
|
|
22
|
+
echo "🗑️ [0/4] 安装插件"
|
|
23
|
+
STEP_START=$(node -e "console.log(Date.now())")
|
|
24
|
+
npx fullstack-cli action-plugin init
|
|
25
|
+
print_time $STEP_START
|
|
26
|
+
echo ""
|
|
27
|
+
|
|
21
28
|
# ==================== 步骤 0 ====================
|
|
22
29
|
echo "📝 [0/4] 更新 openapi 代码"
|
|
23
30
|
STEP_START=$(node -e "console.log(Date.now())")
|