wawesome 0.20.0 → 0.20.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/dist/index.mjs +25 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -895,7 +895,7 @@ async function buildHandler(entryInput, config, options) {
|
|
|
895
895
|
* that has to name this version — `--version`, the dependency a scaffolded
|
|
896
896
|
* project pins — reads it here, so a release bumps one file.
|
|
897
897
|
*/
|
|
898
|
-
const CLI_VERSION = "0.20.
|
|
898
|
+
const CLI_VERSION = "0.20.1";
|
|
899
899
|
//#endregion
|
|
900
900
|
//#region src/cli-login.ts
|
|
901
901
|
const START_PATH = "/v1/cli/login/start";
|
|
@@ -2734,7 +2734,22 @@ async function fetchAppFunctions(gatewayUrl, tenantJwt, appSlug, isVerbose) {
|
|
|
2734
2734
|
headers: { Authorization: `Bearer ${tenantJwt}` }
|
|
2735
2735
|
});
|
|
2736
2736
|
if (!res.ok) return null;
|
|
2737
|
-
|
|
2737
|
+
const data = await res.json();
|
|
2738
|
+
return (Array.isArray(data) ? data : Array.isArray(data?.functions) ? data.functions : []).map((item) => ({
|
|
2739
|
+
id: item.function?.id || item.id,
|
|
2740
|
+
name: item.function?.name || item.name || "",
|
|
2741
|
+
slug: item.function?.slug || item.slug || "",
|
|
2742
|
+
visibility: item.function?.visibility || item.visibility || "public",
|
|
2743
|
+
function: {
|
|
2744
|
+
id: item.function?.id || item.id || "",
|
|
2745
|
+
name: item.function?.name || item.name || "",
|
|
2746
|
+
slug: item.function?.slug || item.slug || "",
|
|
2747
|
+
app_id: item.function?.app_id || item.app_id || "",
|
|
2748
|
+
visibility: item.function?.visibility || item.visibility || "public",
|
|
2749
|
+
created_at: item.function?.created_at || item.created_at || "",
|
|
2750
|
+
updated_at: item.function?.updated_at || item.updated_at || ""
|
|
2751
|
+
}
|
|
2752
|
+
}));
|
|
2738
2753
|
}
|
|
2739
2754
|
async function pauseScheduleApi(gatewayUrl, tenantJwt, funcName, scheduleName, appSlug, reason, isVerbose) {
|
|
2740
2755
|
const scopedUrl = appSlug ? `${gatewayUrl}/v1/apps/${encodeURIComponent(appSlug)}/functions/${encodeURIComponent(funcName)}/schedules/${encodeURIComponent(scheduleName)}/pause` : `${gatewayUrl}/v1/functions/${encodeURIComponent(funcName)}/schedules/${encodeURIComponent(scheduleName)}/pause`;
|
|
@@ -2833,9 +2848,11 @@ async function listSchedulesCommand(target, options = {}) {
|
|
|
2833
2848
|
if (appFuncs !== null) {
|
|
2834
2849
|
const functionSchedules = [];
|
|
2835
2850
|
for (const item of appFuncs) {
|
|
2836
|
-
const
|
|
2851
|
+
const name = item.function?.name || item.name;
|
|
2852
|
+
if (!name) continue;
|
|
2853
|
+
const scheds = await fetchFunctionSchedules(creds.gateway_url, creds.tenant_jwt, name, target, isVerbose);
|
|
2837
2854
|
functionSchedules.push({
|
|
2838
|
-
functionName:
|
|
2855
|
+
functionName: name,
|
|
2839
2856
|
schedules: scheds || []
|
|
2840
2857
|
});
|
|
2841
2858
|
}
|
|
@@ -2859,9 +2876,11 @@ async function listSchedulesCommand(target, options = {}) {
|
|
|
2859
2876
|
}
|
|
2860
2877
|
const functionSchedules = [];
|
|
2861
2878
|
for (const item of appFuncs) {
|
|
2862
|
-
const
|
|
2879
|
+
const name = item.function?.name || item.name;
|
|
2880
|
+
if (!name) continue;
|
|
2881
|
+
const scheds = await fetchFunctionSchedules(creds.gateway_url, creds.tenant_jwt, name, appSlug, isVerbose);
|
|
2863
2882
|
functionSchedules.push({
|
|
2864
|
-
functionName:
|
|
2883
|
+
functionName: name,
|
|
2865
2884
|
schedules: scheds || []
|
|
2866
2885
|
});
|
|
2867
2886
|
}
|