@eventcatalog/sdk 2.18.1 → 2.18.2
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.d.mts +3 -57
- package/dist/index.d.ts +3 -57
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1438,8 +1438,11 @@ var resolveDomainWriteDirectory = async (directory, id, version) => {
|
|
|
1438
1438
|
if (!existingResource) return directory;
|
|
1439
1439
|
const normalizedPath = existingResource.replace(/\\/g, "/");
|
|
1440
1440
|
const lastDomainsIndex = normalizedPath.lastIndexOf("/domains/");
|
|
1441
|
-
|
|
1442
|
-
|
|
1441
|
+
const lastSubdomainsIndex = normalizedPath.lastIndexOf("/subdomains/");
|
|
1442
|
+
const lastIndex = Math.max(lastDomainsIndex, lastSubdomainsIndex);
|
|
1443
|
+
if (lastIndex === -1) return directory;
|
|
1444
|
+
const segment = lastSubdomainsIndex > lastDomainsIndex ? "/subdomains" : "/domains";
|
|
1445
|
+
return existingResource.substring(0, lastIndex + segment.length);
|
|
1443
1446
|
};
|
|
1444
1447
|
var getDomain = (directory) => async (id, version) => getResource(directory, id, version, { type: "domain" });
|
|
1445
1448
|
var getDomains = (directory) => async (options) => getResources(directory, {
|