data-primals-engine 1.1.4 → 1.1.6

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.
@@ -11,7 +11,9 @@ on:
11
11
 
12
12
  jobs:
13
13
  build:
14
-
14
+ permissions:
15
+ contents: read
16
+ pull-requests: write
15
17
  runs-on: ubuntu-latest
16
18
  container:
17
19
  image: node:20 # Specify the Docker version you needx
package/README.md CHANGED
@@ -58,6 +58,10 @@ MONGO_DB_URL=mongodb://127.0.0.1:27017
58
58
  | SMTP_PORT | SMTP server port. | 587 |
59
59
  | SMTP_USER | Username for SMTP authentication. | user@example.com |
60
60
  | SMTP_PASS | Password for SMTP authentication. | password |
61
+ | TLS | Encrypted connection (TLS) mode. Disabled by default | 0/1 false/true |
62
+ | CERT | Path to cert file. | certs/ca.crt |
63
+ | CA_CERT | Path to CA cert file. | certs/cert.pem |
64
+ | CERT_KEY | Path to the key file for your certificate. | certs/key.pem |
61
65
 
62
66
  Start the server:
63
67
  ```bash
@@ -107,6 +111,7 @@ Define schemas using JSON:
107
111
  | array | Stores a list of values. | itemsType: 'enum' // any type except relations |
108
112
  | object | Stores a nested JSON object. – | |
109
113
  | code | Stores language="*" as string, stores language="json" as arbitrary JSON structure. | language="json" conditionBuilder=true |
114
+ | color | Stores an hexadecimal value of an RGB color | '#FF0000' |
110
115
  | model | Stores a model by name | – |
111
116
  | modelField | Stores a model field path | – |
112
117
 
@@ -234,11 +239,14 @@ curl -X DELETE http://localhost:7633/api/data?_user=demo \
234
239
 
235
240
  Make sure you use the code below to initialize the user :
236
241
  ```javascript
242
+ import express from "express";
237
243
  import { Engine } from 'data-primals-engine/engine';
238
244
  import { insertData, searchData } from 'data-primals-engine/modules/data';
239
245
 
240
246
  // Ensure the engine is initialized
241
- const engine = await Engine.Create();
247
+
248
+ const app = express();
249
+ const engine = await Engine.Create({ app });
242
250
  const currentUser = await engine.userProvider.findUserByUsername('demo');
243
251
  if (!currentUser) {
244
252
  throw new Error("Could not retrieve the user. Please check credentials or user provider.");