@tailor-platform/sdk 1.1.0 → 1.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#322](https://github.com/tailor-platform/sdk/pull/322) [`5d1805b`](https://github.com/tailor-platform/sdk/commit/5d1805b1c920285fa5e79f03e6604b898002c355) Thanks [@toiroakr](https://github.com/toiroakr)! - Handle empty resolver/executor/workflow bundles without error and add tests
8
+
3
9
  ## 1.1.0
4
10
 
5
11
  ### Minor Changes
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import "../chunk-DhYkiPYI.mjs";
3
3
  import "../config-CtRi0Lgg.mjs";
4
- import { $ as jsonArgs, A as printData, B as loadAccessToken, D as tokenCommand, G as fetchUserInfo, H as readPlatformConfig, I as loadConfig, J as readPackageJson, K as initOAuth2Client, M as generateCommand, O as listCommand$5, P as applyCommand, Q as deploymentArgs, R as apiCommand, S as listCommand$6, U as writePlatformConfig, V as loadWorkspaceId, W as fetchAll, X as commonArgs, Y as PATScope, Z as confirmationArgs, a as createCommand$3, d as listCommand$7, et as withCommonArgs, h as executionsCommand, l as startCommand, nt as logger, p as getCommand$2, q as initOperatorClient, r as deleteCommand$3, s as resumeCommand, t as listCommand$8, tt as workspaceArgs, w as getCommand$1, x as removeCommand, y as showCommand, z as fetchLatestToken } from "../list-C0wNbdbP.mjs";
4
+ import { $ as jsonArgs, A as printData, B as loadAccessToken, D as tokenCommand, G as fetchUserInfo, H as readPlatformConfig, I as loadConfig, J as readPackageJson, K as initOAuth2Client, M as generateCommand, O as listCommand$5, P as applyCommand, Q as deploymentArgs, R as apiCommand, S as listCommand$6, U as writePlatformConfig, V as loadWorkspaceId, W as fetchAll, X as commonArgs, Y as PATScope, Z as confirmationArgs, a as createCommand$3, d as listCommand$7, et as withCommonArgs, h as executionsCommand, l as startCommand, nt as logger, p as getCommand$2, q as initOperatorClient, r as deleteCommand$3, s as resumeCommand, t as listCommand$8, tt as workspaceArgs, w as getCommand$1, x as removeCommand, y as showCommand, z as fetchLatestToken } from "../list-LSl71zs8.mjs";
5
5
  import { register } from "node:module";
6
6
  import { defineCommand, runCommand, runMain } from "citty";
7
7
  import { generateCodeVerifier } from "@badgateway/oauth2-client";
@@ -1,6 +1,5 @@
1
1
  /// <reference path="./../user-defined.d.ts" />
2
2
  import { N as ParsedTailorDBType, Y as OAuth2ClientInput, d as AppConfig, gt as Resolver, m as Generator, q as IdProviderConfig, t as Executor } from "../types-UefR8mZn.mjs";
3
- import "citty";
4
3
  import { z } from "zod";
5
4
  import { OAuth2Client } from "@badgateway/oauth2-client";
6
5
  import "@bufbuild/protobuf/wkt";
package/dist/cli/lib.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import "../chunk-DhYkiPYI.mjs";
2
2
  import "../config-CtRi0Lgg.mjs";
3
- import { B as loadAccessToken, C as listOAuth2Clients, E as getMachineUserToken, F as generateUserTypes, I as loadConfig, L as apiCall, N as apply, T as getOAuth2Client, V as loadWorkspaceId, _ as listWorkflowExecutions, b as remove, c as resumeWorkflow, f as listWorkflows, g as getWorkflowExecution, i as deleteWorkspace, j as generate, k as listMachineUsers, m as getWorkflow, n as listWorkspaces, o as createWorkspace, u as startWorkflow, v as show } from "../list-C0wNbdbP.mjs";
3
+ import { B as loadAccessToken, C as listOAuth2Clients, E as getMachineUserToken, F as generateUserTypes, I as loadConfig, L as apiCall, N as apply, T as getOAuth2Client, V as loadWorkspaceId, _ as listWorkflowExecutions, b as remove, c as resumeWorkflow, f as listWorkflows, g as getWorkflowExecution, i as deleteWorkspace, j as generate, k as listMachineUsers, m as getWorkflow, n as listWorkspaces, o as createWorkspace, u as startWorkflow, v as show } from "../list-LSl71zs8.mjs";
4
4
  import { register } from "node:module";
5
5
 
6
6
  //#region src/cli/lib.ts
@@ -99295,7 +99295,10 @@ async function loadExecutor(executorFilePath) {
99295
99295
  */
99296
99296
  async function bundleExecutors(config, triggerContext) {
99297
99297
  const files = loadFilesWithIgnores(config);
99298
- if (files.length === 0) throw new Error(`No files found matching pattern: ${config.files?.join(", ")}`);
99298
+ if (files.length === 0) {
99299
+ logger.warn(`No executor files found for patterns: ${config.files?.join(", ") ?? "(none)"}`);
99300
+ return;
99301
+ }
99299
99302
  logger.newline();
99300
99303
  logger.log(`Bundling ${styles.highlight(files.length.toString())} files for ${styles.info("\"executor\"")}`);
99301
99304
  const executors = [];
@@ -99383,7 +99386,10 @@ async function loadResolver(resolverFilePath) {
99383
99386
  */
99384
99387
  async function bundleResolvers(namespace, config, triggerContext) {
99385
99388
  const files = loadFilesWithIgnores(config);
99386
- if (files.length === 0) throw new Error(`No files found matching pattern: ${config.files?.join(", ")}`);
99389
+ if (files.length === 0) {
99390
+ logger.warn(`No resolver files found for patterns: ${config.files?.join(", ") ?? "(none)"}`);
99391
+ return;
99392
+ }
99387
99393
  logger.newline();
99388
99394
  logger.log(`Bundling ${styles.highlight(files.length.toString())} files for ${styles.info(`"${namespace}"`)}`);
99389
99395
  const resolvers = [];
@@ -99625,7 +99631,7 @@ function transformWorkflowSource(source, targetJobName, targetJobExportName, oth
99625
99631
  */
99626
99632
  async function bundleWorkflowJobs(allJobs, mainJobNames, env = {}, triggerContext) {
99627
99633
  if (allJobs.length === 0) {
99628
- logger.debug("No workflow jobs to bundle");
99634
+ logger.warn("No workflow jobs to bundle");
99629
99635
  return { mainJobDeps: {} };
99630
99636
  }
99631
99637
  const { usedJobs, mainJobDeps } = await filterUsedJobs(allJobs, mainJobNames);
@@ -105684,4 +105690,4 @@ const listCommand = defineCommand({
105684
105690
 
105685
105691
  //#endregion
105686
105692
  export { jsonArgs as $, printData as A, loadAccessToken as B, listOAuth2Clients as C, tokenCommand as D, getMachineUserToken as E, generateUserTypes as F, fetchUserInfo as G, readPlatformConfig as H, loadConfig as I, readPackageJson as J, initOAuth2Client as K, apiCall as L, generateCommand as M, apply as N, listCommand$3 as O, applyCommand as P, deploymentArgs as Q, apiCommand as R, listCommand$2 as S, getOAuth2Client as T, writePlatformConfig as U, loadWorkspaceId as V, fetchAll as W, commonArgs as X, PATScope as Y, confirmationArgs as Z, listWorkflowExecutions as _, createCommand as a, remove as b, resumeWorkflow as c, listCommand$1 as d, withCommonArgs as et, listWorkflows as f, getWorkflowExecution as g, executionsCommand as h, deleteWorkspace as i, generate as j, listMachineUsers as k, startCommand as l, getWorkflow as m, listWorkspaces as n, logger as nt, createWorkspace as o, getCommand as p, initOperatorClient as q, deleteCommand as r, resumeCommand as s, listCommand as t, workspaceArgs as tt, startWorkflow as u, show as v, getCommand$1 as w, removeCommand as x, showCommand as y, fetchLatestToken as z };
105687
- //# sourceMappingURL=list-C0wNbdbP.mjs.map
105693
+ //# sourceMappingURL=list-LSl71zs8.mjs.map