@teambit/application 1.0.225 → 1.0.227
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_harmony_application-preview.js +1 -1
- package/artifacts/schema.json +135 -688
- package/dist/{preview-1712546198033.js → preview-1712719054377.js} +2 -2
- package/package.json +13 -13
- package/tsconfig.json +34 -1
- package/dist/app-build-context.d.ts +0 -26
- package/dist/app-build-result.d.ts +0 -22
- package/dist/app-context.d.ts +0 -103
- package/dist/app-deploy-context.d.ts +0 -33
- package/dist/app-instance.d.ts +0 -35
- package/dist/app-list.cmd.d.ts +0 -18
- package/dist/app-server.d.ts +0 -6
- package/dist/app-type-list.d.ts +0 -13
- package/dist/app-type.plugin.d.ts +0 -12
- package/dist/app.cmd.d.ts +0 -25
- package/dist/app.plugin.d.ts +0 -10
- package/dist/application-type.d.ts +0 -15
- package/dist/application.aspect.d.ts +0 -2
- package/dist/application.composition.d.ts +0 -1
- package/dist/application.d.ts +0 -33
- package/dist/application.main.runtime.d.ts +0 -153
- package/dist/application.service.d.ts +0 -15
- package/dist/apps-env-type.d.ts +0 -8
- package/dist/build-application.task.d.ts +0 -40
- package/dist/deploy.task.d.ts +0 -16
- package/dist/deployment-provider.d.ts +0 -4
- package/dist/exceptions/app-no-ssr.d.ts +0 -3
- package/dist/exceptions/app-not-found.d.ts +0 -3
- package/dist/exceptions/index.d.ts +0 -1
- package/dist/index.d.ts +0 -13
- package/dist/run.cmd.d.ts +0 -35
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.227/dist/application.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.227/dist/application.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/application",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.227",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/application",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "application",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.227"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
"@teambit/lane-id": "0.0.311",
|
|
16
16
|
"@teambit/harmony": "0.4.6",
|
|
17
17
|
"@teambit/bit-error": "0.0.404",
|
|
18
|
-
"@teambit/builder": "1.0.
|
|
19
|
-
"@teambit/component": "1.0.
|
|
20
|
-
"@teambit/isolator": "1.0.
|
|
21
|
-
"@teambit/envs": "1.0.
|
|
22
|
-
"@teambit/logger": "0.0.
|
|
18
|
+
"@teambit/builder": "1.0.227",
|
|
19
|
+
"@teambit/component": "1.0.227",
|
|
20
|
+
"@teambit/isolator": "1.0.227",
|
|
21
|
+
"@teambit/envs": "1.0.227",
|
|
22
|
+
"@teambit/logger": "0.0.953",
|
|
23
23
|
"@teambit/cli-table": "0.0.48",
|
|
24
|
-
"@teambit/cli": "0.0.
|
|
25
|
-
"@teambit/aspect-loader": "1.0.
|
|
26
|
-
"@teambit/scope": "1.0.
|
|
27
|
-
"@teambit/watcher": "1.0.
|
|
28
|
-
"@teambit/workspace": "1.0.
|
|
24
|
+
"@teambit/cli": "0.0.860",
|
|
25
|
+
"@teambit/aspect-loader": "1.0.227",
|
|
26
|
+
"@teambit/scope": "1.0.227",
|
|
27
|
+
"@teambit/watcher": "1.0.227",
|
|
28
|
+
"@teambit/workspace": "1.0.227"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/lodash": "4.14.165",
|
|
32
32
|
"@types/mocha": "9.1.0",
|
|
33
33
|
"chai": "4.3.0",
|
|
34
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
34
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.30"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
23
|
+
"noImplicitAny": false,
|
|
24
|
+
"composite": true
|
|
24
25
|
},
|
|
25
26
|
"exclude": [
|
|
26
27
|
"artifacts",
|
|
@@ -35,5 +36,37 @@
|
|
|
35
36
|
"include": [
|
|
36
37
|
"**/*",
|
|
37
38
|
"**/*.json"
|
|
39
|
+
],
|
|
40
|
+
"references": [
|
|
41
|
+
{
|
|
42
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.227"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component@1.0.227"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_isolator@1.0.227"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.envs_envs@1.0.227"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_aspect-loader@1.0.227"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_scope@1.0.227"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_watcher@1.0.227"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.227"
|
|
70
|
+
}
|
|
38
71
|
]
|
|
39
72
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Component } from '@teambit/component';
|
|
2
|
-
import { Capsule, Network } from '@teambit/isolator';
|
|
3
|
-
import { BuildContext, PipeName, TaskResults } from '@teambit/builder';
|
|
4
|
-
import { LaneId } from '@teambit/lane-id';
|
|
5
|
-
import { AppContext } from './app-context';
|
|
6
|
-
export type AppBuildContextCreate = {
|
|
7
|
-
appContext: AppContext;
|
|
8
|
-
buildContext: BuildContext;
|
|
9
|
-
name: string;
|
|
10
|
-
appComponent: Component;
|
|
11
|
-
artifactsDir: string;
|
|
12
|
-
capsule: Capsule;
|
|
13
|
-
};
|
|
14
|
-
export declare class AppBuildContext extends AppContext implements BuildContext {
|
|
15
|
-
readonly appContext: AppContext;
|
|
16
|
-
readonly capsuleNetwork: Network;
|
|
17
|
-
readonly previousTasksResults: TaskResults[];
|
|
18
|
-
readonly pipeName: PipeName;
|
|
19
|
-
readonly capsule: Capsule;
|
|
20
|
-
readonly name: string;
|
|
21
|
-
readonly appComponent: Component;
|
|
22
|
-
readonly artifactsDir: string;
|
|
23
|
-
readonly laneId?: LaneId | undefined;
|
|
24
|
-
constructor(appContext: AppContext, capsuleNetwork: Network, previousTasksResults: TaskResults[], pipeName: PipeName, capsule: Capsule, name: string, appComponent: Component, artifactsDir: string, laneId?: LaneId | undefined);
|
|
25
|
-
static create({ name, capsule, appComponent, artifactsDir, appContext, buildContext }: AppBuildContextCreate): AppBuildContext;
|
|
26
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ArtifactDefinition } from '@teambit/builder';
|
|
2
|
-
export interface AppBuildResult {
|
|
3
|
-
artifacts?: ArtifactDefinition[];
|
|
4
|
-
/**
|
|
5
|
-
* errors thrown during the build process.
|
|
6
|
-
*/
|
|
7
|
-
errors?: Error[];
|
|
8
|
-
/**
|
|
9
|
-
* warnings thrown during the build process.
|
|
10
|
-
*/
|
|
11
|
-
warnings?: string[];
|
|
12
|
-
/**
|
|
13
|
-
* metadata to persist.
|
|
14
|
-
* this is the only property that actually gets saved into the objects (in builder aspect, aspectsData.buildDeployContexts[deployContext]).
|
|
15
|
-
* in some scenarios, the build and deploy pipelines run in different processes, and then the only data the deploy
|
|
16
|
-
* gets is what saved into the objects.
|
|
17
|
-
* examples of data that gets save here:
|
|
18
|
-
* React: { publicDir, ssrPublicDir }.
|
|
19
|
-
* Node: { mainFile, artifactsDir }.
|
|
20
|
-
*/
|
|
21
|
-
metadata?: Record<string, any>;
|
|
22
|
-
}
|
package/dist/app-context.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { ExecutionContext } from '@teambit/envs';
|
|
2
|
-
import { Harmony } from '@teambit/harmony';
|
|
3
|
-
import { Component } from '@teambit/component';
|
|
4
|
-
import { Logger } from '@teambit/logger';
|
|
5
|
-
export declare class AppContext extends ExecutionContext {
|
|
6
|
-
/**
|
|
7
|
-
* name of the app
|
|
8
|
-
*/
|
|
9
|
-
readonly appName: string;
|
|
10
|
-
/**
|
|
11
|
-
* instance of harmony.
|
|
12
|
-
*/
|
|
13
|
-
readonly harmony: Harmony;
|
|
14
|
-
/**
|
|
15
|
-
* determine whether to serve the application in dev mode.
|
|
16
|
-
*/
|
|
17
|
-
readonly dev: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* application component instance.
|
|
20
|
-
*/
|
|
21
|
-
readonly appComponent: Component;
|
|
22
|
-
/**
|
|
23
|
-
* working directory of the component.
|
|
24
|
-
*/
|
|
25
|
-
readonly workdir: string;
|
|
26
|
-
/**
|
|
27
|
-
* execution context of the app.
|
|
28
|
-
*/
|
|
29
|
-
readonly execContext: ExecutionContext;
|
|
30
|
-
/**
|
|
31
|
-
* A path for the host root dir
|
|
32
|
-
* Host root dir is the dir where we run the app from
|
|
33
|
-
* This can be used in different bundle options which run require.resolve
|
|
34
|
-
* for example when configuring webpack aliases or webpack expose loader on the peers deps
|
|
35
|
-
*/
|
|
36
|
-
readonly hostRootDir?: string | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* A port to run the app on
|
|
39
|
-
*/
|
|
40
|
-
readonly port?: number | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* path to the application component in the workspace
|
|
43
|
-
*/
|
|
44
|
-
readonly workspaceComponentPath?: string | undefined;
|
|
45
|
-
/**
|
|
46
|
-
* list of env variables to include.
|
|
47
|
-
*/
|
|
48
|
-
readonly envVariables: Record<string, string>;
|
|
49
|
-
constructor(
|
|
50
|
-
/**
|
|
51
|
-
* name of the app
|
|
52
|
-
*/
|
|
53
|
-
appName: string,
|
|
54
|
-
/**
|
|
55
|
-
* instance of harmony.
|
|
56
|
-
*/
|
|
57
|
-
harmony: Harmony,
|
|
58
|
-
/**
|
|
59
|
-
* determine whether to serve the application in dev mode.
|
|
60
|
-
*/
|
|
61
|
-
dev: boolean,
|
|
62
|
-
/**
|
|
63
|
-
* application component instance.
|
|
64
|
-
*/
|
|
65
|
-
appComponent: Component,
|
|
66
|
-
/**
|
|
67
|
-
* working directory of the component.
|
|
68
|
-
*/
|
|
69
|
-
workdir: string,
|
|
70
|
-
/**
|
|
71
|
-
* execution context of the app.
|
|
72
|
-
*/
|
|
73
|
-
execContext: ExecutionContext,
|
|
74
|
-
/**
|
|
75
|
-
* A path for the host root dir
|
|
76
|
-
* Host root dir is the dir where we run the app from
|
|
77
|
-
* This can be used in different bundle options which run require.resolve
|
|
78
|
-
* for example when configuring webpack aliases or webpack expose loader on the peers deps
|
|
79
|
-
*/
|
|
80
|
-
hostRootDir?: string | undefined,
|
|
81
|
-
/**
|
|
82
|
-
* A port to run the app on
|
|
83
|
-
*/
|
|
84
|
-
port?: number | undefined,
|
|
85
|
-
/**
|
|
86
|
-
* path to the application component in the workspace
|
|
87
|
-
*/
|
|
88
|
-
workspaceComponentPath?: string | undefined,
|
|
89
|
-
/**
|
|
90
|
-
* list of env variables to include.
|
|
91
|
-
*/
|
|
92
|
-
envVariables?: Record<string, string>);
|
|
93
|
-
/**
|
|
94
|
-
* return a logger instance for the env.
|
|
95
|
-
*/
|
|
96
|
-
createLogger(name?: string): Logger;
|
|
97
|
-
/**
|
|
98
|
-
* get an instance of an aspect.
|
|
99
|
-
* make sure it is loaded prior to requesting it.
|
|
100
|
-
*/
|
|
101
|
-
getAspect<T>(aspectId: string): T | undefined;
|
|
102
|
-
static compose(appContext: AppContext, overrides?: Partial<AppContext>): AppContext;
|
|
103
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Artifact, ArtifactList } from '@teambit/builder';
|
|
2
|
-
import { AppBuildContext } from './app-build-context';
|
|
3
|
-
export declare class AppDeployContext extends AppBuildContext {
|
|
4
|
-
/**
|
|
5
|
-
* artifacts generated upon component build.
|
|
6
|
-
*/
|
|
7
|
-
readonly artifacts: ArtifactList<Artifact>;
|
|
8
|
-
/**
|
|
9
|
-
* public dir generated by the build.
|
|
10
|
-
*/
|
|
11
|
-
readonly publicDir?: string | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* ssr dir generated by the build.
|
|
14
|
-
*/
|
|
15
|
-
readonly ssrPublicDir?: string | undefined;
|
|
16
|
-
constructor(
|
|
17
|
-
/**
|
|
18
|
-
* app build context.
|
|
19
|
-
*/
|
|
20
|
-
appBuildContext: AppBuildContext,
|
|
21
|
-
/**
|
|
22
|
-
* artifacts generated upon component build.
|
|
23
|
-
*/
|
|
24
|
-
artifacts: ArtifactList<Artifact>,
|
|
25
|
-
/**
|
|
26
|
-
* public dir generated by the build.
|
|
27
|
-
*/
|
|
28
|
-
publicDir?: string | undefined,
|
|
29
|
-
/**
|
|
30
|
-
* ssr dir generated by the build.
|
|
31
|
-
*/
|
|
32
|
-
ssrPublicDir?: string | undefined);
|
|
33
|
-
}
|
package/dist/app-instance.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export type ApplicationInstance = {
|
|
2
|
-
/**
|
|
3
|
-
* port in which app is running.
|
|
4
|
-
*/
|
|
5
|
-
port?: number;
|
|
6
|
-
/**
|
|
7
|
-
* name of the app
|
|
8
|
-
*/
|
|
9
|
-
appName?: string;
|
|
10
|
-
/**
|
|
11
|
-
* url of the running app.
|
|
12
|
-
*/
|
|
13
|
-
url?: string;
|
|
14
|
-
/**
|
|
15
|
-
* function for closing the server.
|
|
16
|
-
*/
|
|
17
|
-
stop?: () => Promise<void>;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* an instance of an application deployment.
|
|
21
|
-
*/
|
|
22
|
-
export type ApplicationDeployment = {
|
|
23
|
-
/**
|
|
24
|
-
* timestamp of the deployment.
|
|
25
|
-
*/
|
|
26
|
-
timestamp?: string;
|
|
27
|
-
/**
|
|
28
|
-
* name of the deployed app.
|
|
29
|
-
*/
|
|
30
|
-
appName?: string;
|
|
31
|
-
/**
|
|
32
|
-
* url the deployed app.
|
|
33
|
-
*/
|
|
34
|
-
url?: string;
|
|
35
|
-
};
|
package/dist/app-list.cmd.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { ApplicationMain } from './application.main.runtime';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated use AppListCmd class
|
|
5
|
-
*/
|
|
6
|
-
export declare class AppListCmdDeprecated implements Command {
|
|
7
|
-
private applicationAspect;
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
alias: string;
|
|
11
|
-
private: boolean;
|
|
12
|
-
group: string;
|
|
13
|
-
options: CommandOptions;
|
|
14
|
-
constructor(applicationAspect: ApplicationMain);
|
|
15
|
-
report(args: [string], { json }: {
|
|
16
|
-
json: boolean;
|
|
17
|
-
}): Promise<string>;
|
|
18
|
-
}
|
package/dist/app-server.d.ts
DELETED
package/dist/app-type-list.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EnvContext, EnvHandler } from '@teambit/envs';
|
|
2
|
-
import { ApplicationType } from './application-type';
|
|
3
|
-
export type AppTypeListOptions = {
|
|
4
|
-
name?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare class AppTypeList {
|
|
7
|
-
readonly name: string;
|
|
8
|
-
private appTypes;
|
|
9
|
-
private context;
|
|
10
|
-
constructor(name: string, appTypes: EnvHandler<ApplicationType<any>>[], context: EnvContext);
|
|
11
|
-
compute(): ApplicationType<any>[];
|
|
12
|
-
static from(appTypes: EnvHandler<ApplicationType<any>>[], options?: AppTypeListOptions): EnvHandler<AppTypeList>;
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PluginDefinition } from '@teambit/aspect-loader';
|
|
2
|
-
import { ApplicationType } from './application-type';
|
|
3
|
-
import { ApplicationSlot } from './application.main.runtime';
|
|
4
|
-
export declare class AppTypePlugin implements PluginDefinition {
|
|
5
|
-
readonly pattern: string;
|
|
6
|
-
private appType;
|
|
7
|
-
private appSlot;
|
|
8
|
-
constructor(pattern: string, appType: ApplicationType<unknown>, appSlot: ApplicationSlot);
|
|
9
|
-
runtimes: string[];
|
|
10
|
-
register(object: any): void;
|
|
11
|
-
private validateApp;
|
|
12
|
-
}
|
package/dist/app.cmd.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
-
import { ApplicationMain } from './application.main.runtime';
|
|
3
|
-
export declare class AppListCmd implements Command {
|
|
4
|
-
private applicationAspect;
|
|
5
|
-
name: string;
|
|
6
|
-
description: string;
|
|
7
|
-
alias: string;
|
|
8
|
-
group: string;
|
|
9
|
-
helpUrl: string;
|
|
10
|
-
options: CommandOptions;
|
|
11
|
-
constructor(applicationAspect: ApplicationMain);
|
|
12
|
-
report(args: [string], { json }: {
|
|
13
|
-
json: boolean;
|
|
14
|
-
}): Promise<string>;
|
|
15
|
-
}
|
|
16
|
-
export declare class AppCmd implements Command {
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
helpUrl: string;
|
|
20
|
-
alias: string;
|
|
21
|
-
group: string;
|
|
22
|
-
commands: Command[];
|
|
23
|
-
options: CommandOptions;
|
|
24
|
-
report(args: [string]): Promise<string>;
|
|
25
|
-
}
|
package/dist/app.plugin.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PluginDefinition } from '@teambit/aspect-loader';
|
|
2
|
-
import { ApplicationSlot } from './application.main.runtime';
|
|
3
|
-
export declare const BIT_APP_PATTERN = "*.bit-app.*";
|
|
4
|
-
export declare class AppPlugin implements PluginDefinition {
|
|
5
|
-
private appSlot;
|
|
6
|
-
constructor(appSlot: ApplicationSlot);
|
|
7
|
-
pattern: string;
|
|
8
|
-
runtimes: string[];
|
|
9
|
-
register(object: any): void;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Application } from './application';
|
|
2
|
-
export interface ApplicationType<T> {
|
|
3
|
-
/**
|
|
4
|
-
* name of the type of the app. e.g. `react-app`
|
|
5
|
-
*/
|
|
6
|
-
name: string;
|
|
7
|
-
/**
|
|
8
|
-
* pattern of the app.
|
|
9
|
-
*/
|
|
10
|
-
globPattern?: string;
|
|
11
|
-
/**
|
|
12
|
-
* a function that creates the app instance.
|
|
13
|
-
*/
|
|
14
|
-
createApp(options: T): Application;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/application.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { AppContext } from './app-context';
|
|
2
|
-
import { AppDeployContext } from './app-deploy-context';
|
|
3
|
-
import { AppBuildContext } from './app-build-context';
|
|
4
|
-
import { AppBuildResult } from './app-build-result';
|
|
5
|
-
import { ApplicationDeployment, ApplicationInstance } from './app-instance';
|
|
6
|
-
export type DeployFn = (context: AppDeployContext) => Promise<ApplicationDeployment | void | undefined>;
|
|
7
|
-
export type BuildFn = (context: AppBuildContext) => Promise<AppBuildResult>;
|
|
8
|
-
export type AppResult = {
|
|
9
|
-
port?: number;
|
|
10
|
-
errors?: Error[];
|
|
11
|
-
};
|
|
12
|
-
export interface Application {
|
|
13
|
-
/**
|
|
14
|
-
* name of the application. e.g. ripple-ci.
|
|
15
|
-
*/
|
|
16
|
-
name: string;
|
|
17
|
-
/**
|
|
18
|
-
* run the application.
|
|
19
|
-
*/
|
|
20
|
-
run(context: AppContext): Promise<ApplicationInstance | number>;
|
|
21
|
-
/**
|
|
22
|
-
* build the application.
|
|
23
|
-
*/
|
|
24
|
-
build?: BuildFn;
|
|
25
|
-
/**
|
|
26
|
-
* application deployment. this is a build task.
|
|
27
|
-
*/
|
|
28
|
-
deploy?: DeployFn;
|
|
29
|
-
/**
|
|
30
|
-
* Type of the application
|
|
31
|
-
*/
|
|
32
|
-
applicationType?: string;
|
|
33
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { CLIMain } from '@teambit/cli';
|
|
2
|
-
import { AspectLoaderMain } from '@teambit/aspect-loader';
|
|
3
|
-
import { SlotRegistry, Harmony } from '@teambit/harmony';
|
|
4
|
-
import { Workspace } from '@teambit/workspace';
|
|
5
|
-
import { WatcherMain } from '@teambit/watcher';
|
|
6
|
-
import { BuilderMain } from '@teambit/builder';
|
|
7
|
-
import { ScopeMain } from '@teambit/scope';
|
|
8
|
-
import { Logger, LoggerMain } from '@teambit/logger';
|
|
9
|
-
import { EnvsMain } from '@teambit/envs';
|
|
10
|
-
import { ComponentMain, ComponentID, Component } from '@teambit/component';
|
|
11
|
-
import { ApplicationType } from './application-type';
|
|
12
|
-
import { Application } from './application';
|
|
13
|
-
import { DeploymentProvider } from './deployment-provider';
|
|
14
|
-
import { AppService } from './application.service';
|
|
15
|
-
import { AppContext } from './app-context';
|
|
16
|
-
export type ApplicationTypeSlot = SlotRegistry<ApplicationType<unknown>[]>;
|
|
17
|
-
export type ApplicationSlot = SlotRegistry<Application[]>;
|
|
18
|
-
export type DeploymentProviderSlot = SlotRegistry<DeploymentProvider[]>;
|
|
19
|
-
export type ApplicationAspectConfig = {
|
|
20
|
-
/**
|
|
21
|
-
* envs ids to load app types.
|
|
22
|
-
*/
|
|
23
|
-
envs?: string[];
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Application meta data that is stored on the component on load if it's an application.
|
|
27
|
-
*/
|
|
28
|
-
export type ApplicationMetadata = {
|
|
29
|
-
appName: string;
|
|
30
|
-
type?: string;
|
|
31
|
-
};
|
|
32
|
-
export type ServeAppOptions = {
|
|
33
|
-
/**
|
|
34
|
-
* default port range used to serve applications.
|
|
35
|
-
*/
|
|
36
|
-
defaultPortRange?: [start: number, end: number];
|
|
37
|
-
/**
|
|
38
|
-
* determine whether to start the application in dev mode.
|
|
39
|
-
*/
|
|
40
|
-
dev: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* actively watch and compile the workspace (like the bit watch command)
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
watch?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* determine whether to start the application in server side mode.
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
ssr?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* exact port to run the app
|
|
53
|
-
*/
|
|
54
|
-
port?: number;
|
|
55
|
-
};
|
|
56
|
-
export declare class ApplicationMain {
|
|
57
|
-
private appSlot;
|
|
58
|
-
private appTypeSlot;
|
|
59
|
-
private deploymentProviderSlot;
|
|
60
|
-
private config;
|
|
61
|
-
private envs;
|
|
62
|
-
private componentAspect;
|
|
63
|
-
private appService;
|
|
64
|
-
private aspectLoader;
|
|
65
|
-
private workspace;
|
|
66
|
-
private logger;
|
|
67
|
-
private watcher;
|
|
68
|
-
private harmony;
|
|
69
|
-
constructor(appSlot: ApplicationSlot, appTypeSlot: ApplicationTypeSlot, deploymentProviderSlot: DeploymentProviderSlot, config: ApplicationAspectConfig, envs: EnvsMain, componentAspect: ComponentMain, appService: AppService, aspectLoader: AspectLoaderMain, workspace: Workspace, logger: Logger, watcher: WatcherMain, harmony: Harmony);
|
|
70
|
-
/**
|
|
71
|
-
* register a new app.
|
|
72
|
-
*/
|
|
73
|
-
registerApp(app: Application): this;
|
|
74
|
-
/**
|
|
75
|
-
* list all registered apps.
|
|
76
|
-
*/
|
|
77
|
-
listApps(): Application[];
|
|
78
|
-
/**
|
|
79
|
-
* map all apps by component ID.
|
|
80
|
-
*/
|
|
81
|
-
mapApps(): [string, Application[]][];
|
|
82
|
-
/**
|
|
83
|
-
* list apps by a component id.
|
|
84
|
-
*/
|
|
85
|
-
listAppsById(id?: ComponentID): Application[] | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* get an application by a component id.
|
|
88
|
-
*/
|
|
89
|
-
getAppById(id: ComponentID): Promise<Application | undefined>;
|
|
90
|
-
/**
|
|
91
|
-
* calculate an application by a component.
|
|
92
|
-
* This should be only used during the on component load slot
|
|
93
|
-
*/
|
|
94
|
-
calculateAppByComponent(component: Component): Application | undefined;
|
|
95
|
-
listAppTypes(): ApplicationType<unknown>[];
|
|
96
|
-
/**
|
|
97
|
-
* @deprecated use `listAppsComponents` instead.
|
|
98
|
-
* @returns
|
|
99
|
-
*/
|
|
100
|
-
listAppsFromComponents(): Promise<Component[]>;
|
|
101
|
-
listAppsComponents(): Promise<Component[]>;
|
|
102
|
-
private hasAppTypePattern;
|
|
103
|
-
getAppPatterns(): string[];
|
|
104
|
-
loadApps(): Promise<Application[]>;
|
|
105
|
-
loadAppsFromComponent(component: Component, rootDir: string): Promise<Application[] | undefined>;
|
|
106
|
-
/**
|
|
107
|
-
* get an app.
|
|
108
|
-
*/
|
|
109
|
-
getApp(appName: string, id?: ComponentID): Application | undefined;
|
|
110
|
-
getAppByNameOrId(appNameOrId: string): Application | undefined;
|
|
111
|
-
getAppPattern(appType: ApplicationType<unknown>): string;
|
|
112
|
-
/**
|
|
113
|
-
* registers a new app and sets a plugin for it.
|
|
114
|
-
*/
|
|
115
|
-
registerAppType<T>(...appTypes: Array<ApplicationType<T>>): this;
|
|
116
|
-
/**
|
|
117
|
-
* get an app AspectId.
|
|
118
|
-
*/
|
|
119
|
-
getAppAspect(appName: string): string | undefined;
|
|
120
|
-
/**
|
|
121
|
-
* get app to throw.
|
|
122
|
-
*/
|
|
123
|
-
getAppOrThrow(appName: string): Application;
|
|
124
|
-
defaultOpts: ServeAppOptions;
|
|
125
|
-
private computeOptions;
|
|
126
|
-
loadAppsToSlot(): Promise<this>;
|
|
127
|
-
runApp(appName: string, options?: ServeAppOptions): Promise<{
|
|
128
|
-
app: Application;
|
|
129
|
-
port: number | undefined;
|
|
130
|
-
errors?: Error[];
|
|
131
|
-
isOldApi: boolean;
|
|
132
|
-
}>;
|
|
133
|
-
/**
|
|
134
|
-
* get the component ID of a certain app.
|
|
135
|
-
*/
|
|
136
|
-
getAppIdOrThrow(appName: string): Promise<ComponentID>;
|
|
137
|
-
private createAppContext;
|
|
138
|
-
createAppBuildContext(id: ComponentID, appName: string, capsuleRootDir: string, rootDir?: string): Promise<AppContext>;
|
|
139
|
-
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
140
|
-
static dependencies: import("@teambit/harmony").Aspect[];
|
|
141
|
-
static slots: (((registerFn: () => string) => SlotRegistry<ApplicationType<unknown>[]>) | ((registerFn: () => string) => SlotRegistry<Application[]>) | ((registerFn: () => string) => SlotRegistry<DeploymentProvider[]>))[];
|
|
142
|
-
static provider([cli, loggerAspect, builder, envs, component, aspectLoader, workspace, watcher, scope]: [
|
|
143
|
-
CLIMain,
|
|
144
|
-
LoggerMain,
|
|
145
|
-
BuilderMain,
|
|
146
|
-
EnvsMain,
|
|
147
|
-
ComponentMain,
|
|
148
|
-
AspectLoaderMain,
|
|
149
|
-
Workspace,
|
|
150
|
-
WatcherMain,
|
|
151
|
-
ScopeMain
|
|
152
|
-
], config: ApplicationAspectConfig, [appTypeSlot, appSlot, deploymentProviderSlot]: [ApplicationTypeSlot, ApplicationSlot, DeploymentProviderSlot], harmony: Harmony): Promise<ApplicationMain>;
|
|
153
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EnvService, Env, EnvContext, ServiceTransformationMap, ExecutionContext } from '@teambit/envs';
|
|
2
|
-
import { ApplicationType } from './application-type';
|
|
3
|
-
type ApplicationTransformationMap = ServiceTransformationMap & {
|
|
4
|
-
getAppTypes: () => ApplicationType<any>[];
|
|
5
|
-
};
|
|
6
|
-
export declare class AppService implements EnvService<any> {
|
|
7
|
-
name: string;
|
|
8
|
-
registerAppType: (...appType: Array<ApplicationType<any>>) => void;
|
|
9
|
-
run(context: ExecutionContext): Promise<ExecutionContext & {
|
|
10
|
-
dev: boolean;
|
|
11
|
-
errors: never[];
|
|
12
|
-
}>;
|
|
13
|
-
transform(env: Env, context: EnvContext): ApplicationTransformationMap | undefined;
|
|
14
|
-
}
|
|
15
|
-
export {};
|