@tailor-platform/sdk 1.56.1 → 1.58.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 (39) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +0 -23
  3. package/dist/{application-DuT_ae02.mjs → application-B59TaTk_.mjs} +10 -6
  4. package/dist/application-B59TaTk_.mjs.map +1 -0
  5. package/dist/application-gO_pa5BO.mjs +4 -0
  6. package/dist/cli/erd-viewer-assets/app.js +1181 -0
  7. package/dist/cli/erd-viewer-assets/index.html +73 -0
  8. package/dist/cli/erd-viewer-assets/serve.json +13 -0
  9. package/dist/cli/erd-viewer-assets/styles.css +789 -0
  10. package/dist/cli/index.mjs +847 -355
  11. package/dist/cli/index.mjs.map +1 -1
  12. package/dist/cli/lib.d.mts +587 -3
  13. package/dist/cli/lib.mjs +3 -3
  14. package/dist/{client-DLPEPJ_s.mjs → client-62B-r3MN.mjs} +39 -10
  15. package/dist/client-62B-r3MN.mjs.map +1 -0
  16. package/dist/{client-DrzwCD1W.mjs → client-BWl3f1XS.mjs} +1 -1
  17. package/dist/configure/index.d.mts +2 -2
  18. package/dist/{crashreport-Bm2mN5tg.mjs → crashreport-CCGpLUlP.mjs} +2 -2
  19. package/dist/{crashreport-Bm2mN5tg.mjs.map → crashreport-CCGpLUlP.mjs.map} +1 -1
  20. package/dist/{crashreport-C5oHvHUC.mjs → crashreport-CXD_Kjk-.mjs} +1 -1
  21. package/dist/{index-B61gFI9a.d.mts → index-BWoHfE-i.d.mts} +3 -2
  22. package/dist/{runtime-745lvg7i.mjs → runtime-BC-FbQkg.mjs} +179 -190
  23. package/dist/runtime-BC-FbQkg.mjs.map +1 -0
  24. package/dist/utils/test/index.d.mts +2 -2
  25. package/dist/{workflow.generated-Kz-nQrTf.d.mts → workflow.generated-CV77NlFp.d.mts} +3 -2
  26. package/docs/cli/application.md +5 -5
  27. package/docs/cli/auth.md +55 -6
  28. package/docs/cli/function.md +2 -2
  29. package/docs/cli/staticwebsite.md +137 -0
  30. package/docs/cli/tailordb.md +31 -26
  31. package/docs/cli-reference.md +19 -16
  32. package/docs/generator/builtin.md +1 -1
  33. package/docs/services/auth.md +0 -11
  34. package/docs/services/staticwebsite.md +13 -0
  35. package/package.json +4 -6
  36. package/dist/application-CC3oaSay.mjs +0 -4
  37. package/dist/application-DuT_ae02.mjs.map +0 -1
  38. package/dist/client-DLPEPJ_s.mjs.map +0 -1
  39. package/dist/runtime-745lvg7i.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @tailor-platform/sdk
2
2
 
3
+ ## 1.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1310](https://github.com/tailor-platform/sdk/pull/1310) [`228b244`](https://github.com/tailor-platform/sdk/commit/228b244c9d2c617ac0ca7d2a354cc1cd6606327c) Thanks [@toiroakr](https://github.com/toiroakr)! - feat(cli): add `authconnection delete` and use it during deploy
8
+
9
+ `tailor-sdk authconnection delete` removes an auth connection entirely (configuration, secret, and tokens), complementing `tailor-sdk authconnection revoke`, which only invalidates the active session and keeps the connection so it can be re-authorized. `deploy` now uses delete when it replaces or removes the auth connections it manages.
10
+
11
+ - [#1367](https://github.com/tailor-platform/sdk/pull/1367) [`545f74b`](https://github.com/tailor-platform/sdk/commit/545f74b6af26fbc5d8b4c9e147af9b09fe2e4644) Thanks [@haru0017](https://github.com/haru0017)! - Add `customDomains` option to `defineStaticWebSite()` for associating custom domains with static websites, and `staticwebsite domain get` / `staticwebsite domain list` CLI commands for checking domain status and DNS CNAME targets.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1368](https://github.com/tailor-platform/sdk/pull/1368) [`6c143bf`](https://github.com/tailor-platform/sdk/commit/6c143bfb913d8d866442edd6c8f60c02e818e6ba) Thanks [@dqn](https://github.com/dqn)! - Internal refactoring: consolidate the per-resource TRN builder functions and inline `${trnPrefix(...)}:<kind>:<name>` template literals scattered across the deploy commands into a single typed `resourceTrn(workspaceId, kind, name)` helper. No user-facing behavior change.
16
+
17
+ - [#1376](https://github.com/tailor-platform/sdk/pull/1376) [`cf1d87c`](https://github.com/tailor-platform/sdk/commit/cf1d87cfb6a379bbf1d0448ea0ec306c0dae4611) Thanks [@toiroakr](https://github.com/toiroakr)! - Reword CLI `--help` text and the bundled documentation to describe user-facing behavior instead of internal implementation details. The `api` and `function logs` command notes no longer expose internal terms such as proto/RPC names, the `TestExecScript` API, or bundle sourcemap/content-hash mechanics, and the auth docs drop the internal "SDK vs Platform Naming" note. No runtime behavior changes.
18
+
19
+ - [#1352](https://github.com/tailor-platform/sdk/pull/1352) [`a3bf971`](https://github.com/tailor-platform/sdk/commit/a3bf9710b337e44b505f0acd6d814821849f4c60) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @clack/prompts to v1.5.1
20
+
21
+ - [#1353](https://github.com/tailor-platform/sdk/pull/1353) [`f0cfb61`](https://github.com/tailor-platform/sdk/commit/f0cfb61dcadb47819a8916da9bcf9b63a4ff5706) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency semver to v7.8.2
22
+
23
+ ## 1.57.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [#1319](https://github.com/tailor-platform/sdk/pull/1319) [`77754c2`](https://github.com/tailor-platform/sdk/commit/77754c264f3a18ccea2fb2ee2a144da4768b09a9) Thanks [@dqn](https://github.com/dqn)! - Replace the Liam-based `tailordb erd` beta commands with a TailorDB-specific ERD viewer generated from local TailorDB schema. `tailordb erd export` writes a single self-contained `index.html` under `<output>/<namespace>/dist` (CSS, JS, and the schema are inlined as separately extractable blocks), `tailordb erd serve` runs a built-in local server with watch reload and `--port` / `--open`, and `tailordb erd deploy` uploads the generated viewer while keeping the existing `erdSite` requirement.
28
+
29
+ ### Patch Changes
30
+
31
+ - [#1309](https://github.com/tailor-platform/sdk/pull/1309) [`9e4c726`](https://github.com/tailor-platform/sdk/commit/9e4c726c1a84ac70ba7bc74aaf4765173562ed0e) Thanks [@toiroakr](https://github.com/toiroakr)! - fix(cli): track auth connection ownership via platform labels
32
+
33
+ `deploy` now tags auth connections with SDK ownership labels and uses them to decide which connections to manage, matching every other auth resource. Connections that are not labeled by the SDK are treated as unowned: they are surfaced in the unmanaged-resource confirmation prompt rather than silently deleted, and once you confirm adoption the SDK label is written even when the connection is otherwise unchanged, so later deploys recognize it as owned. Auth connection deletions are also shown in the deletion confirmation prompt.
34
+
3
35
  ## 1.56.1
4
36
 
5
37
  ### Patch Changes
package/README.md CHANGED
@@ -97,26 +97,3 @@ See [Create Tailor Platform SDK](https://github.com/tailor-platform/sdk/tree/mai
97
97
 
98
98
  - Node.js 22 or later (or Bun)
99
99
  - A Tailor Platform account ([request access](https://www.tailor.tech/demo))
100
-
101
- ## Dependabot Noise
102
-
103
- Installing `@tailor-platform/sdk` pulls in a few transitive advisories that are **not exploitable in practice**. They are listed here so you can triage reports from `npm audit` / `pnpm audit` / Dependabot without diffing our lockfile.
104
-
105
- ### valibot ReDoS ([GHSA-vqpr-j7v3-hqw9](https://github.com/advisories/GHSA-vqpr-j7v3-hqw9))
106
-
107
- - **Why it shows up**: `@liam-hq/cli@0.7.24` pins `valibot@1.1.0`, which falls in the vulnerable range (`< 1.2.0`).
108
- - **Why it's safe here**: `@liam-hq/cli` is invoked only by `tailor-sdk tailordb erd export` as a child process, against developer-controlled schema files. The vulnerable code path (`v.emoji()` on attacker-controlled strings) is never reached.
109
- - **If you want to silence it**: add an override to your project so `valibot` resolves to `>=1.2.0`. `@toiroakr/lines-db` declares `valibot` as an optional peer with range `>=1.0.0`, so forcing `1.2.0+` is safe.
110
-
111
- ```jsonc
112
- // pnpm (package.json)
113
- "pnpm": { "overrides": { "valibot": ">=1.2.0" } }
114
-
115
- // npm (package.json)
116
- "overrides": { "valibot": ">=1.2.0" }
117
-
118
- // yarn (package.json)
119
- "resolutions": { "valibot": ">=1.2.0" }
120
- ```
121
-
122
- This fix has to live in your project's `package.json` — overrides in a published package do not propagate to consumers.
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { n as isSdkBranded } from "./brand-DlnJ375c.mjs";
3
- import { u as initOAuth2Client } from "./client-DLPEPJ_s.mjs";
3
+ import { u as initOAuth2Client } from "./client-62B-r3MN.mjs";
4
4
  import { a as parseBoolean, n as logger, r as styles } from "./logger-DpJyJvNz.mjs";
5
5
  import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "./enum-constants-C7DaWeQo.mjs";
6
6
  import { t as multiline } from "./multiline-Cf9ODpr1.mjs";
@@ -606,15 +606,18 @@ const GeneratorConfigSchema = CodeGeneratorSchema.brand("CodeGenerator");
606
606
  /**
607
607
  * Load Tailor configuration file and associated generators and plugins.
608
608
  * @param configPath - Optional explicit config path
609
+ * @param options - Optional module import behavior.
609
610
  * @returns Loaded config, generators, plugins, and config path
610
611
  */
611
- async function loadConfig(configPath) {
612
+ async function loadConfig(configPath, options = {}) {
612
613
  installCliTailordbStub();
613
614
  const foundPath = loadConfigPath(configPath);
614
615
  if (!foundPath) throw new Error("Configuration file not found: tailor.config.ts not found in current or parent directories");
615
616
  const resolvedPath = path.resolve(process.cwd(), foundPath);
616
617
  if (!fs$1.existsSync(resolvedPath)) throw new Error(`Configuration file not found: ${configPath}`);
617
- const configModule = await import(pathToFileURL(resolvedPath).href);
618
+ const configUrl = pathToFileURL(resolvedPath);
619
+ if (options.importNonce) configUrl.searchParams.set("tailorImportNonce", options.importNonce);
620
+ const configModule = await import(configUrl.href);
618
621
  if (!configModule || !configModule.default) throw new Error("Invalid Tailor config module: default export not found");
619
622
  const validated = AppConfigSchema.safeParse(configModule.default);
620
623
  if (!validated.success) {
@@ -5499,7 +5502,8 @@ const SecretsSchema = z.object({
5499
5502
  const StaticWebsiteSchema = z.object({
5500
5503
  name: z.string().describe("Static website name"),
5501
5504
  description: z.string().optional().describe("Static website description"),
5502
- allowedIpAddresses: z.array(z.string()).optional().describe("IP addresses allowed to access the website")
5505
+ allowedIpAddresses: z.array(z.string()).optional().describe("IP addresses allowed to access the website"),
5506
+ customDomains: z.array(z.string()).optional().describe("Custom domains for the static website")
5503
5507
  }).brand("StaticWebsiteConfig");
5504
5508
 
5505
5509
  //#endregion
@@ -5835,5 +5839,5 @@ async function loadApplication(params) {
5835
5839
  }
5836
5840
 
5837
5841
  //#endregion
5838
- export { saveUserTokens as A, deleteUserTokens as C, loadWorkspaceId as D, loadConfigPath as E, readPlatformConfig as O, loadConfig as S, loadAccessToken as T, createLogLevelTreeshakeOptions as _, WorkflowJobSchema as a, getDistDir as b, createExecutorService as c, buildExecutorArgsExpr as d, buildResolverOperationHookExpr as f, composeFunctionTreeshakeOptions as g, loadFilesWithIgnores as h, resolveInlineSourcemap as i, writePlatformConfig as j, resolveTokens as k, ExecutorSchema as l, stringifyFunction as m, generatePluginFilesIfNeeded as n, ResolverSchema as o, TailorDBTypeSchema as p, loadApplication as r, HTTP_METHODS as s, defineApplication as t, INVOKER_EXPR as u, resolveBundleLogLevel as v, fetchLatestToken as w, hashFile as x, createBundleCache as y };
5839
- //# sourceMappingURL=application-DuT_ae02.mjs.map
5842
+ export { resolveTokens as A, loadConfig as C, loadConfigPath as D, loadAccessToken as E, writePlatformConfig as M, loadWorkspaceId as O, hashFile as S, fetchLatestToken as T, createLogLevelTreeshakeOptions as _, WorkflowJobSchema as a, getDistDir as b, createExecutorService as c, buildExecutorArgsExpr as d, buildResolverOperationHookExpr as f, composeFunctionTreeshakeOptions as g, loadFilesWithIgnores as h, resolveInlineSourcemap as i, saveUserTokens as j, readPlatformConfig as k, ExecutorSchema as l, stringifyFunction as m, generatePluginFilesIfNeeded as n, ResolverSchema as o, TailorDBTypeSchema as p, loadApplication as r, HTTP_METHODS as s, defineApplication as t, INVOKER_EXPR as u, resolveBundleLogLevel as v, deleteUserTokens as w, hashContent as x, createBundleCache as y };
5843
+ //# sourceMappingURL=application-B59TaTk_.mjs.map