@tailor-platform/sdk 1.20.0 → 1.21.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 (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{application-Bli2ieqY.mjs → application-CEv5c7TU.mjs} +7 -5
  3. package/dist/{application-Bli2ieqY.mjs.map → application-CEv5c7TU.mjs.map} +1 -1
  4. package/dist/{application-CZdieD3K.mjs → application-DiCzM9b0.mjs} +2 -2
  5. package/dist/cli/index.mjs +3 -3
  6. package/dist/cli/lib.d.mts +7 -6
  7. package/dist/cli/lib.mjs +3 -3
  8. package/dist/configure/index.d.mts +3 -3
  9. package/dist/configure/index.mjs +5 -0
  10. package/dist/configure/index.mjs.map +1 -1
  11. package/dist/{index-B86CIKCW.d.mts → index-BWVAwea4.d.mts} +2 -2
  12. package/dist/{index-DcY0e3S5.d.mts → index-CnHd6BNg.d.mts} +8 -3
  13. package/dist/{index-i6QUsr5p.d.mts → index-Dn61THJK.d.mts} +2 -2
  14. package/dist/{index-CGjiOz_W.d.mts → index-DxlmLUag.d.mts} +2 -2
  15. package/dist/{index-CIXOwe6g.d.mts → index-oZXVKyfX.d.mts} +2 -2
  16. package/dist/plugin/builtin/enum-constants/index.d.mts +2 -2
  17. package/dist/plugin/builtin/file-utils/index.d.mts +2 -2
  18. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -2
  19. package/dist/plugin/builtin/seed/index.d.mts +2 -2
  20. package/dist/plugin/builtin/seed/index.mjs +1 -1
  21. package/dist/plugin/index.d.mts +1 -1
  22. package/dist/{seed-CeUEANfQ.mjs → seed-D-rYCN5F.mjs} +2 -2
  23. package/dist/{seed-CeUEANfQ.mjs.map → seed-D-rYCN5F.mjs.map} +1 -1
  24. package/dist/{types-C14GuyPI.d.mts → types-C0o90Cmb.d.mts} +2 -2
  25. package/dist/types-ClK_HJ0G.mjs.map +1 -1
  26. package/dist/{types-CNw4p8V7.d.mts → types-QKq1usl7.d.mts} +19 -8
  27. package/dist/{update-DkpWgrzL.mjs → update-9MTRN1UA.mjs} +121 -87
  28. package/dist/update-9MTRN1UA.mjs.map +1 -0
  29. package/dist/utils/test/index.d.mts +3 -3
  30. package/docs/services/resolver.md +61 -0
  31. package/docs/services/tailordb.md +55 -0
  32. package/package.json +1 -1
  33. package/dist/update-DkpWgrzL.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#649](https://github.com/tailor-platform/sdk/pull/649) [`4fd37bf`](https://github.com/tailor-platform/sdk/commit/4fd37bfa13d7d356c919491da7f5886830dce80a) Thanks [@toiroakr](https://github.com/toiroakr)! - Add OpenTelemetry tracing instrumentation to the generate command. Each phase (loadTypes, loadResolvers, loadExecutors, generators) is measured as a span, opt-in via `OTEL_EXPORTER_OTLP_ENDPOINT` with zero overhead when disabled. Refactor generator scheduling to align with the plugin hook model — generators are now called at each phase they subscribe to via their dependencies array, matching how plugins use onTailorDBReady/onResolverReady/onExecutorReady hooks.
8
+
9
+ - [#653](https://github.com/tailor-platform/sdk/pull/653) [`6b5f1db`](https://github.com/tailor-platform/sdk/commit/6b5f1dbb84f27559312b0868c9b8e7efbb5580a8) Thanks [@murayama-r](https://github.com/murayama-r)! - Add manual configuration for publishEvents on TailorDB types and resolvers
10
+
11
+ ### Patch Changes
12
+
13
+ - [#651](https://github.com/tailor-platform/sdk/pull/651) [`3c8068d`](https://github.com/tailor-platform/sdk/commit/3c8068da663b28e73c6adaa0feb2fbd0934c860e) Thanks [@dqn](https://github.com/dqn)! - Guard undefined user global in workflow bundler entry
14
+
3
15
  ## 1.20.0
4
16
 
5
17
  ### Minor Changes
@@ -5,7 +5,7 @@ import { t as readPackageJson } from "./package-json-3H5gfhA4.mjs";
5
5
  import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "./enum-constants-CGVvu3dd.mjs";
6
6
  import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "./file-utils-GX_tGWl4.mjs";
7
7
  import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "./kysely-type-Cpq5TNGY.mjs";
8
- import { n as seedPlugin, t as SeedGeneratorID } from "./seed-CeUEANfQ.mjs";
8
+ import { n as seedPlugin, t as SeedGeneratorID } from "./seed-D-rYCN5F.mjs";
9
9
  import Module, { createRequire } from "node:module";
10
10
  import { z } from "zod";
11
11
  import * as fs$16 from "node:fs";
@@ -99483,7 +99483,8 @@ const TailorDBTypeSettingsSchema = z.object({
99483
99483
  pluralForm: z.string().optional(),
99484
99484
  aggregation: z.boolean().optional(),
99485
99485
  bulkUpsert: z.boolean().optional(),
99486
- gqlOperations: GqlOperationsSchema.optional()
99486
+ gqlOperations: GqlOperationsSchema.optional(),
99487
+ publishEvents: z.boolean().optional()
99487
99488
  });
99488
99489
  const GQL_PERMISSION_INVALID_OPERAND_MESSAGE = "operand is not supported in gqlPermission. Use permission() for record-level conditions.";
99489
99490
  const GqlPermissionOperandSchema = z.union([
@@ -99804,7 +99805,8 @@ const ResolverSchema = z.object({
99804
99805
  description: z.string().optional(),
99805
99806
  input: z.record(z.string(), TailorFieldSchema).optional(),
99806
99807
  body: functionSchema,
99807
- output: TailorFieldSchema
99808
+ output: TailorFieldSchema,
99809
+ publishEvents: z.boolean().optional()
99808
99810
  });
99809
99811
 
99810
99812
  //#endregion
@@ -101512,7 +101514,7 @@ async function bundleSingleJob(job, allJobs, outputDir, tsconfig, env, triggerCo
101512
101514
 
101513
101515
  export async function main(input) {
101514
101516
  const env = ${JSON.stringify(env)};
101515
- const _user = ${tailorUserMap};
101517
+ const _user = typeof user !== "undefined" ? ${tailorUserMap} : undefined;
101516
101518
  return await ${job.exportName}.body(input, { env, user: _user });
101517
101519
  }
101518
101520
  `;
@@ -102202,4 +102204,4 @@ async function loadApplication(params) {
102202
102204
 
102203
102205
  //#endregion
102204
102206
  export { TenantProviderConfig_TenantProviderType as $, WorkflowJobExecution_Status as A, FunctionExecution_Type as B, initOAuth2Client as C, userAgent as D, resolveStaticWebsiteUrls as E, TailorDBType_Permission_Permit as F, AuthInvokerSchema$1 as G, ExecutorTargetType as H, TailorDBType_PermitAction as I, AuthSCIMAttribute_Mutability as J, AuthOAuth2Client_ClientType as K, PipelineResolver_OperationType as L, TailorDBGQLPermission_Operator as M, TailorDBGQLPermission_Permit as N, WorkspacePlatformUserRole as O, TailorDBType_Permission_Operator as P, PATScope as Q, IdPLang as R, fetchUserInfo as S, platformBaseUrl as T, ExecutorTriggerType as U, ExecutorJobStatus as V, AuthIDPConfig_AuthType as W, AuthSCIMAttribute_Uniqueness as X, AuthSCIMAttribute_Type as Y, AuthSCIMConfig_AuthorizationType as Z, loadWorkspaceId as _, buildExecutorArgsExpr as a, PageDirection as at, fetchAll as b, OAuth2ClientSchema as c, logger as ct, getDistDir as d, UserProfileProviderConfig_UserProfileProviderType as et, hashFile as f, loadOrganizationId as g, loadFolderId as h, loadConfig as i, FilterSchema as it, TailorDBGQLPermission_Action as j, WorkflowExecution_Status as k, stringifyFunction as l, styles as lt, loadAccessToken as m, generatePluginFilesIfNeeded as n, ConditionSchema as nt, buildResolverOperationHookExpr as o, ApplicationSchemaUpdateAttemptStatus as ot, fetchLatestToken as p, AuthOAuth2Client_GrantType as q, loadApplication as r, Condition_Operator as rt, createExecutorService as s, Subgraph_ServiceType as st, defineApplication as t, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as tt, createBundleCache as u, symbols as ut, readPlatformConfig as v, initOperatorClient as w, fetchMachineUserToken as x, writePlatformConfig as y, FunctionExecution_Status as z };
102205
- //# sourceMappingURL=application-Bli2ieqY.mjs.map
102207
+ //# sourceMappingURL=application-CEv5c7TU.mjs.map