@tailor-platform/sdk 1.33.0 → 1.33.2

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 (87) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/{application-CfAom-vi.mjs → application-CYPU-WIc.mjs} +30 -23
  3. package/dist/application-CYPU-WIc.mjs.map +1 -0
  4. package/dist/application-dnB8CQiT.mjs +4 -0
  5. package/dist/cli/index.d.mts +2 -2
  6. package/dist/cli/index.mjs +25 -32
  7. package/dist/cli/index.mjs.map +1 -1
  8. package/dist/cli/lib.d.mts +101 -12
  9. package/dist/cli/lib.mjs +7 -13
  10. package/dist/cli/lib.mjs.map +1 -1
  11. package/dist/cli/skills.mjs +0 -1
  12. package/dist/cli/skills.mjs.map +1 -1
  13. package/dist/{client-D5P1myz0.mjs → client-CYGsf3Zl.mjs} +91 -27
  14. package/dist/client-CYGsf3Zl.mjs.map +1 -0
  15. package/dist/{client-gpRgZl1b.mjs → client-ea1w8SmG.mjs} +1 -4
  16. package/dist/configure/index.d.mts +5 -5
  17. package/dist/configure/index.mjs +0 -1
  18. package/dist/configure/index.mjs.map +1 -1
  19. package/dist/crash-report-CbueUPaP.mjs +4 -0
  20. package/dist/{crash-report-DnwITWeV.mjs → crash-report-OXafT1iS.mjs} +3 -3
  21. package/dist/{crash-report-DnwITWeV.mjs.map → crash-report-OXafT1iS.mjs.map} +1 -1
  22. package/dist/{enum-constants-Piv_E-2M.mjs → enum-constants-DI85-fPE.mjs} +1 -1
  23. package/dist/{enum-constants-Piv_E-2M.mjs.map → enum-constants-DI85-fPE.mjs.map} +1 -1
  24. package/dist/{env-CSZ9CKg7.d.mts → env-BvIWsJxg.d.mts} +2 -2
  25. package/dist/{file-utils-B7xME5IK.mjs → file-utils-C4rXlOVt.mjs} +1 -1
  26. package/dist/{file-utils-B7xME5IK.mjs.map → file-utils-C4rXlOVt.mjs.map} +1 -1
  27. package/dist/{index-dg3Sf-No.d.mts → index-0H-YH8Ya.d.mts} +2 -2
  28. package/dist/{index-IHl7P_9I.d.mts → index-BM2SqNfO.d.mts} +2 -2
  29. package/dist/{index-uNv9YJgx.d.mts → index-BU6fmwJC.d.mts} +2 -2
  30. package/dist/{index-BdlrrjvD.d.mts → index-DlivLpTN.d.mts} +16 -12
  31. package/dist/{index-Dlpe_4Nd.d.mts → index-mAV9kYJA.d.mts} +2 -2
  32. package/dist/{interceptor-1LL1gBsF.mjs → interceptor-f7slMkCC.mjs} +1 -2
  33. package/dist/{interceptor-1LL1gBsF.mjs.map → interceptor-f7slMkCC.mjs.map} +1 -1
  34. package/dist/kysely/index.d.mts +5 -1
  35. package/dist/kysely/index.mjs +0 -1
  36. package/dist/kysely/index.mjs.map +1 -1
  37. package/dist/{kysely-type-t5MbP7iJ.mjs → kysely-type-BwMqaL3z.mjs} +17 -7
  38. package/dist/kysely-type-BwMqaL3z.mjs.map +1 -0
  39. package/dist/{package-json-VqyFvGiP.mjs → package-json-CfUqjJaQ.mjs} +1 -1
  40. package/dist/{package-json-VqyFvGiP.mjs.map → package-json-CfUqjJaQ.mjs.map} +1 -1
  41. package/dist/package-json-D5Km1jjt.mjs +4 -0
  42. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  43. package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
  44. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  45. package/dist/plugin/builtin/file-utils/index.mjs +1 -2
  46. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  47. package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
  48. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  49. package/dist/plugin/builtin/seed/index.mjs +1 -2
  50. package/dist/plugin/index.d.mts +2 -2
  51. package/dist/plugin/index.mjs +0 -1
  52. package/dist/plugin/index.mjs.map +1 -1
  53. package/dist/{plugin-BC7WQrjm.d.mts → plugin-DQqzlulP.d.mts} +23 -21
  54. package/dist/{runtime-3P9JFpe9.mjs → runtime-CxDrzUC0.mjs} +28 -19
  55. package/dist/runtime-CxDrzUC0.mjs.map +1 -0
  56. package/dist/schema-D27cW0Ca.mjs.map +1 -1
  57. package/dist/seed/index.mjs +0 -1
  58. package/dist/seed/index.mjs.map +1 -1
  59. package/dist/{seed-DtYgudLq.mjs → seed-BZIFDG27.mjs} +1 -1
  60. package/dist/{seed-DtYgudLq.mjs.map → seed-BZIFDG27.mjs.map} +1 -1
  61. package/dist/telemetry-C508zIi1.mjs +4 -0
  62. package/dist/{telemetry-B4sp-dD2.mjs → telemetry-CREcGK8y.mjs} +2 -2
  63. package/dist/{telemetry-B4sp-dD2.mjs.map → telemetry-CREcGK8y.mjs.map} +1 -1
  64. package/dist/utils/test/index.d.mts +2 -2
  65. package/dist/utils/test/index.mjs +0 -2
  66. package/dist/utils/test/index.mjs.map +1 -1
  67. package/dist/{workflow.generated-Cd5dsFnf.d.mts → workflow.generated-u9MgzqbM.d.mts} +14 -3
  68. package/docs/cli/auth.md +1 -1
  69. package/docs/cli/crash-report.md +1 -1
  70. package/docs/cli/executor.md +2 -2
  71. package/docs/cli/secret.md +3 -3
  72. package/docs/cli/staticwebsite.md +1 -1
  73. package/docs/cli/tailordb.md +4 -2
  74. package/docs/cli/user.md +2 -2
  75. package/docs/cli-reference.md +116 -100
  76. package/docs/generator/builtin.md +1 -1
  77. package/docs/services/idp.md +22 -0
  78. package/package.json +17 -17
  79. package/dist/application-CfAom-vi.mjs.map +0 -1
  80. package/dist/application-ChVyhwe-.mjs +0 -12
  81. package/dist/chunk-COzJYswC.mjs +0 -9
  82. package/dist/client-D5P1myz0.mjs.map +0 -1
  83. package/dist/crash-report-Cm9vFmTN.mjs +0 -7
  84. package/dist/kysely-type-t5MbP7iJ.mjs.map +0 -1
  85. package/dist/package-json-88x7bPKC.mjs +0 -5
  86. package/dist/runtime-3P9JFpe9.mjs.map +0 -1
  87. package/dist/telemetry-DXIGGa6A.mjs +0 -5
@@ -1,10 +1,10 @@
1
1
 
2
+ import { A as ExecutorTriggerType, C as TailorDBType_PermitAction, E as FunctionExecution_Status, F as AuthOAuth2Client_GrantType, G as Condition_Operator, H as UserProfileProviderConfig_UserProfileProviderType, I as AuthSCIMAttribute_Mutability, J as ApplicationSchemaUpdateAttemptStatus, K as FilterSchema, L as AuthSCIMAttribute_Type, M as AuthIDPConfig_AuthType, N as AuthInvokerSchema, O as ExecutorJobStatus, P as AuthOAuth2Client_ClientType, R as AuthSCIMAttribute_Uniqueness, S as TailorDBType_Permission_Permit, T as IdPLang, U as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, V as TenantProviderConfig_TenantProviderType, W as ConditionSchema, Y as Subgraph_ServiceType, _ as WorkflowJobExecution_Status, a as fetchMachineUserToken, b as TailorDBGQLPermission_Permit, f as platformBaseUrl, g as WorkflowExecution_Status, h as WorkspacePlatformUserRole, i as fetchAll, j as AuthHookPoint, k as ExecutorTargetType, m as userAgent, p as resolveStaticWebsiteUrls, q as PageDirection, u as initOperatorClient, v as TailorDBGQLPermission_Action, w as PipelineResolver_OperationType, x as TailorDBType_Permission_Operator, y as TailorDBGQLPermission_Operator, z as AuthSCIMConfig_AuthorizationType } from "./client-CYGsf3Zl.mjs";
2
3
  import { t as db } from "./schema-D27cW0Ca.mjs";
3
4
  import { i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-qz-Y4sBV.mjs";
4
- import { A as ExecutorTriggerType, C as TailorDBType_PermitAction, E as FunctionExecution_Status, F as AuthOAuth2Client_GrantType, G as Condition_Operator, H as UserProfileProviderConfig_UserProfileProviderType, I as AuthSCIMAttribute_Mutability, J as ApplicationSchemaUpdateAttemptStatus, K as FilterSchema, L as AuthSCIMAttribute_Type, M as AuthIDPConfig_AuthType, N as AuthInvokerSchema, O as ExecutorJobStatus, P as AuthOAuth2Client_ClientType, R as AuthSCIMAttribute_Uniqueness, S as TailorDBType_Permission_Permit, T as IdPLang, U as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, V as TenantProviderConfig_TenantProviderType, W as ConditionSchema, Y as Subgraph_ServiceType, _ as WorkflowJobExecution_Status, a as fetchMachineUserToken, b as TailorDBGQLPermission_Permit, f as platformBaseUrl, g as WorkflowExecution_Status, h as WorkspacePlatformUserRole, i as fetchAll, j as AuthHookPoint, k as ExecutorTargetType, m as userAgent, p as resolveStaticWebsiteUrls, q as PageDirection, u as initOperatorClient, v as TailorDBGQLPermission_Action, w as PipelineResolver_OperationType, x as TailorDBType_Permission_Operator, y as TailorDBGQLPermission_Operator, z as AuthSCIMConfig_AuthorizationType } from "./client-D5P1myz0.mjs";
5
- import { t as readPackageJson } from "./package-json-VqyFvGiP.mjs";
6
- import { S as readPlatformConfig, T as writePlatformConfig, _ as hashFile, a as loadConfig, b as loadAccessToken, d as TailorDBTypeSchema, f as stringifyFunction, g as getDistDir, h as createBundleCache, l as OAuth2ClientSchema, m as loadFilesWithIgnores, n as generatePluginFilesIfNeeded, p as tailorUserMap, r as loadApplication, s as createExecutorService, t as defineApplication, x as loadWorkspaceId } from "./application-CfAom-vi.mjs";
7
- import { r as withSpan } from "./telemetry-B4sp-dD2.mjs";
5
+ import { t as readPackageJson } from "./package-json-CfUqjJaQ.mjs";
6
+ import { S as readPlatformConfig, T as writePlatformConfig, _ as hashFile, a as loadConfig, b as loadAccessToken, c as createExecutorService, d as TailorDBTypeSchema, f as stringifyFunction, g as getDistDir, h as createBundleCache, m as loadFilesWithIgnores, n as generatePluginFilesIfNeeded, p as tailorUserMap, r as loadApplication, t as defineApplication, u as OAuth2ClientSchema, x as loadWorkspaceId } from "./application-CYPU-WIc.mjs";
7
+ import { r as withSpan } from "./telemetry-CREcGK8y.mjs";
8
8
  import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
9
9
  import { z } from "zod";
10
10
  import * as fs$1 from "node:fs";
@@ -37,7 +37,7 @@ import { spawn } from "node:child_process";
37
37
  import { watch } from "chokidar";
38
38
  import * as madgeModule from "madge";
39
39
  import { createInterface } from "node:readline/promises";
40
- import { astVisitor, parse, toSql } from "pgsql-ast-parser";
40
+ import { astVisitor, parse } from "pgsql-ast-parser";
41
41
  import { parse as parse$1 } from "@0no-co/graphql.web";
42
42
 
43
43
  //#region src/cli/shared/args.ts
@@ -1627,13 +1627,20 @@ function normalizeComparableDisableGqlOperations(value) {
1627
1627
  sendPasswordResetEmail: value?.sendPasswordResetEmail ?? false
1628
1628
  };
1629
1629
  }
1630
+ function normalizeComparableEmailConfig(value) {
1631
+ return {
1632
+ fromName: value?.fromName ?? "",
1633
+ passwordResetSubject: value?.passwordResetSubject ?? ""
1634
+ };
1635
+ }
1630
1636
  function normalizeComparableIdPService(input) {
1631
1637
  return {
1632
1638
  authorization: input.authorization,
1633
1639
  lang: input.lang === IdPLang.UNSPECIFIED ? IdPLang.EN : input.lang,
1634
1640
  userAuthPolicy: input.userAuthPolicy,
1635
1641
  publishUserEvents: input.publishUserEvents,
1636
- disableGqlOperations: input.disableGqlOperations
1642
+ disableGqlOperations: input.disableGqlOperations,
1643
+ emailConfig: input.emailConfig
1637
1644
  };
1638
1645
  }
1639
1646
  function areIdPServicesEqual(existing, desired) {
@@ -1642,7 +1649,8 @@ function areIdPServicesEqual(existing, desired) {
1642
1649
  lang: existing.lang,
1643
1650
  userAuthPolicy: normalizeComparableUserAuthPolicy(existing.userAuthPolicy),
1644
1651
  publishUserEvents: existing.publishUserEvents,
1645
- disableGqlOperations: normalizeComparableDisableGqlOperations(existing.disableGqlOperations)
1652
+ disableGqlOperations: normalizeComparableDisableGqlOperations(existing.disableGqlOperations),
1653
+ emailConfig: normalizeComparableEmailConfig(existing.emailConfig)
1646
1654
  }), desired);
1647
1655
  }
1648
1656
  async function planServices$3(client, workspaceId, appName, idps) {
@@ -1692,12 +1700,14 @@ async function planServices$3(client, workspaceId, appName, idps) {
1692
1700
  const lang = convertLang(idp.lang);
1693
1701
  const userAuthPolicy = idp.userAuthPolicy;
1694
1702
  const publishUserEvents = idp.publishUserEvents ?? false;
1703
+ const emailConfig = idp.emailConfig;
1695
1704
  const desired = normalizeComparableIdPService({
1696
1705
  authorization,
1697
1706
  lang,
1698
1707
  userAuthPolicy: normalizeComparableUserAuthPolicy(userAuthPolicy),
1699
1708
  publishUserEvents,
1700
- disableGqlOperations: normalizeComparableDisableGqlOperations(convertGqlOperationsToDisable(idp.gqlOperations))
1709
+ disableGqlOperations: normalizeComparableDisableGqlOperations(convertGqlOperationsToDisable(idp.gqlOperations)),
1710
+ emailConfig: normalizeComparableEmailConfig(emailConfig)
1701
1711
  });
1702
1712
  const request = {
1703
1713
  workspaceId,
@@ -1706,7 +1716,8 @@ async function planServices$3(client, workspaceId, appName, idps) {
1706
1716
  lang,
1707
1717
  userAuthPolicy,
1708
1718
  publishUserEvents,
1709
- disableGqlOperations: convertGqlOperationsToDisable(idp.gqlOperations)
1719
+ disableGqlOperations: convertGqlOperationsToDisable(idp.gqlOperations),
1720
+ emailConfig
1710
1721
  };
1711
1722
  if (existing) {
1712
1723
  const isManagedByApp = existing.label === appName;
@@ -11680,7 +11691,7 @@ async function generate(options) {
11680
11691
  if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
11681
11692
  let pluginManager;
11682
11693
  if (plugins.length > 0) pluginManager = new PluginManager(plugins);
11683
- const { defineApplication } = await import("./application-ChVyhwe-.mjs");
11694
+ const { defineApplication } = await import("./application-dnB8CQiT.mjs");
11684
11695
  const application = defineApplication({
11685
11696
  config,
11686
11697
  pluginManager
@@ -13808,14 +13819,12 @@ function printSingleSqlResult(execResult, options = {}) {
13808
13819
  logger.out(`rows: ${execResult.rowCount}`);
13809
13820
  }
13810
13821
  function splitSqlStatements(query) {
13811
- try {
13812
- const statements = parse(query);
13813
- if (statements.length === 0) return [];
13814
- return statements.map((s) => toSql.statement(s));
13815
- } catch {
13816
- const trimmed = query.trim();
13817
- return trimmed.length > 0 ? [trimmed] : [];
13818
- }
13822
+ const statements = parse(query, { locationTracking: true });
13823
+ return statements.map((s, i) => {
13824
+ const start = s._location.start;
13825
+ const end = i + 1 < statements.length ? statements[i + 1]._location.start : query.length;
13826
+ return query.substring(start, end);
13827
+ });
13819
13828
  }
13820
13829
  function isSQLExecutionResultArray(value) {
13821
13830
  return Array.isArray(value) && value.length > 0 && value.every(isSQLExecutionResult);
@@ -13885,4 +13894,4 @@ function isDeno() {
13885
13894
 
13886
13895
  //#endregion
13887
13896
  export { getFolder as $, getNextMigrationNumber as $t, listWorkflows as A, functionExecutionStatusToString as At, updateCommand$1 as B, DB_TYPES_FILE_NAME as Bt, listApps as C, startCommand as Ct, resumeCommand as D, executionsCommand as Dt, healthCommand as E, getWorkflow as Et, show as F, executeScript as Ft, listOrganizations as G, compareLocalTypesWithSnapshot as Gt, organizationTree as H, INITIAL_SCHEMA_NUMBER as Ht, showCommand as I, waitForExecution$1 as It, updateCommand$2 as J, formatMigrationNumber as Jt, getCommand$1 as K, compareSnapshots as Kt, logBetaWarning as L, MIGRATION_LABEL_KEY as Lt, truncateCommand as M, getCommand$5 as Mt, generate as N, getExecutor as Nt, resumeWorkflow as O, getWorkflowExecution as Ot, generateCommand as P, apply as Pt, getCommand$2 as Q, getMigrationFiles as Qt, remove as R, parseMigrationLabelNumber as Rt, createWorkspace as S, watchExecutorJob as St, getAppHealth as T, getCommand$4 as Tt, treeCommand as U, MIGRATE_FILE_NAME as Ut, updateOrganization as V, DIFF_FILE_NAME as Vt, listCommand$4 as W, SCHEMA_FILE_NAME as Wt, listCommand$5 as X, getMigrationDirPath as Xt, updateFolder as Y, getLatestMigrationNumber as Yt, listFolders as Z, getMigrationFilePath as Zt, getCommand as _, isVerbose as _n, listCommand$8 as _t, updateCommand as a, hasChanges as an, listOAuth2Clients as at, deleteWorkspace as b, jobsCommand as bt, removeUser as c, sdkNameLabelKey as cn, getMachineUserToken as ct, inviteCommand as d, apiCall as dn, listMachineUsers as dt, isValidMigrationNumber as en, deleteCommand$1 as et, inviteUser as f, apiCommand as fn, generate$1 as ft, listWorkspaces as g, deploymentArgs as gn, triggerExecutor as gt, listCommand$1 as h, confirmationArgs as hn, triggerCommand as ht, isCLIError as i, formatMigrationDiff as in, listCommand$6 as it, truncate as j, formatKeyValueTable as jt, listCommand$3 as k, listWorkflowExecutions as kt, listCommand as l, trnPrefix as ln, tokenCommand as lt, restoreWorkspace as m, commonArgs as mn, webhookCommand as mt, query as n, reconstructSnapshotFromMigrations as nn, createCommand$1 as nt, updateUser as o, getNamespacesWithMigrations as on, getCommand$3 as ot, restoreCommand as p, defineAppCommand as pn, listWebhookExecutors as pt, getOrganization as q, createSnapshotFromLocalTypes as qt, queryCommand as r, formatDiffSummary as rn, createFolder as rt, removeCommand as s, prompt as sn, getOAuth2Client as st, isNativeTypeScriptRuntime as t, loadDiff as tn, deleteFolder as tt, listUsers as u, generateUserTypes as un, listCommand$7 as ut, getWorkspace as v, workspaceArgs as vn, listExecutors as vt, listCommand$2 as w, startWorkflow as wt, createCommand as x, listExecutorJobs as xt, deleteCommand as y, getExecutorJob as yt, removeCommand$1 as z, bundleMigrationScript as zt };
13888
- //# sourceMappingURL=runtime-3P9JFpe9.mjs.map
13897
+ //# sourceMappingURL=runtime-CxDrzUC0.mjs.map