netlify-cli 25.5.0 → 25.6.1

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 (54) hide show
  1. package/dist/commands/database/database.d.ts.map +1 -1
  2. package/dist/commands/database/database.js +7 -12
  3. package/dist/commands/database/database.js.map +1 -1
  4. package/dist/commands/database/db-init.d.ts +6 -0
  5. package/dist/commands/database/db-init.d.ts.map +1 -0
  6. package/dist/commands/database/db-init.js +280 -0
  7. package/dist/commands/database/db-init.js.map +1 -0
  8. package/dist/commands/database/db-migration-new.d.ts.map +1 -1
  9. package/dist/commands/database/db-migration-new.js +2 -10
  10. package/dist/commands/database/db-migration-new.js.map +1 -1
  11. package/dist/commands/database/db-status.d.ts.map +1 -1
  12. package/dist/commands/database/db-status.js +6 -16
  13. package/dist/commands/database/db-status.js.map +1 -1
  14. package/dist/commands/database/util/db-connection.d.ts +1 -0
  15. package/dist/commands/database/util/db-connection.d.ts.map +1 -1
  16. package/dist/commands/database/util/db-connection.js +55 -7
  17. package/dist/commands/database/util/db-connection.js.map +1 -1
  18. package/dist/commands/database/util/init-data.d.ts +8 -0
  19. package/dist/commands/database/util/init-data.d.ts.map +1 -0
  20. package/dist/commands/database/util/init-data.js +47 -0
  21. package/dist/commands/database/util/init-data.js.map +1 -0
  22. package/dist/commands/database/util/package-json.d.ts +2 -0
  23. package/dist/commands/database/util/package-json.d.ts.map +1 -0
  24. package/dist/commands/database/util/package-json.js +16 -0
  25. package/dist/commands/database/util/package-json.js.map +1 -0
  26. package/dist/commands/database/util/packages.d.ts +15 -0
  27. package/dist/commands/database/util/packages.d.ts.map +1 -0
  28. package/dist/commands/database/util/packages.js +59 -0
  29. package/dist/commands/database/util/packages.js.map +1 -0
  30. package/dist/commands/database/util/paths.d.ts +2 -0
  31. package/dist/commands/database/util/paths.d.ts.map +1 -0
  32. package/dist/commands/database/util/paths.js +13 -0
  33. package/dist/commands/database/util/paths.js.map +1 -0
  34. package/dist/commands/database/util/timestamp.d.ts +2 -0
  35. package/dist/commands/database/util/timestamp.d.ts.map +1 -0
  36. package/dist/commands/database/util/timestamp.js +7 -0
  37. package/dist/commands/database/util/timestamp.js.map +1 -0
  38. package/dist/commands/functions/functions-create.d.ts +1 -1
  39. package/dist/commands/functions/functions-create.d.ts.map +1 -1
  40. package/dist/commands/functions/functions-create.js +56 -2
  41. package/dist/commands/functions/functions-create.js.map +1 -1
  42. package/dist/commands/functions/functions.d.ts.map +1 -1
  43. package/dist/commands/functions/functions.js +2 -0
  44. package/dist/commands/functions/functions.js.map +1 -1
  45. package/dist/tsconfig.build.tsbuildinfo +1 -1
  46. package/functions-templates/typescript/database/.netlify-function-template.mjs +5 -0
  47. package/functions-templates/typescript/database/package-lock.json +357 -0
  48. package/functions-templates/typescript/database/package.json +23 -0
  49. package/functions-templates/typescript/database/{{name}}.mts +24 -0
  50. package/functions-templates/typescript/database-drizzle/.netlify-function-template.mjs +5 -0
  51. package/functions-templates/typescript/database-drizzle/package-lock.json +520 -0
  52. package/functions-templates/typescript/database-drizzle/package.json +25 -0
  53. package/functions-templates/typescript/database-drizzle/{{name}}.mts +26 -0
  54. package/package.json +6 -5
@@ -0,0 +1,520 @@
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.2.0",
14
+ "@types/node": "^22.0.0",
15
+ "drizzle-orm": "beta",
16
+ "typescript": "^4.5.5"
17
+ }
18
+ },
19
+ "node_modules/@neondatabase/serverless": {
20
+ "version": "1.1.0",
21
+ "resolved": "https://registry.npmjs.org/@neondatabase/serverless/-/serverless-1.1.0.tgz",
22
+ "integrity": "sha512-r3ZZhRjEcfEdKIZnoB1RusNgvHuaBRqfCzV4Gi+5A9yUX0S4HTws/ASWqt13wL4y4I+0rqsWGdA2w7EQXHi3+Q==",
23
+ "license": "MIT",
24
+ "engines": {
25
+ "node": ">=19.0.0"
26
+ }
27
+ },
28
+ "node_modules/@netlify/database": {
29
+ "version": "0.7.0",
30
+ "resolved": "https://registry.npmjs.org/@netlify/database/-/database-0.7.0.tgz",
31
+ "integrity": "sha512-oCJVGauiLIMuxPSF4QZV+F3weU3GnclCRQcqU0lSrNqXmxJXiIehomaXHVzXGOZ7QJhVb/RRc2K1n9qIP3EwJg==",
32
+ "license": "MIT",
33
+ "dependencies": {
34
+ "@neondatabase/serverless": "^1.1.0",
35
+ "@netlify/runtime-utils": "2.3.0",
36
+ "pg": "^8.13.0",
37
+ "waddler": "^0.1.1",
38
+ "ws": "^8.18.0"
39
+ },
40
+ "engines": {
41
+ "node": ">=20.6.1"
42
+ }
43
+ },
44
+ "node_modules/@netlify/functions": {
45
+ "version": "5.2.0",
46
+ "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-5.2.0.tgz",
47
+ "integrity": "sha512-Pj93qeQd1tkQ5xm9gWJZmBf/1riLYqYHc0OzFukrJomrj82Ott53Rr/Q88H1ms5cF+P5QXRKWmA2JSxSybKfjA==",
48
+ "license": "MIT",
49
+ "dependencies": {
50
+ "@netlify/types": "2.6.0"
51
+ },
52
+ "engines": {
53
+ "node": ">=18.0.0"
54
+ }
55
+ },
56
+ "node_modules/@netlify/runtime-utils": {
57
+ "version": "2.3.0",
58
+ "resolved": "https://registry.npmjs.org/@netlify/runtime-utils/-/runtime-utils-2.3.0.tgz",
59
+ "integrity": "sha512-cW8weDvsKV7zfia2m5EcBy6KILGoPD+eYZ3qWNGnIo05DGF28goPES0xKSDkNYgAF/2rRSIhie2qcBhbGVgSRg==",
60
+ "license": "MIT",
61
+ "engines": {
62
+ "node": "^18.14.0 || >=20"
63
+ }
64
+ },
65
+ "node_modules/@netlify/types": {
66
+ "version": "2.6.0",
67
+ "resolved": "https://registry.npmjs.org/@netlify/types/-/types-2.6.0.tgz",
68
+ "integrity": "sha512-yD20EizHJDQxajJ66Vo8RTwLwR2jMNVxufPG8MHd2AScX8jW4z0VPnnJHArq2GYPFTFZRHmiAhDrXr5m8zof6w==",
69
+ "license": "MIT",
70
+ "engines": {
71
+ "node": "^18.14.0 || >=20"
72
+ }
73
+ },
74
+ "node_modules/@types/node": {
75
+ "version": "22.19.17",
76
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz",
77
+ "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==",
78
+ "license": "MIT",
79
+ "dependencies": {
80
+ "undici-types": "~6.21.0"
81
+ }
82
+ },
83
+ "node_modules/drizzle-orm": {
84
+ "version": "1.0.0-beta.22",
85
+ "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-1.0.0-beta.22.tgz",
86
+ "integrity": "sha512-F+DZyVIvH0oVKa/w08Cle1xfoH+pc+htIXHG/frnMLG72aby9NYYr9oc+9XvghnoO4umxFItduz0OMmQJMnenw==",
87
+ "license": "Apache-2.0",
88
+ "peerDependencies": {
89
+ "@aws-sdk/client-rds-data": ">=3",
90
+ "@cloudflare/workers-types": ">=4",
91
+ "@effect/sql": "^0.48.5",
92
+ "@effect/sql-pg": "^0.49.7",
93
+ "@electric-sql/pglite": ">=0.2.0",
94
+ "@libsql/client": ">=0.10.0",
95
+ "@libsql/client-wasm": ">=0.10.0",
96
+ "@neondatabase/serverless": ">=0.10.0",
97
+ "@op-engineering/op-sqlite": ">=2",
98
+ "@opentelemetry/api": "^1.4.1",
99
+ "@planetscale/database": ">=1.13",
100
+ "@sinclair/typebox": ">=0.34.8",
101
+ "@sqlitecloud/drivers": ">=1.0.653",
102
+ "@tidbcloud/serverless": "*",
103
+ "@tursodatabase/database": ">=0.2.1",
104
+ "@tursodatabase/database-common": ">=0.2.1",
105
+ "@tursodatabase/database-wasm": ">=0.2.1",
106
+ "@types/better-sqlite3": "*",
107
+ "@types/mssql": "^9.1.4",
108
+ "@types/pg": "*",
109
+ "@types/sql.js": "*",
110
+ "@upstash/redis": ">=1.34.7",
111
+ "@vercel/postgres": ">=0.8.0",
112
+ "@xata.io/client": "*",
113
+ "arktype": ">=2.0.0",
114
+ "better-sqlite3": ">=9.3.0",
115
+ "bun-types": "*",
116
+ "expo-sqlite": ">=14.0.0",
117
+ "gel": ">=2",
118
+ "mssql": "^11.0.1",
119
+ "mysql2": ">=2",
120
+ "pg": ">=8",
121
+ "postgres": ">=3",
122
+ "sql.js": ">=1",
123
+ "sqlite3": ">=5",
124
+ "typebox": ">=1.0.0",
125
+ "valibot": ">=1.0.0-beta.7",
126
+ "zod": "^3.25.0 || ^4.0.0"
127
+ },
128
+ "peerDependenciesMeta": {
129
+ "@aws-sdk/client-rds-data": {
130
+ "optional": true
131
+ },
132
+ "@cloudflare/workers-types": {
133
+ "optional": true
134
+ },
135
+ "@effect/sql": {
136
+ "optional": true
137
+ },
138
+ "@effect/sql-pg": {
139
+ "optional": true
140
+ },
141
+ "@electric-sql/pglite": {
142
+ "optional": true
143
+ },
144
+ "@libsql/client": {
145
+ "optional": true
146
+ },
147
+ "@libsql/client-wasm": {
148
+ "optional": true
149
+ },
150
+ "@neondatabase/serverless": {
151
+ "optional": true
152
+ },
153
+ "@op-engineering/op-sqlite": {
154
+ "optional": true
155
+ },
156
+ "@opentelemetry/api": {
157
+ "optional": true
158
+ },
159
+ "@planetscale/database": {
160
+ "optional": true
161
+ },
162
+ "@sinclair/typebox": {
163
+ "optional": true
164
+ },
165
+ "@sqlitecloud/drivers": {
166
+ "optional": true
167
+ },
168
+ "@tidbcloud/serverless": {
169
+ "optional": true
170
+ },
171
+ "@tursodatabase/database": {
172
+ "optional": true
173
+ },
174
+ "@tursodatabase/database-common": {
175
+ "optional": true
176
+ },
177
+ "@tursodatabase/database-wasm": {
178
+ "optional": true
179
+ },
180
+ "@types/better-sqlite3": {
181
+ "optional": true
182
+ },
183
+ "@types/mssql": {
184
+ "optional": true
185
+ },
186
+ "@types/pg": {
187
+ "optional": true
188
+ },
189
+ "@types/sql.js": {
190
+ "optional": true
191
+ },
192
+ "@upstash/redis": {
193
+ "optional": true
194
+ },
195
+ "@vercel/postgres": {
196
+ "optional": true
197
+ },
198
+ "@xata.io/client": {
199
+ "optional": true
200
+ },
201
+ "arktype": {
202
+ "optional": true
203
+ },
204
+ "better-sqlite3": {
205
+ "optional": true
206
+ },
207
+ "bun-types": {
208
+ "optional": true
209
+ },
210
+ "expo-sqlite": {
211
+ "optional": true
212
+ },
213
+ "gel": {
214
+ "optional": true
215
+ },
216
+ "mssql": {
217
+ "optional": true
218
+ },
219
+ "mysql2": {
220
+ "optional": true
221
+ },
222
+ "pg": {
223
+ "optional": true
224
+ },
225
+ "postgres": {
226
+ "optional": true
227
+ },
228
+ "sql.js": {
229
+ "optional": true
230
+ },
231
+ "sqlite3": {
232
+ "optional": true
233
+ },
234
+ "typebox": {
235
+ "optional": true
236
+ },
237
+ "valibot": {
238
+ "optional": true
239
+ },
240
+ "zod": {
241
+ "optional": true
242
+ }
243
+ }
244
+ },
245
+ "node_modules/pg": {
246
+ "version": "8.20.0",
247
+ "resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz",
248
+ "integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==",
249
+ "license": "MIT",
250
+ "dependencies": {
251
+ "pg-connection-string": "^2.12.0",
252
+ "pg-pool": "^3.13.0",
253
+ "pg-protocol": "^1.13.0",
254
+ "pg-types": "2.2.0",
255
+ "pgpass": "1.0.5"
256
+ },
257
+ "engines": {
258
+ "node": ">= 16.0.0"
259
+ },
260
+ "optionalDependencies": {
261
+ "pg-cloudflare": "^1.3.0"
262
+ },
263
+ "peerDependencies": {
264
+ "pg-native": ">=3.0.1"
265
+ },
266
+ "peerDependenciesMeta": {
267
+ "pg-native": {
268
+ "optional": true
269
+ }
270
+ }
271
+ },
272
+ "node_modules/pg-cloudflare": {
273
+ "version": "1.3.0",
274
+ "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz",
275
+ "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==",
276
+ "license": "MIT",
277
+ "optional": true
278
+ },
279
+ "node_modules/pg-connection-string": {
280
+ "version": "2.12.0",
281
+ "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.12.0.tgz",
282
+ "integrity": "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==",
283
+ "license": "MIT"
284
+ },
285
+ "node_modules/pg-int8": {
286
+ "version": "1.0.1",
287
+ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
288
+ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
289
+ "license": "ISC",
290
+ "engines": {
291
+ "node": ">=4.0.0"
292
+ }
293
+ },
294
+ "node_modules/pg-pool": {
295
+ "version": "3.13.0",
296
+ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.13.0.tgz",
297
+ "integrity": "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==",
298
+ "license": "MIT",
299
+ "peerDependencies": {
300
+ "pg": ">=8.0"
301
+ }
302
+ },
303
+ "node_modules/pg-protocol": {
304
+ "version": "1.13.0",
305
+ "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz",
306
+ "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==",
307
+ "license": "MIT"
308
+ },
309
+ "node_modules/pg-types": {
310
+ "version": "2.2.0",
311
+ "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
312
+ "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
313
+ "license": "MIT",
314
+ "dependencies": {
315
+ "pg-int8": "1.0.1",
316
+ "postgres-array": "~2.0.0",
317
+ "postgres-bytea": "~1.0.0",
318
+ "postgres-date": "~1.0.4",
319
+ "postgres-interval": "^1.1.0"
320
+ },
321
+ "engines": {
322
+ "node": ">=4"
323
+ }
324
+ },
325
+ "node_modules/pgpass": {
326
+ "version": "1.0.5",
327
+ "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
328
+ "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
329
+ "license": "MIT",
330
+ "dependencies": {
331
+ "split2": "^4.1.0"
332
+ }
333
+ },
334
+ "node_modules/postgres-array": {
335
+ "version": "2.0.0",
336
+ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
337
+ "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
338
+ "license": "MIT",
339
+ "engines": {
340
+ "node": ">=4"
341
+ }
342
+ },
343
+ "node_modules/postgres-bytea": {
344
+ "version": "1.0.1",
345
+ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz",
346
+ "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==",
347
+ "license": "MIT",
348
+ "engines": {
349
+ "node": ">=0.10.0"
350
+ }
351
+ },
352
+ "node_modules/postgres-date": {
353
+ "version": "1.0.7",
354
+ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
355
+ "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
356
+ "license": "MIT",
357
+ "engines": {
358
+ "node": ">=0.10.0"
359
+ }
360
+ },
361
+ "node_modules/postgres-interval": {
362
+ "version": "1.2.0",
363
+ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
364
+ "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
365
+ "license": "MIT",
366
+ "dependencies": {
367
+ "xtend": "^4.0.0"
368
+ },
369
+ "engines": {
370
+ "node": ">=0.10.0"
371
+ }
372
+ },
373
+ "node_modules/split2": {
374
+ "version": "4.2.0",
375
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
376
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
377
+ "license": "ISC",
378
+ "engines": {
379
+ "node": ">= 10.x"
380
+ }
381
+ },
382
+ "node_modules/typescript": {
383
+ "version": "4.9.5",
384
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
385
+ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
386
+ "license": "Apache-2.0",
387
+ "bin": {
388
+ "tsc": "bin/tsc",
389
+ "tsserver": "bin/tsserver"
390
+ },
391
+ "engines": {
392
+ "node": ">=4.2.0"
393
+ }
394
+ },
395
+ "node_modules/undici-types": {
396
+ "version": "6.21.0",
397
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
398
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
399
+ "license": "MIT"
400
+ },
401
+ "node_modules/waddler": {
402
+ "version": "0.1.1",
403
+ "resolved": "https://registry.npmjs.org/waddler/-/waddler-0.1.1.tgz",
404
+ "integrity": "sha512-lBJXYFBLEpYe+scAeCJmLj6Iqweuq1whM6Am3I9WfopOCFxvKz8Nq5hXoy8/b3zwJqHIQMglFIvM4skRydSpZg==",
405
+ "license": "MIT",
406
+ "peerDependencies": {
407
+ "@clickhouse/client": "^1.11.2",
408
+ "@duckdb/node-api": "^1.1.2-alpha.4",
409
+ "@electric-sql/pglite": "^0.2.17",
410
+ "@libsql/client": "^0.15.4",
411
+ "@libsql/client-wasm": "^0.15.4",
412
+ "@neondatabase/serverless": "^1.0.0",
413
+ "@planetscale/database": "^1.19.0",
414
+ "@tidbcloud/serverless": "^0.2.0",
415
+ "@vercel/postgres": "^0.10.0",
416
+ "@xata.io/client": "^0.30.1",
417
+ "better-sqlite3": "^11.9.1",
418
+ "bun-types": "*",
419
+ "duckdb": "^1.2.1",
420
+ "gel": "^2.0.2",
421
+ "mysql2": "^3.14.0",
422
+ "pg": "^8.14.0",
423
+ "pg-query-stream": "^4.8.0",
424
+ "postgres": "^3.4.5"
425
+ },
426
+ "peerDependenciesMeta": {
427
+ "@clickhouse/client": {
428
+ "optional": true
429
+ },
430
+ "@cloudflare/workers-types": {
431
+ "optional": true
432
+ },
433
+ "@duckdb/node-api": {
434
+ "optional": true
435
+ },
436
+ "@electric-sql/pglite": {
437
+ "optional": true
438
+ },
439
+ "@libsql/client": {
440
+ "optional": true
441
+ },
442
+ "@libsql/client-wasm": {
443
+ "optional": true
444
+ },
445
+ "@neondatabase/serverless": {
446
+ "optional": true
447
+ },
448
+ "@op-engineering/op-sqlite": {
449
+ "optional": true
450
+ },
451
+ "@planetscale/database": {
452
+ "optional": true
453
+ },
454
+ "@tidbcloud/serverless": {
455
+ "optional": true
456
+ },
457
+ "@vercel/postgres": {
458
+ "optional": true
459
+ },
460
+ "@xata.io/client": {
461
+ "optional": true
462
+ },
463
+ "better-sqlite3": {
464
+ "optional": true
465
+ },
466
+ "bun-types": {
467
+ "optional": true
468
+ },
469
+ "duckdb": {
470
+ "optional": true
471
+ },
472
+ "gel": {
473
+ "optional": true
474
+ },
475
+ "mysql2": {
476
+ "optional": true
477
+ },
478
+ "pg": {
479
+ "optional": true
480
+ },
481
+ "pg-query-stream": {
482
+ "optional": true
483
+ },
484
+ "postgres": {
485
+ "optional": true
486
+ }
487
+ }
488
+ },
489
+ "node_modules/ws": {
490
+ "version": "8.20.0",
491
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz",
492
+ "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==",
493
+ "license": "MIT",
494
+ "engines": {
495
+ "node": ">=10.0.0"
496
+ },
497
+ "peerDependencies": {
498
+ "bufferutil": "^4.0.1",
499
+ "utf-8-validate": ">=5.0.2"
500
+ },
501
+ "peerDependenciesMeta": {
502
+ "bufferutil": {
503
+ "optional": true
504
+ },
505
+ "utf-8-validate": {
506
+ "optional": true
507
+ }
508
+ }
509
+ },
510
+ "node_modules/xtend": {
511
+ "version": "4.0.2",
512
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
513
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
514
+ "license": "MIT",
515
+ "engines": {
516
+ "node": ">=0.4"
517
+ }
518
+ }
519
+ }
520
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "{{name}}",
3
+ "version": "1.0.0",
4
+ "description": "netlify functions:create - query Netlify Database with Drizzle ORM",
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
+ "drizzle"
15
+ ],
16
+ "author": "Netlify",
17
+ "license": "MIT",
18
+ "dependencies": {
19
+ "@netlify/database": "latest",
20
+ "@netlify/functions": "^5.2.0",
21
+ "@types/node": "^22.0.0",
22
+ "drizzle-orm": "beta",
23
+ "typescript": "^4.5.5"
24
+ }
25
+ }
@@ -0,0 +1,26 @@
1
+ import { drizzle } from 'drizzle-orm/netlify-db'
2
+
3
+ import { planets } from '../../db/schema'
4
+
5
+ export default async () => {
6
+ try {
7
+ const db = drizzle()
8
+ const rows = await db.select().from(planets)
9
+
10
+ return Response.json({ planets: rows })
11
+ } catch (error) {
12
+ const details = error instanceof Error ? error.message : String(error)
13
+
14
+ return Response.json(
15
+ {
16
+ error: "Couldn't query the database. If you haven't set up the schema yet, run `netlify database init`.",
17
+ details,
18
+ },
19
+ { status: 500 },
20
+ )
21
+ }
22
+ }
23
+
24
+ export const config = {
25
+ path: '/planets',
26
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "netlify-cli",
3
3
  "description": "Netlify command line tool",
4
- "version": "25.5.0",
4
+ "version": "25.6.1",
5
5
  "author": "Netlify Inc.",
6
6
  "type": "module",
7
7
  "engines": {
@@ -59,19 +59,19 @@
59
59
  "@netlify/ai": "0.4.1",
60
60
  "@netlify/api": "14.0.18",
61
61
  "@netlify/blobs": "10.7.0",
62
- "@netlify/build": "35.13.1",
63
- "@netlify/build-info": "10.5.0",
62
+ "@netlify/build": "35.13.4",
63
+ "@netlify/build-info": "10.5.1",
64
64
  "@netlify/config": "24.5.0",
65
65
  "@netlify/dev": "4.17.3",
66
66
  "@netlify/dev-utils": "4.4.3",
67
- "@netlify/edge-bundler": "14.10.0",
67
+ "@netlify/edge-bundler": "14.10.1",
68
68
  "@netlify/edge-functions": "3.0.6",
69
69
  "@netlify/edge-functions-bootstrap": "2.17.1",
70
70
  "@netlify/headers-parser": "9.0.3",
71
71
  "@netlify/images": "1.3.7",
72
72
  "@netlify/local-functions-proxy": "2.0.3",
73
73
  "@netlify/redirect-parser": "15.0.4",
74
- "@netlify/zip-it-and-ship-it": "14.5.3",
74
+ "@netlify/zip-it-and-ship-it": "14.5.4",
75
75
  "@octokit/rest": "22.0.0",
76
76
  "@opentelemetry/api": "1.8.0",
77
77
  "@pnpm/tabtab": "0.5.4",
@@ -211,6 +211,7 @@
211
211
  "serialize-javascript": "7.0.5",
212
212
  "strip-ansi": "7.1.2",
213
213
  "temp-dir": "3.0.0",
214
+ "tmp-promise": "^3.0.3",
214
215
  "tree-kill": "1.2.2",
215
216
  "tsx": "4.20.6",
216
217
  "typescript": "5.8.3",