datacontract-editor 0.1.1 → 0.1.3

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
@@ -2,33 +2,92 @@
2
2
 
3
3
  A web-based editor for creating and managing data contracts using the [Open Data Contract Standard](https://bitol-io.github.io/open-data-contract-standard/latest/) (ODCS).
4
4
 
5
- ![Screenshot](docs/screenshot.png)
5
+ ![Screenshot](https://raw.githubusercontent.com/datacontract/datacontract-editor/main/docs/screenshot.png)
6
6
 
7
7
  ## Features
8
8
 
9
+ - **Open Data Contract Standard**: ODCS is the industry-standard for data contracts. Now with support for v3.1.0.
9
10
  - **Editing Modes**:
10
11
  - **Visual Editor**: Define data models and relationships using a visual interface
11
- - **Form Editor**: Get guided input from a simple form interface
12
- - **YAML Editor**: Edit data contracts in YAML format
13
- - **Real-time Preview**: Live preview of data contracts with syntax validation
12
+ - **Form Editor**: Get guided input with a simple form interface
13
+ - **YAML Editor**: Edit data contracts directly in YAML format with code completion
14
+ - **Preview**: Live preview of data contracts as HTML
14
15
  - **Validation**: Get instant feedback on your data contracts
15
- - **Data Contract CLI Integration**: Run tests against your contracts using the Data Contract CLI API Server.
16
+ - **Test**: Test your data contract directly against your data using the Data Contract CLI API Server.
16
17
 
17
18
 
18
19
  ## Usage
19
20
 
20
21
  ### Web Editor
21
22
 
23
+ Open the editor as web application:
24
+
22
25
  https://editor.datacontract.com
23
26
 
24
27
 
25
28
  ### Standalone Application
26
29
 
27
- Coming soon!
30
+ You can start the editor locally using the following command:
31
+
32
+ ```
33
+ npx datacontract-editor
34
+ ```
35
+
36
+ Or edit a data contract file directly:
28
37
 
29
38
  ```
30
- npx datacontract-editor datacontract.yaml
39
+ npx datacontract-editor mydatacontract.odcs.yaml
40
+ ```
41
+
42
+
43
+
44
+ ### Docker
45
+
46
+ Run the editor locally in a Docker container:
47
+
31
48
  ```
49
+ docker run -d -p 4173:4173 datacontract/editor
50
+ ```
51
+
52
+ Then open http://localhost:4173
53
+
54
+ #### Configure AI Assistant
55
+
56
+ The AI Assistant is disabled by default in Docker. To enable it, provide your own OpenAI-compatible endpoint:
57
+
58
+ **OpenAI:**
59
+ ```bash
60
+ docker run -d -p 4173:4173 \
61
+ -e AI_ENDPOINT=https://api.openai.com/v1/chat/completions \
62
+ -e AI_API_KEY=sk-your-api-key \
63
+ -e AI_MODEL=gpt-4o \
64
+ datacontract/editor
65
+ ```
66
+
67
+ **Azure OpenAI:**
68
+ ```bash
69
+ docker run -d -p 4173:4173 \
70
+ -e AI_ENDPOINT=https://your-resource.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-02-15-preview \
71
+ -e AI_API_KEY=your-azure-key \
72
+ -e AI_AUTH_HEADER=api-key \
73
+ datacontract/editor
74
+ ```
75
+
76
+ **Local LLM (Ollama):**
77
+ ```bash
78
+ docker run -d -p 4173:4173 \
79
+ -e AI_ENDPOINT=http://host.docker.internal:11434/v1/chat/completions \
80
+ -e AI_API_KEY=ollama \
81
+ -e AI_MODEL=llama3.2 \
82
+ datacontract/editor
83
+ ```
84
+
85
+ | Variable | Description | Default |
86
+ |----------|-------------|---------|
87
+ | `AI_ENDPOINT` | OpenAI-compatible chat completions URL | Hosted API |
88
+ | `AI_API_KEY` | API key for authentication | Hosted API |
89
+ | `AI_MODEL` | Model name | `gpt-4o` |
90
+ | `AI_AUTH_HEADER` | Auth header: `bearer` or `api-key` | `bearer` |
32
91
 
33
92
 
34
93
  ### Data Contract CLI
@@ -45,7 +104,7 @@ datacontract editor datacontract.yaml
45
104
 
46
105
  ### Entropy Data
47
106
 
48
- [Entropy Data](https://entropy-data.com) is our commercial offering for managing data products with data contracts.
107
+ The Data Contract Editor is fully integrated in our commercial product [Entropy Data](https://entropy-data.com) to manage multiple data contracts in a single application.
49
108
 
50
109
 
51
110
 
@@ -1,4 +1,4 @@
1
- import { m as tt } from "./embed-BE-6FjUW.js";
1
+ import { m as tt } from "./embed-BTxQKyKe.js";
2
2
  var rt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, it = Object.getOwnPropertyNames, ot = Object.prototype.hasOwnProperty, at = (e, n, i, r) => {
3
3
  if (n && typeof n == "object" || typeof n == "function")
4
4
  for (let t of it(n))