hide-a-bed 5.2.5 → 5.2.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.
@@ -30,7 +30,8 @@ __export(bulk_exports, {
30
30
  BulkSaveResponseSchema: () => BulkSaveResponseSchema,
31
31
  BulkSaveRow: () => BulkSaveRow,
32
32
  BulkSaveTransaction: () => BulkSaveTransaction,
33
- BulkSaveTransactionBound: () => BulkSaveTransactionBound
33
+ BulkSaveTransactionBound: () => BulkSaveTransactionBound,
34
+ OptionalIdCouchDoc: () => OptionalIdCouchDoc
34
35
  });
35
36
  module.exports = __toCommonJS(bulk_exports);
36
37
  var import_zod = require("zod");
@@ -45,12 +46,15 @@ const BulkSaveRow = import_zod.z.object({
45
46
  reason: import_zod.z.string().nullish().describe("a full error message")
46
47
  });
47
48
  const BulkSaveResponseSchema = import_zod.z.array(BulkSaveRow);
49
+ const OptionalIdCouchDoc = import_crud.CouchDoc.extend({
50
+ _id: import_crud.CouchDoc.shape._id.optional()
51
+ });
48
52
  const BulkSave = import_zod.z.function().args(
49
53
  import_config.CouchConfig,
50
- import_zod.z.array(import_crud.CouchDoc)
54
+ import_zod.z.array(OptionalIdCouchDoc)
51
55
  ).returns(import_zod.z.promise(BulkSaveResponseSchema));
52
56
  const BulkSaveBound = import_zod.z.function().args(
53
- import_zod.z.array(import_crud.CouchDoc)
57
+ import_zod.z.array(OptionalIdCouchDoc)
54
58
  ).returns(import_zod.z.promise(BulkSaveResponseSchema));
55
59
  const BulkGet = import_zod.z.function().args(
56
60
  import_config.CouchConfig,
package/impl/query.mjs CHANGED
@@ -49,7 +49,7 @@ export const query = SimpleViewQuery.implement(async (config, view, options = {}
49
49
  // Safari not understanding 304s on POSTs (see pouchdb/pouchdb#1239)
50
50
  method = 'GET'
51
51
  if (qs.length > 0) qs += '&'
52
- else qs = '?'
52
+ else qs = ''
53
53
  qs += keysAsString
54
54
  } else {
55
55
  method = 'POST'