corebasic 1.0.199 → 1.0.201

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/libs/elabase.js CHANGED
@@ -281,7 +281,7 @@ export const operation = async (name, extras) => {
281
281
 
282
282
 
283
283
  // Ported
284
- export const insert = async (meta, collection, value, _id, options, extras) => {
284
+ export const insert = async (meta, collection, value, options, extras) => {
285
285
 
286
286
  if (!(meta instanceof DipMeta)) console.warn('Warn: Provided meta is not an instance of DipMeta in Dip.insert()') // TODO: throw error once review completes
287
287
 
@@ -303,8 +303,10 @@ export const insert = async (meta, collection, value, _id, options, extras) => {
303
303
  arg.suffix = generate_suffix(meta)
304
304
  arg.executor = meta.executor ?? "native"
305
305
  arg = Object.assign({}, topology_meta, arg)
306
- if (_id)
307
- arg._id = _id
306
+ if (options?._id) {
307
+ arg._id = options._id
308
+ arg.options = {...options, _id: undefined}
309
+ }
308
310
 
309
311
  if (meta.batch) {
310
312
  if (!batches[meta.batch])
package/libs/features.js CHANGED
@@ -148,7 +148,8 @@ const apiHandler = async (req, res) => {
148
148
 
149
149
  if (method === "get") {
150
150
  try {
151
- await feature.handler({...req, headers: req.headers, body: {...req.body, topic} }, res)
151
+ req.body = {...req.body, topic}
152
+ await feature.handler(req, res)
152
153
  } catch (err) {
153
154
  if (process.env.DEBUG_MODE)
154
155
  console.log('Error: Feature: ', req.body?.feature ?? (featureless ? `Featureless Api:${featureless.api}` : undefined), err)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.199",
4
+ "version": "1.0.201",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {