@base44-preview/cli 0.1.10-pr.607.0546dc2 → 0.1.10-pr.607.4743740
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/cli/index.js +12 -2
- package/dist/cli/index.js.map +3 -3
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -258378,10 +258378,11 @@ async function fetchLogsForFunctions(functionNames, options, availableFunctionNa
|
|
|
258378
258378
|
logs = await fetchFunctionLogs(functionName, filters);
|
|
258379
258379
|
} catch (error48) {
|
|
258380
258380
|
if (error48 instanceof ApiError && error48.statusCode === 404) {
|
|
258381
|
-
const namesForHint =
|
|
258381
|
+
const namesForHint = await getFunctionNamesForHint(availableFunctionNames, error48);
|
|
258382
258382
|
if (namesForHint.length > 0) {
|
|
258383
258383
|
const available = namesForHint.join(", ");
|
|
258384
258384
|
throw new InvalidInputError(`Function "${functionName}" was not found in this app`, {
|
|
258385
|
+
cause: error48,
|
|
258385
258386
|
hints: [
|
|
258386
258387
|
{
|
|
258387
258388
|
message: `Available functions in this app: ${available}`
|
|
@@ -258409,6 +258410,15 @@ async function getRemoteFunctionNames() {
|
|
|
258409
258410
|
const { functions } = await listDeployedFunctions();
|
|
258410
258411
|
return functions.map((fn) => fn.name);
|
|
258411
258412
|
}
|
|
258413
|
+
async function getFunctionNamesForHint(availableFunctionNames, logsError) {
|
|
258414
|
+
if (availableFunctionNames.length > 0)
|
|
258415
|
+
return availableFunctionNames;
|
|
258416
|
+
try {
|
|
258417
|
+
return await getRemoteFunctionNames();
|
|
258418
|
+
} catch {
|
|
258419
|
+
throw logsError;
|
|
258420
|
+
}
|
|
258421
|
+
}
|
|
258412
258422
|
function validateLimit(limit) {
|
|
258413
258423
|
if (limit === undefined)
|
|
258414
258424
|
return;
|
|
@@ -268082,4 +268092,4 @@ export {
|
|
|
268082
268092
|
runCLI
|
|
268083
268093
|
};
|
|
268084
268094
|
|
|
268085
|
-
//# debugId=
|
|
268095
|
+
//# debugId=8FAE93D2AF19E60864756E2164756E21
|