@stardeck-customer-apps/data-store-sdk 0.1.0-preview.4 → 0.1.0-preview.5

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.
@@ -264,8 +264,17 @@ async function createDataStore(options) {
264
264
  return types.getTypeParser(oid, format);
265
265
  })
266
266
  };
267
- const sql = neon(connectionString, { types: customTypes });
268
- const dialect = new NeonDialect({ neon: sql });
267
+ const baseSql = neon(connectionString);
268
+ const wrappedSql = {
269
+ query: (queryWithPlaceholders, params, queryOpts) => (
270
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
271
+ baseSql.query(queryWithPlaceholders, params, {
272
+ ...queryOpts,
273
+ types: customTypes
274
+ })
275
+ )
276
+ };
277
+ const dialect = new NeonDialect({ neon: wrappedSql });
269
278
  return new KyselyClass({
270
279
  dialect,
271
280
  ...options?.kyselyConfig
@@ -213,8 +213,17 @@ async function createDataStore(options) {
213
213
  return types.getTypeParser(oid, format);
214
214
  })
215
215
  };
216
- const sql = neon(connectionString, { types: customTypes });
217
- const dialect = new NeonDialect({ neon: sql });
216
+ const baseSql = neon(connectionString);
217
+ const wrappedSql = {
218
+ query: (queryWithPlaceholders, params, queryOpts) => (
219
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
220
+ baseSql.query(queryWithPlaceholders, params, {
221
+ ...queryOpts,
222
+ types: customTypes
223
+ })
224
+ )
225
+ };
226
+ const dialect = new NeonDialect({ neon: wrappedSql });
218
227
  return new KyselyClass({
219
228
  dialect,
220
229
  ...options?.kyselyConfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stardeck-customer-apps/data-store-sdk",
3
- "version": "0.1.0-preview.4",
3
+ "version": "0.1.0-preview.5",
4
4
  "description": "SDK for accessing Stardeck data stores from deployed projects",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",