@distilled.cloud/core 1.0.0-rc.17 → 1.0.0-rc.19

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 (314) hide show
  1. package/lib/_bundle/base.js +2 -2
  2. package/lib/_bundle/base.js.map +1 -1
  3. package/lib/_bundle/graphql.js +2 -2
  4. package/lib/_bundle/graphql.js.map +1 -1
  5. package/lib/_bundle/grpc.js +2 -0
  6. package/lib/_bundle/grpc.js.map +1 -0
  7. package/lib/_bundle/rest.js +1 -1
  8. package/lib/_bundle/rest.js.map +1 -1
  9. package/lib/_bundle/xml.js +1 -1
  10. package/lib/_bundle/xml.js.map +1 -1
  11. package/lib/annotations.d.ts +17 -0
  12. package/lib/annotations.d.ts.map +1 -0
  13. package/lib/annotations.js +2 -0
  14. package/lib/annotations.js.map +1 -0
  15. package/lib/api.d.ts +52 -1
  16. package/lib/api.d.ts.map +1 -1
  17. package/lib/api.js +1 -1
  18. package/lib/category.d.ts.map +1 -1
  19. package/lib/config.d.ts +54 -13
  20. package/lib/config.d.ts.map +1 -1
  21. package/lib/config.js +1 -1
  22. package/lib/error-category.d.ts.map +1 -1
  23. package/lib/errors.d.ts +3 -13
  24. package/lib/errors.d.ts.map +1 -1
  25. package/lib/errors.js +1 -1
  26. package/lib/graphql.d.ts +26 -5
  27. package/lib/graphql.d.ts.map +1 -1
  28. package/lib/graphql.types.d.ts.map +1 -1
  29. package/lib/grpc-transport-cloudflare-http2.d.ts +7 -0
  30. package/lib/grpc-transport-cloudflare-http2.d.ts.map +1 -0
  31. package/lib/grpc-transport-cloudflare-http2.js +6 -0
  32. package/lib/grpc-transport-cloudflare-http2.js.map +1 -0
  33. package/lib/grpc-transport-cloudflare-sockets.d.ts +7 -0
  34. package/lib/grpc-transport-cloudflare-sockets.d.ts.map +1 -0
  35. package/lib/grpc-transport-cloudflare-sockets.js +5 -0
  36. package/lib/grpc-transport-cloudflare-sockets.js.map +1 -0
  37. package/lib/grpc-transport-node-http2.d.ts +19 -0
  38. package/lib/grpc-transport-node-http2.d.ts.map +1 -0
  39. package/lib/grpc-transport-node-http2.js +2 -0
  40. package/lib/grpc-transport-node-http2.js.map +1 -0
  41. package/lib/grpc-transport.d.ts +76 -0
  42. package/lib/grpc-transport.d.ts.map +1 -0
  43. package/lib/grpc-transport.js +1 -0
  44. package/lib/hpack.d.ts +34 -0
  45. package/lib/hpack.d.ts.map +1 -0
  46. package/lib/hpack.js +2 -0
  47. package/lib/hpack.js.map +1 -0
  48. package/lib/index.d.ts +6 -2
  49. package/lib/index.d.ts.map +1 -1
  50. package/lib/index.js +4 -0
  51. package/lib/pagination.d.ts +55 -3
  52. package/lib/pagination.d.ts.map +1 -1
  53. package/lib/pagination.js +1 -1
  54. package/lib/protobuf.d.ts +92 -0
  55. package/lib/protobuf.d.ts.map +1 -0
  56. package/lib/protobuf.js +1 -0
  57. package/lib/protocol-grpc.d.ts +86 -0
  58. package/lib/protocol-grpc.d.ts.map +1 -0
  59. package/lib/protocol-grpc.js +1 -0
  60. package/lib/protocol-http.d.ts +38 -9
  61. package/lib/protocol-http.d.ts.map +1 -1
  62. package/lib/protocol-http.js +1 -1
  63. package/lib/protocol-rest.d.ts +60 -42
  64. package/lib/protocol-rest.d.ts.map +1 -1
  65. package/lib/protocol-rest.js +1 -1
  66. package/lib/response-validation.d.ts +5 -4
  67. package/lib/response-validation.d.ts.map +1 -1
  68. package/lib/schema-lite-typed.js +1 -2
  69. package/lib/sdk-error.d.ts +27 -0
  70. package/lib/sdk-error.d.ts.map +1 -0
  71. package/lib/sdk-error.js +1 -0
  72. package/lib/sensitive.d.ts +28 -0
  73. package/lib/sensitive.d.ts.map +1 -0
  74. package/lib/sensitive.js +2 -0
  75. package/lib/sensitive.js.map +1 -0
  76. package/lib/telemetry-debug.d.ts +6 -0
  77. package/lib/telemetry-debug.d.ts.map +1 -0
  78. package/lib/telemetry-debug.js +2 -0
  79. package/lib/telemetry-debug.js.map +1 -0
  80. package/lib/telemetry-hooks.d.ts +32 -0
  81. package/lib/telemetry-hooks.d.ts.map +1 -0
  82. package/lib/telemetry-hooks.js +2 -0
  83. package/lib/telemetry-hooks.js.map +1 -0
  84. package/lib/telemetry-host-rules.d.ts +23 -0
  85. package/lib/telemetry-host-rules.d.ts.map +1 -0
  86. package/lib/telemetry-host-rules.js +2 -0
  87. package/lib/telemetry-host-rules.js.map +1 -0
  88. package/lib/telemetry-lambda-context.d.ts +17 -0
  89. package/lib/telemetry-lambda-context.d.ts.map +1 -0
  90. package/lib/telemetry-lambda-context.js +2 -0
  91. package/lib/telemetry-lambda-context.js.map +1 -0
  92. package/lib/telemetry-message-context.d.ts +52 -0
  93. package/lib/telemetry-message-context.d.ts.map +1 -0
  94. package/lib/telemetry-message-context.js +2 -0
  95. package/lib/telemetry-message-context.js.map +1 -0
  96. package/lib/telemetry-metrics.d.ts +6 -0
  97. package/lib/telemetry-metrics.d.ts.map +1 -0
  98. package/lib/telemetry-metrics.js +2 -0
  99. package/lib/telemetry-metrics.js.map +1 -0
  100. package/lib/telemetry-name-template.d.ts +13 -0
  101. package/lib/telemetry-name-template.d.ts.map +1 -0
  102. package/lib/telemetry-name-template.js +2 -0
  103. package/lib/telemetry-name-template.js.map +1 -0
  104. package/lib/telemetry-stream.d.ts +11 -0
  105. package/lib/telemetry-stream.d.ts.map +1 -0
  106. package/lib/telemetry-stream.js +2 -0
  107. package/lib/telemetry-stream.js.map +1 -0
  108. package/lib/telemetry-xray.d.ts +28 -0
  109. package/lib/telemetry-xray.d.ts.map +1 -0
  110. package/lib/telemetry-xray.js +2 -0
  111. package/lib/telemetry-xray.js.map +1 -0
  112. package/lib/telemetry.d.ts +288 -0
  113. package/lib/telemetry.d.ts.map +1 -0
  114. package/lib/telemetry.js +3 -0
  115. package/lib/telemetry.js.map +1 -0
  116. package/lib/trait.d.ts +7 -0
  117. package/lib/trait.d.ts.map +1 -1
  118. package/lib/trait.js +1 -1
  119. package/lib/xml.d.ts.map +1 -1
  120. package/package.json +3 -5
  121. package/src/annotations.ts +53 -0
  122. package/src/api.ts +316 -43
  123. package/src/category.ts +21 -22
  124. package/src/config.ts +58 -29
  125. package/src/error-category.ts +12 -14
  126. package/src/errors.ts +11 -7
  127. package/src/graphql.ts +191 -63
  128. package/src/graphql.types.ts +5 -1
  129. package/src/grpc-transport-cloudflare-http2.ts +494 -0
  130. package/src/grpc-transport-cloudflare-sockets.ts +299 -0
  131. package/src/grpc-transport-node-http2.ts +234 -0
  132. package/src/grpc-transport.ts +118 -0
  133. package/src/hpack.ts +331 -0
  134. package/src/index.ts +6 -2
  135. package/src/pagination.ts +193 -8
  136. package/src/protobuf.ts +1332 -0
  137. package/src/protocol-grpc.ts +641 -0
  138. package/src/protocol-http.ts +87 -67
  139. package/src/protocol-rest.ts +183 -191
  140. package/src/response-validation.ts +8 -5
  141. package/src/sdk-error.ts +33 -0
  142. package/src/sensitive.ts +154 -0
  143. package/src/telemetry-debug.ts +179 -0
  144. package/src/telemetry-hooks.ts +33 -0
  145. package/src/telemetry-host-rules.ts +39 -0
  146. package/src/telemetry-lambda-context.ts +46 -0
  147. package/src/telemetry-message-context.ts +170 -0
  148. package/src/telemetry-metrics.ts +69 -0
  149. package/src/telemetry-name-template.ts +26 -0
  150. package/src/telemetry-stream.ts +100 -0
  151. package/src/telemetry-xray.ts +66 -0
  152. package/src/telemetry.ts +832 -0
  153. package/src/trait.ts +10 -0
  154. package/src/xml.ts +10 -1
  155. package/lib/codegen/boolean-string-enums.d.ts +0 -36
  156. package/lib/codegen/boolean-string-enums.d.ts.map +0 -1
  157. package/lib/codegen/boolean-string-enums.js +0 -147
  158. package/lib/codegen/boolean-string-enums.js.map +0 -1
  159. package/lib/codegen/chunk.d.ts +0 -7
  160. package/lib/codegen/chunk.d.ts.map +0 -1
  161. package/lib/codegen/chunk.js +0 -139
  162. package/lib/codegen/chunk.js.map +0 -1
  163. package/lib/codegen/cli.d.ts +0 -80
  164. package/lib/codegen/cli.d.ts.map +0 -1
  165. package/lib/codegen/cli.js +0 -166
  166. package/lib/codegen/cli.js.map +0 -1
  167. package/lib/codegen/datafy.d.ts +0 -14
  168. package/lib/codegen/datafy.d.ts.map +0 -1
  169. package/lib/codegen/datafy.js +0 -853
  170. package/lib/codegen/datafy.js.map +0 -1
  171. package/lib/codegen/dedupe.d.ts +0 -5
  172. package/lib/codegen/dedupe.d.ts.map +0 -1
  173. package/lib/codegen/dedupe.js +0 -153
  174. package/lib/codegen/dedupe.js.map +0 -1
  175. package/lib/codegen/emit.d.ts +0 -125
  176. package/lib/codegen/emit.d.ts.map +0 -1
  177. package/lib/codegen/emit.js +0 -99
  178. package/lib/codegen/emit.js.map +0 -1
  179. package/lib/codegen/format.d.ts +0 -11
  180. package/lib/codegen/format.d.ts.map +0 -1
  181. package/lib/codegen/format.js +0 -32
  182. package/lib/codegen/format.js.map +0 -1
  183. package/lib/codegen/generated-at.d.ts +0 -29
  184. package/lib/codegen/generated-at.d.ts.map +0 -1
  185. package/lib/codegen/generated-at.js +0 -78
  186. package/lib/codegen/generated-at.js.map +0 -1
  187. package/lib/codegen/generator.d.ts +0 -353
  188. package/lib/codegen/generator.d.ts.map +0 -1
  189. package/lib/codegen/generator.js +0 -810
  190. package/lib/codegen/generator.js.map +0 -1
  191. package/lib/codegen/graph.d.ts +0 -36
  192. package/lib/codegen/graph.d.ts.map +0 -1
  193. package/lib/codegen/graph.js +0 -136
  194. package/lib/codegen/graph.js.map +0 -1
  195. package/lib/codegen/graphql-client.d.ts +0 -70
  196. package/lib/codegen/graphql-client.d.ts.map +0 -1
  197. package/lib/codegen/graphql-client.js +0 -439
  198. package/lib/codegen/graphql-client.js.map +0 -1
  199. package/lib/codegen/graphql.d.ts +0 -207
  200. package/lib/codegen/graphql.d.ts.map +0 -1
  201. package/lib/codegen/graphql.js +0 -786
  202. package/lib/codegen/graphql.js.map +0 -1
  203. package/lib/codegen/latin1.d.ts +0 -3
  204. package/lib/codegen/latin1.d.ts.map +0 -1
  205. package/lib/codegen/latin1.js +0 -126
  206. package/lib/codegen/latin1.js.map +0 -1
  207. package/lib/codegen/members.d.ts +0 -32
  208. package/lib/codegen/members.d.ts.map +0 -1
  209. package/lib/codegen/members.js +0 -62
  210. package/lib/codegen/members.js.map +0 -1
  211. package/lib/codegen/model-diff.d.ts +0 -10
  212. package/lib/codegen/model-diff.d.ts.map +0 -1
  213. package/lib/codegen/model-diff.js +0 -67
  214. package/lib/codegen/model-diff.js.map +0 -1
  215. package/lib/codegen/naming.d.ts +0 -29
  216. package/lib/codegen/naming.d.ts.map +0 -1
  217. package/lib/codegen/naming.js +0 -74
  218. package/lib/codegen/naming.js.map +0 -1
  219. package/lib/codegen/openapi-cli.d.ts +0 -52
  220. package/lib/codegen/openapi-cli.d.ts.map +0 -1
  221. package/lib/codegen/openapi-cli.js +0 -84
  222. package/lib/codegen/openapi-cli.js.map +0 -1
  223. package/lib/codegen/openapi.d.ts +0 -209
  224. package/lib/codegen/openapi.d.ts.map +0 -1
  225. package/lib/codegen/openapi.js +0 -1548
  226. package/lib/codegen/openapi.js.map +0 -1
  227. package/lib/codegen/operations.d.ts +0 -24
  228. package/lib/codegen/operations.d.ts.map +0 -1
  229. package/lib/codegen/operations.js +0 -56
  230. package/lib/codegen/operations.js.map +0 -1
  231. package/lib/codegen/pagination.d.ts +0 -39
  232. package/lib/codegen/pagination.d.ts.map +0 -1
  233. package/lib/codegen/pagination.js +0 -31
  234. package/lib/codegen/pagination.js.map +0 -1
  235. package/lib/codegen/patch-audit.d.ts +0 -84
  236. package/lib/codegen/patch-audit.d.ts.map +0 -1
  237. package/lib/codegen/patch-audit.js +0 -366
  238. package/lib/codegen/patch-audit.js.map +0 -1
  239. package/lib/codegen/patches.d.ts +0 -129
  240. package/lib/codegen/patches.d.ts.map +0 -1
  241. package/lib/codegen/patches.js +0 -472
  242. package/lib/codegen/patches.js.map +0 -1
  243. package/lib/codegen/prelude.d.ts +0 -15
  244. package/lib/codegen/prelude.d.ts.map +0 -1
  245. package/lib/codegen/prelude.js +0 -60
  246. package/lib/codegen/prelude.js.map +0 -1
  247. package/lib/codegen/privatize.d.ts +0 -21
  248. package/lib/codegen/privatize.d.ts.map +0 -1
  249. package/lib/codegen/privatize.js +0 -176
  250. package/lib/codegen/privatize.js.map +0 -1
  251. package/lib/codegen/proto.d.ts +0 -121
  252. package/lib/codegen/proto.d.ts.map +0 -1
  253. package/lib/codegen/proto.js +0 -960
  254. package/lib/codegen/proto.js.map +0 -1
  255. package/lib/codegen/pure.d.ts +0 -6
  256. package/lib/codegen/pure.d.ts.map +0 -1
  257. package/lib/codegen/pure.js +0 -91
  258. package/lib/codegen/pure.js.map +0 -1
  259. package/lib/codegen/rewrite-operation-ids.d.ts +0 -154
  260. package/lib/codegen/rewrite-operation-ids.d.ts.map +0 -1
  261. package/lib/codegen/rewrite-operation-ids.js +0 -1117
  262. package/lib/codegen/rewrite-operation-ids.js.map +0 -1
  263. package/lib/codegen/spec-path.d.ts +0 -16
  264. package/lib/codegen/spec-path.d.ts.map +0 -1
  265. package/lib/codegen/spec-path.js +0 -101
  266. package/lib/codegen/spec-path.js.map +0 -1
  267. package/lib/codegen/table.d.ts +0 -5
  268. package/lib/codegen/table.d.ts.map +0 -1
  269. package/lib/codegen/table.js +0 -249
  270. package/lib/codegen/table.js.map +0 -1
  271. package/lib/debug.d.ts +0 -2
  272. package/lib/debug.d.ts.map +0 -1
  273. package/lib/debug.js +0 -1
  274. package/lib/json-patch.d.ts +0 -58
  275. package/lib/json-patch.d.ts.map +0 -1
  276. package/lib/json-patch.js +0 -2
  277. package/lib/json-patch.js.map +0 -1
  278. package/lib/schema-lite-typed.js.map +0 -1
  279. package/lib/testing.d.ts +0 -40
  280. package/lib/testing.d.ts.map +0 -1
  281. package/lib/testing.js +0 -2
  282. package/lib/testing.js.map +0 -1
  283. package/src/codegen/boolean-string-enums.ts +0 -155
  284. package/src/codegen/chunk.ts +0 -147
  285. package/src/codegen/cli.ts +0 -293
  286. package/src/codegen/datafy.ts +0 -874
  287. package/src/codegen/dedupe.ts +0 -173
  288. package/src/codegen/emit.ts +0 -200
  289. package/src/codegen/format.ts +0 -49
  290. package/src/codegen/generated-at.ts +0 -88
  291. package/src/codegen/generator.ts +0 -1229
  292. package/src/codegen/graph.ts +0 -151
  293. package/src/codegen/graphql-client.ts +0 -545
  294. package/src/codegen/graphql.ts +0 -1145
  295. package/src/codegen/latin1.ts +0 -131
  296. package/src/codegen/members.ts +0 -79
  297. package/src/codegen/model-diff.ts +0 -67
  298. package/src/codegen/naming.ts +0 -85
  299. package/src/codegen/openapi-cli.ts +0 -141
  300. package/src/codegen/openapi.ts +0 -1845
  301. package/src/codegen/operations.ts +0 -73
  302. package/src/codegen/pagination.ts +0 -64
  303. package/src/codegen/patch-audit.ts +0 -480
  304. package/src/codegen/patches.ts +0 -581
  305. package/src/codegen/prelude.ts +0 -70
  306. package/src/codegen/privatize.ts +0 -200
  307. package/src/codegen/proto.ts +0 -1092
  308. package/src/codegen/pure.ts +0 -94
  309. package/src/codegen/rewrite-operation-ids.ts +0 -1219
  310. package/src/codegen/spec-path.ts +0 -112
  311. package/src/codegen/table.ts +0 -254
  312. package/src/debug.ts +0 -8
  313. package/src/json-patch.ts +0 -273
  314. package/src/testing.ts +0 -74
@@ -1,78 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
- import { execFileSync } from "node:child_process";
14
- import { existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
15
- import { join } from "node:path";
16
- import { isLocalSpecs } from "./spec-path.js";
17
-
18
- export const generatedAtDate = (now = new Date()) => now.toISOString().slice(0, 10);
19
- const git = (cwd, ...args) => execFileSync("git", args, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();
20
-
21
- const shallowCommits = (cwd) => {
22
- const file = git(cwd, "rev-parse", "--path-format=absolute", "--git-path", "shallow");
23
- return new Set(existsSync(file) ? readFileSync(file, "utf8").split("\n").filter(Boolean) : []);
24
- };
25
-
26
-
27
-
28
-
29
-
30
-
31
- export const lastChangeDate = (cwd, pathspec) => {
32
- for (let round = 0; round < 20; round++) {
33
- const [sha, date] = git(cwd, "log", "-1", "--format=%H %cI", "HEAD", "--", pathspec).split(" ");
34
- if (!sha)
35
- throw new Error(`no commit in ${cwd} touches ${pathspec}`);
36
- if (!shallowCommits(cwd).has(sha))
37
- return generatedAtDate(new Date(date));
38
- git(cwd, "fetch", "--quiet", "--deepen=50", "--filter=blob:none", "origin");
39
- }
40
- throw new Error(`gave up deepening ${cwd} to find the last change to ${pathspec}`);
41
- };
42
-
43
-
44
-
45
-
46
-
47
- export const specUpdatedAt = (root) => {
48
- const specs = join(root, "specs");
49
- if (isLocalSpecs() || !existsSync(specs))
50
- return undefined;
51
- const mirror = readdirSync(specs).find((d) => d.startsWith("spec-mirror-"));
52
- if (mirror === undefined)
53
- return lastChangeDate(root, "specs");
54
- const dir = join(specs, mirror);
55
- // An uninitialised submodule is an empty directory with no `.git`.
56
- return existsSync(join(dir, ".git")) ? lastChangeDate(dir, "specs") : undefined;
57
- };
58
-
59
-
60
-
61
-
62
- export const stampGeneratedAt = (root, options = {}) => {
63
- const generatedAt = generatedAtDate(options.now);
64
- const spec = "specUpdatedAt" in options ? options.specUpdatedAt : specUpdatedAt(root);
65
- const file = join(root, "package.json");
66
- const text = readFileSync(file, "utf8");
67
- const pkg = JSON.parse(text);
68
- pkg.distilled = {
69
- ...pkg.distilled,
70
- generatedAt,
71
- ...(spec === undefined ? {} : { specUpdatedAt: spec }),
72
- };
73
- const next = `${JSON.stringify(pkg, null, 2)}\n`;
74
- if (next !== text)
75
- writeFileSync(file, next);
76
- return { generatedAt, specUpdatedAt: spec };
77
- };
78
- //# sourceMappingURL=generated-at.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generated-at.js","sourceRoot":"","sources":["../../src/codegen/generated-at.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAo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OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAClF,CAAC,CAAC;AAQF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAY,EACZ,OAAO,GAAyE,EAAE,EAChE,EAAE;IACpB,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,eAAe,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACtF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,GAAG,CAAC,SAAS,GAAG;QACd,GAAG,GAAG,CAAC,SAAS;QAChB,WAAW;QACX,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;KACvD,CAAC;IACF,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;IACjD,IAAI,IAAI,KAAK,IAAI;QAAE,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;AAC9C,CAAC,CAAC"}
@@ -1,353 +0,0 @@
1
- import { errorUnionAlias, operationConst } from "./emit.ts";
2
- import { type ShapeMap } from "./graph.ts";
3
- /**
4
- * The generic smithy→SDK service generator (dev-time only).
5
- *
6
- * One driver compiles a Smithy JSON model into an Effect SDK service module.
7
- * Everything provider-specific arrives through {@link SdkSpec}: import
8
- * header, trait vocabulary (which trait ids mean payload/file/nullable/…),
9
- * the `T.*` pipe expressions to emit for each binding, how operations are
10
- * declared (protocol/retry/error names), and naming policies. The driver
11
- * owns the pipeline: operation discovery, reachability, topological order,
12
- * schema/interface emission, error classes, pagination validation, and
13
- * operation consts.
14
- *
15
- * A provider's `scripts/generate.ts` reduces to: load models (its own
16
- * pipeline — docs-derived specs, patches, …), define its {@link SdkSpec},
17
- * call {@link generateService} per model, write files.
18
- */
19
- import { local, q, tsKey, upperFirst } from "./naming.ts";
20
- import { type OpEntry } from "./operations.ts";
21
- /**
22
- * Error categories, derived from the STANDARD Smithy error traits.
23
- *
24
- * `smithy.api#httpError` and `smithy.api#retryable` are how every Smithy
25
- * model — AWS's included — says what kind of failure an error is. The
26
- * categories the runtime acts on (`core/category.ts`, and `isTransientError`
27
- * in `core/retry.ts`) are a reading of those two traits, so the reading
28
- * belongs here, once, for every provider.
29
- *
30
- * A model that wants its errors classified states the status the API
31
- * actually returns:
32
- *
33
- * "traits": { "smithy.api#error": "client", "smithy.api#httpError": 404 }
34
- *
35
- * and the error class is emitted with `.pipe(C.withNotFoundError)`. A model
36
- * with no `httpError` gets no categories — the same as today.
37
- */
38
- export declare const errorCategories: (traits: Record<string, any> | undefined,
39
- /** Categories a provider knows that the traits don't say (AWS's spec file). */
40
- extra?: readonly string[]) => string[];
41
- /** A member's resolved binding. The four generic kinds plus provider extras. */
42
- export type MemberBinding = "label" | "query" | "header" | "body" | (string & {});
43
- export interface EmittedMember {
44
- readonly name: string;
45
- readonly tsName: string;
46
- readonly wire: string;
47
- readonly target: string;
48
- readonly binding: MemberBinding;
49
- readonly required: boolean;
50
- readonly nullable: boolean;
51
- readonly doc: string | undefined;
52
- readonly traits: Record<string, any>;
53
- }
54
- export interface PaginationProfile {
55
- /** Protocol const for paginated ops. Defaults to operationDecl.protocol. */
56
- readonly protocol?: string;
57
- /** Strategy expression passed as makePaginated's second argument. */
58
- readonly strategy?: string;
59
- /** Items path fallback when the trait omits `items`. */
60
- readonly itemsFallback: string;
61
- /** Output names accepted even when not modeled (delivered by the protocol). */
62
- readonly syntheticOutputs?: readonly string[];
63
- /**
64
- * Extra interface field + struct member appended to paginated outputs
65
- * that don't already model them (what the protocol delivers beyond the
66
- * modeled shape — e.g. cloudflare's `resultInfo` from the envelope's
67
- * `result_info`). `imports` are pulled from the pagination module in the
68
- * header.
69
- */
70
- readonly injectOutputMember?: {
71
- readonly tsName: string;
72
- readonly interfaceLines: readonly string[];
73
- readonly structLine: string;
74
- readonly imports?: readonly string[];
75
- };
76
- }
77
- export interface OperationEmit {
78
- readonly op: OpEntry;
79
- readonly opName: string;
80
- readonly exportName: string;
81
- readonly inputName: string;
82
- readonly outputName: string;
83
- /**
84
- * The output as a TS type and as a schema expression. These differ from
85
- * {@link outputName} when the operation's output IS a prelude shape
86
- * (e.g. stripe's freeform `smithy.api#Document` responses): the bare
87
- * local name isn't declared in the module, so it must resolve through
88
- * the prelude maps (`unknown` / `S.Unknown`) instead.
89
- */
90
- readonly outputTsType: string;
91
- readonly outputSchema: string;
92
- /** Declared error class names present in the model. */
93
- readonly errorNames: readonly string[];
94
- readonly doc: string | undefined;
95
- /** The validated pagination trait, when the op paginates. */
96
- readonly pagination: unknown | undefined;
97
- }
98
- export interface SdkSpec {
99
- /** Namespace fallback for models with no operations. Default `"smithy.unknown"`. */
100
- readonly namespaceFallback?: string;
101
- /** PURE marker before schema consts. Default: the shared single marker. */
102
- readonly pure?: string;
103
- /** Prelude scalar → schema expression map. Default {@link JSON_PRELUDE}. */
104
- readonly prelude?: Record<string, string>;
105
- /** Prelude scalar → TS type map. Default {@link TS_JSON_PRELUDE}. */
106
- readonly tsPrelude?: Record<string, string>;
107
- /** Use Codec for service-free, same-type schemas; Schema leaves services unspecified. */
108
- readonly schemaType?: "Schema" | "Codec";
109
- /** Wire member name → TS-facing name. Default: identity. */
110
- readonly memberName?: (name: string) => string;
111
- /** Operation shape name → exported const name. Default: lowerFirst. */
112
- readonly opExportName?: (name: string) => string;
113
- /**
114
- * Emit the one-line smithy doc comment above shapes and error classes.
115
- * Default true. AWS turns this off — its models carry multi-kilobyte HTML
116
- * docs per shape and the SDK only surfaces operation-level docs.
117
- */
118
- readonly shapeDocs?: boolean;
119
- /**
120
- * Extra reachability roots beyond the operations' I/O shapes. AWS seeds
121
- * the error shapes here so their member targets are emitted (error class
122
- * fields reference schema consts); the error shapes themselves are still
123
- * emitted as error classes, not schemas.
124
- */
125
- readonly extraRoots?: (selected: readonly OpEntry[], shapes: ShapeMap) => Iterable<string>;
126
- /**
127
- * Provider member bindings as data, checked in order between the generic
128
- * header binding and `smithy.api#httpPayload`. The driver's cascade:
129
- * label → query → header → extraBindings → rawBody (httpPayload) → body.
130
- *
131
- * `pipe` is emitted for the member; `tsType` overrides its interface
132
- * type (e.g. file uploads → `(File | Blob)[]`).
133
- */
134
- readonly extraBindings?: ReadonlyArray<{
135
- readonly trait: string;
136
- readonly binding: MemberBinding;
137
- readonly pipe: string;
138
- readonly tsType?: string;
139
- /**
140
- * Bare-payload form: when this binding is the sole member of a
141
- * (non-paginated) output structure, the whole response IS that
142
- * member's value — the driver emits the member's type directly and
143
- * pipes the schema through this root marker for the protocol.
144
- */
145
- readonly rootPipe?: string;
146
- }>;
147
- /**
148
- * Which wire-name rule a binding follows. Defaults: the three generic
149
- * kinds map to themselves, everything else to `"other"` (jsonName).
150
- */
151
- readonly wireKind?: (binding: MemberBinding) => "label" | "query" | "header" | "other";
152
- /** Trait id marking a member nullable (`S.NullOr` + `| null`). */
153
- readonly nullableTrait?: string;
154
- /**
155
- * Blanket-nullable optionals: every optional body member types and
156
- * decodes as `X | null` in addition to being omittable (`?: X | null`,
157
- * `S.optional(S.NullOr(X))`). The cloudflare docs pipeline sets this —
158
- * the v4 API freely returns explicit nulls for absent optional fields,
159
- * and the v0 SDK surface modeled every optional that way.
160
- */
161
- readonly optionalsNullable?: boolean;
162
- /**
163
- * Member traits emitted as pipes when present: trait id → pipe builder
164
- * name in the SDK's traits module. The trait's value is JSON-inlined as
165
- * the argument (e.g. `"…#keyDictionary": "T.KeyDictionary"` →
166
- * `T.KeyDictionary({…})`).
167
- */
168
- readonly memberTraitPipes?: Readonly<Record<string, string>>;
169
- /**
170
- * Extra schema pipes appended after the generic ones, for anything the
171
- * data tables can't express. The driver emits `T.Label/T.Query/T.Header`
172
- * (wire-aware), `T.HttpBody()` for rawBody, and `T.Body(wire)` renames —
173
- * the SDK's traits module must export those core builders under these
174
- * names.
175
- */
176
- readonly memberExtraPipes?: (m: EmittedMember) => string[];
177
- /** Full override of member pipe emission (rarely needed). */
178
- readonly memberPipes?: (m: EmittedMember) => string[];
179
- /** Override the value schema before nullability, bindings and optionality. */
180
- readonly memberSchema?: (m: EmittedMember, ref: (target: string) => string) => string | undefined;
181
- /** Function override for member TS types beyond the binding table. */
182
- readonly memberTsType?: (m: EmittedMember, tsRef: (target: string) => string) => string | undefined;
183
- /**
184
- * Struct-level pipes for a shape (after the member struct): the http
185
- * trait on op inputs, service-wide key-dictionary stamping, etc.
186
- */
187
- readonly structPipes?: (ctx: {
188
- readonly id: string;
189
- readonly isOpIo: boolean;
190
- readonly httpTrait: unknown | undefined;
191
- /** Traits of the operation whose INPUT this shape is (undefined otherwise). */
192
- readonly opTraits: Readonly<Record<string, unknown>> | undefined;
193
- }) => string[];
194
- /**
195
- * Pagination profiles. A profile is the codegen-side description of one
196
- * paginated wire variant: the Protocol const that decodes it, the
197
- * strategy passed to makePaginated, the trait-validation rules, and any
198
- * output member the protocol delivers beyond the modeled shape. SDKs
199
- * with several pagination styles declare several profiles and select
200
- * per-op via {@link SdkSpec.paginationProfileFor}.
201
- */
202
- readonly paginationProfiles?: Readonly<Record<string, PaginationProfile>>;
203
- /**
204
- * Select the profile for a paginated op (from its `smithy.api#paginated`
205
- * trait / shape). Default: the sole declared profile; with several
206
- * profiles this becomes required for ops to paginate.
207
- */
208
- readonly paginationProfileFor?: (trait: any, op: OpEntry) => string | undefined;
209
- /**
210
- * Service-wide fallback key dictionary stamped on op I/O roots (emitted
211
- * as a `KEY_DICTIONARY` header const + `T.KeyDictionary(KEY_DICTIONARY)`
212
- * root pipe). `doc` is the const's doc comment. An entry may list several
213
- * wire spellings (first = canonical encode name; decode accepts all).
214
- */
215
- readonly rootKeyDictionary?: {
216
- readonly dict: Record<string, string | ReadonlyArray<string>>;
217
- readonly doc: string;
218
- };
219
- /** Banner suffix: `AUTO-GENERATED by scripts/generate.ts from <note>`. */
220
- readonly sourceNote?: string;
221
- /**
222
- * Operation aliases: re-export the canonical op (and its
223
- * Request/Response/Error types) under each alias name. Skipped when the
224
- * target wasn't emitted or the alias name is taken.
225
- */
226
- readonly opAliases?: ReadonlyArray<{
227
- readonly alias: string;
228
- readonly target: string;
229
- }>;
230
- /**
231
- * Full shape-emission override, checked before the driver's own shape
232
- * handling. Return the emitted lines to own a shape (e.g. AWS's
233
- * newtypes, structural unions, event streams), or undefined to let the
234
- * driver emit it. `selfIdx` is the shape's position in emission order
235
- * for forward-ref decisions.
236
- */
237
- readonly shapeOverride?: (ctx: {
238
- readonly id: string;
239
- readonly def: any;
240
- readonly name: string;
241
- readonly selfIdx: number;
242
- readonly ref: (target: string, selfIdx: number) => string;
243
- readonly tsRef: (target: string) => string;
244
- readonly members: (d: any) => EmittedMember[];
245
- }) => string[] | undefined;
246
- /**
247
- * Union emission style. `"opaque-cases"`: the TS type is the case union
248
- * and the schema is `S.Unknown.pipe(T.UnionCases([...case key sets]))` —
249
- * the protocol discriminates by key-set at decode time (for APIs that
250
- * return every case's keys with nulls, like Cloudflare's).
251
- * `"untagged"`: validate the value directly against the case schemas.
252
- * `"primitive"`: emit unwrapped unions of primitive or enum values.
253
- */
254
- readonly unionStyle?: "opaque-cases" | "untagged" | "primitive";
255
- /** Full override of union emission. */
256
- readonly union?: (ctx: {
257
- readonly name: string;
258
- readonly caseTargets: readonly string[];
259
- readonly caseKeys: readonly (readonly string[])[];
260
- readonly tsRef: (target: string) => string;
261
- }) => string[];
262
- /**
263
- * Trait id carrying error matchers: when present on an error shape, the
264
- * class is wrapped in `T.applyErrorMatchers(<cls>, <trait value>)`.
265
- */
266
- readonly errorMatchersTrait?: string;
267
- /** Error-class emission details. All optional. */
268
- readonly errors?: {
269
- /**
270
- * Full override of one error class's emission (mirrors shapeOverride):
271
- * return the emitted lines to own the error, or undefined to fall back
272
- * to the driver's field/wrap-based emission.
273
- */
274
- readonly override?: (ctx: {
275
- readonly id: string;
276
- readonly def: any;
277
- readonly name: string;
278
- }) => string[] | undefined;
279
- /**
280
- * Field lines used when the error shape declares no members.
281
- * Default: `code` (integer) + `message` (string) — the common REST
282
- * error envelope.
283
- */
284
- readonly defaultFields?: (prelude: Record<string, string>) => string[];
285
- /** Field line for a declared member. Default: prelude-mapped schema. */
286
- readonly field?: (name: string, target: string) => string;
287
- /** Optional wrapper (e.g. matcher application) from the shape's traits. */
288
- readonly wrap?: (traits: Record<string, any>) => ((cls: string) => string) | undefined;
289
- };
290
- /**
291
- * Declarative operation emission — the names the op consts are built
292
- * from. `operation` overrides this entirely when a provider needs full
293
- * control of the emitted shape.
294
- */
295
- readonly operationDecl?: {
296
- /** Requirements type in the OperationMethod annotation. */
297
- readonly contextType: string;
298
- /** Base of the per-op error union alias (e.g. `CloudflareOpError`). */
299
- readonly commonErrorType: string;
300
- /** Error classes appended to every op's `errors: [...]` list. */
301
- readonly commonErrorClasses: readonly string[];
302
- readonly protocol: string;
303
- /** The retry tag expression (e.g. `Retry.Retry`). Omit to disable retries. */
304
- readonly retry?: string;
305
- /**
306
- * Extra config lines inserted before the pagination entry (e.g. AWS's
307
- * `operationName` and `endpointHostPrefix`).
308
- */
309
- readonly extraConfig?: (ctx: OperationEmit) => string[];
310
- /**
311
- * Per-operation `protocol` / `contextType` replacing the declared
312
- * defaults, e.g. an unauthenticated login endpoint on a public protocol
313
- * whose context has no credentials. Return `undefined` for the defaults.
314
- * The header only imports the defaults; a spec that overrides must add
315
- * the extra imports itself (see {@link SdkSpec.postProcess}).
316
- */
317
- readonly overrides?: (ctx: OperationEmit) => {
318
- readonly protocol?: string;
319
- readonly contextType?: string;
320
- } | undefined;
321
- };
322
- /** Full override of operation const emission. */
323
- readonly operation?: (ctx: OperationEmit) => string;
324
- /**
325
- * Module header override. The default builds the banner + imports from
326
- * {@link SdkSpec.operationDecl} names and the conventional module layout
327
- * (`../traits.ts`, `../protocol.ts`, `../pagination.ts`, `../errors.ts`,
328
- * `../retry.ts`), re-exports the op error/context types, and emits the
329
- * `KEY_DICTIONARY` const when {@link SdkSpec.rootKeyDictionary} is set.
330
- */
331
- readonly header?: (ctx: {
332
- readonly hasPaginated: boolean;
333
- readonly model: any;
334
- }) => string;
335
- /** Final pass over the assembled module (e.g. pruning unused imports). */
336
- readonly postProcess?: (code: string) => string;
337
- /**
338
- * Trailing sections after operations (e.g. route-alias re-exports).
339
- * Receives the set of emitted op export names (mutable — additions are
340
- * visible to subsequent alias checks).
341
- */
342
- readonly footer?: (ctx: {
343
- readonly emittedOps: Set<string>;
344
- }) => string[];
345
- }
346
- export interface GeneratedService {
347
- code: string;
348
- operations: number;
349
- }
350
- /** Compile one Smithy model into a service module. */
351
- export declare const generateService: (model: any, spec: SdkSpec) => GeneratedService;
352
- export { errorUnionAlias, operationConst, upperFirst, tsKey, q, local };
353
- //# sourceMappingURL=generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/codegen/generator.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,eAAe,EAGf,cAAc,EAGf,MAAM,WAAW,CAAC;AACnB,OAAO,EAAmD,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE5F;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAmB,KAAK,EAAuB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAMzB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,WAClB,MA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