@cntrl-site/sdk 1.26.1 → 1.26.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/lib/Client/Client.d.ts +1 -0
- package/lib/Client/Client.js +3 -0
- package/package.json +1 -1
package/lib/Client/Client.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare class Client {
|
|
|
14
14
|
getLayouts(): Promise<Layout[]>;
|
|
15
15
|
fetchCustomComponents(buildMode?: 'default' | 'self-hosted'): Promise<CustomComponentMeta[]>;
|
|
16
16
|
fetchCustomComponentBundle(componentId: string, buildMode?: 'default' | 'self-hosted'): Promise<string>;
|
|
17
|
+
getHostname(): string;
|
|
17
18
|
private fetchProject;
|
|
18
19
|
private fetchArticle;
|
|
19
20
|
private findArticleIdByPageSlug;
|
package/lib/Client/Client.js
CHANGED
|
@@ -111,6 +111,9 @@ class Client {
|
|
|
111
111
|
return response.text();
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
+
getHostname() {
|
|
115
|
+
return this.url.origin;
|
|
116
|
+
}
|
|
114
117
|
fetchProject() {
|
|
115
118
|
return __awaiter(this, arguments, void 0, function* (buildMode = 'default') {
|
|
116
119
|
const { username: projectId, password: apiKey, origin } = this.url;
|