@depup/netlify-cli 24.11.1-depup.1 → 26.2.0-depup.7

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 (298) hide show
  1. package/README.md +49 -34
  2. package/bin/run.js +29 -9
  3. package/changes.json +116 -56
  4. package/dist/commands/base-command.d.ts.map +1 -1
  5. package/dist/commands/base-command.js +22 -6
  6. package/dist/commands/base-command.js.map +1 -1
  7. package/dist/commands/create/create-action.js +1 -1
  8. package/dist/commands/create/create-action.js.map +1 -1
  9. package/dist/commands/database/database.d.ts +0 -15
  10. package/dist/commands/database/database.d.ts.map +1 -1
  11. package/dist/commands/database/database.js +104 -113
  12. package/dist/commands/database/database.js.map +1 -1
  13. package/dist/commands/database/{connect.d.ts → db-connect.d.ts} +1 -1
  14. package/dist/commands/database/db-connect.d.ts.map +1 -0
  15. package/dist/commands/database/{connect.js → db-connect.js} +4 -4
  16. package/dist/commands/database/db-connect.js.map +1 -0
  17. package/dist/commands/database/db-init.d.ts +6 -0
  18. package/dist/commands/database/db-init.d.ts.map +1 -0
  19. package/dist/commands/database/db-init.js +298 -0
  20. package/dist/commands/database/db-init.js.map +1 -0
  21. package/dist/commands/database/{migrate.d.ts → db-migrate.d.ts} +1 -1
  22. package/dist/commands/database/db-migrate.d.ts.map +1 -0
  23. package/dist/commands/database/{migrate.js → db-migrate.js} +13 -4
  24. package/dist/commands/database/db-migrate.js.map +1 -0
  25. package/dist/commands/database/{migration-new.d.ts → db-migration-new.d.ts} +1 -2
  26. package/dist/commands/database/db-migration-new.d.ts.map +1 -0
  27. package/dist/commands/database/{migration-new.js → db-migration-new.js} +43 -45
  28. package/dist/commands/database/db-migration-new.js.map +1 -0
  29. package/dist/commands/database/{migration-pull.d.ts → db-migration-pull.d.ts} +1 -1
  30. package/dist/commands/database/db-migration-pull.d.ts.map +1 -0
  31. package/dist/commands/database/{migration-pull.js → db-migration-pull.js} +49 -24
  32. package/dist/commands/database/db-migration-pull.js.map +1 -0
  33. package/dist/commands/database/db-migrations-reset.d.ts +7 -0
  34. package/dist/commands/database/db-migrations-reset.d.ts.map +1 -0
  35. package/dist/commands/database/db-migrations-reset.js +108 -0
  36. package/dist/commands/database/db-migrations-reset.js.map +1 -0
  37. package/dist/commands/database/{reset.d.ts → db-reset.d.ts} +1 -1
  38. package/dist/commands/database/db-reset.d.ts.map +1 -0
  39. package/dist/commands/database/{reset.js → db-reset.js} +2 -2
  40. package/dist/commands/database/db-reset.js.map +1 -0
  41. package/dist/commands/database/db-status.d.ts +24 -0
  42. package/dist/commands/database/db-status.d.ts.map +1 -0
  43. package/dist/commands/database/db-status.js +348 -0
  44. package/dist/commands/database/db-status.js.map +1 -0
  45. package/dist/commands/database/util/api-errors.d.ts +2 -0
  46. package/dist/commands/database/util/api-errors.d.ts.map +1 -0
  47. package/dist/commands/database/util/api-errors.js +17 -0
  48. package/dist/commands/database/util/api-errors.js.map +1 -0
  49. package/dist/commands/database/util/applied-migrations.d.ts +20 -0
  50. package/dist/commands/database/util/applied-migrations.d.ts.map +1 -0
  51. package/dist/commands/database/util/applied-migrations.js +44 -0
  52. package/dist/commands/database/util/applied-migrations.js.map +1 -0
  53. package/dist/commands/database/util/constants.d.ts +4 -0
  54. package/dist/commands/database/util/constants.d.ts.map +1 -0
  55. package/dist/commands/database/util/constants.js +4 -0
  56. package/dist/commands/database/util/constants.js.map +1 -0
  57. package/dist/commands/database/util/db-connection.d.ts +18 -0
  58. package/dist/commands/database/util/db-connection.d.ts.map +1 -0
  59. package/dist/commands/database/util/db-connection.js +117 -0
  60. package/dist/commands/database/util/db-connection.js.map +1 -0
  61. package/dist/commands/database/util/init-data.d.ts +8 -0
  62. package/dist/commands/database/util/init-data.d.ts.map +1 -0
  63. package/dist/commands/database/util/init-data.js +47 -0
  64. package/dist/commands/database/util/init-data.js.map +1 -0
  65. package/dist/commands/database/util/meta-commands.d.ts.map +1 -0
  66. package/dist/commands/database/{meta-commands.js → util/meta-commands.js} +1 -1
  67. package/dist/commands/database/util/meta-commands.js.map +1 -0
  68. package/dist/commands/database/util/migrations-path.d.ts +4 -0
  69. package/dist/commands/database/util/migrations-path.d.ts.map +1 -0
  70. package/dist/commands/database/util/migrations-path.js +19 -0
  71. package/dist/commands/database/util/migrations-path.js.map +1 -0
  72. package/dist/commands/database/util/package-json.d.ts +2 -0
  73. package/dist/commands/database/util/package-json.d.ts.map +1 -0
  74. package/dist/commands/database/util/package-json.js +16 -0
  75. package/dist/commands/database/util/package-json.js.map +1 -0
  76. package/dist/commands/database/util/packages.d.ts +15 -0
  77. package/dist/commands/database/util/packages.d.ts.map +1 -0
  78. package/dist/commands/database/util/packages.js +59 -0
  79. package/dist/commands/database/util/packages.js.map +1 -0
  80. package/dist/commands/database/util/paths.d.ts +2 -0
  81. package/dist/commands/database/util/paths.d.ts.map +1 -0
  82. package/dist/commands/database/util/paths.js +13 -0
  83. package/dist/commands/database/util/paths.js.map +1 -0
  84. package/dist/commands/database/util/pg-client-executor.d.ts.map +1 -0
  85. package/dist/commands/database/util/pg-client-executor.js.map +1 -0
  86. package/dist/commands/database/util/psql-formatter.d.ts.map +1 -0
  87. package/dist/commands/database/util/psql-formatter.js.map +1 -0
  88. package/dist/commands/database/util/spawn-async.d.ts +3 -0
  89. package/dist/commands/database/util/spawn-async.d.ts.map +1 -0
  90. package/dist/commands/database/util/spawn-async.js +16 -0
  91. package/dist/commands/database/util/spawn-async.js.map +1 -0
  92. package/dist/commands/database/util/timestamp.d.ts +2 -0
  93. package/dist/commands/database/util/timestamp.d.ts.map +1 -0
  94. package/dist/commands/database/util/timestamp.js +7 -0
  95. package/dist/commands/database/util/timestamp.js.map +1 -0
  96. package/dist/commands/deploy/deploy.d.ts.map +1 -1
  97. package/dist/commands/deploy/deploy.js +16 -5
  98. package/dist/commands/deploy/deploy.js.map +1 -1
  99. package/dist/commands/dev/dev.d.ts.map +1 -1
  100. package/dist/commands/dev/dev.js +2 -0
  101. package/dist/commands/dev/dev.js.map +1 -1
  102. package/dist/commands/dev/programmatic-netlify-dev.d.ts +2 -1
  103. package/dist/commands/dev/programmatic-netlify-dev.d.ts.map +1 -1
  104. package/dist/commands/dev/programmatic-netlify-dev.js +3 -4
  105. package/dist/commands/dev/programmatic-netlify-dev.js.map +1 -1
  106. package/dist/commands/functions/functions-create.d.ts +1 -1
  107. package/dist/commands/functions/functions-create.d.ts.map +1 -1
  108. package/dist/commands/functions/functions-create.js +80 -17
  109. package/dist/commands/functions/functions-create.js.map +1 -1
  110. package/dist/commands/functions/functions.d.ts.map +1 -1
  111. package/dist/commands/functions/functions.js +2 -0
  112. package/dist/commands/functions/functions.js.map +1 -1
  113. package/dist/commands/init/init.js +1 -1
  114. package/dist/commands/init/init.js.map +1 -1
  115. package/dist/commands/link/link.js +1 -1
  116. package/dist/commands/link/link.js.map +1 -1
  117. package/dist/commands/login/login.d.ts.map +1 -1
  118. package/dist/commands/login/login.js +0 -6
  119. package/dist/commands/login/login.js.map +1 -1
  120. package/dist/commands/logs/index.d.ts +0 -2
  121. package/dist/commands/logs/index.d.ts.map +1 -1
  122. package/dist/commands/logs/index.js +95 -29
  123. package/dist/commands/logs/index.js.map +1 -1
  124. package/dist/commands/logs/log-api.d.ts +64 -0
  125. package/dist/commands/logs/log-api.d.ts.map +1 -0
  126. package/dist/commands/logs/log-api.js +200 -0
  127. package/dist/commands/logs/log-api.js.map +1 -0
  128. package/dist/commands/logs/logs.d.ts +4 -0
  129. package/dist/commands/logs/logs.d.ts.map +1 -0
  130. package/dist/commands/logs/logs.js +302 -0
  131. package/dist/commands/logs/logs.js.map +1 -0
  132. package/dist/commands/logs/sources/deploy.d.ts +13 -0
  133. package/dist/commands/logs/sources/deploy.d.ts.map +1 -0
  134. package/dist/commands/logs/sources/deploy.js +71 -0
  135. package/dist/commands/logs/sources/deploy.js.map +1 -0
  136. package/dist/commands/logs/sources/edge-functions.d.ts +17 -0
  137. package/dist/commands/logs/sources/edge-functions.d.ts.map +1 -0
  138. package/dist/commands/logs/sources/edge-functions.js +71 -0
  139. package/dist/commands/logs/sources/edge-functions.js.map +1 -0
  140. package/dist/commands/logs/sources/functions.d.ts +22 -0
  141. package/dist/commands/logs/sources/functions.d.ts.map +1 -0
  142. package/dist/commands/logs/sources/functions.js +75 -0
  143. package/dist/commands/logs/sources/functions.js.map +1 -0
  144. package/dist/commands/main.d.ts.map +1 -1
  145. package/dist/commands/main.js +38 -19
  146. package/dist/commands/main.js.map +1 -1
  147. package/dist/commands/serve/serve.d.ts.map +1 -1
  148. package/dist/commands/serve/serve.js +1 -0
  149. package/dist/commands/serve/serve.js.map +1 -1
  150. package/dist/commands/sites/sites-create.js +1 -1
  151. package/dist/commands/sites/sites-create.js.map +1 -1
  152. package/dist/lib/blobs/blobs.js +2 -2
  153. package/dist/lib/blobs/blobs.js.map +1 -1
  154. package/dist/lib/edge-functions/proxy.d.ts +2 -1
  155. package/dist/lib/edge-functions/proxy.d.ts.map +1 -1
  156. package/dist/lib/edge-functions/proxy.js +6 -2
  157. package/dist/lib/edge-functions/proxy.js.map +1 -1
  158. package/dist/lib/edge-functions/registry.d.ts +5 -1
  159. package/dist/lib/edge-functions/registry.d.ts.map +1 -1
  160. package/dist/lib/edge-functions/registry.js +24 -3
  161. package/dist/lib/edge-functions/registry.js.map +1 -1
  162. package/dist/lib/extensions.js +1 -1
  163. package/dist/lib/extensions.js.map +1 -1
  164. package/dist/lib/functions/netlify-function.d.ts +2 -2
  165. package/dist/lib/functions/netlify-function.d.ts.map +1 -1
  166. package/dist/lib/functions/netlify-function.js +16 -5
  167. package/dist/lib/functions/netlify-function.js.map +1 -1
  168. package/dist/lib/functions/registry.d.ts.map +1 -1
  169. package/dist/lib/functions/registry.js +1 -1
  170. package/dist/lib/functions/registry.js.map +1 -1
  171. package/dist/lib/functions/runtimes/index.d.ts +1 -0
  172. package/dist/lib/functions/runtimes/index.d.ts.map +1 -1
  173. package/dist/lib/functions/runtimes/index.js.map +1 -1
  174. package/dist/lib/functions/runtimes/js/builders/zisi.d.ts +1 -0
  175. package/dist/lib/functions/runtimes/js/builders/zisi.d.ts.map +1 -1
  176. package/dist/lib/functions/runtimes/js/builders/zisi.js +2 -1
  177. package/dist/lib/functions/runtimes/js/builders/zisi.js.map +1 -1
  178. package/dist/lib/functions/runtimes/js/index.d.ts.map +1 -1
  179. package/dist/tsconfig.build.tsbuildinfo +1 -1
  180. package/dist/utils/deploy/hash-fns.d.ts.map +1 -1
  181. package/dist/utils/deploy/hash-fns.js +12 -1
  182. package/dist/utils/deploy/hash-fns.js.map +1 -1
  183. package/dist/utils/deploy/upload-source-zip.d.ts.map +1 -1
  184. package/dist/utils/deploy/upload-source-zip.js +20 -11
  185. package/dist/utils/deploy/upload-source-zip.js.map +1 -1
  186. package/dist/utils/dev.js +1 -1
  187. package/dist/utils/dev.js.map +1 -1
  188. package/dist/utils/framework-server.d.ts.map +1 -1
  189. package/dist/utils/framework-server.js +2 -1
  190. package/dist/utils/framework-server.js.map +1 -1
  191. package/dist/utils/init/utils.d.ts.map +1 -1
  192. package/dist/utils/live-tunnel.js +2 -2
  193. package/dist/utils/live-tunnel.js.map +1 -1
  194. package/dist/utils/object-utilities.d.ts +64 -0
  195. package/dist/utils/object-utilities.d.ts.map +1 -0
  196. package/dist/utils/object-utilities.js +93 -0
  197. package/dist/utils/object-utilities.js.map +1 -0
  198. package/dist/utils/open-browser.d.ts +1 -1
  199. package/dist/utils/open-browser.d.ts.map +1 -1
  200. package/dist/utils/open-browser.js +4 -2
  201. package/dist/utils/open-browser.js.map +1 -1
  202. package/dist/utils/proxy-server.d.ts +2 -1
  203. package/dist/utils/proxy-server.d.ts.map +1 -1
  204. package/dist/utils/proxy-server.js +2 -1
  205. package/dist/utils/proxy-server.js.map +1 -1
  206. package/dist/utils/proxy.d.ts +2 -1
  207. package/dist/utils/proxy.d.ts.map +1 -1
  208. package/dist/utils/proxy.js +11 -2
  209. package/dist/utils/proxy.js.map +1 -1
  210. package/dist/utils/shell.d.ts +7 -0
  211. package/dist/utils/shell.d.ts.map +1 -1
  212. package/dist/utils/shell.js +36 -7
  213. package/dist/utils/shell.js.map +1 -1
  214. package/dist/utils/telemetry/index.d.ts +1 -1
  215. package/dist/utils/telemetry/index.d.ts.map +1 -1
  216. package/dist/utils/telemetry/index.js +1 -1
  217. package/dist/utils/telemetry/index.js.map +1 -1
  218. package/dist/utils/telemetry/report-error.d.ts +1 -0
  219. package/dist/utils/telemetry/report-error.d.ts.map +1 -1
  220. package/dist/utils/telemetry/report-error.js +15 -2
  221. package/dist/utils/telemetry/report-error.js.map +1 -1
  222. package/dist/utils/zip.d.ts +4 -0
  223. package/dist/utils/zip.d.ts.map +1 -0
  224. package/dist/utils/zip.js +114 -0
  225. package/dist/utils/zip.js.map +1 -0
  226. package/functions-templates/javascript/scheduled-function/package.json +1 -1
  227. package/functions-templates/typescript/database/.netlify-function-template.mjs +5 -0
  228. package/functions-templates/typescript/database/package-lock.json +357 -0
  229. package/functions-templates/typescript/database/package.json +23 -0
  230. package/functions-templates/typescript/database/{{name}}.mts +24 -0
  231. package/functions-templates/typescript/database-drizzle/.netlify-function-template.mjs +5 -0
  232. package/functions-templates/typescript/database-drizzle/package-lock.json +520 -0
  233. package/functions-templates/typescript/database-drizzle/package.json +25 -0
  234. package/functions-templates/typescript/database-drizzle/{{name}}.mts +26 -0
  235. package/functions-templates/typescript/hello-world/package-lock.json +15 -15
  236. package/functions-templates/typescript/hello-world/package.json +1 -1
  237. package/functions-templates/typescript/scheduled-function/package.json +1 -1
  238. package/package.json +267 -150
  239. package/scripts/netlifyPackage.js +2 -26
  240. package/dist/commands/database/connect.d.ts.map +0 -1
  241. package/dist/commands/database/connect.js.map +0 -1
  242. package/dist/commands/database/constants.d.ts +0 -4
  243. package/dist/commands/database/constants.d.ts.map +0 -1
  244. package/dist/commands/database/constants.js +0 -4
  245. package/dist/commands/database/constants.js.map +0 -1
  246. package/dist/commands/database/db-connection.d.ts +0 -15
  247. package/dist/commands/database/db-connection.d.ts.map +0 -1
  248. package/dist/commands/database/db-connection.js +0 -65
  249. package/dist/commands/database/db-connection.js.map +0 -1
  250. package/dist/commands/database/drizzle.d.ts +0 -3
  251. package/dist/commands/database/drizzle.d.ts.map +0 -1
  252. package/dist/commands/database/drizzle.js +0 -96
  253. package/dist/commands/database/drizzle.js.map +0 -1
  254. package/dist/commands/database/init.d.ts +0 -9
  255. package/dist/commands/database/init.d.ts.map +0 -1
  256. package/dist/commands/database/init.js +0 -124
  257. package/dist/commands/database/init.js.map +0 -1
  258. package/dist/commands/database/meta-commands.d.ts.map +0 -1
  259. package/dist/commands/database/meta-commands.js.map +0 -1
  260. package/dist/commands/database/migrate.d.ts.map +0 -1
  261. package/dist/commands/database/migrate.js.map +0 -1
  262. package/dist/commands/database/migration-new.d.ts.map +0 -1
  263. package/dist/commands/database/migration-new.js.map +0 -1
  264. package/dist/commands/database/migration-pull.d.ts.map +0 -1
  265. package/dist/commands/database/migration-pull.js.map +0 -1
  266. package/dist/commands/database/pg-client-executor.d.ts.map +0 -1
  267. package/dist/commands/database/pg-client-executor.js.map +0 -1
  268. package/dist/commands/database/psql-formatter.d.ts.map +0 -1
  269. package/dist/commands/database/psql-formatter.js.map +0 -1
  270. package/dist/commands/database/reset.d.ts.map +0 -1
  271. package/dist/commands/database/reset.js.map +0 -1
  272. package/dist/commands/database/status.d.ts +0 -4
  273. package/dist/commands/database/status.d.ts.map +0 -1
  274. package/dist/commands/database/status.js +0 -71
  275. package/dist/commands/database/status.js.map +0 -1
  276. package/dist/commands/database/utils.d.ts +0 -75
  277. package/dist/commands/database/utils.d.ts.map +0 -1
  278. package/dist/commands/database/utils.js +0 -172
  279. package/dist/commands/database/utils.js.map +0 -1
  280. package/dist/commands/logs/functions.d.ts +0 -4
  281. package/dist/commands/logs/functions.d.ts.map +0 -1
  282. package/dist/commands/logs/functions.js +0 -79
  283. package/dist/commands/logs/functions.js.map +0 -1
  284. package/functions-templates/go/hello-world/.netlify-function-template.mjs +0 -6
  285. package/functions-templates/go/hello-world/go.mod +0 -5
  286. package/functions-templates/go/hello-world/go.sum +0 -22
  287. package/functions-templates/go/hello-world/main.go +0 -24
  288. package/functions-templates/rust/hello-world/.netlify-function-template.mjs +0 -6
  289. package/functions-templates/rust/hello-world/Cargo.lock +0 -1149
  290. package/functions-templates/rust/hello-world/Cargo.toml +0 -14
  291. package/functions-templates/rust/hello-world/src/main.rs +0 -29
  292. package/npm-shrinkwrap.json +0 -12720
  293. package/scripts/prepublishOnly.js +0 -29
  294. /package/dist/commands/database/{meta-commands.d.ts → util/meta-commands.d.ts} +0 -0
  295. /package/dist/commands/database/{pg-client-executor.d.ts → util/pg-client-executor.d.ts} +0 -0
  296. /package/dist/commands/database/{pg-client-executor.js → util/pg-client-executor.js} +0 -0
  297. /package/dist/commands/database/{psql-formatter.d.ts → util/psql-formatter.d.ts} +0 -0
  298. /package/dist/commands/database/{psql-formatter.js → util/psql-formatter.js} +0 -0
@@ -0,0 +1,357 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "{{name}}",
9
+ "version": "1.0.0",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "@netlify/database": "latest",
13
+ "@netlify/functions": "^5.3.0",
14
+ "@types/node": "^22.0.0",
15
+ "typescript": "^4.5.5"
16
+ }
17
+ },
18
+ "node_modules/@neondatabase/serverless": {
19
+ "version": "1.1.0",
20
+ "resolved": "https://registry.npmjs.org/@neondatabase/serverless/-/serverless-1.1.0.tgz",
21
+ "integrity": "sha512-r3ZZhRjEcfEdKIZnoB1RusNgvHuaBRqfCzV4Gi+5A9yUX0S4HTws/ASWqt13wL4y4I+0rqsWGdA2w7EQXHi3+Q==",
22
+ "license": "MIT",
23
+ "engines": {
24
+ "node": ">=19.0.0"
25
+ }
26
+ },
27
+ "node_modules/@netlify/database": {
28
+ "version": "0.7.0",
29
+ "resolved": "https://registry.npmjs.org/@netlify/database/-/database-0.7.0.tgz",
30
+ "integrity": "sha512-oCJVGauiLIMuxPSF4QZV+F3weU3GnclCRQcqU0lSrNqXmxJXiIehomaXHVzXGOZ7QJhVb/RRc2K1n9qIP3EwJg==",
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "@neondatabase/serverless": "^1.1.0",
34
+ "@netlify/runtime-utils": "2.3.0",
35
+ "pg": "^8.13.0",
36
+ "waddler": "^0.1.1",
37
+ "ws": "^8.18.0"
38
+ },
39
+ "engines": {
40
+ "node": ">=20.6.1"
41
+ }
42
+ },
43
+ "node_modules/@netlify/functions": {
44
+ "version": "5.3.0",
45
+ "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-5.3.0.tgz",
46
+ "integrity": "sha512-FP+xCoZMkMOUsKa4UdG/oiK/2md1/TxuXvqqieaMVMgDbFFMaHI8h0oHCViUY73kPbKV6HyzayaSXGYXKpBSoQ==",
47
+ "license": "MIT",
48
+ "dependencies": {
49
+ "@netlify/types": "2.8.0"
50
+ },
51
+ "engines": {
52
+ "node": ">=18.0.0"
53
+ }
54
+ },
55
+ "node_modules/@netlify/runtime-utils": {
56
+ "version": "2.3.0",
57
+ "resolved": "https://registry.npmjs.org/@netlify/runtime-utils/-/runtime-utils-2.3.0.tgz",
58
+ "integrity": "sha512-cW8weDvsKV7zfia2m5EcBy6KILGoPD+eYZ3qWNGnIo05DGF28goPES0xKSDkNYgAF/2rRSIhie2qcBhbGVgSRg==",
59
+ "license": "MIT",
60
+ "engines": {
61
+ "node": "^18.14.0 || >=20"
62
+ }
63
+ },
64
+ "node_modules/@netlify/types": {
65
+ "version": "2.8.0",
66
+ "resolved": "https://registry.npmjs.org/@netlify/types/-/types-2.8.0.tgz",
67
+ "integrity": "sha512-8/g0Pt6y6wXj5Ia5eeYLiXhRfWeqZXGXpGFeCiiQdUOem+FPtXdA4+YdGxqzWc7D0AvptKSO01KGeeVWHSu8Kg==",
68
+ "license": "MIT",
69
+ "engines": {
70
+ "node": "^18.14.0 || >=20"
71
+ }
72
+ },
73
+ "node_modules/@types/node": {
74
+ "version": "22.19.17",
75
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz",
76
+ "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==",
77
+ "license": "MIT",
78
+ "dependencies": {
79
+ "undici-types": "~6.21.0"
80
+ }
81
+ },
82
+ "node_modules/pg": {
83
+ "version": "8.20.0",
84
+ "resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz",
85
+ "integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==",
86
+ "license": "MIT",
87
+ "dependencies": {
88
+ "pg-connection-string": "^2.12.0",
89
+ "pg-pool": "^3.13.0",
90
+ "pg-protocol": "^1.13.0",
91
+ "pg-types": "2.2.0",
92
+ "pgpass": "1.0.5"
93
+ },
94
+ "engines": {
95
+ "node": ">= 16.0.0"
96
+ },
97
+ "optionalDependencies": {
98
+ "pg-cloudflare": "^1.3.0"
99
+ },
100
+ "peerDependencies": {
101
+ "pg-native": ">=3.0.1"
102
+ },
103
+ "peerDependenciesMeta": {
104
+ "pg-native": {
105
+ "optional": true
106
+ }
107
+ }
108
+ },
109
+ "node_modules/pg-cloudflare": {
110
+ "version": "1.3.0",
111
+ "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz",
112
+ "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==",
113
+ "license": "MIT",
114
+ "optional": true
115
+ },
116
+ "node_modules/pg-connection-string": {
117
+ "version": "2.12.0",
118
+ "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.12.0.tgz",
119
+ "integrity": "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==",
120
+ "license": "MIT"
121
+ },
122
+ "node_modules/pg-int8": {
123
+ "version": "1.0.1",
124
+ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
125
+ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
126
+ "license": "ISC",
127
+ "engines": {
128
+ "node": ">=4.0.0"
129
+ }
130
+ },
131
+ "node_modules/pg-pool": {
132
+ "version": "3.13.0",
133
+ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.13.0.tgz",
134
+ "integrity": "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==",
135
+ "license": "MIT",
136
+ "peerDependencies": {
137
+ "pg": ">=8.0"
138
+ }
139
+ },
140
+ "node_modules/pg-protocol": {
141
+ "version": "1.13.0",
142
+ "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz",
143
+ "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==",
144
+ "license": "MIT"
145
+ },
146
+ "node_modules/pg-types": {
147
+ "version": "2.2.0",
148
+ "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
149
+ "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
150
+ "license": "MIT",
151
+ "dependencies": {
152
+ "pg-int8": "1.0.1",
153
+ "postgres-array": "~2.0.0",
154
+ "postgres-bytea": "~1.0.0",
155
+ "postgres-date": "~1.0.4",
156
+ "postgres-interval": "^1.1.0"
157
+ },
158
+ "engines": {
159
+ "node": ">=4"
160
+ }
161
+ },
162
+ "node_modules/pgpass": {
163
+ "version": "1.0.5",
164
+ "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
165
+ "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
166
+ "license": "MIT",
167
+ "dependencies": {
168
+ "split2": "^4.1.0"
169
+ }
170
+ },
171
+ "node_modules/postgres-array": {
172
+ "version": "2.0.0",
173
+ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
174
+ "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
175
+ "license": "MIT",
176
+ "engines": {
177
+ "node": ">=4"
178
+ }
179
+ },
180
+ "node_modules/postgres-bytea": {
181
+ "version": "1.0.1",
182
+ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz",
183
+ "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==",
184
+ "license": "MIT",
185
+ "engines": {
186
+ "node": ">=0.10.0"
187
+ }
188
+ },
189
+ "node_modules/postgres-date": {
190
+ "version": "1.0.7",
191
+ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
192
+ "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
193
+ "license": "MIT",
194
+ "engines": {
195
+ "node": ">=0.10.0"
196
+ }
197
+ },
198
+ "node_modules/postgres-interval": {
199
+ "version": "1.2.0",
200
+ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
201
+ "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
202
+ "license": "MIT",
203
+ "dependencies": {
204
+ "xtend": "^4.0.0"
205
+ },
206
+ "engines": {
207
+ "node": ">=0.10.0"
208
+ }
209
+ },
210
+ "node_modules/split2": {
211
+ "version": "4.2.0",
212
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
213
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
214
+ "license": "ISC",
215
+ "engines": {
216
+ "node": ">= 10.x"
217
+ }
218
+ },
219
+ "node_modules/typescript": {
220
+ "version": "4.9.5",
221
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
222
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
223
+ "license": "Apache-2.0",
224
+ "bin": {
225
+ "tsc": "bin/tsc",
226
+ "tsserver": "bin/tsserver"
227
+ },
228
+ "engines": {
229
+ "node": ">=4.2.0"
230
+ }
231
+ },
232
+ "node_modules/undici-types": {
233
+ "version": "6.21.0",
234
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
235
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
236
+ "license": "MIT"
237
+ },
238
+ "node_modules/waddler": {
239
+ "version": "0.1.1",
240
+ "resolved": "https://registry.npmjs.org/waddler/-/waddler-0.1.1.tgz",
241
+ "integrity": "sha512-lBJXYFBLEpYe+scAeCJmLj6Iqweuq1whM6Am3I9WfopOCFxvKz8Nq5hXoy8/b3zwJqHIQMglFIvM4skRydSpZg==",
242
+ "license": "MIT",
243
+ "peerDependencies": {
244
+ "@clickhouse/client": "^1.11.2",
245
+ "@duckdb/node-api": "^1.1.2-alpha.4",
246
+ "@electric-sql/pglite": "^0.2.17",
247
+ "@libsql/client": "^0.15.4",
248
+ "@libsql/client-wasm": "^0.15.4",
249
+ "@neondatabase/serverless": "^1.0.0",
250
+ "@planetscale/database": "^1.19.0",
251
+ "@tidbcloud/serverless": "^0.2.0",
252
+ "@vercel/postgres": "^0.10.0",
253
+ "@xata.io/client": "^0.30.1",
254
+ "better-sqlite3": "^11.9.1",
255
+ "bun-types": "*",
256
+ "duckdb": "^1.2.1",
257
+ "gel": "^2.0.2",
258
+ "mysql2": "^3.14.0",
259
+ "pg": "^8.14.0",
260
+ "pg-query-stream": "^4.8.0",
261
+ "postgres": "^3.4.5"
262
+ },
263
+ "peerDependenciesMeta": {
264
+ "@clickhouse/client": {
265
+ "optional": true
266
+ },
267
+ "@cloudflare/workers-types": {
268
+ "optional": true
269
+ },
270
+ "@duckdb/node-api": {
271
+ "optional": true
272
+ },
273
+ "@electric-sql/pglite": {
274
+ "optional": true
275
+ },
276
+ "@libsql/client": {
277
+ "optional": true
278
+ },
279
+ "@libsql/client-wasm": {
280
+ "optional": true
281
+ },
282
+ "@neondatabase/serverless": {
283
+ "optional": true
284
+ },
285
+ "@op-engineering/op-sqlite": {
286
+ "optional": true
287
+ },
288
+ "@planetscale/database": {
289
+ "optional": true
290
+ },
291
+ "@tidbcloud/serverless": {
292
+ "optional": true
293
+ },
294
+ "@vercel/postgres": {
295
+ "optional": true
296
+ },
297
+ "@xata.io/client": {
298
+ "optional": true
299
+ },
300
+ "better-sqlite3": {
301
+ "optional": true
302
+ },
303
+ "bun-types": {
304
+ "optional": true
305
+ },
306
+ "duckdb": {
307
+ "optional": true
308
+ },
309
+ "gel": {
310
+ "optional": true
311
+ },
312
+ "mysql2": {
313
+ "optional": true
314
+ },
315
+ "pg": {
316
+ "optional": true
317
+ },
318
+ "pg-query-stream": {
319
+ "optional": true
320
+ },
321
+ "postgres": {
322
+ "optional": true
323
+ }
324
+ }
325
+ },
326
+ "node_modules/ws": {
327
+ "version": "8.21.0",
328
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
329
+ "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
330
+ "license": "MIT",
331
+ "engines": {
332
+ "node": ">=10.0.0"
333
+ },
334
+ "peerDependencies": {
335
+ "bufferutil": "^4.0.1",
336
+ "utf-8-validate": ">=5.0.2"
337
+ },
338
+ "peerDependenciesMeta": {
339
+ "bufferutil": {
340
+ "optional": true
341
+ },
342
+ "utf-8-validate": {
343
+ "optional": true
344
+ }
345
+ }
346
+ },
347
+ "node_modules/xtend": {
348
+ "version": "4.0.2",
349
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
350
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
351
+ "license": "MIT",
352
+ "engines": {
353
+ "node": ">=0.4"
354
+ }
355
+ }
356
+ }
357
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "version": "1.0.0",
4
+ "description": "netlify functions:create - query Netlify Database with raw SQL",
5
+ "main": "{{name}}.mts",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [
10
+ "netlify",
11
+ "serverless",
12
+ "typescript",
13
+ "database"
14
+ ],
15
+ "author": "Netlify",
16
+ "license": "MIT",
17
+ "dependencies": {
18
+ "@netlify/database": "latest",
19
+ "@netlify/functions": "^5.3.0",
20
+ "@types/node": "^22.0.0",
21
+ "typescript": "^4.5.5"
22
+ }
23
+ }
@@ -0,0 +1,24 @@
1
+ import { getDatabase } from '@netlify/database'
2
+
3
+ export default async () => {
4
+ try {
5
+ const db = getDatabase()
6
+ const planets = await db.sql`SELECT * FROM planets ORDER BY mass_kg`
7
+
8
+ return Response.json({ planets })
9
+ } catch (error) {
10
+ const details = error instanceof Error ? error.message : String(error)
11
+
12
+ return Response.json(
13
+ {
14
+ error: "Couldn't query the database. If you haven't set up the schema yet, run `netlify database init`.",
15
+ details,
16
+ },
17
+ { status: 500 },
18
+ )
19
+ }
20
+ }
21
+
22
+ export const config = {
23
+ path: '/planets',
24
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ name: 'database-drizzle',
3
+ description: 'Query a Netlify Database table with Drizzle ORM',
4
+ functionType: 'serverless',
5
+ }