@cloudbase/cli 2.6.8 → 2.6.9
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/lib/commands/fun/base.js
CHANGED
|
@@ -168,15 +168,7 @@ let FunDeployCommand = class FunDeployCommand extends common_1.Command {
|
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
170
170
|
if (!(loadResult === null || loadResult === void 0 ? void 0 : loadResult.userFunction)) {
|
|
171
|
-
|
|
172
|
-
log.error(`${source} 不是一个有效的函数式托管代码目录,可以通过 --source <source> 指定代码目录路径`);
|
|
173
|
-
}
|
|
174
|
-
else if (loadResult === null || loadResult === void 0 ? void 0 : loadResult.reason.includes('is not defined in the provided module')) {
|
|
175
|
-
log.error(`主文件并未导出目标函数 ${target},请导出 ${target} 目标函数`);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
log.error(loadResult === null || loadResult === void 0 ? void 0 : loadResult.reason);
|
|
179
|
-
}
|
|
171
|
+
log.error(`验证加载云函数失败: ${loadResult === null || loadResult === void 0 ? void 0 : loadResult.reason}`);
|
|
180
172
|
return;
|
|
181
173
|
}
|
|
182
174
|
}
|
|
@@ -148,22 +148,14 @@ let RunfDeployCommand = class RunfDeployCommand extends common_1.Command {
|
|
|
148
148
|
if (Array.isArray(loadResult)) {
|
|
149
149
|
for (const loadItem of loadResult) {
|
|
150
150
|
if (!(loadItem === null || loadItem === void 0 ? void 0 : loadItem.userFunction)) {
|
|
151
|
-
log.error(
|
|
151
|
+
log.error(`验证加载函数 ${loadItem === null || loadItem === void 0 ? void 0 : loadItem.name} 失败: "${loadItem === null || loadItem === void 0 ? void 0 : loadItem.reason}"`);
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
157
|
if (!(loadResult === null || loadResult === void 0 ? void 0 : loadResult.userFunction)) {
|
|
158
|
-
|
|
159
|
-
log.error(`${targetDir} 不是一个有效的函数式托管代码目录,可以通过 --source <source> 指定代码目录路径`);
|
|
160
|
-
}
|
|
161
|
-
else if (loadResult === null || loadResult === void 0 ? void 0 : loadResult.reason.includes('is not defined in the provided module')) {
|
|
162
|
-
log.error(`主文件并未导出目标函数 ${target},请导出 ${target} 目标函数`);
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
log.error(loadResult === null || loadResult === void 0 ? void 0 : loadResult.reason);
|
|
166
|
-
}
|
|
158
|
+
log.error(`验证加载云函数失败: ${loadResult === null || loadResult === void 0 ? void 0 : loadResult.reason}`);
|
|
167
159
|
return;
|
|
168
160
|
}
|
|
169
161
|
}
|