@xapp/stentor-validation 1.0.0-beta.7 → 1.3.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/CHANGELOG.md ADDED
@@ -0,0 +1,96 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [1.3.0](https://github.com/XappMedia/stentor-core/compare/v1.0.0-beta.17...v1.3.0) (2019-07-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Adds back Alexa Application ID fix ([#1164](https://github.com/XappMedia/stentor-core/issues/1164)) ([f89c8d6](https://github.com/XappMedia/stentor-core/commit/f89c8d6))
12
+ * Array Slot Values ([#1137](https://github.com/XappMedia/stentor-core/issues/1137)) ([350bd7d](https://github.com/XappMedia/stentor-core/commit/350bd7d))
13
+ * Fix for Walmart Stories & Social Radio ([#1168](https://github.com/XappMedia/stentor-core/issues/1168)) ([a8aea07](https://github.com/XappMedia/stentor-core/commit/a8aea07))
14
+ * Removing aws-sdk as dependency for client ([#1154](https://github.com/XappMedia/stentor-core/issues/1154)) ([0f8d938](https://github.com/XappMedia/stentor-core/commit/0f8d938))
15
+ * Request.rawQuery on Dialogflow V2 ([#1134](https://github.com/XappMedia/stentor-core/issues/1134)) ([2a76c72](https://github.com/XappMedia/stentor-core/commit/2a76c72))
16
+ * Splits out AnalyticsService from stentor-service ([#1132](https://github.com/XappMedia/stentor-core/issues/1132)) ([11ef151](https://github.com/XappMedia/stentor-core/commit/11ef151))
17
+ * Staging fixes ([#1166](https://github.com/XappMedia/stentor-core/issues/1166)) ([e3aeebb](https://github.com/XappMedia/stentor-core/commit/e3aeebb))
18
+
19
+
20
+ ### Features
21
+
22
+ * Assistant analytics events ([#1159](https://github.com/XappMedia/stentor-core/issues/1159)) ([ed9a55f](https://github.com/XappMedia/stentor-core/commit/ed9a55f))
23
+ * Pii service to assistant ([#1148](https://github.com/XappMedia/stentor-core/issues/1148)) ([08a22fe](https://github.com/XappMedia/stentor-core/commit/08a22fe))
24
+ * preExecution Hook & Alexa Verify on Alexa Channel ([#1128](https://github.com/XappMedia/stentor-core/issues/1128)) ([d07396c](https://github.com/XappMedia/stentor-core/commit/d07396c))
25
+
26
+
27
+
28
+
29
+
30
+ # [1.2.0](https://github.com/XappMedia/stentor-core/compare/v1.0.0-beta.17...v1.2.0) (2019-07-25)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * Adds back Alexa Application ID fix ([#1164](https://github.com/XappMedia/stentor-core/issues/1164)) ([f89c8d6](https://github.com/XappMedia/stentor-core/commit/f89c8d6))
36
+ * Array Slot Values ([#1137](https://github.com/XappMedia/stentor-core/issues/1137)) ([350bd7d](https://github.com/XappMedia/stentor-core/commit/350bd7d))
37
+ * Fix for Walmart Stories & Social Radio ([#1168](https://github.com/XappMedia/stentor-core/issues/1168)) ([a8aea07](https://github.com/XappMedia/stentor-core/commit/a8aea07))
38
+ * Removing aws-sdk as dependency for client ([#1154](https://github.com/XappMedia/stentor-core/issues/1154)) ([0f8d938](https://github.com/XappMedia/stentor-core/commit/0f8d938))
39
+ * Request.rawQuery on Dialogflow V2 ([#1134](https://github.com/XappMedia/stentor-core/issues/1134)) ([2a76c72](https://github.com/XappMedia/stentor-core/commit/2a76c72))
40
+ * Splits out AnalyticsService from stentor-service ([#1132](https://github.com/XappMedia/stentor-core/issues/1132)) ([11ef151](https://github.com/XappMedia/stentor-core/commit/11ef151))
41
+ * Staging fixes ([#1166](https://github.com/XappMedia/stentor-core/issues/1166)) ([e3aeebb](https://github.com/XappMedia/stentor-core/commit/e3aeebb))
42
+
43
+
44
+ ### Features
45
+
46
+ * Assistant analytics events ([#1159](https://github.com/XappMedia/stentor-core/issues/1159)) ([ed9a55f](https://github.com/XappMedia/stentor-core/commit/ed9a55f))
47
+ * Pii service to assistant ([#1148](https://github.com/XappMedia/stentor-core/issues/1148)) ([08a22fe](https://github.com/XappMedia/stentor-core/commit/08a22fe))
48
+ * preExecution Hook & Alexa Verify on Alexa Channel ([#1128](https://github.com/XappMedia/stentor-core/issues/1128)) ([d07396c](https://github.com/XappMedia/stentor-core/commit/d07396c))
49
+
50
+
51
+
52
+
53
+
54
+ # [1.1.0](https://github.com/XappMedia/stentor-core/compare/v1.0.0-beta.17...v1.1.0) (2019-07-25)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * Adds back Alexa Application ID fix ([#1164](https://github.com/XappMedia/stentor-core/issues/1164)) ([f89c8d6](https://github.com/XappMedia/stentor-core/commit/f89c8d6))
60
+ * Array Slot Values ([#1137](https://github.com/XappMedia/stentor-core/issues/1137)) ([350bd7d](https://github.com/XappMedia/stentor-core/commit/350bd7d))
61
+ * Fix for Walmart Stories & Social Radio ([#1168](https://github.com/XappMedia/stentor-core/issues/1168)) ([a8aea07](https://github.com/XappMedia/stentor-core/commit/a8aea07))
62
+ * Removing aws-sdk as dependency for client ([#1154](https://github.com/XappMedia/stentor-core/issues/1154)) ([0f8d938](https://github.com/XappMedia/stentor-core/commit/0f8d938))
63
+ * Request.rawQuery on Dialogflow V2 ([#1134](https://github.com/XappMedia/stentor-core/issues/1134)) ([2a76c72](https://github.com/XappMedia/stentor-core/commit/2a76c72))
64
+ * Splits out AnalyticsService from stentor-service ([#1132](https://github.com/XappMedia/stentor-core/issues/1132)) ([11ef151](https://github.com/XappMedia/stentor-core/commit/11ef151))
65
+ * Staging fixes ([#1166](https://github.com/XappMedia/stentor-core/issues/1166)) ([e3aeebb](https://github.com/XappMedia/stentor-core/commit/e3aeebb))
66
+
67
+
68
+ ### Features
69
+
70
+ * Assistant analytics events ([#1159](https://github.com/XappMedia/stentor-core/issues/1159)) ([ed9a55f](https://github.com/XappMedia/stentor-core/commit/ed9a55f))
71
+ * Pii service to assistant ([#1148](https://github.com/XappMedia/stentor-core/issues/1148)) ([08a22fe](https://github.com/XappMedia/stentor-core/commit/08a22fe))
72
+ * preExecution Hook & Alexa Verify on Alexa Channel ([#1128](https://github.com/XappMedia/stentor-core/issues/1128)) ([d07396c](https://github.com/XappMedia/stentor-core/commit/d07396c))
73
+
74
+
75
+
76
+
77
+
78
+ # [1.0.0](https://github.com/XappMedia/stentor-core/compare/v1.0.0-beta.17...v1.0.0) (2019-07-25)
79
+
80
+
81
+ ### Bug Fixes
82
+
83
+ * Adds back Alexa Application ID fix ([#1164](https://github.com/XappMedia/stentor-core/issues/1164)) ([f89c8d6](https://github.com/XappMedia/stentor-core/commit/f89c8d6))
84
+ * Array Slot Values ([#1137](https://github.com/XappMedia/stentor-core/issues/1137)) ([350bd7d](https://github.com/XappMedia/stentor-core/commit/350bd7d))
85
+ * Fix for Walmart Stories & Social Radio ([#1168](https://github.com/XappMedia/stentor-core/issues/1168)) ([a8aea07](https://github.com/XappMedia/stentor-core/commit/a8aea07))
86
+ * Removing aws-sdk as dependency for client ([#1154](https://github.com/XappMedia/stentor-core/issues/1154)) ([0f8d938](https://github.com/XappMedia/stentor-core/commit/0f8d938))
87
+ * Request.rawQuery on Dialogflow V2 ([#1134](https://github.com/XappMedia/stentor-core/issues/1134)) ([2a76c72](https://github.com/XappMedia/stentor-core/commit/2a76c72))
88
+ * Splits out AnalyticsService from stentor-service ([#1132](https://github.com/XappMedia/stentor-core/issues/1132)) ([11ef151](https://github.com/XappMedia/stentor-core/commit/11ef151))
89
+ * Staging fixes ([#1166](https://github.com/XappMedia/stentor-core/issues/1166)) ([e3aeebb](https://github.com/XappMedia/stentor-core/commit/e3aeebb))
90
+
91
+
92
+ ### Features
93
+
94
+ * Assistant analytics events ([#1159](https://github.com/XappMedia/stentor-core/issues/1159)) ([ed9a55f](https://github.com/XappMedia/stentor-core/commit/ed9a55f))
95
+ * Pii service to assistant ([#1148](https://github.com/XappMedia/stentor-core/issues/1148)) ([08a22fe](https://github.com/XappMedia/stentor-core/commit/08a22fe))
96
+ * preExecution Hook & Alexa Verify on Alexa Channel ([#1128](https://github.com/XappMedia/stentor-core/issues/1128)) ([d07396c](https://github.com/XappMedia/stentor-core/commit/d07396c))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },
7
- "version": "1.0.0-beta.7",
7
+ "version": "1.3.0",
8
8
  "description": "Model validation for Stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -12,7 +12,7 @@
12
12
  "lib"
13
13
  ],
14
14
  "engines": {
15
- "node": "10.16.0"
15
+ "node": "10.x"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/chai": "4.1.7",
@@ -24,9 +24,9 @@
24
24
  "typescript": "3.3.4000"
25
25
  },
26
26
  "dependencies": {
27
- "@xapp/stentor-handler": "^1.0.0-beta.7",
28
- "@xapp/stentor-models": "^1.0.0-beta.6",
29
- "@xapp/stentor-utils": "^1.0.0-beta.6",
27
+ "@xapp/stentor-handler": "^1.3.0",
28
+ "@xapp/stentor-models": "^1.3.0",
29
+ "@xapp/stentor-utils": "^1.3.0",
30
30
  "lakmus": "0.3.0"
31
31
  },
32
32
  "scripts": {
@@ -34,5 +34,5 @@
34
34
  "clean": "rm -rf ./lib/*",
35
35
  "test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
36
36
  },
37
- "gitHead": "a1c241a5ce1b520f6ccda51a2f95a766451b4c8a"
37
+ "gitHead": "b497ceb888baf9aabff2a88f9828e2c7233bb1f4"
38
38
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,112 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const AppValidator_1 = require("../AppValidator");
5
- const containsIllegalCharacters_1 = require("../AppValidator/containsIllegalCharacters");
6
- const containsReservedGrammarWords_1 = require("../AppValidator/containsReservedGrammarWords");
7
- const props = {
8
- appId: "mix-101",
9
- organizationId: "organizationId",
10
- name: "Mix 101"
11
- };
12
- describe("AppValidator", () => {
13
- let validator;
14
- beforeEach(() => {
15
- validator = new AppValidator_1.AppValidator();
16
- });
17
- describe("#validate()", () => {
18
- describe("with valid base properties", () => {
19
- it("returns isValid", () => {
20
- const result = validator.validate(props);
21
- chai_1.expect(result.isValid).to.be.true;
22
- });
23
- });
24
- describe("with a long app name", () => {
25
- it("returns isValid as false", () => {
26
- const app = Object.assign({}, props);
27
- app.name = "this is a very long app name with more than fifty characters";
28
- const result = validator.validate(app);
29
- chai_1.expect(result.isValid).to.be.false;
30
- chai_1.expect(result.errors).to.have.length(1);
31
- });
32
- });
33
- describe("with valid invocation name", () => {
34
- it("returns isValid as true", () => {
35
- const app = Object.assign({}, props);
36
- app.invocationName = "mix one oh one";
37
- const result = validator.validate(app);
38
- chai_1.expect(result.isValid).to.be.true;
39
- });
40
- });
41
- describe("with an invalid invocation name", () => {
42
- it("returns isValid is false", () => {
43
- const app = Object.assign({}, props);
44
- app.invocationName = "of mice";
45
- const result = validator.validate(app);
46
- chai_1.expect(result.isValid).to.be.false;
47
- chai_1.expect(result.errors).to.have.length(1);
48
- const error = result.errors[0];
49
- chai_1.expect(error.propertyName).to.equal("invocationName");
50
- chai_1.expect(error.errorMessage).to.contain("preposition");
51
- });
52
- it("returns all the errors for a really bad name", () => {
53
- const app = Object.assign({}, props);
54
- app.invocationName = "Alexa, this breaks 4 rules!";
55
- const result = validator.validate(app);
56
- chai_1.expect(result.isValid).to.be.false;
57
- /* tslint:disable */
58
- chai_1.expect(result.errors).to.have.length(4);
59
- /* tslint:enable */
60
- });
61
- });
62
- describe("with valid summary", () => {
63
- it("returns isValid as true", () => {
64
- const app = Object.assign({}, props);
65
- app.summary = "This is the summary";
66
- const result = validator.validate(app);
67
- chai_1.expect(result.isValid).to.be.true;
68
- });
69
- });
70
- describe("with valid description", () => {
71
- it("returns isValid as true", () => {
72
- const app = Object.assign({}, props);
73
- app.summary = "This is the description";
74
- const result = validator.validate(app);
75
- chai_1.expect(result.isValid).to.be.true;
76
- });
77
- });
78
- describe("with valid keywords", () => {
79
- it("returns isValid as true", () => {
80
- const app = Object.assign({}, props);
81
- app.keywords = ["one", "two"];
82
- const result = validator.validate(app);
83
- chai_1.expect(result.isValid).to.be.true;
84
- });
85
- });
86
- });
87
- });
88
- describe("#containsReservedGrammarWords()", () => {
89
- describe("when passed invocation with preposition", () => {
90
- it("returns false", () => {
91
- chai_1.expect(containsReservedGrammarWords_1.containsReservedGrammarWords("of mice")).to.be.true;
92
- });
93
- });
94
- describe("when passed a valid phrase", () => {
95
- it("returns true", () => {
96
- chai_1.expect(containsReservedGrammarWords_1.containsReservedGrammarWords("manly mice")).to.be.false;
97
- });
98
- });
99
- });
100
- describe("#containsIllegalCharacters()", () => {
101
- describe("when passed a string with acceptable characters", () => {
102
- it("returns false", () => {
103
- chai_1.expect(containsIllegalCharacters_1.containsIllegalCharacters("steve's awesome a. b. c.")).to.be.false;
104
- });
105
- });
106
- describe("when passed a string with illegal characters", () => {
107
- it("returns true", () => {
108
- chai_1.expect(containsIllegalCharacters_1.containsIllegalCharacters("very bad!")).to.be.true;
109
- });
110
- });
111
- });
112
- //# sourceMappingURL=AppValidator.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppValidator.test.js","sourceRoot":"","sources":["../../src/__test__/AppValidator.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAG9B,kDAA+C;AAC/C,yFAAsF;AACtF,+FAA4F;AAE5F,MAAM,KAAK,GAAQ;IACf,KAAK,EAAE,SAAS;IAChB,cAAc,EAAE,gBAAgB;IAChC,IAAI,EAAE,SAAS;CAClB,CAAC;AAEF,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC1B,IAAI,SAAuB,CAAC;IAC5B,UAAU,CAAC,GAAG,EAAE;QACZ,SAAS,GAAG,IAAI,2BAAY,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QACzB,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;YACxC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;gBACvB,MAA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D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;YACpB,aAAM,CAAC,2DAA4B,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QACnE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC1C,QAAQ,CAAC,iDAAiD,EAAE,GAAG,EAAE;QAC7D,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;YACrB,aAAM,CAAC,qDAAyB,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC9E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;QAC1D,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;YACpB,aAAM,CAAC,qDAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAC9D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const HandlerValidator_1 = require("../HandlerValidator");
5
- const props = {
6
- appId: "appId",
7
- intentId: "intentId",
8
- organizationId: "organizationId",
9
- type: "HandlerIntent",
10
- content: {}
11
- };
12
- describe("HandlerValidator", () => {
13
- let validator;
14
- beforeEach(() => {
15
- validator = new HandlerValidator_1.HandlerValidator();
16
- });
17
- describe("#validate()", () => {
18
- it("with valid base properties", () => {
19
- chai_1.expect(validator.validate(props).isValid).to.be.true;
20
- });
21
- });
22
- });
23
- //# sourceMappingURL=HandlerValidator.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HandlerValidator.test.js","sourceRoot":"","sources":["../../src/__test__/HandlerValidator.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAG9B,0DAAuD;AAEvD,MAAM,KAAK,GAAY;IACnB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,gBAAgB;IAChC,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,EAAE;CACd,CAAC;AAEF,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC9B,IAAI,SAA2B,CAAC;IAChC,UAAU,CAAC,GAAG,EAAE;QACZ,SAAS,GAAG,IAAI,mCAAgB,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,4BAA4B,EAAE,GAAG,EAAE;YAClC,aAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACzD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const LogicValidator_1 = require("../LogicValidator");
5
- describe("LogicValidator", () => {
6
- let validator;
7
- beforeEach(() => {
8
- validator = new LogicValidator_1.LogicValidator();
9
- });
10
- describe("#validate()", () => {
11
- describe("with good data", () => {
12
- it("returns isValid", () => {
13
- const result = validator.validate({
14
- compiled: 'console.log("hello"); done();'
15
- });
16
- chai_1.expect(result.isValid).to.be.true;
17
- });
18
- });
19
- describe("with empty logic", () => {
20
- it("returns isValid as false", () => {
21
- const result = validator.validate({
22
- compiled: undefined
23
- });
24
- chai_1.expect(result.isValid).to.be.false;
25
- });
26
- });
27
- describe("without done()", () => {
28
- it("returns isValid as false", () => {
29
- const result = validator.validate({
30
- compiled: 'console.log("hello")'
31
- });
32
- chai_1.expect(result.isValid).to.be.false;
33
- });
34
- });
35
- });
36
- });
37
- //# sourceMappingURL=LogicValidator.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LogicValidator.test.js","sourceRoot":"","sources":["../../src/__test__/LogicValidator.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,sDAAmD;AAEnD,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,IAAI,SAAyB,CAAC;IAC9B,UAAU,CAAC,GAAG,EAAE;QACZ,SAAS,GAAG,IAAI,+BAAc,EAAE,CAAC;IACrC,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QACzB,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;YAC5B,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;gBACvB,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC;oBAC9B,QAAQ,EAAE,+BAA+B;iBAC5C,CAAC,CAAC;gBACH,aAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC9B,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;gBAChC,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC;oBAC9B,QAAQ,EAAE,SAAS;iBACtB,CAAC,CAAC;gBACH,aAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;YACvC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;YAC5B,EAAE,CAAC,0B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