@tailor-platform/sdk 2.38.0 → 2.39.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 +64 -0
- package/dist/{application-Bz80INH4.mjs → application-OeNMQzOC.mjs} +1 -1
- package/dist/{application-CeqD1OK-.mjs → application-mNOJx9Y2.mjs} +4 -4
- package/dist/{application-CeqD1OK-.mjs.map → application-mNOJx9Y2.mjs.map} +1 -1
- package/dist/cli/commands/executor/trigger.d.mts +1 -0
- package/dist/cli/commands/generate/seed/bundler.d.mts +7 -5
- package/dist/cli/commands/workspace/transform.d.mts +1 -2
- package/dist/cli/lib.d.mts +4 -2
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +30 -30
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/build-options.d.mts +13 -0
- package/dist/cli/shared/client.d.mts +1 -0
- package/dist/cli/shared/script-workflow.d.mts +65 -0
- package/dist/cli/shared/seed-chunker.d.mts +3 -3
- package/dist/{client-DOQv-BP8.mjs → client-CqiPQgMG.mjs} +2 -2
- package/dist/client-CqiPQgMG.mjs.map +1 -0
- package/dist/client-DO2_Xz_z.mjs +1 -0
- package/dist/completion/zsh-worker.zsh +61 -6
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/auth/types.d.mts +20 -3
- package/dist/configure/services/executor/trigger/webhook.d.mts +8 -1
- package/dist/{context-OOASEQLA.mjs → context-CYBcQZyO.mjs} +1 -1
- package/dist/{context-DSi5kfqr.mjs → context-aAgFGDBD.mjs} +4 -4
- package/dist/{context-DSi5kfqr.mjs.map → context-aAgFGDBD.mjs.map} +1 -1
- package/dist/{register-ts-hook-CXYYYgCl.mjs → register-ts-hook-CORbtrSN.mjs} +82 -71
- package/dist/register-ts-hook-CORbtrSN.mjs.map +1 -0
- package/dist/{service-DB-RHn25.mjs → service-Bkz_TB5v.mjs} +2 -2
- package/dist/{service-DB-RHn25.mjs.map → service-Bkz_TB5v.mjs.map} +1 -1
- package/dist/service-Dffd4how.mjs +1 -0
- package/dist/syntax-diagnostic-BQgOV8Fz.mjs +2 -0
- package/dist/syntax-diagnostic-BQgOV8Fz.mjs.map +1 -0
- package/dist/validation-errors-ChvCG6wT.mjs +3 -0
- package/dist/validation-errors-ChvCG6wT.mjs.map +1 -0
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/docs/cli/application.md +3 -3
- package/docs/cli/executor.md +13 -17
- package/docs/cli/function.md +1 -1
- package/docs/cli/workspace.md +2 -3
- package/docs/configuration.md +28 -0
- package/docs/github-actions.md +82 -15
- package/docs/migration/v2.md +5 -3
- package/docs/services/auth.md +5 -0
- package/docs/services/executor.md +2 -0
- package/docs/services/tailordb/migration.md +3 -3
- package/package.json +12 -12
- package/dist/client-CHXix4LD.mjs +0 -1
- package/dist/client-DOQv-BP8.mjs.map +0 -1
- package/dist/register-ts-hook-CXYYYgCl.mjs.map +0 -1
- package/dist/service-DsAWXbVX.mjs +0 -1
- package/dist/validation-errors-DqCeUW4L.mjs +0 -3
- package/dist/validation-errors-DqCeUW4L.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as createExecutorService}from"./service-DB-RHn25.mjs";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./errors-9OOL3xOM.mjs";import*as n from"pathe";import{Code as r,ConnectError as i}from"@connectrpc/connect";const a=/* @__PURE__ */ new WeakMap;function withErrorDiagnostics(e,t){return a.set(e,{...a.get(e),...t}),e}function getErrorDiagnostics(e){return{...e instanceof i?{suggestion:rpcSuggestion(e.code)}:{},...a.get(e)}}function rpcSuggestion(e){switch(e){case r.Unauthenticated:return"Check the active token and profile with `tailor auth status` (include the same --profile option). For an environment token, replace TAILOR_PLATFORM_TOKEN; otherwise use the original browser or --machine-user login method with the same profile. See `tailor login --help`.";case r.PermissionDenied:return"Check the active identity and profile with `tailor auth status` (include the same --profile option), then verify its workspace role and token permissions.";case r.Unavailable:case r.DeadlineExceeded:return`Check network connectivity and platform availability. A write may already have completed; inspect the current resource state before retrying.`;default:return}}function flattenZodIssues(e,t=[]){return e.flatMap(e=>{let n=[...t,...e.path];return e.code===`invalid_union`?flattenUnion(e,n):e.code===`invalid_key`?flattenZodIssues(e.issues,n):[toFlatIssue(e,n)]})}function formatIssueList(e){return e.map(e=>` - ${e.path.join(`.`)||`(root)`}: ${e.message}`).join(`
|
|
2
|
-
`)}function flattenUnion(e,t){let n=e.errors,r=n.map(e=>new Set(e.map(issueKey))),i=(n[0]??[]).filter(e=>r.every(t=>t.has(issueKey(e)))),a=new Set(i.map(issueKey)),o=n.map(e=>{let t=e.filter(e=>!a.has(issueKey(e)));return{own:t,depth:t.length===0?1/0:Math.max(...t.map(e=>e.path.length))}}).toSorted((e,t)=>t.depth-e.depth||e.own.length-t.own.length),[s,c]=o;return s===void 0||s.own.length>0&&c!==void 0&&s.depth===c.depth&&s.own.length===c.own.length?[...flattenZodIssues(i,t),{...toFlatIssue(e,t),message:tiedUnionMessage(e,o)}]:[...flattenZodIssues(i,t),...flattenZodIssues(s.own,t)]}function tiedUnionMessage(e,t){if(e.message!==`Invalid input`)return e.message;let n=/* @__PURE__ */ new Set;for(let r of t.flatMap(e=>e.own)){if(r.path.length>0)return e.message;if(r.code===`invalid_type`)n.add(r.expected);else if(r.code===`invalid_value`)for(let e of r.values)n.add(typeof e==`string`?JSON.stringify(e):String(e));else return e.message}return n.size===0?e.message:`${e.message}: expected ${[...n].join(` | `)}`}function issueKey(e){return JSON.stringify([e.path.map(String),e.code,e.message])}function toFlatIssue(e,t){return{path:t.map(e=>typeof e==`symbol`?String(e):e),message:e.message}}function configInvalidError(e){let{file:n,exportName:r,subject:i,error:a,pathPrefix:o,service:s}=e,c=flattenZodIssues(a.issues,o);return withErrorDiagnostics(t({code:`CONFIG_INVALID`,message:`Invalid ${i} in ${relativeFile(n)}:\n${formatIssueList(c)}`,context:{file:n,exportName:r,...s,issues:c},cause:a}),{location:{file:n}})}const o={resolver:`resolver`,executor:`executor`,"tailordb-type":`TailorDB type`,"http-adapter":`HTTP adapter`,workflow:`workflow`,"workflow-job":`workflow job`};function definitionInvalidError(e){let{kind:n,file:r,exportName:i,error:a}=e,s=flattenZodIssues(a.issues),c=i==="default"?``:` \`${i}\``;return withErrorDiagnostics(t({code:`DEFINITION_INVALID`,message:`Invalid ${o[n]}${c} in ${relativeFile(r)}:\n${formatIssueList(s)}`,context:{kind:n,file:r,exportName:i,issues:s},cause:a}),{location:{file:r}})}function definitionExportError(e){let{kind:n,file:r,exportName:i}=e,a=o[n],s=`${a.charAt(0).toUpperCase()}${a.slice(1)} in ${relativeFile(r)}`,c=i==="default"?{message:`${s} must not be the default export.`,suggestion:`Export it under a name instead.`}:{message:`${s} must not be a named export, but it is exported as \`${i}\`.`,suggestion:`Export it only as the default export.`};return withErrorDiagnostics(t({code:`DEFINITION_EXPORT_INVALID`,...c,context:{kind:n,file:r,exportName:i}}),{location:{file:r}})}function isSyntaxDiagnostic(e){if(typeof e!=`object`||!e||e instanceof Error)return!1;let{code:t,message:n,filename:r,startLine:i}=e;return t===`InvalidSyntax`&&typeof n==`string`&&typeof r==`string`&&(i===void 0||typeof i==`number`)}function syntaxInvalidError(e){if(!isSyntaxDiagnostic(e))return;let{message:n,filename:r,startLine:i}=e,a=i===void 0?{file:r}:{file:r,line:i},o=i===void 0?``:`:${i}`;return withErrorDiagnostics(t({code:`SYNTAX_INVALID`,message:`Invalid syntax in ${relativeFile(r)}${o}: ${n}`,context:a,cause:e}),{location:a})}function invalidDataError(t,n){return e(`Invalid ${t}:\n${formatIssueList(flattenZodIssues(n.issues))}`,{cause:n})}function relativeFile(e){return n.relative(process.cwd(),e)}export{syntaxInvalidError as a,getErrorDiagnostics as c,invalidDataError as i,withErrorDiagnostics as l,definitionExportError as n,flattenZodIssues as o,definitionInvalidError as r,formatIssueList as s,configInvalidError as t};
|
|
3
|
-
//# sourceMappingURL=validation-errors-DqCeUW4L.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation-errors-DqCeUW4L.mjs","names":["internalError","path","diagnostics","error","details","ConnectError","code","Code","issues","prefix","issue","branches","union","branchKeys","branch","shared","keys","sharedKeys","ranked","own","b","a","closest","runnerUp","expected","value","segment","params","pathPrefix","CLIError","subject","file","service","DEFINITION_LABELS","exportLabel","exportName","kind","label","placement","message","filename","startLine","thrown","line","location","lineSuffix"],"sources":["../src/cli/shared/error-diagnostics.ts","../src/cli/shared/zod-issues.ts","../src/cli/shared/validation-errors.ts"],"sourcesContent":["import { Code, ConnectError } from \"@connectrpc/connect\";\nimport type { Jsonifiable } from \"type-fest\";\n\n/** Where a failure originated, for tooling that links to source. */\nexport interface ErrorSourceLocation {\n /** Absolute path to the file the failure points at. */\n file: string;\n /** 1-based line within `file`. */\n line?: number;\n}\n\ninterface ErrorDiagnostics {\n code?: string;\n suggestion?: string;\n context?: Readonly<Record<string, Jsonifiable | undefined>>;\n causes?: Readonly<Record<string, unknown>>;\n location?: ErrorSourceLocation;\n}\n\nconst diagnostics = new WeakMap<Error, ErrorDiagnostics>();\n\n/**\n * Attach output diagnostics without changing the error type used by callers.\n * @param error - Original error\n * @param details - Safe diagnostic fields supplied by the producer\n * @returns Original error\n */\nexport function withErrorDiagnostics<T extends Error>(error: T, details: ErrorDiagnostics): T {\n diagnostics.set(error, { ...diagnostics.get(error), ...details });\n return error;\n}\n\n/**\n * Read producer diagnostics and recovery guidance for a failure.\n * @param error - Failure being rendered\n * @returns Diagnostic fields\n */\nexport function getErrorDiagnostics(error: Error): ErrorDiagnostics {\n return {\n ...(error instanceof ConnectError ? { suggestion: rpcSuggestion(error.code) } : {}),\n ...diagnostics.get(error),\n };\n}\n\nfunction rpcSuggestion(code: Code): string | undefined {\n switch (code) {\n case Code.Unauthenticated:\n return \"Check the active token and profile with `tailor auth status` (include the same --profile option). For an environment token, replace TAILOR_PLATFORM_TOKEN; otherwise use the original browser or --machine-user login method with the same profile. See `tailor login --help`.\";\n case Code.PermissionDenied:\n return \"Check the active identity and profile with `tailor auth status` (include the same --profile option), then verify its workspace role and token permissions.\";\n case Code.Unavailable:\n case Code.DeadlineExceeded:\n return \"Check network connectivity and platform availability. A write may already have completed; inspect the current resource state before retrying.\";\n default:\n return undefined;\n }\n}\n","import type { z } from \"zod\";\n\ntype ZodIssue = z.core.$ZodIssue;\n\nexport type FlatIssue = {\n path: Array<string | number>;\n message: string;\n};\n\n/**\n * Flatten Zod issues into one entry per offending field. A failed union is\n * replaced by the issues of the branch the input came closest to matching,\n * and an invalid record key by the issues of the key schema.\n * @param issues - Issues from a failed parse\n * @param prefix - Path of the parsed value, prepended to every issue path\n * @returns Issues with absolute paths\n */\nexport function flattenZodIssues(\n issues: readonly ZodIssue[],\n prefix: readonly PropertyKey[] = [],\n): FlatIssue[] {\n return issues.flatMap((issue) => {\n const path = [...prefix, ...issue.path];\n if (issue.code === \"invalid_union\") {\n return flattenUnion(issue, path);\n }\n if (issue.code === \"invalid_key\") {\n return flattenZodIssues(issue.issues, path);\n }\n return [toFlatIssue(issue, path)];\n });\n}\n\n/**\n * Render flattened issues as an indented list, one `path: message` line each.\n * @param issues - Issues from `flattenZodIssues`\n * @returns Lines joined by newlines\n */\nexport function formatIssueList(issues: readonly FlatIssue[]): string {\n return issues\n .map((issue) => ` - ${issue.path.join(\".\") || \"(root)\"}: ${issue.message}`)\n .join(\"\\n\");\n}\n\nfunction flattenUnion(\n union: z.core.$ZodIssueInvalidUnion,\n path: readonly PropertyKey[],\n): FlatIssue[] {\n const branches: readonly (readonly ZodIssue[])[] = union.errors;\n const branchKeys = branches.map((branch) => new Set(branch.map(issueKey)));\n const shared = (branches[0] ?? []).filter((issue) =>\n branchKeys.every((keys) => keys.has(issueKey(issue))),\n );\n const sharedKeys = new Set(shared.map(issueKey));\n const ranked = branches\n .map((branch) => {\n const own = branch.filter((issue) => !sharedKeys.has(issueKey(issue)));\n const depth =\n own.length === 0 ? Infinity : Math.max(...own.map((issue) => issue.path.length));\n return { own, depth };\n })\n .toSorted((a, b) => b.depth - a.depth || a.own.length - b.own.length);\n const [closest, runnerUp] = ranked;\n if (\n closest === undefined ||\n (closest.own.length > 0 &&\n runnerUp !== undefined &&\n closest.depth === runnerUp.depth &&\n closest.own.length === runnerUp.own.length)\n ) {\n return [\n ...flattenZodIssues(shared, path),\n { ...toFlatIssue(union, path), message: tiedUnionMessage(union, ranked) },\n ];\n }\n return [...flattenZodIssues(shared, path), ...flattenZodIssues(closest.own, path)];\n}\n\n// zod's own message for a union; any other message was written for the field.\nconst DEFAULT_UNION_MESSAGE = \"Invalid input\";\n\nfunction tiedUnionMessage(\n union: z.core.$ZodIssueInvalidUnion,\n branches: readonly { own: readonly ZodIssue[] }[],\n): string {\n if (union.message !== DEFAULT_UNION_MESSAGE) {\n return union.message;\n }\n const expected = new Set<string>();\n for (const issue of branches.flatMap((branch) => branch.own)) {\n if (issue.path.length > 0) {\n return union.message;\n }\n if (issue.code === \"invalid_type\") {\n expected.add(issue.expected);\n } else if (issue.code === \"invalid_value\") {\n for (const value of issue.values) {\n expected.add(typeof value === \"string\" ? JSON.stringify(value) : String(value));\n }\n } else {\n return union.message;\n }\n }\n return expected.size === 0\n ? union.message\n : `${union.message}: expected ${[...expected].join(\" | \")}`;\n}\n\nfunction issueKey(issue: ZodIssue): string {\n return JSON.stringify([issue.path.map(String), issue.code, issue.message]);\n}\n\nfunction toFlatIssue(issue: ZodIssue, path: readonly PropertyKey[]): FlatIssue {\n return {\n path: path.map((segment) => (typeof segment === \"symbol\" ? String(segment) : segment)),\n message: issue.message,\n };\n}\n","import * as path from \"pathe\";\nimport { withErrorDiagnostics } from \"./error-diagnostics\";\nimport { CLIError, internalError } from \"./errors\";\nimport { flattenZodIssues, formatIssueList, type FlatIssue } from \"./zod-issues\";\nimport type { AppConfig } from \"#/configure/config/types\";\nimport type { SdkBrandKind } from \"#/utils/brand\";\nimport type { z } from \"zod\";\n\ninterface ConfigServiceRef {\n /** `defineConfig` property the service is configured under. */\n configKey: keyof AppConfig;\n /** Service name, or the namespace for TailorDB. */\n name?: string;\n}\n\nexport interface ConfigInvalidErrorParams {\n /** Config file that failed validation. */\n file: string;\n /** Config module export that failed validation. */\n exportName: \"default\" | \"plugins\";\n /** What failed, as it reads after \"Invalid\", such as `Tailor config`. */\n subject: string;\n /** Validation error of the failing value. */\n error: z.ZodError;\n /** Path of the failing value within `exportName`. */\n pathPrefix?: FlatIssue[\"path\"];\n /** The service that failed, when a single service config failed. */\n service?: ConfigServiceRef;\n}\n\n/**\n * Create the error for a config file that failed validation.\n * @param params - Failed config and its validation error\n * @returns CLIError coded `CONFIG_INVALID`, located at the config file\n */\nexport function configInvalidError(params: ConfigInvalidErrorParams): CLIError {\n const { file, exportName, subject, error, pathPrefix, service } = params;\n const issues = flattenZodIssues(error.issues, pathPrefix);\n return withErrorDiagnostics(\n CLIError({\n code: \"CONFIG_INVALID\",\n message: `Invalid ${subject} in ${relativeFile(file)}:\\n${formatIssueList(issues)}`,\n context: { file, exportName, ...service, issues },\n cause: error,\n }),\n { location: { file } },\n );\n}\n\nconst DEFINITION_LABELS = {\n resolver: \"resolver\",\n executor: \"executor\",\n \"tailordb-type\": \"TailorDB type\",\n \"http-adapter\": \"HTTP adapter\",\n workflow: \"workflow\",\n \"workflow-job\": \"workflow job\",\n} as const satisfies Partial<Record<SdkBrandKind, string>>;\n\nexport interface DefinitionErrorParams {\n /** Brand kind of the exported definition. */\n kind: keyof typeof DEFINITION_LABELS;\n /** Absolute path of the file that exports the definition. */\n file: string;\n /** Export the definition was found under. */\n exportName: string;\n}\n\nexport interface DefinitionInvalidErrorParams extends DefinitionErrorParams {\n /** Validation error of the definition. */\n error: z.ZodError;\n}\n\n/**\n * Create the error for an SDK definition that failed validation.\n * @param params - Failed definition and its validation error\n * @returns CLIError coded `DEFINITION_INVALID`, located at the definition file\n */\nexport function definitionInvalidError(params: DefinitionInvalidErrorParams): CLIError {\n const { kind, file, exportName, error } = params;\n const issues = flattenZodIssues(error.issues);\n const exportLabel = exportName === \"default\" ? \"\" : ` \\`${exportName}\\``;\n return withErrorDiagnostics(\n CLIError({\n code: \"DEFINITION_INVALID\",\n message: `Invalid ${DEFINITION_LABELS[kind]}${exportLabel} in ${relativeFile(file)}:\\n${formatIssueList(issues)}`,\n context: { kind, file, exportName, issues },\n cause: error,\n }),\n { location: { file } },\n );\n}\n\n/**\n * Create the error for an SDK definition exported where its loader does not read it.\n * @param params - Misplaced definition\n * @returns CLIError coded `DEFINITION_EXPORT_INVALID`, located at the definition file\n */\nexport function definitionExportError(params: DefinitionErrorParams): CLIError {\n const { kind, file, exportName } = params;\n const label = DEFINITION_LABELS[kind];\n const subject = `${label.charAt(0).toUpperCase()}${label.slice(1)} in ${relativeFile(file)}`;\n const placement =\n exportName === \"default\"\n ? {\n message: `${subject} must not be the default export.`,\n suggestion: \"Export it under a name instead.\",\n }\n : {\n message: `${subject} must not be a named export, but it is exported as \\`${exportName}\\`.`,\n suggestion: \"Export it only as the default export.\",\n };\n return withErrorDiagnostics(\n CLIError({\n code: \"DEFINITION_EXPORT_INVALID\",\n ...placement,\n context: { kind, file, exportName },\n }),\n { location: { file } },\n );\n}\n\n/** Plain object the TypeScript transform throws for source it cannot parse. */\ninterface SyntaxDiagnostic {\n code: \"InvalidSyntax\";\n message: string;\n filename: string;\n startLine?: number;\n}\n\nfunction isSyntaxDiagnostic(value: unknown): value is SyntaxDiagnostic {\n if (typeof value !== \"object\" || value === null || value instanceof Error) return false;\n const { code, message, filename, startLine } = value as Record<string, unknown>;\n return (\n code === \"InvalidSyntax\" &&\n typeof message === \"string\" &&\n typeof filename === \"string\" &&\n (startLine === undefined || typeof startLine === \"number\")\n );\n}\n\n/**\n * Create the error for a user module whose source does not parse.\n * @param thrown - Value thrown while importing the module\n * @returns CLIError coded `SYNTAX_INVALID`, located at the file and line the\n * source failed to parse on, or undefined when `thrown` is another failure\n */\nexport function syntaxInvalidError(thrown: unknown): CLIError | undefined {\n if (!isSyntaxDiagnostic(thrown)) return undefined;\n const { message, filename: file, startLine: line } = thrown;\n const location = line === undefined ? { file } : { file, line };\n const lineSuffix = line === undefined ? \"\" : `:${line}`;\n return withErrorDiagnostics(\n CLIError({\n code: \"SYNTAX_INVALID\",\n message: `Invalid syntax in ${relativeFile(file)}${lineSuffix}: ${message}`,\n context: location,\n cause: thrown,\n }),\n { location },\n );\n}\n\n/**\n * Create the error for SDK- or Platform-produced data that failed validation,\n * which no user action can fix.\n * @param subject - What failed, as it reads after \"Invalid\", such as `workspace context`\n * @param error - Validation error of the data\n * @returns Plain Error, reported as `UNEXPECTED_ERROR`\n */\nexport function invalidDataError(subject: string, error: z.ZodError): Error {\n return internalError(`Invalid ${subject}:\\n${formatIssueList(flattenZodIssues(error.issues))}`, {\n cause: error,\n });\n}\n\nfunction relativeFile(file: string): string {\n return path.relative(process.cwd(), file);\n}\n"],"mappings":"A,iIAmBA,MAAME,kBAAc,IAAI,QAQxB,SAAgB,qBAAsC,EAAU,EAA8B,CAE5F,OADAA,EAAY,IAAIC,EAAO,CAAE,GAAGD,EAAY,IAAIC,CAAK,EAAG,GAAGC,CAAQ,CAAC,EACzDD,CACT,CAOA,SAAgB,oBAAoB,EAAgC,CAClE,MAAO,CACL,GAAIA,aAAiBE,EAAe,CAAE,WAAY,cAAcF,EAAM,IAAI,CAAE,EAAI,CAAC,EACjF,GAAGD,EAAY,IAAIC,CAAK,CAC1B,CACF,CAEA,SAAS,cAAc,EAAgC,CACrD,OAAQG,EAAR,CACE,KAAKC,EAAK,gBACR,MAAO,iRACT,KAAKA,EAAK,iBACR,MAAO,6JACT,KAAKA,EAAK,YACV,KAAKA,EAAK,iBACR,MAAO,gJACT,QACE,MACJ,CACF,CCvCA,SAAgB,iBACd,EACA,EAAiC,CAAC,EACrB,CACb,OAAOC,EAAO,QAAS,GAAU,CAC/B,IAAMP,EAAO,CAAC,GAAGQ,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