@tailor-platform/sdk 1.39.1 → 1.40.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +7 -10
  3. package/dist/{actor-Bb4OVq1j.d.mts → actor-B2oEmlTc.d.mts} +2 -2
  4. package/dist/application-CEeKm4R-.mjs +4 -0
  5. package/dist/{application-BHu8YE-g.mjs → application-C_LFXkKJ.mjs} +2 -2
  6. package/dist/{application-BHu8YE-g.mjs.map → application-C_LFXkKJ.mjs.map} +1 -1
  7. package/dist/cli/index.mjs +153 -32
  8. package/dist/cli/index.mjs.map +1 -1
  9. package/dist/cli/lib.d.mts +40 -6
  10. package/dist/cli/lib.mjs +3 -3
  11. package/dist/cli/skills.mjs +13 -43
  12. package/dist/cli/skills.mjs.map +1 -1
  13. package/dist/{client-B2K45RvK.mjs → client-DjGFRjH4.mjs} +31 -3
  14. package/dist/{client-B2K45RvK.mjs.map → client-DjGFRjH4.mjs.map} +1 -1
  15. package/dist/client-Dtf48x0o.mjs +4 -0
  16. package/dist/configure/index.d.mts +4 -4
  17. package/dist/{crash-report-CPUF3T5d.mjs → crash-report-CEIXtw4D.mjs} +1 -1
  18. package/dist/{crash-report-CACiemAr.mjs → crash-report-CSWITsTz.mjs} +2 -2
  19. package/dist/{crash-report-CACiemAr.mjs.map → crash-report-CSWITsTz.mjs.map} +1 -1
  20. package/dist/{index-Cx1RYDbu.d.mts → index-BtXZdz-F.d.mts} +2 -2
  21. package/dist/{index-CeFwhUkX.d.mts → index-Chvw1Eod.d.mts} +2 -2
  22. package/dist/{index-Ch8Em3nz.d.mts → index-CiNNNpuH.d.mts} +2 -2
  23. package/dist/{index-BYmdVno1.d.mts → index-D_ezppY7.d.mts} +4 -4
  24. package/dist/{index-DLO_XvLi.d.mts → index-reFAYSX7.d.mts} +2 -2
  25. package/dist/{interceptor-B5bKVwgq.mjs → interceptor-4UC-KTno.mjs} +1 -1
  26. package/dist/{interceptor-B5bKVwgq.mjs.map → interceptor-4UC-KTno.mjs.map} +1 -1
  27. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  28. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  29. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  30. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  31. package/dist/plugin/index.d.mts +2 -2
  32. package/dist/repl-editor-DjycioU-.mjs +255 -0
  33. package/dist/repl-editor-DjycioU-.mjs.map +1 -0
  34. package/dist/{runtime-2xqzvkQv.mjs → runtime-im7Sq4jO.mjs} +231 -171
  35. package/dist/runtime-im7Sq4jO.mjs.map +1 -0
  36. package/dist/{tailor-db-field-B99RnR2N.d.mts → tailor-db-field-CoFKRCYW.d.mts} +1 -1
  37. package/dist/utils/test/index.d.mts +2 -2
  38. package/dist/{workflow.generated-DSwr-k57.d.mts → workflow.generated-Btz6srLR.d.mts} +2 -2
  39. package/docs/cli/auth.md +20 -14
  40. package/docs/cli/executor.md +17 -14
  41. package/docs/cli/function.md +6 -4
  42. package/docs/cli/query.md +45 -0
  43. package/docs/cli/secret.md +13 -9
  44. package/docs/cli/skills.md +75 -0
  45. package/docs/cli/staticwebsite.md +6 -4
  46. package/docs/cli/user.md +9 -1
  47. package/docs/cli/workflow.md +17 -13
  48. package/docs/cli-reference.md +16 -0
  49. package/docs/services/workflow.md +1 -1
  50. package/package.json +11 -8
  51. package/dist/application-C8Lr37AM.mjs +0 -4
  52. package/dist/client-CEVmv94H.mjs +0 -4
  53. package/dist/runtime-2xqzvkQv.mjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { N as TailorDBType, P as TypeSourceInfoEntry, Q as Resolver, _t as IdProvider, ct as IncomingWebhookTrigger, o as Plugin, rt as Executor, s as PluginAttachment, ut as ScheduleTriggerInput, vt as OAuth2ClientInput } from "../tailor-db-field-B99RnR2N.mjs";
3
- import { n as AppConfig } from "../workflow.generated-DSwr-k57.mjs";
4
- import { n as kyselyTypePlugin } from "../index-CeFwhUkX.mjs";
5
- import { n as enumConstantsPlugin } from "../index-DLO_XvLi.mjs";
6
- import { n as fileUtilsPlugin } from "../index-Cx1RYDbu.mjs";
7
- import { n as seedPlugin } from "../index-Ch8Em3nz.mjs";
2
+ import { N as TailorDBType, P as TypeSourceInfoEntry, Q as Resolver, _t as IdProvider, ct as IncomingWebhookTrigger, o as Plugin, rt as Executor, s as PluginAttachment, ut as ScheduleTriggerInput, vt as OAuth2ClientInput } from "../tailor-db-field-CoFKRCYW.mjs";
3
+ import { n as AppConfig } from "../workflow.generated-Btz6srLR.mjs";
4
+ import { n as kyselyTypePlugin } from "../index-Chvw1Eod.mjs";
5
+ import { n as enumConstantsPlugin } from "../index-reFAYSX7.mjs";
6
+ import { n as fileUtilsPlugin } from "../index-BtXZdz-F.mjs";
7
+ import { n as seedPlugin } from "../index-CiNNNpuH.mjs";
8
8
  import { z } from "zod";
9
9
  import * as _$_bufbuild_protobuf_codegenv20 from "@bufbuild/protobuf/codegenv2";
10
10
  import { GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
@@ -17690,11 +17690,23 @@ type HealthOptions = z.input<typeof healthOptionsSchema>;
17690
17690
  */
17691
17691
  declare function getAppHealth(options: HealthOptions): Promise<AppHealthInfo>;
17692
17692
  //#endregion
17693
+ //#region src/cli/shared/args.d.ts
17694
+ /**
17695
+ * Schema for sort order (`asc` or `desc`).
17696
+ */
17697
+ declare const orderArg: z.ZodEnum<{
17698
+ asc: "asc";
17699
+ desc: "desc";
17700
+ }>;
17701
+ type Order = z.infer<typeof orderArg>;
17702
+ //#endregion
17693
17703
  //#region src/cli/commands/machineuser/list.d.ts
17694
17704
  interface ListMachineUsersOptions {
17695
17705
  workspaceId?: string;
17696
17706
  profile?: string;
17697
17707
  configPath?: string;
17708
+ order?: Order;
17709
+ limit?: number;
17698
17710
  }
17699
17711
  interface MachineUserInfo {
17700
17712
  name: string;
@@ -17768,6 +17780,8 @@ interface ListOAuth2ClientsOptions {
17768
17780
  workspaceId?: string;
17769
17781
  profile?: string;
17770
17782
  configPath?: string;
17783
+ order?: Order;
17784
+ limit?: number;
17771
17785
  }
17772
17786
  /**
17773
17787
  * List OAuth2 clients for the current application.
@@ -17812,6 +17826,8 @@ interface WorkflowExecutionInfo {
17812
17826
  interface ListWorkflowsOptions {
17813
17827
  workspaceId?: string;
17814
17828
  profile?: string;
17829
+ order?: Order;
17830
+ limit?: number;
17815
17831
  }
17816
17832
  /**
17817
17833
  * List workflows in the workspace and return CLI-friendly info.
@@ -17909,6 +17925,8 @@ type ListWorkflowExecutionsTypedOptions<W extends WorkflowLike = WorkflowLike> =
17909
17925
  status?: string;
17910
17926
  workspaceId?: string;
17911
17927
  profile?: string;
17928
+ order?: Order;
17929
+ limit?: number;
17912
17930
  };
17913
17931
  /**
17914
17932
  * @deprecated Use ListWorkflowExecutionsTypedOptions instead.
@@ -17918,6 +17936,8 @@ interface ListWorkflowExecutionsOptions {
17918
17936
  profile?: string;
17919
17937
  workflowName?: string;
17920
17938
  status?: string;
17939
+ order?: Order;
17940
+ limit?: number;
17921
17941
  }
17922
17942
  interface GetWorkflowExecutionOptions {
17923
17943
  executionId: string;
@@ -17938,6 +17958,11 @@ interface GetWorkflowExecutionResult {
17938
17958
  }
17939
17959
  /**
17940
17960
  * List workflow executions with optional filters.
17961
+ *
17962
+ * Returns at most `options.limit` items. When `limit` is omitted or 0 the
17963
+ * function pages through every execution. The CLI caps this at 50 by
17964
+ * default via `pagedLogArgs`; programmatic callers that want the same
17965
+ * cap should pass `limit: 50` explicitly.
17941
17966
  * @param options - Workflow execution listing options
17942
17967
  * @returns List of workflow executions
17943
17968
  */
@@ -18051,6 +18076,7 @@ type ExecutorLike$1 = {
18051
18076
  type ListExecutorJobsTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18052
18077
  executor: E;
18053
18078
  status?: string;
18079
+ order?: Order;
18054
18080
  limit?: number;
18055
18081
  workspaceId?: string;
18056
18082
  profile?: string;
@@ -18076,6 +18102,7 @@ type WatchExecutorJobTypedOptions<E extends ExecutorLike$1 = ExecutorLike$1> = {
18076
18102
  interface ListExecutorJobsOptions {
18077
18103
  executorName: string;
18078
18104
  status?: string;
18105
+ order?: Order;
18079
18106
  limit?: number;
18080
18107
  workspaceId?: string;
18081
18108
  profile?: string;
@@ -18121,6 +18148,11 @@ interface WatchExecutorJobResult {
18121
18148
  }
18122
18149
  /**
18123
18150
  * List executor jobs for a given executor.
18151
+ *
18152
+ * Returns at most `options.limit` items. When `limit` is omitted or 0 the
18153
+ * function pages through every job. The CLI caps this at 50 by default
18154
+ * via `pagedLogArgs`; programmatic callers that want the same cap should
18155
+ * pass `limit: 50` explicitly.
18124
18156
  * @param options - Options for listing executor jobs
18125
18157
  * @returns List of executor job information
18126
18158
  */
@@ -18145,6 +18177,8 @@ declare function watchExecutorJob(options: WatchExecutorJobOptions): Promise<Wat
18145
18177
  interface ListExecutorsOptions {
18146
18178
  workspaceId?: string;
18147
18179
  profile?: string;
18180
+ order?: Order;
18181
+ limit?: number;
18148
18182
  }
18149
18183
  /**
18150
18184
  * List executors in the workspace and return CLI-friendly info.
package/dist/cli/lib.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
- import { u as initOperatorClient } from "../client-B2K45RvK.mjs";
3
- import { A as truncate, B as updateOrganization, Bt as DIFF_FILE_NAME, Ct as startWorkflow, D as resumeWorkflow, Dt as getWorkflowExecution, Ft as waitForExecution, Gt as compareSnapshots, Ht as MIGRATE_FILE_NAME, It as MIGRATION_LABEL_KEY, J as updateFolder, Jt as getLatestMigrationNumber, K as getOrganization, Kt as createSnapshotFromLocalTypes, L as remove, M as generate$1, Mt as getExecutor, Nt as apply, Ot as listWorkflowExecutions, P as show, Pt as executeScript, Q as getFolder, Qt as getNextMigrationNumber, Rt as bundleMigrationScript, S as listApps, Tt as getWorkflow, Ut as SCHEMA_FILE_NAME, V as organizationTree, Vt as INITIAL_SCHEMA_NUMBER, W as listOrganizations, Wt as compareLocalTypesWithSnapshot, X as listFolders, Xt as getMigrationFilePath, Yt as getMigrationDirPath, Zt as getMigrationFiles, _ as getWorkspace, _t as listExecutors, a as updateUser, an as getNamespacesWithMigrations, bt as listExecutorJobs, d as inviteUser, dt as generate, et as deleteFolder, ft as listWebhookExecutors, h as listWorkspaces, ht as triggerExecutor, in as hasChanges, it as listOAuth2Clients, k as listWorkflows, l as listUsers, ln as generateUserTypes, n as query, nn as formatDiffSummary, nt as createFolder, ot as getOAuth2Client, p as restoreWorkspace, rn as formatMigrationDiff, s as removeUser, st as getMachineUserToken, t as isNativeTypeScriptRuntime, tn as reconstructSnapshotFromMigrations, un as apiCall, ut as listMachineUsers, vt as getExecutorJob, w as getAppHealth, x as createWorkspace, xt as watchExecutorJob, y as deleteWorkspace, zt as DB_TYPES_FILE_NAME } from "../runtime-2xqzvkQv.mjs";
4
- import { _ as loadConfig, b as loadAccessToken, h as getDistDir, x as loadWorkspaceId } from "../application-BHu8YE-g.mjs";
2
+ import { d as initOperatorClient } from "../client-DjGFRjH4.mjs";
3
+ import { A as truncate, B as updateOrganization, Bt as DIFF_FILE_NAME, Ct as startWorkflow, D as resumeWorkflow, Dt as getWorkflowExecution, Ft as waitForExecution, Gt as compareSnapshots, Ht as MIGRATE_FILE_NAME, It as MIGRATION_LABEL_KEY, J as updateFolder, Jt as getLatestMigrationNumber, K as getOrganization, Kt as createSnapshotFromLocalTypes, L as remove, M as generate$1, Mt as getExecutor, Nt as apply, Ot as listWorkflowExecutions, P as show, Pt as executeScript, Q as getFolder, Qt as getNextMigrationNumber, Rt as bundleMigrationScript, S as listApps, Tt as getWorkflow, Ut as SCHEMA_FILE_NAME, V as organizationTree, Vt as INITIAL_SCHEMA_NUMBER, W as listOrganizations, Wt as compareLocalTypesWithSnapshot, X as listFolders, Xt as getMigrationFilePath, Yt as getMigrationDirPath, Zt as getMigrationFiles, _ as getWorkspace, _t as listExecutors, a as updateUser, an as getNamespacesWithMigrations, bt as listExecutorJobs, d as inviteUser, dt as generate, et as deleteFolder, ft as listWebhookExecutors, h as listWorkspaces, ht as triggerExecutor, in as hasChanges, it as listOAuth2Clients, k as listWorkflows, l as listUsers, ln as generateUserTypes, n as query, nn as formatDiffSummary, nt as createFolder, ot as getOAuth2Client, p as restoreWorkspace, rn as formatMigrationDiff, s as removeUser, st as getMachineUserToken, t as isNativeTypeScriptRuntime, tn as reconstructSnapshotFromMigrations, un as apiCall, ut as listMachineUsers, vt as getExecutorJob, w as getAppHealth, x as createWorkspace, xt as watchExecutorJob, y as deleteWorkspace, zt as DB_TYPES_FILE_NAME } from "../runtime-im7Sq4jO.mjs";
4
+ import { _ as loadConfig, b as loadAccessToken, h as getDistDir, x as loadWorkspaceId } from "../application-C_LFXkKJ.mjs";
5
5
  import { n as enumConstantsPlugin } from "../enum-constants-Dx82rSjf.mjs";
6
6
  import { n as fileUtilsPlugin } from "../file-utils-DeWpvq3T.mjs";
7
7
  import { n as kyselyTypePlugin } from "../kysely-type-CwtvQuxh.mjs";
@@ -1,51 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { n as logger } from "../logger-DTNAMYGy.mjs";
4
+ import { dirname, resolve } from "pathe";
5
+ import { fileURLToPath } from "node:url";
3
6
  import { spawn } from "node:child_process";
4
7
 
5
- //#region src/cli/shared/skills-installer.ts
6
- const SKILL_NAME = "tailor-sdk";
7
- const DEFAULT_SKILLS_SOURCE = "https://github.com/tailor-platform/sdk/tree/main/packages/sdk/skills";
8
- const SKILLS_SOURCE_ENV_KEY = "TAILOR_SDK_SKILLS_SOURCE";
9
- function resolveNpxCommand(platform = process.platform) {
10
- return platform === "win32" ? "npx.cmd" : "npx";
11
- }
12
- function resolveSkillsSource(source) {
13
- return source ?? process.env[SKILLS_SOURCE_ENV_KEY] ?? "https://github.com/tailor-platform/sdk/tree/main/packages/sdk/skills";
14
- }
15
- /**
16
- * Build CLI arguments for `skills add` with the fixed tailor-sdk skill target.
17
- * @param additionalArgs - Additional options to pass through to `skills add`
18
- * @param source - Optional skill source URL or path
19
- * @returns CLI arguments for `npx skills add`
20
- */
21
- function buildSkillsAddArgs(additionalArgs, source) {
22
- return [
23
- "skills",
24
- "add",
25
- resolveSkillsSource(source),
26
- "--skill",
27
- SKILL_NAME,
28
- ...additionalArgs
29
- ];
30
- }
31
- /**
32
- * Run `npx skills add` to install the tailor-sdk skill.
33
- * @param options - Runtime options for skill installation
34
- * @returns Process exit code from the spawned `npx` command
35
- */
36
- async function runSkillsInstaller(options = {}) {
37
- const args = buildSkillsAddArgs(options.additionalArgs ?? [], options.source);
38
- const childProcess = (options.spawnFn ?? ((command, spawnArgs, spawnOptions) => spawn(command, spawnArgs, spawnOptions)))(resolveNpxCommand(), args, { stdio: "inherit" });
39
- return await new Promise((resolve, reject) => {
40
- childProcess.on("error", (error) => reject(error));
41
- childProcess.on("close", (code) => resolve(code ?? 1));
42
- });
43
- }
44
-
45
- //#endregion
46
8
  //#region src/cli/skills.ts
47
- const exitCode = await runSkillsInstaller({ additionalArgs: process.argv.slice(2) });
48
- process.exit(exitCode);
9
+ logger.warn("`tailor-sdk-skills` is deprecated and will be removed in v2. Use `tailor-sdk skills install` instead.");
10
+ const mainCli = resolve(dirname(fileURLToPath(import.meta.url)), "index.mjs");
11
+ spawn(process.execPath, [
12
+ mainCli,
13
+ "skills",
14
+ "install",
15
+ ...process.argv.slice(2)
16
+ ], { stdio: "inherit" }).on("exit", (code) => {
17
+ process.exit(code ?? 1);
18
+ });
49
19
 
50
20
  //#endregion
51
21
  export { };
@@ -1 +1 @@
1
- {"version":3,"file":"skills.mjs","names":[],"sources":["../../src/cli/shared/skills-installer.ts","../../src/cli/skills.ts"],"sourcesContent":["import { spawn } from \"node:child_process\";\n\nexport const SKILL_NAME = \"tailor-sdk\";\nexport const DEFAULT_SKILLS_SOURCE =\n \"https://github.com/tailor-platform/sdk/tree/main/packages/sdk/skills\";\nconst SKILLS_SOURCE_ENV_KEY = \"TAILOR_SDK_SKILLS_SOURCE\";\n\ninterface ChildProcessLike {\n on(event: \"close\", listener: (code: number | null) => void): ChildProcessLike;\n on(event: \"error\", listener: (error: Error) => void): ChildProcessLike;\n}\n\ntype SpawnLike = (\n command: string,\n args: string[],\n options: { stdio: \"inherit\" },\n) => ChildProcessLike;\n\ninterface RunSkillsInstallerOptions {\n additionalArgs?: string[];\n source?: string;\n spawnFn?: SpawnLike;\n}\n\nfunction resolveNpxCommand(platform: NodeJS.Platform = process.platform): string {\n return platform === \"win32\" ? \"npx.cmd\" : \"npx\";\n}\n\nfunction resolveSkillsSource(source?: string): string {\n return source ?? process.env[SKILLS_SOURCE_ENV_KEY] ?? DEFAULT_SKILLS_SOURCE;\n}\n\n/**\n * Build CLI arguments for `skills add` with the fixed tailor-sdk skill target.\n * @param additionalArgs - Additional options to pass through to `skills add`\n * @param source - Optional skill source URL or path\n * @returns CLI arguments for `npx skills add`\n */\nexport function buildSkillsAddArgs(additionalArgs: readonly string[], source?: string): string[] {\n return [\"skills\", \"add\", resolveSkillsSource(source), \"--skill\", SKILL_NAME, ...additionalArgs];\n}\n\n/**\n * Run `npx skills add` to install the tailor-sdk skill.\n * @param options - Runtime options for skill installation\n * @returns Process exit code from the spawned `npx` command\n */\nexport async function runSkillsInstaller(options: RunSkillsInstallerOptions = {}): Promise<number> {\n const args = buildSkillsAddArgs(options.additionalArgs ?? [], options.source);\n const spawnFn =\n options.spawnFn ??\n ((command: string, spawnArgs: string[], spawnOptions: { stdio: \"inherit\" }) =>\n spawn(command, spawnArgs, spawnOptions));\n\n const childProcess = spawnFn(resolveNpxCommand(), args, { stdio: \"inherit\" });\n\n return await new Promise<number>((resolve, reject) => {\n childProcess.on(\"error\", (error) => reject(error));\n childProcess.on(\"close\", (code) => resolve(code ?? 1));\n });\n}\n","#!/usr/bin/env node\n\nimport { runSkillsInstaller } from \"./shared/skills-installer\";\n\nconst exitCode = await runSkillsInstaller({\n additionalArgs: process.argv.slice(2),\n});\n\nprocess.exit(exitCode);\n"],"mappings":";;;;;AAEA,MAAa,aAAa;AAC1B,MAAa,wBACX;AACF,MAAM,wBAAwB;AAmB9B,SAAS,kBAAkB,WAA4B,QAAQ,UAAkB;AAC/E,QAAO,aAAa,UAAU,YAAY;;AAG5C,SAAS,oBAAoB,QAAyB;AACpD,QAAO,UAAU,QAAQ,IAAI;;;;;;;;AAS/B,SAAgB,mBAAmB,gBAAmC,QAA2B;AAC/F,QAAO;EAAC;EAAU;EAAO,oBAAoB,OAAO;EAAE;EAAW;EAAY,GAAG;EAAe;;;;;;;AAQjG,eAAsB,mBAAmB,UAAqC,EAAE,EAAmB;CACjG,MAAM,OAAO,mBAAmB,QAAQ,kBAAkB,EAAE,EAAE,QAAQ,OAAO;CAM7E,MAAM,gBAJJ,QAAQ,aACN,SAAiB,WAAqB,iBACtC,MAAM,SAAS,WAAW,aAAa,GAEd,mBAAmB,EAAE,MAAM,EAAE,OAAO,WAAW,CAAC;AAE7E,QAAO,MAAM,IAAI,SAAiB,SAAS,WAAW;AACpD,eAAa,GAAG,UAAU,UAAU,OAAO,MAAM,CAAC;AAClD,eAAa,GAAG,UAAU,SAAS,QAAQ,QAAQ,EAAE,CAAC;GACtD;;;;;ACvDJ,MAAM,WAAW,MAAM,mBAAmB,EACxC,gBAAgB,QAAQ,KAAK,MAAM,EAAE,EACtC,CAAC;AAEF,QAAQ,KAAK,SAAS"}
1
+ {"version":3,"file":"skills.mjs","names":[],"sources":["../../src/cli/skills.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { spawn } from \"node:child_process\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, resolve } from \"pathe\";\nimport { logger } from \"./shared/logger\";\n\nlogger.warn(\n \"`tailor-sdk-skills` is deprecated and will be removed in v2. Use `tailor-sdk skills install` instead.\",\n);\n\nconst here = dirname(fileURLToPath(import.meta.url));\nconst mainCli = resolve(here, \"index.mjs\");\n\nconst child = spawn(process.execPath, [mainCli, \"skills\", \"install\", ...process.argv.slice(2)], {\n stdio: \"inherit\",\n});\n\nchild.on(\"exit\", (code) => {\n process.exit(code ?? 1);\n});\n"],"mappings":";;;;;;;;AAOA,OAAO,KACL,wGACD;AAGD,MAAM,UAAU,QADH,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC,EACtB,YAAY;AAE5B,MAAM,QAAQ,UAAU;CAAC;CAAS;CAAU;CAAW,GAAG,QAAQ,KAAK,MAAM,EAAE;CAAC,EAAE,EAC9F,OAAO,WACR,CAAC,CAEI,GAAG,SAAS,SAAS;AACzB,SAAQ,KAAK,QAAQ,EAAE;EACvB"}
@@ -16149,7 +16149,7 @@ function initOAuth2Client() {
16149
16149
  * @returns Configured Operator client
16150
16150
  */
16151
16151
  async function initOperatorClient(accessToken) {
16152
- const { createTracingInterceptor } = await import("./interceptor-B5bKVwgq.mjs");
16152
+ const { createTracingInterceptor } = await import("./interceptor-4UC-KTno.mjs");
16153
16153
  return createClient(OperatorService, await createTransport(platformBaseUrl, [
16154
16154
  await userAgentInterceptor(),
16155
16155
  await bearerTokenInterceptor(accessToken),
@@ -16328,6 +16328,34 @@ async function fetchAll(fn) {
16328
16328
  return items;
16329
16329
  }
16330
16330
  /**
16331
+ * Fetch paginated resources with an optional upper bound on the number of
16332
+ * items returned. When `limit` is 0 or undefined the function behaves
16333
+ * like `fetchAll` and returns every page. When `limit` is positive the
16334
+ * function stops once enough items are collected, requesting smaller
16335
+ * pages as it approaches the boundary.
16336
+ * @template T
16337
+ * @param fn - Page fetcher returning items and next page token
16338
+ * @param options - Pagination options
16339
+ * @returns Fetched items (length <= limit when limit > 0)
16340
+ */
16341
+ async function fetchPaged(fn, options) {
16342
+ const limit = options?.limit;
16343
+ const unbounded = limit === void 0 || limit === 0;
16344
+ const items = [];
16345
+ let pageToken = "";
16346
+ while (true) {
16347
+ const pageSize = unbounded ? MAX_PAGE_SIZE : Math.min(limit - items.length, MAX_PAGE_SIZE);
16348
+ if (!unbounded && pageSize <= 0) break;
16349
+ const [batch, nextPageToken] = await fn(pageToken, pageSize);
16350
+ items.push(...batch);
16351
+ if (!unbounded && items.length >= limit) break;
16352
+ if (!nextPageToken) break;
16353
+ pageToken = nextPageToken;
16354
+ }
16355
+ if (!unbounded && items.length > limit) return items.slice(0, limit);
16356
+ return items;
16357
+ }
16358
+ /**
16331
16359
  * Fetch user info from the Tailor Platform userinfo endpoint.
16332
16360
  * @param accessToken - Access token for the current user
16333
16361
  * @returns Parsed user info
@@ -16428,5 +16456,5 @@ async function closeConnectionPool() {
16428
16456
  }
16429
16457
 
16430
16458
  //#endregion
16431
- export { Subgraph_ServiceType as $, FunctionExecution_Type as A, AuthSCIMAttribute_Mutability as B, TailorDBType_Permission_Permit as C, IdPPermissionOperator as D, IdPLang as E, AuthHookPoint as F, TenantProviderConfig_TenantProviderType as G, AuthSCIMAttribute_Uniqueness as H, AuthIDPConfig_AuthType as I, ConditionSchema as J, UserProfileProviderConfig_UserProfileProviderType as K, AuthInvokerSchema as L, ExecutorTargetType as M, ExecutorTriggerType as N, IdPPermissionPermit as O, AuthConnection_Type as P, ApplicationSchemaUpdateAttemptStatus as Q, AuthOAuth2Client_ClientType as R, TailorDBType_Permission_Operator as S, PipelineResolver_OperationType as T, AuthSCIMConfig_AuthorizationType as U, AuthSCIMAttribute_Type as V, PATScope as W, FilterSchema as X, Condition_Operator as Y, PageDirection as Z, WorkflowExecution_Status as _, fetchMachineUserToken as a, TailorDBGQLPermission_Operator as b, formatRequestParams as c, parseMethodName as d, platformBaseUrl as f, WorkspacePlatformUserRole as g, OperatorService as h, fetchAll as i, ExecutorJobStatus as j, FunctionExecution_Status as k, initOAuth2Client as l, userAgent as m, closeConnectionPool as n, fetchPlatformMachineUserToken as o, resolveStaticWebsiteUrls as p, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as q, createTransport as r, fetchUserInfo as s, MAX_PAGE_SIZE as t, initOperatorClient as u, WorkflowJobExecution_Status as v, TailorDBType_PermitAction as w, TailorDBGQLPermission_Permit as x, TailorDBGQLPermission_Action as y, AuthOAuth2Client_GrantType as z };
16432
- //# sourceMappingURL=client-B2K45RvK.mjs.map
16459
+ export { ApplicationSchemaUpdateAttemptStatus as $, FunctionExecution_Status as A, AuthOAuth2Client_GrantType as B, TailorDBType_Permission_Operator as C, IdPLang as D, PipelineResolver_OperationType as E, AuthConnection_Type as F, PATScope as G, AuthSCIMAttribute_Type as H, AuthHookPoint as I, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as J, TenantProviderConfig_TenantProviderType as K, AuthIDPConfig_AuthType as L, ExecutorJobStatus as M, ExecutorTargetType as N, IdPPermissionOperator as O, ExecutorTriggerType as P, PageDirection as Q, AuthInvokerSchema as R, TailorDBGQLPermission_Permit as S, TailorDBType_PermitAction as T, AuthSCIMAttribute_Uniqueness as U, AuthSCIMAttribute_Mutability as V, AuthSCIMConfig_AuthorizationType as W, Condition_Operator as X, ConditionSchema as Y, FilterSchema as Z, WorkspacePlatformUserRole as _, fetchMachineUserToken as a, TailorDBGQLPermission_Action as b, fetchUserInfo as c, initOperatorClient as d, Subgraph_ServiceType as et, parseMethodName as f, OperatorService as g, userAgent as h, fetchAll as i, FunctionExecution_Type as j, IdPPermissionPermit as k, formatRequestParams as l, resolveStaticWebsiteUrls as m, closeConnectionPool as n, fetchPaged as o, platformBaseUrl as p, UserProfileProviderConfig_UserProfileProviderType as q, createTransport as r, fetchPlatformMachineUserToken as s, MAX_PAGE_SIZE as t, initOAuth2Client as u, WorkflowExecution_Status as v, TailorDBType_Permission_Permit as w, TailorDBGQLPermission_Operator as x, WorkflowJobExecution_Status as y, AuthOAuth2Client_ClientType as z };
16460
+ //# sourceMappingURL=client-DjGFRjH4.mjs.map