data-primals-engine 1.1.4 → 1.1.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.
package/README.md CHANGED
@@ -107,6 +107,7 @@ Define schemas using JSON:
107
107
  | array | Stores a list of values. | itemsType: 'enum' // any type except relations |
108
108
  | object | Stores a nested JSON object. – | |
109
109
  | code | Stores language="*" as string, stores language="json" as arbitrary JSON structure. | language="json" conditionBuilder=true |
110
+ | color | Stores an hexadecimal value of an RGB color | '#FF0000' |
110
111
  | model | Stores a model by name | – |
111
112
  | modelField | Stores a model field path | – |
112
113
 
@@ -234,11 +235,14 @@ curl -X DELETE http://localhost:7633/api/data?_user=demo \
234
235
 
235
236
  Make sure you use the code below to initialize the user :
236
237
  ```javascript
238
+ import express from "express";
237
239
  import { Engine } from 'data-primals-engine/engine';
238
240
  import { insertData, searchData } from 'data-primals-engine/modules/data';
239
241
 
240
242
  // Ensure the engine is initialized
241
- const engine = await Engine.Create();
243
+
244
+ const app = express();
245
+ const engine = await Engine.Create({ app });
242
246
  const currentUser = await engine.userProvider.findUserByUsername('demo');
243
247
  if (!currentUser) {
244
248
  throw new Error("Could not retrieve the user. Please check credentials or user provider.");