not-node 6.4.6 → 6.4.8

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": "not-node",
3
- "version": "6.4.6",
3
+ "version": "6.4.8",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -55,7 +55,6 @@
55
55
  "inquirer": "^10.1.8",
56
56
  "inquirer-autocomplete-prompt": "^3.0.1",
57
57
  "jsonwebtoken": "^9.0.2",
58
- "lower-case": "*",
59
58
  "method-override": "^3.0.0",
60
59
  "mongoose-validator": "*",
61
60
  "nconf": "*",
@@ -4,9 +4,12 @@ const notError = require("not-error/src/error.node.cjs");
4
4
  module.exports = (prepared /*, req*/) => {
5
5
  if (!prepared?.identity?.root && !prepared?.identity?.admin) {
6
6
  if (prepared.identity?.uid) {
7
- prepared.filter = notFilter.filter.modifyRules(prepared.filter, {
8
- owner: prepared.identity.uid,
9
- });
7
+ prepared.filter = notFilter.filter.modifyRules(
8
+ prepared.filter || {},
9
+ {
10
+ owner: prepared.identity.uid,
11
+ }
12
+ );
10
13
  } else {
11
14
  throw new notError("User identity has no uid in it", {
12
15
  sid: prepared.identity?.sid,
@@ -4,6 +4,9 @@ const notError = require("not-error/src/error.node.cjs");
4
4
  module.exports = (prepared /*, req*/) => {
5
5
  if (!prepared?.identity?.root && !prepared?.identity?.admin) {
6
6
  if (prepared.identity?.uid) {
7
+ if (!prepared.data) {
8
+ prepared.data = {};
9
+ }
7
10
  prepared.data.owner = prepared.identity?.uid;
8
11
  prepared.data.ownerModel = USER_MODEL_NAME;
9
12
  } else {
package/src/form/form.js CHANGED
@@ -256,6 +256,11 @@ class Form {
256
256
  };
257
257
  if (this.getActionDataDataTypes(req).includes(ACTION_DATA_TYPES.DATA)) {
258
258
  result.data = this.#extractByBestInstructions(req);
259
+ } else if (this.getActionDataDataTypes(req).includes("record")) {
260
+ getApp().warn(
261
+ 'actionData.data = record is obsolete, use data instead aka data:["data"]'
262
+ );
263
+ result.data = this.#extractByBestInstructions(req);
259
264
  }
260
265
  return result;
261
266
  }