@eventcatalog/generator-apicurio 7.0.0 → 9.0.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/dist/index.js +25 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -3861,7 +3861,7 @@ var filterSchemas = (groupedSchemas, filters, includeAllVersions = false) => {
|
|
|
3861
3861
|
// package.json
|
|
3862
3862
|
var package_default = {
|
|
3863
3863
|
name: "@eventcatalog/generator-apicurio",
|
|
3864
|
-
version: "
|
|
3864
|
+
version: "9.0.0",
|
|
3865
3865
|
description: "Apicurio Registry generator for EventCatalog",
|
|
3866
3866
|
scripts: {
|
|
3867
3867
|
build: "tsup",
|
|
@@ -3893,14 +3893,14 @@ var package_default = {
|
|
|
3893
3893
|
types: "./dist/index.d.ts",
|
|
3894
3894
|
dependencies: {
|
|
3895
3895
|
"@changesets/cli": "^2.27.8",
|
|
3896
|
-
"@eventcatalog/sdk": "^2.
|
|
3897
|
-
axios: "^1.
|
|
3896
|
+
"@eventcatalog/sdk": "^2.18.2",
|
|
3897
|
+
axios: "^1.13.5",
|
|
3898
3898
|
chalk: "4.1.2",
|
|
3899
3899
|
"update-notifier": "^7.3.1"
|
|
3900
3900
|
},
|
|
3901
3901
|
peerDependencies: {
|
|
3902
|
-
"@eventcatalog/generator-asyncapi": ">=6.
|
|
3903
|
-
"@eventcatalog/generator-openapi": ">=7.
|
|
3902
|
+
"@eventcatalog/generator-asyncapi": ">=6.2.0",
|
|
3903
|
+
"@eventcatalog/generator-openapi": ">=7.10.0"
|
|
3904
3904
|
},
|
|
3905
3905
|
peerDependenciesMeta: {
|
|
3906
3906
|
"@eventcatalog/generator-openapi": {
|
|
@@ -4483,7 +4483,8 @@ var index_default = async (config, options) => {
|
|
|
4483
4483
|
writeDomain,
|
|
4484
4484
|
addServiceToDomain,
|
|
4485
4485
|
addFileToService,
|
|
4486
|
-
getSpecificationFilesForService
|
|
4486
|
+
getSpecificationFilesForService,
|
|
4487
|
+
getResourcePath
|
|
4487
4488
|
} = utils2(eventCatalogDirectory);
|
|
4488
4489
|
const LICENSE_KEY = process.env.EVENTCATALOG_LICENSE_KEY_APICURIO_SCHEMA_REGISTRY || options.licenseKey || "";
|
|
4489
4490
|
await checkLicense_default(package_default.name, LICENSE_KEY);
|
|
@@ -4577,7 +4578,15 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
4577
4578
|
markdown: getMarkdownForService({ registryUrl: REGISTRY_URL })
|
|
4578
4579
|
} : {}
|
|
4579
4580
|
};
|
|
4580
|
-
let servicePath =
|
|
4581
|
+
let servicePath = pathToService;
|
|
4582
|
+
if (options.domain) {
|
|
4583
|
+
const domainResource = await getResourcePath(eventCatalogDirectory, options.domain.id, options.domain.version);
|
|
4584
|
+
if (domainResource) {
|
|
4585
|
+
servicePath = path3.join("../", domainResource.directory, "services", service.id);
|
|
4586
|
+
} else {
|
|
4587
|
+
servicePath = path3.join("../", "domains", options.domain.id, "services", service.id);
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4581
4590
|
let existingSpecifications = {};
|
|
4582
4591
|
if (serviceInCatalog?.specifications && typeof serviceInCatalog.specifications === "object" && !Array.isArray(serviceInCatalog.specifications)) {
|
|
4583
4592
|
existingSpecifications = serviceInCatalog.specifications;
|
|
@@ -4619,7 +4628,15 @@ Processing domain: ${domainName} (v${domainVersion})`));
|
|
|
4619
4628
|
await addFileToService(service.id, { content: specFile.content, fileName: specFile.fileName });
|
|
4620
4629
|
}
|
|
4621
4630
|
for (const { specConfig, fileName, content } of specsWithGenerators) {
|
|
4622
|
-
|
|
4631
|
+
let specFilePath = path3.join(eventCatalogDirectory, "services", service.id, fileName);
|
|
4632
|
+
if (options.domain) {
|
|
4633
|
+
const domainResource = await getResourcePath(eventCatalogDirectory, options.domain.id, options.domain.version);
|
|
4634
|
+
if (domainResource) {
|
|
4635
|
+
specFilePath = path3.join(eventCatalogDirectory, domainResource.directory, "services", service.id, fileName);
|
|
4636
|
+
} else {
|
|
4637
|
+
specFilePath = path3.join(eventCatalogDirectory, "domains", options.domain.id, "services", service.id, fileName);
|
|
4638
|
+
}
|
|
4639
|
+
}
|
|
4623
4640
|
const specDir = path3.dirname(specFilePath);
|
|
4624
4641
|
if (!fs2.existsSync(specDir)) {
|
|
4625
4642
|
fs2.mkdirSync(specDir, { recursive: true });
|