@jcbuisson/express-x-plugins 4.1.0 → 4.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x-plugins",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Plugins for express-x",
5
5
  "type": "module",
6
6
  "main": "./src/electric-server-plugin.mjs",
@@ -8,9 +8,9 @@
8
8
  */
9
9
  export function electricOfflinePlugin(app, db, models, options = {}) {
10
10
  if (!db || typeof db.query !== 'function') throw new TypeError('db must expose query(sql, values)')
11
- if (typeof options.authorize !== 'function') {
12
- throw new TypeError('electricOfflinePlugin requires an authorize(context, operation) policy')
13
- }
11
+ // if (typeof options.authorize !== 'function') {
12
+ // throw new TypeError('electricOfflinePlugin requires an authorize(context, operation) policy')
13
+ // }
14
14
  const configuredModels = normalizeModels(models)
15
15
  const electricUrl = new URL(options.electricUrl ?? process.env.ELECTRIC_URL ?? 'http://localhost:3000/v1/shape')
16
16
  const shapePath = options.shapePath ?? '/electric/v1/shape/:model'