@documentdb-js/schema-analyzer 0.8.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.
- package/LICENSE.md +21 -0
- package/README.md +50 -0
- package/dist/BSONTypes.d.ts +50 -0
- package/dist/BSONTypes.d.ts.map +1 -0
- package/dist/BSONTypes.js +196 -0
- package/dist/BSONTypes.js.map +1 -0
- package/dist/JSONSchema.d.ts +75 -0
- package/dist/JSONSchema.d.ts.map +1 -0
- package/dist/JSONSchema.js +7 -0
- package/dist/JSONSchema.js.map +1 -0
- package/dist/SchemaAnalyzer.d.ts +71 -0
- package/dist/SchemaAnalyzer.d.ts.map +1 -0
- package/dist/SchemaAnalyzer.js +511 -0
- package/dist/SchemaAnalyzer.js.map +1 -0
- package/dist/ValueFormatters.d.ts +21 -0
- package/dist/ValueFormatters.d.ts.map +1 -0
- package/dist/ValueFormatters.js +85 -0
- package/dist/ValueFormatters.js.map +1 -0
- package/dist/getKnownFields.d.ts +41 -0
- package/dist/getKnownFields.d.ts.map +1 -0
- package/dist/getKnownFields.js +180 -0
- package/dist/getKnownFields.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/package.json +27 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @documentdb-js/schema-analyzer
|
|
2
|
+
|
|
3
|
+
[DocumentDB](https://documentdb.io/) is an open-source document database built on PostgreSQL, with native BSON support, rich indexing, and vector search. It uses the MongoDB-compatible wire protocol, runs locally with Docker, and is MIT licensed.
|
|
4
|
+
|
|
5
|
+
This package is an incremental JSON Schema analyzer for DocumentDB and MongoDB API documents. Processes documents one at a time (or in batches) and produces an extended JSON Schema with statistical metadata — field occurrence counts, BSON type distributions, min/max values, and array length stats.
|
|
6
|
+
|
|
7
|
+
> **Pre-1.0 notice** — The API may change between minor versions until `1.0.0` is released.
|
|
8
|
+
> If you depend on this package and need stability guarantees sooner, please
|
|
9
|
+
> [open an issue](https://github.com/microsoft/vscode-documentdb/issues) and let us know.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Incremental analysis** — add documents one at a time or in batches; the schema updates in place.
|
|
14
|
+
- **BSON type awareness** — recognizes BSON types defined by the MongoDB API (`ObjectId`, `Decimal128`, `Binary`, `UUID`, etc.) and annotates them with `x-bsonType`.
|
|
15
|
+
- **Statistical extensions** — tracks field occurrence (`x-occurrence`), type frequency (`x-typeOccurrence`), min/max values, string lengths, array sizes, and document counts (`x-documentsInspected`).
|
|
16
|
+
- **Known fields extraction** — derives a flat list of known field paths with their types and occurrence probabilities, useful for autocomplete and UI rendering.
|
|
17
|
+
- **Version tracking & caching** — a monotonic version counter enables efficient cache invalidation for derived data like `getKnownFields()`.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @documentdb-js/schema-analyzer
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Requires `mongodb` ≥ 6.0.0 as a peer dependency.
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { SchemaAnalyzer } from '@documentdb-js/schema-analyzer';
|
|
31
|
+
|
|
32
|
+
// Create an analyzer and feed it documents
|
|
33
|
+
const analyzer = new SchemaAnalyzer();
|
|
34
|
+
analyzer.addDocument(doc1);
|
|
35
|
+
analyzer.addDocuments([doc2, doc3, doc4]);
|
|
36
|
+
|
|
37
|
+
// Get the JSON Schema with statistical extensions
|
|
38
|
+
const schema = analyzer.getSchema();
|
|
39
|
+
|
|
40
|
+
// Get a flat list of known fields (cached, version-aware)
|
|
41
|
+
const fields = analyzer.getKnownFields();
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Origin
|
|
45
|
+
|
|
46
|
+
This package was developed while building features for the [DocumentDB VS Code extension](https://github.com/microsoft/vscode-documentdb), which remains the primary consumer. The analyzer is designed to work with any JSON/BSON documents and can be used independently in other tooling.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
[MIT](LICENSE.md)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the different data types that can be stored in a DocumentDB API / MongoDB API document.
|
|
3
|
+
* The string representation is case-sensitive and should match the MongoDB API documentation.
|
|
4
|
+
* https://www.mongodb.com/docs/manual/reference/bson-types/
|
|
5
|
+
*/
|
|
6
|
+
export declare enum BSONTypes {
|
|
7
|
+
String = "string",
|
|
8
|
+
Number = "number",
|
|
9
|
+
Int32 = "int32",
|
|
10
|
+
Double = "double",
|
|
11
|
+
Decimal128 = "decimal128",
|
|
12
|
+
Long = "long",
|
|
13
|
+
Boolean = "boolean",
|
|
14
|
+
Object = "object",
|
|
15
|
+
Array = "array",
|
|
16
|
+
Null = "null",
|
|
17
|
+
Undefined = "undefined",
|
|
18
|
+
Date = "date",
|
|
19
|
+
RegExp = "regexp",
|
|
20
|
+
Binary = "binary",
|
|
21
|
+
ObjectId = "objectid",
|
|
22
|
+
Symbol = "symbol",
|
|
23
|
+
Timestamp = "timestamp",
|
|
24
|
+
UUID = "uuid",
|
|
25
|
+
UUID_LEGACY = "uuid-legacy",// old UUID subtype, used in some legacy data
|
|
26
|
+
MinKey = "minkey",
|
|
27
|
+
MaxKey = "maxkey",
|
|
28
|
+
DBRef = "dbref",
|
|
29
|
+
Code = "code",
|
|
30
|
+
CodeWithScope = "codewithscope",
|
|
31
|
+
Map = "map",
|
|
32
|
+
_UNKNOWN_ = "_unknown_"
|
|
33
|
+
}
|
|
34
|
+
export declare namespace BSONTypes {
|
|
35
|
+
function toDisplayString(type: BSONTypes): string;
|
|
36
|
+
function toString(type: BSONTypes): string;
|
|
37
|
+
/**
|
|
38
|
+
* Converts a MongoDB API data type to a case-sensitive JSON data type
|
|
39
|
+
* @param type The MongoDB API data type
|
|
40
|
+
* @returns A corresponding JSON data type (please note: it's case sensitive)
|
|
41
|
+
*/
|
|
42
|
+
function toJSONType(type: BSONTypes): string;
|
|
43
|
+
/**
|
|
44
|
+
* Accepts a value from a MongoDB API `Document` object and returns the inferred type.
|
|
45
|
+
* @param value The value of a field in a MongoDB API `Document` object
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
function inferType(value: unknown): BSONTypes;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=BSONTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BSONTypes.d.ts","sourceRoot":"","sources":["../src/BSONTypes.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,oBAAY,SAAS;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,WAAW,gBAAgB,CAAE,6CAA6C;IAC1E,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,GAAG,QAAQ;IAEX,SAAS,cAAc;CAC1B;AAED,yBAAiB,SAAS,CAAC;IA8BvB,SAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEvD;IAED,SAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEhD;IAED;;;;OAIG;IACH,SAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAyClD;IAED;;;;OAIG;IACH,SAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAkDnD;CACJ"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BSONTypes = void 0;
|
|
8
|
+
const mongodb_1 = require("mongodb");
|
|
9
|
+
/**
|
|
10
|
+
* Represents the different data types that can be stored in a DocumentDB API / MongoDB API document.
|
|
11
|
+
* The string representation is case-sensitive and should match the MongoDB API documentation.
|
|
12
|
+
* https://www.mongodb.com/docs/manual/reference/bson-types/
|
|
13
|
+
*/
|
|
14
|
+
var BSONTypes;
|
|
15
|
+
(function (BSONTypes) {
|
|
16
|
+
BSONTypes["String"] = "string";
|
|
17
|
+
BSONTypes["Number"] = "number";
|
|
18
|
+
BSONTypes["Int32"] = "int32";
|
|
19
|
+
BSONTypes["Double"] = "double";
|
|
20
|
+
BSONTypes["Decimal128"] = "decimal128";
|
|
21
|
+
BSONTypes["Long"] = "long";
|
|
22
|
+
BSONTypes["Boolean"] = "boolean";
|
|
23
|
+
BSONTypes["Object"] = "object";
|
|
24
|
+
BSONTypes["Array"] = "array";
|
|
25
|
+
BSONTypes["Null"] = "null";
|
|
26
|
+
BSONTypes["Undefined"] = "undefined";
|
|
27
|
+
BSONTypes["Date"] = "date";
|
|
28
|
+
BSONTypes["RegExp"] = "regexp";
|
|
29
|
+
BSONTypes["Binary"] = "binary";
|
|
30
|
+
BSONTypes["ObjectId"] = "objectid";
|
|
31
|
+
BSONTypes["Symbol"] = "symbol";
|
|
32
|
+
BSONTypes["Timestamp"] = "timestamp";
|
|
33
|
+
BSONTypes["UUID"] = "uuid";
|
|
34
|
+
BSONTypes["UUID_LEGACY"] = "uuid-legacy";
|
|
35
|
+
BSONTypes["MinKey"] = "minkey";
|
|
36
|
+
BSONTypes["MaxKey"] = "maxkey";
|
|
37
|
+
BSONTypes["DBRef"] = "dbref";
|
|
38
|
+
BSONTypes["Code"] = "code";
|
|
39
|
+
BSONTypes["CodeWithScope"] = "codewithscope";
|
|
40
|
+
BSONTypes["Map"] = "map";
|
|
41
|
+
// Add any deprecated types if necessary
|
|
42
|
+
BSONTypes["_UNKNOWN_"] = "_unknown_";
|
|
43
|
+
})(BSONTypes || (exports.BSONTypes = BSONTypes = {}));
|
|
44
|
+
(function (BSONTypes) {
|
|
45
|
+
const displayStringMap = {
|
|
46
|
+
[BSONTypes.String]: 'String',
|
|
47
|
+
[BSONTypes.Number]: 'Number',
|
|
48
|
+
[BSONTypes.Int32]: 'Int32',
|
|
49
|
+
[BSONTypes.Double]: 'Double',
|
|
50
|
+
[BSONTypes.Decimal128]: 'Decimal128',
|
|
51
|
+
[BSONTypes.Long]: 'Long',
|
|
52
|
+
[BSONTypes.Boolean]: 'Boolean',
|
|
53
|
+
[BSONTypes.Object]: 'Object',
|
|
54
|
+
[BSONTypes.Array]: 'Array',
|
|
55
|
+
[BSONTypes.Null]: 'Null',
|
|
56
|
+
[BSONTypes.Undefined]: 'Undefined',
|
|
57
|
+
[BSONTypes.Date]: 'Date',
|
|
58
|
+
[BSONTypes.RegExp]: 'RegExp',
|
|
59
|
+
[BSONTypes.Binary]: 'Binary',
|
|
60
|
+
[BSONTypes.ObjectId]: 'ObjectId',
|
|
61
|
+
[BSONTypes.Symbol]: 'Symbol',
|
|
62
|
+
[BSONTypes.Timestamp]: 'Timestamp',
|
|
63
|
+
[BSONTypes.MinKey]: 'MinKey',
|
|
64
|
+
[BSONTypes.MaxKey]: 'MaxKey',
|
|
65
|
+
[BSONTypes.DBRef]: 'DBRef',
|
|
66
|
+
[BSONTypes.Code]: 'Code',
|
|
67
|
+
[BSONTypes.CodeWithScope]: 'CodeWithScope',
|
|
68
|
+
[BSONTypes.Map]: 'Map',
|
|
69
|
+
[BSONTypes._UNKNOWN_]: 'Unknown',
|
|
70
|
+
[BSONTypes.UUID]: 'UUID',
|
|
71
|
+
[BSONTypes.UUID_LEGACY]: 'UUID (Legacy)',
|
|
72
|
+
};
|
|
73
|
+
function toDisplayString(type) {
|
|
74
|
+
return displayStringMap[type] || 'Unknown';
|
|
75
|
+
}
|
|
76
|
+
BSONTypes.toDisplayString = toDisplayString;
|
|
77
|
+
function toString(type) {
|
|
78
|
+
return type;
|
|
79
|
+
}
|
|
80
|
+
BSONTypes.toString = toString;
|
|
81
|
+
/**
|
|
82
|
+
* Converts a MongoDB API data type to a case-sensitive JSON data type
|
|
83
|
+
* @param type The MongoDB API data type
|
|
84
|
+
* @returns A corresponding JSON data type (please note: it's case sensitive)
|
|
85
|
+
*/
|
|
86
|
+
function toJSONType(type) {
|
|
87
|
+
switch (type) {
|
|
88
|
+
case BSONTypes.String:
|
|
89
|
+
case BSONTypes.Symbol:
|
|
90
|
+
case BSONTypes.Date:
|
|
91
|
+
case BSONTypes.Timestamp:
|
|
92
|
+
case BSONTypes.ObjectId:
|
|
93
|
+
case BSONTypes.RegExp:
|
|
94
|
+
case BSONTypes.Binary:
|
|
95
|
+
case BSONTypes.Code:
|
|
96
|
+
case BSONTypes.UUID:
|
|
97
|
+
case BSONTypes.UUID_LEGACY:
|
|
98
|
+
return 'string';
|
|
99
|
+
case BSONTypes.Boolean:
|
|
100
|
+
return 'boolean';
|
|
101
|
+
case BSONTypes.Int32:
|
|
102
|
+
case BSONTypes.Long:
|
|
103
|
+
case BSONTypes.Double:
|
|
104
|
+
case BSONTypes.Decimal128:
|
|
105
|
+
return 'number';
|
|
106
|
+
case BSONTypes.Object:
|
|
107
|
+
case BSONTypes.Map:
|
|
108
|
+
case BSONTypes.DBRef:
|
|
109
|
+
case BSONTypes.CodeWithScope:
|
|
110
|
+
return 'object';
|
|
111
|
+
case BSONTypes.Array:
|
|
112
|
+
return 'array';
|
|
113
|
+
case BSONTypes.Null:
|
|
114
|
+
case BSONTypes.Undefined:
|
|
115
|
+
case BSONTypes.MinKey:
|
|
116
|
+
case BSONTypes.MaxKey:
|
|
117
|
+
return 'null';
|
|
118
|
+
default:
|
|
119
|
+
return 'string'; // Default to string for unknown types
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
BSONTypes.toJSONType = toJSONType;
|
|
123
|
+
/**
|
|
124
|
+
* Accepts a value from a MongoDB API `Document` object and returns the inferred type.
|
|
125
|
+
* @param value The value of a field in a MongoDB API `Document` object
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
128
|
+
function inferType(value) {
|
|
129
|
+
if (value === null)
|
|
130
|
+
return BSONTypes.Null;
|
|
131
|
+
if (value === undefined)
|
|
132
|
+
return BSONTypes.Undefined;
|
|
133
|
+
switch (typeof value) {
|
|
134
|
+
case 'string':
|
|
135
|
+
return BSONTypes.String;
|
|
136
|
+
case 'number':
|
|
137
|
+
return BSONTypes.Double; // JavaScript numbers are doubles
|
|
138
|
+
case 'boolean':
|
|
139
|
+
return BSONTypes.Boolean;
|
|
140
|
+
case 'object':
|
|
141
|
+
if (Array.isArray(value)) {
|
|
142
|
+
return BSONTypes.Array;
|
|
143
|
+
}
|
|
144
|
+
// Check for common BSON types first
|
|
145
|
+
if (value instanceof mongodb_1.ObjectId)
|
|
146
|
+
return BSONTypes.ObjectId;
|
|
147
|
+
if (value instanceof mongodb_1.Int32)
|
|
148
|
+
return BSONTypes.Int32;
|
|
149
|
+
if (value instanceof mongodb_1.Double)
|
|
150
|
+
return BSONTypes.Double;
|
|
151
|
+
if (value instanceof Date)
|
|
152
|
+
return BSONTypes.Date;
|
|
153
|
+
if (value instanceof mongodb_1.Timestamp)
|
|
154
|
+
return BSONTypes.Timestamp;
|
|
155
|
+
// Less common types
|
|
156
|
+
if (value instanceof mongodb_1.Decimal128)
|
|
157
|
+
return BSONTypes.Decimal128;
|
|
158
|
+
if (value instanceof mongodb_1.Long)
|
|
159
|
+
return BSONTypes.Long;
|
|
160
|
+
if (value instanceof mongodb_1.MinKey)
|
|
161
|
+
return BSONTypes.MinKey;
|
|
162
|
+
if (value instanceof mongodb_1.MaxKey)
|
|
163
|
+
return BSONTypes.MaxKey;
|
|
164
|
+
if (value instanceof mongodb_1.BSONSymbol)
|
|
165
|
+
return BSONTypes.Symbol;
|
|
166
|
+
if (value instanceof mongodb_1.DBRef)
|
|
167
|
+
return BSONTypes.DBRef;
|
|
168
|
+
if (value instanceof Map)
|
|
169
|
+
return BSONTypes.Map;
|
|
170
|
+
if (value instanceof mongodb_1.UUID && value.sub_type === mongodb_1.Binary.SUBTYPE_UUID)
|
|
171
|
+
return BSONTypes.UUID;
|
|
172
|
+
if (value instanceof mongodb_1.UUID && value.sub_type === mongodb_1.Binary.SUBTYPE_UUID_OLD)
|
|
173
|
+
return BSONTypes.UUID_LEGACY;
|
|
174
|
+
if (value instanceof Buffer || value instanceof mongodb_1.Binary)
|
|
175
|
+
return BSONTypes.Binary;
|
|
176
|
+
if (value instanceof RegExp)
|
|
177
|
+
return BSONTypes.RegExp;
|
|
178
|
+
if (value instanceof mongodb_1.Code) {
|
|
179
|
+
if (value.scope) {
|
|
180
|
+
return BSONTypes.CodeWithScope;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
return BSONTypes.Code;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// Default to Object if none of the above match
|
|
187
|
+
return BSONTypes.Object;
|
|
188
|
+
default:
|
|
189
|
+
// This should never happen, but if it does, we'll catch it here
|
|
190
|
+
// TODO: add telemetry somewhere to know when it happens (not here, this could get hit too often)
|
|
191
|
+
return BSONTypes._UNKNOWN_;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
BSONTypes.inferType = inferType;
|
|
195
|
+
})(BSONTypes || (exports.BSONTypes = BSONTypes = {}));
|
|
196
|
+
//# sourceMappingURL=BSONTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BSONTypes.js","sourceRoot":"","sources":["../src/BSONTypes.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,qCAciB;AAEjB;;;;GAIG;AACH,IAAY,SA4BX;AA5BD,WAAY,SAAS;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,sCAAyB,CAAA;IACzB,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,8BAAiB,CAAA;IACjB,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,oCAAuB,CAAA;IACvB,0BA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xB,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;wBACd,OAAO,SAAS,CAAC,aAAa,CAAC;oBACnC,CAAC;yBAAM,CAAC;wBACJ,OAAO,SAAS,CAAC,IAAI,CAAC;oBAC1B,CAAC;gBACL,CAAC;gBAED,+CAA+C;gBAC/C,OAAO,SAAS,CAAC,MAAM,CAAC;YAC5B;gBACI,gEAAgE;gBAChE,iGAAiG;gBACjG,OAAO,SAAS,CAAC,SAAS,CAAC;QACnC,CAAC;IACL,CAAC;IAlDe,mBAAS,YAkDxB,CAAA;AACL,CAAC,EA9IgB,SAAS,yBAAT,SAAS,QA8IzB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* We're not using the full JSON schema spec, so we're defining a subset of it here.
|
|
3
|
+
* There is @types/json-schema available, but their support ends at JSON Schema draft-07,
|
|
4
|
+
* there is another one with vscode-json-languageservice, but then it'd be harder to
|
|
5
|
+
* extract our code to a separate and independend package in the future.
|
|
6
|
+
*
|
|
7
|
+
* Rather than working with an older version of the spec, we're defining a subset of the
|
|
8
|
+
* spec that we need to work with here.
|
|
9
|
+
*
|
|
10
|
+
* The purpose of this JSON schema is to:
|
|
11
|
+
* 1. Provide input to Monaco
|
|
12
|
+
* 2. Extract statistical information from the user data
|
|
13
|
+
* 3. Discover data for different levels of the structure-tree used in the table view
|
|
14
|
+
*/
|
|
15
|
+
export type JSONSchemaRef = JSONSchema | boolean;
|
|
16
|
+
export interface JSONSchema {
|
|
17
|
+
id?: string;
|
|
18
|
+
$id?: string;
|
|
19
|
+
$schema?: string;
|
|
20
|
+
type?: string | string[];
|
|
21
|
+
title?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
definitions?: {
|
|
24
|
+
[name: string]: JSONSchema;
|
|
25
|
+
};
|
|
26
|
+
properties?: JSONSchemaMap;
|
|
27
|
+
patternProperties?: JSONSchemaMap;
|
|
28
|
+
additionalProperties?: JSONSchemaRef;
|
|
29
|
+
minProperties?: number;
|
|
30
|
+
maxProperties?: number;
|
|
31
|
+
dependencies?: JSONSchemaMap | {
|
|
32
|
+
[prop: string]: string[];
|
|
33
|
+
};
|
|
34
|
+
items?: JSONSchemaRef | JSONSchemaRef[];
|
|
35
|
+
required?: string[];
|
|
36
|
+
$ref?: string;
|
|
37
|
+
anyOf?: JSONSchemaRef[];
|
|
38
|
+
allOf?: JSONSchemaRef[];
|
|
39
|
+
oneOf?: JSONSchemaRef[];
|
|
40
|
+
not?: JSONSchemaRef;
|
|
41
|
+
enum?: undefined[];
|
|
42
|
+
format?: string;
|
|
43
|
+
const?: undefined;
|
|
44
|
+
contains?: JSONSchemaRef;
|
|
45
|
+
propertyNames?: JSONSchemaRef;
|
|
46
|
+
examples?: undefined[];
|
|
47
|
+
$comment?: string;
|
|
48
|
+
$defs?: {
|
|
49
|
+
[name: string]: JSONSchema;
|
|
50
|
+
};
|
|
51
|
+
markdownEnumDescriptions?: string[];
|
|
52
|
+
markdownDescription?: string;
|
|
53
|
+
doNotSuggest?: boolean;
|
|
54
|
+
suggestSortText?: string;
|
|
55
|
+
'x-documentsInspected'?: number;
|
|
56
|
+
'x-occurrence'?: number;
|
|
57
|
+
'x-bsonType'?: string;
|
|
58
|
+
'x-typeOccurrence'?: number;
|
|
59
|
+
'x-minValue'?: number;
|
|
60
|
+
'x-maxValue'?: number;
|
|
61
|
+
'x-minLength'?: number;
|
|
62
|
+
'x-maxLength'?: number;
|
|
63
|
+
'x-minDate'?: number;
|
|
64
|
+
'x-maxDate'?: number;
|
|
65
|
+
'x-trueCount'?: number;
|
|
66
|
+
'x-falseCount'?: number;
|
|
67
|
+
'x-minItems'?: number;
|
|
68
|
+
'x-maxItems'?: number;
|
|
69
|
+
'x-minProperties'?: number;
|
|
70
|
+
'x-maxProperties'?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface JSONSchemaMap {
|
|
73
|
+
[name: string]: JSONSchemaRef;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=JSONSchema.d.ts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,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE;QACJ,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;KAC9B,CAAC;IAGF,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AACD,MAAM,WAAW,aAAa;IAC1B,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC;CACjC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
//# sourceMappingURL=JSONSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JSONSchema.js","sourceRoot":"","sources":["../src/JSONSchema.ts"],"names":[],"mappings":";AAAA;;;gGAGgG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type Document, type WithId } from 'mongodb';
|
|
2
|
+
import { type JSONSchema } from './JSONSchema';
|
|
3
|
+
import { type FieldEntry } from './getKnownFields';
|
|
4
|
+
/**
|
|
5
|
+
* Incremental schema analyzer for documents from the MongoDB API / DocumentDB API.
|
|
6
|
+
*
|
|
7
|
+
* Analyzes documents one at a time (or in batches) and builds a cumulative
|
|
8
|
+
* JSON Schema with statistical extensions (x-occurrence, x-bsonType, etc.).
|
|
9
|
+
*
|
|
10
|
+
* The output schema follows JSON Schema draft-07 with custom x- extensions.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SchemaAnalyzer {
|
|
13
|
+
private _schema;
|
|
14
|
+
private _version;
|
|
15
|
+
private _knownFieldsCache;
|
|
16
|
+
private _knownFieldsCacheVersion;
|
|
17
|
+
/**
|
|
18
|
+
* A monotonically increasing version counter. Incremented on every mutation
|
|
19
|
+
* (addDocument, addDocuments, reset). Adapters can store this value alongside
|
|
20
|
+
* their cached derived data and recompute only when it changes.
|
|
21
|
+
*/
|
|
22
|
+
get version(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Adds a single document to the accumulated schema.
|
|
25
|
+
* This is the primary incremental API — call once per document.
|
|
26
|
+
*/
|
|
27
|
+
addDocument(document: WithId<Document>): void;
|
|
28
|
+
/**
|
|
29
|
+
* Adds multiple documents to the accumulated schema.
|
|
30
|
+
* Convenience method equivalent to calling addDocument() for each.
|
|
31
|
+
* Increments version once for the entire batch — not per document.
|
|
32
|
+
*/
|
|
33
|
+
addDocuments(documents: ReadonlyArray<WithId<Document>>): void;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the current accumulated JSON Schema.
|
|
36
|
+
* The returned object is a live reference (not a copy) — do not mutate externally.
|
|
37
|
+
*/
|
|
38
|
+
getSchema(): JSONSchema;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the number of documents analyzed so far.
|
|
41
|
+
*/
|
|
42
|
+
getDocumentCount(): number;
|
|
43
|
+
/**
|
|
44
|
+
* Resets the analyzer to its initial empty state.
|
|
45
|
+
*/
|
|
46
|
+
reset(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Creates a deep copy of this analyzer, including all accumulated schema data.
|
|
49
|
+
* Useful for aggregation stage branching where each stage needs its own schema state.
|
|
50
|
+
* The clone starts with version 0, independent from the original.
|
|
51
|
+
*/
|
|
52
|
+
clone(): SchemaAnalyzer;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the cached list of known fields (all nesting levels, sorted).
|
|
55
|
+
* Recomputed only when the schema version has changed since the last call.
|
|
56
|
+
*/
|
|
57
|
+
getKnownFields(): FieldEntry[];
|
|
58
|
+
/**
|
|
59
|
+
* Creates a SchemaAnalyzer from a single document.
|
|
60
|
+
* Equivalent to creating an instance and calling addDocument() once.
|
|
61
|
+
*/
|
|
62
|
+
static fromDocument(document: WithId<Document>): SchemaAnalyzer;
|
|
63
|
+
/**
|
|
64
|
+
* Creates a SchemaAnalyzer from multiple documents.
|
|
65
|
+
* Equivalent to creating an instance and calling addDocuments().
|
|
66
|
+
*/
|
|
67
|
+
static fromDocuments(documents: ReadonlyArray<WithId<Document>>): SchemaAnalyzer;
|
|
68
|
+
}
|
|
69
|
+
export declare function getPropertyNamesAtLevel(jsonSchema: JSONSchema, path: string[]): string[];
|
|
70
|
+
export declare function buildFullPaths(path: string[], propertyNames: string[]): string[];
|
|
71
|
+
//# sourceMappingURL=SchemaAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaAnalyzer.d.ts","sourceRoot":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