polen 0.11.0-next.23 → 0.11.0-next.25

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 (192) hide show
  1. package/build/api/config/input.d.ts +76 -77
  2. package/build/api/config/input.d.ts.map +1 -1
  3. package/build/api/config/normalized.d.ts +136 -143
  4. package/build/api/config/normalized.d.ts.map +1 -1
  5. package/build/api/config-template/template.d.ts +110 -121
  6. package/build/api/config-template/template.d.ts.map +1 -1
  7. package/build/api/examples/diagnostic/diagnostic.d.ts +0 -23
  8. package/build/api/examples/diagnostic/diagnostic.d.ts.map +1 -1
  9. package/build/api/examples/diagnostic/diagnostic.js +1 -3
  10. package/build/api/examples/diagnostic/diagnostic.js.map +1 -1
  11. package/build/api/examples/scanner.d.ts +27 -1
  12. package/build/api/examples/scanner.d.ts.map +1 -1
  13. package/build/api/examples/scanner.js +19 -17
  14. package/build/api/examples/scanner.js.map +1 -1
  15. package/build/api/examples/schemas/catalog.d.ts +20 -12
  16. package/build/api/examples/schemas/catalog.d.ts.map +1 -1
  17. package/build/api/examples/schemas/example/example.d.ts +17 -11
  18. package/build/api/examples/schemas/example/example.d.ts.map +1 -1
  19. package/build/api/schema/augmentations/$$.d.ts +7 -0
  20. package/build/api/schema/augmentations/$$.d.ts.map +1 -0
  21. package/build/api/schema/augmentations/$$.js +7 -0
  22. package/build/api/schema/augmentations/$$.js.map +1 -0
  23. package/build/api/schema/augmentations/$.d.ts +1 -1
  24. package/build/api/schema/augmentations/$.d.ts.map +1 -1
  25. package/build/api/schema/augmentations/$.js +1 -1
  26. package/build/api/schema/augmentations/$.js.map +1 -1
  27. package/build/api/schema/augmentations/apply.d.ts +29 -0
  28. package/build/api/schema/augmentations/apply.d.ts.map +1 -0
  29. package/build/api/schema/augmentations/apply.js +181 -0
  30. package/build/api/schema/augmentations/apply.js.map +1 -0
  31. package/build/api/schema/augmentations/augmentation.d.ts +31 -0
  32. package/build/api/schema/augmentations/augmentation.d.ts.map +1 -0
  33. package/build/api/schema/augmentations/augmentation.js +22 -0
  34. package/build/api/schema/augmentations/augmentation.js.map +1 -0
  35. package/build/api/schema/augmentations/config.d.ts +24 -0
  36. package/build/api/schema/augmentations/config.d.ts.map +1 -0
  37. package/build/api/schema/augmentations/config.js +9 -0
  38. package/build/api/schema/augmentations/config.js.map +1 -0
  39. package/build/api/schema/augmentations/diagnostics/diagnostic.d.ts +67 -0
  40. package/build/api/schema/augmentations/diagnostics/diagnostic.d.ts.map +1 -0
  41. package/build/api/schema/augmentations/diagnostics/diagnostic.js +13 -0
  42. package/build/api/schema/augmentations/diagnostics/diagnostic.js.map +1 -0
  43. package/build/api/schema/augmentations/diagnostics/duplicate-version.d.ts +45 -0
  44. package/build/api/schema/augmentations/diagnostics/duplicate-version.d.ts.map +1 -0
  45. package/build/api/schema/augmentations/diagnostics/duplicate-version.js +17 -0
  46. package/build/api/schema/augmentations/diagnostics/duplicate-version.js.map +1 -0
  47. package/build/api/schema/augmentations/diagnostics/invalid-path.d.ts +46 -0
  48. package/build/api/schema/augmentations/diagnostics/invalid-path.d.ts.map +1 -0
  49. package/build/api/schema/augmentations/diagnostics/invalid-path.js +18 -0
  50. package/build/api/schema/augmentations/diagnostics/invalid-path.js.map +1 -0
  51. package/build/api/schema/augmentations/diagnostics/version-mismatch.d.ts +46 -0
  52. package/build/api/schema/augmentations/diagnostics/version-mismatch.d.ts.map +1 -0
  53. package/build/api/schema/augmentations/diagnostics/version-mismatch.js +18 -0
  54. package/build/api/schema/augmentations/diagnostics/version-mismatch.js.map +1 -0
  55. package/build/api/schema/augmentations/input.d.ts +145 -0
  56. package/build/api/schema/augmentations/input.d.ts.map +1 -0
  57. package/build/api/schema/augmentations/input.js +191 -0
  58. package/build/api/schema/augmentations/input.js.map +1 -0
  59. package/build/api/schema/augmentations/placement.d.ts +8 -0
  60. package/build/api/schema/augmentations/placement.d.ts.map +1 -0
  61. package/build/api/schema/augmentations/placement.js +7 -0
  62. package/build/api/schema/augmentations/placement.js.map +1 -0
  63. package/build/api/schema/config-schema.d.ts +66 -66
  64. package/build/api/schema/config-schema.d.ts.map +1 -1
  65. package/build/api/schema/config-schema.js +2 -2
  66. package/build/api/schema/config-schema.js.map +1 -1
  67. package/build/api/schema/input-source/load.d.ts +2 -0
  68. package/build/api/schema/input-source/load.d.ts.map +1 -1
  69. package/build/api/schema/input-source/load.js.map +1 -1
  70. package/build/api/schema/input-sources/directory.d.ts +39 -39
  71. package/build/api/schema/input-sources/file.d.ts +39 -39
  72. package/build/api/schema/input-sources/introspection-file.d.ts +39 -39
  73. package/build/api/schema/input-sources/introspection.d.ts +39 -39
  74. package/build/api/schema/input-sources/memory.d.ts +39 -39
  75. package/build/api/schema/input-sources/versioned-directory.d.ts +79 -79
  76. package/build/api/schema/load.d.ts.map +1 -1
  77. package/build/api/schema/load.js +9 -2
  78. package/build/api/schema/load.js.map +1 -1
  79. package/build/lib/catalog/catalog.d.ts +1181 -1181
  80. package/build/lib/catalog/unversioned.d.ts +312 -312
  81. package/build/lib/catalog/versioned.d.ts +634 -634
  82. package/build/lib/change/change.d.ts +238 -238
  83. package/build/lib/document/document.d.ts +14 -8
  84. package/build/lib/document/document.d.ts.map +1 -1
  85. package/build/lib/document/versioned.d.ts +17 -10
  86. package/build/lib/document/versioned.d.ts.map +1 -1
  87. package/build/lib/grafaid/schema/KindMap/_.d.ts +1 -1
  88. package/build/lib/graphql-path/$$.d.ts +7 -13
  89. package/build/lib/graphql-path/$$.d.ts.map +1 -1
  90. package/build/lib/graphql-path/$$.js +7 -13
  91. package/build/lib/graphql-path/$$.js.map +1 -1
  92. package/build/lib/graphql-path/definition.d.ts +104 -94
  93. package/build/lib/graphql-path/definition.d.ts.map +1 -1
  94. package/build/lib/graphql-path/definition.js +126 -125
  95. package/build/lib/graphql-path/definition.js.map +1 -1
  96. package/build/lib/graphql-path/query.d.ts +25 -57
  97. package/build/lib/graphql-path/query.d.ts.map +1 -1
  98. package/build/lib/graphql-path/query.js +15 -93
  99. package/build/lib/graphql-path/query.js.map +1 -1
  100. package/build/lib/graphql-path/schema.d.ts +49 -0
  101. package/build/lib/graphql-path/schema.d.ts.map +1 -0
  102. package/build/lib/graphql-path/schema.js +89 -0
  103. package/build/lib/graphql-path/schema.js.map +1 -0
  104. package/build/lib/graphql-path/types.d.ts +76 -28
  105. package/build/lib/graphql-path/types.d.ts.map +1 -1
  106. package/build/lib/graphql-path/types.js +101 -2
  107. package/build/lib/graphql-path/types.js.map +1 -1
  108. package/build/lib/revision/revision.d.ts +1170 -1170
  109. package/build/lib/schema/schema.d.ts +708 -708
  110. package/build/lib/schema/unversioned.d.ts +1092 -1092
  111. package/build/lib/schema/versioned.d.ts +634 -634
  112. package/build/lib/semver/official-release.d.ts +10 -10
  113. package/build/lib/semver/pre-release.d.ts +10 -10
  114. package/build/lib/semver/semver.d.ts +50 -50
  115. package/build/lib/version-coverage/version-coverage.d.ts +43 -11
  116. package/build/lib/version-coverage/version-coverage.d.ts.map +1 -1
  117. package/build/lib/version-coverage/version-coverage.js +40 -6
  118. package/build/lib/version-coverage/version-coverage.js.map +1 -1
  119. package/build/template/hooks/use-examples.d.ts +1 -1
  120. package/build/template/routes/changelog/ChangelogSidebar.d.ts +2 -2
  121. package/build/template/routes/changelog/ChangelogSidebar.d.ts.map +1 -1
  122. package/build/template/routes/changelog/ChangelogSidebar.js +4 -4
  123. package/build/template/routes/changelog/ChangelogSidebar.js.map +1 -1
  124. package/build/template/routes/examples/_.d.ts +3 -3
  125. package/build/template/routes/examples/_index.d.ts +2 -2
  126. package/build/template/routes/examples/name.d.ts +3 -3
  127. package/build/template/routes/pages.d.ts.map +1 -1
  128. package/build/template/routes/pages.js +5 -1
  129. package/build/template/routes/pages.js.map +1 -1
  130. package/build/template/stores/changelog.d.ts +39 -39
  131. package/build/vite/plugins/examples.d.ts.map +1 -1
  132. package/build/vite/plugins/examples.js +0 -2
  133. package/build/vite/plugins/examples.js.map +1 -1
  134. package/build/vite/plugins/schemas.d.ts.map +1 -1
  135. package/build/vite/plugins/schemas.js +38 -2
  136. package/build/vite/plugins/schemas.js.map +1 -1
  137. package/package.json +1 -1
  138. package/src/api/examples/diagnostic/diagnostic.ts +0 -3
  139. package/src/api/examples/scanner.test.ts +83 -0
  140. package/src/api/examples/scanner.ts +17 -21
  141. package/src/api/schema/augmentations/$$.ts +6 -0
  142. package/src/api/schema/augmentations/$.ts +1 -1
  143. package/src/api/schema/augmentations/apply.test.ts +89 -0
  144. package/src/api/schema/augmentations/apply.ts +277 -0
  145. package/src/api/schema/augmentations/augmentation.ts +24 -0
  146. package/src/api/schema/augmentations/config.ts +11 -0
  147. package/src/api/schema/augmentations/diagnostics/diagnostic.ts +20 -0
  148. package/src/api/schema/augmentations/diagnostics/duplicate-version.ts +20 -0
  149. package/src/api/schema/augmentations/diagnostics/invalid-path.ts +21 -0
  150. package/src/api/schema/augmentations/diagnostics/version-mismatch.ts +21 -0
  151. package/src/api/schema/augmentations/input.test.ts +144 -0
  152. package/src/api/schema/augmentations/input.ts +215 -0
  153. package/src/api/schema/augmentations/placement.ts +11 -0
  154. package/src/api/schema/config-schema.ts +2 -2
  155. package/src/api/schema/input-source/load.ts +2 -0
  156. package/src/api/schema/load.ts +19 -2
  157. package/src/lib/graphql-path/$$.ts +7 -13
  158. package/src/lib/graphql-path/$.test.ts +175 -0
  159. package/src/lib/graphql-path/definition.ts +162 -162
  160. package/src/lib/graphql-path/query.ts +15 -98
  161. package/src/lib/graphql-path/schema.ts +136 -0
  162. package/src/lib/graphql-path/types.ts +108 -28
  163. package/src/lib/version-coverage/version-coverage.ts +48 -6
  164. package/src/template/routes/changelog/ChangelogSidebar.tsx +4 -4
  165. package/src/template/routes/pages.tsx +6 -1
  166. package/src/vite/plugins/examples.ts +0 -2
  167. package/src/vite/plugins/schemas.ts +51 -2
  168. package/build/api/examples/diagnostic/unused-default.d.ts +0 -49
  169. package/build/api/examples/diagnostic/unused-default.d.ts.map +0 -1
  170. package/build/api/examples/diagnostic/unused-default.js +0 -19
  171. package/build/api/examples/diagnostic/unused-default.js.map +0 -1
  172. package/build/api/schema/augmentations/augmentations/description.d.ts +0 -26
  173. package/build/api/schema/augmentations/augmentations/description.d.ts.map +0 -1
  174. package/build/api/schema/augmentations/augmentations/description.js +0 -55
  175. package/build/api/schema/augmentations/augmentations/description.js.map +0 -1
  176. package/build/api/schema/augmentations/schema-augmentation.d.ts +0 -20
  177. package/build/api/schema/augmentations/schema-augmentation.d.ts.map +0 -1
  178. package/build/api/schema/augmentations/schema-augmentation.js +0 -22
  179. package/build/api/schema/augmentations/schema-augmentation.js.map +0 -1
  180. package/build/api/schema/augmentations/target.d.ts +0 -25
  181. package/build/api/schema/augmentations/target.d.ts.map +0 -1
  182. package/build/api/schema/augmentations/target.js +0 -39
  183. package/build/api/schema/augmentations/target.js.map +0 -1
  184. package/build/lib/graphql-path/constructors.d.ts +0 -57
  185. package/build/lib/graphql-path/constructors.d.ts.map +0 -1
  186. package/build/lib/graphql-path/constructors.js +0 -73
  187. package/build/lib/graphql-path/constructors.js.map +0 -1
  188. package/src/api/examples/diagnostic/unused-default.ts +0 -22
  189. package/src/api/schema/augmentations/augmentations/description.ts +0 -69
  190. package/src/api/schema/augmentations/schema-augmentation.ts +0 -32
  191. package/src/api/schema/augmentations/target.ts +0 -61
  192. package/src/lib/graphql-path/constructors.ts +0 -81
@@ -0,0 +1,24 @@
1
+ import { S } from '#lib/kit-temp/effect';
2
+ export declare const AugmentationConfig: S.Struct<{
3
+ on: S.Union<[S.transformOrFail<typeof S.String, S.Tuple<[S.TaggedStruct<"TypeSegment", {
4
+ type: typeof S.String;
5
+ }>, S.TaggedStruct<"FieldSegment", {
6
+ field: typeof S.String;
7
+ }>, S.TaggedStruct<"ArgumentSegment", {
8
+ argument: typeof S.String;
9
+ }>]>, never>, S.transformOrFail<typeof S.String, S.Tuple2<S.TaggedStruct<"TypeSegment", {
10
+ type: typeof S.String;
11
+ }>, S.TaggedStruct<"FieldSegment", {
12
+ field: typeof S.String;
13
+ }>>, never>, S.transformOrFail<typeof S.String, S.Tuple<[S.TaggedStruct<"TypeSegment", {
14
+ type: typeof S.String;
15
+ }>]>, never>]>;
16
+ placement: S.Enums<{
17
+ readonly before: "before";
18
+ readonly after: "after";
19
+ readonly over: "over";
20
+ }>;
21
+ content: typeof S.String;
22
+ }>;
23
+ export type AugmentationConfig = S.Schema.Type<typeof AugmentationConfig>;
24
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/api/schema/augmentations/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAExC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;EAI7B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { Placement } from '#api/schema/augmentations/placement';
2
+ import { GraphQLPath } from '#lib/graphql-path';
3
+ import { S } from '#lib/kit-temp/effect';
4
+ export const AugmentationConfig = S.Struct({
5
+ on: GraphQLPath.Definition.DefinitionPath,
6
+ placement: Placement,
7
+ content: S.String,
8
+ });
9
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/api/schema/augmentations/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAExC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,WAAW,CAAC,UAAU,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM;CAClB,CAAC,CAAA"}
@@ -0,0 +1,67 @@
1
+ import { S } from '#lib/kit-temp/effect';
2
+ export * from './duplicate-version.js';
3
+ export * from './invalid-path.js';
4
+ export * from './version-mismatch.js';
5
+ export declare const Diagnostic: S.Union<[S.Struct<{
6
+ _tag: S.tag<"Diagnostic">;
7
+ } & Omit<{
8
+ _tag: S.Literal<["Diagnostic"]>;
9
+ source: typeof S.String;
10
+ name: typeof S.String;
11
+ severity: S.Enums<{
12
+ readonly error: "error";
13
+ readonly warning: "warning";
14
+ readonly info: "info";
15
+ }>;
16
+ message: typeof S.String;
17
+ }, "_tag" | "name" | "source" | "severity"> & {
18
+ name: S.Literal<["invalid-path"]>;
19
+ source: S.Literal<["schema-augmentations"]>;
20
+ severity: S.Literal<["error"]>;
21
+ } & {
22
+ path: typeof S.String;
23
+ version: S.optional<S.Union<[S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof import("../../../../lib/version/integer.js").Integer, typeof import("../../../../lib/version/semver.js").Semver, typeof import("../../../../lib/version/date.js").Date, typeof import("../../../../lib/version/custom.js").Custom]>, never>, typeof S.Null]>>;
24
+ error: typeof S.String;
25
+ }>, S.Struct<{
26
+ _tag: S.tag<"Diagnostic">;
27
+ } & Omit<{
28
+ _tag: S.Literal<["Diagnostic"]>;
29
+ source: typeof S.String;
30
+ name: typeof S.String;
31
+ severity: S.Enums<{
32
+ readonly error: "error";
33
+ readonly warning: "warning";
34
+ readonly info: "info";
35
+ }>;
36
+ message: typeof S.String;
37
+ }, "_tag" | "name" | "source" | "severity"> & {
38
+ name: S.Literal<["version-mismatch"]>;
39
+ source: S.Literal<["schema-augmentations"]>;
40
+ severity: S.Literal<["error"]>;
41
+ } & {
42
+ path: typeof S.String;
43
+ requestedVersion: S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof import("../../../../lib/version/integer.js").Integer, typeof import("../../../../lib/version/semver.js").Semver, typeof import("../../../../lib/version/date.js").Date, typeof import("../../../../lib/version/custom.js").Custom]>, never>;
44
+ availableVersions: S.Array$<typeof S.String>;
45
+ }>, S.Struct<{
46
+ _tag: S.tag<"Diagnostic">;
47
+ } & Omit<{
48
+ _tag: S.Literal<["Diagnostic"]>;
49
+ source: typeof S.String;
50
+ name: typeof S.String;
51
+ severity: S.Enums<{
52
+ readonly error: "error";
53
+ readonly warning: "warning";
54
+ readonly info: "info";
55
+ }>;
56
+ message: typeof S.String;
57
+ }, "_tag" | "name" | "source" | "severity"> & {
58
+ name: S.Literal<["duplicate-version"]>;
59
+ source: S.Literal<["schema-augmentations"]>;
60
+ severity: S.Literal<["error"]>;
61
+ } & {
62
+ version: typeof S.String;
63
+ firstPath: typeof S.String;
64
+ duplicatePath: typeof S.String;
65
+ }>]>;
66
+ export type Diagnostic = S.Schema.Type<typeof Diagnostic>;
67
+ //# sourceMappingURL=diagnostic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/diagnostic.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAGxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AAErC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOrB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { DiagnosticDuplicateVersion } from '#api/schema/augmentations/diagnostics/duplicate-version';
2
+ import { DiagnosticInvalidPath } from '#api/schema/augmentations/diagnostics/invalid-path';
3
+ import { DiagnosticVersionMismatch } from '#api/schema/augmentations/diagnostics/version-mismatch';
4
+ import { S } from '#lib/kit-temp/effect';
5
+ // Re-export all individual diagnostics
6
+ export * from './duplicate-version.js';
7
+ export * from './invalid-path.js';
8
+ export * from './version-mismatch.js';
9
+ export const Diagnostic = S.Union(DiagnosticInvalidPath, DiagnosticVersionMismatch, DiagnosticDuplicateVersion).annotations({
10
+ identifier: 'AugmentationsDiagnostic',
11
+ description: 'All diagnostics that can be generated for schema augmentations',
12
+ });
13
+ //# sourceMappingURL=diagnostic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic.js","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/diagnostic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yDAAyD,CAAA;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAA;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,wDAAwD,CAAA;AAClG,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAExC,uCAAuC;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AAErC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAC/B,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,CAC3B,CAAC,WAAW,CAAC;IACZ,UAAU,EAAE,yBAAyB;IACrC,WAAW,EAAE,gEAAgE;CAC9E,CAAC,CAAA"}
@@ -0,0 +1,45 @@
1
+ import { S } from '#lib/kit-temp/effect';
2
+ export declare const DiagnosticDuplicateVersion: S.Struct<{
3
+ _tag: S.tag<"Diagnostic">;
4
+ } & Omit<{
5
+ _tag: S.Literal<["Diagnostic"]>;
6
+ source: typeof S.String;
7
+ name: typeof S.String;
8
+ severity: S.Enums<{
9
+ readonly error: "error";
10
+ readonly warning: "warning";
11
+ readonly info: "info";
12
+ }>;
13
+ message: typeof S.String;
14
+ }, "_tag" | "name" | "source" | "severity"> & {
15
+ name: S.Literal<["duplicate-version"]>;
16
+ source: S.Literal<["schema-augmentations"]>;
17
+ severity: S.Literal<["error"]>;
18
+ } & {
19
+ version: typeof S.String;
20
+ firstPath: typeof S.String;
21
+ duplicatePath: typeof S.String;
22
+ }>;
23
+ export declare const makeDiagnosticDuplicateVersion: import("#lib/kit-temp/effect").EffectKit.Schema.ConstructorUsingOmitLiteral1Algo<S.Struct<{
24
+ _tag: S.tag<"Diagnostic">;
25
+ } & Omit<{
26
+ _tag: S.Literal<["Diagnostic"]>;
27
+ source: typeof S.String;
28
+ name: typeof S.String;
29
+ severity: S.Enums<{
30
+ readonly error: "error";
31
+ readonly warning: "warning";
32
+ readonly info: "info";
33
+ }>;
34
+ message: typeof S.String;
35
+ }, "_tag" | "name" | "source" | "severity"> & {
36
+ name: S.Literal<["duplicate-version"]>;
37
+ source: S.Literal<["schema-augmentations"]>;
38
+ severity: S.Literal<["error"]>;
39
+ } & {
40
+ version: typeof S.String;
41
+ firstPath: typeof S.String;
42
+ duplicatePath: typeof S.String;
43
+ }>>;
44
+ export type DiagnosticDuplicateVersion = S.Schema.Type<typeof DiagnosticDuplicateVersion>;
45
+ //# sourceMappingURL=duplicate-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate-version.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/duplicate-version.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAExC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;EAYrC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;GAAoD,CAAA;AAE/F,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,0BAA0B,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { Diagnostic } from '#lib/diagnostic/$';
2
+ import { S } from '#lib/kit-temp/effect';
3
+ export const DiagnosticDuplicateVersion = Diagnostic.create({
4
+ source: 'schema-augmentations',
5
+ name: 'duplicate-version',
6
+ severity: 'error',
7
+ context: {
8
+ version: S.String,
9
+ firstPath: S.String,
10
+ duplicatePath: S.String,
11
+ },
12
+ }).annotations({
13
+ identifier: 'DiagnosticDuplicateVersion',
14
+ description: 'Same version is specified multiple times in augmentation configuration',
15
+ });
16
+ export const makeDiagnosticDuplicateVersion = Diagnostic.createMake(DiagnosticDuplicateVersion);
17
+ //# sourceMappingURL=duplicate-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate-version.js","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/duplicate-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAExC,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC,MAAM,CAAC;IAC1D,MAAM,EAAE,sBAAsB;IAC9B,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,SAAS,EAAE,CAAC,CAAC,MAAM;QACnB,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB;CACF,CAAC,CAAC,WAAW,CAAC;IACb,UAAU,EAAE,4BAA4B;IACxC,WAAW,EAAE,wEAAwE;CACtF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { S } from '#lib/kit-temp/effect';
2
+ import { Version } from '#lib/version/$';
3
+ export declare const DiagnosticInvalidPath: S.Struct<{
4
+ _tag: S.tag<"Diagnostic">;
5
+ } & Omit<{
6
+ _tag: S.Literal<["Diagnostic"]>;
7
+ source: typeof S.String;
8
+ name: typeof S.String;
9
+ severity: S.Enums<{
10
+ readonly error: "error";
11
+ readonly warning: "warning";
12
+ readonly info: "info";
13
+ }>;
14
+ message: typeof S.String;
15
+ }, "_tag" | "name" | "source" | "severity"> & {
16
+ name: S.Literal<["invalid-path"]>;
17
+ source: S.Literal<["schema-augmentations"]>;
18
+ severity: S.Literal<["error"]>;
19
+ } & {
20
+ path: typeof S.String;
21
+ version: S.optional<S.Union<[S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>, typeof S.Null]>>;
22
+ error: typeof S.String;
23
+ }>;
24
+ export declare const makeDiagnosticInvalidPath: import("#lib/kit-temp/effect").EffectKit.Schema.ConstructorUsingOmitLiteral1Algo<S.Struct<{
25
+ _tag: S.tag<"Diagnostic">;
26
+ } & Omit<{
27
+ _tag: S.Literal<["Diagnostic"]>;
28
+ source: typeof S.String;
29
+ name: typeof S.String;
30
+ severity: S.Enums<{
31
+ readonly error: "error";
32
+ readonly warning: "warning";
33
+ readonly info: "info";
34
+ }>;
35
+ message: typeof S.String;
36
+ }, "_tag" | "name" | "source" | "severity"> & {
37
+ name: S.Literal<["invalid-path"]>;
38
+ source: S.Literal<["schema-augmentations"]>;
39
+ severity: S.Literal<["error"]>;
40
+ } & {
41
+ path: typeof S.String;
42
+ version: S.optional<S.Union<[S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>, typeof S.Null]>>;
43
+ error: typeof S.String;
44
+ }>>;
45
+ export type DiagnosticInvalidPath = S.Schema.Type<typeof DiagnosticInvalidPath>;
46
+ //# sourceMappingURL=invalid-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-path.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/invalid-path.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;EAYhC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;GAA+C,CAAA;AAErF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { Diagnostic } from '#lib/diagnostic/$';
2
+ import { S } from '#lib/kit-temp/effect';
3
+ import { Version } from '#lib/version/$';
4
+ export const DiagnosticInvalidPath = Diagnostic.create({
5
+ source: 'schema-augmentations',
6
+ name: 'invalid-path',
7
+ severity: 'error',
8
+ context: {
9
+ path: S.String,
10
+ version: S.optional(S.Union(Version.Version, S.Null)),
11
+ error: S.String,
12
+ },
13
+ }).annotations({
14
+ identifier: 'DiagnosticInvalidPath',
15
+ description: 'Augmentation references a non-existent type or field in the schema',
16
+ });
17
+ export const makeDiagnosticInvalidPath = Diagnostic.createMake(DiagnosticInvalidPath);
18
+ //# sourceMappingURL=invalid-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invalid-path.js","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/invalid-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC,MAAM,CAAC;IACrD,MAAM,EAAE,sBAAsB;IAC9B,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE;QACP,IAAI,EAAE,CAAC,CAAC,MAAM;QACd,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACrD,KAAK,EAAE,CAAC,CAAC,MAAM;KAChB;CACF,CAAC,CAAC,WAAW,CAAC;IACb,UAAU,EAAE,uBAAuB;IACnC,WAAW,EAAE,oEAAoE;CAClF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { S } from '#lib/kit-temp/effect';
2
+ import { Version } from '#lib/version/$';
3
+ export declare const DiagnosticVersionMismatch: S.Struct<{
4
+ _tag: S.tag<"Diagnostic">;
5
+ } & Omit<{
6
+ _tag: S.Literal<["Diagnostic"]>;
7
+ source: typeof S.String;
8
+ name: typeof S.String;
9
+ severity: S.Enums<{
10
+ readonly error: "error";
11
+ readonly warning: "warning";
12
+ readonly info: "info";
13
+ }>;
14
+ message: typeof S.String;
15
+ }, "_tag" | "name" | "source" | "severity"> & {
16
+ name: S.Literal<["version-mismatch"]>;
17
+ source: S.Literal<["schema-augmentations"]>;
18
+ severity: S.Literal<["error"]>;
19
+ } & {
20
+ path: typeof S.String;
21
+ requestedVersion: S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>;
22
+ availableVersions: S.Array$<typeof S.String>;
23
+ }>;
24
+ export declare const makeDiagnosticVersionMismatch: import("#lib/kit-temp/effect").EffectKit.Schema.ConstructorUsingOmitLiteral1Algo<S.Struct<{
25
+ _tag: S.tag<"Diagnostic">;
26
+ } & Omit<{
27
+ _tag: S.Literal<["Diagnostic"]>;
28
+ source: typeof S.String;
29
+ name: typeof S.String;
30
+ severity: S.Enums<{
31
+ readonly error: "error";
32
+ readonly warning: "warning";
33
+ readonly info: "info";
34
+ }>;
35
+ message: typeof S.String;
36
+ }, "_tag" | "name" | "source" | "severity"> & {
37
+ name: S.Literal<["version-mismatch"]>;
38
+ source: S.Literal<["schema-augmentations"]>;
39
+ severity: S.Literal<["error"]>;
40
+ } & {
41
+ path: typeof S.String;
42
+ requestedVersion: S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>;
43
+ availableVersions: S.Array$<typeof S.String>;
44
+ }>>;
45
+ export type DiagnosticVersionMismatch = S.Schema.Type<typeof DiagnosticVersionMismatch>;
46
+ //# sourceMappingURL=version-mismatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-mismatch.d.ts","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/version-mismatch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;EAYpC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;GAAmD,CAAA;AAE7F,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { Diagnostic } from '#lib/diagnostic/$';
2
+ import { S } from '#lib/kit-temp/effect';
3
+ import { Version } from '#lib/version/$';
4
+ export const DiagnosticVersionMismatch = Diagnostic.create({
5
+ source: 'schema-augmentations',
6
+ name: 'version-mismatch',
7
+ severity: 'error',
8
+ context: {
9
+ path: S.String,
10
+ requestedVersion: Version.Version,
11
+ availableVersions: S.Array(S.String),
12
+ },
13
+ }).annotations({
14
+ identifier: 'DiagnosticVersionMismatch',
15
+ description: 'Augmentation specifies a version that does not match any schema version',
16
+ });
17
+ export const makeDiagnosticVersionMismatch = Diagnostic.createMake(DiagnosticVersionMismatch);
18
+ //# sourceMappingURL=version-mismatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-mismatch.js","sourceRoot":"","sources":["../../../../../src/api/schema/augmentations/diagnostics/version-mismatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,MAAM,CAAC,MAAM,yBAAyB,GAAG,UAAU,CAAC,MAAM,CAAC;IACzD,MAAM,EAAE,sBAAsB;IAC9B,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE;QACP,IAAI,EAAE,CAAC,CAAC,MAAM;QACd,gBAAgB,EAAE,OAAO,CAAC,OAAO;QACjC,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;KACrC;CACF,CAAC,CAAC,WAAW,CAAC;IACb,UAAU,EAAE,2BAA2B;IACvC,WAAW,EAAE,yEAAyE;CACvF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAA"}
@@ -0,0 +1,145 @@
1
+ import type { Augmentation } from '#api/schema/augmentations/augmentation';
2
+ import { S } from '#lib/kit-temp/effect';
3
+ /**
4
+ * Configuration for augmenting GraphQL schema descriptions.
5
+ *
6
+ * This schema supports two usage patterns:
7
+ *
8
+ * 1. **Unversioned augmentations** - Apply to all schema versions
9
+ * 2. **Version-specific augmentations** - Apply to specific schema versions with optional defaults
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * // Unversioned - applies to all versions
14
+ * {
15
+ * on: 'Pokemon',
16
+ * placement: 'after',
17
+ * content: '**Note:** This type includes battle stats.'
18
+ * }
19
+ *
20
+ * // Version-specific with defaults
21
+ * {
22
+ * on: 'Pokemon', // Default for all versions
23
+ * placement: 'after', // Default for all versions
24
+ * content: 'Base Pokemon info.', // Default content
25
+ * versions: {
26
+ * '2': {
27
+ * content: 'Enhanced Pokemon with battle capabilities.' // Override for v2
28
+ * },
29
+ * '3': {
30
+ * on: 'BattlePokemon', // Different type in v3
31
+ * content: 'Battle-ready Pokemon with full stats.'
32
+ * }
33
+ * }
34
+ * }
35
+ * ```
36
+ *
37
+ * @remarks
38
+ * When using version-specific augmentations:
39
+ * - Top-level fields serve as defaults for all versions
40
+ * - Version-specific fields override defaults
41
+ * - A version entry must have complete configuration (after merging with defaults) to be valid
42
+ * - Invalid paths or missing types will generate build diagnostics rather than crashing
43
+ */
44
+ export declare const AugmentationInput: S.Struct<{
45
+ /**
46
+ * GraphQL path to the type or field to augment.
47
+ *
48
+ * @example
49
+ * - Type path: `'Pokemon'`, `'Query'`, `'User'`
50
+ * - Field path: `'Pokemon.name'`, `'Query.users'`, `'Mutation.createUser'`
51
+ *
52
+ * @remarks
53
+ * If the specified path doesn't exist in the schema, a diagnostic error will be generated
54
+ * during the build process rather than causing a crash.
55
+ */
56
+ on: S.optional<typeof S.String>;
57
+ /**
58
+ * How to apply the augmentation content relative to existing description.
59
+ *
60
+ * - `'over'` - Replace the existing description entirely
61
+ * - `'before'` - Prepend content to the existing description
62
+ * - `'after'` - Append content to the existing description
63
+ *
64
+ * @default 'after'
65
+ */
66
+ placement: S.optional<S.Enums<{
67
+ readonly before: "before";
68
+ readonly after: "after";
69
+ readonly over: "over";
70
+ }>>;
71
+ /**
72
+ * The content to add to the description.
73
+ *
74
+ * Supports full Markdown syntax including:
75
+ * - Bold/italic text
76
+ * - Code blocks and inline code
77
+ * - Links
78
+ * - Lists
79
+ * - Tables
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * content: `
84
+ * **Important:** This field requires authentication.
85
+ *
86
+ * Example query:
87
+ * \`\`\`graphql
88
+ * query {
89
+ * users(limit: 10) {
90
+ * id
91
+ * name
92
+ * }
93
+ * }
94
+ * \`\`\`
95
+ * `
96
+ * ```
97
+ */
98
+ content: S.optional<typeof S.String>;
99
+ /**
100
+ * Version-specific augmentation overrides.
101
+ *
102
+ * Keys are version identifiers (e.g., `'1'`, `'2'`, `'3'`).
103
+ * Values are partial augmentation configs that override top-level defaults.
104
+ *
105
+ * @example
106
+ * ```ts
107
+ * versions: {
108
+ * '1': { content: 'Legacy API - see migration guide.' },
109
+ * '2': { content: 'Current stable API.' },
110
+ * '3': {
111
+ * on: 'NewTypeName', // Type renamed in v3
112
+ * content: 'Beta API - subject to change.'
113
+ * }
114
+ * }
115
+ * ```
116
+ *
117
+ * @remarks
118
+ * - Version keys must be valid numeric strings
119
+ * - Each version inherits top-level defaults
120
+ * - Invalid version identifiers will generate build diagnostics
121
+ * - Duplicate version keys will generate build diagnostics
122
+ */
123
+ versions: S.optional<S.Record$<typeof S.String, S.Struct<{
124
+ on: S.optional<typeof S.String>;
125
+ placement: S.optional<S.Enums<{
126
+ readonly before: "before";
127
+ readonly after: "after";
128
+ readonly over: "over";
129
+ }>>;
130
+ content: S.optional<typeof S.String>;
131
+ }>>>;
132
+ }>;
133
+ export type AugmentationInput = S.Schema.Type<typeof AugmentationInput>;
134
+ /**
135
+ * Transform user-facing input to normalized internal representation.
136
+ *
137
+ * Rules:
138
+ * 1. If no versions field → create single unversioned entry
139
+ * 2. If versions field exists:
140
+ * - Create version-specific entries for each version
141
+ * - If top-level defaults exist, they are used as fallbacks for version entries
142
+ * - If a version entry would be incomplete without defaults, skip it
143
+ */
144
+ export declare const normalizeAugmentationInput: (input: AugmentationInput) => Augmentation | null;
145
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/api/schema/augmentations/input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AAI1E,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAKxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,iBAAiB;IAC5B;;;;;;;;;;OAUG;;IAGH;;;;;;;;OAQG;;;;;;IAGH;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;;IAGH;;;;;;;;;;;;;;;;;;;;;;;OAuBG;;;;;;;;;;EAcH,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEvE;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GAAI,OAAO,iBAAiB,KAAG,YAAY,GAAG,IA2DpF,CAAA"}