@fluid-experimental/property-changeset 1.2.7 → 2.0.0-dev.1.3.0.96595
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/dist/changeset.d.ts +39 -45
- package/dist/changeset.d.ts.map +1 -1
- package/dist/changeset.js +42 -51
- package/dist/changeset.js.map +1 -1
- package/dist/changeset_operations/array.d.ts +34 -3
- package/dist/changeset_operations/array.d.ts.map +1 -1
- package/dist/changeset_operations/array.js +97 -94
- package/dist/changeset_operations/array.js.map +1 -1
- package/dist/changeset_operations/indexedCollection.d.ts +13 -15
- package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
- package/dist/changeset_operations/indexedCollection.js +14 -15
- package/dist/changeset_operations/indexedCollection.js.map +1 -1
- package/dist/helpers/typeidHelper.d.ts +14 -14
- package/dist/helpers/typeidHelper.d.ts.map +1 -1
- package/dist/helpers/typeidHelper.js +24 -34
- package/dist/helpers/typeidHelper.js.map +1 -1
- package/dist/pathHelper.d.ts +5 -5
- package/dist/pathHelper.d.ts.map +1 -1
- package/dist/pathHelper.js +54 -56
- package/dist/pathHelper.js.map +1 -1
- package/dist/templateValidator.d.ts +62 -30
- package/dist/templateValidator.d.ts.map +1 -1
- package/dist/templateValidator.js +128 -94
- package/dist/templateValidator.js.map +1 -1
- package/dist/test/array.spec.js +3 -6
- package/dist/test/array.spec.js.map +1 -1
- package/dist/test/pathHelper.spec.js +2 -4
- package/dist/test/pathHelper.spec.js.map +1 -1
- package/dist/test/reversibleCs.spec.js +2 -4
- package/dist/test/reversibleCs.spec.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/dist/test/validator/templateValidator.spec.js +5 -10
- package/dist/test/validator/templateValidator.spec.js.map +1 -1
- package/dist/utils.d.ts +137 -109
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +167 -174
- package/dist/utils.js.map +1 -1
- package/dist/validationResultBuilder.d.ts +6 -8
- package/dist/validationResultBuilder.d.ts.map +1 -1
- package/dist/validationResultBuilder.js +5 -11
- package/dist/validationResultBuilder.js.map +1 -1
- package/lib/changeset.js +42 -51
- package/lib/changeset.js.map +1 -1
- package/lib/changeset_operations/array.js +97 -94
- package/lib/changeset_operations/array.js.map +1 -1
- package/lib/changeset_operations/indexedCollection.js +14 -15
- package/lib/changeset_operations/indexedCollection.js.map +1 -1
- package/lib/helpers/typeidHelper.js +24 -34
- package/lib/helpers/typeidHelper.js.map +1 -1
- package/lib/pathHelper.js +54 -56
- package/lib/pathHelper.js.map +1 -1
- package/lib/templateValidator.js +128 -94
- package/lib/templateValidator.js.map +1 -1
- package/lib/utils.js +167 -174
- package/lib/utils.js.map +1 -1
- package/lib/validationResultBuilder.js +5 -11
- package/lib/validationResultBuilder.js.map +1 -1
- package/package.json +5 -5
|
@@ -2,15 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* @fileoverview
|
|
7
|
-
* The ValidationResultBuilder maintains validation context that ultimately gets returned as a
|
|
8
|
-
* single result.
|
|
9
|
-
*/
|
|
10
5
|
export class ValidationResultBuilder {
|
|
11
6
|
/**
|
|
12
7
|
* Instantiates a ValidationResultBuilder
|
|
13
|
-
* @param in_typeid A template typeid.
|
|
8
|
+
* @param in_typeid - A template typeid.
|
|
14
9
|
*/
|
|
15
10
|
constructor(in_typeid) {
|
|
16
11
|
this._result = {
|
|
@@ -26,14 +21,14 @@ export class ValidationResultBuilder {
|
|
|
26
21
|
}
|
|
27
22
|
/**
|
|
28
23
|
* Add a validation error.
|
|
29
|
-
* @param {Error} in_error An Error instance.
|
|
24
|
+
* @param {Error} in_error - An Error instance.
|
|
30
25
|
*/
|
|
31
26
|
get result() {
|
|
32
27
|
return this._result;
|
|
33
28
|
}
|
|
34
29
|
/**
|
|
35
30
|
* Add a validation error.
|
|
36
|
-
* @param in_error An Error instance.
|
|
31
|
+
* @param in_error - An Error instance.
|
|
37
32
|
*/
|
|
38
33
|
addError(in_error) {
|
|
39
34
|
this._result.isValid = false;
|
|
@@ -44,15 +39,14 @@ export class ValidationResultBuilder {
|
|
|
44
39
|
}
|
|
45
40
|
/**
|
|
46
41
|
* Add a validation warning.
|
|
47
|
-
* @param in_msg A warning description.
|
|
42
|
+
* @param in_msg - A warning description.
|
|
48
43
|
*/
|
|
49
44
|
addWarning(in_msg) {
|
|
50
45
|
this._result.warnings.push(in_msg);
|
|
51
46
|
}
|
|
52
47
|
/**
|
|
53
48
|
* Fetches the boolean validation result.
|
|
54
|
-
* @
|
|
55
|
-
* this value.
|
|
49
|
+
* @returns True if validation produced no error, false otherwise. Warnings don't affect this value.
|
|
56
50
|
*/
|
|
57
51
|
isValid() {
|
|
58
52
|
return this._result.isValid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validationResultBuilder.js","sourceRoot":"","sources":["../src/validationResultBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"validationResultBuilder.js","sourceRoot":"","sources":["../src/validationResultBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,MAAM,OAAO,uBAAuB;IAGhC;;;OAGG;IACH,YAAY,SAAiB;QACzB,IAAI,CAAC,OAAO,GAAG;YACX,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,aAAa,EAAE,EAAE;YACjB,eAAe,EAAE,EAAE;SACtB,CAAC;QAEF,IAAI,SAAS,EAAE;YACX,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;SACnC;IACL,CAAC;IAED;;;OAGG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,QAAe;QAC3B,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAC7B,8CAA8C;QAC9C,IAAI,QAAQ,CAAC,OAAO,EAAE;YAClB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACtC;IACL,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,MAAc;QAC5B,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,OAAO;QACV,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAChC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview The ValidationResultBuilder maintains validation context that ultimately gets returned as a\n * single result.\n */\n\nexport declare interface SchemaValidationResult {\n isValid: boolean;\n errors: Error[];\n warnings: string[];\n resolvedTypes: string[];\n unresolvedTypes: string[];\n typeid?: string;\n}\n\nexport class ValidationResultBuilder {\n private readonly _result: SchemaValidationResult;\n\n /**\n * Instantiates a ValidationResultBuilder\n * @param in_typeid - A template typeid.\n */\n constructor(in_typeid: string) {\n this._result = {\n isValid: true,\n errors: [],\n warnings: [],\n resolvedTypes: [],\n unresolvedTypes: [],\n };\n\n if (in_typeid) {\n this._result.typeid = in_typeid;\n }\n }\n\n /**\n * Add a validation error.\n * @param {Error} in_error - An Error instance.\n */\n public get result() {\n return this._result;\n }\n\n /**\n * Add a validation error.\n * @param in_error - An Error instance.\n */\n public addError(in_error: Error) {\n this._result.isValid = false;\n // remove empty error messages before logging.\n if (in_error.message) {\n this._result.errors.push(in_error);\n }\n }\n\n /**\n * Add a validation warning.\n * @param in_msg - A warning description.\n */\n public addWarning(in_msg: string) {\n this._result.warnings.push(in_msg);\n }\n\n /**\n * Fetches the boolean validation result.\n * @returns True if validation produced no error, false otherwise. Warnings don't affect this value.\n */\n public isValid(): boolean {\n return this._result.isValid;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/property-changeset",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.0.0-dev.1.3.0.96595",
|
|
4
4
|
"description": "property changeset definitions and related functionalities",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"temp-directory": "nyc/.nyc_output"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@fluid-experimental/property-common": "
|
|
64
|
+
"@fluid-experimental/property-common": "2.0.0-dev.1.3.0.96595",
|
|
65
65
|
"ajv": "7.1.1",
|
|
66
66
|
"ajv-keywords": "4.0.0",
|
|
67
67
|
"async": "^3.2.0",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
"traverse": "0.6.6"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@fluidframework/build-common": "^0.
|
|
75
|
-
"@fluidframework/mocha-test-setup": "
|
|
74
|
+
"@fluidframework/build-common": "^1.0.0",
|
|
75
|
+
"@fluidframework/mocha-test-setup": "2.0.0-dev.1.3.0.96595",
|
|
76
76
|
"@rushstack/eslint-config": "^2.5.1",
|
|
77
77
|
"@types/lodash": "^4.14.118",
|
|
78
78
|
"@types/mocha": "^9.1.1",
|
|
79
79
|
"@types/node": "^14.18.0",
|
|
80
80
|
"chai": "^4.2.0",
|
|
81
81
|
"concurrently": "^6.2.0",
|
|
82
|
-
"copyfiles": "^2.1
|
|
82
|
+
"copyfiles": "^2.4.1",
|
|
83
83
|
"cross-env": "^7.0.2",
|
|
84
84
|
"eslint": "~8.6.0",
|
|
85
85
|
"mocha": "^10.0.0",
|