Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Use re-export statements instead of import -> export #683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 19 additions & 43 deletions api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,22 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { registerAsyncComponent } from "./api/designSystemLoader.js";
import { DefaultPageData } from "./components/DefaultPageData.js";
import { JSONLDDocument } from "./components/JSONLDDocument.js";
import ComponentInit from "./components/componentsInit.js";
import { DefaultLogger } from "./components/defaultLogger.js";
import { DefaultLoggerConfig } from "./components/defaultLoggerConfig.js";
import { DefaultWikiConfig } from "./components/defaultWikiConfig.js";
import type { PageData } from "./api/PageData.js";
import type { WikiConfig } from "./api/WikiConfig.js";
import type { AttachmentsData } from "./api/attachmentsData";
import type { CristalApp } from "./api/cristalApp.js";
import type { DesignSystemLoader } from "./api/designSystemLoader.js";
import type { Document } from "./api/document.js";
import type { Logger } from "./api/logger.js";
import type { LoggerConfig } from "./api/loggerConfig.js";
import type { PageAttachment } from "./api/pageAttachment";
import type { SkinManager } from "./api/skinManager.js";
import type { Storage } from "./api/storage.js";
import type { WrappingStorage } from "./api/wrappingStorage.js";

export type {
AttachmentsData,
CristalApp,
DesignSystemLoader,
Document,
Logger,
LoggerConfig,
PageAttachment,
PageData,
SkinManager,
Storage,
WikiConfig,
WrappingStorage,
};
export {
ComponentInit,
DefaultLogger,
DefaultLoggerConfig,
DefaultPageData,
DefaultWikiConfig,
JSONLDDocument,
registerAsyncComponent,
};
export { registerAsyncComponent } from "./api/designSystemLoader.js";
export { DefaultPageData } from "./components/DefaultPageData.js";
export { JSONLDDocument } from "./components/JSONLDDocument.js";
export { default as ComponentInit } from "./components/componentsInit.js";
export { DefaultLogger } from "./components/defaultLogger.js";
export { DefaultLoggerConfig } from "./components/defaultLoggerConfig.js";
export { DefaultWikiConfig } from "./components/defaultWikiConfig.js";
export type { PageData } from "./api/PageData.js";
export type { WikiConfig } from "./api/WikiConfig.js";
export type { AttachmentsData } from "./api/attachmentsData";
export type { CristalApp } from "./api/cristalApp.js";
export type { DesignSystemLoader } from "./api/designSystemLoader.js";
export type { Document } from "./api/document.js";
export type { Logger } from "./api/logger.js";
export type { LoggerConfig } from "./api/loggerConfig.js";
export type { PageAttachment } from "./api/pageAttachment";
export type { SkinManager } from "./api/skinManager.js";
export type { Storage } from "./api/storage.js";
export type { WrappingStorage } from "./api/wrappingStorage.js";
4 changes: 1 addition & 3 deletions core/alerts/alerts-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import AlertsToasts from "./vue/AlertsToasts.vue";

export { AlertsToasts };
export { default as AlertsToasts } from "./vue/AlertsToasts.vue";
5 changes: 2 additions & 3 deletions core/alerts/alerts-ui/src/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
import en from "../langs/translation-en.json";
import fr from "../langs/translation-fr.json";

const translations: Record<string, Record<string, string>> = {
export default {
en,
fr,
};
export default translations;
} satisfies Record<string, Record<string, string>>;
8 changes: 3 additions & 5 deletions core/authentication/authentication-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import type { AuthenticationManager } from "./authenticationManager";
import type { AuthenticationManagerProvider } from "./authenticationManagerProvider";
import type { UserDetails } from "./userDetails";

export { AuthenticationManager, AuthenticationManagerProvider, UserDetails };
export type { AuthenticationManager } from "./authenticationManager";
export type { AuthenticationManagerProvider } from "./authenticationManagerProvider";
export type { UserDetails } from "./userDetails";
10 changes: 4 additions & 6 deletions core/backends/backend-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { AbstractStorage } from "./abstractStorage";
import { ComponentInit } from "./componentInit";
import type OfflineStorage from "./offlineStorage";
import type { StorageProvider } from "./storageProvider";

export { AbstractStorage, ComponentInit, OfflineStorage, StorageProvider };
export { AbstractStorage } from "./abstractStorage";
export { ComponentInit } from "./componentInit";
export type { default as OfflineStorage } from "./offlineStorage";
export type { StorageProvider } from "./storageProvider";
4 changes: 1 addition & 3 deletions core/browser/browser-default/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
6 changes: 2 additions & 4 deletions core/date/date-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";
import { DateService } from "./dateService";

export { ComponentInit, type DateService };
export { ComponentInit } from "./componentInit";
export type { DateService } from "./dateService";
4 changes: 1 addition & 3 deletions core/date/date-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import Date from "./vue/CDate.vue";

export { Date };
export { default as Date } from "./vue/CDate.vue";
6 changes: 2 additions & 4 deletions core/extra-tabs/extra-tabs-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { AbstractExtraTab } from "./ExtraTabsService";
import type { ExtraTab, ExtraTabsService } from "./ExtraTabsService";

export { AbstractExtraTab, type ExtraTab, type ExtraTabsService };
export { AbstractExtraTab } from "./ExtraTabsService";
export type { ExtraTab, ExtraTabsService } from "./ExtraTabsService";
4 changes: 1 addition & 3 deletions core/extra-tabs/extra-tabs-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import ExtraTabs from "./vue/ExtraTabs.vue";

export { ExtraTabs };
export { default as ExtraTabs } from "./vue/ExtraTabs.vue";
6 changes: 2 additions & 4 deletions core/file-preview/file-preview-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import FilePreview from "./vue/FilePreview.vue";
import FileSize from "./vue/FileSize.vue";

export { FilePreview, FileSize };
export { default as FilePreview } from "./vue/FilePreview.vue";
export { default as FileSize } from "./vue/FileSize.vue";
6 changes: 2 additions & 4 deletions core/hierarchy/hierarchy-default/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";
import { getPageHierarchyFromPath } from "./utils";

export { ComponentInit, getPageHierarchyFromPath };
export { ComponentInit } from "./components/componentsInit";
export { getPageHierarchyFromPath } from "./utils";
4 changes: 1 addition & 3 deletions core/hierarchy/hierarchy-filesystem/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/hierarchy/hierarchy-github/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/hierarchy/hierarchy-nextcloud/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/hierarchy/hierarchy-xwiki/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
6 changes: 2 additions & 4 deletions core/icons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { Size } from "./size";
import CIcon from "./vue/c-icon.vue";

export { CIcon, Size };
export { Size } from "./size";
export { default as CIcon } from "./vue/c-icon.vue";
4 changes: 1 addition & 3 deletions core/info-actions/info-actions-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import InfoActions from "./vue/InfoActions.vue";

export { InfoActions };
export { default as InfoActions } from "./vue/InfoActions.vue";
4 changes: 1 addition & 3 deletions core/link-suggest/link-suggest-xwiki/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/markdown/markdown-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import type { MarkdownRenderer } from "./markdownRenderer";

export { MarkdownRenderer };
export type { MarkdownRenderer } from "./markdownRenderer";
6 changes: 2 additions & 4 deletions core/model/model-click-listener/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";
import type { ClickListener } from "./clickListener";

export { type ClickListener, ComponentInit };
export { ComponentInit } from "./componentInit";
export type { ClickListener } from "./clickListener";
24 changes: 7 additions & 17 deletions core/model/model-reference/model-reference-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";
import type { ModelReferenceHandler } from "./modelReferenceHandler";
import type { ModelReferenceHandlerProvider } from "./modelReferenceHandlerProvider";
import type { ModelReferenceParser } from "./modelReferenceParser";
import type { ModelReferenceParserProvider } from "./modelReferenceParserProvider";
import type { ModelReferenceSerializer } from "./modelReferenceSerializer";
import type { ModelReferenceSerializerProvider } from "./modelReferenceSerializerProvider";

export {
ComponentInit,
type ModelReferenceHandler,
type ModelReferenceHandlerProvider,
type ModelReferenceParser,
type ModelReferenceParserProvider,
type ModelReferenceSerializer,
type ModelReferenceSerializerProvider,
};
export { ComponentInit } from "./componentInit";
export type { ModelReferenceHandler } from "./modelReferenceHandler";
export type { ModelReferenceHandlerProvider } from "./modelReferenceHandlerProvider";
export type { ModelReferenceParser } from "./modelReferenceParser";
export type { ModelReferenceParserProvider } from "./modelReferenceParserProvider";
export type { ModelReferenceSerializer } from "./modelReferenceSerializer";
export type { ModelReferenceSerializerProvider } from "./modelReferenceSerializerProvider";
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";

export { ComponentInit };
export { ComponentInit } from "./componentInit";
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";

export { ComponentInit };
export { ComponentInit } from "./componentInit";
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";

export { ComponentInit };
export { ComponentInit } from "./componentInit";
18 changes: 5 additions & 13 deletions core/model/model-remote-url/model-remote-url-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,8 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";
import type { RemoteURLParser } from "./remoteURLParser";
import type { RemoteURLParserProvider } from "./remoteURLParserProvider";
import type { RemoteURLSerializer } from "./remoteURLSerializer";
import type { RemoteURLSerializerProvider } from "./remoteURLSerializerProvider";

export {
ComponentInit,
type RemoteURLParser,
type RemoteURLParserProvider,
type RemoteURLSerializer,
type RemoteURLSerializerProvider,
};
export { ComponentInit } from "./componentInit";
export type { RemoteURLParser } from "./remoteURLParser";
export type { RemoteURLParserProvider } from "./remoteURLParserProvider";
export type { RemoteURLSerializer } from "./remoteURLSerializer";
export type { RemoteURLSerializerProvider } from "./remoteURLSerializerProvider";
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";

export { ComponentInit };
export { ComponentInit } from "./componentInit";
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";

export { ComponentInit };
export { ComponentInit } from "./componentInit";
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./componentInit";

export { ComponentInit };
export { ComponentInit } from "./componentInit";
6 changes: 2 additions & 4 deletions core/navigation-tree/navigation-tree-default/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";
import { getParentNodesIdFromPath } from "./utils";

export { ComponentInit, getParentNodesIdFromPath };
export { ComponentInit } from "./components/componentsInit";
export { getParentNodesIdFromPath } from "./utils";
4 changes: 1 addition & 3 deletions core/navigation-tree/navigation-tree-filesystem/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/navigation-tree/navigation-tree-github/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/navigation-tree/navigation-tree-nextcloud/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
4 changes: 1 addition & 3 deletions core/navigation-tree/navigation-tree-xwiki/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

import { ComponentInit } from "./components/componentsInit";

export { ComponentInit };
export { ComponentInit } from "./components/componentsInit";
Loading