@slopware/sloppy-darwin-arm64 0.1.0-alpha.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 (434) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +5 -0
  3. package/bin/sloppy +0 -0
  4. package/bin/sloppyc +0 -0
  5. package/docs/KNOWN_LIMITATIONS.md +16 -0
  6. package/docs/LICENSES.md +6 -0
  7. package/docs/NOTICE.md +8 -0
  8. package/examples/README.md +140 -0
  9. package/examples/auth-api/README.md +20 -0
  10. package/examples/auth-api/app.js +61 -0
  11. package/examples/auth-api/appsettings.json +7 -0
  12. package/examples/auth-api/sloppy.json +5 -0
  13. package/examples/cache-basic/README.md +9 -0
  14. package/examples/cache-basic/app.js +32 -0
  15. package/examples/cache-hybrid-postgres/README.md +10 -0
  16. package/examples/cache-hybrid-postgres/app.js +27 -0
  17. package/examples/cache-output-api/README.md +10 -0
  18. package/examples/cache-output-api/app.js +35 -0
  19. package/examples/codec-base64-hex/README.md +14 -0
  20. package/examples/codec-base64-hex/app.js +15 -0
  21. package/examples/codec-checksums/README.md +15 -0
  22. package/examples/codec-checksums/app.js +8 -0
  23. package/examples/codec-compression/README.md +13 -0
  24. package/examples/codec-compression/app.js +9 -0
  25. package/examples/codec-streaming-compression/README.md +19 -0
  26. package/examples/codec-streaming-compression/app.js +16 -0
  27. package/examples/codec-text-binary/README.md +16 -0
  28. package/examples/codec-text-binary/app.js +17 -0
  29. package/examples/compiler-hello/README.md +71 -0
  30. package/examples/compiler-hello/app.js +7 -0
  31. package/examples/compiler-hello/expected/app.js +8 -0
  32. package/examples/compiler-hello/expected/app.js.map +53 -0
  33. package/examples/compiler-hello/expected/app.plan.json +229 -0
  34. package/examples/compiler-hello/expected/routes.slrt +0 -0
  35. package/examples/config-basic/README.md +13 -0
  36. package/examples/config-basic/app.js +13 -0
  37. package/examples/config-basic/appsettings.json +7 -0
  38. package/examples/config-secrets-redaction/README.md +9 -0
  39. package/examples/config-secrets-redaction/app.js +9 -0
  40. package/examples/config-secrets-redaction/appsettings.json +5 -0
  41. package/examples/config-strict-mode/README.md +7 -0
  42. package/examples/config-strict-mode/app.js +10 -0
  43. package/examples/config-strict-mode/appsettings.json +7 -0
  44. package/examples/configured-api/README.md +38 -0
  45. package/examples/configured-api/app.js +12 -0
  46. package/examples/configured-api/appsettings.Development.json +5 -0
  47. package/examples/configured-api/appsettings.json +6 -0
  48. package/examples/configured-api/sloppy.json +5 -0
  49. package/examples/core-config-secrets/README.md +10 -0
  50. package/examples/core-config-secrets/app.js +15 -0
  51. package/examples/core-fs-time-codec/README.md +9 -0
  52. package/examples/core-fs-time-codec/app.js +8 -0
  53. package/examples/core-network-time-codec/README.md +11 -0
  54. package/examples/core-network-time-codec/app.js +20 -0
  55. package/examples/core-policy-audit/README.md +7 -0
  56. package/examples/core-policy-audit/app.js +22 -0
  57. package/examples/core-process-time-codec/README.md +8 -0
  58. package/examples/core-process-time-codec/app.js +28 -0
  59. package/examples/core-worker-time/README.md +8 -0
  60. package/examples/core-worker-time/app.js +17 -0
  61. package/examples/crypto-hash-hmac/README.md +17 -0
  62. package/examples/crypto-hash-hmac/app.js +29 -0
  63. package/examples/crypto-password/README.md +21 -0
  64. package/examples/crypto-password/app.js +12 -0
  65. package/examples/crypto-random-token/README.md +16 -0
  66. package/examples/crypto-random-token/app.js +12 -0
  67. package/examples/crypto-secret-constant-time/README.md +21 -0
  68. package/examples/crypto-secret-constant-time/app.js +15 -0
  69. package/examples/data-foundation/README.md +39 -0
  70. package/examples/data-foundation/app.js +63 -0
  71. package/examples/dependency-graph/README.md +19 -0
  72. package/examples/dependency-graph/fixtures/graph-helper/index.js +3 -0
  73. package/examples/dependency-graph/fixtures/graph-helper/package.json +6 -0
  74. package/examples/dependency-graph/package.json +7 -0
  75. package/examples/dependency-graph/public/message.txt +1 -0
  76. package/examples/dependency-graph/sloppy.json +9 -0
  77. package/examples/dependency-graph/src/main.ts +8 -0
  78. package/examples/dogfood/README.md +23 -0
  79. package/examples/dogfood/dogfood.json +136 -0
  80. package/examples/dynamic-module-include/README.md +20 -0
  81. package/examples/dynamic-module-include/public/readme.txt +1 -0
  82. package/examples/dynamic-module-include/sloppy.json +12 -0
  83. package/examples/dynamic-module-include/src/main.ts +6 -0
  84. package/examples/dynamic-module-include/src/plugins/alpha.js +3 -0
  85. package/examples/dynamic-module-include/src/plugins/beta.js +3 -0
  86. package/examples/ergonomics/README.md +42 -0
  87. package/examples/ergonomics/app.js +38 -0
  88. package/examples/framework-controller/README.md +12 -0
  89. package/examples/framework-controller/app.js +31 -0
  90. package/examples/framework-di-services/README.md +17 -0
  91. package/examples/framework-di-services/app.ts +40 -0
  92. package/examples/framework-explicit-binding/README.md +12 -0
  93. package/examples/framework-explicit-binding/app.ts +34 -0
  94. package/examples/framework-hello/README.md +16 -0
  95. package/examples/framework-hello/app.ts +16 -0
  96. package/examples/framework-postgres-crud/README.md +73 -0
  97. package/examples/framework-postgres-crud/app.ts +64 -0
  98. package/examples/framework-sqlite-crud/README.md +52 -0
  99. package/examples/framework-sqlite-crud/app.ts +90 -0
  100. package/examples/framework-sqlite-crud/appsettings.json +11 -0
  101. package/examples/framework-sqlserver-crud/README.md +73 -0
  102. package/examples/framework-sqlserver-crud/app.ts +64 -0
  103. package/examples/framework-validation-errors/README.md +12 -0
  104. package/examples/framework-validation-errors/app.ts +16 -0
  105. package/examples/fs-basic/README.md +24 -0
  106. package/examples/fs-basic/app.js +12 -0
  107. package/examples/fs-roots-policy/README.md +14 -0
  108. package/examples/fs-roots-policy/app.js +4 -0
  109. package/examples/fs-streams/README.md +18 -0
  110. package/examples/fs-streams/app.js +11 -0
  111. package/examples/fs-watch/README.md +19 -0
  112. package/examples/fs-watch/app.js +11 -0
  113. package/examples/hello/README.md +63 -0
  114. package/examples/hello/app.js +19 -0
  115. package/examples/hello-minimal/README.md +51 -0
  116. package/examples/hello-minimal/sloppy.json +5 -0
  117. package/examples/hello-minimal/src/main.ts +9 -0
  118. package/examples/http-client-basic/README.md +11 -0
  119. package/examples/http-client-basic/app.js +46 -0
  120. package/examples/http-client-generated/README.md +22 -0
  121. package/examples/http-client-generated/openapi.json +45 -0
  122. package/examples/http-client-resilience/README.md +4 -0
  123. package/examples/http-client-resilience/app.js +38 -0
  124. package/examples/http-client-runtime-loopback/README.md +24 -0
  125. package/examples/http-client-testhost/README.md +4 -0
  126. package/examples/http-client-testhost/app.js +27 -0
  127. package/examples/http-client-testhost-package-mock/README.md +26 -0
  128. package/examples/http-client-typed/README.md +5 -0
  129. package/examples/http-client-typed/app.js +33 -0
  130. package/examples/modules-api/README.md +30 -0
  131. package/examples/modules-api/app.js +9 -0
  132. package/examples/modules-api/modules/routes.js +16 -0
  133. package/examples/modules-api/sloppy.json +5 -0
  134. package/examples/modules-basic/README.md +32 -0
  135. package/examples/modules-basic/app.js +41 -0
  136. package/examples/net-deadline-cancel/README.md +13 -0
  137. package/examples/net-deadline-cancel/app.js +34 -0
  138. package/examples/net-local-ipc/README.md +12 -0
  139. package/examples/net-local-ipc/app.js +46 -0
  140. package/examples/net-policy-strict/README.md +12 -0
  141. package/examples/net-policy-strict/app.js +34 -0
  142. package/examples/net-tcp-client/README.md +10 -0
  143. package/examples/net-tcp-client/app.js +23 -0
  144. package/examples/net-tcp-echo/README.md +11 -0
  145. package/examples/net-tcp-echo/app.js +45 -0
  146. package/examples/net-tcp-server/README.md +10 -0
  147. package/examples/net-tcp-server/app.js +28 -0
  148. package/examples/node-compat-path-events/README.md +15 -0
  149. package/examples/node-compat-path-events/sloppy.json +6 -0
  150. package/examples/node-compat-path-events/src/main.ts +15 -0
  151. package/examples/ops-compiler/README.md +9 -0
  152. package/examples/ops-compiler/app.js +26 -0
  153. package/examples/ops-health-metrics-management/README.md +14 -0
  154. package/examples/ops-health-metrics-management/app.js +24 -0
  155. package/examples/orm-basic/README.md +17 -0
  156. package/examples/orm-basic/app.js +82 -0
  157. package/examples/orm-cursor-export/README.md +16 -0
  158. package/examples/orm-cursor-export/app.js +28 -0
  159. package/examples/orm-migrations/README.md +14 -0
  160. package/examples/orm-migrations/migrations/.gitkeep +1 -0
  161. package/examples/orm-migrations/sloppy.json +9 -0
  162. package/examples/orm-migrations/src/app.ts +34 -0
  163. package/examples/orm-relations-includes/README.md +10 -0
  164. package/examples/orm-relations-includes/app.js +47 -0
  165. package/examples/orm-testservices/README.md +37 -0
  166. package/examples/orm-testservices/test.mjs +32 -0
  167. package/examples/os-runtime-api/README.md +11 -0
  168. package/examples/os-runtime-api/app.js +44 -0
  169. package/examples/package-zod-like/README.md +28 -0
  170. package/examples/package-zod-like/fixtures/zod-like/index.js +48 -0
  171. package/examples/package-zod-like/fixtures/zod-like/package.json +12 -0
  172. package/examples/package-zod-like/package.json +7 -0
  173. package/examples/package-zod-like/sloppy.json +6 -0
  174. package/examples/package-zod-like/src/main.ts +16 -0
  175. package/examples/postgres-basic/README.md +31 -0
  176. package/examples/postgres-basic/app.js +50 -0
  177. package/examples/prealpha-control-plane/README.md +50 -0
  178. package/examples/prealpha-control-plane/appsettings.Development.json +11 -0
  179. package/examples/prealpha-control-plane/appsettings.json +15 -0
  180. package/examples/prealpha-control-plane/sloppy.json +5 -0
  181. package/examples/prealpha-control-plane/src/db/schema.js +7 -0
  182. package/examples/prealpha-control-plane/src/db/seed.js +6 -0
  183. package/examples/prealpha-control-plane/src/main.js +21 -0
  184. package/examples/prealpha-control-plane/src/routes/apps.js +34 -0
  185. package/examples/prealpha-control-plane/src/routes/builds.js +25 -0
  186. package/examples/prealpha-control-plane/src/routes/deployments.js +19 -0
  187. package/examples/prealpha-control-plane/src/routes/diagnostics.js +11 -0
  188. package/examples/prealpha-control-plane/src/routes/health.js +27 -0
  189. package/examples/prealpha-control-plane/src/routes/projects.js +38 -0
  190. package/examples/prealpha-control-plane/src/services/diagnosticsSink.js +11 -0
  191. package/examples/prealpha-control-plane/src/services/repositories.js +9 -0
  192. package/examples/prealpha-control-plane/src/validation/schemas.js +6 -0
  193. package/examples/program-fs-process/README.md +31 -0
  194. package/examples/program-fs-process/sloppy.json +9 -0
  195. package/examples/program-fs-process/src/main.ts +27 -0
  196. package/examples/program-hello/README.md +32 -0
  197. package/examples/program-hello/main.ts +8 -0
  198. package/examples/program-hello/message.ts +1 -0
  199. package/examples/program-hello/sloppy.json +5 -0
  200. package/examples/rate-limit-auth/README.md +3 -0
  201. package/examples/rate-limit-auth/app.js +14 -0
  202. package/examples/rate-limit-basic/README.md +3 -0
  203. package/examples/rate-limit-basic/app.js +13 -0
  204. package/examples/rate-limit-redis/README.md +5 -0
  205. package/examples/rate-limit-redis/app.js +20 -0
  206. package/examples/rate-limit-testhost/README.md +4 -0
  207. package/examples/rate-limit-testhost/app.js +13 -0
  208. package/examples/rate-limit-websocket/README.md +3 -0
  209. package/examples/rate-limit-websocket/app.js +16 -0
  210. package/examples/realtime-auth/README.md +8 -0
  211. package/examples/realtime-auth/app.js +25 -0
  212. package/examples/realtime-auth/test.mjs +43 -0
  213. package/examples/realtime-chat/README.md +8 -0
  214. package/examples/realtime-chat/app.js +32 -0
  215. package/examples/realtime-chat/test.mjs +52 -0
  216. package/examples/realtime-dashboard/README.md +20 -0
  217. package/examples/realtime-dashboard/app.js +37 -0
  218. package/examples/realtime-presence/README.md +8 -0
  219. package/examples/realtime-presence/app.js +32 -0
  220. package/examples/realtime-presence/test.mjs +50 -0
  221. package/examples/realtime-testhost/README.md +8 -0
  222. package/examples/realtime-testhost/test.mjs +31 -0
  223. package/examples/redis-basic/README.md +17 -0
  224. package/examples/redis-basic/app.js +39 -0
  225. package/examples/redis-cache/README.md +14 -0
  226. package/examples/redis-cache/app.js +36 -0
  227. package/examples/redis-locks/README.md +13 -0
  228. package/examples/redis-locks/app.js +49 -0
  229. package/examples/request-context/README.md +32 -0
  230. package/examples/request-context/app.js +15 -0
  231. package/examples/sqlite-basic/README.md +52 -0
  232. package/examples/sqlite-basic/app.js +56 -0
  233. package/examples/sqlserver-basic/README.md +36 -0
  234. package/examples/sqlserver-basic/app.js +59 -0
  235. package/examples/static-files-basic/README.md +11 -0
  236. package/examples/static-files-basic/app.js +12 -0
  237. package/examples/static-files-basic/public/app.js +1 -0
  238. package/examples/static-files-basic/public/site.css +3 -0
  239. package/examples/static-files-package/README.md +12 -0
  240. package/examples/static-files-package/app.js +10 -0
  241. package/examples/static-files-package/public/index.html +2 -0
  242. package/examples/static-files-precompressed/README.md +12 -0
  243. package/examples/static-files-precompressed/app.js +11 -0
  244. package/examples/static-files-precompressed/public/app.js +1 -0
  245. package/examples/static-files-precompressed/public/app.js.br +0 -0
  246. package/examples/static-files-precompressed/public/app.js.gz +0 -0
  247. package/examples/static-files-spa/README.md +12 -0
  248. package/examples/static-files-spa/app.js +16 -0
  249. package/examples/static-files-spa/dist/assets/app.js +1 -0
  250. package/examples/static-files-spa/dist/index.html +4 -0
  251. package/examples/static-files-testhost/README.md +8 -0
  252. package/examples/static-files-testhost/app.js +13 -0
  253. package/examples/static-files-testhost/public/app.js +1 -0
  254. package/examples/static-files-testhost/public/app.js.gz +0 -0
  255. package/examples/static-files-testhost/test.mjs +38 -0
  256. package/examples/testhost-basic/README.md +26 -0
  257. package/examples/testhost-db/README.md +31 -0
  258. package/examples/testservices-postgres/README.md +68 -0
  259. package/examples/testservices-redis/README.md +71 -0
  260. package/examples/testservices-sqlserver/README.md +75 -0
  261. package/examples/time-basic/README.md +18 -0
  262. package/examples/time-basic/app.js +12 -0
  263. package/examples/time-deadline-cancellation/README.md +11 -0
  264. package/examples/time-deadline-cancellation/app.js +27 -0
  265. package/examples/time-fake-clock/README.md +14 -0
  266. package/examples/time-fake-clock/app.js +25 -0
  267. package/examples/time-interval-schedule/README.md +13 -0
  268. package/examples/time-interval-schedule/app.js +60 -0
  269. package/examples/users-api-sqlite/README.md +74 -0
  270. package/examples/users-api-sqlite/app.js +11 -0
  271. package/examples/users-api-sqlite/appsettings.Development.json +11 -0
  272. package/examples/users-api-sqlite/appsettings.json +11 -0
  273. package/examples/users-api-sqlite/modules/users.js +40 -0
  274. package/examples/users-api-sqlite/sloppy.json +5 -0
  275. package/examples/validation-errors/README.md +36 -0
  276. package/examples/validation-errors/app.js +14 -0
  277. package/examples/validation-errors/invalid-user.http +6 -0
  278. package/examples/validation-errors/sloppy.json +5 -0
  279. package/examples/web-dynamic-routes/README.md +17 -0
  280. package/examples/web-dynamic-routes/app.ts +27 -0
  281. package/examples/webhooks-basic/README.md +11 -0
  282. package/examples/webhooks-basic/app.js +48 -0
  283. package/examples/websocket-auth/README.md +8 -0
  284. package/examples/websocket-auth/app.js +16 -0
  285. package/examples/websocket-echo/README.md +9 -0
  286. package/examples/websocket-echo/app.js +36 -0
  287. package/examples/websocket-json-schema/README.md +5 -0
  288. package/examples/websocket-json-schema/app.js +25 -0
  289. package/examples/websocket-testhost/README.md +11 -0
  290. package/examples/websocket-testhost/test.mjs +49 -0
  291. package/examples/workers-background-service/README.md +7 -0
  292. package/examples/workers-background-service/app.js +16 -0
  293. package/examples/workers-js-isolate/README.md +8 -0
  294. package/examples/workers-js-isolate/app.js +19 -0
  295. package/examples/workers-js-isolate/workers/parser.ts +11 -0
  296. package/examples/workers-shutdown/README.md +6 -0
  297. package/examples/workers-shutdown/app.js +26 -0
  298. package/examples/workers-workerpool/README.md +6 -0
  299. package/examples/workers-workerpool/app.js +23 -0
  300. package/examples/workers-workqueue/README.md +8 -0
  301. package/examples/workers-workqueue/app.js +24 -0
  302. package/manifest.json +59 -0
  303. package/package.json +31 -0
  304. package/stdlib/sloppy/README.md +177 -0
  305. package/stdlib/sloppy/app.js +2142 -0
  306. package/stdlib/sloppy/auth.js +1813 -0
  307. package/stdlib/sloppy/bootstrap.manifest.json +83 -0
  308. package/stdlib/sloppy/cache.js +1542 -0
  309. package/stdlib/sloppy/codec.js +1153 -0
  310. package/stdlib/sloppy/config.js +61 -0
  311. package/stdlib/sloppy/crypto.js +312 -0
  312. package/stdlib/sloppy/data.js +2945 -0
  313. package/stdlib/sloppy/ffi.js +185 -0
  314. package/stdlib/sloppy/fs.js +795 -0
  315. package/stdlib/sloppy/health.js +603 -0
  316. package/stdlib/sloppy/http.js +1595 -0
  317. package/stdlib/sloppy/index.js +59 -0
  318. package/stdlib/sloppy/internal/bytes.js +31 -0
  319. package/stdlib/sloppy/internal/capabilities.js +155 -0
  320. package/stdlib/sloppy/internal/config.js +640 -0
  321. package/stdlib/sloppy/internal/disposable.js +31 -0
  322. package/stdlib/sloppy/internal/headers.js +63 -0
  323. package/stdlib/sloppy/internal/intrinsics.js +2 -0
  324. package/stdlib/sloppy/internal/json.js +20 -0
  325. package/stdlib/sloppy/internal/logging.js +278 -0
  326. package/stdlib/sloppy/internal/modules.js +405 -0
  327. package/stdlib/sloppy/internal/redaction.js +87 -0
  328. package/stdlib/sloppy/internal/routes.js +2279 -0
  329. package/stdlib/sloppy/internal/runtime-classic.js +19837 -0
  330. package/stdlib/sloppy/internal/services.js +690 -0
  331. package/stdlib/sloppy/internal/shared.js +32 -0
  332. package/stdlib/sloppy/internal/testhost-diagnostics.js +88 -0
  333. package/stdlib/sloppy/internal/testhost-http-server.js +238 -0
  334. package/stdlib/sloppy/internal/testhost-http.js +118 -0
  335. package/stdlib/sloppy/internal/testhost-loopback.js +50 -0
  336. package/stdlib/sloppy/internal/testservices-docker.js +154 -0
  337. package/stdlib/sloppy/internal/validation.js +117 -0
  338. package/stdlib/sloppy/metrics.js +427 -0
  339. package/stdlib/sloppy/net.js +5208 -0
  340. package/stdlib/sloppy/node/assert/strict.js +39 -0
  341. package/stdlib/sloppy/node/assert.js +228 -0
  342. package/stdlib/sloppy/node/buffer.js +247 -0
  343. package/stdlib/sloppy/node/console.js +33 -0
  344. package/stdlib/sloppy/node/constants.js +9 -0
  345. package/stdlib/sloppy/node/crypto.js +89 -0
  346. package/stdlib/sloppy/node/diagnostics_channel.js +41 -0
  347. package/stdlib/sloppy/node/events.js +113 -0
  348. package/stdlib/sloppy/node/fs/promises.js +27 -0
  349. package/stdlib/sloppy/node/fs.js +280 -0
  350. package/stdlib/sloppy/node/http.js +11 -0
  351. package/stdlib/sloppy/node/https.js +11 -0
  352. package/stdlib/sloppy/node/module.js +40 -0
  353. package/stdlib/sloppy/node/os.js +22 -0
  354. package/stdlib/sloppy/node/path.js +78 -0
  355. package/stdlib/sloppy/node/perf_hooks.js +12 -0
  356. package/stdlib/sloppy/node/process.js +129 -0
  357. package/stdlib/sloppy/node/querystring.js +21 -0
  358. package/stdlib/sloppy/node/stream/promises.js +3 -0
  359. package/stdlib/sloppy/node/stream.js +132 -0
  360. package/stdlib/sloppy/node/string_decoder.js +23 -0
  361. package/stdlib/sloppy/node/timers.js +26 -0
  362. package/stdlib/sloppy/node/tty.js +18 -0
  363. package/stdlib/sloppy/node/url.js +17 -0
  364. package/stdlib/sloppy/node/util.js +95 -0
  365. package/stdlib/sloppy/node/zlib.js +72 -0
  366. package/stdlib/sloppy/orm.js +2188 -0
  367. package/stdlib/sloppy/os.js +580 -0
  368. package/stdlib/sloppy/problem-details.js +29 -0
  369. package/stdlib/sloppy/providers/sqlite.js +26 -0
  370. package/stdlib/sloppy/rate-limit.js +856 -0
  371. package/stdlib/sloppy/realtime.js +1508 -0
  372. package/stdlib/sloppy/redis.js +1272 -0
  373. package/stdlib/sloppy/request-id.js +184 -0
  374. package/stdlib/sloppy/request-logging.js +101 -0
  375. package/stdlib/sloppy/results.js +933 -0
  376. package/stdlib/sloppy/schema.js +546 -0
  377. package/stdlib/sloppy/testing.js +4081 -0
  378. package/stdlib/sloppy/testservices.js +1041 -0
  379. package/stdlib/sloppy/time.js +894 -0
  380. package/stdlib/sloppy/webhooks.js +1330 -0
  381. package/stdlib/sloppy/workers.js +986 -0
  382. package/templates/api/README.md +82 -0
  383. package/templates/api/appsettings.Development.json +14 -0
  384. package/templates/api/appsettings.json +13 -0
  385. package/templates/api/data/.gitkeep +1 -0
  386. package/templates/api/gitignore +4 -0
  387. package/templates/api/migrations/0001_create_users.sql +1 -0
  388. package/templates/api/package.json +16 -0
  389. package/templates/api/public/hello.txt +1 -0
  390. package/templates/api/sloppy.json +14 -0
  391. package/templates/api/src/config.ts +1 -0
  392. package/templates/api/src/db/migrate.ts +14 -0
  393. package/templates/api/src/db/schema.ts +4 -0
  394. package/templates/api/src/db/usersRepository.ts +23 -0
  395. package/templates/api/src/main.ts +18 -0
  396. package/templates/api/src/models/user.ts +7 -0
  397. package/templates/api/src/routes/health.ts +20 -0
  398. package/templates/api/src/routes/users.ts +40 -0
  399. package/templates/api/src/services/usersService.ts +21 -0
  400. package/templates/api/tsconfig.json +15 -0
  401. package/templates/cli/README.md +16 -0
  402. package/templates/cli/gitignore +2 -0
  403. package/templates/cli/package.json +13 -0
  404. package/templates/cli/sloppy.json +6 -0
  405. package/templates/cli/src/commands/echo.ts +9 -0
  406. package/templates/cli/src/commands/inspect.ts +20 -0
  407. package/templates/cli/src/main.ts +50 -0
  408. package/templates/cli/tsconfig.json +15 -0
  409. package/templates/minimal-api/README.md +14 -0
  410. package/templates/minimal-api/gitignore +3 -0
  411. package/templates/minimal-api/package.json +14 -0
  412. package/templates/minimal-api/sloppy.json +5 -0
  413. package/templates/minimal-api/src/main.ts +9 -0
  414. package/templates/minimal-api/tsconfig.json +15 -0
  415. package/templates/node-compat/README.md +40 -0
  416. package/templates/node-compat/gitignore +2 -0
  417. package/templates/node-compat/package.json +11 -0
  418. package/templates/node-compat/sloppy.json +6 -0
  419. package/templates/node-compat/src/main.ts +40 -0
  420. package/templates/package-api/README.md +44 -0
  421. package/templates/package-api/fixtures/validator-lite/index.js +7 -0
  422. package/templates/package-api/fixtures/validator-lite/package.json +6 -0
  423. package/templates/package-api/gitignore +3 -0
  424. package/templates/package-api/package.json +17 -0
  425. package/templates/package-api/sloppy.json +5 -0
  426. package/templates/package-api/src/main.ts +10 -0
  427. package/templates/package-api/src/routes/health.ts +5 -0
  428. package/templates/package-api/src/routes/users.ts +12 -0
  429. package/templates/package-api/tsconfig.json +15 -0
  430. package/templates/program/README.md +12 -0
  431. package/templates/program/gitignore +1 -0
  432. package/templates/program/package.json +10 -0
  433. package/templates/program/sloppy.json +6 -0
  434. package/templates/program/src/main.ts +9 -0
@@ -0,0 +1,14 @@
1
+ # Codec Base64 And Hex Example
2
+
3
+ This example documents the `sloppy/codec`
4
+ Base64, Base64Url, and Hex byte transform shape.
5
+
6
+ ```js
7
+ import { Base64, Base64Url, Hex } from "sloppy/codec";
8
+
9
+ const encoded = Base64.encode(bytes);
10
+ const urlSafe = Base64Url.encode(bytes, { padding: false });
11
+ const hex = Hex.encode(bytes);
12
+ ```
13
+
14
+ These helpers preserve arbitrary bytes and embedded NUL values.
@@ -0,0 +1,15 @@
1
+ import { Base64, Base64Url, Hex } from "sloppy/codec";
2
+
3
+ const bytes = new Uint8Array([0, 15, 16, 255]);
4
+
5
+ export const encoded = {
6
+ base64: Base64.encode(bytes),
7
+ base64Url: Base64Url.encode(bytes, { padding: false }),
8
+ hex: Hex.encode(bytes),
9
+ };
10
+
11
+ export const decoded = {
12
+ base64: Base64.decode(encoded.base64),
13
+ base64Url: Base64Url.decode(encoded.base64Url, { padding: "optional" }),
14
+ hex: Hex.decode(encoded.hex),
15
+ };
@@ -0,0 +1,15 @@
1
+ # Codec Checksums Example
2
+
3
+ This example documents CRC32 as a non-security
4
+ checksum helper for accidental-corruption checks and cache metadata.
5
+
6
+ ```js
7
+ import { Checksums, Text } from "sloppy/codec";
8
+
9
+ const bytes = Text.utf8.encode("example");
10
+ const crc = Checksums.crc32(bytes);
11
+ ```
12
+
13
+ CRC32 is not authentication, attacker-resistant integrity, a signature, HMAC, password
14
+ utility, or cryptographic hash. Use the appropriate `sloppy/crypto` primitive for
15
+ security-shaped code, including the password-hash API for passwords.
@@ -0,0 +1,8 @@
1
+ import { Checksums, Text } from "sloppy/codec";
2
+
3
+ const payload = Text.utf8.encode("cache record");
4
+
5
+ export const record = {
6
+ bytes: payload.byteLength,
7
+ crc32: Checksums.crc32(payload),
8
+ };
@@ -0,0 +1,13 @@
1
+ # Codec Compression Example
2
+
3
+ This example documents zlib-backed gzip/gunzip
4
+ helpers and the explicit decompression output limit.
5
+
6
+ ```js
7
+ import { Compression } from "sloppy/codec";
8
+
9
+ const gz = await Compression.gzip(bytes, { level: 6 });
10
+ const raw = await Compression.gunzip(gz, { maxOutputBytes: 1024 * 1024 });
11
+ ```
12
+
13
+ Compression uses vetted backend libraries only.
@@ -0,0 +1,9 @@
1
+ import { Compression, Text } from "sloppy/codec";
2
+
3
+ const body = Text.utf8.encode("compress me");
4
+
5
+ export async function roundtrip() {
6
+ const gz = await Compression.gzip(body, { level: 6 });
7
+ const raw = await Compression.gunzip(gz, { maxOutputBytes: 1024 * 1024 });
8
+ return Text.utf8.decode(raw, { fatal: true });
9
+ }
@@ -0,0 +1,19 @@
1
+ # Codec Streaming Compression Example
2
+
3
+ This example documents the async-iterable
4
+ compression transform shape with Time deadline/cancellation options.
5
+
6
+ ```js
7
+ import { Compression } from "sloppy/codec";
8
+ import { Deadline } from "sloppy/time";
9
+
10
+ const chunks = [new Uint8Array([1, 2, 3])];
11
+ const controller = new AbortController();
12
+ const signal = controller.signal;
13
+ const stream = Compression.gzipStream(chunks, { signal, deadline: Deadline.after(1000) });
14
+ ```
15
+
16
+ The stream helpers are Sloppy async-iterable transforms, not Web Streams. They keep bounded
17
+ buffering and terminal-state behavior explicit. This example has no Node, Bun, or Deno
18
+ compatibility promise. Use benchmark-specific docs and tests for compression
19
+ measurements.
@@ -0,0 +1,16 @@
1
+ import { Compression, Text } from "sloppy/codec";
2
+ import { Deadline } from "sloppy/time";
3
+
4
+ async function* chunks() {
5
+ yield Text.utf8.encode("stream ");
6
+ yield Text.utf8.encode("payload");
7
+ }
8
+
9
+ export async function compressedChunks(signal) {
10
+ const deadline = Deadline.after(1000);
11
+ const output = [];
12
+ for await (const chunk of Compression.gzipStream(chunks(), { signal, deadline })) {
13
+ output.push(chunk);
14
+ }
15
+ return output;
16
+ }
@@ -0,0 +1,16 @@
1
+ # Codec Text And Binary Example
2
+
3
+ This example documents UTF-8 text helpers and the
4
+ bounds-checked Binary reader/writer surface.
5
+
6
+ ```js
7
+ import { Binary, Text } from "sloppy/codec";
8
+
9
+ const payload = Text.utf8.encode("hello");
10
+ writer.u32le(1);
11
+ writer.u16be(payload.length);
12
+ writer.bytes(payload);
13
+ ```
14
+
15
+ Binary methods are endian-explicit and preserve embedded NUL bytes. UTF-8
16
+ malformed input behavior is explicit through fatal or replacement modes.
@@ -0,0 +1,17 @@
1
+ import { Binary, Text } from "sloppy/codec";
2
+
3
+ const payload = Text.utf8.encode("hello\0codec");
4
+
5
+ const writer = Binary.writer();
6
+ writer.u32le(1);
7
+ writer.u16be(payload.length);
8
+ writer.bytes(payload);
9
+
10
+ const packet = writer.toBytes();
11
+ const reader = Binary.reader(packet);
12
+
13
+ export const decoded = {
14
+ version: reader.u32le(),
15
+ length: reader.u16be(),
16
+ text: Text.utf8.decode(reader.bytes(payload.length), { fatal: true }),
17
+ };
@@ -0,0 +1,71 @@
1
+ # Compiler Hello Example
2
+
3
+ This is a supported compiler fixture input.
4
+ This example is the first Sloppy source shape that `sloppyc build` can compile:
5
+
6
+ From the repository root:
7
+
8
+ ```powershell
9
+ cargo run --manifest-path compiler/Cargo.toml -- build examples/compiler-hello/app.js --out .sloppy
10
+ ```
11
+
12
+ From this example directory:
13
+
14
+ ```powershell
15
+ cargo run --manifest-path ..\..\compiler\Cargo.toml -- build app.js --out .sloppy
16
+ ```
17
+
18
+ The command emits:
19
+
20
+ - `.sloppy/app.plan.json`;
21
+ - `.sloppy/app.js`;
22
+ - `.sloppy/app.js.map`.
23
+
24
+ With a V8-enabled Sloppy build, run the artifacts through the bounded development runtime:
25
+
26
+ From repository root:
27
+
28
+ ```powershell
29
+ .\build\windows-relwithdebinfo\sloppy.exe run --artifacts .sloppy --host 127.0.0.1 --port 5173
30
+ ```
31
+
32
+ Expected URL:
33
+
34
+ ```text
35
+ http://127.0.0.1:5173/
36
+ ```
37
+
38
+ For deterministic smoke tests without opening a socket:
39
+
40
+ ```powershell
41
+ .\build\windows-relwithdebinfo\sloppy.exe run --artifacts .sloppy --once GET /
42
+ ```
43
+
44
+ Expected body:
45
+
46
+ ```text
47
+ Hello from Sloppy
48
+ ```
49
+
50
+ The source-input shortcut performs the compile step and then enters the same artifact
51
+ runtime path:
52
+
53
+ ```powershell
54
+ .\build\windows-relwithdebinfo\sloppy.exe run app.js --once GET /
55
+ ```
56
+
57
+ From the repository root:
58
+
59
+ ```powershell
60
+ .\build\windows-relwithdebinfo\sloppy.exe run examples/compiler-hello/app.js --once GET /
61
+ ```
62
+
63
+ This writes generated artifacts under `.sloppy` for positional
64
+ source input. The explicit `--artifacts` form remains useful when inspecting a known output
65
+ directory or debugging generated files.
66
+
67
+ ## Limitations
68
+
69
+ This run path is development-only and requires V8. It currently focuses on compile +
70
+ bounded run flow; broader TypeScript checking, bundling, HTTPS, request-body parsing,
71
+ streaming, middleware, and hot reload are planned separately.
@@ -0,0 +1,7 @@
1
+ import { Sloppy, Results } from "sloppy";
2
+
3
+ const app = Sloppy.create();
4
+
5
+ app.mapGet("/", () => Results.text("Hello from Sloppy"));
6
+
7
+ export default app;
@@ -0,0 +1,8 @@
1
+ const __sloppyRuntime = globalThis.__sloppy_runtime;
2
+ if (__sloppyRuntime === undefined) {
3
+ throw new Error("Sloppy bootstrap runtime was not loaded");
4
+ }
5
+ const { Results } = __sloppyRuntime;
6
+
7
+ globalThis.__sloppy_handler_1 = () => Results.text("Hello from Sloppy");
8
+ globalThis.__sloppy_register_handler(1, globalThis.__sloppy_handler_1);
@@ -0,0 +1,53 @@
1
+ {
2
+ "file": "app.js",
3
+ "mappings": ";;;;;;gCAIgB",
4
+ "names": [],
5
+ "sources": [
6
+ "app.js"
7
+ ],
8
+ "sourcesContent": [
9
+ "import { Sloppy, Results } from \"sloppy\";\n\nconst app = Sloppy.create();\n\napp.mapGet(\"/\", () => Results.text(\"Hello from Sloppy\"));\n\nexport default app;\n"
10
+ ],
11
+ "version": 3,
12
+ "x_sloppy": {
13
+ "capabilities": [],
14
+ "effects": [],
15
+ "handlers": [
16
+ {
17
+ "generated": {
18
+ "column": 33,
19
+ "line": 7
20
+ },
21
+ "id": 1,
22
+ "source": {
23
+ "column": 17,
24
+ "line": 5,
25
+ "path": "app.js"
26
+ }
27
+ }
28
+ ],
29
+ "modules": [],
30
+ "providers": [],
31
+ "routes": [
32
+ {
33
+ "handlerId": 1,
34
+ "method": "GET",
35
+ "module": null,
36
+ "pattern": "/",
37
+ "source": {
38
+ "column": 1,
39
+ "line": 5,
40
+ "path": "app.js"
41
+ }
42
+ }
43
+ ],
44
+ "schemas": [],
45
+ "sourceFiles": [
46
+ {
47
+ "hash": "sha256:881ad698ba4ef863fb3fddc1166f26726ef5a0a86e1032510131e555d806d1e7",
48
+ "path": "app.js"
49
+ }
50
+ ],
51
+ "version": 1
52
+ }
53
+ }
@@ -0,0 +1,229 @@
1
+ {
2
+ "bundle": {
3
+ "hash": "sha256:8574ad670d955461e1189cf6d70c1fb82085635b33c927de6dbd1b18b1924232",
4
+ "id": "sloppyc-app-js",
5
+ "path": "app.js"
6
+ },
7
+ "capabilities": [],
8
+ "compilerVersion": "sloppyc-0.8.0",
9
+ "completeness": {
10
+ "reasons": [],
11
+ "status": "complete"
12
+ },
13
+ "configuration": {
14
+ "environment": "Development",
15
+ "keys": [
16
+ {
17
+ "key": "Sloppy:Runtime:V8MicrotaskDrainLimit",
18
+ "sensitive": false,
19
+ "source": "built-in defaults",
20
+ "value": 64
21
+ },
22
+ {
23
+ "key": "Sloppy:Server:Host",
24
+ "sensitive": false,
25
+ "source": "built-in defaults",
26
+ "value": "127.0.0.1"
27
+ },
28
+ {
29
+ "key": "Sloppy:Server:KeepAliveEnabled",
30
+ "sensitive": false,
31
+ "source": "built-in defaults",
32
+ "value": true
33
+ },
34
+ {
35
+ "key": "Sloppy:Server:KeepAliveIdleTimeoutMs",
36
+ "sensitive": false,
37
+ "source": "built-in defaults",
38
+ "value": 5000
39
+ },
40
+ {
41
+ "key": "Sloppy:Server:MaxConnections",
42
+ "sensitive": false,
43
+ "source": "built-in defaults",
44
+ "value": 128
45
+ },
46
+ {
47
+ "key": "Sloppy:Server:MaxRequestBodyBytes",
48
+ "sensitive": false,
49
+ "source": "built-in defaults",
50
+ "value": 8192
51
+ },
52
+ {
53
+ "key": "Sloppy:Server:MaxRequestsPerConnection",
54
+ "sensitive": false,
55
+ "source": "built-in defaults",
56
+ "value": 0
57
+ },
58
+ {
59
+ "key": "Sloppy:Server:Port",
60
+ "sensitive": false,
61
+ "source": "built-in defaults",
62
+ "value": 5173
63
+ },
64
+ {
65
+ "key": "Sloppy:Server:RequestTimeoutMs",
66
+ "sensitive": false,
67
+ "source": "built-in defaults",
68
+ "value": 30000
69
+ }
70
+ ],
71
+ "providers": []
72
+ },
73
+ "dataProviders": [],
74
+ "features": {
75
+ "asyncHandlers": false,
76
+ "capabilities": false,
77
+ "dataProviders": false,
78
+ "metadataInference": true,
79
+ "nativeEndpointDispatch": true,
80
+ "nativeJsonDispatch": true,
81
+ "sourceMaps": true,
82
+ "strongPlanMetadata": true
83
+ },
84
+ "handlers": [
85
+ {
86
+ "async": false,
87
+ "displayName": "GET /",
88
+ "exportName": "__sloppy_handler_1",
89
+ "id": 1,
90
+ "source": {
91
+ "column": 17,
92
+ "line": 5,
93
+ "path": "app.js"
94
+ }
95
+ }
96
+ ],
97
+ "kind": "web",
98
+ "modules": [],
99
+ "routeDispatch": {
100
+ "artifact": {
101
+ "hash": "sha256:70ed1f1dc181b6861679851506689cf63c74e8542a785491c373a435d171d264",
102
+ "kind": "slrt",
103
+ "path": "routes.slrt"
104
+ },
105
+ "catchAllRoutes": 0,
106
+ "dispatchStats": {
107
+ "constraints": [],
108
+ "exactStaticPaths": 1,
109
+ "parameterCandidateBuckets": 0,
110
+ "segmentTrieNodes": 0,
111
+ "staticEdgeStrategies": [
112
+ "open-addressed-exact-hash",
113
+ "segment-trie",
114
+ "first-static-segment-bucket-fallback"
115
+ ]
116
+ },
117
+ "endpointCount": 1,
118
+ "fallback": {
119
+ "classicAvailable": true,
120
+ "dynamicRoutes": 0,
121
+ "partialRoutes": 0
122
+ },
123
+ "json": {
124
+ "request": {
125
+ "fallback": 0,
126
+ "generic": 0,
127
+ "materialized": 0,
128
+ "native": 0
129
+ },
130
+ "response": {
131
+ "fallback": 0,
132
+ "generic": 0,
133
+ "native": 0
134
+ }
135
+ },
136
+ "mode": "native-compiled",
137
+ "nativeNoJsEndpoints": 1,
138
+ "parameterRoutes": 0,
139
+ "routeCount": 1,
140
+ "staticRoutes": 1,
141
+ "urlGeneration": true,
142
+ "urlWriters": 0,
143
+ "version": 1
144
+ },
145
+ "routes": [
146
+ {
147
+ "bindings": [],
148
+ "completeness": {
149
+ "reasons": [],
150
+ "status": "complete"
151
+ },
152
+ "dispatch": {
153
+ "endpointId": 1,
154
+ "executionKind": "native-static-text",
155
+ "mode": "native-compiled",
156
+ "specializable": true,
157
+ "strategy": "exact-static-hash"
158
+ },
159
+ "handlerId": 1,
160
+ "jsonRequest": {
161
+ "materialization": "none",
162
+ "mode": "none",
163
+ "unknownFields": "ignore"
164
+ },
165
+ "jsonResponse": {
166
+ "mode": "none",
167
+ "writer": "none"
168
+ },
169
+ "method": "GET",
170
+ "name": null,
171
+ "nativeResponse": {
172
+ "body": "Hello from Sloppy",
173
+ "contentType": "text/plain; charset=utf-8",
174
+ "kind": "text",
175
+ "status": 200
176
+ },
177
+ "pattern": "/",
178
+ "response": {
179
+ "helper": "text",
180
+ "kind": "text",
181
+ "nativeBody": "Hello from Sloppy",
182
+ "status": 200
183
+ },
184
+ "source": {
185
+ "column": 1,
186
+ "line": 5,
187
+ "path": "app.js"
188
+ }
189
+ }
190
+ ],
191
+ "runtimeMinimumVersion": "0.1.0",
192
+ "schemaVersion": 1,
193
+ "sourceFiles": [
194
+ {
195
+ "hash": "sha256:881ad698ba4ef863fb3fddc1166f26726ef5a0a86e1032510131e555d806d1e7",
196
+ "path": "app.js"
197
+ }
198
+ ],
199
+ "sourceMap": {
200
+ "hash": "sha256:f93dea5b1a9b93101d1b718e926ae96d9e57b5b976cdfd0d356e212a917085c6",
201
+ "id": "sloppyc-app-js-map",
202
+ "path": "app.js.map"
203
+ },
204
+ "stdlibVersion": "0.1.0",
205
+ "strongPlan": {
206
+ "compatibility": {
207
+ "schemaVersion": 1,
208
+ "unknownOptionalFields": "ignored",
209
+ "unknownRequiredFeatures": "rejected"
210
+ },
211
+ "evidence": {
212
+ "bindings": false,
213
+ "capabilities": false,
214
+ "effects": false,
215
+ "ffi": false,
216
+ "nativeJsonDispatch": true,
217
+ "providers": false,
218
+ "routeDispatch": true,
219
+ "routes": true,
220
+ "sourceGraph": true
221
+ },
222
+ "profile": "compiler-30-strong-plan",
223
+ "version": 1
224
+ },
225
+ "target": {
226
+ "engine": "v8",
227
+ "platform": "windows-x64"
228
+ }
229
+ }
@@ -0,0 +1,13 @@
1
+ # Config Basic Example
2
+
3
+ This example demonstrates typed config binding, defaults, required values, and
4
+ secret redaction.
5
+
6
+ `AUTH_JWT_SECRET` is referenced as a placeholder and must not be committed as a literal
7
+ secret. Doctor/package metadata should show the required key and redaction category, not
8
+ the value.
9
+
10
+ ## Limitations
11
+
12
+ This example focuses on local typed config and redaction metadata. Hot reload and external
13
+ secret-vault integrations are separate work.
@@ -0,0 +1,13 @@
1
+ import { Sloppy, Results } from "sloppy";
2
+
3
+ const app = Sloppy.create();
4
+
5
+ const auth = app.config.bind("Auth", {
6
+ jwtSecret: { type: "secret", required: false },
7
+ tokenTtlMinutes: { type: "number", default: 60, min: 1, max: 1440 },
8
+ issuer: { type: "string", required: true },
9
+ });
10
+
11
+ app.get("/config", () => Results.text("configuration metadata is Plan-visible"));
12
+
13
+ export default app;
@@ -0,0 +1,7 @@
1
+ {
2
+ "Auth": {
3
+ "JwtSecret": "${AUTH_JWT_SECRET}",
4
+ "TokenTtlMinutes": 60,
5
+ "Issuer": "sloppy.local"
6
+ }
7
+ }
@@ -0,0 +1,9 @@
1
+ # Config Secrets Redaction Example
2
+
3
+ This example demonstrates `app.config.getSecret(...)`. The route returns only the redacted
4
+ display form so source examples and goldens never carry a raw secret value.
5
+
6
+ Build works without `AUTH_JWT_SECRET`. Set `AUTH_JWT_SECRET` before running
7
+ `sloppy doctor` or handler execution if you want the required secret config to
8
+ resolve. Do not replace the placeholder with a literal secret in
9
+ source-controlled files.
@@ -0,0 +1,9 @@
1
+ import { Sloppy, Results } from "sloppy";
2
+
3
+ const app = Sloppy.create();
4
+
5
+ const jwtSecret = app.config.getSecret("Auth:JwtSecret");
6
+
7
+ app.get("/redaction", () => Results.text("secret config value is redacted in metadata"));
8
+
9
+ export default app;
@@ -0,0 +1,5 @@
1
+ {
2
+ "Auth": {
3
+ "JwtSecret": "${AUTH_JWT_SECRET}"
4
+ }
5
+ }
@@ -0,0 +1,7 @@
1
+ # Config Strict Mode Example
2
+
3
+ This example keeps a required `Auth:Issuer` read visible to the compiler and doctor
4
+ without providing a value. It is intended for missing-config diagnostics and package
5
+ configuration checks.
6
+
7
+ Dynamic config keys and reload-on-change are not implemented by this example.
@@ -0,0 +1,10 @@
1
+ import { Sloppy, Results } from "sloppy";
2
+
3
+ const app = Sloppy.create();
4
+
5
+ const issuer = app.config.getString("Auth:Issuer");
6
+ const mode = app.config.getString("Sloppy:Config:Mode", "strict");
7
+
8
+ app.get("/strict-config", () => Results.text("strict config metadata is Plan-visible"));
9
+
10
+ export default app;
@@ -0,0 +1,7 @@
1
+ {
2
+ "Sloppy": {
3
+ "Config": {
4
+ "Mode": "strict"
5
+ }
6
+ }
7
+ }
@@ -0,0 +1,38 @@
1
+ # Configured API Example
2
+
3
+ This is a compile-time source-input/config example for the current Plan metadata subset.
4
+ Run from this directory:
5
+
6
+ ```powershell
7
+ ..\..\build\windows-dev\sloppy.exe run
8
+ ```
9
+
10
+ On a non-V8 build this still compiles and emits `.sloppy\app.plan.json`, then fails before
11
+ serving with the normal V8-required diagnostic. With V8 enabled, it enters the same
12
+ artifact runtime path.
13
+
14
+ The example demonstrates `sloppy.json`, `appsettings.json`, `appsettings.Development.json`, and
15
+ Plan-visible `app.config.getString(...)` reads. The `Development` overlay is present so
16
+ tooling can inspect the selected environment's config requirements. The `/config` handler
17
+ returns static supported-subset JSON because closed-over config values in route
18
+ results are outside this example's current compiler metadata path.
19
+
20
+ Route:
21
+
22
+ - `GET /config`
23
+
24
+ Expected tooling after building artifacts:
25
+
26
+ ```powershell
27
+ ..\..\build\windows-dev\sloppy.exe routes --plan .sloppy\app.plan.json
28
+ ..\..\build\windows-dev\sloppy.exe doctor --plan .sloppy\app.plan.json
29
+ ..\..\build\windows-dev\sloppy.exe capabilities --plan .sloppy\app.plan.json
30
+ ..\..\build\windows-dev\sloppy.exe audit --plan .sloppy\app.plan.json --format json
31
+ ..\..\build\windows-dev\sloppy.exe openapi --plan .sloppy\app.plan.json
32
+ ```
33
+
34
+ ## Limitations
35
+
36
+ This example focuses on the current `--environment` flow and static config reads.
37
+ Arbitrary environment providers and broader secret-management flows are outside
38
+ this slice.
@@ -0,0 +1,12 @@
1
+ import { Sloppy, Results } from "sloppy";
2
+
3
+ const app = Sloppy.create();
4
+ const serviceName = app.config.getString("App:Name", "configured-api");
5
+ const greeting = app.config.getString("App:Greeting", "hello");
6
+
7
+ // Keep the config reads Plan-visible; closed-over config result values are not in the
8
+ // current route-result subset.
9
+ app.get("/config", () => Results.json({ serviceName: "configured-api", greeting: "Plan-visible" }))
10
+ .withName("Config.Get");
11
+
12
+ export default app;