fix: hide draft only items in pickers and from ops (#3977)

* fix: hide draft only scripts to ops and in pickers/flow builder

* fix: default to hiding draft only scripts

* fix: hide script drafts from ops

* fix: generalize to hide draft only/no main func by default

* fix: archived openapi nit
This commit is contained in:
HugoCasa
2024-06-26 12:21:45 +02:00
committed by GitHub
parent 9ac18c33bf
commit dd804839f0
14 changed files with 96 additions and 41 deletions
+9 -1
View File
@@ -440,7 +440,13 @@ export function removeExtensionToPath(path: string): string {
throw new Error("Invalid extension: " + path);
}
async function list(opts: GlobalOptions & { showArchived?: boolean }) {
async function list(
opts: GlobalOptions & {
showArchived?: boolean;
includeWithoutMain?: boolean;
includeDraftOnly?: boolean;
}
) {
const workspace = await resolveWorkspace(opts);
await requireLogin(opts);
@@ -453,6 +459,8 @@ async function list(opts: GlobalOptions & { showArchived?: boolean }) {
page,
perPage,
showArchived: opts.showArchived ?? false,
includeWithoutMain: opts.includeWithoutMain ?? false,
includeDraftOnly: opts.includeDraftOnly ?? true,
});
page += 1;
total.push(...res);