@tailor-platform/sdk 1.80.0 → 1.80.1
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 +10 -0
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/index.d.mts +1 -1
- package/dist/configure/services/idp/index.d.mts +1 -1
- package/dist/configure/services/idp/types.d.mts +5 -1
- package/dist/configure/services/index.d.mts +1 -1
- package/dist/{globals-B-n_3uYu.mjs → globals-DVJ8RVvm.mjs} +8 -1
- package/dist/{globals-B-n_3uYu.mjs.map → globals-DVJ8RVvm.mjs.map} +1 -1
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/setup.mjs +1 -1
- package/docs/testing.md +10 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.80.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1831](https://github.com/tailor-platform/sdk/pull/1831) [`e24b3da`](https://github.com/tailor-platform/sdk/commit/e24b3da17656317a3729626d1cb34d90b8116356) Thanks [@toiroakr](https://github.com/toiroakr)! - Fix `IdPConfig`'s `permission` type so `defineIdp` calls with valid permission definitions using project-specific attribute keys are no longer rejected by `tsc`
|
|
8
|
+
|
|
9
|
+
- [#1828](https://github.com/tailor-platform/sdk/pull/1828) [`46f2d49`](https://github.com/tailor-platform/sdk/commit/46f2d496407ec8c248ed60a3f519ef526e0896e4) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update rolldown
|
|
10
|
+
|
|
11
|
+
- [#1818](https://github.com/tailor-platform/sdk/pull/1818) [`56608cc`](https://github.com/tailor-platform/sdk/commit/56608ccc445c1aeb683ddfd72965446b1062cfbd) Thanks [@toiroakr](https://github.com/toiroakr)! - Adopt Vitest 4.1 `aroundEach`/`aroundAll` hooks across the test suites, and update the TailorDB client mock example in the testing docs to the same style
|
|
12
|
+
|
|
3
13
|
## 1.80.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -12,6 +12,7 @@ import { ExecutorReadyContext, GeneratorResult, NamespacePluginOutput, Plugin, P
|
|
|
12
12
|
import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission } from "./services/tailordb/permission.mjs";
|
|
13
13
|
import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./services/tailordb/schema.mjs";
|
|
14
14
|
import { AIGatewayConfig } from "./services/aigateway/types.mjs";
|
|
15
|
+
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./services/idp/permission.mjs";
|
|
15
16
|
import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput } from "../types/idp.generated.mjs";
|
|
16
17
|
import { IdPConfig, IdPExternalConfig } from "./services/idp/types.mjs";
|
|
17
18
|
import { SecretsConfig } from "./services/secrets/types.mjs";
|
|
@@ -42,7 +43,6 @@ import { defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy } from "
|
|
|
42
43
|
import { WaitPointInstance, defineWaitPoint, defineWaitPoints } from "./services/workflow/wait-point.mjs";
|
|
43
44
|
import { defineStaticWebSite } from "./services/staticwebsite/index.mjs";
|
|
44
45
|
import { defineAIGateway } from "./services/aigateway/index.mjs";
|
|
45
|
-
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./services/idp/permission.mjs";
|
|
46
46
|
import { defineIdp } from "./services/idp/index.mjs";
|
|
47
47
|
import { defineSecretManager } from "./services/secrets/index.mjs";
|
|
48
48
|
import { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter } from "./services/http-adapter/http-adapter.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./permission.mjs";
|
|
1
2
|
import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput, IdPInput } from "../../../types/idp.generated.mjs";
|
|
2
3
|
import { IdPConfig, IdPExternalConfig, IdpDefinitionBrand } from "./types.mjs";
|
|
3
|
-
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./permission.mjs";
|
|
4
4
|
//#region src/configure/services/idp/index.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Define an IdP service configuration for the Tailor SDK.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BuiltinIdP } from "../../../types/auth.generated.mjs";
|
|
2
|
+
import { IdPPermission } from "./permission.mjs";
|
|
2
3
|
import { IdPInput } from "../../../types/idp.generated.mjs";
|
|
3
4
|
//#region src/configure/services/idp/types.d.ts
|
|
4
5
|
declare const idpDefinitionBrand: unique symbol;
|
|
@@ -13,7 +14,10 @@ type IdPExternalConfig = {
|
|
|
13
14
|
name: string;
|
|
14
15
|
external: true;
|
|
15
16
|
};
|
|
16
|
-
type
|
|
17
|
+
type IdPOwnConfigInput = Omit<IdPInput, "permission"> & {
|
|
18
|
+
permission?: IdPPermission;
|
|
19
|
+
};
|
|
20
|
+
type IdPOwnConfig = Omit<DefinedIdp<string, IdPOwnConfigInput, string>, "provider">;
|
|
17
21
|
type IdPConfig = IdPOwnConfig | IdPExternalConfig;
|
|
18
22
|
//#endregion
|
|
19
23
|
export { DefinedIdp, IdPConfig, IdPExternalConfig, IdPOwnConfig, IdpDefinitionBrand };
|
|
@@ -6,6 +6,7 @@ import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, uns
|
|
|
6
6
|
import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./tailordb/schema.mjs";
|
|
7
7
|
import "./tailordb/index.mjs";
|
|
8
8
|
import { AIGatewayConfig } from "./aigateway/types.mjs";
|
|
9
|
+
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./idp/permission.mjs";
|
|
9
10
|
import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput } from "../../types/idp.generated.mjs";
|
|
10
11
|
import { IdPConfig, IdPExternalConfig } from "./idp/types.mjs";
|
|
11
12
|
import { SecretsConfig } from "./secrets/types.mjs";
|
|
@@ -32,7 +33,6 @@ import { WaitPointInstance, defineWaitPoint, defineWaitPoints } from "./workflow
|
|
|
32
33
|
import "./workflow/index.mjs";
|
|
33
34
|
import { defineStaticWebSite } from "./staticwebsite/index.mjs";
|
|
34
35
|
import { defineAIGateway } from "./aigateway/index.mjs";
|
|
35
|
-
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./idp/permission.mjs";
|
|
36
36
|
import { defineIdp } from "./idp/index.mjs";
|
|
37
37
|
import { defineSecretManager } from "./secrets/index.mjs";
|
|
38
38
|
import { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter } from "./http-adapter/http-adapter.mjs";
|
|
@@ -81,7 +81,11 @@ function defaultGetInvoker() {
|
|
|
81
81
|
* Install the always-present base platform globals (containers, context stub,
|
|
82
82
|
* error classes, runtime flag). Per-namespace mocks are layered on top by the
|
|
83
83
|
* `xMock()` factories in `./mock`.
|
|
84
|
+
*
|
|
85
|
+
* Acquire with a `using` declaration and the globals are removed when the
|
|
86
|
+
* scope exits; alternatively call `cleanupPlatformGlobals` yourself.
|
|
84
87
|
* @param global - The global object to install into (typically `globalThis`)
|
|
88
|
+
* @returns A `Disposable` that removes the installed globals
|
|
85
89
|
*/
|
|
86
90
|
function installPlatformGlobals(global) {
|
|
87
91
|
const g = global;
|
|
@@ -94,6 +98,9 @@ function installPlatformGlobals(global) {
|
|
|
94
98
|
g.TailorErrors = TailorErrorsMock;
|
|
95
99
|
g.TailorErrorMessage = TailorErrorMessageMock;
|
|
96
100
|
g.TailorDBFileError = TailorDBFileErrorMock;
|
|
101
|
+
return { [Symbol.dispose]() {
|
|
102
|
+
cleanupPlatformGlobals(global);
|
|
103
|
+
} };
|
|
97
104
|
}
|
|
98
105
|
/**
|
|
99
106
|
* Remove the base platform globals (and anything the namespace mocks layered on
|
|
@@ -112,4 +119,4 @@ function cleanupPlatformGlobals(global) {
|
|
|
112
119
|
|
|
113
120
|
//#endregion
|
|
114
121
|
export { cleanupPlatformGlobals as n, installPlatformGlobals as r, RUNTIME_FLAG_KEY as t };
|
|
115
|
-
//# sourceMappingURL=globals-
|
|
122
|
+
//# sourceMappingURL=globals-DVJ8RVvm.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals-
|
|
1
|
+
{"version":3,"file":"globals-DVJ8RVvm.mjs","names":[],"sources":["../src/vitest/workflow-runtime.ts","../src/vitest/globals.ts"],"sourcesContent":["// Default `tailor.workflow` runner installed by the `tailor-runtime` environment.\n// Must stay free of `vitest` (`vi`): it loads via `./globals` in the environment\n// realm where `vi` is unavailable, hence relative imports only (no `@/` alias).\nimport { runRegisteredJob, runRegisteredWorkflow } from \"../configure/services/workflow/registry\";\nimport type { StartJobFunctionOptions, StartWorkflowOptions } from \"../runtime/workflow\";\n\nexport interface DefaultWorkflowRuntime {\n startJobFunction: (name: string, args?: unknown, options?: StartJobFunctionOptions) => unknown;\n triggerJobFunction: (name: string, args?: unknown, options?: StartJobFunctionOptions) => unknown;\n startWorkflow: (name: string, args?: unknown, options?: StartWorkflowOptions) => Promise<string>;\n triggerWorkflow: (\n name: string,\n args?: unknown,\n options?: StartWorkflowOptions,\n ) => Promise<string>;\n resumeWorkflowExecution: (executionId: string) => Promise<string>;\n resumeWorkflow: (executionId: string) => Promise<string>;\n wait: (key: string, payload?: unknown) => unknown;\n resolve: (\n executionId: string,\n key: string,\n callback: (payload: unknown) => unknown,\n ) => Promise<void>;\n}\n\nexport function createDefaultWorkflowRuntime(): DefaultWorkflowRuntime {\n const startJobFunction: DefaultWorkflowRuntime[\"startJobFunction\"] = (name, args) =>\n runRegisteredJob(name, args);\n const startWorkflow: DefaultWorkflowRuntime[\"startWorkflow\"] = (name, args) =>\n runRegisteredWorkflow(name, args);\n const resumeWorkflowExecution: DefaultWorkflowRuntime[\"resumeWorkflowExecution\"] = async (\n executionId,\n ) => executionId;\n return {\n startJobFunction,\n triggerJobFunction: startJobFunction,\n startWorkflow,\n triggerWorkflow: startWorkflow,\n resumeWorkflowExecution,\n resumeWorkflow: resumeWorkflowExecution,\n wait: (key: string): unknown => {\n throw new Error(\n `No wait handler for \"${key}\". Acquire mockWorkflow() and call setWaitHandler(...).`,\n );\n },\n resolve: async (): Promise<void> => {\n throw new Error(\n \"No resolve handler. Acquire mockWorkflow() and call setResolveHandler(...).\",\n );\n },\n };\n}\n","/**\n * Base platform globals for the tailor-runtime test environment.\n *\n * This module is intentionally free of any `vitest` (`vi`) dependency so it can\n * be imported from the Vitest *environment* module (which runs in a realm where\n * `vi` is not available). It installs only the always-present structural pieces:\n *\n * - `globalThis.tailor` / `globalThis.tailordb` container objects\n * - `globalThis.tailor.context.getInvoker` default stub\n * - the platform error classes (`TailorErrors`, `TailorErrorMessage`,\n * `TailorDBFileError`)\n * - the `__tailorRuntimeActive` sentinel flag\n *\n * The per-namespace mock behavior (TailorDB client, workflow, secretmanager, …)\n * is installed on demand by the `xMock()` factories in `./mock`, which run in\n * test context where `vi` *is* available.\n */\n\nimport { createDefaultWorkflowRuntime } from \"./workflow-runtime\";\nimport type { ContextInvoker } from \"../runtime/context\";\nimport type { TailorDBFileErrorCode } from \"../runtime/file\";\n\n// Sentinel set when the tailor-runtime environment is active. setup.ts reads it\n// to decide whether to run its blocked-globals lifecycle and config-secret\n// loading.\nexport const RUNTIME_FLAG_KEY = \"__tailorRuntimeActive\";\n\n// ---------------------------------------------------------------------------\n// Error class mocks\n// ---------------------------------------------------------------------------\n\ninterface TailorErrorItem {\n message: string;\n path: (string | number)[];\n}\n\nclass TailorErrorsMock extends Error {\n errors: TailorErrorItem[];\n\n constructor(errors: TailorErrorItem[]) {\n if (!Array.isArray(errors)) {\n throw new TypeError(\"TailorErrors: errors must be an array\");\n }\n const validated = errors.map((e, i) => {\n if (typeof e.message !== \"string\") {\n throw new TypeError(`TailorErrors: errors[${i}].message must be a string`);\n }\n if (!Array.isArray(e.path)) {\n throw new TypeError(`TailorErrors: errors[${i}].path must be an array`);\n }\n return { message: e.message, path: e.path };\n });\n // Match the PF runtime's TailorErrors serialization, which prefixes the\n // JSON payload with \"TailorErrors: \". Other SDK code (e.g. apply\n // integration fixtures) strips this prefix before JSON.parse.\n super(`TailorErrors: ${JSON.stringify({ errors: validated })}`);\n this.name = \"TailorErrors\";\n this.errors = validated;\n }\n}\n\nclass TailorErrorMessageMock extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"TailorErrorMessage\";\n }\n}\n\nclass TailorDBFileErrorMock extends Error {\n code?: TailorDBFileErrorCode;\n override cause: unknown;\n\n constructor(message: string, code?: TailorDBFileErrorCode, cause?: unknown) {\n super(message);\n this.name = \"TailorDBFileError\";\n this.code = code;\n this.cause = cause;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Base install / cleanup\n// ---------------------------------------------------------------------------\n\n// Stub-only injection. SDK consumers configure invokers at the body level\n// (resolver/executor/workflow `.body()` `invoker` arg) or, for bundled tests,\n// via `vi.spyOn(globalThis.tailor.context, \"getInvoker\")`.\nfunction defaultGetInvoker(): ContextInvoker | null {\n return null;\n}\n\n/**\n * Install the always-present base platform globals (containers, context stub,\n * error classes, runtime flag). Per-namespace mocks are layered on top by the\n * `xMock()` factories in `./mock`.\n *\n * Acquire with a `using` declaration and the globals are removed when the\n * scope exits; alternatively call `cleanupPlatformGlobals` yourself.\n * @param global - The global object to install into (typically `globalThis`)\n * @returns A `Disposable` that removes the installed globals\n */\nexport function installPlatformGlobals(global: typeof globalThis): Disposable {\n const g = global as Record<string, unknown>;\n\n g[RUNTIME_FLAG_KEY] = true;\n\n // Containers. Namespace mocks (secretmanager, …) are added to these by the\n // corresponding `xMock()` on acquisition. `workflow` carries a default runner\n // so `.trigger()` runs the real job chain locally without `mockWorkflow()`;\n // `mockWorkflow()` overlays and restores it.\n g.tailor = {\n context: { getInvoker: defaultGetInvoker },\n workflow: createDefaultWorkflowRuntime(),\n };\n g.tailordb = {};\n\n g.TailorErrors = TailorErrorsMock;\n g.TailorErrorMessage = TailorErrorMessageMock;\n g.TailorDBFileError = TailorDBFileErrorMock;\n\n return {\n [Symbol.dispose]() {\n cleanupPlatformGlobals(global);\n },\n };\n}\n\n/**\n * Remove the base platform globals (and anything the namespace mocks layered on\n * top, since they live under the same containers).\n * @param global - The global object to clean up (typically `globalThis`)\n */\nexport function cleanupPlatformGlobals(global: typeof globalThis): void {\n const g = global as Record<string, unknown>;\n delete g.tailordb;\n delete g.tailor;\n delete g.TailorErrors;\n delete g.TailorErrorMessage;\n delete g.TailorDBFileError;\n delete g[RUNTIME_FLAG_KEY];\n}\n"],"mappings":";;;AAyBA,SAAgB,+BAAuD;CACrE,MAAM,oBAAgE,MAAM,SAC1E,iBAAiB,MAAM,IAAI;CAC7B,MAAM,iBAA0D,MAAM,SACpE,sBAAsB,MAAM,IAAI;CAClC,MAAM,0BAA6E,OACjF,gBACG;CACL,OAAO;EACL;EACA,oBAAoB;EACpB;EACA,iBAAiB;EACjB;EACA,gBAAgB;EAChB,OAAO,QAAyB;GAC9B,MAAM,IAAI,MACR,wBAAwB,IAAI,wDAC9B;EACF;EACA,SAAS,YAA2B;GAClC,MAAM,IAAI,MACR,6EACF;EACF;CACF;AACF;;;;;;;;;;;;;;;;;;;;;AC1BA,MAAa,mBAAmB;AAWhC,IAAM,mBAAN,cAA+B,MAAM;CACnC;CAEA,YAAY,QAA2B;EACrC,IAAI,CAAC,MAAM,QAAQ,MAAM,GACvB,MAAM,IAAI,UAAU,uCAAuC;EAE7D,MAAM,YAAY,OAAO,KAAK,GAAG,MAAM;GACrC,IAAI,OAAO,EAAE,YAAY,UACvB,MAAM,IAAI,UAAU,wBAAwB,EAAE,2BAA2B;GAE3E,IAAI,CAAC,MAAM,QAAQ,EAAE,IAAI,GACvB,MAAM,IAAI,UAAU,wBAAwB,EAAE,wBAAwB;GAExE,OAAO;IAAE,SAAS,EAAE;IAAS,MAAM,EAAE;GAAK;EAC5C,CAAC;EAID,MAAM,iBAAiB,KAAK,UAAU,EAAE,QAAQ,UAAU,CAAC,GAAG;EAC9D,KAAK,OAAO;EACZ,KAAK,SAAS;CAChB;AACF;AAEA,IAAM,yBAAN,cAAqC,MAAM;CACzC,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAEA,IAAM,wBAAN,cAAoC,MAAM;CACxC;CACA,AAAS;CAET,YAAY,SAAiB,MAA8B,OAAiB;EAC1E,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,QAAQ;CACf;AACF;AASA,SAAS,oBAA2C;CAClD,OAAO;AACT;;;;;;;;;;;AAYA,SAAgB,uBAAuB,QAAuC;CAC5E,MAAM,IAAI;CAEV,EAAE,oBAAoB;CAMtB,EAAE,SAAS;EACT,SAAS,EAAE,YAAY,kBAAkB;EACzC,UAAU,6BAA6B;CACzC;CACA,EAAE,WAAW,CAAC;CAEd,EAAE,eAAe;CACjB,EAAE,qBAAqB;CACvB,EAAE,oBAAoB;CAEtB,OAAO,EACL,CAAC,OAAO,WAAW;EACjB,uBAAuB,MAAM;CAC/B,EACF;AACF;;;;;;AAOA,SAAgB,uBAAuB,QAAiC;CACtE,MAAM,IAAI;CACV,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;AACX"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as cleanupPlatformGlobals, r as installPlatformGlobals, t as RUNTIME_FLAG_KEY } from "../globals-
|
|
1
|
+
import { n as cleanupPlatformGlobals, r as installPlatformGlobals, t as RUNTIME_FLAG_KEY } from "../globals-DVJ8RVvm.mjs";
|
|
2
2
|
import * as globals from "globals";
|
|
3
3
|
|
|
4
4
|
//#region src/vitest/environment.ts
|
package/dist/vitest/setup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RUNTIME_FLAG_KEY } from "../globals-
|
|
1
|
+
import { t as RUNTIME_FLAG_KEY } from "../globals-DVJ8RVvm.mjs";
|
|
2
2
|
import { t as mockSecretmanager } from "../secretmanager-IY4UvinW.mjs";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { afterEach, beforeAll, beforeEach } from "vitest";
|
package/docs/testing.md
CHANGED
|
@@ -414,15 +414,17 @@ Stub the global `tailordb.Client` and queue raw query results in order. Best for
|
|
|
414
414
|
|
|
415
415
|
> If you are running with the [`tailor-runtime` Vitest environment](#runtime-environment-emulation-beta), acquire `using db = mockTailordb()` to install and drive the mock `tailordb.Client` instead of `vi.stubGlobal()`.
|
|
416
416
|
|
|
417
|
+
> The example below uses `aroundAll` / `aroundEach`, which require Vitest ≥ 4.1.
|
|
418
|
+
|
|
417
419
|
```typescript
|
|
418
420
|
import { unauthenticatedTailorUser } from "@tailor-platform/sdk/test";
|
|
419
|
-
import {
|
|
421
|
+
import { aroundAll, aroundEach, describe, expect, test, vi } from "vitest";
|
|
420
422
|
import resolver from "../src/resolver/incrementUserAge";
|
|
421
423
|
|
|
422
424
|
describe("incrementUserAge resolver", () => {
|
|
423
425
|
const mockQueryObject = vi.fn();
|
|
424
426
|
|
|
425
|
-
|
|
427
|
+
aroundAll(async (runSuite) => {
|
|
426
428
|
vi.stubGlobal("tailordb", {
|
|
427
429
|
Client: vi.fn(
|
|
428
430
|
class {
|
|
@@ -432,9 +434,13 @@ describe("incrementUserAge resolver", () => {
|
|
|
432
434
|
},
|
|
433
435
|
),
|
|
434
436
|
});
|
|
437
|
+
await runSuite();
|
|
438
|
+
vi.unstubAllGlobals();
|
|
439
|
+
});
|
|
440
|
+
aroundEach(async (runTest) => {
|
|
441
|
+
await runTest();
|
|
442
|
+
mockQueryObject.mockReset();
|
|
435
443
|
});
|
|
436
|
-
afterAll(() => vi.unstubAllGlobals());
|
|
437
|
-
afterEach(() => mockQueryObject.mockReset());
|
|
438
444
|
|
|
439
445
|
test("increments age inside a transaction", async () => {
|
|
440
446
|
// BEGIN → SELECT → UPDATE → COMMIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "1.80.
|
|
3
|
+
"version": "1.80.1",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"pgsql-ast-parser": "12.0.2",
|
|
186
186
|
"pkg-types": "2.3.1",
|
|
187
187
|
"politty": "0.11.2",
|
|
188
|
-
"rolldown": "1.
|
|
188
|
+
"rolldown": "1.2.0",
|
|
189
189
|
"semver": "7.8.5",
|
|
190
190
|
"sql-highlight": "6.1.0",
|
|
191
191
|
"std-env": "4.2.0",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"oxlint": "1.73.0",
|
|
210
210
|
"oxlint-tsgolint": "0.25.0",
|
|
211
211
|
"sonda": "0.14.0",
|
|
212
|
-
"tsdown": "0.22.
|
|
212
|
+
"tsdown": "0.22.9",
|
|
213
213
|
"typescript": "6.0.3",
|
|
214
214
|
"vitest": "4.1.10",
|
|
215
215
|
"zinfer": "0.2.5",
|