@tailor-platform/sdk 2.27.0 → 2.29.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.
- package/CHANGELOG.md +109 -0
- package/README.md +0 -8
- package/agent-skills/tailor/SKILL.md +4 -2
- package/dist/application-dalGHdrI.mjs +1 -0
- package/dist/application-rWYDAfNU.mjs +200 -0
- package/dist/application-rWYDAfNU.mjs.map +1 -0
- package/dist/cli/cache/bundle-cache.d.mts +1 -0
- package/dist/cli/commands/executor/get.d.mts +2 -1
- package/dist/cli/commands/executor/jobs.d.mts +2 -1
- package/dist/cli/commands/executor/trigger.d.mts +2 -1
- package/dist/cli/commands/function/get.d.mts +2 -1
- package/dist/cli/commands/function/list.d.mts +2 -1
- package/dist/cli/commands/organization/folder/create.d.mts +2 -1
- package/dist/cli/commands/organization/folder/delete.d.mts +2 -1
- package/dist/cli/commands/organization/folder/get.d.mts +2 -1
- package/dist/cli/commands/organization/folder/list.d.mts +2 -1
- package/dist/cli/commands/organization/folder/update.d.mts +2 -1
- package/dist/cli/commands/organization/get.d.mts +2 -1
- package/dist/cli/commands/organization/tree.d.mts +2 -1
- package/dist/cli/commands/organization/update.d.mts +2 -1
- package/dist/cli/commands/show.d.mts +2 -1
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +2 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +3 -1
- package/dist/cli/commands/workflow/executions.d.mts +2 -1
- package/dist/cli/commands/workflow/get.d.mts +2 -1
- package/dist/cli/commands/workflow/start.d.mts +2 -1
- package/dist/cli/commands/workspace/app/health.d.mts +2 -1
- package/dist/cli/commands/workspace/app/list.d.mts +2 -1
- package/dist/cli/commands/workspace/create.d.mts +5 -2
- package/dist/cli/commands/workspace/delete.d.mts +2 -1
- package/dist/cli/commands/workspace/get.d.mts +2 -1
- package/dist/cli/commands/workspace/restore.d.mts +2 -1
- package/dist/cli/commands/workspace/user/invite.d.mts +2 -1
- package/dist/cli/commands/workspace/user/list.d.mts +2 -1
- package/dist/cli/commands/workspace/user/remove.d.mts +2 -1
- package/dist/cli/commands/workspace/user/update.d.mts +2 -1
- package/dist/cli/lib.d.mts +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +7 -0
- package/dist/cli/main.mjs +55 -42
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/query/index.d.mts +2 -1
- package/dist/cli/shared/args.d.mts +4 -2
- package/dist/cli/shared/client.d.mts +6 -1
- package/dist/cli/shared/context.d.mts +2 -1
- package/dist/cli/shared/logger.d.mts +5 -2
- package/dist/cli/shared/readonly-guard.d.mts +2 -1
- package/dist/cli/shared/seed-context.d.mts +5 -0
- package/dist/cli/shared/type-generator.d.mts +2 -1
- package/dist/cli/ts-hook.mjs +15 -11
- package/dist/completion/zsh-worker.zsh +275 -19
- package/dist/configure/config/types.d.mts +80 -1
- package/dist/configure/services/aigateway/types.d.mts +2 -1
- package/dist/configure/services/auth/types.d.mts +2 -1
- package/dist/configure/services/executor/executor.d.mts +2 -1
- package/dist/configure/services/executor/operation.d.mts +2 -1
- package/dist/configure/services/executor/trigger/event.d.mts +2 -1
- package/dist/configure/services/executor/trigger/schedule.d.mts +2 -1
- package/dist/configure/services/http-adapter/http-adapter.d.mts +2 -1
- package/dist/configure/services/idp/permission.d.mts +2 -1
- package/dist/configure/services/idp/types.d.mts +2 -1
- package/dist/configure/services/resolver/permission.d.mts +2 -1
- package/dist/configure/services/resolver/resolver.d.mts +2 -1
- package/dist/configure/services/secrets/types.d.mts +2 -1
- package/dist/configure/services/staticwebsite/types.d.mts +2 -1
- package/dist/configure/services/tailordb/permission.d.mts +2 -1
- package/dist/configure/services/tailordb/schema.d.mts +4 -3
- package/dist/configure/services/tailordb/types.d.mts +12 -1
- package/dist/configure/services/workflow/execution-policy.types.d.mts +2 -1
- package/dist/configure/services/workflow/job.d.mts +2 -1
- package/dist/configure/services/workflow/wait-point.d.mts +2 -1
- package/dist/configure/types/field.types.d.mts +2 -1
- package/dist/configure/types/permission-operand.types.d.mts +2 -1
- package/dist/configure/types/type.d.mts +2 -1
- package/dist/{crashreport-DFpRn-LS.mjs → crashreport-BAG8c7hB.mjs} +4 -4
- package/dist/{crashreport-DFpRn-LS.mjs.map → crashreport-BAG8c7hB.mjs.map} +1 -1
- package/dist/crashreport-BcXuocwI.mjs +1 -0
- package/dist/{errors-CpvSChyL.mjs → errors-D3qpNHR6.mjs} +2 -2
- package/dist/{errors-CpvSChyL.mjs.map → errors-D3qpNHR6.mjs.map} +1 -1
- package/dist/kysely-type-BWMfV301.mjs +48 -0
- package/dist/kysely-type-BWMfV301.mjs.map +1 -0
- package/dist/logger-DuaT2zY3.mjs +9 -0
- package/dist/logger-DuaT2zY3.mjs.map +1 -0
- package/dist/package-json-D1BRkjtr.mjs +1 -0
- package/dist/parser/service/tailordb/types.d.mts +3 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +11 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/register-ts-hook-CkfKqhJT.mjs +1014 -0
- package/dist/register-ts-hook-CkfKqhJT.mjs.map +1 -0
- package/dist/runtime/aigateway.mjs +1 -1
- package/dist/runtime/authconnection.mjs +1 -1
- package/dist/runtime/context.d.mts +2 -1
- package/dist/runtime/context.mjs +1 -1
- package/dist/runtime/date.d.mts +2 -1
- package/dist/runtime/field-parse.d.mts +2 -1
- package/dist/runtime/file.d.mts +2 -1
- package/dist/runtime/file.mjs +1 -1
- package/dist/runtime/globals.d.mts +2 -1
- package/dist/runtime/iconv.mjs +1 -1
- package/dist/runtime/idp.mjs +1 -1
- package/dist/runtime/logger.mjs +1 -1
- package/dist/runtime/secretmanager.mjs +1 -1
- package/dist/runtime/types.d.mts +2 -1
- package/dist/runtime/workflow.d.mts +2 -1
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/schema-B6hJQWp6.mjs.map +1 -1
- package/dist/seed/index.d.mts +17 -4
- package/dist/seed/index.mjs +6 -6
- package/dist/seed/index.mjs.map +1 -1
- package/dist/seed-C3P_T_Eh.mjs.map +1 -1
- package/dist/{service-Cc7OY0Oh.mjs → service-CETr0AKY.mjs} +3 -3
- package/dist/service-CETr0AKY.mjs.map +1 -0
- package/dist/service-DREWLYxD.mjs +1 -0
- package/dist/{service-DFmt9UJP.mjs → service-b1g22NN9.mjs} +2 -2
- package/dist/{service-DFmt9UJP.mjs.map → service-b1g22NN9.mjs.map} +1 -1
- package/dist/service_pb-Bbu2QSIr.mjs +2 -0
- package/dist/service_pb-Bbu2QSIr.mjs.map +1 -0
- package/dist/service_pb-urxAIYHT.mjs +1 -0
- package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +53 -1
- package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +33 -0
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +0 -8
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +18 -1
- package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +4 -0
- package/dist/telemetry-DpkFGBmu.mjs +1 -0
- package/dist/{telemetry-Bklv9kQY.mjs → telemetry-Xk7J829P.mjs} +2 -2
- package/dist/{telemetry-Bklv9kQY.mjs.map → telemetry-Xk7J829P.mjs.map} +1 -1
- package/dist/types/tailordb.generated.d.mts +2 -0
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +2 -1
- package/dist/vitest/mocks/aigateway.d.mts +2 -1
- package/dist/vitest/mocks/authconnection.d.mts +2 -1
- package/dist/vitest/mocks/file.d.mts +2 -1
- package/dist/vitest/mocks/iconv.d.mts +2 -1
- package/dist/vitest/mocks/idp.d.mts +2 -1
- package/dist/vitest/mocks/logger.d.mts +2 -1
- package/dist/vitest/mocks/secretmanager.d.mts +2 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +2 -1
- package/dist/vitest/mocks/tailordb.d.mts +2 -1
- package/dist/vitest/mocks/workflow.d.mts +3 -1
- package/dist/vitest/pglite-kysely.d.mts +2 -1
- package/dist/vitest/workflow-local.d.mts +2 -1
- package/dist/{workspace_resource_pb-ChWejcj0.mjs → workspace_resource_pb-CaoM2npP.mjs} +2 -2
- package/dist/{workspace_resource_pb-ChWejcj0.mjs.map → workspace_resource_pb-CaoM2npP.mjs.map} +1 -1
- package/docs/cli/application.md +21 -3
- package/docs/cli/data.md +105 -0
- package/docs/cli/secret.md +6 -6
- package/docs/cli/tailordb.md +52 -16
- package/docs/cli/user.md +37 -7
- package/docs/cli/workspace.md +9 -1
- package/docs/cli-reference.md +36 -3
- package/docs/configuration.md +62 -2
- package/docs/github-actions.md +179 -13
- package/docs/multi-environment.md +24 -0
- package/docs/plugin/custom.md +1 -1
- package/docs/services/idp.md +1 -1
- package/docs/services/resolver.md +1 -58
- package/docs/services/tailordb-migration.md +80 -12
- package/docs/services/tailordb.md +17 -4
- package/docs/services/workflow.md +2 -2
- package/docs/testing.md +3 -2
- package/package.json +22 -22
- package/dist/application-DFeuELRo.mjs +0 -200
- package/dist/application-DFeuELRo.mjs.map +0 -1
- package/dist/application-nT_4a5HO.mjs +0 -1
- package/dist/crashreport-CBaRJl5h.mjs +0 -1
- package/dist/kysely-type-RDX59E1j.mjs +0 -48
- package/dist/kysely-type-RDX59E1j.mjs.map +0 -1
- package/dist/logger-Db-YRTwK.mjs +0 -9
- package/dist/logger-Db-YRTwK.mjs.map +0 -1
- package/dist/package-json-CmqhDJ__.mjs +0 -1
- package/dist/register-ts-hook-D6KXrGrB.mjs +0 -1009
- package/dist/register-ts-hook-D6KXrGrB.mjs.map +0 -1
- package/dist/service-Cc7OY0Oh.mjs.map +0 -1
- package/dist/service-sH2MZ4_W.mjs +0 -1
- package/dist/service_pb-Dw2ilc1O.mjs +0 -2
- package/dist/service_pb-Dw2ilc1O.mjs.map +0 -1
- package/dist/service_pb-GDOqfwb6.mjs +0 -1
- package/dist/telemetry-DXHP3VVi.mjs +0 -1
package/docs/testing.md
CHANGED
|
@@ -44,9 +44,9 @@ The Tailor Platform function runtime only provides Web Standard APIs. Node.js bu
|
|
|
44
44
|
### Setup
|
|
45
45
|
|
|
46
46
|
```typescript
|
|
47
|
+
import { tailorRuntime } from "@tailor-platform/sdk/vitest";
|
|
47
48
|
// vitest.config.ts
|
|
48
49
|
import { defineConfig } from "vitest/config";
|
|
49
|
-
import { tailorRuntime } from "@tailor-platform/sdk/vitest";
|
|
50
50
|
|
|
51
51
|
export default defineConfig({
|
|
52
52
|
plugins: [tailorRuntime()],
|
|
@@ -211,6 +211,7 @@ What the script cannot reproduce:
|
|
|
211
211
|
|
|
212
212
|
- Hooks, validations, and permissions do not run. A required field whose value only its own field-level create hook supplies is created nullable, so inserts that omit it succeed; give it a `.default()` if the test reads it back. A field filled by a table-level hook stays `NOT NULL`, as its Kysely type still requires it on insert.
|
|
213
213
|
- Serial formats are reproduced for a single `%d`, `%x`, or `%X` specifier with an optional zero-padded width; an octal `%o` format fails generation with an error naming the field.
|
|
214
|
+
- `gapless` is not reproduced: the numbers come from a sequence, so an insert that fails still uses up its number.
|
|
214
215
|
- A date or datetime inside a nested object reads back as a string from `jsonb`, not a `Date`, or a `Temporal.PlainDate` or `Temporal.Instant` under `kyselyTypePlugin({ temporal: true })`, although the platform returns those types.
|
|
215
216
|
- On a persistent PGlite (`dataDir`), tables created by an earlier run are kept as they were; drop them or start from an empty directory after changing a table definition.
|
|
216
217
|
|
|
@@ -589,9 +590,9 @@ describe("incrementUserAge resolver", () => {
|
|
|
589
590
|
Once the logic gets more involved, mocking raw SQL calls becomes brittle. Push database access behind a `DbOperations` interface and test the pure function that uses it:
|
|
590
591
|
|
|
591
592
|
```typescript
|
|
593
|
+
import type { Namespace } from "../generated/db";
|
|
592
594
|
// src/resolver/decrementUserAge.ts
|
|
593
595
|
import type { Selectable } from "@tailor-platform/sdk/kysely";
|
|
594
|
-
import type { Namespace } from "../generated/db";
|
|
595
596
|
|
|
596
597
|
export interface DbOperations {
|
|
597
598
|
transaction: <T>(fn: (ops: DbOperations) => Promise<T>) => Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.0",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -155,22 +155,21 @@
|
|
|
155
155
|
"@bufbuild/protovalidate": "1.3.0",
|
|
156
156
|
"@connectrpc/connect": "2.2.0",
|
|
157
157
|
"@connectrpc/connect-node": "2.2.0",
|
|
158
|
-
"@inquirer/core": "12.0.
|
|
159
|
-
"@inquirer/prompts": "8.7.
|
|
158
|
+
"@inquirer/core": "12.0.4",
|
|
159
|
+
"@inquirer/prompts": "8.7.3",
|
|
160
160
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
161
|
-
"@napi-rs/keyring": "2.1.
|
|
161
|
+
"@napi-rs/keyring": "2.1.1",
|
|
162
162
|
"@opentelemetry/api": "1.9.1",
|
|
163
|
-
"@opentelemetry/exporter-trace-otlp-proto": "0.
|
|
164
|
-
"@opentelemetry/resources": "2.
|
|
165
|
-
"@opentelemetry/sdk-trace-node": "2.
|
|
163
|
+
"@opentelemetry/exporter-trace-otlp-proto": "0.223.0",
|
|
164
|
+
"@opentelemetry/resources": "2.12.0",
|
|
165
|
+
"@opentelemetry/sdk-trace-node": "2.12.0",
|
|
166
166
|
"@opentelemetry/semantic-conventions": "1.43.0",
|
|
167
|
-
"@oxc-project/types": "0.
|
|
168
|
-
"@politty/zod": "0.
|
|
167
|
+
"@oxc-project/types": "0.154.0",
|
|
168
|
+
"@politty/zod": "0.5.1",
|
|
169
169
|
"@secretlint/core": "13.0.7",
|
|
170
170
|
"@secretlint/secretlint-rule-preset-recommend": "13.0.7",
|
|
171
171
|
"@standard-schema/spec": "1.1.0",
|
|
172
172
|
"@tailor-platform/function-kysely-tailordb": "0.1.3",
|
|
173
|
-
"@toiroakr/lines-db": "0.15.0",
|
|
174
173
|
"@toiroakr/read-multiline": "0.4.1",
|
|
175
174
|
"@urql/core": "6.0.3",
|
|
176
175
|
"amaro": "1.2.1",
|
|
@@ -184,14 +183,15 @@
|
|
|
184
183
|
"graphql": "17.0.2",
|
|
185
184
|
"inflection": "3.0.2",
|
|
186
185
|
"kysely": "0.29.6",
|
|
186
|
+
"lines-db": "0.15.0",
|
|
187
187
|
"mime-types": "3.0.2",
|
|
188
188
|
"open": "11.0.4",
|
|
189
|
-
"oxc-parser": "0.
|
|
189
|
+
"oxc-parser": "0.154.0",
|
|
190
190
|
"p-limit": "7.3.3",
|
|
191
191
|
"pathe": "2.0.3",
|
|
192
192
|
"pgsql-ast-parser": "12.0.2",
|
|
193
193
|
"pkg-types": "2.3.3",
|
|
194
|
-
"rolldown": "1.2.
|
|
194
|
+
"rolldown": "1.2.13",
|
|
195
195
|
"semver": "7.8.5",
|
|
196
196
|
"sql-highlight": "6.1.0",
|
|
197
197
|
"std-env": "4.3.0",
|
|
@@ -200,26 +200,26 @@
|
|
|
200
200
|
"ts-cron-validator": "1.1.5",
|
|
201
201
|
"type-fest": "5.10.0",
|
|
202
202
|
"xdg-basedir": "5.1.0",
|
|
203
|
-
"zod": "4.6.
|
|
203
|
+
"zod": "4.6.7"
|
|
204
204
|
},
|
|
205
205
|
"devDependencies": {
|
|
206
|
-
"@electric-sql/pglite": "0.5.
|
|
207
|
-
"@opentelemetry/sdk-trace-base": "2.
|
|
206
|
+
"@electric-sql/pglite": "0.5.9",
|
|
207
|
+
"@opentelemetry/sdk-trace-base": "2.12.0",
|
|
208
208
|
"@tailor-platform/shared": "^0.0.0",
|
|
209
209
|
"@tailor-platform/tailor-proto": "^0.0.1",
|
|
210
210
|
"@types/mime-types": "3.0.1",
|
|
211
|
-
"@types/node": "24.19.
|
|
211
|
+
"@types/node": "24.19.2",
|
|
212
212
|
"@types/semver": "7.8.0",
|
|
213
213
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
214
|
-
"@vitest/coverage-v8": "5.0.
|
|
214
|
+
"@vitest/coverage-v8": "5.0.4",
|
|
215
215
|
"eslint-plugin-zod": "5.0.0",
|
|
216
|
-
"oxfmt": "0.
|
|
217
|
-
"oxlint": "1.
|
|
218
|
-
"oxlint-tsgolint": "7.0.
|
|
216
|
+
"oxfmt": "0.73.0",
|
|
217
|
+
"oxlint": "1.88.0",
|
|
218
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
219
219
|
"sonda": "0.14.0",
|
|
220
|
-
"tsdown": "0.23.
|
|
220
|
+
"tsdown": "0.23.1",
|
|
221
221
|
"typescript": "6.0.3",
|
|
222
|
-
"vitest": "5.0.
|
|
222
|
+
"vitest": "5.0.4",
|
|
223
223
|
"zinfer": "0.4.7"
|
|
224
224
|
},
|
|
225
225
|
"peerDependencies": {
|