spec-box-tms-sync 0.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/README.md +284 -0
- package/bin/spec-box +8 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/models/index.d.ts +187 -0
- package/dist/api/models/index.d.ts.map +1 -0
- package/dist/api/models/index.js +3 -0
- package/dist/api/models/index.js.map +1 -0
- package/dist/api/models/mappers.d.ts +24 -0
- package/dist/api/models/mappers.d.ts.map +1 -0
- package/dist/api/models/mappers.js +850 -0
- package/dist/api/models/mappers.js.map +1 -0
- package/dist/api/models/parameters.d.ts +14 -0
- package/dist/api/models/parameters.d.ts.map +1 -0
- package/dist/api/models/parameters.js +112 -0
- package/dist/api/models/parameters.js.map +1 -0
- package/dist/api/specBoxWebApi.d.ts +47 -0
- package/dist/api/specBoxWebApi.d.ts.map +1 -0
- package/dist/api/specBoxWebApi.js +242 -0
- package/dist/api/specBoxWebApi.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +24 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/sync.d.ts +4 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +39 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/upload-stat.d.ts +4 -0
- package/dist/commands/upload-stat.d.ts.map +1 -0
- package/dist/commands/upload-stat.js +21 -0
- package/dist/commands/upload-stat.js.map +1 -0
- package/dist/commands/validate-only.d.ts +4 -0
- package/dist/commands/validate-only.d.ts.map +1 -0
- package/dist/commands/validate-only.js +30 -0
- package/dist/commands/validate-only.js.map +1 -0
- package/dist/lib/config/index.d.ts +11 -0
- package/dist/lib/config/index.d.ts.map +1 -0
- package/dist/lib/config/index.js +34 -0
- package/dist/lib/config/index.js.map +1 -0
- package/dist/lib/config/models.d.ts +77 -0
- package/dist/lib/config/models.d.ts.map +1 -0
- package/dist/lib/config/models.js +57 -0
- package/dist/lib/config/models.js.map +1 -0
- package/dist/lib/domain/index.d.ts +11 -0
- package/dist/lib/domain/index.d.ts.map +1 -0
- package/dist/lib/domain/index.js +47 -0
- package/dist/lib/domain/index.js.map +1 -0
- package/dist/lib/domain/keys.d.ts +17 -0
- package/dist/lib/domain/keys.d.ts.map +1 -0
- package/dist/lib/domain/keys.js +63 -0
- package/dist/lib/domain/keys.js.map +1 -0
- package/dist/lib/domain/models.d.ts +45 -0
- package/dist/lib/domain/models.d.ts.map +1 -0
- package/dist/lib/domain/models.js +3 -0
- package/dist/lib/domain/models.js.map +1 -0
- package/dist/lib/jest/index.d.ts +24 -0
- package/dist/lib/jest/index.d.ts.map +1 -0
- package/dist/lib/jest/index.js +57 -0
- package/dist/lib/jest/index.js.map +1 -0
- package/dist/lib/jest/models.d.ts +42 -0
- package/dist/lib/jest/models.d.ts.map +1 -0
- package/dist/lib/jest/models.js +27 -0
- package/dist/lib/jest/models.js.map +1 -0
- package/dist/lib/upload/upload-entities.d.ts +4 -0
- package/dist/lib/upload/upload-entities.d.ts.map +1 -0
- package/dist/lib/upload/upload-entities.js +52 -0
- package/dist/lib/upload/upload-entities.js.map +1 -0
- package/dist/lib/upload/upload-jest-stat.d.ts +4 -0
- package/dist/lib/upload/upload-jest-stat.d.ts.map +1 -0
- package/dist/lib/upload/upload-jest-stat.js +21 -0
- package/dist/lib/upload/upload-jest-stat.js.map +1 -0
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +50 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validators/index.d.ts +4 -0
- package/dist/lib/validators/index.d.ts.map +1 -0
- package/dist/lib/validators/index.js +8 -0
- package/dist/lib/validators/index.js.map +1 -0
- package/dist/lib/validators/models.d.ts +92 -0
- package/dist/lib/validators/models.d.ts.map +1 -0
- package/dist/lib/validators/models.js +20 -0
- package/dist/lib/validators/models.js.map +1 -0
- package/dist/lib/validators/renderer.d.ts +4 -0
- package/dist/lib/validators/renderer.d.ts.map +1 -0
- package/dist/lib/validators/renderer.js +83 -0
- package/dist/lib/validators/renderer.js.map +1 -0
- package/dist/lib/validators/validator.d.ts +25 -0
- package/dist/lib/validators/validator.d.ts.map +1 -0
- package/dist/lib/validators/validator.js +288 -0
- package/dist/lib/validators/validator.js.map +1 -0
- package/dist/lib/yaml/index.d.ts +10 -0
- package/dist/lib/yaml/index.d.ts.map +1 -0
- package/dist/lib/yaml/index.js +29 -0
- package/dist/lib/yaml/index.js.map +1 -0
- package/dist/lib/yaml/models.d.ts +21 -0
- package/dist/lib/yaml/models.d.ts.map +1 -0
- package/dist/lib/yaml/models.js +19 -0
- package/dist/lib/yaml/models.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLoaderError = exports.Validator = void 0;
|
|
4
|
+
const models_1 = require("./models");
|
|
5
|
+
const renderer_1 = require("./renderer");
|
|
6
|
+
const CODE_REGEX = /^[A-Za-z][A-Za-z0-9-_]*$/;
|
|
7
|
+
// named group <link> is used to capture and validate link key
|
|
8
|
+
const LINK_LIKE = /\$(?<link>[A-Za-z][A-Za-z0-9-_]*)/g;
|
|
9
|
+
class Validator {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.loaderErrors = new Array();
|
|
12
|
+
this.metaErrors = new Array();
|
|
13
|
+
this.featureErrors = new Array();
|
|
14
|
+
this.jestUnusedTests = new Array();
|
|
15
|
+
this.metaFilePath = '';
|
|
16
|
+
}
|
|
17
|
+
get hasCriticalErrors() {
|
|
18
|
+
return [
|
|
19
|
+
...this.loaderErrors,
|
|
20
|
+
...this.metaErrors,
|
|
21
|
+
...this.featureErrors,
|
|
22
|
+
...this.jestUnusedTests,
|
|
23
|
+
].some((e) => models_1.ERROR_SEVERITY[e.type] === 'error');
|
|
24
|
+
}
|
|
25
|
+
printReport() {
|
|
26
|
+
this.jestUnusedTests.forEach(renderer_1.printError);
|
|
27
|
+
this.featureErrors.forEach(renderer_1.printError);
|
|
28
|
+
this.metaErrors.forEach(renderer_1.printError);
|
|
29
|
+
this.loaderErrors.forEach(renderer_1.printError);
|
|
30
|
+
(0, renderer_1.renderStats)('Всего', [
|
|
31
|
+
...this.loaderErrors,
|
|
32
|
+
...this.metaErrors,
|
|
33
|
+
...this.featureErrors,
|
|
34
|
+
...this.jestUnusedTests,
|
|
35
|
+
]);
|
|
36
|
+
}
|
|
37
|
+
registerLoaderError(error, filePath, fileType) {
|
|
38
|
+
this.loaderErrors.push((0, exports.getLoaderError)(error, filePath, fileType));
|
|
39
|
+
}
|
|
40
|
+
registerJestUnusedTests(test, filePath) {
|
|
41
|
+
this.jestUnusedTests.push({
|
|
42
|
+
type: 'jest-unused',
|
|
43
|
+
test,
|
|
44
|
+
filePath,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
validate({ trees, attributes, metaFilePath, features }) {
|
|
48
|
+
const metaAttributeValues = new Map();
|
|
49
|
+
this.metaFilePath = metaFilePath;
|
|
50
|
+
this.validateMetaAttributes(attributes, metaAttributeValues);
|
|
51
|
+
this.validateMetaTrees(trees, metaAttributeValues);
|
|
52
|
+
this.validateFeatures(features, metaAttributeValues);
|
|
53
|
+
}
|
|
54
|
+
validateMetaAttributes(attributes, attributeValuesMap) {
|
|
55
|
+
const filePath = this.metaFilePath;
|
|
56
|
+
if (attributes) {
|
|
57
|
+
for (const attribute of attributes) {
|
|
58
|
+
const codeValidation = this.validateCode(attribute.code, filePath);
|
|
59
|
+
if (codeValidation) {
|
|
60
|
+
this.metaErrors.push(codeValidation);
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (attributeValuesMap.has(attribute.code)) {
|
|
64
|
+
const error = {
|
|
65
|
+
type: 'attribute-duplicate',
|
|
66
|
+
attribute,
|
|
67
|
+
filePath,
|
|
68
|
+
};
|
|
69
|
+
this.metaErrors.push(error);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const attributeValuesUnique = new Set();
|
|
73
|
+
attributeValuesMap.set(attribute.code, attributeValuesUnique);
|
|
74
|
+
this.metaErrors.push(...this.validateMetaAttributeValues(attribute, attributeValuesUnique, filePath));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
validateMetaAttributeValues(attribute, attributeValuesUnique, filePath) {
|
|
79
|
+
const result = new Array();
|
|
80
|
+
for (const attributeValue of attribute.values) {
|
|
81
|
+
const valueValidation = this.validateCode(attributeValue.code, filePath);
|
|
82
|
+
if (valueValidation) {
|
|
83
|
+
result.push(valueValidation);
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (attributeValuesUnique.has(attributeValue.code)) {
|
|
87
|
+
const error = {
|
|
88
|
+
type: 'attribute-value-duplicate',
|
|
89
|
+
attribute,
|
|
90
|
+
attributeValue,
|
|
91
|
+
filePath,
|
|
92
|
+
};
|
|
93
|
+
result.push(error);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
attributeValuesUnique.add(attributeValue.code);
|
|
97
|
+
}
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
validateMetaTrees(trees, attributeValuesMap) {
|
|
101
|
+
const filePath = this.metaFilePath;
|
|
102
|
+
if (trees) {
|
|
103
|
+
const treeUnique = new Set();
|
|
104
|
+
for (const tree of trees) {
|
|
105
|
+
const codeValidation = this.validateCode(tree.code, filePath);
|
|
106
|
+
if (codeValidation) {
|
|
107
|
+
this.metaErrors.push(codeValidation);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (treeUnique.has(tree.code)) {
|
|
111
|
+
const error = {
|
|
112
|
+
type: 'tree-duplicate',
|
|
113
|
+
tree,
|
|
114
|
+
filePath,
|
|
115
|
+
};
|
|
116
|
+
this.metaErrors.push(error);
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
treeUnique.add(tree.code);
|
|
120
|
+
const treeAttributesUnique = new Set();
|
|
121
|
+
for (const attribute of tree.attributes) {
|
|
122
|
+
if (!attributeValuesMap.has(attribute)) {
|
|
123
|
+
const missingAttribute = {
|
|
124
|
+
type: 'tree-missing-attribute',
|
|
125
|
+
attributeCode: attribute,
|
|
126
|
+
tree,
|
|
127
|
+
filePath,
|
|
128
|
+
};
|
|
129
|
+
this.metaErrors.push(missingAttribute);
|
|
130
|
+
}
|
|
131
|
+
if (treeAttributesUnique.has(attribute)) {
|
|
132
|
+
const attributeDuplicate = {
|
|
133
|
+
type: 'tree-attribute-duplicate',
|
|
134
|
+
attributeCode: attribute,
|
|
135
|
+
tree,
|
|
136
|
+
filePath,
|
|
137
|
+
};
|
|
138
|
+
this.metaErrors.push(attributeDuplicate);
|
|
139
|
+
}
|
|
140
|
+
treeAttributesUnique.add(attribute);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
validateFeatures(features, metaAttributeValues) {
|
|
146
|
+
const featuresMap = new Map();
|
|
147
|
+
for (const feature of features) {
|
|
148
|
+
const existingFeature = featuresMap.get(feature.code);
|
|
149
|
+
if (existingFeature) {
|
|
150
|
+
const featureCodeDuplicateError = {
|
|
151
|
+
type: 'feature-code-duplicate',
|
|
152
|
+
filePath: feature.filePath,
|
|
153
|
+
code: feature.code,
|
|
154
|
+
feature,
|
|
155
|
+
firstFeature: existingFeature,
|
|
156
|
+
};
|
|
157
|
+
this.featureErrors.push(featureCodeDuplicateError);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
featuresMap.set(feature.code, feature);
|
|
161
|
+
}
|
|
162
|
+
this.featureErrors.push(...this.validateFeature(feature, metaAttributeValues));
|
|
163
|
+
}
|
|
164
|
+
this.validateFeatureLinks(features, featuresMap);
|
|
165
|
+
}
|
|
166
|
+
validateFeature(feature, metaAttributeValues) {
|
|
167
|
+
const errors = new Array();
|
|
168
|
+
if (feature.code) {
|
|
169
|
+
if (!CODE_REGEX.test(feature.code)) {
|
|
170
|
+
const featureCodeError = {
|
|
171
|
+
type: 'featrue-code-format',
|
|
172
|
+
filePath: feature.filePath,
|
|
173
|
+
code: feature.code,
|
|
174
|
+
feature,
|
|
175
|
+
};
|
|
176
|
+
errors.push(featureCodeError);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (feature.attributes) {
|
|
180
|
+
for (const attribute in feature.attributes) {
|
|
181
|
+
let valuesSet = metaAttributeValues.get(attribute);
|
|
182
|
+
if (!valuesSet) {
|
|
183
|
+
const missingAttribute = {
|
|
184
|
+
type: 'feature-missing-attribute',
|
|
185
|
+
filePath: feature.filePath,
|
|
186
|
+
attributeCode: attribute,
|
|
187
|
+
feature,
|
|
188
|
+
};
|
|
189
|
+
errors.push(missingAttribute);
|
|
190
|
+
}
|
|
191
|
+
for (const attributeValue of feature.attributes[attribute]) {
|
|
192
|
+
if (!CODE_REGEX.test(attributeValue)) {
|
|
193
|
+
const attributeCodeError = {
|
|
194
|
+
type: 'featrue-attribute-value-code-format',
|
|
195
|
+
filePath: feature.filePath,
|
|
196
|
+
attribute,
|
|
197
|
+
feature,
|
|
198
|
+
code: attributeValue,
|
|
199
|
+
};
|
|
200
|
+
errors.push(attributeCodeError);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
errors.push(...this.validateAsserions(feature));
|
|
206
|
+
return errors;
|
|
207
|
+
}
|
|
208
|
+
validateAsserions(feature) {
|
|
209
|
+
const errors = new Array();
|
|
210
|
+
for (const assertionGroup of feature.groups) {
|
|
211
|
+
const assertionsUnique = new Set();
|
|
212
|
+
for (const assertion of assertionGroup.assertions) {
|
|
213
|
+
if (assertionsUnique.has(assertion.title)) {
|
|
214
|
+
const assertionDuplicateError = {
|
|
215
|
+
type: 'assertion-duplicate',
|
|
216
|
+
filePath: feature.filePath,
|
|
217
|
+
feature,
|
|
218
|
+
assertionGroup,
|
|
219
|
+
assertion,
|
|
220
|
+
};
|
|
221
|
+
errors.push(assertionDuplicateError);
|
|
222
|
+
}
|
|
223
|
+
assertionsUnique.add(assertion.title);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return errors;
|
|
227
|
+
}
|
|
228
|
+
validateFeatureLinks(features, featuresMap) {
|
|
229
|
+
for (const feature of features) {
|
|
230
|
+
this.featureErrors.push(...this.validateLinks(feature.title, 'title', feature, featuresMap));
|
|
231
|
+
if (feature.description) {
|
|
232
|
+
this.featureErrors.push(...this.validateLinks(feature.description, 'description', feature, featuresMap));
|
|
233
|
+
}
|
|
234
|
+
for (const group of feature.groups) {
|
|
235
|
+
this.featureErrors.push(...this.validateLinks(group.title, 'group.title', feature, featuresMap));
|
|
236
|
+
for (const assertion of group.assertions) {
|
|
237
|
+
this.featureErrors.push(...this.validateLinks(assertion.title, 'assert.title', feature, featuresMap));
|
|
238
|
+
if (assertion.description) {
|
|
239
|
+
this.featureErrors.push(...this.validateLinks(assertion.description, 'assert.description', feature, featuresMap));
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
validateLinks(value, field, feature, featuresMap) {
|
|
246
|
+
const re = new RegExp(LINK_LIKE);
|
|
247
|
+
const errors = new Array();
|
|
248
|
+
let match;
|
|
249
|
+
while ((match = re.exec(value)) !== null) {
|
|
250
|
+
const link = match.groups.link;
|
|
251
|
+
if (!featuresMap.has(link)) {
|
|
252
|
+
const linkError = {
|
|
253
|
+
type: 'feature-missing-link',
|
|
254
|
+
filePath: feature.filePath,
|
|
255
|
+
feature,
|
|
256
|
+
field,
|
|
257
|
+
link,
|
|
258
|
+
};
|
|
259
|
+
errors.push(linkError);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return errors;
|
|
263
|
+
}
|
|
264
|
+
validateCode(value, filePath) {
|
|
265
|
+
if (!CODE_REGEX.test(value)) {
|
|
266
|
+
return { type: 'code-format-error', code: value, filePath };
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
exports.Validator = Validator;
|
|
271
|
+
const getLoaderError = (error, filePath, fileType) => {
|
|
272
|
+
let description = 'Unknown error';
|
|
273
|
+
if (typeof error === 'string') {
|
|
274
|
+
description = error;
|
|
275
|
+
}
|
|
276
|
+
else if (error instanceof Error) {
|
|
277
|
+
description = error.message;
|
|
278
|
+
}
|
|
279
|
+
const loaderError = {
|
|
280
|
+
type: 'loader-error',
|
|
281
|
+
description,
|
|
282
|
+
filePath,
|
|
283
|
+
fileType,
|
|
284
|
+
};
|
|
285
|
+
return loaderError;
|
|
286
|
+
};
|
|
287
|
+
exports.getLoaderError = getLoaderError;
|
|
288
|
+
//# sourceMappingURL=validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../../src/lib/validators/validator.ts"],"names":[],"mappings":";;;AAGA,qCAiBkB;AAClB,yCAAqD;AAErD,MAAM,UAAU,GAAG,0BAA0B,CAAC;AAC9C,8DAA8D;AAC9D,MAAM,SAAS,GAAG,oCAAoC,CAAC;AAEvD,MAAa,SAAS;IAAtB;QACmB,iBAAY,GAAG,IAAI,KAAK,EAAmB,CAAC;QAC5C,eAAU,GAAG,IAAI,KAAK,EAAmB,CAAC;QAC1C,kBAAa,GAAG,IAAI,KAAK,EAAmB,CAAC;QAC7C,oBAAe,GAAG,IAAI,KAAK,EAAuB,CAAC;QAC5D,iBAAY,GAAG,EAAE,CAAC;IAuV5B,CAAC;IArVC,IAAI,iBAAiB;QACnB,OAAO;YACL,GAAG,IAAI,CAAC,YAAY;YACpB,GAAG,IAAI,CAAC,UAAU;YAClB,GAAG,IAAI,CAAC,aAAa;YACrB,GAAG,IAAI,CAAC,eAAe;SACxB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uBAAc,C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C,IAAI,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;SAC7D;IACH,CAAC;CACF;AA5VD,8BA4VC;AAEM,MAAM,cAAc,GAAG,CAC5B,KAAc,EACd,QAAgB,EAChB,QAAiC,EACpB,EAAE;IACf,IAAI,WAAW,GAAG,eAAe,CAAC;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC7B,WAAW,GAAG,KAAK,CAAC;KACrB;SAAM,IAAI,KAAK,YAAY,KAAK,EAAE;QACjC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC;KAC7B;IACD,MAAM,WAAW,GAAgB;QAC/B,IAAI,EAAE,cAAc;QACpB,WAAW;QACX,QAAQ;QACR,QAAQ;KACT,CAAC;IACF,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAlBW,QAAA,cAAc,kBAkBzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Entity } from './models';
|
|
2
|
+
import { Validator } from '../validators';
|
|
3
|
+
export type { Entity, Assertion } from './models';
|
|
4
|
+
export interface YamlFile {
|
|
5
|
+
content: Entity;
|
|
6
|
+
fileName: string;
|
|
7
|
+
filePath: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const loadYaml: (validationContext: Validator, path: string, basePath?: string) => Promise<YamlFile | undefined>;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/yaml/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,MAAM,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,sBACA,SAAS,QACtB,MAAM,aACF,MAAM,KACf,QAAQ,QAAQ,GAAG,SAAS,CAmB9B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadYaml = void 0;
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const models_1 = require("./models");
|
|
7
|
+
const loadYaml = async (validationContext, path, basePath = utils_1.CWD) => {
|
|
8
|
+
const absolutePath = (0, utils_1.resolvePath)(path, basePath);
|
|
9
|
+
const relativePath = (0, node_path_1.relative)(basePath, absolutePath);
|
|
10
|
+
const fileName = (0, node_path_1.basename)(relativePath).split('.')[0];
|
|
11
|
+
try {
|
|
12
|
+
const content = await (0, utils_1.readYaml)(models_1.entityDecoder, path, basePath);
|
|
13
|
+
return {
|
|
14
|
+
content,
|
|
15
|
+
filePath: relativePath,
|
|
16
|
+
fileName,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
if (validationContext) {
|
|
21
|
+
validationContext.registerLoaderError(error, relativePath, 'feature');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.loadYaml = loadYaml;
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/yaml/index.ts"],"names":[],"mappings":";;;AAAA,yCAA+C;AAE/C,oCAAsD;AACtD,qCAAiD;AAW1C,MAAM,QAAQ,GAAG,KAAK,EAC3B,iBAA4B,EAC5B,IAAY,EACZ,WAAmB,WAAG,EACS,EAAE;IACjC,MAAM,YAAY,GAAG,IAAA,mBAAW,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,IAAA,oBAAQ,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAA,oBAAQ,EAAC,YAAY,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtD,IAAI;QACF,MAAM,OAAO,GAAG,MAAM,IAAA,gBAAQ,EAAC,sBAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAC9D,OAAO;YACL,OAAO;YACP,QAAQ,EAAE,YAAY;YACtB,QAAQ;SACT,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,iBAAiB,EAAE;YACrB,iBAAiB,CAAC,mBAAmB,CAAC,KAAK,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;SACvE;aAAM;YACL,MAAM,KAAK,CAAC;SACb;KACF;AACH,CAAC,CAAC;AAvBW,QAAA,QAAQ,YAuBnB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as d from "io-ts/Decoder";
|
|
2
|
+
export declare const assertionDecoder: d.Decoder<unknown, Partial<{
|
|
3
|
+
description: string;
|
|
4
|
+
}> & {
|
|
5
|
+
assert: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const entityDecoder: d.Decoder<unknown, Partial<{
|
|
8
|
+
"specs-unit": Record<string, (Partial<{
|
|
9
|
+
description: string;
|
|
10
|
+
}> & {
|
|
11
|
+
assert: string;
|
|
12
|
+
})[]>;
|
|
13
|
+
definitions: Record<string, string[]>;
|
|
14
|
+
description: string;
|
|
15
|
+
}> & {
|
|
16
|
+
code: string;
|
|
17
|
+
feature: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type Entity = d.TypeOf<typeof entityDecoder>;
|
|
20
|
+
export type Assertion = d.TypeOf<typeof assertionDecoder>;
|
|
21
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/lib/yaml/models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,eAAe,CAAC;AAEnC,eAAO,MAAM,gBAAgB;;;;EAQ5B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;EAWzB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.entityDecoder = exports.assertionDecoder = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const d = tslib_1.__importStar(require("io-ts/Decoder"));
|
|
6
|
+
exports.assertionDecoder = d.intersect(d.struct({
|
|
7
|
+
assert: d.string,
|
|
8
|
+
}))(d.partial({
|
|
9
|
+
description: d.string,
|
|
10
|
+
}));
|
|
11
|
+
exports.entityDecoder = d.intersect(d.struct({
|
|
12
|
+
code: d.string,
|
|
13
|
+
feature: d.string,
|
|
14
|
+
}))(d.partial({
|
|
15
|
+
"specs-unit": d.record(d.array(exports.assertionDecoder)),
|
|
16
|
+
definitions: d.record(d.array(d.string)),
|
|
17
|
+
description: d.string,
|
|
18
|
+
}));
|
|
19
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/lib/yaml/models.ts"],"names":[],"mappings":";;;;AAAA,yDAAmC;AAEtB,QAAA,gBAAgB,GAAG,CAAC,CAAC,SAAS,CACzC,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,MAAM;CACjB,CAAC,CACH,CACC,CAAC,CAAC,OAAO,CAAC;IACR,WAAW,EAAE,CAAC,CAAC,MAAM;CACtB,CAAC,CACH,CAAC;AAEW,QAAA,aAAa,GAAG,CAAC,CAAC,SAAS,CACtC,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM;IACd,OAAO,EAAE,CAAC,CAAC,MAAM;CAClB,CAAC,CACH,CACC,CAAC,CAAC,OAAO,CAAC;IACR,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC,CAAC;IACjD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,MAAM;CACtB,CAAC,CACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spec-box-tms-sync",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"bin": {
|
|
6
|
+
"spec-box": "./bin/spec-box"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"start": "NODE_TLS_REJECT_UNAUTHORIZED=0 ts-node ./src/cli.ts",
|
|
13
|
+
"build": "rm -rf dist && tsc --build tsconfig.json",
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
15
|
+
"generate-api": "./utils/generate-api.sh",
|
|
16
|
+
"test": "NODE_TLS_REJECT_UNAUTHORIZED=0 ts-node ./src/cli.ts sync",
|
|
17
|
+
"test-ext": "./bin/spec-box sync",
|
|
18
|
+
"version-beta": "npm version prerelease --preid beta",
|
|
19
|
+
"publish-beta": "npm publish --tag beta"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@azure/core-client": "^1.7.3",
|
|
24
|
+
"@azure/core-rest-pipeline": "^1.11.0",
|
|
25
|
+
"chalk": "^4.1.0",
|
|
26
|
+
"fast-glob": "^3.3.0",
|
|
27
|
+
"fp-ts": "^2.16.0",
|
|
28
|
+
"fs-extra": "^11.1.1",
|
|
29
|
+
"io-ts": "^2.2.20",
|
|
30
|
+
"tslib": "^2.6.0",
|
|
31
|
+
"yaml": "^2.3.1",
|
|
32
|
+
"yargs": "^17.7.2"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/fs-extra": "^11.0.1",
|
|
36
|
+
"@types/node": "^20.4.2",
|
|
37
|
+
"@types/yargs": "^17.0.24",
|
|
38
|
+
"autorest": "^3.6.3",
|
|
39
|
+
"ts-node": "^10.9.1",
|
|
40
|
+
"typescript": "^5.1.6"
|
|
41
|
+
}
|
|
42
|
+
}
|