@eventcatalog/linter 0.0.1
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 +583 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +54 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/parser/index.d.ts +17 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +43 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/reporters/index.d.ts +16 -0
- package/dist/reporters/index.d.ts.map +1 -0
- package/dist/reporters/index.js +151 -0
- package/dist/reporters/index.js.map +1 -0
- package/dist/scanner/index.d.ts +14 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +99 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/schemas/channel.d.ts +389 -0
- package/dist/schemas/channel.d.ts.map +1 -0
- package/dist/schemas/channel.js +20 -0
- package/dist/schemas/channel.js.map +1 -0
- package/dist/schemas/common.d.ts +550 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +144 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/domain.d.ts +381 -0
- package/dist/schemas/domain.d.ts.map +1 -0
- package/dist/schemas/domain.js +13 -0
- package/dist/schemas/domain.js.map +1 -0
- package/dist/schemas/entity.d.ts +382 -0
- package/dist/schemas/entity.d.ts.map +1 -0
- package/dist/schemas/entity.js +24 -0
- package/dist/schemas/entity.js.map +1 -0
- package/dist/schemas/flow.d.ts +733 -0
- package/dist/schemas/flow.d.ts.map +1 -0
- package/dist/schemas/flow.js +70 -0
- package/dist/schemas/flow.js.map +1 -0
- package/dist/schemas/index.d.ts +3432 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +47 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/message.d.ts +1076 -0
- package/dist/schemas/message.d.ts.map +1 -0
- package/dist/schemas/message.js +17 -0
- package/dist/schemas/message.js.map +1 -0
- package/dist/schemas/service.d.ts +381 -0
- package/dist/schemas/service.d.ts.map +1 -0
- package/dist/schemas/service.js +13 -0
- package/dist/schemas/service.js.map +1 -0
- package/dist/schemas/team.d.ts +45 -0
- package/dist/schemas/team.d.ts.map +1 -0
- package/dist/schemas/team.js +20 -0
- package/dist/schemas/team.js.map +1 -0
- package/dist/schemas/user.d.ts +48 -0
- package/dist/schemas/user.d.ts.map +1 -0
- package/dist/schemas/user.js +21 -0
- package/dist/schemas/user.js.map +1 -0
- package/dist/types/index.d.ts +81 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/validators/index.d.ts +6 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +28 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/reference-validator.d.ts +11 -0
- package/dist/validators/reference-validator.d.ts.map +1 -0
- package/dist/validators/reference-validator.js +171 -0
- package/dist/validators/reference-validator.js.map +1 -0
- package/dist/validators/schema-validator.d.ts +5 -0
- package/dist/validators/schema-validator.d.ts.map +1 -0
- package/dist/validators/schema-validator.js +50 -0
- package/dist/validators/schema-validator.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseAllFiles = exports.parseFrontmatter = void 0;
|
|
7
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
|
+
const gray_matter_1 = __importDefault(require("gray-matter"));
|
|
9
|
+
const parseFrontmatter = async (file) => {
|
|
10
|
+
try {
|
|
11
|
+
const fileContent = await promises_1.default.readFile(file.path, 'utf-8');
|
|
12
|
+
const { data, content } = (0, gray_matter_1.default)(fileContent);
|
|
13
|
+
return {
|
|
14
|
+
file,
|
|
15
|
+
frontmatter: data,
|
|
16
|
+
content,
|
|
17
|
+
raw: fileContent,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return {
|
|
22
|
+
file,
|
|
23
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.parseFrontmatter = parseFrontmatter;
|
|
28
|
+
const parseAllFiles = async (files) => {
|
|
29
|
+
const results = await Promise.all(files.map(exports.parseFrontmatter));
|
|
30
|
+
const parsed = [];
|
|
31
|
+
const errors = [];
|
|
32
|
+
for (const result of results) {
|
|
33
|
+
if ('error' in result) {
|
|
34
|
+
errors.push(result);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
parsed.push(result);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return { parsed, errors };
|
|
41
|
+
};
|
|
42
|
+
exports.parseAllFiles = parseAllFiles;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA6B;AAC7B,8DAAiC;AAe1B,MAAM,gBAAgB,GAAG,KAAK,EAAE,IAAiB,EAAoC,EAAE;IAC5F,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC1D,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,qBAAM,EAAC,WAAW,CAAC,CAAC;QAE9C,OAAO;YACL,IAAI;YACJ,WAAW,EAAE,IAAI;YACjB,OAAO;YACP,GAAG,EAAE,WAAW;SACjB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,IAAI;YACJ,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACjE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAjBW,QAAA,gBAAgB,oBAiB3B;AAEK,MAAM,aAAa,GAAG,KAAK,EAChC,KAAoB,EAInB,EAAE;IACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wBAAgB,CAAC,CAAC,CAAC;IAE/D,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC,CAAC;AApBW,QAAA,aAAa,iBAoBxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValidationError } from '../types';
|
|
2
|
+
import { ParseError } from '../parser';
|
|
3
|
+
export interface ReportSummary {
|
|
4
|
+
totalErrors: number;
|
|
5
|
+
totalWarnings: number;
|
|
6
|
+
schemaErrors: number;
|
|
7
|
+
referenceErrors: number;
|
|
8
|
+
parseErrors: number;
|
|
9
|
+
filesChecked: number;
|
|
10
|
+
filesWithErrors: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const formatError: (error: ValidationError, showFilename?: boolean) => string;
|
|
13
|
+
export declare const formatParseError: (error: ParseError, showFilename?: boolean) => string;
|
|
14
|
+
export declare const groupErrorsByFile: (errors: ValidationError[]) => Map<string, ValidationError[]>;
|
|
15
|
+
export declare const reportErrors: (validationErrors: ValidationError[], parseErrors: ParseError[], verbose?: boolean) => ReportSummary;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,GAAI,OAAO,eAAe,EAAE,eAAc,OAAc,KAAG,MAelF,CAAC;AAiBF,eAAO,MAAM,gBAAgB,GAAI,OAAO,UAAU,EAAE,eAAc,OAAc,KAAG,MAWlF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,EAAE,KAAG,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,CAW1F,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,kBAAkB,eAAe,EAAE,EACnC,aAAa,UAAU,EAAE,EACzB,UAAS,OAAe,KACvB,aAyFF,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.reportErrors = exports.groupErrorsByFile = exports.formatParseError = exports.formatError = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const formatError = (error, showFilename = true) => {
|
|
9
|
+
const lineInfo = error.line ? chalk_1.default.dim(`:${error.line}:1`) : '';
|
|
10
|
+
const filename = showFilename ? `${chalk_1.default.dim(error.file)}${lineInfo}` : '';
|
|
11
|
+
const isWarning = error.severity === 'warning';
|
|
12
|
+
const severity = isWarning ? chalk_1.default.yellow('warning') : chalk_1.default.red('error');
|
|
13
|
+
const icon = isWarning ? chalk_1.default.yellow('⚠') : chalk_1.default.red('✖');
|
|
14
|
+
const errorCode = getErrorCode(error);
|
|
15
|
+
const field = error.field ? chalk_1.default.dim(`[${error.field}]`) : '';
|
|
16
|
+
const parts = [];
|
|
17
|
+
if (filename)
|
|
18
|
+
parts.push(filename);
|
|
19
|
+
parts.push(icon, severity, error.message, field, chalk_1.default.dim(errorCode));
|
|
20
|
+
return parts.filter(Boolean).join(' ');
|
|
21
|
+
};
|
|
22
|
+
exports.formatError = formatError;
|
|
23
|
+
const getErrorCode = (error) => {
|
|
24
|
+
if (error.type === 'schema') {
|
|
25
|
+
if (error.field) {
|
|
26
|
+
if (error.message.includes('Required'))
|
|
27
|
+
return '(@eventcatalog/required-field)';
|
|
28
|
+
if (error.message.includes('Expected'))
|
|
29
|
+
return '(@eventcatalog/invalid-type)';
|
|
30
|
+
return '(@eventcatalog/schema-validation)';
|
|
31
|
+
}
|
|
32
|
+
return '(@eventcatalog/schema)';
|
|
33
|
+
}
|
|
34
|
+
if (error.type === 'reference') {
|
|
35
|
+
return '(@eventcatalog/invalid-reference)';
|
|
36
|
+
}
|
|
37
|
+
return '(@eventcatalog/unknown)';
|
|
38
|
+
};
|
|
39
|
+
const formatParseError = (error, showFilename = true) => {
|
|
40
|
+
const filename = showFilename ? chalk_1.default.dim(error.file.relativePath) : '';
|
|
41
|
+
const severity = chalk_1.default.red('error');
|
|
42
|
+
const message = `Parse error: ${error.error.message}`;
|
|
43
|
+
const errorCode = chalk_1.default.dim('(@eventcatalog/parse-error)');
|
|
44
|
+
const parts = [];
|
|
45
|
+
if (filename)
|
|
46
|
+
parts.push(filename);
|
|
47
|
+
parts.push(chalk_1.default.red('✖'), severity, message, errorCode);
|
|
48
|
+
return parts.filter(Boolean).join(' ');
|
|
49
|
+
};
|
|
50
|
+
exports.formatParseError = formatParseError;
|
|
51
|
+
const groupErrorsByFile = (errors) => {
|
|
52
|
+
const grouped = new Map();
|
|
53
|
+
for (const error of errors) {
|
|
54
|
+
if (!grouped.has(error.file)) {
|
|
55
|
+
grouped.set(error.file, []);
|
|
56
|
+
}
|
|
57
|
+
grouped.get(error.file).push(error);
|
|
58
|
+
}
|
|
59
|
+
return grouped;
|
|
60
|
+
};
|
|
61
|
+
exports.groupErrorsByFile = groupErrorsByFile;
|
|
62
|
+
const reportErrors = (validationErrors, parseErrors, verbose = false) => {
|
|
63
|
+
const allErrors = [
|
|
64
|
+
...validationErrors,
|
|
65
|
+
...parseErrors.map((pe) => ({
|
|
66
|
+
type: 'parse',
|
|
67
|
+
resource: pe.file.resourceType || 'unknown',
|
|
68
|
+
message: pe.error.message,
|
|
69
|
+
file: pe.file.relativePath,
|
|
70
|
+
line: undefined,
|
|
71
|
+
})),
|
|
72
|
+
];
|
|
73
|
+
const schemaErrors = validationErrors.filter((e) => e.type === 'schema');
|
|
74
|
+
const referenceErrors = validationErrors.filter((e) => e.type === 'reference');
|
|
75
|
+
const warnings = validationErrors.filter((e) => e.severity === 'warning');
|
|
76
|
+
const errors = [...validationErrors.filter((e) => e.severity !== 'warning'), ...parseErrors];
|
|
77
|
+
const totalErrors = errors.length;
|
|
78
|
+
const totalWarnings = warnings.length;
|
|
79
|
+
if (totalErrors === 0 && totalWarnings === 0) {
|
|
80
|
+
console.log(chalk_1.default.green('\\n✔ No problems found!'));
|
|
81
|
+
return {
|
|
82
|
+
totalErrors: 0,
|
|
83
|
+
totalWarnings: 0,
|
|
84
|
+
schemaErrors: 0,
|
|
85
|
+
referenceErrors: 0,
|
|
86
|
+
parseErrors: 0,
|
|
87
|
+
filesChecked: 0,
|
|
88
|
+
filesWithErrors: 0,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const grouped = (0, exports.groupErrorsByFile)(validationErrors);
|
|
92
|
+
const parseErrorsGrouped = groupParseErrorsByFile(parseErrors);
|
|
93
|
+
const allFiles = new Set([...grouped.keys(), ...parseErrorsGrouped.keys()]);
|
|
94
|
+
console.log(); // Empty line
|
|
95
|
+
// Report by file for better readability
|
|
96
|
+
for (const file of Array.from(allFiles).sort()) {
|
|
97
|
+
const fileErrors = grouped.get(file) || [];
|
|
98
|
+
const fileParseErrors = parseErrorsGrouped.get(file) || [];
|
|
99
|
+
const fileErrorCount = fileErrors.length + fileParseErrors.length;
|
|
100
|
+
if (fileErrorCount === 0)
|
|
101
|
+
continue;
|
|
102
|
+
// File header (ESLint-style)
|
|
103
|
+
console.log(chalk_1.default.underline(file));
|
|
104
|
+
// Parse errors first
|
|
105
|
+
for (const error of fileParseErrors) {
|
|
106
|
+
console.log(` ${(0, exports.formatParseError)(error, false)}`);
|
|
107
|
+
}
|
|
108
|
+
// Then validation errors
|
|
109
|
+
for (const error of fileErrors) {
|
|
110
|
+
console.log(` ${(0, exports.formatError)(error, false)}`);
|
|
111
|
+
}
|
|
112
|
+
// File summary
|
|
113
|
+
const fileWarnings = fileErrors.filter((e) => e.severity === 'warning').length;
|
|
114
|
+
const fileActualErrors = fileErrorCount - fileWarnings;
|
|
115
|
+
const problemText = fileErrorCount === 1 ? 'problem' : 'problems';
|
|
116
|
+
const summaryColor = fileActualErrors > 0 ? chalk_1.default.red : chalk_1.default.yellow;
|
|
117
|
+
const summaryIcon = fileActualErrors > 0 ? '✖' : '⚠';
|
|
118
|
+
console.log(summaryColor(`\n${summaryIcon} ${fileErrorCount} ${problemText}\n`));
|
|
119
|
+
}
|
|
120
|
+
// Overall summary (ESLint-style)
|
|
121
|
+
const filesWithErrors = allFiles.size;
|
|
122
|
+
const totalProblems = totalErrors + totalWarnings;
|
|
123
|
+
const problemText = totalProblems === 1 ? 'problem' : 'problems';
|
|
124
|
+
const fileText = filesWithErrors === 1 ? 'file' : 'files';
|
|
125
|
+
const summaryColor = totalErrors > 0 ? chalk_1.default.red.bold : chalk_1.default.yellow.bold;
|
|
126
|
+
const summaryIcon = totalErrors > 0 ? '✖' : '⚠';
|
|
127
|
+
console.log(summaryColor(`${summaryIcon} ${totalProblems} ${problemText} (${totalErrors} errors, ${totalWarnings} warnings)`));
|
|
128
|
+
console.log(chalk_1.default.dim(` ${filesWithErrors} ${fileText} checked`));
|
|
129
|
+
return {
|
|
130
|
+
totalErrors,
|
|
131
|
+
totalWarnings,
|
|
132
|
+
schemaErrors: schemaErrors.length,
|
|
133
|
+
referenceErrors: referenceErrors.length,
|
|
134
|
+
parseErrors: parseErrors.length,
|
|
135
|
+
filesChecked: allFiles.size,
|
|
136
|
+
filesWithErrors,
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
exports.reportErrors = reportErrors;
|
|
140
|
+
const groupParseErrorsByFile = (errors) => {
|
|
141
|
+
const grouped = new Map();
|
|
142
|
+
for (const error of errors) {
|
|
143
|
+
const file = error.file.relativePath;
|
|
144
|
+
if (!grouped.has(file)) {
|
|
145
|
+
grouped.set(file, []);
|
|
146
|
+
}
|
|
147
|
+
grouped.get(file).push(error);
|
|
148
|
+
}
|
|
149
|
+
return grouped;
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reporters/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAcnB,MAAM,WAAW,GAAG,CAAC,KAAsB,EAAE,eAAwB,IAAI,EAAU,EAAE;IAC1F,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC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,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResourceType } from '../schemas';
|
|
2
|
+
export interface CatalogFile {
|
|
3
|
+
path: string;
|
|
4
|
+
relativePath: string;
|
|
5
|
+
resourceType: ResourceType;
|
|
6
|
+
resourceId: string;
|
|
7
|
+
version?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const extractResourceInfo: (filePath: string, resourceType: ResourceType) => {
|
|
10
|
+
id: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const scanCatalogFiles: (rootDir: string) => Promise<CatalogFile[]>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scanner/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA2BD,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,EAAE,cAAc,YAAY,KAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAiDhH,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,WAAW,EAAE,CA0B7E,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.scanCatalogFiles = exports.extractResourceInfo = void 0;
|
|
7
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const RESOURCE_PATTERNS = {
|
|
10
|
+
domain: [
|
|
11
|
+
'domains/*/index.{md,mdx}',
|
|
12
|
+
'domains/*/versioned/*/index.{md,mdx}',
|
|
13
|
+
'domains/*/subdomains/*/index.{md,mdx}',
|
|
14
|
+
'domains/*/subdomains/*/versioned/*/index.{md,mdx}',
|
|
15
|
+
],
|
|
16
|
+
service: [
|
|
17
|
+
'domains/*/services/*/index.{md,mdx}',
|
|
18
|
+
'domains/*/services/*/versioned/*/index.{md,mdx}',
|
|
19
|
+
'domains/*/subdomains/*/services/*/index.{md,mdx}',
|
|
20
|
+
'domains/*/subdomains/*/services/*/versioned/*/index.{md,mdx}',
|
|
21
|
+
'services/*/index.{md,mdx}',
|
|
22
|
+
'services/*/versioned/*/index.{md,mdx}',
|
|
23
|
+
],
|
|
24
|
+
event: ['**/events/*/index.{md,mdx}', '**/events/*/versioned/*/index.{md,mdx}'],
|
|
25
|
+
command: ['**/commands/*/index.{md,mdx}', '**/commands/*/versioned/*/index.{md,mdx}'],
|
|
26
|
+
query: ['**/queries/*/index.{md,mdx}', '**/queries/*/versioned/*/index.{md,mdx}'],
|
|
27
|
+
channel: ['**/channels/*/index.{md,mdx}', '**/channels/*/versioned/*/index.{md,mdx}'],
|
|
28
|
+
flow: ['**/flows/*/index.{md,mdx}', '**/flows/*/versioned/*/index.{md,mdx}'],
|
|
29
|
+
entity: ['**/entities/*/index.{md,mdx}', '**/entities/*/versioned/*/index.{md,mdx}'],
|
|
30
|
+
user: ['users/*.{md,mdx}'],
|
|
31
|
+
team: ['teams/*.{md,mdx}'],
|
|
32
|
+
};
|
|
33
|
+
const extractResourceInfo = (filePath, resourceType) => {
|
|
34
|
+
const relativePath = filePath.split(path_1.default.sep);
|
|
35
|
+
if (resourceType === 'user' || resourceType === 'team') {
|
|
36
|
+
const filename = path_1.default.basename(filePath, path_1.default.extname(filePath));
|
|
37
|
+
return { id: filename };
|
|
38
|
+
}
|
|
39
|
+
// Find the resource type directory in the path
|
|
40
|
+
const resourceTypePattern = `${resourceType}s`;
|
|
41
|
+
const resourceTypeIndex = relativePath.findIndex((part) => part === resourceTypePattern);
|
|
42
|
+
if (resourceTypeIndex === -1) {
|
|
43
|
+
// Fallback to original logic if pattern not found
|
|
44
|
+
const parts = relativePath.slice(1, -1);
|
|
45
|
+
return { id: parts[parts.length - 1] };
|
|
46
|
+
}
|
|
47
|
+
// Extract parts after the resource type directory, excluding index.mdx
|
|
48
|
+
const parts = relativePath.slice(resourceTypeIndex + 1, -1);
|
|
49
|
+
if (parts.length === 0) {
|
|
50
|
+
return { id: 'unknown' };
|
|
51
|
+
}
|
|
52
|
+
// Check for versioned structure: resourceId/versioned/version/index.mdx
|
|
53
|
+
if (parts.length >= 3 && parts[parts.length - 2] === 'versioned') {
|
|
54
|
+
const version = parts[parts.length - 1];
|
|
55
|
+
const resourceId = parts.slice(0, -2).join('/');
|
|
56
|
+
return { id: resourceId, version };
|
|
57
|
+
}
|
|
58
|
+
// Check for domain versioned structure: domains/domainId/versioned/version/index.mdx
|
|
59
|
+
if (resourceType === 'domain' && parts.length >= 2) {
|
|
60
|
+
const versionedIndex = parts.findIndex((part) => part === 'versioned');
|
|
61
|
+
if (versionedIndex !== -1 && versionedIndex < parts.length - 1) {
|
|
62
|
+
const version = parts[versionedIndex + 1];
|
|
63
|
+
const resourceId = parts.slice(0, versionedIndex).join('/');
|
|
64
|
+
return { id: resourceId, version };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Standard structure: resourceId/index.mdx
|
|
68
|
+
if (parts.length === 1) {
|
|
69
|
+
return { id: parts[0] };
|
|
70
|
+
}
|
|
71
|
+
// Handle subdomain structure or nested resources
|
|
72
|
+
return { id: parts.join('/') };
|
|
73
|
+
};
|
|
74
|
+
exports.extractResourceInfo = extractResourceInfo;
|
|
75
|
+
const scanCatalogFiles = async (rootDir) => {
|
|
76
|
+
const files = [];
|
|
77
|
+
for (const [resourceType, patterns] of Object.entries(RESOURCE_PATTERNS)) {
|
|
78
|
+
const foundFiles = await (0, fast_glob_1.default)(patterns, {
|
|
79
|
+
cwd: rootDir,
|
|
80
|
+
absolute: true,
|
|
81
|
+
onlyFiles: true,
|
|
82
|
+
followSymbolicLinks: false,
|
|
83
|
+
});
|
|
84
|
+
for (const filePath of foundFiles) {
|
|
85
|
+
const relativePath = path_1.default.relative(rootDir, filePath);
|
|
86
|
+
const { id, version } = (0, exports.extractResourceInfo)(relativePath, resourceType);
|
|
87
|
+
files.push({
|
|
88
|
+
path: filePath,
|
|
89
|
+
relativePath,
|
|
90
|
+
resourceType: resourceType,
|
|
91
|
+
resourceId: id,
|
|
92
|
+
version,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return files;
|
|
97
|
+
};
|
|
98
|
+
exports.scanCatalogFiles = scanCatalogFiles;
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scanner/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA2B;AAC3B,gDAAwB;AAWxB,MAAM,iBAAiB,GAAmC;IACxD,MAAM,EAAE;QACN,0BAA0B;QAC1B,sCAAsC;QACtC,uCAAuC;QACvC,mDAAmD;KACpD;IACD,OAAO,EAAE;QACP,qCAAqC;QACrC,iDAAiD;QACjD,kDAAkD;QAClD,8DAA8D;QAC9D,2BAA2B;QAC3B,uCAAuC;KACxC;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