revisium 2.1.0 → 2.2.0

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.
@@ -8,8 +8,8 @@ JWT token from Revisium UI. Best for interactive use.
8
8
 
9
9
  ### Get Your Token
10
10
 
11
- - **Cloud:** <https://cloud.revisium.io/get-mcp-token>
12
- - **Self-hosted:** `https://your-host/get-mcp-token`
11
+ - **Cloud:** <https://cloud.revisium.io/get-token>
12
+ - **Self-hosted:** `https://your-host/get-token`
13
13
 
14
14
  ### Usage
15
15
 
@@ -57,7 +57,7 @@ If no credentials are provided, you'll be prompted:
57
57
 
58
58
  ```text
59
59
  Choose authentication method:
60
- > Token (copy from https://cloud.revisium.io/get-mcp-token)
60
+ > Token (copy from https://cloud.revisium.io/get-token)
61
61
  API Key (for automated access)
62
62
  Username & Password
63
63
 
@@ -63,8 +63,8 @@ revisium migrate apply --file ./migrations.json \
63
63
  ```
64
64
 
65
65
  Get your token:
66
- - **Cloud:** https://cloud.revisium.io/get-mcp-token
67
- - **Self-hosted:** https://your-host/get-mcp-token
66
+ - **Cloud:** https://cloud.revisium.io/get-token
67
+ - **Self-hosted:** https://your-host/get-token
68
68
 
69
69
  ### API Key Authentication
70
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revisium",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "homepage": "https://revisium.io",
5
5
  "description": "A CLI tool for interacting with Revisium instances, providing migration management, schema export, and data export capabilities.",
6
6
  "author": "Anton Kashirov",
@@ -45,7 +45,7 @@
45
45
  "@revisium/client": "^0.4.0",
46
46
  "@revisium/schema-toolkit": "^0.4.1",
47
47
  "@types/object-hash": "^3.0.6",
48
- "ajv": "^8.17.1",
48
+ "ajv": "^8.18.0",
49
49
  "ajv-formats": "^3.0.1",
50
50
  "nest-commander": "^3.18.0",
51
51
  "object-hash": "^3.0.0",
@@ -69,7 +69,7 @@
69
69
  "eslint": "^9.18.0",
70
70
  "eslint-config-prettier": "^10.0.1",
71
71
  "eslint-plugin-prettier": "^5.2.2",
72
- "eslint-plugin-sonarjs": "^3.0.5",
72
+ "eslint-plugin-sonarjs": "^4.0.2",
73
73
  "globals": "^16.0.0",
74
74
  "jest": "^29.7.0",
75
75
  "nyc": "^17.1.0",
@@ -83,6 +83,21 @@
83
83
  "typescript": "^5.7.3",
84
84
  "typescript-eslint": "^8.20.0"
85
85
  },
86
+ "overrides": {
87
+ "hono": "^4.12.7",
88
+ "@hono/node-server": "^1.19.10",
89
+ "lodash": "^4.17.23",
90
+ "@angular-devkit/core": {
91
+ "ajv": "^8.18.0"
92
+ },
93
+ "schema-utils@3": {
94
+ "ajv": "^6.14.0"
95
+ },
96
+ "schema-utils@4": {
97
+ "ajv": "^8.18.0"
98
+ },
99
+ "file-type": "^21.3.2"
100
+ },
86
101
  "jest": {
87
102
  "modulePaths": [
88
103
  "<rootDir>"
@@ -3,6 +3,45 @@ import { sharedFields } from 'src/config/shared-fields';
3
3
 
4
4
  // https://json-schema.org/specification#single-vocabulary-meta-schemas
5
5
 
6
+ export const xFormulaSchema: Schema = {
7
+ type: 'object',
8
+ properties: {
9
+ version: {
10
+ const: 1,
11
+ },
12
+ expression: {
13
+ type: 'string',
14
+ minLength: 1,
15
+ maxLength: 10000,
16
+ },
17
+ },
18
+ additionalProperties: false,
19
+ required: ['version', 'expression'],
20
+ };
21
+
22
+ // When x-formula is present, readOnly must be true
23
+ export const xFormulaRequiresReadOnly: Schema = {
24
+ if: {
25
+ properties: { 'x-formula': { type: 'object' } },
26
+ required: ['x-formula'],
27
+ },
28
+ then: {
29
+ properties: { readOnly: { const: true } },
30
+ required: ['readOnly'],
31
+ },
32
+ };
33
+
34
+ // foreignKey and x-formula are mutually exclusive
35
+ export const foreignKeyExcludesFormula: Schema = {
36
+ if: {
37
+ properties: { foreignKey: { type: 'string' } },
38
+ required: ['foreignKey'],
39
+ },
40
+ then: {
41
+ not: { required: ['x-formula'] },
42
+ },
43
+ };
44
+
6
45
  export const refMetaSchema: Schema = {
7
46
  type: 'object',
8
47
  properties: {
@@ -60,18 +99,22 @@ export const stringMetaSchema: Schema = {
60
99
  foreignKey: {
61
100
  type: 'string',
62
101
  },
102
+ 'x-formula': xFormulaSchema,
63
103
  },
64
104
  additionalProperties: false,
65
105
  required: ['type', 'default'],
106
+ allOf: [xFormulaRequiresReadOnly, foreignKeyExcludesFormula],
66
107
  };
67
108
 
68
109
  export const noForeignKeyStringMetaSchema: Schema = {
69
110
  type: 'object',
70
111
  properties: {
71
112
  ...baseStringFields,
113
+ 'x-formula': xFormulaSchema,
72
114
  },
73
115
  additionalProperties: false,
74
116
  required: ['type', 'default'],
117
+ ...xFormulaRequiresReadOnly,
75
118
  };
76
119
 
77
120
  export const numberMetaSchema: Schema = {
@@ -87,9 +130,11 @@ export const numberMetaSchema: Schema = {
87
130
  type: 'boolean',
88
131
  },
89
132
  ...sharedFields,
133
+ 'x-formula': xFormulaSchema,
90
134
  },
91
135
  additionalProperties: false,
92
136
  required: ['type', 'default'],
137
+ ...xFormulaRequiresReadOnly,
93
138
  };
94
139
 
95
140
  export const booleanMetaSchema: Schema = {
@@ -105,9 +150,11 @@ export const booleanMetaSchema: Schema = {
105
150
  type: 'boolean',
106
151
  },
107
152
  ...sharedFields,
153
+ 'x-formula': xFormulaSchema,
108
154
  },
109
155
  additionalProperties: false,
110
156
  required: ['type', 'default'],
157
+ ...xFormulaRequiresReadOnly,
111
158
  };
112
159
 
113
160
  export const objectMetaSchema: Schema = {
@@ -68,6 +68,6 @@ export class AuthPromptService {
68
68
  const normalizedUrl = baseUrl.endsWith('/')
69
69
  ? baseUrl.slice(0, -1)
70
70
  : baseUrl;
71
- return `${normalizedUrl}/get-mcp-token`;
71
+ return `${normalizedUrl}/get-token`;
72
72
  }
73
73
  }