@volter/twin-standard 1.0.157 → 1.0.158
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.
- package/client-sdks/import.mjs +2 -0
- package/client-sdks/package.json +3 -0
- package/client-sdks/pnpm-lock.yaml +399 -0
- package/dist/client-sdks/import.mjs +2 -0
- package/dist/client-sdks/package.json +3 -0
- package/dist/client-sdks/pnpm-lock.yaml +399 -0
- package/dist/src/clients/tinybird.js +15 -6
- package/dist/src/clients/vercel.d.ts +2 -0
- package/dist/src/clients/vercel.js +73 -0
- package/package.json +2 -1
- package/src/clients/tinybird.ts +8 -6
- package/src/clients/vercel.ts +67 -0
|
@@ -178,6 +178,15 @@ importers:
|
|
|
178
178
|
'@sentry/node':
|
|
179
179
|
specifier: 10.38.0
|
|
180
180
|
version: 10.38.0
|
|
181
|
+
'@tinybirdco/sdk':
|
|
182
|
+
specifier: 0.0.84
|
|
183
|
+
version: 0.0.84
|
|
184
|
+
'@vercel/edge-config':
|
|
185
|
+
specifier: 0.4.1
|
|
186
|
+
version: 0.4.1
|
|
187
|
+
'@vercel/sdk':
|
|
188
|
+
specifier: 1.28.38
|
|
189
|
+
version: 1.28.38
|
|
181
190
|
resend:
|
|
182
191
|
specifier: 6.6.0
|
|
183
192
|
version: 6.6.0
|
|
@@ -202,6 +211,170 @@ packages:
|
|
|
202
211
|
'@apm-js-collab/tracing-hooks@0.3.1':
|
|
203
212
|
resolution: {integrity: sha512-Vu1CbmPURlN5fTboVuKMoJjbO5qcq9fA5YXpskx3dXe/zTBvjODFoerw+69rVBlRLrJpwPqSDqEuJDEKIrTldw==}
|
|
204
213
|
|
|
214
|
+
'@clack/core@1.5.1':
|
|
215
|
+
resolution: {integrity: sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ==}
|
|
216
|
+
engines: {node: '>= 20.12.0'}
|
|
217
|
+
|
|
218
|
+
'@clack/prompts@1.8.1':
|
|
219
|
+
resolution: {integrity: sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==}
|
|
220
|
+
engines: {node: '>= 20.12.0'}
|
|
221
|
+
|
|
222
|
+
'@esbuild/aix-ppc64@0.25.12':
|
|
223
|
+
resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}
|
|
224
|
+
engines: {node: '>=18'}
|
|
225
|
+
cpu: [ppc64]
|
|
226
|
+
os: [aix]
|
|
227
|
+
|
|
228
|
+
'@esbuild/android-arm64@0.25.12':
|
|
229
|
+
resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}
|
|
230
|
+
engines: {node: '>=18'}
|
|
231
|
+
cpu: [arm64]
|
|
232
|
+
os: [android]
|
|
233
|
+
|
|
234
|
+
'@esbuild/android-arm@0.25.12':
|
|
235
|
+
resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}
|
|
236
|
+
engines: {node: '>=18'}
|
|
237
|
+
cpu: [arm]
|
|
238
|
+
os: [android]
|
|
239
|
+
|
|
240
|
+
'@esbuild/android-x64@0.25.12':
|
|
241
|
+
resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}
|
|
242
|
+
engines: {node: '>=18'}
|
|
243
|
+
cpu: [x64]
|
|
244
|
+
os: [android]
|
|
245
|
+
|
|
246
|
+
'@esbuild/darwin-arm64@0.25.12':
|
|
247
|
+
resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}
|
|
248
|
+
engines: {node: '>=18'}
|
|
249
|
+
cpu: [arm64]
|
|
250
|
+
os: [darwin]
|
|
251
|
+
|
|
252
|
+
'@esbuild/darwin-x64@0.25.12':
|
|
253
|
+
resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}
|
|
254
|
+
engines: {node: '>=18'}
|
|
255
|
+
cpu: [x64]
|
|
256
|
+
os: [darwin]
|
|
257
|
+
|
|
258
|
+
'@esbuild/freebsd-arm64@0.25.12':
|
|
259
|
+
resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}
|
|
260
|
+
engines: {node: '>=18'}
|
|
261
|
+
cpu: [arm64]
|
|
262
|
+
os: [freebsd]
|
|
263
|
+
|
|
264
|
+
'@esbuild/freebsd-x64@0.25.12':
|
|
265
|
+
resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}
|
|
266
|
+
engines: {node: '>=18'}
|
|
267
|
+
cpu: [x64]
|
|
268
|
+
os: [freebsd]
|
|
269
|
+
|
|
270
|
+
'@esbuild/linux-arm64@0.25.12':
|
|
271
|
+
resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}
|
|
272
|
+
engines: {node: '>=18'}
|
|
273
|
+
cpu: [arm64]
|
|
274
|
+
os: [linux]
|
|
275
|
+
|
|
276
|
+
'@esbuild/linux-arm@0.25.12':
|
|
277
|
+
resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}
|
|
278
|
+
engines: {node: '>=18'}
|
|
279
|
+
cpu: [arm]
|
|
280
|
+
os: [linux]
|
|
281
|
+
|
|
282
|
+
'@esbuild/linux-ia32@0.25.12':
|
|
283
|
+
resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}
|
|
284
|
+
engines: {node: '>=18'}
|
|
285
|
+
cpu: [ia32]
|
|
286
|
+
os: [linux]
|
|
287
|
+
|
|
288
|
+
'@esbuild/linux-loong64@0.25.12':
|
|
289
|
+
resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}
|
|
290
|
+
engines: {node: '>=18'}
|
|
291
|
+
cpu: [loong64]
|
|
292
|
+
os: [linux]
|
|
293
|
+
|
|
294
|
+
'@esbuild/linux-mips64el@0.25.12':
|
|
295
|
+
resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}
|
|
296
|
+
engines: {node: '>=18'}
|
|
297
|
+
cpu: [mips64el]
|
|
298
|
+
os: [linux]
|
|
299
|
+
|
|
300
|
+
'@esbuild/linux-ppc64@0.25.12':
|
|
301
|
+
resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}
|
|
302
|
+
engines: {node: '>=18'}
|
|
303
|
+
cpu: [ppc64]
|
|
304
|
+
os: [linux]
|
|
305
|
+
|
|
306
|
+
'@esbuild/linux-riscv64@0.25.12':
|
|
307
|
+
resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}
|
|
308
|
+
engines: {node: '>=18'}
|
|
309
|
+
cpu: [riscv64]
|
|
310
|
+
os: [linux]
|
|
311
|
+
|
|
312
|
+
'@esbuild/linux-s390x@0.25.12':
|
|
313
|
+
resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}
|
|
314
|
+
engines: {node: '>=18'}
|
|
315
|
+
cpu: [s390x]
|
|
316
|
+
os: [linux]
|
|
317
|
+
|
|
318
|
+
'@esbuild/linux-x64@0.25.12':
|
|
319
|
+
resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}
|
|
320
|
+
engines: {node: '>=18'}
|
|
321
|
+
cpu: [x64]
|
|
322
|
+
os: [linux]
|
|
323
|
+
|
|
324
|
+
'@esbuild/netbsd-arm64@0.25.12':
|
|
325
|
+
resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}
|
|
326
|
+
engines: {node: '>=18'}
|
|
327
|
+
cpu: [arm64]
|
|
328
|
+
os: [netbsd]
|
|
329
|
+
|
|
330
|
+
'@esbuild/netbsd-x64@0.25.12':
|
|
331
|
+
resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}
|
|
332
|
+
engines: {node: '>=18'}
|
|
333
|
+
cpu: [x64]
|
|
334
|
+
os: [netbsd]
|
|
335
|
+
|
|
336
|
+
'@esbuild/openbsd-arm64@0.25.12':
|
|
337
|
+
resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}
|
|
338
|
+
engines: {node: '>=18'}
|
|
339
|
+
cpu: [arm64]
|
|
340
|
+
os: [openbsd]
|
|
341
|
+
|
|
342
|
+
'@esbuild/openbsd-x64@0.25.12':
|
|
343
|
+
resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}
|
|
344
|
+
engines: {node: '>=18'}
|
|
345
|
+
cpu: [x64]
|
|
346
|
+
os: [openbsd]
|
|
347
|
+
|
|
348
|
+
'@esbuild/openharmony-arm64@0.25.12':
|
|
349
|
+
resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==}
|
|
350
|
+
engines: {node: '>=18'}
|
|
351
|
+
cpu: [arm64]
|
|
352
|
+
os: [openharmony]
|
|
353
|
+
|
|
354
|
+
'@esbuild/sunos-x64@0.25.12':
|
|
355
|
+
resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}
|
|
356
|
+
engines: {node: '>=18'}
|
|
357
|
+
cpu: [x64]
|
|
358
|
+
os: [sunos]
|
|
359
|
+
|
|
360
|
+
'@esbuild/win32-arm64@0.25.12':
|
|
361
|
+
resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}
|
|
362
|
+
engines: {node: '>=18'}
|
|
363
|
+
cpu: [arm64]
|
|
364
|
+
os: [win32]
|
|
365
|
+
|
|
366
|
+
'@esbuild/win32-ia32@0.25.12':
|
|
367
|
+
resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}
|
|
368
|
+
engines: {node: '>=18'}
|
|
369
|
+
cpu: [ia32]
|
|
370
|
+
os: [win32]
|
|
371
|
+
|
|
372
|
+
'@esbuild/win32-x64@0.25.12':
|
|
373
|
+
resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}
|
|
374
|
+
engines: {node: '>=18'}
|
|
375
|
+
cpu: [x64]
|
|
376
|
+
os: [win32]
|
|
377
|
+
|
|
205
378
|
'@graphql-typed-document-node/core@3.2.0':
|
|
206
379
|
resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==}
|
|
207
380
|
peerDependencies:
|
|
@@ -954,6 +1127,11 @@ packages:
|
|
|
954
1127
|
'@stablelib/base64@1.0.1':
|
|
955
1128
|
resolution: {integrity: sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==}
|
|
956
1129
|
|
|
1130
|
+
'@tinybirdco/sdk@0.0.84':
|
|
1131
|
+
resolution: {integrity: sha512-uQXI4rbUoJV5D2O/m3sKvYqBGwkuJETLsPjUmEStkOwdjbCaAOdVPLuF+bj7Ew+ZCcbshri5p57uNzIRSU+qVw==}
|
|
1132
|
+
engines: {node: '>=20.0.0'}
|
|
1133
|
+
hasBin: true
|
|
1134
|
+
|
|
957
1135
|
'@types/connect@3.4.38':
|
|
958
1136
|
resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==}
|
|
959
1137
|
|
|
@@ -987,6 +1165,18 @@ packages:
|
|
|
987
1165
|
'@types/tedious@4.0.14':
|
|
988
1166
|
resolution: {integrity: sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==}
|
|
989
1167
|
|
|
1168
|
+
'@vercel/edge-config-fs@0.1.0':
|
|
1169
|
+
resolution: {integrity: sha512-NRIBwfcS0bUoUbRWlNGetqjvLSwgYH/BqKqDN7vK1g32p7dN96k0712COgaz6VFizAm9b0g6IG6hR6+hc0KCPg==}
|
|
1170
|
+
deprecated: This package has been renamed to @vercel/global-config-fs. Install @vercel/global-config-fs instead.
|
|
1171
|
+
|
|
1172
|
+
'@vercel/edge-config@0.4.1':
|
|
1173
|
+
resolution: {integrity: sha512-4Mc3H7lE+x4RrL17nY8CWeEorvJHbkNbQTy9p8H1tO7y11WeKj5xeZSr07wNgfWInKXDUwj5FZ3qd/jIzjPxug==}
|
|
1174
|
+
engines: {node: '>=14.6'}
|
|
1175
|
+
deprecated: This package has been renamed to @vercel/global-config. Install @vercel/global-config instead.
|
|
1176
|
+
|
|
1177
|
+
'@vercel/sdk@1.28.38':
|
|
1178
|
+
resolution: {integrity: sha512-DofYDwD2EGbwN6gvmxqnhrTQsahHbCw+ylTCZYpyekzHz70GNCcjIUWg98z6ucBV97aimlpiVlHg4K53nxxRfw==}
|
|
1179
|
+
|
|
990
1180
|
acorn-import-attributes@1.9.5:
|
|
991
1181
|
resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==}
|
|
992
1182
|
peerDependencies:
|
|
@@ -1003,12 +1193,20 @@ packages:
|
|
|
1003
1193
|
brace-expansion@2.1.7:
|
|
1004
1194
|
resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==}
|
|
1005
1195
|
|
|
1196
|
+
chokidar@4.0.3:
|
|
1197
|
+
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
|
|
1198
|
+
engines: {node: '>= 14.16.0'}
|
|
1199
|
+
|
|
1006
1200
|
cjs-module-lexer@1.4.3:
|
|
1007
1201
|
resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==}
|
|
1008
1202
|
|
|
1009
1203
|
cjs-module-lexer@2.2.1:
|
|
1010
1204
|
resolution: {integrity: sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==}
|
|
1011
1205
|
|
|
1206
|
+
commander@12.1.0:
|
|
1207
|
+
resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==}
|
|
1208
|
+
engines: {node: '>=18'}
|
|
1209
|
+
|
|
1012
1210
|
debug@4.4.3:
|
|
1013
1211
|
resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
|
|
1014
1212
|
engines: {node: '>=6.0'}
|
|
@@ -1018,6 +1216,10 @@ packages:
|
|
|
1018
1216
|
supports-color:
|
|
1019
1217
|
optional: true
|
|
1020
1218
|
|
|
1219
|
+
dotenv@16.6.1:
|
|
1220
|
+
resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==}
|
|
1221
|
+
engines: {node: '>=12'}
|
|
1222
|
+
|
|
1021
1223
|
es-errors@1.3.0:
|
|
1022
1224
|
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
|
1023
1225
|
engines: {node: '>= 0.4'}
|
|
@@ -1028,9 +1230,23 @@ packages:
|
|
|
1028
1230
|
es6-promise@4.2.8:
|
|
1029
1231
|
resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==}
|
|
1030
1232
|
|
|
1233
|
+
esbuild@0.25.12:
|
|
1234
|
+
resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==}
|
|
1235
|
+
engines: {node: '>=18'}
|
|
1236
|
+
hasBin: true
|
|
1237
|
+
|
|
1031
1238
|
fast-sha256@1.3.0:
|
|
1032
1239
|
resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==}
|
|
1033
1240
|
|
|
1241
|
+
fast-string-truncated-width@3.0.3:
|
|
1242
|
+
resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==}
|
|
1243
|
+
|
|
1244
|
+
fast-string-width@3.0.2:
|
|
1245
|
+
resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==}
|
|
1246
|
+
|
|
1247
|
+
fast-wrap-ansi@0.2.2:
|
|
1248
|
+
resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==}
|
|
1249
|
+
|
|
1034
1250
|
forwarded-parse@2.1.2:
|
|
1035
1251
|
resolution: {integrity: sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==}
|
|
1036
1252
|
|
|
@@ -1083,6 +1299,9 @@ packages:
|
|
|
1083
1299
|
resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==}
|
|
1084
1300
|
engines: {node: '>=4'}
|
|
1085
1301
|
|
|
1302
|
+
picocolors@1.1.1:
|
|
1303
|
+
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
|
1304
|
+
|
|
1086
1305
|
postgres-array@2.0.0:
|
|
1087
1306
|
resolution: {integrity: sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==}
|
|
1088
1307
|
engines: {node: '>=4'}
|
|
@@ -1102,6 +1321,10 @@ packages:
|
|
|
1102
1321
|
querystringify@2.2.0:
|
|
1103
1322
|
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
|
|
1104
1323
|
|
|
1324
|
+
readdirp@4.1.2:
|
|
1325
|
+
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
|
|
1326
|
+
engines: {node: '>= 14.18.0'}
|
|
1327
|
+
|
|
1105
1328
|
require-in-the-middle@7.5.2:
|
|
1106
1329
|
resolution: {integrity: sha512-gAZ+kLqBdHarXB64XpAe2VCjB7rIRv+mU8tfRWziHRJ5umKsIHN2tLLv6EtMw7WCdP19S0ERVMldNvxYCHnhSQ==}
|
|
1107
1330
|
engines: {node: '>=8.6.0'}
|
|
@@ -1135,6 +1358,9 @@ packages:
|
|
|
1135
1358
|
shimmer@1.2.1:
|
|
1136
1359
|
resolution: {integrity: sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==}
|
|
1137
1360
|
|
|
1361
|
+
sisteransi@1.0.5:
|
|
1362
|
+
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
|
|
1363
|
+
|
|
1138
1364
|
supports-preserve-symlinks-flag@1.0.0:
|
|
1139
1365
|
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
|
|
1140
1366
|
engines: {node: '>= 0.4'}
|
|
@@ -1160,6 +1386,12 @@ packages:
|
|
|
1160
1386
|
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
|
|
1161
1387
|
engines: {node: '>=0.4'}
|
|
1162
1388
|
|
|
1389
|
+
zod@3.25.76:
|
|
1390
|
+
resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
|
|
1391
|
+
|
|
1392
|
+
zod@4.6.7:
|
|
1393
|
+
resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==}
|
|
1394
|
+
|
|
1163
1395
|
snapshots:
|
|
1164
1396
|
|
|
1165
1397
|
'@apm-js-collab/code-transformer@0.8.2': {}
|
|
@@ -1172,6 +1404,96 @@ snapshots:
|
|
|
1172
1404
|
transitivePeerDependencies:
|
|
1173
1405
|
- supports-color
|
|
1174
1406
|
|
|
1407
|
+
'@clack/core@1.5.1':
|
|
1408
|
+
dependencies:
|
|
1409
|
+
fast-wrap-ansi: 0.2.2
|
|
1410
|
+
sisteransi: 1.0.5
|
|
1411
|
+
|
|
1412
|
+
'@clack/prompts@1.8.1':
|
|
1413
|
+
dependencies:
|
|
1414
|
+
'@clack/core': 1.5.1
|
|
1415
|
+
fast-string-width: 3.0.2
|
|
1416
|
+
fast-wrap-ansi: 0.2.2
|
|
1417
|
+
sisteransi: 1.0.5
|
|
1418
|
+
|
|
1419
|
+
'@esbuild/aix-ppc64@0.25.12':
|
|
1420
|
+
optional: true
|
|
1421
|
+
|
|
1422
|
+
'@esbuild/android-arm64@0.25.12':
|
|
1423
|
+
optional: true
|
|
1424
|
+
|
|
1425
|
+
'@esbuild/android-arm@0.25.12':
|
|
1426
|
+
optional: true
|
|
1427
|
+
|
|
1428
|
+
'@esbuild/android-x64@0.25.12':
|
|
1429
|
+
optional: true
|
|
1430
|
+
|
|
1431
|
+
'@esbuild/darwin-arm64@0.25.12':
|
|
1432
|
+
optional: true
|
|
1433
|
+
|
|
1434
|
+
'@esbuild/darwin-x64@0.25.12':
|
|
1435
|
+
optional: true
|
|
1436
|
+
|
|
1437
|
+
'@esbuild/freebsd-arm64@0.25.12':
|
|
1438
|
+
optional: true
|
|
1439
|
+
|
|
1440
|
+
'@esbuild/freebsd-x64@0.25.12':
|
|
1441
|
+
optional: true
|
|
1442
|
+
|
|
1443
|
+
'@esbuild/linux-arm64@0.25.12':
|
|
1444
|
+
optional: true
|
|
1445
|
+
|
|
1446
|
+
'@esbuild/linux-arm@0.25.12':
|
|
1447
|
+
optional: true
|
|
1448
|
+
|
|
1449
|
+
'@esbuild/linux-ia32@0.25.12':
|
|
1450
|
+
optional: true
|
|
1451
|
+
|
|
1452
|
+
'@esbuild/linux-loong64@0.25.12':
|
|
1453
|
+
optional: true
|
|
1454
|
+
|
|
1455
|
+
'@esbuild/linux-mips64el@0.25.12':
|
|
1456
|
+
optional: true
|
|
1457
|
+
|
|
1458
|
+
'@esbuild/linux-ppc64@0.25.12':
|
|
1459
|
+
optional: true
|
|
1460
|
+
|
|
1461
|
+
'@esbuild/linux-riscv64@0.25.12':
|
|
1462
|
+
optional: true
|
|
1463
|
+
|
|
1464
|
+
'@esbuild/linux-s390x@0.25.12':
|
|
1465
|
+
optional: true
|
|
1466
|
+
|
|
1467
|
+
'@esbuild/linux-x64@0.25.12':
|
|
1468
|
+
optional: true
|
|
1469
|
+
|
|
1470
|
+
'@esbuild/netbsd-arm64@0.25.12':
|
|
1471
|
+
optional: true
|
|
1472
|
+
|
|
1473
|
+
'@esbuild/netbsd-x64@0.25.12':
|
|
1474
|
+
optional: true
|
|
1475
|
+
|
|
1476
|
+
'@esbuild/openbsd-arm64@0.25.12':
|
|
1477
|
+
optional: true
|
|
1478
|
+
|
|
1479
|
+
'@esbuild/openbsd-x64@0.25.12':
|
|
1480
|
+
optional: true
|
|
1481
|
+
|
|
1482
|
+
'@esbuild/openharmony-arm64@0.25.12':
|
|
1483
|
+
optional: true
|
|
1484
|
+
|
|
1485
|
+
'@esbuild/sunos-x64@0.25.12':
|
|
1486
|
+
optional: true
|
|
1487
|
+
|
|
1488
|
+
'@esbuild/win32-arm64@0.25.12':
|
|
1489
|
+
optional: true
|
|
1490
|
+
|
|
1491
|
+
'@esbuild/win32-ia32@0.25.12':
|
|
1492
|
+
optional: true
|
|
1493
|
+
|
|
1494
|
+
'@esbuild/win32-x64@0.25.12':
|
|
1495
|
+
optional: true
|
|
1496
|
+
|
|
1175
1497
|
'@graphql-typed-document-node/core@3.2.0(graphql@17.0.2)':
|
|
1176
1498
|
dependencies:
|
|
1177
1499
|
graphql: 17.0.2
|
|
@@ -2221,6 +2543,16 @@ snapshots:
|
|
|
2221
2543
|
|
|
2222
2544
|
'@stablelib/base64@1.0.1': {}
|
|
2223
2545
|
|
|
2546
|
+
'@tinybirdco/sdk@0.0.84':
|
|
2547
|
+
dependencies:
|
|
2548
|
+
'@clack/prompts': 1.8.1
|
|
2549
|
+
chokidar: 4.0.3
|
|
2550
|
+
commander: 12.1.0
|
|
2551
|
+
dotenv: 16.6.1
|
|
2552
|
+
esbuild: 0.25.12
|
|
2553
|
+
picocolors: 1.1.1
|
|
2554
|
+
zod: 3.25.76
|
|
2555
|
+
|
|
2224
2556
|
'@types/connect@3.4.38':
|
|
2225
2557
|
dependencies:
|
|
2226
2558
|
'@types/node': 26.6.4
|
|
@@ -2267,6 +2599,16 @@ snapshots:
|
|
|
2267
2599
|
dependencies:
|
|
2268
2600
|
'@types/node': 26.6.4
|
|
2269
2601
|
|
|
2602
|
+
'@vercel/edge-config-fs@0.1.0': {}
|
|
2603
|
+
|
|
2604
|
+
'@vercel/edge-config@0.4.1':
|
|
2605
|
+
dependencies:
|
|
2606
|
+
'@vercel/edge-config-fs': 0.1.0
|
|
2607
|
+
|
|
2608
|
+
'@vercel/sdk@1.28.38':
|
|
2609
|
+
dependencies:
|
|
2610
|
+
zod: 4.6.7
|
|
2611
|
+
|
|
2270
2612
|
acorn-import-attributes@1.9.5(acorn@8.18.0):
|
|
2271
2613
|
dependencies:
|
|
2272
2614
|
acorn: 8.18.0
|
|
@@ -2279,22 +2621,69 @@ snapshots:
|
|
|
2279
2621
|
dependencies:
|
|
2280
2622
|
balanced-match: 1.0.2
|
|
2281
2623
|
|
|
2624
|
+
chokidar@4.0.3:
|
|
2625
|
+
dependencies:
|
|
2626
|
+
readdirp: 4.1.2
|
|
2627
|
+
|
|
2282
2628
|
cjs-module-lexer@1.4.3: {}
|
|
2283
2629
|
|
|
2284
2630
|
cjs-module-lexer@2.2.1: {}
|
|
2285
2631
|
|
|
2632
|
+
commander@12.1.0: {}
|
|
2633
|
+
|
|
2286
2634
|
debug@4.4.3:
|
|
2287
2635
|
dependencies:
|
|
2288
2636
|
ms: 2.1.3
|
|
2289
2637
|
|
|
2638
|
+
dotenv@16.6.1: {}
|
|
2639
|
+
|
|
2290
2640
|
es-errors@1.3.0: {}
|
|
2291
2641
|
|
|
2292
2642
|
es-module-lexer@3.0.2: {}
|
|
2293
2643
|
|
|
2294
2644
|
es6-promise@4.2.8: {}
|
|
2295
2645
|
|
|
2646
|
+
esbuild@0.25.12:
|
|
2647
|
+
optionalDependencies:
|
|
2648
|
+
'@esbuild/aix-ppc64': 0.25.12
|
|
2649
|
+
'@esbuild/android-arm': 0.25.12
|
|
2650
|
+
'@esbuild/android-arm64': 0.25.12
|
|
2651
|
+
'@esbuild/android-x64': 0.25.12
|
|
2652
|
+
'@esbuild/darwin-arm64': 0.25.12
|
|
2653
|
+
'@esbuild/darwin-x64': 0.25.12
|
|
2654
|
+
'@esbuild/freebsd-arm64': 0.25.12
|
|
2655
|
+
'@esbuild/freebsd-x64': 0.25.12
|
|
2656
|
+
'@esbuild/linux-arm': 0.25.12
|
|
2657
|
+
'@esbuild/linux-arm64': 0.25.12
|
|
2658
|
+
'@esbuild/linux-ia32': 0.25.12
|
|
2659
|
+
'@esbuild/linux-loong64': 0.25.12
|
|
2660
|
+
'@esbuild/linux-mips64el': 0.25.12
|
|
2661
|
+
'@esbuild/linux-ppc64': 0.25.12
|
|
2662
|
+
'@esbuild/linux-riscv64': 0.25.12
|
|
2663
|
+
'@esbuild/linux-s390x': 0.25.12
|
|
2664
|
+
'@esbuild/linux-x64': 0.25.12
|
|
2665
|
+
'@esbuild/netbsd-arm64': 0.25.12
|
|
2666
|
+
'@esbuild/netbsd-x64': 0.25.12
|
|
2667
|
+
'@esbuild/openbsd-arm64': 0.25.12
|
|
2668
|
+
'@esbuild/openbsd-x64': 0.25.12
|
|
2669
|
+
'@esbuild/openharmony-arm64': 0.25.12
|
|
2670
|
+
'@esbuild/sunos-x64': 0.25.12
|
|
2671
|
+
'@esbuild/win32-arm64': 0.25.12
|
|
2672
|
+
'@esbuild/win32-ia32': 0.25.12
|
|
2673
|
+
'@esbuild/win32-x64': 0.25.12
|
|
2674
|
+
|
|
2296
2675
|
fast-sha256@1.3.0: {}
|
|
2297
2676
|
|
|
2677
|
+
fast-string-truncated-width@3.0.3: {}
|
|
2678
|
+
|
|
2679
|
+
fast-string-width@3.0.2:
|
|
2680
|
+
dependencies:
|
|
2681
|
+
fast-string-truncated-width: 3.0.3
|
|
2682
|
+
|
|
2683
|
+
fast-wrap-ansi@0.2.2:
|
|
2684
|
+
dependencies:
|
|
2685
|
+
fast-string-width: 3.0.2
|
|
2686
|
+
|
|
2298
2687
|
forwarded-parse@2.1.2: {}
|
|
2299
2688
|
|
|
2300
2689
|
function-bind@1.1.2: {}
|
|
@@ -2351,6 +2740,8 @@ snapshots:
|
|
|
2351
2740
|
postgres-date: 1.0.7
|
|
2352
2741
|
postgres-interval: 1.2.0
|
|
2353
2742
|
|
|
2743
|
+
picocolors@1.1.1: {}
|
|
2744
|
+
|
|
2354
2745
|
postgres-array@2.0.0: {}
|
|
2355
2746
|
|
|
2356
2747
|
postgres-bytea@1.0.1: {}
|
|
@@ -2363,6 +2754,8 @@ snapshots:
|
|
|
2363
2754
|
|
|
2364
2755
|
querystringify@2.2.0: {}
|
|
2365
2756
|
|
|
2757
|
+
readdirp@4.1.2: {}
|
|
2758
|
+
|
|
2366
2759
|
require-in-the-middle@7.5.2:
|
|
2367
2760
|
dependencies:
|
|
2368
2761
|
debug: 4.4.3
|
|
@@ -2395,6 +2788,8 @@ snapshots:
|
|
|
2395
2788
|
|
|
2396
2789
|
shimmer@1.2.1: {}
|
|
2397
2790
|
|
|
2791
|
+
sisteransi@1.0.5: {}
|
|
2792
|
+
|
|
2398
2793
|
supports-preserve-symlinks-flag@1.0.0: {}
|
|
2399
2794
|
|
|
2400
2795
|
svix@1.76.1:
|
|
@@ -2418,3 +2813,7 @@ snapshots:
|
|
|
2418
2813
|
uuid@10.0.0: {}
|
|
2419
2814
|
|
|
2420
2815
|
xtend@4.0.2: {}
|
|
2816
|
+
|
|
2817
|
+
zod@3.25.76: {}
|
|
2818
|
+
|
|
2819
|
+
zod@4.6.7: {}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
import { standardPackageFile } from "../package-file.js";
|
|
10
|
+
const { importSdk } = await import(__rewriteRelativeImportExtension(new URL('import.mjs', standardPackageFile('client-sdks/')).href));
|
|
11
|
+
const { createTinybirdApi, TinybirdApiError } = await importSdk('@tinybirdco/sdk/api');
|
|
1
12
|
const SDK = 'https://unpkg.com/@tinybirdco/sdk@0.0.84/src/api/api.ts';
|
|
2
|
-
|
|
3
|
-
const { createTinybirdApi } = await import('@tinybirdco/sdk/api');
|
|
13
|
+
function client(c, fetch = c.fetch) {
|
|
4
14
|
return createTinybirdApi({ baseUrl: `https://${c.host}`, token: c.env.TINYBIRD_API_KEY ?? c.env.TINYBIRD_TOKEN ?? '', fetch });
|
|
5
15
|
}
|
|
6
16
|
export const cases = [
|
|
@@ -9,8 +19,7 @@ export const cases = [
|
|
|
9
19
|
asks: 'a request token override is used instead of the Workspace token, and its refusal retains the status and JSON error in TinybirdApiError',
|
|
10
20
|
source: `${SDK} "Error thrown by TinybirdApi when a response is not OK"`,
|
|
11
21
|
async run(c) {
|
|
12
|
-
const
|
|
13
|
-
const api = await client(c);
|
|
22
|
+
const api = client(c);
|
|
14
23
|
try {
|
|
15
24
|
await api.ingest('client_case_events', { label: 'refused' }, { token: 'throwaway-invalid-token' });
|
|
16
25
|
return ['the invalid request token was accepted'];
|
|
@@ -36,7 +45,7 @@ export const cases = [
|
|
|
36
45
|
async run(c) {
|
|
37
46
|
let calls = 0;
|
|
38
47
|
const routed = ((input, init) => { calls++; return c.fetch(input, init); });
|
|
39
|
-
const api =
|
|
48
|
+
const api = client(c, routed);
|
|
40
49
|
try {
|
|
41
50
|
await api.ingest('client_case_events', { timestamp: new Date('2024-01-15T10:30:00Z') });
|
|
42
51
|
return ['a Date object was accepted for ingestion'];
|
|
@@ -60,7 +69,7 @@ export const cases = [
|
|
|
60
69
|
asks: 'an object query parameter becomes JSON and the Endpoint uses its value rather than the object string representation',
|
|
61
70
|
source: `${SDK} "Plain objects (e.g. p.json() params) become JSON strings; Dates are rejected;"`,
|
|
62
71
|
async run(c) {
|
|
63
|
-
const api =
|
|
72
|
+
const api = client(c);
|
|
64
73
|
await api.requestJson('/v0/datasources', { method: 'POST', headers: { 'content-type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ name: 'client_json_rows', schema: 'name String' }).toString() });
|
|
65
74
|
await api.ingestBatch('client_json_rows', [{ name: 'selected' }, { name: 'excluded' }], { wait: true });
|
|
66
75
|
await api.requestJson('/v0/pipes', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ name: 'client_json_filter', nodes: [{ name: 'endpoint', type: 'endpoint', sql: "%\nSELECT name FROM client_json_rows WHERE name = {{JSON(filters, '{\"name\":\"selected\"}').get('name')}}" }] }) });
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
// Vercel's unchanged REST SDK and Dub's Edge Config client, using the enclosing World's routing.
|
|
10
|
+
import { standardPackageFile } from "../package-file.js";
|
|
11
|
+
const { importSdk } = await import(__rewriteRelativeImportExtension(new URL('import.mjs', standardPackageFile('client-sdks/')).href));
|
|
12
|
+
const { Vercel } = await importSdk('@vercel/sdk');
|
|
13
|
+
const { VercelError } = await importSdk('@vercel/sdk/models/vercelerror.js');
|
|
14
|
+
const { createClient } = await importSdk('@vercel/edge-config');
|
|
15
|
+
const PROJECTS = 'https://unpkg.com/@vercel/sdk@1.28.38/esm/sdk/projects.js';
|
|
16
|
+
const EDGE = 'https://unpkg.com/@vercel/edge-config@0.4.1/dist/index.d.ts';
|
|
17
|
+
export const cases = [
|
|
18
|
+
{
|
|
19
|
+
id: 'project-domain-add-and-read',
|
|
20
|
+
asks: 'the issued project token adds a domain, and an independent SDK read preserves its name, project and verification state',
|
|
21
|
+
source: `${PROJECTS} "Add a domain to the project by passing its domain name"; ${PROJECTS} "Get project domain by project id/name and domain name."`,
|
|
22
|
+
async run(c) {
|
|
23
|
+
const vercel = new Vercel({ bearerToken: c.env.VERCEL_API_KEY });
|
|
24
|
+
const project = c.env.VERCEL_PROJECT_ID;
|
|
25
|
+
const name = 'sdk-client.example.test';
|
|
26
|
+
const added = await vercel.projects.addProjectDomain({ idOrName: project, requestBody: { name } });
|
|
27
|
+
const got = await vercel.projects.getProjectDomain({ idOrName: project, domain: name });
|
|
28
|
+
const wanted = { name, apexName: 'example.test', projectId: project, verified: true };
|
|
29
|
+
return Object.entries(wanted).flatMap(([field, value]) => added[field] === value && got[field] === value ? [] : [`project domain ${field} did not survive SDK create/read`]);
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'invalid-project-token',
|
|
34
|
+
asks: 'an invalid token cannot read the project domain and the SDK preserves the HTTP refusal status',
|
|
35
|
+
source: `${PROJECTS} "Get project domain by project id/name and domain name."; https://unpkg.com/@vercel/sdk@1.28.38/esm/models/vercelerror.js "HTTP status code"`,
|
|
36
|
+
async run(c) {
|
|
37
|
+
const vercel = new Vercel({ bearerToken: 'throwaway-invalid-token' });
|
|
38
|
+
try {
|
|
39
|
+
await vercel.projects.getProjectDomain({ idOrName: c.env.VERCEL_PROJECT_ID, domain: 'sdk-client.example.test' });
|
|
40
|
+
return ['an invalid token read the project domain'];
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return error instanceof Error && error instanceof VercelError && 'statusCode' in error && error.statusCode === 403
|
|
44
|
+
? [] : [`invalid token refusal differs: ${String(error)}`];
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'edge-config-get-and-selected-get-all',
|
|
50
|
+
asks: 'the issued Edge Config connection string reads a stored value and only the selected keys through the unchanged SDK',
|
|
51
|
+
source: `${EDGE} "Read a single value."; ${EDGE} "Returns all entries when called with no arguments or only entries matching the given keys otherwise."`,
|
|
52
|
+
async run(c) {
|
|
53
|
+
const domains = ['phish-bank.example.test'];
|
|
54
|
+
const terms = ['gift-card'];
|
|
55
|
+
const written = await c.fetch(`https://api.vercel.com/v1/edge-config/${c.env.EDGE_CONFIG_ID}/items`, {
|
|
56
|
+
method: 'PATCH', headers: { authorization: `Bearer ${c.env.VERCEL_API_KEY}`, 'content-type': 'application/json' },
|
|
57
|
+
body: JSON.stringify({ items: [
|
|
58
|
+
{ operation: 'upsert', key: 'sdk_domains', value: domains },
|
|
59
|
+
{ operation: 'upsert', key: 'sdk_terms', value: terms },
|
|
60
|
+
{ operation: 'upsert', key: 'sdk_unselected', value: true },
|
|
61
|
+
] }),
|
|
62
|
+
});
|
|
63
|
+
if (!written.ok || (await written.json()).status !== 'ok')
|
|
64
|
+
return ['the Edge Config items were not written through the vendor API'];
|
|
65
|
+
const edge = createClient(c.env.EDGE_CONFIG);
|
|
66
|
+
const value = await edge.get('sdk_domains');
|
|
67
|
+
const selected = await edge.getAll(['sdk_domains', 'sdk_terms']);
|
|
68
|
+
return JSON.stringify(value) === JSON.stringify(domains) && JSON.stringify(selected.sdk_domains) === JSON.stringify(domains)
|
|
69
|
+
&& JSON.stringify(selected.sdk_terms) === JSON.stringify(terms) && Object.keys(selected).length === 2
|
|
70
|
+
? [] : ['Edge Config get/getAll did not preserve the stored values and selected keys'];
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-standard",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.158",
|
|
4
4
|
"description": "The Protocol 3 standard for Volter twin packs: the criteria a pack is graded by, the grader, the gate a pack repository and the twin catalog run on every change and submission, and the spec derivation the grade checks against. Pin a version: every place a pack is judged judges by that standard.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"README.md",
|
|
21
21
|
"LICENSE",
|
|
22
22
|
"client-sdks/package.json",
|
|
23
|
+
"client-sdks/import.mjs",
|
|
23
24
|
"client-sdks/pnpm-lock.yaml",
|
|
24
25
|
"!**/*.test.ts",
|
|
25
26
|
"client-sdks/pnpm-workspace.yaml",
|