data-primals-engine 1.6.5 → 1.7.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/README.md +160 -113
- package/client/index.js +3 -0
- package/client/package-lock.json +8121 -8824
- package/client/package.json +10 -3
- package/client/src/AssistantChat.jsx +369 -362
- package/client/src/DataEditor.jsx +383 -383
- package/client/src/DataLayout.jsx +54 -20
- package/client/src/ModelList.jsx +280 -280
- package/client/src/ViewSwitcher.scss +0 -31
- package/client/src/constants.js +81 -100
- package/client/src/contexts/CommandContext.jsx +274 -259
- package/client/vite.config.js +30 -30
- package/doc/AI-assistance.md +93 -0
- package/doc/Advanced-workflows.md +90 -0
- package/doc/Event-system.md +79 -0
- package/doc/Packs-gallery.md +73 -0
- package/package.json +30 -16
- package/src/constants.js +1 -1
- package/src/core.js +487 -477
- package/src/defaultModels.js +1 -1
- package/src/email.js +0 -2
- package/src/engine.js +342 -335
- package/src/filter.js +348 -343
- package/src/migrate.js +1 -1
- package/src/modules/assistant/assistant.js +30 -20
- package/src/modules/data/data.backup.js +4 -4
- package/src/modules/data/data.js +311 -302
- package/src/modules/data/data.operations.js +79 -64
- package/src/modules/data/data.relations.js +2 -1
- package/src/modules/data/data.scheduling.js +1 -1
- package/src/modules/mongodb.js +16 -8
- package/src/modules/user.js +0 -1
- package/src/modules/workflow.js +1828 -1815
- package/src/packs.js +5701 -5697
- package/src/profiles.js +19 -0
- package/swagger-en.yml +3390 -3385
- package/swagger-fr.yml +3385 -3380
- package/test/assistant.test.js +2 -2
- package/test/data.backup.integration.test.js +3 -1
- package/test/data.history.integration.test.js +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# AI Assistance: Leverage Artificial Intelligence
|
|
2
|
+
|
|
3
|
+
`data-primals-engine` includes a powerful, built-in AI assistant named **Prior**. This assistant is designed to understand natural language queries, allowing you to interact with your data, generate insights, and perform actions without writing complex code or API requests.
|
|
4
|
+
|
|
5
|
+
## Enabling the AI Assistant
|
|
6
|
+
|
|
7
|
+
To use the AI assistant, you must first provide API keys for one or more supported AI providers. The engine natively supports providers like **OpenAI, Google (Gemini), DeepSeek, and Anthropic**.
|
|
8
|
+
|
|
9
|
+
You can configure your keys in two ways:
|
|
10
|
+
|
|
11
|
+
1. **Environment Variables**: Set the appropriate variable in your `.env` file. This is the recommended approach for production.
|
|
12
|
+
```env
|
|
13
|
+
# Choose one or more providers
|
|
14
|
+
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx
|
|
15
|
+
GOOGLE_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxx
|
|
16
|
+
DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **`env` Model**: For user-specific keys, you can store them in the `env` model within the application. The assistant will automatically look for a key belonging to the current user.
|
|
20
|
+
|
|
21
|
+
Once a key is configured, the AI assistant chat interface becomes available in the UI.
|
|
22
|
+
|
|
23
|
+
## Core Capabilities
|
|
24
|
+
|
|
25
|
+
The assistant, "Prior," can perform a wide range of actions based on your natural language commands.
|
|
26
|
+
|
|
27
|
+
### 1. Data Querying and Visualization
|
|
28
|
+
|
|
29
|
+
You can ask the assistant to find, filter, and display your data. It can present the results in various formats.
|
|
30
|
+
|
|
31
|
+
- **Simple Search**:
|
|
32
|
+
> "Show me the latest 5 orders from French customers."
|
|
33
|
+
|
|
34
|
+
- **Chart Generation**: Create charts on the fly.
|
|
35
|
+
> "Create a bar chart of user sign-ups per month for the last year."
|
|
36
|
+
|
|
37
|
+
- **Custom HTML Views**: Generate sophisticated, styled views of your data using Handlebars templates.
|
|
38
|
+
> "Build a dashboard of my active projects with their status and due dates, using a modern dark theme."
|
|
39
|
+
|
|
40
|
+
### 2. Data Modification (with Confirmation)
|
|
41
|
+
|
|
42
|
+
The assistant can create, update, or delete data, but it will **always ask for your confirmation** before executing a modifying action. This provides a critical safety layer.
|
|
43
|
+
|
|
44
|
+
- **Create Data**:
|
|
45
|
+
> "Create a new task to 'Follow up with Client X' due tomorrow."
|
|
46
|
+
|
|
47
|
+
- **Update Data**:
|
|
48
|
+
> "Update the status of all tickets in the 'Support' category to 'resolved'."
|
|
49
|
+
|
|
50
|
+
- **Delete Data**:
|
|
51
|
+
> "Delete all draft products created before last month."
|
|
52
|
+
|
|
53
|
+
When you issue such a command, the assistant will respond with a summary of the action it intends to perform and a "Confirm" button. The action is only executed after you click it.
|
|
54
|
+
|
|
55
|
+
### 3. Answering Questions
|
|
56
|
+
|
|
57
|
+
The assistant can answer questions about the data it has access to.
|
|
58
|
+
|
|
59
|
+
> "What was our total revenue in the last quarter?"
|
|
60
|
+
|
|
61
|
+
## How It Works: The Reasoning Loop
|
|
62
|
+
|
|
63
|
+
When you send a message, the assistant follows a strict reasoning process:
|
|
64
|
+
|
|
65
|
+
1. **Analyze Intent**: It first analyzes your request to understand what you want to do.
|
|
66
|
+
2. **Search Models (Internal Step)**: Its first action is always to call the `search_models` tool internally. This gives it the exact structure, field names, and types for the relevant data models. This step is crucial for preventing errors and "hallucinations."
|
|
67
|
+
3. **Formulate Action**: Based on your intent and the model structures it found, it formulates a final action, such as `search`, `generateChart`, or a `post` request.
|
|
68
|
+
4. **Execute or Confirm**:
|
|
69
|
+
- If it's a read-only action (like `search` or `generateChart`), it executes it and displays the result.
|
|
70
|
+
- If it's a write action (like `post` or `delete`), it presents the action to you for confirmation.
|
|
71
|
+
|
|
72
|
+
## AI in Workflows: The `GenerateAIContent` Action
|
|
73
|
+
|
|
74
|
+
Beyond the chat interface, you can leverage AI directly within your automation **Workflows**. The `GenerateAIContent` action allows you to call an AI model as a step in a workflow.
|
|
75
|
+
|
|
76
|
+
This is perfect for tasks like:
|
|
77
|
+
- Summarizing a new support ticket.
|
|
78
|
+
- Generating a product description when a new product is added.
|
|
79
|
+
- Classifying incoming data based on its content.
|
|
80
|
+
- Translating text.
|
|
81
|
+
|
|
82
|
+
**Example `workflowAction`:**
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"name": "Summarize Ticket",
|
|
86
|
+
"type": "GenerateAIContent",
|
|
87
|
+
"aiProvider": "OpenAI",
|
|
88
|
+
"aiModel": "gpt-4-turbo",
|
|
89
|
+
"prompt": "Summarize the following support ticket in one sentence: {triggerData.description}"
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This integration of AI both as an interactive assistant and as an automation component makes `data-primals-engine` a powerful platform for building intelligent applications.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Advanced Workflows: Custom Logic with Scripts
|
|
2
|
+
|
|
3
|
+
While the standard workflow actions in `data-primals-engine` cover many common use cases, the `ExecuteScript` action provides ultimate flexibility by allowing you to run custom server-side JavaScript code as part of any workflow. This enables complex data transformations, conditional logic, and dynamic interactions that go beyond pre-defined actions.
|
|
4
|
+
|
|
5
|
+
## The `ExecuteScript` Action
|
|
6
|
+
|
|
7
|
+
The `ExecuteScript` action type within a `workflowAction` document lets you write and execute a JavaScript snippet in a secure, sandboxed environment.
|
|
8
|
+
|
|
9
|
+
### Key Features:
|
|
10
|
+
|
|
11
|
+
- **Full JavaScript Support**: Write modern JavaScript (async/await) to implement your logic.
|
|
12
|
+
- **Access to Workflow Context**: Your script can read from and write to the `contextData` object, allowing you to pass data between workflow steps.
|
|
13
|
+
- **Database Interaction**: Use a sandboxed `db` object to perform CRUD operations.
|
|
14
|
+
- **Error Handling**: Throwing an error in your script will fail the current workflow step and can trigger the `onFailureStep`.
|
|
15
|
+
|
|
16
|
+
### Action Configuration
|
|
17
|
+
|
|
18
|
+
When creating a `workflowAction` of type `ExecuteScript`, the most important field is `script`:
|
|
19
|
+
|
|
20
|
+
- **`script`** (code - JavaScript): The JavaScript code to be executed.
|
|
21
|
+
|
|
22
|
+
**Example `workflowAction` document:**
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"name": "Calculate Order Discount",
|
|
26
|
+
"type": "ExecuteScript",
|
|
27
|
+
"script": "const orderTotal = contextData.triggerData.totalAmount;\nif (orderTotal > 100) {\n contextData.discountAmount = orderTotal * 0.1;\n contextData.needsManagerApproval = false;\n} else if (orderTotal > 500) {\n contextData.discountAmount = orderTotal * 0.2;\n contextData.needsManagerApproval = true;\n}\nreturn contextData;"
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## The Execution Environment
|
|
32
|
+
|
|
33
|
+
Your script runs in an `async` function and has access to several globally-injected objects:
|
|
34
|
+
|
|
35
|
+
- **`contextData`** (object): This is the heart of your workflow's state. It contains:
|
|
36
|
+
- `triggerData`: The data from the event that initiated the workflow (e.g., the newly created document in a `DataAdded` trigger).
|
|
37
|
+
- Any data added by previous steps.
|
|
38
|
+
- Your script can read from and write to `contextData`. The returned object from your script will become the new `contextData` for subsequent steps.
|
|
39
|
+
|
|
40
|
+
- **`db`** (object): A secure API to interact with the database. All methods are `async` and must be `await`-ed. They automatically respect the permissions of the user who triggered the workflow.
|
|
41
|
+
- `await db.create(modelName, dataObject)`
|
|
42
|
+
- `await db.find(modelName, filter)`
|
|
43
|
+
- `await db.findOne(modelName, filter)`
|
|
44
|
+
- `await db.update(modelName, filter, updateObject)`
|
|
45
|
+
- `await db.delete(modelName, filter)`
|
|
46
|
+
|
|
47
|
+
- **`logger`** (object): A safe logging utility to help with debugging.
|
|
48
|
+
- `logger.info(...)`
|
|
49
|
+
- `logger.warn(...)`
|
|
50
|
+
- `logger.error(...)`
|
|
51
|
+
|
|
52
|
+
- **`env`** (object): Provides access to user-defined variables stored in the `env` model.
|
|
53
|
+
- `await env.get(variableName)`
|
|
54
|
+
- `await env.getAll()`
|
|
55
|
+
|
|
56
|
+
## Example: Conditional Logic and Data Creation
|
|
57
|
+
|
|
58
|
+
Imagine a workflow triggered when a `ticket` is created. If the ticket priority is "high", we want to create a new `task` for a manager.
|
|
59
|
+
|
|
60
|
+
1. **Trigger**: `onEvent: DataAdded`, `targetModel: ticket`.
|
|
61
|
+
2. **Step 1**: "Check Priority and Create Task"
|
|
62
|
+
- **Action**: `ExecuteScript`
|
|
63
|
+
- **Script**:
|
|
64
|
+
```javascript
|
|
65
|
+
// Check if the priority is high
|
|
66
|
+
if (contextData.triggerData.priority !== 'high') {
|
|
67
|
+
logger.info('Ticket priority is not high, skipping task creation.');
|
|
68
|
+
return contextData; // Exit script
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Find the manager's user ID (assuming a 'manager' role exists)
|
|
72
|
+
const manager = await db.findOne('user', { role: { $find: { name: 'manager' } } });
|
|
73
|
+
|
|
74
|
+
if (manager) {
|
|
75
|
+
// Create a new task and assign it to the manager
|
|
76
|
+
await db.create('task', {
|
|
77
|
+
title: `High-priority ticket: ${contextData.triggerData.subject}`,
|
|
78
|
+
assignedTo: manager._id,
|
|
79
|
+
relatedTicket: contextData.triggerData._id,
|
|
80
|
+
status: 'todo'
|
|
81
|
+
});
|
|
82
|
+
logger.info(`Task created for manager ${manager.username}.`);
|
|
83
|
+
} else {
|
|
84
|
+
logger.warn('No manager found to assign the task to.');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return contextData; // Always return the context
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
By leveraging the `ExecuteScript` action, you can build sophisticated, stateful, and dynamic workflows that precisely match your application's business rules.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Event System: Extending Core Functionality
|
|
2
|
+
|
|
3
|
+
The `data-primals-engine` is built on a powerful event-driven architecture. The `Event` system allows you to hook into core operations, enabling you to extend and customize the engine's behavior without modifying its source code. This is the primary mechanism for creating custom modules and advanced middleware.
|
|
4
|
+
|
|
5
|
+
## Listening to Events
|
|
6
|
+
|
|
7
|
+
You can register a callback function that will be executed whenever a specific event is triggered. This is done using the `Event.Listen()` method.
|
|
8
|
+
|
|
9
|
+
### Syntax
|
|
10
|
+
|
|
11
|
+
```javascript
|
|
12
|
+
Event.Listen(eventName, callback, scope, type);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- **`eventName`** (string): The name of the event to listen to (e.g., `"OnDataAdded"`).
|
|
16
|
+
- **`callback`** (function): The function to execute when the event fires. The arguments it receives depend on the event.
|
|
17
|
+
- **`scope`** (string): Must be `"event"`.
|
|
18
|
+
- **`type`** (string): Determines the callback signature.
|
|
19
|
+
- `"user"`: The callback receives arguments relevant to a user action (e.g., `(data)`).
|
|
20
|
+
- `"system"`: The callback receives the full `engine` instance as its first argument, followed by other arguments (e.g., `(engine, data)`).
|
|
21
|
+
|
|
22
|
+
### Example: Logging New Data
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
import { Event } from 'data-primals-engine';
|
|
26
|
+
|
|
27
|
+
Event.Listen(
|
|
28
|
+
"OnDataAdded",
|
|
29
|
+
(engine, insertedDocs) => {
|
|
30
|
+
const logger = engine.getComponent('Logger');
|
|
31
|
+
logger.info(`New documents were added:`, insertedDocs);
|
|
32
|
+
},
|
|
33
|
+
"event",
|
|
34
|
+
"system"
|
|
35
|
+
);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Triggering Custom Events
|
|
39
|
+
|
|
40
|
+
You can also define and trigger your own custom events. This is useful for making your own modules extensible.
|
|
41
|
+
|
|
42
|
+
```javascript
|
|
43
|
+
import { Event } from 'data-primals-engine';
|
|
44
|
+
|
|
45
|
+
async function myCustomFunction(data) {
|
|
46
|
+
// ... some logic ...
|
|
47
|
+
|
|
48
|
+
// Trigger a custom event and pass data to listeners
|
|
49
|
+
const results = await Event.Trigger("OnMyCustomEvent", "event", "user", data);
|
|
50
|
+
|
|
51
|
+
// ... do something with results from listeners ...
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
When multiple listeners are registered for an event, their return values are merged:
|
|
56
|
+
- **strings** are concatenated.
|
|
57
|
+
- **numbers** are added.
|
|
58
|
+
- **booleans** are logical AND-ed.
|
|
59
|
+
- **arrays** are concatenated.
|
|
60
|
+
- **objects** are merged (spread operator).
|
|
61
|
+
|
|
62
|
+
## Core Events Table
|
|
63
|
+
|
|
64
|
+
Here is a list of the most important events you can listen to:
|
|
65
|
+
|
|
66
|
+
| Event | Description | Scope | Triggered by | Arguments (Payload) |
|
|
67
|
+
|:-------------------|:-----------------------------------------------------------------|:-------|:-----------------------------|:-----------------------------------------------------------------------------------|
|
|
68
|
+
| `OnServerStart` | Triggered once the HTTP server is started and listening. | System | `engine.start()` | `engine` |
|
|
69
|
+
| `OnDatabaseLoaded` | Triggered once the lient is ready | System | | `engine` |
|
|
70
|
+
| `OnModelsLoaded` | Triggered after the initial models are loaded at startup. | System | `setupInitialModels()` | `engine`, `dbModels` |
|
|
71
|
+
| `OnModelEdited` | Triggered after a model definition has been modified. | System | `editModel()` | `newModel` |
|
|
72
|
+
| `OnDataAdded` | Triggered after new data has been inserted. | System | `insertData()` | `engine`, `insertedDocs` |
|
|
73
|
+
| `OnDataEdited` | Triggered after data has been edited. | System | `editData()` / `patchData()` | `engine`, `{modelName, before, after}` |
|
|
74
|
+
| `OnDataDeleted` | Triggered just after data is actually deleted. | System | `deleteData()` | `engine`, `{model, filter}` |
|
|
75
|
+
| `OnDataSearched` | Triggered after a data search. | System | `searchData()` | `engine`, `{data, count}` |
|
|
76
|
+
| `OnDataInsert` | Triggered just before data insertion. Allows modifying the data. | System | internal | `data` |
|
|
77
|
+
| `OnDataValidate` | Triggered to override validation checks. | System | internal | `value`, `field`, `data` |
|
|
78
|
+
| `OnChatAction` | Triggered when an AI assistant decides on an action. | User | `handleChatRequest` | `action`, `params`, `parsedResponse`, `command`, `llmOptions`, `user`, `reqParams` |
|
|
79
|
+
| `OnSystemPrompt` | Triggered to override the AI assistant's system prompt. | User | `handleChatRequest` | `user` |
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Packs Gallery: Discover and Install Ready-to-Use Configurations
|
|
2
|
+
|
|
3
|
+
**Packs** are pre-built configurations that allow you to quickly set up your `data-primals-engine` application with ready-to-use models, data, workflows, and more. They are designed to bootstrap common use cases like a CRM, an e-commerce backoffice, or a project management tool, saving you significant development time.
|
|
4
|
+
|
|
5
|
+
The **Pack Gallery** is the centralized place within the UI where you can discover, preview, and install these packs.
|
|
6
|
+
|
|
7
|
+
## What is a Pack?
|
|
8
|
+
|
|
9
|
+
A pack is a JSON object that can contain:
|
|
10
|
+
|
|
11
|
+
- **`models`**: A list of model definitions (schemas) to be created.
|
|
12
|
+
- **`data`**: Sample or initial data for the models in the pack. Data can be generic or language-specific.
|
|
13
|
+
- **`workflows`**: Pre-configured automation workflows, including triggers, steps, and actions.
|
|
14
|
+
- **`dashboards`** and **`kpis`**: Ready-to-use dashboards and KPIs for monitoring.
|
|
15
|
+
|
|
16
|
+
## Installing a Pack
|
|
17
|
+
|
|
18
|
+
You can install a pack in two ways: by its ID from the gallery or by providing a custom JSON structure directly.
|
|
19
|
+
|
|
20
|
+
### 1. Installing from the Gallery
|
|
21
|
+
|
|
22
|
+
Each pack in the gallery has a unique ID. You can use the `installPack` function with this ID to install it.
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
import { installPack } from 'data-primals-engine';
|
|
26
|
+
|
|
27
|
+
// Assuming 'currentUser' is your authenticated user object
|
|
28
|
+
const packId = "61d1f1a9e3f1a9e3f1a9e3f1"; // Example ID for an e-commerce pack
|
|
29
|
+
const installationSummary = await installPack(packId, currentUser, "en");
|
|
30
|
+
|
|
31
|
+
console.log(installationSummary);
|
|
32
|
+
// Returns a summary of created models, inserted data, etc.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. Installing a Custom Pack
|
|
36
|
+
|
|
37
|
+
You can also define a pack on-the-fly and install it. This is useful for migrating configurations between environments or for programmatic setup.
|
|
38
|
+
|
|
39
|
+
The `installPack` function accepts an array containing the pack's JSON definition.
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
import { installPack } from 'data-primals-engine';
|
|
43
|
+
|
|
44
|
+
const myCustomPack = [
|
|
45
|
+
{
|
|
46
|
+
"name": "Simple Blog Pack",
|
|
47
|
+
"description": "A basic setup for a blog with posts and categories.",
|
|
48
|
+
"tags": ["blog", "cms"],
|
|
49
|
+
"models": [
|
|
50
|
+
{
|
|
51
|
+
"name": "post",
|
|
52
|
+
"fields": [
|
|
53
|
+
{ "name": "title", "type": "string_t", "required": true },
|
|
54
|
+
{ "name": "content", "type": "richtext_t" },
|
|
55
|
+
{ "name": "status", "type": "enum", "items": ["draft", "published"] }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"data": {
|
|
60
|
+
"all": { // Data for all languages
|
|
61
|
+
"post": [
|
|
62
|
+
{ "title": { "key": "first_post_title", "value": "My First Post" }, "status": "draft" }
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const summary = await installPack(myCustomPack, currentUser, "en");
|
|
70
|
+
console.log(summary);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
By using packs, you can dramatically accelerate your project setup and ensure consistency across different instances of your application.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-primals-engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "data-primals-engine is a package responsible from handling large amount of data using MongoDB in a practical and performant way. It can also get workflow models working (for automation), and fully supports internationalisation. It also has integrated AI assistant.",
|
|
5
5
|
"main": "src/engine.js",
|
|
6
6
|
"type": "module",
|
|
@@ -28,16 +28,24 @@
|
|
|
28
28
|
"@rollup/rollup-linux-x64-gnu": "4.6.1"
|
|
29
29
|
},
|
|
30
30
|
"resolutions": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
31
|
+
"flatted": ">=3.4.2",
|
|
32
|
+
"rollup": ">=4.59.0",
|
|
33
|
+
"on-headers": ">=1.1.0",
|
|
34
|
+
"brace-expansion": ">=2.0.2",
|
|
35
|
+
"prismjs": ">=1.30.0",
|
|
34
36
|
"xml2js": ">=0.5.0",
|
|
35
37
|
"tar-fs": ">=3.1.1",
|
|
36
|
-
"vite": ">=7.
|
|
37
|
-
"node-forge": ">=1.
|
|
38
|
+
"vite": ">=7.3.2",
|
|
39
|
+
"node-forge": ">=1.4.0",
|
|
38
40
|
"js-yaml": ">=4.1.1",
|
|
39
41
|
"mdast-util-to-hast": ">=13.2.1",
|
|
40
|
-
"jws": ">=3.2.3"
|
|
42
|
+
"jws": ">=3.2.3",
|
|
43
|
+
"undici": ">=6.23.0",
|
|
44
|
+
"@xmldom/xmldom": ">=0.8.12",
|
|
45
|
+
"picomatch": ">=4.0.4",
|
|
46
|
+
"langsmith": ">=0.5.19",
|
|
47
|
+
"qs": ">=6.14.2",
|
|
48
|
+
"fast-xml-parser": ">=4.5.5"
|
|
41
49
|
},
|
|
42
50
|
"overrides": {
|
|
43
51
|
"react-syntax-highlighter": {
|
|
@@ -48,11 +56,17 @@
|
|
|
48
56
|
},
|
|
49
57
|
"refractor": {
|
|
50
58
|
"prismjs": "1.30.0"
|
|
59
|
+
},
|
|
60
|
+
"body-parser": {
|
|
61
|
+
"qs": ">=6.14.1"
|
|
62
|
+
},
|
|
63
|
+
"stripe": {
|
|
64
|
+
"qs": ">=6.14.1"
|
|
51
65
|
}
|
|
52
66
|
},
|
|
53
67
|
"repository": {
|
|
54
68
|
"type": "git",
|
|
55
|
-
"url": "https://github.com/anonympins/data-primals-engine.git"
|
|
69
|
+
"url": "git+https://github.com/anonympins/data-primals-engine.git"
|
|
56
70
|
},
|
|
57
71
|
"exports": {
|
|
58
72
|
".": "./src/index.js",
|
|
@@ -63,7 +77,7 @@
|
|
|
63
77
|
"./*": "./src/*.js"
|
|
64
78
|
},
|
|
65
79
|
"dependencies": {
|
|
66
|
-
"@langchain/core": "^0.3.
|
|
80
|
+
"@langchain/core": "^0.3.80",
|
|
67
81
|
"archiver": "^7.0.1",
|
|
68
82
|
"aws-sdk": "^2.1692.0",
|
|
69
83
|
"bcrypt": "^6.0.0",
|
|
@@ -78,17 +92,17 @@
|
|
|
78
92
|
"express-csrf-double-submit-cookie": "^2.0.0",
|
|
79
93
|
"express-formidable": "^1.2.0",
|
|
80
94
|
"express-mongo-sanitize": "^2.2.0",
|
|
81
|
-
"express-rate-limit": "
|
|
95
|
+
"express-rate-limit": "8.2.2",
|
|
82
96
|
"express-session": "^1.18.2",
|
|
83
|
-
"handlebars": "
|
|
97
|
+
"handlebars": "4.7.9",
|
|
84
98
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
85
99
|
"isolated-vm": "^5.0.4",
|
|
86
100
|
"juice": "^11.0.3",
|
|
87
|
-
"mathjs": "
|
|
101
|
+
"mathjs": "15.2.0",
|
|
88
102
|
"mongodb": "^6.18.0",
|
|
89
103
|
"node-cache": "^5.1.2",
|
|
90
104
|
"node-schedule": "^2.1.1",
|
|
91
|
-
"nodemailer": "
|
|
105
|
+
"nodemailer": "8.0.5",
|
|
92
106
|
"openai": "^6.9.1",
|
|
93
107
|
"passport": "^0.7.0",
|
|
94
108
|
"passport-saml-encrypted": "^0.1.13",
|
|
@@ -103,11 +117,11 @@
|
|
|
103
117
|
"sirv": "^3.0.2",
|
|
104
118
|
"stripe": "^20.0.0",
|
|
105
119
|
"swagger-ui-express": "^5.0.1",
|
|
106
|
-
"tar": "
|
|
120
|
+
"tar": "7.5.11",
|
|
107
121
|
"tinycolor2": "^1.6.0",
|
|
108
122
|
"uniqid": "^5.4.0",
|
|
109
|
-
"vitest": "
|
|
110
|
-
"yaml": "
|
|
123
|
+
"vitest": "3.2.4",
|
|
124
|
+
"yaml": "2.8.3"
|
|
111
125
|
},
|
|
112
126
|
"peerDependencies": {
|
|
113
127
|
"express": "^5.2.1",
|
package/src/constants.js
CHANGED
|
@@ -277,7 +277,7 @@ metaModels['erp'] = { load: [ 'accountingExercise', 'accountingLineItem', 'accou
|
|
|
277
277
|
* Available model field attributes
|
|
278
278
|
* @type {string[]}
|
|
279
279
|
*/
|
|
280
|
-
export const allowedFields = ['locked', 'hiddenable', 'anonymized', 'condition', 'color', 'index', 'indexType', 'type', 'required', 'hint', 'default', 'validate', 'unique', 'name', 'placeholder', 'asMain'];
|
|
280
|
+
export const allowedFields = ['locked', 'hiddenable', 'encrypted', 'anonymized', 'condition', 'color', 'index', 'indexType', 'type', 'required', 'hint', 'default', 'validate', 'unique', 'name', 'placeholder', 'asMain'];
|
|
281
281
|
|
|
282
282
|
|
|
283
283
|
|