@equinor/fusion-framework-cli 10.0.0-widget-acdcb9b2 → 10.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/CHANGELOG.md +642 -39
- package/README.md +31 -9
- package/dist/bin/build-application.js +23 -3
- package/dist/bin/build-application.js.map +1 -1
- package/dist/bin/bundle-application.js +9 -12
- package/dist/bin/bundle-application.js.map +1 -1
- package/dist/bin/create-dev-serve.js +89 -123
- package/dist/bin/create-dev-serve.js.map +1 -1
- package/dist/bin/create-export-config.js +5 -6
- package/dist/bin/create-export-config.js.map +1 -1
- package/dist/bin/create-export-manifest.js +44 -27
- package/dist/bin/create-export-manifest.js.map +1 -1
- package/dist/bin/dev-portal/AppLoader.js +26 -4
- package/dist/bin/dev-portal/AppLoader.js.map +1 -1
- package/dist/bin/dev-portal/ContextSelector/ContextSelector.js +41 -0
- package/dist/bin/dev-portal/ContextSelector/ContextSelector.js.map +1 -0
- package/dist/bin/dev-portal/ContextSelector/index.js +2 -0
- package/dist/bin/dev-portal/ContextSelector/index.js.map +1 -0
- package/dist/bin/dev-portal/ContextSelector/useContextResolver.js +171 -0
- package/dist/bin/dev-portal/ContextSelector/useContextResolver.js.map +1 -0
- package/dist/bin/dev-portal/Header.js +3 -2
- package/dist/bin/dev-portal/Header.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/index.js +7 -2
- package/dist/bin/dev-portal/PersonSideSheet/index.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js +4 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js.map +1 -1
- package/dist/bin/dev-portal/Router.js +17 -1
- package/dist/bin/dev-portal/Router.js.map +1 -1
- package/dist/bin/dev-portal/config.js +7 -4
- package/dist/bin/dev-portal/config.js.map +1 -1
- package/dist/bin/dev-portal/main.js +1 -2
- package/dist/bin/dev-portal/main.js.map +1 -1
- package/dist/bin/dev-portal/useAppContextNavigation.js +68 -0
- package/dist/bin/dev-portal/useAppContextNavigation.js.map +1 -0
- package/dist/bin/main.app.js +92 -14
- package/dist/bin/main.app.js.map +1 -1
- package/dist/bin/main.js +5 -5
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/public/assets/index-D0eBBcR8.js +5235 -0
- package/dist/bin/public/index.html +1 -5
- package/dist/bin/publish-application.js +104 -0
- package/dist/bin/publish-application.js.map +1 -0
- package/dist/bin/tag-application.js +82 -0
- package/dist/bin/tag-application.js.map +1 -0
- package/dist/bin/upload-application.js +72 -0
- package/dist/bin/upload-application.js.map +1 -0
- package/dist/bin/upload-export-config.js +87 -0
- package/dist/bin/upload-export-config.js.map +1 -0
- package/dist/bin/utils/{execute-commant.js → execute-command.js} +5 -2
- package/dist/bin/utils/execute-command.js.map +1 -0
- package/dist/bin/utils/format.js +1 -1
- package/dist/bin/utils/format.js.map +1 -1
- package/dist/bin/utils/getEndpointUrl.js +49 -0
- package/dist/bin/utils/getEndpointUrl.js.map +1 -0
- package/dist/bin/utils/index.js +14 -0
- package/dist/bin/utils/index.js.map +1 -0
- package/dist/bin/utils/isAppRegistered.js +35 -0
- package/dist/bin/utils/isAppRegistered.js.map +1 -0
- package/dist/bin/utils/load-app-config.js +3 -2
- package/dist/bin/utils/load-app-config.js.map +1 -1
- package/dist/bin/utils/load-manifest.js +9 -4
- package/dist/bin/utils/load-manifest.js.map +1 -1
- package/dist/bin/utils/load-vite-config.js.map +1 -1
- package/dist/bin/utils/proxy-request-logger.js +34 -0
- package/dist/bin/utils/proxy-request-logger.js.map +1 -0
- package/dist/bin/utils/publishAppConfig.js +36 -0
- package/dist/bin/utils/publishAppConfig.js.map +1 -0
- package/dist/bin/utils/requireToken.js +10 -0
- package/dist/bin/utils/requireToken.js.map +1 -0
- package/dist/bin/utils/spinner.js +10 -0
- package/dist/bin/utils/spinner.js.map +1 -1
- package/dist/bin/utils/tagAppBundle.js +35 -0
- package/dist/bin/utils/tagAppBundle.js.map +1 -0
- package/dist/bin/utils/uploadAppBundle.js +54 -0
- package/dist/bin/utils/uploadAppBundle.js.map +1 -0
- package/dist/lib/app-config.js +5 -17
- package/dist/lib/app-config.js.map +1 -1
- package/dist/lib/app-manifest.js +97 -15
- package/dist/lib/app-manifest.js.map +1 -1
- package/dist/lib/app-package.js +52 -5
- package/dist/lib/app-package.js.map +1 -1
- package/dist/lib/index.js +2 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/plugins/app-assets/app-asset-plugin.js +102 -0
- package/dist/lib/plugins/app-assets/app-asset-plugin.js.map +1 -0
- package/dist/lib/plugins/app-assets/emit-asset.js +41 -0
- package/dist/lib/plugins/app-assets/emit-asset.js.map +1 -0
- package/dist/lib/plugins/app-assets/extension-filter-pattern.js +20 -0
- package/dist/lib/plugins/app-assets/extension-filter-pattern.js.map +1 -0
- package/dist/lib/plugins/app-assets/index.js +4 -0
- package/dist/lib/plugins/app-assets/index.js.map +1 -0
- package/dist/lib/plugins/app-assets/read-asset-content.js +34 -0
- package/dist/lib/plugins/app-assets/read-asset-content.js.map +1 -0
- package/dist/lib/plugins/app-assets/resolve-asset-id.js +63 -0
- package/dist/lib/plugins/app-assets/resolve-asset-id.js.map +1 -0
- package/dist/lib/plugins/app-assets/static.js +15 -0
- package/dist/lib/plugins/app-assets/static.js.map +1 -0
- package/dist/lib/plugins/app-proxy/app-proxy-plugin.js +127 -0
- package/dist/lib/plugins/app-proxy/app-proxy-plugin.js.map +1 -0
- package/dist/lib/plugins/app-proxy/index.js +2 -0
- package/dist/lib/plugins/app-proxy/index.js.map +1 -0
- package/dist/lib/plugins/external-public/external-public-plugin.js +103 -0
- package/dist/lib/plugins/external-public/external-public-plugin.js.map +1 -0
- package/dist/lib/plugins/external-public/index.js +2 -0
- package/dist/lib/plugins/external-public/index.js.map +1 -0
- package/dist/lib/utils/assert.js +2 -1
- package/dist/lib/utils/assert.js.map +1 -1
- package/dist/lib/utils/config.js +5 -0
- package/dist/lib/utils/config.js.map +1 -1
- package/dist/lib/utils/file-exists.js.map +1 -1
- package/dist/lib/utils/ts-transpile.js.map +1 -1
- package/dist/lib/vite-config.js +7 -8
- package/dist/lib/vite-config.js.map +1 -1
- package/dist/lib/vite-logger.js +2 -0
- package/dist/lib/vite-logger.js.map +1 -1
- package/dist/schemas.js +14 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types/bin/build-application.d.ts +3 -3
- package/dist/types/bin/bundle-application.d.ts +0 -1
- package/dist/types/bin/create-dev-serve.d.ts +1 -4
- package/dist/types/bin/create-export-config.d.ts +9 -3
- package/dist/types/bin/create-export-manifest.d.ts +7 -11
- package/dist/types/bin/dev-portal/AppLoader.d.ts +7 -0
- package/dist/types/bin/dev-portal/ContextSelector/ContextSelector.d.ts +8 -0
- package/dist/types/bin/dev-portal/ContextSelector/index.d.ts +1 -0
- package/dist/types/bin/dev-portal/ContextSelector/useContextResolver.d.ts +15 -0
- package/dist/types/bin/dev-portal/FusionLogo.d.ts +0 -1
- package/dist/types/bin/dev-portal/PersonSideSheet/index.d.ts +4 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.d.ts +4 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/Styled.d.ts +4 -1088
- package/dist/types/bin/dev-portal/useAppContextNavigation.d.ts +5 -0
- package/dist/types/bin/publish-application.d.ts +6 -0
- package/dist/types/bin/tag-application.d.ts +12 -0
- package/dist/types/bin/upload-application.d.ts +6 -0
- package/dist/types/bin/upload-export-config.d.ts +10 -0
- package/dist/types/bin/utils/execute-command.d.ts +8 -0
- package/dist/types/bin/utils/format.d.ts +0 -1
- package/dist/types/bin/utils/getEndpointUrl.d.ts +10 -0
- package/dist/types/bin/utils/index.d.ts +14 -0
- package/dist/types/bin/utils/isAppRegistered.d.ts +5 -0
- package/dist/types/bin/utils/load-app-config.d.ts +3 -2
- package/dist/types/bin/utils/load-manifest.d.ts +3 -2
- package/dist/types/bin/utils/proxy-request-logger.d.ts +15 -0
- package/dist/types/bin/utils/publishAppConfig.d.ts +9 -0
- package/dist/types/bin/utils/requireToken.d.ts +4 -0
- package/dist/types/bin/utils/spinner.d.ts +1 -0
- package/dist/types/bin/utils/tagAppBundle.d.ts +7 -0
- package/dist/types/bin/utils/uploadAppBundle.d.ts +7 -0
- package/dist/types/lib/app-config.d.ts +14 -14
- package/dist/types/lib/app-manifest.d.ts +30 -14
- package/dist/types/lib/app-package.d.ts +35 -4
- package/dist/types/lib/index.d.ts +2 -5
- package/dist/types/lib/plugins/app-assets/app-asset-plugin.d.ts +36 -0
- package/dist/types/lib/plugins/app-assets/emit-asset.d.ts +18 -0
- package/dist/types/lib/plugins/app-assets/extension-filter-pattern.d.ts +14 -0
- package/dist/types/lib/plugins/app-assets/index.d.ts +3 -0
- package/dist/types/lib/plugins/app-assets/read-asset-content.d.ts +14 -0
- package/dist/types/lib/plugins/app-assets/resolve-asset-id.d.ts +16 -0
- package/dist/types/lib/plugins/app-assets/static.d.ts +5 -0
- package/dist/types/lib/plugins/app-proxy/app-proxy-plugin.d.ts +71 -0
- package/dist/types/lib/plugins/app-proxy/index.d.ts +1 -0
- package/dist/types/lib/plugins/external-public/external-public-plugin.d.ts +30 -0
- package/dist/types/lib/plugins/external-public/index.d.ts +1 -0
- package/dist/types/lib/utils/assert.d.ts +2 -1
- package/dist/types/lib/utils/config.d.ts +9 -6
- package/dist/types/lib/utils/expect.d.ts +1 -1
- package/dist/types/lib/vite-config.d.ts +1 -1
- package/dist/types/schemas.d.ts +30 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/package.json +52 -42
- package/dist/bin/bundle-widget.js +0 -61
- package/dist/bin/bundle-widget.js.map +0 -1
- package/dist/bin/create-export-manifest-widget.js +0 -68
- package/dist/bin/create-export-manifest-widget.js.map +0 -1
- package/dist/bin/dev-portal/ContextSelector.js +0 -107
- package/dist/bin/dev-portal/ContextSelector.js.map +0 -1
- package/dist/bin/dev-portal/usePersonResolver.js +0 -40
- package/dist/bin/dev-portal/usePersonResolver.js.map +0 -1
- package/dist/bin/dev-proxy.js +0 -90
- package/dist/bin/dev-proxy.js.map +0 -1
- package/dist/bin/main.widget.js +0 -78
- package/dist/bin/main.widget.js.map +0 -1
- package/dist/bin/public/assets/index-UrNngCGF.js +0 -4083
- package/dist/bin/utils/execute-commant.js.map +0 -1
- package/dist/bin/utils/load-dev-proxy.js +0 -56
- package/dist/bin/utils/load-dev-proxy.js.map +0 -1
- package/dist/bin/utils/load-widget-manifest.js +0 -35
- package/dist/bin/utils/load-widget-manifest.js.map +0 -1
- package/dist/bin/utils/load-widget-package.js +0 -24
- package/dist/bin/utils/load-widget-package.js.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/lib/dev-config.js +0 -9
- package/dist/lib/dev-config.js.map +0 -1
- package/dist/lib/widget-config.js +0 -57
- package/dist/lib/widget-config.js.map +0 -1
- package/dist/lib/widget-manifest.js +0 -73
- package/dist/lib/widget-manifest.js.map +0 -1
- package/dist/lib/widget-package.js +0 -33
- package/dist/lib/widget-package.js.map +0 -1
- package/dist/types/bin/bundle-widget.d.ts +0 -5
- package/dist/types/bin/create-export-manifest-widget.d.ts +0 -20
- package/dist/types/bin/dev-portal/ContextSelector.d.ts +0 -2
- package/dist/types/bin/dev-portal/usePersonResolver.d.ts +0 -1
- package/dist/types/bin/dev-proxy.d.ts +0 -39
- package/dist/types/bin/main.widget.d.ts +0 -3
- package/dist/types/bin/utils/execute-commant.d.ts +0 -8
- package/dist/types/bin/utils/load-dev-proxy.d.ts +0 -6
- package/dist/types/bin/utils/load-widget-manifest.d.ts +0 -8
- package/dist/types/bin/utils/load-widget-package.d.ts +0 -5
- package/dist/types/index.d.ts +0 -4
- package/dist/types/lib/dev-config.d.ts +0 -13
- package/dist/types/lib/widget-config.d.ts +0 -26
- package/dist/types/lib/widget-manifest.d.ts +0 -53
- package/dist/types/lib/widget-package.d.ts +0 -23
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FusionEnv } from './utils/index.js';
|
|
2
|
+
declare enum Tags {
|
|
3
|
+
preview = "preview",
|
|
4
|
+
latest = "latest"
|
|
5
|
+
}
|
|
6
|
+
export declare const tagApplication: (options: {
|
|
7
|
+
tag: keyof typeof Tags;
|
|
8
|
+
version: string;
|
|
9
|
+
env: FusionEnv;
|
|
10
|
+
service: string;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FusionEnv } from './utils/index.js';
|
|
2
|
+
import { ConfigExecuterEnv } from '../lib/utils/config.js';
|
|
3
|
+
export declare const uploadExportConfig: (options: {
|
|
4
|
+
command?: ConfigExecuterEnv["command"];
|
|
5
|
+
configFile: string;
|
|
6
|
+
version: string;
|
|
7
|
+
env: FusionEnv;
|
|
8
|
+
service: string;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
export default uploadExportConfig;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type FusionEnv = 'ci' | 'fqa' | 'tr' | 'fprd';
|
|
2
|
+
/**
|
|
3
|
+
* Retreive full endpoint URI to env in service-discovery
|
|
4
|
+
* @param endpoint <string> The endpoint to call in+ uri
|
|
5
|
+
* @param fusionEnv <FusionEnv> The Fusion env to get uri for
|
|
6
|
+
* @param service <string> Custom service uri to use insted of Fusion
|
|
7
|
+
* @param version <string> The version of the api to use
|
|
8
|
+
* @returns <string> The uri with endpoint
|
|
9
|
+
*/
|
|
10
|
+
export declare const getEndpointUrl: (endpoint: string, fusionEnv: FusionEnv, service: string, version?: string) => Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { getEndpointUrl } from './getEndpointUrl.js';
|
|
2
|
+
export type { FusionEnv } from './getEndpointUrl.js';
|
|
3
|
+
export { requireToken } from './requireToken.js';
|
|
4
|
+
export { isAppRegistered } from './isAppRegistered.js';
|
|
5
|
+
export { loadAppConfig } from './load-app-config.js';
|
|
6
|
+
export { loadAppManifest } from './load-manifest.js';
|
|
7
|
+
export { loadPackage } from './load-package.js';
|
|
8
|
+
export { loadViteConfig } from './load-vite-config.js';
|
|
9
|
+
export { formatPath, formatByteSize } from './format.js';
|
|
10
|
+
export { executeCommand } from './execute-command.js';
|
|
11
|
+
export { publishAppConfig } from './publishAppConfig.js';
|
|
12
|
+
export { tagAppBundle } from './tagAppBundle.js';
|
|
13
|
+
export { uploadAppBundle } from './uploadAppBundle.js';
|
|
14
|
+
export { Spinner } from './spinner.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ConfigExecuterEnv } from '../../lib/utils/config.js';
|
|
2
2
|
import { type ResolvedAppPackage } from '../../lib/app-package.js';
|
|
3
|
+
import { ApiAppConfig } from '../../schemas.js';
|
|
3
4
|
export declare const loadAppConfig: (env: ConfigExecuterEnv, pkg: ResolvedAppPackage, options?: {
|
|
4
5
|
file?: string;
|
|
5
6
|
}) => Promise<{
|
|
6
|
-
config:
|
|
7
|
-
path?: string
|
|
7
|
+
config: ApiAppConfig;
|
|
8
|
+
path?: string;
|
|
8
9
|
}>;
|
|
9
10
|
export default loadAppConfig;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
1
2
|
import { type ConfigExecuterEnv } from '../../lib/utils/config.js';
|
|
2
3
|
import { type ResolvedAppPackage } from '../../lib/app-package.js';
|
|
3
4
|
export declare const loadAppManifest: (env: ConfigExecuterEnv, pkg: ResolvedAppPackage, options?: {
|
|
4
5
|
file?: string;
|
|
5
6
|
}) => Promise<{
|
|
6
|
-
manifest:
|
|
7
|
-
path?: string
|
|
7
|
+
manifest: AppManifest;
|
|
8
|
+
path?: string;
|
|
8
9
|
}>;
|
|
9
10
|
export default loadAppManifest;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ClientRequest } from 'http';
|
|
2
|
+
/**
|
|
3
|
+
* Logs the status of a proxy request using a spinner.
|
|
4
|
+
*
|
|
5
|
+
* @param proxyReq - The proxy request to log.
|
|
6
|
+
*
|
|
7
|
+
* The function attaches event listeners to the proxy request to handle
|
|
8
|
+
* 'response' and 'error' events. It uses a spinner to indicate the status
|
|
9
|
+
* of the request:
|
|
10
|
+
* - On a successful response (status code < 400), the spinner succeeds.
|
|
11
|
+
* - On a response with a status code >= 400, the spinner warns with the status message.
|
|
12
|
+
* - On an error, the spinner fails.
|
|
13
|
+
*/
|
|
14
|
+
export declare const proxyRequestLogger: (proxyReq: ClientRequest) => void;
|
|
15
|
+
export default proxyRequestLogger;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApiAppConfig } from '../../schemas.js';
|
|
2
|
+
/**
|
|
3
|
+
* Publishes app config to the apps-service endpoint
|
|
4
|
+
* @param endpoint string The endpoint to upload to
|
|
5
|
+
* @param appKey The application key
|
|
6
|
+
* @param config Object with app config
|
|
7
|
+
* @returns HTTP response as json
|
|
8
|
+
*/
|
|
9
|
+
export declare const publishAppConfig: (endpoint: string, appKey: string, config: ApiAppConfig) => Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send request to apps-service to tag a bundle.
|
|
3
|
+
* @param endpoint string The endpoint to send request to.
|
|
4
|
+
* @param version string The version to tag the bundle with.
|
|
5
|
+
* @returns Response object as json.
|
|
6
|
+
*/
|
|
7
|
+
export declare const tagAppBundle: (endpoint: string, version: string) => Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function that uploads a zip bundle to the endpoint.
|
|
3
|
+
* @param endpoint string The endpoint to upload to
|
|
4
|
+
* @param bundle string The filename to upload
|
|
5
|
+
* @returns Object
|
|
6
|
+
*/
|
|
7
|
+
export declare const uploadAppBundle: (endpoint: string, bundle: string) => Promise<any>;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { type ResolvedConfig, type FindConfigOptions, ConfigExecuterEnv } from './utils/config.js';
|
|
2
|
-
import {
|
|
3
|
-
export type AppConfig = {
|
|
4
|
-
environment?: Record<string, unknown>;
|
|
5
|
-
endpoints?: Record<string, string>;
|
|
6
|
-
};
|
|
3
|
+
import { ApiAppConfig, ApiAppConfigSchema } from '../schemas.js';
|
|
7
4
|
type FindAppConfigOptions = FindConfigOptions & {
|
|
8
5
|
file?: string;
|
|
9
6
|
};
|
|
10
7
|
export type AppConfigFn = (env: ConfigExecuterEnv, args: {
|
|
11
|
-
base:
|
|
12
|
-
}) =>
|
|
13
|
-
export type AppConfigExport =
|
|
8
|
+
base: ApiAppConfig;
|
|
9
|
+
}) => z.input<typeof ApiAppConfigSchema> | Promise<z.input<typeof ApiAppConfigSchema> | void> | void;
|
|
10
|
+
export type AppConfigExport = ApiAppConfig | AppConfigFn;
|
|
14
11
|
export declare const appConfigFilename = "app.config";
|
|
15
|
-
export declare function assertAppConfig(value: AppConfig): asserts value;
|
|
16
12
|
export declare const defineAppConfig: (fn: AppConfigFn) => AppConfigFn;
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
13
|
+
export declare const loadAppConfig: (filename?: string) => Promise<import("./utils/config.js").ConfigExecuter<{
|
|
14
|
+
environment: Record<string, any>;
|
|
15
|
+
endpoints?: Record<string, {
|
|
16
|
+
url: string;
|
|
17
|
+
scopes: string[];
|
|
18
|
+
}> | undefined;
|
|
19
|
+
}, import("./utils/config.js").ConfigExecuterArgs>>;
|
|
19
20
|
export declare const resolveAppConfig: (options?: FindConfigOptions & {
|
|
20
21
|
file?: string;
|
|
21
22
|
}) => Promise<ResolvedConfig<AppConfigFn> | void>;
|
|
22
|
-
export declare const
|
|
23
|
-
|
|
24
|
-
config: AppConfig;
|
|
23
|
+
export declare const createAppConfig: (env: ConfigExecuterEnv, base: ApiAppConfig, options?: FindAppConfigOptions) => Promise<{
|
|
24
|
+
config: ApiAppConfig;
|
|
25
25
|
path?: string;
|
|
26
26
|
}>;
|
|
27
27
|
export {};
|
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
import { ResolvedAppPackage } from './app-package.js';
|
|
2
2
|
import { type FindConfigOptions, type ResolvedConfig, ConfigExecuterEnv } from './utils/config.js';
|
|
3
3
|
import { RecursivePartial } from './utils/types.js';
|
|
4
|
-
|
|
5
|
-
version: string;
|
|
6
|
-
key: string;
|
|
7
|
-
entry: string;
|
|
8
|
-
name: string;
|
|
9
|
-
shortName: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
admins?: string[];
|
|
12
|
-
owners?: string[];
|
|
13
|
-
main?: string;
|
|
14
|
-
icon?: string;
|
|
15
|
-
resource?: string[];
|
|
16
|
-
};
|
|
4
|
+
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
17
5
|
export type AppManifestFn = (env: ConfigExecuterEnv, args: {
|
|
18
6
|
base: AppManifest;
|
|
19
|
-
}) => AppManifest | Promise<AppManifest
|
|
7
|
+
}) => Partial<AppManifest> | Promise<Partial<AppManifest> | void> | void;
|
|
20
8
|
type FindManifestOptions = FindConfigOptions & {
|
|
21
9
|
file?: string;
|
|
22
10
|
};
|
|
11
|
+
/** base filename for configuration files */
|
|
23
12
|
export declare const manifestConfigFilename = "app.manifest.config";
|
|
13
|
+
/**
|
|
14
|
+
* Define a manifest for an application
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* export default defineAppManifest(async() => {
|
|
19
|
+
* return {
|
|
20
|
+
* ...AppManifest_properties
|
|
21
|
+
* }
|
|
22
|
+
* })
|
|
23
|
+
* ```
|
|
24
|
+
* @param fnOrObj - defines the manifest as an object or callback
|
|
25
|
+
*/
|
|
24
26
|
export declare const defineAppManifest: (fn: AppManifestFn) => AppManifestFn;
|
|
25
27
|
export declare function assertAppManifest(value: AppManifest): asserts value;
|
|
28
|
+
/**
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* export default defineAppManifest(base) => mergeManifests(base, {prop: value});
|
|
32
|
+
* ```
|
|
33
|
+
* @param base base manifest to merge with
|
|
34
|
+
* @param overrides target manifest to apply to base
|
|
35
|
+
* @returns deep merged manifest
|
|
36
|
+
*/
|
|
26
37
|
export declare const mergeManifests: (base: RecursivePartial<AppManifest>, overrides: RecursivePartial<AppManifest>) => AppManifest;
|
|
38
|
+
/** loads manifestFn from file */
|
|
27
39
|
export declare const loadManifest: (filename?: string) => Promise<import("./utils/config.js").ConfigExecuter<AppManifest, import("./utils/config.js").ConfigExecuterArgs>>;
|
|
40
|
+
/**
|
|
41
|
+
* tries to resolve manifest
|
|
42
|
+
* @see {@link resolveConfig | resolving config}
|
|
43
|
+
*/
|
|
28
44
|
export declare const resolveManifest: (options?: FindConfigOptions & {
|
|
29
45
|
file?: string;
|
|
30
46
|
}) => Promise<ResolvedConfig<AppManifestFn> | void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PackageJson, type NormalizeOptions as ResolveAppPackageOptions } from 'read-package-up';
|
|
2
|
-
import { AppManifest } from '
|
|
2
|
+
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
3
3
|
export type AppPackageJson = PackageJson & {
|
|
4
4
|
manifest?: AppManifest;
|
|
5
5
|
};
|
|
@@ -16,8 +16,39 @@ export type ResolvedAppPackage = {
|
|
|
16
16
|
path: string;
|
|
17
17
|
};
|
|
18
18
|
export declare function defineAppPackage(fnOrObject: DefinePackageExporter): DefinePackageExporter;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Resolves the entry point of a given package.
|
|
21
|
+
*
|
|
22
|
+
* This function attempts to find the entry point of a package by checking several
|
|
23
|
+
* common properties in the package's `package.json` file, such as `entrypoint`, `main`,
|
|
24
|
+
* and `module`. If none of these properties are found, it defaults to checking for
|
|
25
|
+
* common entry files like `src/index.ts`, `src/index.tsx`, `src/index.js`, and `src/index.jsx`.
|
|
26
|
+
*
|
|
27
|
+
* @param pkg - The resolved application package containing the package.json and path information.
|
|
28
|
+
* @returns The relative path to the resolved entry point.
|
|
29
|
+
* @throws Will throw an error if no entry point can be resolved.
|
|
30
|
+
*/
|
|
31
|
+
export declare const resolveEntryPoint: (packageJson: PackageJson, pkgPath?: string) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the application key from the given package.json object.
|
|
34
|
+
*
|
|
35
|
+
* @param packageJson - An object containing the 'name' property from the package.json.
|
|
36
|
+
* @returns The resolved application key, which is the package name with any leading '@' or scope removed.
|
|
37
|
+
* @throws Will throw an error if the 'name' property is not present in the packageJson.
|
|
38
|
+
*/
|
|
39
|
+
export declare const resolveAppKey: (packageJson: Pick<PackageJson, "name">) => string;
|
|
40
|
+
/**
|
|
41
|
+
* Asserts the validity of a given package by resolving its application key and entry point.
|
|
42
|
+
*
|
|
43
|
+
* @param pkg - A partial representation of the application's package JSON.
|
|
44
|
+
*/
|
|
45
|
+
export declare const assertPackage: (pkg: Partial<AppPackageJson>) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Resolves the application package by searching for the nearest `package.json` file.
|
|
48
|
+
*
|
|
49
|
+
* @param options - Optional parameters to customize the search behavior.
|
|
50
|
+
* @returns A promise that resolves to the found package information.
|
|
51
|
+
* @throws Will throw an error if the `package.json` file is not found.
|
|
52
|
+
*/
|
|
22
53
|
export declare const resolveAppPackage: (options?: ResolveAppPackageOptions) => Promise<ResolvedAppPackage>;
|
|
23
54
|
export default resolveAppPackage;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export { mergeManifests, defineAppManifest, type
|
|
2
|
-
export {
|
|
1
|
+
export { mergeManifests, defineAppManifest, type AppManifestFn } from './app-manifest.js';
|
|
2
|
+
export { defineAppConfig, type AppConfigFn, type AppConfigExport } from './app-config.js';
|
|
3
3
|
export { defineAppPackage, resolveAppKey, resolveEntryPoint, type AppPackageJson, type ResolvedAppPackage, } from './app-package.js';
|
|
4
|
-
export { mergeWidgetManifests, defineWidgetManifest, createWidgetManifest, type WidgetManifest, type WidgetManifestFn, } from './widget-manifest.js';
|
|
5
|
-
export { mergeWidgetConfigs, defineWidgetConfig, type WidgetConfig, type WidgetConfigFn, type WidgetConfigExport, } from './widget-config.js';
|
|
6
|
-
export { createDevConfig, type AppConfig as ProxyConfig } from './dev-config.js';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type FilterPattern, type Plugin } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* A Vite plugin to handle external resources in a library build.
|
|
4
|
+
*
|
|
5
|
+
* @param options - Configuration options for the plugin.
|
|
6
|
+
* @param options.name - Optional name for the emitted assets.
|
|
7
|
+
* @param options.include - Filter pattern to include specific files.
|
|
8
|
+
* @param options.exclude - Filter pattern to exclude specific files.
|
|
9
|
+
* @returns A Vite plugin object.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This plugin is intended to be used only during the Vite library build process.
|
|
13
|
+
* It resolves asset IDs, emits assets, and exports them as URLs.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // vite.config.ts
|
|
18
|
+
* import { ExternalAppAssetPlugin } from '@equinor/fusion-framework-cli/plugins/app-assets-plugin';
|
|
19
|
+
*
|
|
20
|
+
* export default {
|
|
21
|
+
* plugins: [
|
|
22
|
+
* ExternalAppAssetPlugin({
|
|
23
|
+
* name: 'my-asset',
|
|
24
|
+
* include: ['svg', 'png'],
|
|
25
|
+
* exclude: 'node_modules/**',
|
|
26
|
+
* }),
|
|
27
|
+
* ],
|
|
28
|
+
* };
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const AppAssetExportPlugin: (options?: {
|
|
32
|
+
name?: string;
|
|
33
|
+
include?: FilterPattern;
|
|
34
|
+
exclude?: FilterPattern;
|
|
35
|
+
}) => Plugin;
|
|
36
|
+
export default AppAssetExportPlugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PluginContext } from 'rollup';
|
|
2
|
+
/**
|
|
3
|
+
* Synchronously emits an asset file based on the provided context and options.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The plugin context used for emitting the file and logging warnings.
|
|
6
|
+
* @param id - The identifier of the asset, which may include a resource query.
|
|
7
|
+
* @param options - Optional parameters for customizing the emitted asset.
|
|
8
|
+
* @param options.name - The name template for the emitted asset file. Defaults to '[name].[ext]'.
|
|
9
|
+
* @param options.outDir - The output directory where the asset will be emitted. Defaults to 'dist'.
|
|
10
|
+
* @param options.assetsDir - The directory within the output directory where assets will be stored. Defaults to 'assets'.
|
|
11
|
+
* @returns The path of the emitted asset relative to the assets directory, or null if the asset content could not be read.
|
|
12
|
+
*/
|
|
13
|
+
export declare const emitAssetSync: (context: PluginContext, id: string, options?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
outDir?: string;
|
|
16
|
+
assetsDir?: string;
|
|
17
|
+
}) => string | null;
|
|
18
|
+
export default emitAssetSync;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a regular expression pattern to filter files based on their extensions.
|
|
3
|
+
*
|
|
4
|
+
* @param exts - An array of file extensions to include in the pattern.
|
|
5
|
+
* @returns A RegExp object that matches files with the specified extensions.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const pattern = createExtensionFilterPattern(['.js', '.ts']);
|
|
10
|
+
* console.log(pattern); // Output: /\.(js|ts)(\?.*)?$/
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const createExtensionFilterPattern: (exts: string[]) => RegExp;
|
|
14
|
+
export default createExtensionFilterPattern;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the content of an asset synchronously.
|
|
3
|
+
*
|
|
4
|
+
* @param id - The identifier of the asset, which can include a query string.
|
|
5
|
+
* @returns The content of the asset as a Buffer if it exists, otherwise null.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* - If the asset content is already cached, it returns the cached content.
|
|
9
|
+
* - The function extracts the filename from the identifier by removing any query string.
|
|
10
|
+
* - If the file exists, it reads the content, caches it, and then returns it.
|
|
11
|
+
* - If the file does not exist, it logs a warning and returns null.
|
|
12
|
+
*/
|
|
13
|
+
export declare const readAssetContentSync: (id: string) => Buffer | null;
|
|
14
|
+
export default readAssetContentSync;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PluginContext, type PartialResolvedId } from 'rollup';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the asset ID based on the provided context, ID, importer, and options.
|
|
4
|
+
*
|
|
5
|
+
* @param context - The plugin context used for resolving the ID.
|
|
6
|
+
* @param id - The asset ID to resolve.
|
|
7
|
+
* @param importer - The path of the module that is importing the asset.
|
|
8
|
+
* @param options - Optional resolution options.
|
|
9
|
+
* @returns A promise that resolves to a `PartialResolvedId` object or `null`.
|
|
10
|
+
*
|
|
11
|
+
* The function handles three cases:
|
|
12
|
+
* 1. If the ID is an absolute path, it returns an object with the ID, marked as external and resolved by the plugin.
|
|
13
|
+
* 2. If the ID is a relative path, it resolves the path relative to the importer and returns an object with the resolved ID, marked as external and resolved by the plugin.
|
|
14
|
+
* 3. For all other cases, it delegates the resolution to the context's resolve method.
|
|
15
|
+
*/
|
|
16
|
+
export declare const resolveAssetId: (context: PluginContext, id: string, importer: string, options?: Parameters<PluginContext["resolve"]>[2]) => Promise<PartialResolvedId | null>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
import { AppManifest } from '@equinor/fusion-framework-app';
|
|
3
|
+
import { ClientRequest, IncomingMessage, ServerResponse } from 'node:http';
|
|
4
|
+
import { ApiAppConfig } from '../../../schemas.js';
|
|
5
|
+
/**
|
|
6
|
+
* Options for configuring the App Proxy Plugin.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* When not providing an app configuration, the plugin will only proxy requests to the target.
|
|
10
|
+
*/
|
|
11
|
+
export type AppProxyPluginOptions = {
|
|
12
|
+
/** Configuration for the proxy. */
|
|
13
|
+
proxy: {
|
|
14
|
+
/** The path to be proxied. */
|
|
15
|
+
path: string;
|
|
16
|
+
/** The target URL for the proxy. */
|
|
17
|
+
target: string;
|
|
18
|
+
/** Optional callback function to modify the proxy request. */
|
|
19
|
+
onProxyReq?: (proxyReq: ClientRequest, req: IncomingMessage, res: ServerResponse) => void;
|
|
20
|
+
};
|
|
21
|
+
/** Optional configuration for the app. */
|
|
22
|
+
app?: {
|
|
23
|
+
/** application key */
|
|
24
|
+
key: string;
|
|
25
|
+
/** application version */
|
|
26
|
+
version: string;
|
|
27
|
+
/** callback function for generating configuration for the application */
|
|
28
|
+
generateConfig: () => Promise<ApiAppConfig>;
|
|
29
|
+
/** callback function for generating manifest for the application */
|
|
30
|
+
generateManifest: () => Promise<AppManifest>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The `appProxyPlugin` function creates a Vite plugin that configures a proxy for API and bundle requests
|
|
35
|
+
* to the Fusion apps backend. It also serves the app manifest, config, and local bundles if an app is provided.
|
|
36
|
+
*
|
|
37
|
+
* @param {AppProxyPluginOptions} options - The options for configuring the app proxy plugin.
|
|
38
|
+
*
|
|
39
|
+
* @returns {Plugin} - The configured Vite plugin.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const plugin = appProxyPlugin({
|
|
44
|
+
* proxy: {
|
|
45
|
+
* path: '/app-proxy',
|
|
46
|
+
* target: 'https://fusion-s-apps-ci.azurewebsites.net/',
|
|
47
|
+
* onProxyReq: (proxyReq, req, res) => {
|
|
48
|
+
* proxyReq.on('response', (res) => { console.log(res.statusCode) });
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* app: {
|
|
52
|
+
* key: 'my-app',
|
|
53
|
+
* version: '1.0.0',
|
|
54
|
+
* generateConfig: async () => ({}),
|
|
55
|
+
* generateManifest: async () => ({}),
|
|
56
|
+
* },
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // api calls
|
|
60
|
+
* fetch('/app-proxy/apps/my-app/builds/1.0.0/config'); // will generate app config by provided function
|
|
61
|
+
* fetch('/app-proxy/apps/my-app/builds/0.0.9/config'); // will proxy to the target, since version does not match
|
|
62
|
+
* fetch('/app-proxy/apps/other-app/builds/1.0.0/config'); // will proxy to the target, since app key does not match
|
|
63
|
+
*
|
|
64
|
+
* // asset calls
|
|
65
|
+
* fetch('/app-proxy/bundles/my-app/builds/1.0.0/index.js'); // will generate bundle by provided function
|
|
66
|
+
* fetch('/app-proxy/bundles/my-app/builds/0.0.9/index.js'); // will proxy to the target, since version does not match
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
export declare const appProxyPlugin: (options: AppProxyPluginOptions) => Plugin;
|
|
71
|
+
export default appProxyPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, appProxyPlugin, type AppProxyPluginOptions } from './app-proxy-plugin.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type FilterPattern, type Plugin } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a plugin that serves an external public directory.
|
|
4
|
+
*
|
|
5
|
+
* This plugin is useful when you want to serve a static site from a different directory than the one where the Vite server is running.
|
|
6
|
+
* Vite`s built in `mode: 'spa'` will only look for the `index.html` file in the configured `root` directory,
|
|
7
|
+
* so this plugin is necessary to serve the `index.html` file from a different directory.
|
|
8
|
+
*
|
|
9
|
+
* @param path - The path to the external public directory.
|
|
10
|
+
* @param options - Optional filter patterns to include or exclude specific assets.
|
|
11
|
+
* @param options.include - A filter pattern to include specific assets.
|
|
12
|
+
* @param options.exclude - A filter pattern to exclude specific assets.
|
|
13
|
+
* @returns A Vite plugin object.
|
|
14
|
+
*
|
|
15
|
+
* The plugin:
|
|
16
|
+
* - Sets the `path` configuration to the provided path.
|
|
17
|
+
* - Adds a middleware to the server that serves static assets from the specified path.
|
|
18
|
+
* - Adds a middleware to the server that serves the `index.html` file from the specified path.
|
|
19
|
+
*
|
|
20
|
+
* The middleware:
|
|
21
|
+
* - Checks if the request is for a static asset and serves it from the specified path.
|
|
22
|
+
* - Reads the `index.html` file from the specified path.
|
|
23
|
+
* - Transforms the HTML using the server's `transformIndexHtml` method.
|
|
24
|
+
* - Responds with the transformed HTML, setting appropriate headers.
|
|
25
|
+
*/
|
|
26
|
+
export declare const externalPublicPlugin: (path: string, options?: {
|
|
27
|
+
include?: FilterPattern;
|
|
28
|
+
exclude?: FilterPattern;
|
|
29
|
+
}) => Plugin;
|
|
30
|
+
export default externalPublicPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, externalPublicPlugin } from './external-public-plugin.js';
|
|
@@ -3,7 +3,8 @@ export { assert, AssertionError };
|
|
|
3
3
|
export declare function assertNumber(value: unknown, message?: string): asserts value;
|
|
4
4
|
export declare function assertObject(value: object, message?: string | Error): asserts value;
|
|
5
5
|
declare function assertObjectEntryValue<P>(value: unknown, prop: P, message?: string): asserts value;
|
|
6
|
-
export declare function assertObjectEntries<T extends object, P extends Array<keyof T>>(
|
|
6
|
+
export declare function assertObjectEntries<T extends object, P extends Array<keyof T>>(// extends Record<string, unknown> = unknown>(
|
|
7
|
+
value: T, options?: {
|
|
7
8
|
props?: P;
|
|
8
9
|
assertion?: typeof assertObjectEntryValue;
|
|
9
10
|
preMessage?: string;
|
|
@@ -8,12 +8,12 @@ export type ResolveConfigOptions = {
|
|
|
8
8
|
find?: FindConfigOptions;
|
|
9
9
|
};
|
|
10
10
|
export type ConfigExecuterEnv = {
|
|
11
|
+
/** cli command */
|
|
11
12
|
command: 'serve' | 'build';
|
|
13
|
+
/** cli mode */
|
|
12
14
|
mode: string;
|
|
15
|
+
/** root of the package */
|
|
13
16
|
root?: string;
|
|
14
|
-
widget?: boolean;
|
|
15
|
-
port?: number;
|
|
16
|
-
outputFileName?: string;
|
|
17
17
|
};
|
|
18
18
|
export type ConfigExecuterArgs = [ConfigExecuterEnv, ...any[]];
|
|
19
19
|
export type ConfigExecuter<TType = any, TArgs extends ConfigExecuterArgs = ConfigExecuterArgs> = (...args: TArgs) => TType | Promise<TType>;
|
|
@@ -22,8 +22,11 @@ export type ResolvedConfig<TType extends ConfigExecuter> = {
|
|
|
22
22
|
path: string;
|
|
23
23
|
config: TType;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* @param filename name if config file without extension
|
|
27
|
+
*/
|
|
25
28
|
export declare const findConfigs: (filename: string, options?: FindConfigOptions) => Promise<string[]>;
|
|
26
|
-
export declare const resolveConfig: <TType>(filename: string, options?: ResolveConfigOptions) => Promise<
|
|
27
|
-
export declare const loadConfig: <TType>(file: string) => Promise<ConfigExecuter<TType
|
|
28
|
-
export declare function initiateConfig<TConfig extends ConfigExecuter>(config: TConfig, ...args: Parameters<TConfig>): Promise<ConfigExecuterType<TConfig
|
|
29
|
+
export declare const resolveConfig: <TType>(filename: string, options?: ResolveConfigOptions) => Promise<ResolvedConfig<ConfigExecuter<TType>> | void>;
|
|
30
|
+
export declare const loadConfig: <TType>(file: string) => Promise<ConfigExecuter<TType>>;
|
|
31
|
+
export declare function initiateConfig<TConfig extends ConfigExecuter>(config: TConfig, ...args: Parameters<TConfig>): Promise<ConfigExecuterType<TConfig> | void>;
|
|
29
32
|
export default loadConfig;
|
|
@@ -8,7 +8,7 @@ export declare const resolveViteConfig: (options?: FindConfigOptions & {
|
|
|
8
8
|
export declare const createAppViteConfig: (env: ConfigExecuterEnv, options?: FindConfigOptions & {
|
|
9
9
|
file?: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
config
|
|
11
|
+
config?: UserConfig;
|
|
12
12
|
path?: string;
|
|
13
13
|
} | void>;
|
|
14
14
|
export declare const resolveEntryPoint: (cwd?: string, dir?: string, opt?: {
|