@soda-gql/tools 0.13.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 (49) hide show
  1. package/README.md +72 -0
  2. package/codegen.d.ts +2 -0
  3. package/codegen.js +1 -0
  4. package/dist/bin.cjs +15509 -0
  5. package/dist/bin.cjs.map +1 -0
  6. package/dist/bin.d.cts +839 -0
  7. package/dist/bin.d.cts.map +1 -0
  8. package/dist/chunk-BrXtsOCC.cjs +41 -0
  9. package/dist/codegen.cjs +4704 -0
  10. package/dist/codegen.cjs.map +1 -0
  11. package/dist/codegen.d.cts +416 -0
  12. package/dist/codegen.d.cts.map +1 -0
  13. package/dist/codegen.d.mts +416 -0
  14. package/dist/codegen.d.mts.map +1 -0
  15. package/dist/codegen.mjs +4712 -0
  16. package/dist/codegen.mjs.map +1 -0
  17. package/dist/formatter-Glj5a663.cjs +510 -0
  18. package/dist/formatter-Glj5a663.cjs.map +1 -0
  19. package/dist/formatter.cjs +509 -0
  20. package/dist/formatter.cjs.map +1 -0
  21. package/dist/formatter.d.cts +33 -0
  22. package/dist/formatter.d.cts.map +1 -0
  23. package/dist/formatter.d.mts +33 -0
  24. package/dist/formatter.d.mts.map +1 -0
  25. package/dist/formatter.mjs +507 -0
  26. package/dist/formatter.mjs.map +1 -0
  27. package/dist/index.cjs +13 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.cts +11 -0
  30. package/dist/index.d.cts.map +1 -0
  31. package/dist/index.d.mts +11 -0
  32. package/dist/index.d.mts.map +1 -0
  33. package/dist/index.mjs +12 -0
  34. package/dist/index.mjs.map +1 -0
  35. package/dist/typegen.cjs +864 -0
  36. package/dist/typegen.cjs.map +1 -0
  37. package/dist/typegen.d.cts +205 -0
  38. package/dist/typegen.d.cts.map +1 -0
  39. package/dist/typegen.d.mts +205 -0
  40. package/dist/typegen.d.mts.map +1 -0
  41. package/dist/typegen.mjs +859 -0
  42. package/dist/typegen.mjs.map +1 -0
  43. package/formatter.d.ts +2 -0
  44. package/formatter.js +1 -0
  45. package/index.d.ts +2 -0
  46. package/index.js +1 -0
  47. package/package.json +102 -0
  48. package/typegen.d.ts +2 -0
  49. package/typegen.js +1 -0
@@ -0,0 +1,416 @@
1
+ import * as graphql0 from "graphql";
2
+ import { DocumentNode, TypeNode } from "graphql";
3
+ import * as neverthrow0 from "neverthrow";
4
+ import { Result } from "neverthrow";
5
+ import { DirectiveRecord, EnrichedFragment, EnrichedOperation, EnrichedVariable, EnumRecord, GraphqlAnalysisError, GraphqlAnalysisError as GraphqlCompatError, InferredVariable, InputRecord, ObjectRecord, OperationTypeNames, ParseResultBase as ParseResult, ParsedArgument, ParsedFieldSelection, ParsedFragment, ParsedFragmentSpread, ParsedInlineFragment, ParsedObjectField, ParsedOperation, ParsedSelection, ParsedValue, ParsedVariable, ScalarRecord, SchemaIndex as SchemaIndex$1, TransformOptions, TransformResult, TypeInfo, UnionRecord, createSchemaIndex } from "@soda-gql/core";
6
+ import { TypeCategory, TypeFilterConfig } from "@soda-gql/config";
7
+
8
+ //#region packages/tools/src/codegen/graphql-compat/types.d.ts
9
+
10
+ /**
11
+ * Options for running graphql-compat code generation.
12
+ */
13
+ type GraphqlCompatOptions = {
14
+ /** Schema name from config */
15
+ readonly schemaName: string;
16
+ /** Resolved paths to .graphql operation files */
17
+ readonly operationFiles: readonly string[];
18
+ /** Output directory for generated files */
19
+ readonly outputDir?: string;
20
+ /** Import path for graphql-system module (e.g., "@/graphql-system") */
21
+ readonly graphqlSystemPath: string;
22
+ };
23
+ /**
24
+ * Generated file output.
25
+ */
26
+ type GeneratedFile = {
27
+ readonly path: string;
28
+ readonly content: string;
29
+ };
30
+ //#endregion
31
+ //#region packages/tools/src/codegen/graphql-compat/emitter.d.ts
32
+ /**
33
+ * Options for code emission.
34
+ */
35
+ type EmitOptions = {
36
+ /** Schema name to use in gql.schemaName() call */
37
+ readonly schemaName: string;
38
+ /** Import path for graphql-system module */
39
+ readonly graphqlSystemPath: string;
40
+ /** Schema document for type lookups (required for inline fragment support) */
41
+ readonly schemaDocument?: DocumentNode;
42
+ };
43
+ /**
44
+ * Emit TypeScript code for an operation.
45
+ */
46
+ declare const emitOperation: (operation: EnrichedOperation, options: EmitOptions) => Result<string, GraphqlCompatError>;
47
+ /**
48
+ * Emit TypeScript code for a fragment.
49
+ */
50
+ declare const emitFragment: (fragment: EnrichedFragment, options: EmitOptions) => Result<string, GraphqlCompatError>;
51
+ //#endregion
52
+ //#region packages/tools/src/codegen/graphql-compat/parser.d.ts
53
+ /**
54
+ * Parse a single .graphql file and extract operations and fragments.
55
+ */
56
+ declare const parseGraphqlFile: (filePath: string) => Result<ParseResult, GraphqlCompatError>;
57
+ /**
58
+ * Parse GraphQL source string directly.
59
+ */
60
+ declare const parseGraphqlSource: (source: string, sourceFile: string) => Result<ParseResult, GraphqlCompatError>;
61
+ /**
62
+ * Parse a GraphQL TypeNode into type name and modifier.
63
+ *
64
+ * Format: inner nullability + list modifiers
65
+ * - Inner: `!` (non-null) or `?` (nullable)
66
+ * - List: `[]!` (non-null list) or `[]?` (nullable list)
67
+ */
68
+ declare const parseTypeNode: (node: TypeNode) => TypeInfo;
69
+ //#endregion
70
+ //#region packages/tools/src/codegen/defs-generator.d.ts
71
+ /**
72
+ * Definition file generator for split codegen.
73
+ * Generates separate files for each definition category (enums, inputs, objects, unions).
74
+ */
75
+ type DefinitionCategory = "enums" | "inputs" | "objects" | "unions";
76
+ type DefinitionVar = {
77
+ readonly name: string;
78
+ readonly code: string;
79
+ };
80
+ /**
81
+ * Split an array into chunks of the specified size.
82
+ */
83
+ declare const chunkArray: <T>(array: readonly T[], size: number) => T[][];
84
+ /**
85
+ * Determine if chunking is needed based on the number of definitions.
86
+ */
87
+ declare const needsChunking: (vars: readonly DefinitionVar[], chunkSize: number) => boolean;
88
+ type DefinitionFileOptions = {
89
+ readonly category: DefinitionCategory;
90
+ readonly schemaName: string;
91
+ readonly vars: readonly DefinitionVar[];
92
+ readonly needsDefineEnum: boolean;
93
+ };
94
+ /**
95
+ * Generate a single definition file content.
96
+ */
97
+ declare const generateDefinitionFile: (options: DefinitionFileOptions) => string;
98
+ type ChunkFileOptions = {
99
+ readonly category: DefinitionCategory;
100
+ readonly schemaName: string;
101
+ readonly vars: readonly DefinitionVar[];
102
+ readonly chunkIndex: number;
103
+ readonly needsDefineEnum: boolean;
104
+ };
105
+ /**
106
+ * Generate a chunk file content.
107
+ */
108
+ declare const generateChunkFile: (options: ChunkFileOptions) => string;
109
+ type ChunkIndexOptions = {
110
+ readonly category: DefinitionCategory;
111
+ readonly chunkCount: number;
112
+ readonly varNames: readonly string[];
113
+ };
114
+ /**
115
+ * Generate the index file that re-exports all chunks.
116
+ */
117
+ declare const generateChunkIndex: (options: ChunkIndexOptions) => string;
118
+ type ChunkedDefinitionFiles = {
119
+ readonly indexContent: string;
120
+ readonly chunks: ReadonlyArray<{
121
+ readonly chunkIndex: number;
122
+ readonly content: string;
123
+ readonly varNames: readonly string[];
124
+ }>;
125
+ };
126
+ /**
127
+ * Generate chunked definition files.
128
+ */
129
+ declare const generateChunkedDefinitionFiles: (category: DefinitionCategory, schemaName: string, vars: readonly DefinitionVar[], chunkSize: number) => ChunkedDefinitionFiles;
130
+ type DefsDirectoryStructure = {
131
+ readonly files: ReadonlyArray<{
132
+ readonly relativePath: string;
133
+ readonly content: string;
134
+ }>;
135
+ readonly importPaths: Record<DefinitionCategory, string>;
136
+ };
137
+ type CategoryVars = {
138
+ readonly enums: readonly DefinitionVar[];
139
+ readonly inputs: readonly DefinitionVar[];
140
+ readonly objects: readonly DefinitionVar[];
141
+ readonly unions: readonly DefinitionVar[];
142
+ };
143
+ /**
144
+ * Generate the complete _defs directory structure.
145
+ */
146
+ declare const generateDefsStructure: (schemaName: string, categoryVars: CategoryVars, chunkSize: number) => DefsDirectoryStructure;
147
+ //#endregion
148
+ //#region packages/tools/src/codegen/generator.d.ts
149
+ type DefsFile = {
150
+ readonly relativePath: string;
151
+ readonly content: string;
152
+ };
153
+ type GeneratedModule = {
154
+ readonly code: string;
155
+ readonly injectsCode?: string;
156
+ readonly defsFiles?: readonly DefsFile[];
157
+ readonly categoryVars?: Record<string, CategoryVars>;
158
+ readonly stats: {
159
+ readonly objects: number;
160
+ readonly enums: number;
161
+ readonly inputs: number;
162
+ readonly unions: number;
163
+ };
164
+ };
165
+ type PerSchemaInjection = {
166
+ readonly scalarImportPath: string;
167
+ readonly adapterImportPath?: string;
168
+ };
169
+ type RuntimeGenerationOptions = {
170
+ readonly injection?: Map<string, PerSchemaInjection>;
171
+ readonly defaultInputDepth?: Map<string, number>;
172
+ readonly inputDepthOverrides?: Map<string, Readonly<Record<string, number>>>;
173
+ readonly chunkSize?: number;
174
+ readonly typeFilters?: Map<string, TypeFilterConfig>;
175
+ };
176
+ declare const generateMultiSchemaModule: (schemas: Map<string, DocumentNode>, options?: RuntimeGenerationOptions) => GeneratedModule;
177
+ /**
178
+ * Generate a stub `types.prebuilt.ts` file with empty PrebuiltTypes registries.
179
+ * This stub is only written when `types.prebuilt.ts` does not already exist.
180
+ * Typegen will later overwrite it with the real type registry.
181
+ */
182
+ declare const generatePrebuiltStub: (schemaNames: string[]) => string;
183
+ /**
184
+ * Generate the `index.ts` module that re-exports from `_internal`
185
+ * and constructs the `gql` object from individual `__gql_*` exports.
186
+ *
187
+ * The `gql` object preserves the original inferred types from schema inference.
188
+ * PrebuiltContext types will be integrated once the type resolution strategy
189
+ * is redesigned to match the tagged template runtime API.
190
+ */
191
+ declare const generateIndexModule: (schemaNames: string[], allFieldNames?: ReadonlyMap<string, readonly string[]>) => string;
192
+ //#endregion
193
+ //#region packages/tools/src/codegen/graphql-compat/transformer.d.ts
194
+ /**
195
+ * Schema index type extracted from generator.
196
+ */
197
+ type SchemaIndex = ReturnType<typeof createSchemaIndex>;
198
+ /**
199
+ * Check if source modifier can be assigned to target modifier.
200
+ * Implements GraphQL List Coercion: depth difference of 0 or 1 is allowed.
201
+ *
202
+ * Rules:
203
+ * - A single value can be coerced into a list (depth diff = 1)
204
+ * - At each level, non-null can be assigned to nullable (but not vice versa)
205
+ *
206
+ * @param source - The modifier of the value being assigned (variable's type)
207
+ * @param target - The modifier expected by the position (field argument's type)
208
+ * @returns true if assignment is valid
209
+ */
210
+ declare const isModifierAssignable: (source: string, target: string) => boolean;
211
+ /**
212
+ * Merge two modifiers by taking the stricter constraint at each level.
213
+ * - Non-null (!) is stricter than nullable (?)
214
+ * - List depths must match
215
+ *
216
+ * @param a - First modifier
217
+ * @param b - Second modifier
218
+ * @returns Merged modifier or error if incompatible
219
+ */
220
+ declare const mergeModifiers: (a: string, b: string) => {
221
+ ok: true;
222
+ value: string;
223
+ } | {
224
+ ok: false;
225
+ reason: string;
226
+ };
227
+ /**
228
+ * Intermediate type for tracking variable usages before merging.
229
+ */
230
+ type VariableUsage = {
231
+ readonly name: string;
232
+ readonly typeName: string;
233
+ /** The modifier expected by the field/argument position */
234
+ readonly expectedModifier: string;
235
+ /** The minimum modifier the variable needs (after applying List Coercion) */
236
+ readonly minimumModifier: string;
237
+ readonly typeKind: "scalar" | "enum" | "input";
238
+ };
239
+ /**
240
+ * Get the expected type for a field argument from the schema.
241
+ * Returns null if the field or argument is not found.
242
+ */
243
+ declare const getArgumentType: (schema: SchemaIndex, parentTypeName: string, fieldName: string, argumentName: string) => TypeInfo | null;
244
+ /**
245
+ * Get the expected type for an input object field from the schema.
246
+ */
247
+ declare const getInputFieldType: (schema: SchemaIndex, inputTypeName: string, fieldName: string) => TypeInfo | null;
248
+ /**
249
+ * Recursively collect all variable usages from selections.
250
+ */
251
+ declare const collectVariableUsages: (selections: readonly ParsedSelection[], parentTypeName: string, schema: SchemaIndex) => Result<VariableUsage[], GraphqlCompatError>;
252
+ /**
253
+ * Get the return type of a field (unwrapped from modifiers).
254
+ */
255
+ declare const getFieldReturnType: (schema: SchemaIndex, parentTypeName: string, fieldName: string) => string | null;
256
+ /**
257
+ * Merge multiple variable usages into a single InferredVariable.
258
+ * Validates type compatibility and merges modifiers using List Coercion rules.
259
+ *
260
+ * The algorithm:
261
+ * 1. Validate all usages have the same type name
262
+ * 2. Merge minimumModifiers to find the candidate (shallowest type that could work)
263
+ * 3. Verify the candidate can satisfy ALL expected modifiers via isModifierAssignable
264
+ */
265
+ declare const mergeVariableUsages: (variableName: string, usages: readonly VariableUsage[]) => Result<InferredVariable, GraphqlCompatError>;
266
+ /**
267
+ * Infer variables from collected usages.
268
+ * Groups by variable name and merges each group.
269
+ */
270
+ declare const inferVariablesFromUsages: (usages: readonly VariableUsage[]) => Result<InferredVariable[], GraphqlCompatError>;
271
+ /**
272
+ * Topologically sort fragments so dependencies come before dependents.
273
+ * Detects circular dependencies.
274
+ *
275
+ * Note: Uses the existing collectFragmentDependencies function defined below.
276
+ */
277
+ declare const sortFragmentsByDependency: (fragments: readonly ParsedFragment[]) => Result<ParsedFragment[], GraphqlCompatError>;
278
+ /**
279
+ * Transform parsed operations/fragments by enriching them with schema information.
280
+ *
281
+ * This resolves variable type kinds (scalar, enum, input), collects
282
+ * fragment dependencies, and infers variables for fragments.
283
+ */
284
+ declare const transformParsedGraphql: (parsed: ParseResult, options: TransformOptions) => Result<TransformResult, GraphqlCompatError>;
285
+ //#endregion
286
+ //#region packages/tools/src/codegen/types.d.ts
287
+ type CodegenFormat = "json" | "human";
288
+ type CodegenInjectConfig = {
289
+ readonly scalars: string;
290
+ readonly adapter?: string;
291
+ };
292
+ type CodegenSchemaConfig = {
293
+ readonly schema: readonly string[];
294
+ readonly inject: CodegenInjectConfig;
295
+ readonly defaultInputDepth?: number;
296
+ readonly inputDepthOverrides?: Readonly<Record<string, number>>;
297
+ readonly typeFilter?: TypeFilterConfig;
298
+ };
299
+ type CodegenOptions = {
300
+ readonly schemas: Record<string, CodegenSchemaConfig>;
301
+ readonly outPath: string;
302
+ readonly format: CodegenFormat;
303
+ readonly importExtension?: boolean;
304
+ readonly chunkSize?: number;
305
+ /** Pre-loaded schema documents. Skips file loading when provided. */
306
+ readonly preloadedSchemas?: ReadonlyMap<string, graphql0.DocumentNode>;
307
+ };
308
+ type CodegenCliCommand = {
309
+ readonly kind: "generate";
310
+ readonly options: CodegenOptions;
311
+ } | {
312
+ readonly kind: "emitInjectTemplate";
313
+ readonly outPath: string;
314
+ readonly format: CodegenFormat;
315
+ };
316
+ type CodegenError = {
317
+ readonly code: "SCHEMA_NOT_FOUND";
318
+ readonly message: string;
319
+ readonly schemaPath: string;
320
+ } | {
321
+ readonly code: "SCHEMA_INVALID";
322
+ readonly message: string;
323
+ readonly schemaPath: string;
324
+ } | {
325
+ readonly code: "EMIT_FAILED";
326
+ readonly message: string;
327
+ readonly outPath: string;
328
+ } | {
329
+ readonly code: "INJECT_MODULE_REQUIRED";
330
+ readonly message: string;
331
+ } | {
332
+ readonly code: "INJECT_MODULE_NOT_FOUND";
333
+ readonly message: string;
334
+ readonly injectPath: string;
335
+ } | {
336
+ readonly code: "INJECT_TEMPLATE_EXISTS";
337
+ readonly message: string;
338
+ readonly outPath: string;
339
+ } | {
340
+ readonly code: "INJECT_TEMPLATE_FAILED";
341
+ readonly message: string;
342
+ readonly outPath: string;
343
+ } | {
344
+ readonly code: "REMOVE_FAILED";
345
+ readonly message: string;
346
+ readonly outPath: string;
347
+ } | {
348
+ readonly code: "READ_FAILED";
349
+ readonly message: string;
350
+ readonly outPath: string;
351
+ };
352
+ type CodegenSuccess = {
353
+ readonly schemas: Record<string, {
354
+ readonly schemaHash: string;
355
+ readonly objects: number;
356
+ readonly enums: number;
357
+ readonly inputs: number;
358
+ readonly unions: number;
359
+ }>;
360
+ readonly outPath: string;
361
+ readonly internalPath: string;
362
+ readonly injectsPath: string;
363
+ readonly cjsPath: string;
364
+ readonly defsPaths?: readonly string[];
365
+ };
366
+ type CodegenResult = Result<CodegenSuccess, CodegenError>;
367
+ //#endregion
368
+ //#region packages/tools/src/codegen/inject-template.d.ts
369
+ declare const writeInjectTemplate: (outPath: string) => neverthrow0.Err<void, CodegenError> | neverthrow0.Ok<void, CodegenError>;
370
+ declare const getInjectTemplate: () => string;
371
+ //#endregion
372
+ //#region packages/tools/src/codegen/type-filter.d.ts
373
+ type FilterContext = {
374
+ readonly name: string;
375
+ readonly category: TypeCategory;
376
+ };
377
+ type CompiledFilter = (context: FilterContext) => boolean;
378
+ declare const compileTypeFilter: (config: TypeFilterConfig | undefined) => CompiledFilter;
379
+ declare const buildExclusionSet: (filter: CompiledFilter, typeNames: Map<TypeCategory, readonly string[]>) => Set<string>;
380
+ //#endregion
381
+ //#region packages/tools/src/codegen/reachability.d.ts
382
+ type ReachabilityResult = {
383
+ readonly filter: (context: FilterContext) => boolean;
384
+ readonly warnings: readonly string[];
385
+ };
386
+ /**
387
+ * Compute a filter function that includes only types reachable from root types
388
+ * to the specified target types.
389
+ *
390
+ * When targetTypes is empty, returns a pass-all filter (no filtering).
391
+ * Warns when target types are not found in the schema.
392
+ *
393
+ * @param document - The parsed GraphQL schema document
394
+ * @param targetTypes - Set of type names that fragments target (e.g., from ParsedFragment.onType)
395
+ * @returns Filter function and any warnings
396
+ */
397
+ declare const computeReachabilityFilter: (document: DocumentNode, targetTypes: ReadonlySet<string>, usedArgumentTypes?: ReadonlySet<string>) => ReachabilityResult;
398
+ //#endregion
399
+ //#region packages/tools/src/codegen/runner.d.ts
400
+ declare const runCodegen: (options: CodegenOptions) => Promise<CodegenResult>;
401
+ //#endregion
402
+ //#region packages/tools/src/codegen/schema.d.ts
403
+ /**
404
+ * Load a single schema file.
405
+ * @internal Use loadSchema for public API.
406
+ */
407
+ declare const loadSingleSchema: (schemaPath: string) => neverthrow0.Err<DocumentNode, CodegenError> | neverthrow0.Ok<DocumentNode, CodegenError>;
408
+ /**
409
+ * Load and merge multiple schema files into a single DocumentNode.
410
+ * Uses GraphQL's concatAST to combine definitions from all files.
411
+ */
412
+ declare const loadSchema: (schemaPaths: readonly string[]) => neverthrow0.Err<DocumentNode, CodegenError> | neverthrow0.Ok<DocumentNode, CodegenError>;
413
+ declare const hashSchema: (document: DocumentNode) => string;
414
+ //#endregion
415
+ export { type CodegenCliCommand, type CodegenError, type CodegenFormat, type CodegenInjectConfig, type CodegenOptions, type CodegenResult, type CodegenSchemaConfig, type CodegenSuccess, EmitOptions, type EnrichedFragment, type EnrichedOperation, type EnrichedVariable, GeneratedFile, type GraphqlAnalysisError, type GraphqlCompatError, GraphqlCompatOptions, type InferredVariable, type ParseResult, type ParsedArgument, type ParsedFieldSelection, type ParsedFragment, type ParsedFragmentSpread, type ParsedInlineFragment, type ParsedObjectField, type ParsedOperation, type ParsedSelection, type ParsedValue, type ParsedVariable, type TransformOptions, type TransformResult, type TypeInfo, collectVariableUsages, compileTypeFilter, computeReachabilityFilter, emitFragment, emitOperation, getArgumentType, getFieldReturnType, getInputFieldType, hashSchema, inferVariablesFromUsages, isModifierAssignable, loadSchema, mergeModifiers, mergeVariableUsages, parseGraphqlFile, parseGraphqlSource, parseTypeNode, runCodegen, sortFragmentsByDependency, transformParsedGraphql, writeInjectTemplate };
416
+ //# sourceMappingURL=codegen.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.d.cts","names":[],"sources":["../src/codegen/graphql-compat/types.ts","../src/codegen/graphql-compat/emitter.ts","../src/codegen/graphql-compat/parser.ts","../src/codegen/defs-generator.ts","../src/codegen/generator.ts","../src/codegen/graphql-compat/transformer.ts","../src/codegen/types.ts","../src/codegen/inject-template.ts","../src/codegen/type-filter.ts","../src/codegen/reachability.ts","../src/codegen/runner.ts","../src/codegen/schema.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;AC4BY,KDUA,oBAAA,GCJgB;EAgCf;EAA4B,SAAA,UAAA,EAAA,MAAA;EAA4B;EAA6B,SAAA,cAAA,EAAA,SAAA,MAAA,EAAA;EAAf;EAAM,SAAA,SAAA,CAAA,EAAA,MAAA;EAsC5E;EAA0B,SAAA,iBAAA,EAAA,MAAA;CAA2B;;;;KDpDtD,aAAA;;;AETZ,CAAA;;;;AFLA;AAcA;KCxBY,WAAA;;;EAAA;EAsCC,S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