@tailor-platform/sdk 2.0.0-next.7 → 2.0.0-next.9

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 (52) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/application-CtuzFhg8.mjs +3 -0
  3. package/dist/{application-GzW98_Xr.mjs → application-D_oSqto2.mjs} +2 -2
  4. package/dist/{application-GzW98_Xr.mjs.map → application-D_oSqto2.mjs.map} +1 -1
  5. package/dist/cli/commands/deploy/aigateway.d.mts +1 -1
  6. package/dist/cli/commands/deploy/application.d.mts +1 -1
  7. package/dist/cli/commands/deploy/auth.d.mts +1 -1
  8. package/dist/cli/commands/deploy/executor.d.mts +1 -1
  9. package/dist/cli/commands/deploy/function-registry.d.mts +1 -1
  10. package/dist/cli/commands/deploy/idp.d.mts +1 -1
  11. package/dist/cli/commands/deploy/resolver.d.mts +1 -1
  12. package/dist/cli/commands/deploy/secret-manager.d.mts +1 -1
  13. package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -1
  14. package/dist/cli/commands/deploy/tailordb/index.d.mts +1 -1
  15. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +1 -1
  16. package/dist/cli/commands/deploy/workflow.d.mts +1 -1
  17. package/dist/cli/index.mjs +22 -13
  18. package/dist/cli/index.mjs.map +1 -1
  19. package/dist/cli/lib.d.mts +6 -4
  20. package/dist/cli/lib.mjs +110 -10
  21. package/dist/cli/lib.mjs.map +1 -1
  22. package/dist/cli/shared/script-executor.d.mts +6 -3
  23. package/dist/cli/shared/seed-chunker.d.mts +2 -7
  24. package/dist/cli/shared/seed-context.d.mts +49 -0
  25. package/dist/cli/shared/tailordb-namespaces.d.mts +7 -4
  26. package/dist/completion/zsh-worker.zsh +1 -1
  27. package/dist/configure/index.mjs.map +1 -1
  28. package/dist/configure/services/idp/permission.d.mts +4 -4
  29. package/dist/configure/services/tailordb/permission.d.mts +4 -4
  30. package/dist/plugin/builtin/seed/index.d.mts +3 -2
  31. package/dist/plugin/builtin/seed/index.mjs +1 -1
  32. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +19 -0
  33. package/dist/plugin/builtin/seed/types.d.mts +2 -0
  34. package/dist/{register-ts-hook-DvEs6YsL.mjs → register-ts-hook-DgnmGTCt.mjs} +32 -23
  35. package/dist/register-ts-hook-DgnmGTCt.mjs.map +1 -0
  36. package/dist/seed-LUVr7jHL.mjs +444 -0
  37. package/dist/seed-LUVr7jHL.mjs.map +1 -0
  38. package/dist/{service-Dmxa2I4i.mjs → service-CXFce28G.mjs} +1 -2
  39. package/dist/service-CXFce28G.mjs.map +1 -0
  40. package/dist/service-DjhjpJpm.mjs +3 -0
  41. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +6 -1
  42. package/dist/types/tailordb.generated.d.mts +0 -2
  43. package/docs/cli-reference.md +7 -0
  44. package/docs/configuration.md +1 -1
  45. package/docs/migration/v2.md +106 -0
  46. package/package.json +1 -1
  47. package/dist/application-OM0taSPn.mjs +0 -3
  48. package/dist/register-ts-hook-DvEs6YsL.mjs.map +0 -1
  49. package/dist/seed-CRSQJI_z.mjs +0 -1170
  50. package/dist/seed-CRSQJI_z.mjs.map +0 -1
  51. package/dist/service-BJAQ70e5.mjs +0 -3
  52. package/dist/service-Dmxa2I4i.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 2.0.0-next.9
4
+
5
+ ### Major Changes
6
+
7
+ - [#1811](https://github.com/tailor-platform/sdk/pull/1811) [`b2fc104`](https://github.com/tailor-platform/sdk/commit/b2fc104d9cdfc52e98c97bc18d80a9e2e9d5f4c2) Thanks [@toiroakr](https://github.com/toiroakr)! - Move the TailorDB `erdSite` setting out of the core config schema into the ERD plugin's own configuration. `db.<namespace>.erdSite` is no longer accepted in `tailor.config.ts`; configure the ERD deploy target on the plugin instead:
8
+
9
+ ```ts
10
+ import { definePlugins } from "@tailor-platform/sdk";
11
+ import { tailordbErdPlugin } from "@tailor-platform/sdk-plugin-tailordb-erd";
12
+
13
+ export const plugins = definePlugins(
14
+ // TailorDB namespace name → static website name
15
+ tailordbErdPlugin({ sites: { tailordb: "my-erd-site" } }),
16
+ );
17
+ ```
18
+
19
+ The `tailor tailordb erd` commands resolve deploy targets from `tailordbErdPlugin({ sites })` and now validate each namespace against `config.db` and each site name against `staticWebsites`, so typos surface when the config is loaded instead of at deploy time. The `v2/erd-site-to-plugin` codemod migrates existing configs automatically. For programmatic users, `loadTailorDBNamespaces()` additionally returns the config module's registered `plugins`, and namespace selector callbacks receive them as a second argument.
20
+
21
+ - [#1807](https://github.com/tailor-platform/sdk/pull/1807) [`817454f`](https://github.com/tailor-platform/sdk/commit/817454fff35e4093bce5fdcb9e1fcda8bbd1d7ef) Thanks [@dqn](https://github.com/dqn)! - `seedPlugin` no longer generates the `exec.mjs` seed runner. Seeding and validation move to the `tailor seed` commands provided by the `@tailor-platform/sdk-plugin-seed` CLI plugin: install it with `npm install -D @tailor-platform/sdk-plugin-seed`, replace `node <distPath>/exec.mjs` with `tailor seed apply` and `node <distPath>/exec.mjs validate` with `tailor seed validate`, and delete the stale generated `exec.mjs`. Seed data and schema generation (`data/*.jsonl`, `data/*.schema.ts`) is unchanged. Because the plugin reads the config at run time, `machineUserName` changes in seedPlugin options now take effect without regenerating. `@tailor-platform/sdk/cli` gains `loadSeedContext` (and `SeedContext` types) for this, `SeedData` is now JSON-typed, and `executeScript` accepts a plain object `invoker` (`ScriptInvoker`).
22
+
23
+ ## 2.0.0-next.8
24
+
25
+ ### Patch Changes
26
+
27
+ - [#1808](https://github.com/tailor-platform/sdk/pull/1808) [`61ac76c`](https://github.com/tailor-platform/sdk/commit/61ac76cff992ef30e6115ba96c7d3a676010204f) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix IdP and TailorDB permission condition types breaking when `Attributes` fields are optional. Since machine user attribute keys started mirroring the source field's optionality, the `user` operand key helpers leaked `undefined` into their key unions — failing typecheck against the generated permission types even for `_loggedIn`-only conditions — and rejected attribute keys derived from optional fields. Optional attribute fields are now valid operand keys and `undefined` no longer appears in the unions.
28
+
3
29
  ## 2.0.0-next.7
4
30
 
5
31
  ### Major Changes
@@ -0,0 +1,3 @@
1
+ import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-D_oSqto2.mjs";
2
+
3
+ export { defineApplication, generatePluginFilesIfNeeded };
@@ -1,7 +1,7 @@
1
1
  import { n as isSdkBranded } from "./brand-Eo4pLXPJ.mjs";
2
2
  import { t as assertDefined } from "./assert-DBxo8jPo.mjs";
3
3
  import { a as parseBoolean, n as logger, r as styles } from "./logger-BwS4ppwO.mjs";
4
- import { a as AuthConfigSchema, c as stripTailorDBTypeBuilderHelpers, d as applyRelationMetadataToFieldConfig, f as buildRelationInfo, g as functionSchema, h as loadFilesWithIgnores, l as TailorDBServiceConfigSchema, m as validateRelationConfig, n as loadExecutor, o as AuthInvokerSchema, p as processRelationMetadata, s as TailorFieldSchema, t as createExecutorService, u as TailorDBTypeSchema } from "./service-Dmxa2I4i.mjs";
4
+ import { a as AuthConfigSchema, c as stripTailorDBTypeBuilderHelpers, d as applyRelationMetadataToFieldConfig, f as buildRelationInfo, g as functionSchema, h as loadFilesWithIgnores, l as TailorDBServiceConfigSchema, m as validateRelationConfig, n as loadExecutor, o as AuthInvokerSchema, p as processRelationMetadata, s as TailorFieldSchema, t as createExecutorService, u as TailorDBTypeSchema } from "./service-CXFce28G.mjs";
5
5
  import { t as multiline } from "./multiline-sfHpTZZK.mjs";
6
6
  import { t as userAgent } from "./user-agent-Bgsszb5I.mjs";
7
7
  import { t as isPluginGeneratedType } from "./type-source-DH_LH20p.mjs";
@@ -5453,4 +5453,4 @@ async function loadApplication(params) {
5453
5453
 
5454
5454
  //#endregion
5455
5455
  export { fetchAllTolerant as A, initOperatorClient as B, createBundleCache as C, closeConnectionPool as D, hashFile as E, getConsoleBaseUrl as F, byName as G, normalizeBaseUrl as H, getOAuth2ClientId as I, LOG_LEVELS as K, getOrNull as L, fetchPaged as M, fetchPlatformMachineUserToken as N, defaultPlatformBaseUrl as O, fetchUserInfo as P, getPlatformBaseUrl as R, hasGenerationHooks as S, hashContent as T, rememberPlatformConfigForToken as U, isDefaultPlatform as V, resolveStaticWebsiteUrls as W, platformBundleDefinePlugin as _, resolveInlineSourcemap as a, resolveBundleLogLevel as b, WorkflowJobSchema as c, INVOKER_EXPR as d, buildExecutorArgsExpr as f, stringifyFunction as g, assertUniqueTailorDBTypeNamesWithExternal as h, resolverBundleKey as i, fetchMachineUserToken as j, fetchAll as k, ResolverSchema as l, assertUniqueLocalTailorDBTypeNames as m, generatePluginFilesIfNeeded as n, getApplicationAuthNamespace as o, buildResolverOperationHookExpr as p, loadApplication as r, WorkflowJobFunctionExecutionPolicySchema as s, defineApplication as t, HTTP_METHODS as u, composeFunctionTreeshakeOptions as v, getDistDir as w, getPluginGenerationDependencies as x, createLogLevelTreeshakeOptions as y, initOAuth2Client as z };
5456
- //# sourceMappingURL=application-GzW98_Xr.mjs.map
5456
+ //# sourceMappingURL=application-D_oSqto2.mjs.map