@tailor-platform/sdk 1.78.0 → 1.80.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 (62) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/{application-CUxVA7Fs.mjs → application-C1d52JP9.mjs} +290 -224
  3. package/dist/application-C1d52JP9.mjs.map +1 -0
  4. package/dist/application-Nlh9BHQf.mjs +3 -0
  5. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -2
  6. package/dist/cli/index.mjs +27 -53
  7. package/dist/cli/index.mjs.map +1 -1
  8. package/dist/cli/lib.mjs +3 -6
  9. package/dist/cli/lib.mjs.map +1 -1
  10. package/dist/cli/tsconfig-paths-hook.d.mts +1 -0
  11. package/dist/cli/tsconfig-paths-hook.mjs +153 -0
  12. package/dist/completion/zsh-worker.zsh +1 -1
  13. package/dist/configure/config/types.d.mts +5 -1
  14. package/dist/configure/index.mjs +7 -6
  15. package/dist/configure/index.mjs.map +1 -1
  16. package/dist/configure/services/auth/types.d.mts +18 -23
  17. package/dist/configure/services/tailordb/schema.d.mts +1 -7
  18. package/dist/configure/services/workflow/execution-policy.d.mts +2 -2
  19. package/dist/configure/types/type.d.mts +1 -9
  20. package/dist/{globals-CvizbGLY.mjs → globals-B-n_3uYu.mjs} +11 -5
  21. package/dist/globals-B-n_3uYu.mjs.map +1 -0
  22. package/dist/{runtime-BD2vYJFT.mjs → register-typescript-runtime-Bd4bcLbW.mjs} +399 -124
  23. package/dist/register-typescript-runtime-Bd4bcLbW.mjs.map +1 -0
  24. package/dist/{registry-CYBRvfaU.mjs → registry-CXi7rJq7.mjs} +3 -2
  25. package/dist/registry-CXi7rJq7.mjs.map +1 -0
  26. package/dist/runtime/field-parse.d.mts +11 -0
  27. package/dist/runtime/globals.d.mts +4 -1
  28. package/dist/runtime/index.mjs +1 -1
  29. package/dist/runtime/workflow.d.mts +79 -15
  30. package/dist/runtime/workflow.mjs +2 -2
  31. package/dist/{schema-U6DxoZ8D.mjs → schema-CYrle8JZ.mjs} +42 -24
  32. package/dist/schema-CYrle8JZ.mjs.map +1 -0
  33. package/dist/{service-D12iQGcS.mjs → service-CDPatibu.mjs} +31 -17
  34. package/dist/service-CDPatibu.mjs.map +1 -0
  35. package/dist/service-Cg7Qibit.mjs +3 -0
  36. package/dist/vitest/environment.mjs +1 -1
  37. package/dist/vitest/index.mjs +36 -10
  38. package/dist/vitest/index.mjs.map +1 -1
  39. package/dist/vitest/mocks/workflow.d.mts +29 -15
  40. package/dist/vitest/setup.mjs +1 -1
  41. package/dist/workflow-CkIDJpdg.mjs +69 -0
  42. package/dist/workflow-CkIDJpdg.mjs.map +1 -0
  43. package/docs/cli/application.md +6 -0
  44. package/docs/cli-reference.md +21 -21
  45. package/docs/configuration.md +2 -0
  46. package/docs/runtime.md +2 -2
  47. package/docs/services/auth.md +2 -2
  48. package/docs/services/tailordb.md +2 -0
  49. package/docs/services/workflow.md +2 -2
  50. package/docs/testing.md +2 -2
  51. package/package.json +7 -6
  52. package/dist/application-CUxVA7Fs.mjs.map +0 -1
  53. package/dist/application-Dp_-ioiP.mjs +0 -3
  54. package/dist/configure/types/field-runtime.d.mts +0 -17
  55. package/dist/globals-CvizbGLY.mjs.map +0 -1
  56. package/dist/registry-CYBRvfaU.mjs.map +0 -1
  57. package/dist/runtime-BD2vYJFT.mjs.map +0 -1
  58. package/dist/schema-U6DxoZ8D.mjs.map +0 -1
  59. package/dist/service-CghpdV-9.mjs +0 -3
  60. package/dist/service-D12iQGcS.mjs.map +0 -1
  61. package/dist/workflow-DSwnYPPP.mjs +0 -45
  62. package/dist/workflow-DSwnYPPP.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { TailorEnv } from "../../../runtime/types.mjs";
2
- import { output } from "../../../types/helpers.mjs";
2
+ import { NullableToOptional, output } from "../../../types/helpers.mjs";
3
3
  import { DefinedFieldMetadata, FieldMetadata, TailorField, TailorFieldType } from "../../types/field.types.mjs";
4
4
  import { TailorDBInstance } from "../tailordb/types.mjs";
5
5
  import { AuthConnectionConfig } from "../../../types/auth-connection.generated.mjs";
@@ -56,37 +56,32 @@ type UserProfile<User extends TailorDBInstance, AttributeMap extends UserAttribu
56
56
  };
57
57
  type MachineUserAttributeFields = Record<string, TailorField<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
58
58
  type TailorFieldOutputValue<Field> = Field extends TailorField<DefinedFieldMetadata, infer Output, FieldMetadata, TailorFieldType> ? Output : never;
59
- type MachineUserAttributeValues<Fields extends MachineUserAttributeFields> = { [K in keyof Fields]: TailorFieldOutputValue<Fields[K]> extends ValueOperand | null | undefined ? TailorFieldOutputValue<Fields[K]> : never; };
60
- type MachineUserFromAttributes<Fields extends MachineUserAttributeFields> = (keyof Fields extends never ? {
61
- attributes?: never;
59
+ type MachineUserAttributeValues<Fields extends MachineUserAttributeFields> = NullableToOptional<{ [K in keyof Fields]: TailorFieldOutputValue<Fields[K]> extends ValueOperand | null | undefined ? TailorFieldOutputValue<Fields[K]> : never; }>;
60
+ type OptionalIfNoRequiredKeys<Attributes> = Record<never, never> extends Attributes ? {
61
+ attributes?: Attributes;
62
62
  } : {
63
- attributes: DisallowExtraKeys<MachineUserAttributeValues<Fields>, keyof Fields>;
64
- }) & {
65
- attributeList?: string[];
63
+ attributes: Attributes;
66
64
  };
67
- type MachineUser<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[] = [], MachineUserAttributes extends MachineUserAttributeFields | undefined = undefined> = IsAny<MachineUserAttributes> extends true ? IsAny<User> extends true ? {
68
- attributes: Record<string, AuthAttributeValue>;
69
- attributeList?: string[];
70
- } : (AttributeMapSelectedKeys<User, AttributeMap> extends never ? {
65
+ type MachineUserFromAttributes<Fields extends MachineUserAttributeFields> = (keyof Fields extends never ? {
71
66
  attributes?: never;
72
- } : {
73
- attributes: { [K in AttributeMapSelectedKeys<User, AttributeMap>]: K extends keyof output<User> ? output<User>[K] : never; } & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap>>]?: never; };
74
- }) & ([] extends AttributeList ? {
75
- attributeList?: never;
76
- } : {
77
- attributeList: AttributeListToTuple<User, AttributeList>;
78
- }) : [MachineUserAttributes] extends [MachineUserAttributeFields] ? MachineUserFromAttributes<MachineUserAttributes> : IsAny<User> extends true ? {
79
- attributes: Record<string, AuthAttributeValue>;
67
+ } : OptionalIfNoRequiredKeys<DisallowExtraKeys<MachineUserAttributeValues<Fields>, keyof Fields>>) & {
80
68
  attributeList?: string[];
81
- } : (AttributeMapSelectedKeys<User, AttributeMap> extends never ? {
69
+ };
70
+ type MachineUserProfileAttributes<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>> = NullableToOptional<{ [K in AttributeMapSelectedKeys<User, AttributeMap>]: K extends keyof output<User> ? output<User>[K] : never; }> & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap>>]?: never; };
71
+ type MachineUserFromUserProfile<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[]> = (AttributeMapSelectedKeys<User, AttributeMap> extends never ? {
82
72
  attributes?: never;
83
- } : {
84
- attributes: { [K in AttributeMapSelectedKeys<User, AttributeMap>]: K extends keyof output<User> ? output<User>[K] : never; } & { [K in Exclude<keyof output<User>, AttributeMapSelectedKeys<User, AttributeMap>>]?: never; };
85
- }) & ([] extends AttributeList ? {
73
+ } : OptionalIfNoRequiredKeys<MachineUserProfileAttributes<User, AttributeMap>>) & ([] extends AttributeList ? {
86
74
  attributeList?: never;
87
75
  } : {
88
76
  attributeList: AttributeListToTuple<User, AttributeList>;
89
77
  });
78
+ type MachineUser<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User> = UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[] = [], MachineUserAttributes extends MachineUserAttributeFields | undefined = undefined> = IsAny<MachineUserAttributes> extends true ? IsAny<User> extends true ? {
79
+ attributes?: Record<string, AuthAttributeValue>;
80
+ attributeList?: string[];
81
+ } : MachineUserFromUserProfile<User, AttributeMap, AttributeList> : [MachineUserAttributes] extends [MachineUserAttributeFields] ? MachineUserFromAttributes<MachineUserAttributes> : IsAny<User> extends true ? {
82
+ attributes?: Record<string, AuthAttributeValue>;
83
+ attributeList?: string[];
84
+ } : MachineUserFromUserProfile<User, AttributeMap, AttributeList>;
90
85
  /** Upstream OAuth provider that federated a login through the Built-in IdP. */
91
86
  type FederatedIdentityProvider = "google" | "microsoft";
92
87
  /**
@@ -3,7 +3,7 @@ import { InferFieldsOutput, TypeLevelError, output } from "../../../types/helper
3
3
  import { FieldOptions, FieldOutput, FieldValidateInput, TailorFieldType, TailorToTs, Validators } from "../../types/field.types.mjs";
4
4
  import { DBFieldMetadata, DefinedDBFieldMetadata, ExcludeNestedDBFields, Hook, Hooks, IndexDef, RelationType, SerialConfig, TailorDBField as TailorDBField$1, TailorDBType as TailorDBType$1, TypeFeatures } from "./types.mjs";
5
5
  import { AllowedValues, AllowedValuesOutput } from "../../types/field.mjs";
6
- import { FieldParseArgs, FieldParseInternalArgs } from "../../types/field-runtime.mjs";
6
+ import { FieldParseArgs } from "../../../runtime/field-parse.mjs";
7
7
  import { PluginConfigs } from "../../../plugin/types.mjs";
8
8
  import { TailorTypeGqlPermission, TailorTypePermission } from "./permission.mjs";
9
9
  import { StandardSchemaV1 } from "@standard-schema/spec";
@@ -13,7 +13,6 @@ type TailorAnyDBField = Omit<TailorDBField$1<AnyBuilderMethod, AnyBuilderMethod>
13
13
  readonly fields: Record<string, AnyBuilderMethod>;
14
14
  _metadata: DBFieldMetadata;
15
15
  parse: AnyBuilderMethod;
16
- _parseInternal: AnyBuilderMethod;
17
16
  readonly typeName: TypeLevelError<string>;
18
17
  description: AnyBuilderMethod;
19
18
  relation: AnyBuilderMethod;
@@ -172,11 +171,6 @@ interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldM
172
171
  * Parse and validate a value against this field's validation rules
173
172
  */
174
173
  parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;
175
- /**
176
- * Internal parse method that tracks field path for nested validation
177
- * @private
178
- */
179
- _parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
180
174
  /**
181
175
  * typeName is not available on TailorDB fields.
182
176
  * Use typeName on pipeline fields (t.enum / t.object) instead.
@@ -58,10 +58,10 @@ declare function defineWorkflowExecutionPolicy<const N extends string, const D e
58
58
  * }));
59
59
  *
60
60
  * // In a workflow job function:
61
- * await tailor.workflow.triggerJobFunction("worker", args, {
61
+ * await tailor.workflow.startJobFunction("worker", args, {
62
62
  * executionPolicyKey: executionPolicies.premium.key,
63
63
  * });
64
- * await tailor.workflow.triggerJobFunction("worker", args, {
64
+ * await tailor.workflow.startJobFunction("worker", args, {
65
65
  * executionPolicyKey: executionPolicies["tenant-api"].keyFor(input.tenantId),
66
66
  * });
67
67
  */
@@ -1,7 +1,7 @@
1
1
  import { TypeLevelError } from "../../types/helpers.mjs";
2
2
  import { DefinedFieldMetadata, FieldMetadata, FieldValidateInput, TailorField as TailorField$1, TailorFieldType } from "./field.types.mjs";
3
3
  import "./field.mjs";
4
- import { FieldParseArgs, FieldParseInternalArgs } from "./field-runtime.mjs";
4
+ import { FieldParseArgs } from "../../runtime/field-parse.mjs";
5
5
  import { StandardSchemaV1 } from "@standard-schema/spec";
6
6
  //#region src/configure/types/type.d.ts
7
7
  type AnyBuilderMethod = any;
@@ -12,7 +12,6 @@ type TailorAnyField = Omit<TailorField$1<AnyBuilderMethod, AnyBuilderMethod, Fie
12
12
  typeName: AnyBuilderMethod;
13
13
  validate: AnyBuilderMethod;
14
14
  parse: AnyBuilderMethod;
15
- _parseInternal: AnyBuilderMethod;
16
15
  };
17
16
  type IsAny<T> = 0 extends 1 & T ? true : false;
18
17
  type WithFieldDescription<Defined> = Defined & {
@@ -70,13 +69,6 @@ interface TailorField<Defined extends DefinedFieldMetadata = DefinedFieldMetadat
70
69
  * @returns Validation result
71
70
  */
72
71
  parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;
73
- /**
74
- * Internal parse method that tracks field path for nested validation
75
- * @private
76
- * @param args - Parse arguments
77
- * @returns Validation result
78
- */
79
- _parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
80
72
  }
81
73
  //#endregion
82
74
  export { TailorAnyField, TailorField };
@@ -1,11 +1,17 @@
1
- import { c as runRegisteredJob, l as runRegisteredWorkflow } from "./registry-CYBRvfaU.mjs";
1
+ import { c as runRegisteredJob, l as runRegisteredWorkflow } from "./registry-CXi7rJq7.mjs";
2
2
 
3
3
  //#region src/vitest/workflow-runtime.ts
4
4
  function createDefaultWorkflowRuntime() {
5
+ const startJobFunction = (name, args) => runRegisteredJob(name, args);
6
+ const startWorkflow = (name, args) => runRegisteredWorkflow(name, args);
7
+ const resumeWorkflowExecution = async (executionId) => executionId;
5
8
  return {
6
- triggerJobFunction: (name, args) => runRegisteredJob(name, args),
7
- triggerWorkflow: (name, args) => runRegisteredWorkflow(name, args),
8
- resumeWorkflow: async (executionId) => executionId,
9
+ startJobFunction,
10
+ triggerJobFunction: startJobFunction,
11
+ startWorkflow,
12
+ triggerWorkflow: startWorkflow,
13
+ resumeWorkflowExecution,
14
+ resumeWorkflow: resumeWorkflowExecution,
9
15
  wait: (key) => {
10
16
  throw new Error(`No wait handler for "${key}". Acquire mockWorkflow() and call setWaitHandler(...).`);
11
17
  },
@@ -106,4 +112,4 @@ function cleanupPlatformGlobals(global) {
106
112
 
107
113
  //#endregion
108
114
  export { cleanupPlatformGlobals as n, installPlatformGlobals as r, RUNTIME_FLAG_KEY as t };
109
- //# sourceMappingURL=globals-CvizbGLY.mjs.map
115
+ //# sourceMappingURL=globals-B-n_3uYu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals-B-n_3uYu.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 * @param global - The global object to install into (typically `globalThis`)\n */\nexport function installPlatformGlobals(global: typeof globalThis): void {\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\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,sB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