@teambit/application 0.0.614 → 0.0.616
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/application-type.d.ts +4 -0
- package/dist/application-type.js.map +1 -1
- package/dist/application.main.runtime.d.ts +6 -0
- package/dist/application.main.runtime.js +56 -1
- package/dist/application.main.runtime.js.map +1 -1
- package/dist/{preview-1675135948257.js → preview-1675308621306.js} +2 -2
- package/package-tar/teambit-application-0.0.616.tgz +0 -0
- package/package.json +11 -11
- package/package-tar/teambit-application-0.0.614.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["application-type.ts"],"sourcesContent":["import { Application } from './application';\n\nexport interface ApplicationType<T> {\n /**\n * name of the type of the app. e.g. `react-app`\n */\n name: string;\n\n /**\n * a function that creates the app instance.\n */\n createApp(options: T): Application;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["application-type.ts"],"sourcesContent":["import { Application } from './application';\n\nexport interface ApplicationType<T> {\n /**\n * name of the type of the app. e.g. `react-app`\n */\n name: string;\n\n /**\n * pattern of the app.\n */\n globPattern?: string;\n\n /**\n * a function that creates the app instance.\n */\n createApp(options: T): Application;\n}\n"],"mappings":""}
|
|
@@ -83,11 +83,16 @@ export declare class ApplicationMain {
|
|
|
83
83
|
* This should be only used during the on component load slot
|
|
84
84
|
*/
|
|
85
85
|
calculateAppByComponent(component: Component): Application | undefined;
|
|
86
|
+
listAppTypes(): ApplicationType<unknown>[];
|
|
87
|
+
listAppsFromComponents(): Promise<Component[]>;
|
|
88
|
+
getAppPatterns(): string[];
|
|
89
|
+
loadApps(): Promise<Application[]>;
|
|
86
90
|
/**
|
|
87
91
|
* get an app.
|
|
88
92
|
*/
|
|
89
93
|
getApp(appName: string, id?: ComponentID): Application | undefined;
|
|
90
94
|
getAppByNameOrId(appNameOrId: string): Application | undefined;
|
|
95
|
+
getAppPattern(appType: ApplicationType<unknown>): string;
|
|
91
96
|
/**
|
|
92
97
|
* registers a new app and sets a plugin for it.
|
|
93
98
|
*/
|
|
@@ -102,6 +107,7 @@ export declare class ApplicationMain {
|
|
|
102
107
|
getAppOrThrow(appName: string): Application;
|
|
103
108
|
defaultOpts: ServeAppOptions;
|
|
104
109
|
private computeOptions;
|
|
110
|
+
loadAppsToSlot(): Promise<this>;
|
|
105
111
|
runApp(appName: string, options?: ServeAppOptions): Promise<{
|
|
106
112
|
port?: number | undefined;
|
|
107
113
|
errors?: Error[] | undefined;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
require("core-js/modules/es.array.flat-map.js");
|
|
4
5
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
+
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
5
7
|
require("core-js/modules/es.promise.js");
|
|
6
8
|
Object.defineProperty(exports, "__esModule", {
|
|
7
9
|
value: true
|
|
@@ -242,6 +244,47 @@ class ApplicationMain {
|
|
|
242
244
|
if (!apps) return undefined;
|
|
243
245
|
return (0, _lodash().head)(apps);
|
|
244
246
|
}
|
|
247
|
+
listAppTypes() {
|
|
248
|
+
return (0, _lodash().flatten)(this.appTypeSlot.values());
|
|
249
|
+
}
|
|
250
|
+
async listAppsFromComponents() {
|
|
251
|
+
const components = await this.componentAspect.getHost().list();
|
|
252
|
+
const appTypesPatterns = this.getAppPatterns();
|
|
253
|
+
const apps = components.filter(component => {
|
|
254
|
+
// has app plugin from registered types.
|
|
255
|
+
const files = component.filesystem.byGlob(appTypesPatterns);
|
|
256
|
+
return !!files.length;
|
|
257
|
+
});
|
|
258
|
+
return apps;
|
|
259
|
+
}
|
|
260
|
+
getAppPatterns() {
|
|
261
|
+
const appTypes = this.listAppTypes();
|
|
262
|
+
const appTypesPatterns = appTypes.map(appType => {
|
|
263
|
+
return this.getAppPattern(appType);
|
|
264
|
+
});
|
|
265
|
+
return appTypesPatterns;
|
|
266
|
+
}
|
|
267
|
+
async loadApps() {
|
|
268
|
+
const apps = await this.listAppsFromComponents();
|
|
269
|
+
const appTypesPatterns = this.getAppPatterns();
|
|
270
|
+
const pluginsToLoad = apps.flatMap(appComponent => {
|
|
271
|
+
const files = appComponent.filesystem.byGlob(appTypesPatterns);
|
|
272
|
+
return files.map(file => file.path);
|
|
273
|
+
});
|
|
274
|
+
// const app = require(appPath);
|
|
275
|
+
const appManifests = (0, _lodash().compact)(pluginsToLoad.map(pluginPath => {
|
|
276
|
+
try {
|
|
277
|
+
var _require;
|
|
278
|
+
// eslint-disable-next-line
|
|
279
|
+
const appManifest = (_require = require(pluginPath)) === null || _require === void 0 ? void 0 : _require.default;
|
|
280
|
+
return appManifest;
|
|
281
|
+
} catch (err) {
|
|
282
|
+
this.logger.error(`failed loading app manifest: ${pluginPath}`);
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
}));
|
|
286
|
+
return appManifests;
|
|
287
|
+
}
|
|
245
288
|
|
|
246
289
|
/**
|
|
247
290
|
* get an app.
|
|
@@ -261,12 +304,16 @@ class ApplicationMain {
|
|
|
261
304
|
}
|
|
262
305
|
return byId[0];
|
|
263
306
|
}
|
|
307
|
+
getAppPattern(appType) {
|
|
308
|
+
if (appType.globPattern) return appType.globPattern;
|
|
309
|
+
return `*.${appType.name}.*`;
|
|
310
|
+
}
|
|
264
311
|
|
|
265
312
|
/**
|
|
266
313
|
* registers a new app and sets a plugin for it.
|
|
267
314
|
*/
|
|
268
315
|
registerAppType(appType) {
|
|
269
|
-
const plugin = new (_appType().AppTypePlugin)(
|
|
316
|
+
const plugin = new (_appType().AppTypePlugin)(this.getAppPattern(appType), appType, this.appSlot);
|
|
270
317
|
this.aspectLoader.registerPlugins([plugin]);
|
|
271
318
|
this.appTypeSlot.register([appType]);
|
|
272
319
|
return this;
|
|
@@ -291,6 +338,11 @@ class ApplicationMain {
|
|
|
291
338
|
computeOptions(opts = {}) {
|
|
292
339
|
return _objectSpread(_objectSpread({}, this.defaultOpts), opts);
|
|
293
340
|
}
|
|
341
|
+
async loadAppsToSlot() {
|
|
342
|
+
const apps = await this.loadApps();
|
|
343
|
+
this.appSlot.register(apps);
|
|
344
|
+
return this;
|
|
345
|
+
}
|
|
294
346
|
async runApp(appName, options) {
|
|
295
347
|
options = this.computeOptions(options);
|
|
296
348
|
const app = this.getAppOrThrow(appName);
|
|
@@ -357,6 +409,9 @@ class ApplicationMain {
|
|
|
357
409
|
envs.registerService(appService);
|
|
358
410
|
cli.registerGroup('apps', 'Applications');
|
|
359
411
|
cli.register(new (_run().RunCmd)(application, logger), new (_appList().AppListCmdDeprecated)(application), appCmd);
|
|
412
|
+
// cli.registerOnStart(async () => {
|
|
413
|
+
// await application.loadAppsToSlot();
|
|
414
|
+
// });
|
|
360
415
|
if (workspace) {
|
|
361
416
|
workspace.onComponentLoad(async loadedComponent => {
|
|
362
417
|
const app = application.calculateAppByComponent(loadedComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApplicationMain","constructor","appSlot","appTypeSlot","deploymentProviderSlot","config","envs","componentAspect","appService","aspectLoader","workspace","logger","dev","ssr","watch","defaultPortRange","registerApp","app","register","listApps","flatten","values","mapApps","toArray","listAppsById","id","undefined","get","toString","getAppById","apps","head","calculateAppByComponent","component","getApp","appName","find","name","getAppByNameOrId","appNameOrId","byName","byId","length","BitError","registerAppType","appType","plugin","AppTypePlugin","registerPlugins","getAppAspect","getAppOrThrow","AppNotFound","computeOptions","opts","defaultOpts","runApp","options","context","createAppContext","runSsr","AppNoSsr","result","port","run","watcher","watchAll","preCompile","catch","err","error","errors","getAppIdOrThrow","maybeApp","ComponentID","fromString","host","getHost","components","list","c","isEqual","env","createEnvironment","res","results","data","hostRootDir","getComponentPackagePath","appContext","AppContext","path","provider","cli","loggerAspect","builder","createLogger","ApplicationAspect","AppService","application","bind","appCmd","AppCmd","commands","AppListCmd","RunCmd","AppPlugin","registerBuildTasks","AppsBuildTask","registerSnapTasks","DeployTask","registerTagTasks","registerService","registerGroup","AppListCmdDeprecated","onComponentLoad","loadedComponent","type","applicationType","MainRuntime","CLIAspect","LoggerAspect","BuilderAspect","EnvsAspect","ComponentAspect","AspectLoaderAspect","WorkspaceAspect","Slot","withType","addRuntime"],"sources":["application.main.runtime.ts"],"sourcesContent":["import { MainRuntime, CLIMain, CLIAspect } from '@teambit/cli';\nimport { flatten, head } from 'lodash';\nimport { AspectLoaderMain, AspectLoaderAspect } from '@teambit/aspect-loader';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { BuilderAspect, BuilderMain } from '@teambit/builder';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport ComponentAspect, { ComponentMain, ComponentID, Component } from '@teambit/component';\nimport { ApplicationType } from './application-type';\nimport { Application } from './application';\nimport { DeploymentProvider } from './deployment-provider';\nimport { AppNotFound } from './exceptions';\nimport { ApplicationAspect } from './application.aspect';\nimport { AppListCmdDeprecated } from './app-list.cmd';\nimport { AppsBuildTask } from './build.task';\nimport { RunCmd } from './run.cmd';\nimport { AppService } from './application.service';\nimport { AppCmd, AppListCmd } from './app.cmd';\nimport { AppPlugin } from './app.plugin';\nimport { AppTypePlugin } from './app-type.plugin';\nimport { AppContext } from './app-context';\nimport { DeployTask } from './deploy.task';\nimport { AppNoSsr } from './exceptions/app-no-ssr';\n\nexport type ApplicationTypeSlot = SlotRegistry<ApplicationType<unknown>[]>;\nexport type ApplicationSlot = SlotRegistry<Application[]>;\nexport type DeploymentProviderSlot = SlotRegistry<DeploymentProvider[]>;\n\nexport type ApplicationAspectConfig = {\n /**\n * envs ids to load app types.\n */\n envs?: string[];\n};\n\n/**\n * Application meta data that is stored on the component on load if it's an application.\n */\nexport type ApplicationMetadata = {\n appName: string;\n type?: string;\n};\n\nexport type ServeAppOptions = {\n /**\n * default port range used to serve applications.\n */\n defaultPortRange?: [start: number, end: number];\n\n /**\n * determine whether to start the application in dev mode.\n */\n dev: boolean;\n\n /**\n * actively watch and compile the workspace (like the bit watch command)\n * @default true\n */\n watch?: boolean;\n\n /**\n * determine whether to start the application in server side mode.\n * @default false\n */\n ssr?: boolean;\n};\n\nexport class ApplicationMain {\n constructor(\n private appSlot: ApplicationSlot,\n // TODO unused\n private appTypeSlot: ApplicationTypeSlot,\n private deploymentProviderSlot: DeploymentProviderSlot,\n private config: ApplicationAspectConfig,\n private envs: EnvsMain,\n private componentAspect: ComponentMain,\n private appService: AppService,\n private aspectLoader: AspectLoaderMain,\n private workspace: Workspace,\n private logger: Logger\n ) {}\n\n /**\n * register a new app.\n */\n registerApp(app: Application) {\n this.appSlot.register([app]);\n return this;\n }\n\n /**\n * list all registered apps.\n */\n listApps(): Application[] {\n return flatten(this.appSlot.values());\n }\n\n /**\n * map all apps by component ID.\n */\n mapApps() {\n return this.appSlot.toArray();\n }\n\n /**\n * list apps by a component id.\n */\n listAppsById(id?: ComponentID): Application[] | undefined {\n if (!id) return undefined;\n return this.appSlot.get(id.toString());\n }\n\n /**\n * get an application by a component id.\n */\n async getAppById(id: ComponentID) {\n const apps = await this.listAppsById(id);\n if (!apps) return undefined;\n return head(apps);\n }\n\n /**\n * calculate an application by a component.\n * This should be only used during the on component load slot\n */\n calculateAppByComponent(component: Component) {\n const apps = this.appSlot.get(component.id.toString());\n if (!apps) return undefined;\n return head(apps);\n }\n\n /**\n * get an app.\n */\n getApp(appName: string, id?: ComponentID): Application | undefined {\n const apps = id ? this.listAppsById(id) : this.listApps();\n if (!apps) return undefined;\n return apps.find((app) => app.name === appName);\n }\n\n getAppByNameOrId(appNameOrId: string): Application | undefined {\n const byName = this.getApp(appNameOrId);\n if (byName) return byName;\n const byId = this.appSlot.get(appNameOrId);\n if (!byId || !byId.length) return undefined;\n if (byId.length > 1) {\n throw new BitError(\n `unable to figure out what app to retrieve. the id \"${appNameOrId}\" has more than one app. please use the app-name`\n );\n }\n return byId[0];\n }\n\n /**\n * registers a new app and sets a plugin for it.\n */\n registerAppType<T>(appType: ApplicationType<T>) {\n const plugin = new AppTypePlugin(`*.${appType.name}.*`, appType, this.appSlot);\n this.aspectLoader.registerPlugins([plugin]);\n this.appTypeSlot.register([appType]);\n return this;\n }\n\n /**\n * get an app AspectId.\n */\n getAppAspect(appName: string): string | undefined {\n return this.appSlot.toArray().find(([, apps]) => apps.find((app) => app.name === appName))?.[0];\n }\n\n /**\n * get app to throw.\n */\n getAppOrThrow(appName: string): Application {\n const app = this.getAppByNameOrId(appName);\n if (!app) throw new AppNotFound(appName);\n return app;\n }\n\n defaultOpts: ServeAppOptions = {\n dev: false,\n ssr: false,\n watch: true,\n defaultPortRange: [3100, 3500],\n };\n private computeOptions(opts: Partial<ServeAppOptions> = {}) {\n return {\n ...this.defaultOpts,\n ...opts,\n };\n }\n\n async runApp(appName: string, options?: ServeAppOptions) {\n options = this.computeOptions(options);\n const app = this.getAppOrThrow(appName);\n const context = await this.createAppContext(app.name);\n if (!context) throw new AppNotFound(appName);\n\n if (options.ssr) {\n if (!app.runSsr) throw new AppNoSsr(appName);\n\n const result = await app.runSsr(context);\n return { app, ...result };\n }\n\n const port = await app.run(context);\n if (options.watch) {\n this.workspace.watcher\n .watchAll({\n preCompile: false,\n })\n .catch((err) => {\n // don't throw an error, we don't want to break the \"run\" process\n this.logger.error(`compilation failed`, err);\n });\n }\n return { app, port, errors: undefined };\n }\n\n /**\n * get the component ID of a certain app.\n */\n getAppIdOrThrow(appName: string) {\n const maybeApp = this.appSlot.toArray().find(([, apps]) => {\n return apps.find((app) => app.name === appName);\n });\n\n if (!maybeApp) throw new AppNotFound(appName);\n return ComponentID.fromString(maybeApp[0]);\n }\n\n private async createAppContext(appName: string): Promise<AppContext> {\n const host = this.componentAspect.getHost();\n const components = await host.list();\n const id = this.getAppIdOrThrow(appName);\n const component = components.find((c) => c.id.isEqual(id));\n if (!component) throw new AppNotFound(appName);\n\n const env = await this.envs.createEnvironment([component]);\n const res = await env.run(this.appService);\n const context = res.results[0].data;\n if (!context) throw new AppNotFound(appName);\n const hostRootDir = this.workspace.getComponentPackagePath(component);\n const appContext = new AppContext(appName, context.dev, component, this.workspace.path, context, hostRootDir);\n return appContext;\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n LoggerAspect,\n BuilderAspect,\n EnvsAspect,\n ComponentAspect,\n AspectLoaderAspect,\n WorkspaceAspect,\n ];\n\n static slots = [\n Slot.withType<ApplicationType<unknown>[]>(),\n Slot.withType<Application[]>(),\n Slot.withType<DeploymentProvider[]>(),\n ];\n\n static async provider(\n [cli, loggerAspect, builder, envs, component, aspectLoader, workspace]: [\n CLIMain,\n LoggerMain,\n BuilderMain,\n EnvsMain,\n ComponentMain,\n AspectLoaderMain,\n Workspace\n ],\n config: ApplicationAspectConfig,\n [appTypeSlot, appSlot, deploymentProviderSlot]: [ApplicationTypeSlot, ApplicationSlot, DeploymentProviderSlot]\n ) {\n const logger = loggerAspect.createLogger(ApplicationAspect.id);\n const appService = new AppService();\n const application = new ApplicationMain(\n appSlot,\n appTypeSlot,\n deploymentProviderSlot,\n config,\n envs,\n component,\n appService,\n aspectLoader,\n workspace,\n logger\n );\n appService.registerAppType = application.registerAppType.bind(application);\n const appCmd = new AppCmd();\n appCmd.commands = [new AppListCmd(application), new RunCmd(application, logger)];\n aspectLoader.registerPlugins([new AppPlugin(appSlot)]);\n builder.registerBuildTasks([new AppsBuildTask(application)]);\n builder.registerSnapTasks([new DeployTask(application, builder)]);\n builder.registerTagTasks([new DeployTask(application, builder)]);\n envs.registerService(appService);\n cli.registerGroup('apps', 'Applications');\n cli.register(new RunCmd(application, logger), new AppListCmdDeprecated(application), appCmd);\n if (workspace) {\n workspace.onComponentLoad(async (loadedComponent): Promise<ApplicationMetadata | undefined> => {\n const app = application.calculateAppByComponent(loadedComponent);\n if (!app) return undefined;\n return {\n appName: app.name,\n type: app.applicationType,\n };\n });\n }\n\n return application;\n }\n}\n\nApplicationAspect.addRuntime(ApplicationMain);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAmD;AAAA;AAAA;AAAA;AA6C5C,MAAMA,eAAe,CAAC;EAC3BC,WAAW,CACDC,OAAwB;EAChC;EACQC,WAAgC,EAChCC,sBAA8C,EAC9CC,MAA+B,EAC/BC,IAAc,EACdC,eAA8B,EAC9BC,UAAsB,EACtBC,YAA8B,EAC9BC,SAAoB,EACpBC,MAAc,EACtB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,WAAW;EACpB;AACF;AAAC;AAAA,gCAvPYlG,eAAe,aAoLTsH,kBAAW;AAAA,gCApLjBtH,eAAe,kBAqLJ,CACpBuH,gBAAS,EACTC,sBAAY,EACZC,wBAAa,EACbC,kBAAU,EACVC,oBAAe,EACfC,kCAAkB,EAClBC,oBAAe,CAChB;AAAA,gCA7LU7H,eAAe,WA+LX,CACb8H,eAAI,CAACC,QAAQ,EAA8B,EAC3CD,eAAI,CAACC,QAAQ,EAAiB,EAC9BD,eAAI,CAACC,QAAQ,EAAwB,CACtC;AAsDH/B,gCAAiB,CAACgC,UAAU,CAAChI,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"names":["ApplicationMain","constructor","appSlot","appTypeSlot","deploymentProviderSlot","config","envs","componentAspect","appService","aspectLoader","workspace","logger","dev","ssr","watch","defaultPortRange","registerApp","app","register","listApps","flatten","values","mapApps","toArray","listAppsById","id","undefined","get","toString","getAppById","apps","head","calculateAppByComponent","component","listAppTypes","listAppsFromComponents","components","getHost","list","appTypesPatterns","getAppPatterns","filter","files","filesystem","byGlob","length","appTypes","map","appType","getAppPattern","loadApps","pluginsToLoad","flatMap","appComponent","file","path","appManifests","compact","pluginPath","appManifest","require","default","err","error","getApp","appName","find","name","getAppByNameOrId","appNameOrId","byName","byId","BitError","globPattern","registerAppType","plugin","AppTypePlugin","registerPlugins","getAppAspect","getAppOrThrow","AppNotFound","computeOptions","opts","defaultOpts","loadAppsToSlot","runApp","options","context","createAppContext","runSsr","AppNoSsr","result","port","run","watcher","watchAll","preCompile","catch","errors","getAppIdOrThrow","maybeApp","ComponentID","fromString","host","c","isEqual","env","createEnvironment","res","results","data","hostRootDir","getComponentPackagePath","appContext","AppContext","provider","cli","loggerAspect","builder","createLogger","ApplicationAspect","AppService","application","bind","appCmd","AppCmd","commands","AppListCmd","RunCmd","AppPlugin","registerBuildTasks","AppsBuildTask","registerSnapTasks","DeployTask","registerTagTasks","registerService","registerGroup","AppListCmdDeprecated","onComponentLoad","loadedComponent","type","applicationType","MainRuntime","CLIAspect","LoggerAspect","BuilderAspect","EnvsAspect","ComponentAspect","AspectLoaderAspect","WorkspaceAspect","Slot","withType","addRuntime"],"sources":["application.main.runtime.ts"],"sourcesContent":["import { MainRuntime, CLIMain, CLIAspect } from '@teambit/cli';\nimport { compact, flatten, head } from 'lodash';\nimport { AspectLoaderMain, AspectLoaderAspect } from '@teambit/aspect-loader';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { BuilderAspect, BuilderMain } from '@teambit/builder';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport ComponentAspect, { ComponentMain, ComponentID, Component } from '@teambit/component';\nimport { ApplicationType } from './application-type';\nimport { Application } from './application';\nimport { DeploymentProvider } from './deployment-provider';\nimport { AppNotFound } from './exceptions';\nimport { ApplicationAspect } from './application.aspect';\nimport { AppListCmdDeprecated } from './app-list.cmd';\nimport { AppsBuildTask } from './build.task';\nimport { RunCmd } from './run.cmd';\nimport { AppService } from './application.service';\nimport { AppCmd, AppListCmd } from './app.cmd';\nimport { AppPlugin } from './app.plugin';\nimport { AppTypePlugin } from './app-type.plugin';\nimport { AppContext } from './app-context';\nimport { DeployTask } from './deploy.task';\nimport { AppNoSsr } from './exceptions/app-no-ssr';\n\nexport type ApplicationTypeSlot = SlotRegistry<ApplicationType<unknown>[]>;\nexport type ApplicationSlot = SlotRegistry<Application[]>;\nexport type DeploymentProviderSlot = SlotRegistry<DeploymentProvider[]>;\n\nexport type ApplicationAspectConfig = {\n /**\n * envs ids to load app types.\n */\n envs?: string[];\n};\n\n/**\n * Application meta data that is stored on the component on load if it's an application.\n */\nexport type ApplicationMetadata = {\n appName: string;\n type?: string;\n};\n\nexport type ServeAppOptions = {\n /**\n * default port range used to serve applications.\n */\n defaultPortRange?: [start: number, end: number];\n\n /**\n * determine whether to start the application in dev mode.\n */\n dev: boolean;\n\n /**\n * actively watch and compile the workspace (like the bit watch command)\n * @default true\n */\n watch?: boolean;\n\n /**\n * determine whether to start the application in server side mode.\n * @default false\n */\n ssr?: boolean;\n};\n\nexport class ApplicationMain {\n constructor(\n private appSlot: ApplicationSlot,\n // TODO unused\n private appTypeSlot: ApplicationTypeSlot,\n private deploymentProviderSlot: DeploymentProviderSlot,\n private config: ApplicationAspectConfig,\n private envs: EnvsMain,\n private componentAspect: ComponentMain,\n private appService: AppService,\n private aspectLoader: AspectLoaderMain,\n private workspace: Workspace,\n private logger: Logger\n ) {}\n\n /**\n * register a new app.\n */\n registerApp(app: Application) {\n this.appSlot.register([app]);\n return this;\n }\n\n /**\n * list all registered apps.\n */\n listApps(): Application[] {\n return flatten(this.appSlot.values());\n }\n\n /**\n * map all apps by component ID.\n */\n mapApps() {\n return this.appSlot.toArray();\n }\n\n /**\n * list apps by a component id.\n */\n listAppsById(id?: ComponentID): Application[] | undefined {\n if (!id) return undefined;\n return this.appSlot.get(id.toString());\n }\n\n /**\n * get an application by a component id.\n */\n async getAppById(id: ComponentID) {\n const apps = await this.listAppsById(id);\n if (!apps) return undefined;\n return head(apps);\n }\n\n /**\n * calculate an application by a component.\n * This should be only used during the on component load slot\n */\n calculateAppByComponent(component: Component) {\n const apps = this.appSlot.get(component.id.toString());\n if (!apps) return undefined;\n return head(apps);\n }\n\n listAppTypes() {\n return flatten(this.appTypeSlot.values());\n }\n\n async listAppsFromComponents() {\n const components = await this.componentAspect.getHost().list();\n const appTypesPatterns = this.getAppPatterns();\n const apps = components.filter((component) => {\n // has app plugin from registered types.\n const files = component.filesystem.byGlob(appTypesPatterns);\n return !!files.length;\n });\n\n return apps;\n }\n\n getAppPatterns() {\n const appTypes = this.listAppTypes();\n const appTypesPatterns = appTypes.map((appType) => {\n return this.getAppPattern(appType);\n });\n\n return appTypesPatterns;\n }\n\n async loadApps(): Promise<Application[]> {\n const apps = await this.listAppsFromComponents();\n const appTypesPatterns = this.getAppPatterns();\n\n const pluginsToLoad = apps.flatMap((appComponent) => {\n const files = appComponent.filesystem.byGlob(appTypesPatterns);\n return files.map((file) => file.path);\n });\n // const app = require(appPath);\n const appManifests = compact(pluginsToLoad.map((pluginPath) => {\n try {\n // eslint-disable-next-line\n const appManifest = require(pluginPath)?.default;\n return appManifest;\n } catch (err) {\n this.logger.error(`failed loading app manifest: ${pluginPath}`);\n return undefined;\n }\n }));\n \n return appManifests;\n }\n\n /**\n * get an app.\n */\n getApp(appName: string, id?: ComponentID): Application | undefined {\n const apps = id ? this.listAppsById(id) : this.listApps();\n if (!apps) return undefined;\n return apps.find((app) => app.name === appName);\n }\n\n getAppByNameOrId(appNameOrId: string): Application | undefined {\n const byName = this.getApp(appNameOrId);\n if (byName) return byName;\n const byId = this.appSlot.get(appNameOrId);\n if (!byId || !byId.length) return undefined;\n if (byId.length > 1) {\n throw new BitError(\n `unable to figure out what app to retrieve. the id \"${appNameOrId}\" has more than one app. please use the app-name`\n );\n }\n return byId[0];\n }\n\n getAppPattern(appType: ApplicationType<unknown>) {\n if (appType.globPattern) return appType.globPattern;\n return `*.${appType.name}.*`;\n }\n\n /**\n * registers a new app and sets a plugin for it.\n */\n registerAppType<T>(appType: ApplicationType<T>) {\n const plugin = new AppTypePlugin(this.getAppPattern(appType), appType, this.appSlot);\n this.aspectLoader.registerPlugins([plugin]);\n this.appTypeSlot.register([appType]);\n return this;\n }\n\n /**\n * get an app AspectId.\n */\n getAppAspect(appName: string): string | undefined {\n return this.appSlot.toArray().find(([, apps]) => apps.find((app) => app.name === appName))?.[0];\n }\n\n /**\n * get app to throw.\n */\n getAppOrThrow(appName: string): Application {\n const app = this.getAppByNameOrId(appName);\n if (!app) throw new AppNotFound(appName);\n return app;\n }\n\n defaultOpts: ServeAppOptions = {\n dev: false,\n ssr: false,\n watch: true,\n defaultPortRange: [3100, 3500],\n };\n private computeOptions(opts: Partial<ServeAppOptions> = {}) {\n return {\n ...this.defaultOpts,\n ...opts,\n };\n }\n\n async loadAppsToSlot() {\n const apps = await this.loadApps();\n this.appSlot.register(apps);\n return this;\n }\n\n async runApp(appName: string, options?: ServeAppOptions) {\n options = this.computeOptions(options);\n const app = this.getAppOrThrow(appName);\n const context = await this.createAppContext(app.name);\n if (!context) throw new AppNotFound(appName);\n\n if (options.ssr) {\n if (!app.runSsr) throw new AppNoSsr(appName);\n\n const result = await app.runSsr(context);\n return { app, ...result };\n }\n\n const port = await app.run(context);\n if (options.watch) {\n this.workspace.watcher\n .watchAll({\n preCompile: false,\n })\n .catch((err) => {\n // don't throw an error, we don't want to break the \"run\" process\n this.logger.error(`compilation failed`, err);\n });\n }\n return { app, port, errors: undefined };\n }\n\n /**\n * get the component ID of a certain app.\n */\n getAppIdOrThrow(appName: string) {\n const maybeApp = this.appSlot.toArray().find(([, apps]) => {\n return apps.find((app) => app.name === appName);\n });\n\n if (!maybeApp) throw new AppNotFound(appName);\n return ComponentID.fromString(maybeApp[0]);\n }\n\n private async createAppContext(appName: string): Promise<AppContext> {\n const host = this.componentAspect.getHost();\n const components = await host.list();\n const id = this.getAppIdOrThrow(appName);\n const component = components.find((c) => c.id.isEqual(id));\n if (!component) throw new AppNotFound(appName);\n\n const env = await this.envs.createEnvironment([component]);\n const res = await env.run(this.appService);\n const context = res.results[0].data;\n if (!context) throw new AppNotFound(appName);\n const hostRootDir = this.workspace.getComponentPackagePath(component);\n const appContext = new AppContext(appName, context.dev, component, this.workspace.path, context, hostRootDir);\n return appContext;\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n LoggerAspect,\n BuilderAspect,\n EnvsAspect,\n ComponentAspect,\n AspectLoaderAspect,\n WorkspaceAspect,\n ];\n\n static slots = [\n Slot.withType<ApplicationType<unknown>[]>(),\n Slot.withType<Application[]>(),\n Slot.withType<DeploymentProvider[]>(),\n ];\n\n static async provider(\n [cli, loggerAspect, builder, envs, component, aspectLoader, workspace]: [\n CLIMain,\n LoggerMain,\n BuilderMain,\n EnvsMain,\n ComponentMain,\n AspectLoaderMain,\n Workspace\n ],\n config: ApplicationAspectConfig,\n [appTypeSlot, appSlot, deploymentProviderSlot]: [ApplicationTypeSlot, ApplicationSlot, DeploymentProviderSlot]\n ) {\n const logger = loggerAspect.createLogger(ApplicationAspect.id);\n const appService = new AppService();\n const application = new ApplicationMain(\n appSlot,\n appTypeSlot,\n deploymentProviderSlot,\n config,\n envs,\n component,\n appService,\n aspectLoader,\n workspace,\n logger\n );\n appService.registerAppType = application.registerAppType.bind(application);\n const appCmd = new AppCmd();\n appCmd.commands = [new AppListCmd(application), new RunCmd(application, logger)];\n aspectLoader.registerPlugins([new AppPlugin(appSlot)]);\n builder.registerBuildTasks([new AppsBuildTask(application)]);\n builder.registerSnapTasks([new DeployTask(application, builder)]);\n builder.registerTagTasks([new DeployTask(application, builder)]);\n envs.registerService(appService);\n cli.registerGroup('apps', 'Applications');\n cli.register(new RunCmd(application, logger), new AppListCmdDeprecated(application), appCmd);\n // cli.registerOnStart(async () => {\n // await application.loadAppsToSlot();\n // });\n if (workspace) {\n workspace.onComponentLoad(async (loadedComponent): Promise<ApplicationMetadata | undefined> => {\n const app = application.calculateAppByComponent(loadedComponent);\n if (!app) return undefined;\n return {\n appName: app.name,\n type: app.applicationType,\n };\n });\n }\n\n return application;\n }\n}\n\nApplicationAspect.addRuntime(ApplicationMain);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;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AAG,EAAE,OAAOS,SAAS;QAC1B,OAAO;UACLuC,OAAO,EAAEhD,GAAG,CAACkD,IAAI;UACjByE,IAAI,EAAE3H,GAAG,CAAC4H;QACZ,CAAC;MACH,CAAC,CAAC;IACJ;IAEA,OAAOnB,WAAW;EACpB;AACF;AAAC;AAAA,gCArTY1H,eAAe,aA+OT8I,kBAAW;AAAA,gCA/OjB9I,eAAe,kBAgPJ,CACpB+I,gBAAS,EACTC,sBAAY,EACZC,wBAAa,EACbC,kBAAU,EACVC,oBAAe,EACfC,kCAAkB,EAClBC,oBAAe,CAChB;AAAA,gCAxPUrJ,eAAe,WA0PX,CACbsJ,eAAI,CAACC,QAAQ,EAA8B,EAC3CD,eAAI,CAACC,QAAQ,EAAiB,EAC9BD,eAAI,CAACC,QAAQ,EAAwB,CACtC;AAyDH/B,gCAAiB,CAACgC,UAAU,CAACxJ,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.616/dist/application.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@0.0.616/dist/application.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/application",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.616",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/harmony/application",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "application",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.616"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"core-js": "^3.0.0",
|
|
18
18
|
"@babel/runtime": "7.20.0",
|
|
19
19
|
"@teambit/harmony": "0.4.6",
|
|
20
|
-
"@teambit/builder": "0.0.
|
|
21
|
-
"@teambit/component": "0.0.
|
|
22
|
-
"@teambit/isolator": "0.0.
|
|
23
|
-
"@teambit/envs": "0.0.
|
|
20
|
+
"@teambit/builder": "0.0.974",
|
|
21
|
+
"@teambit/component": "0.0.974",
|
|
22
|
+
"@teambit/isolator": "0.0.974",
|
|
23
|
+
"@teambit/envs": "0.0.974",
|
|
24
24
|
"@teambit/cli-table": "0.0.41",
|
|
25
|
-
"@teambit/cli": "0.0.
|
|
26
|
-
"@teambit/aspect-loader": "0.0.
|
|
25
|
+
"@teambit/cli": "0.0.654",
|
|
26
|
+
"@teambit/aspect-loader": "0.0.974",
|
|
27
27
|
"@teambit/bit-error": "0.0.402",
|
|
28
|
-
"@teambit/logger": "0.0.
|
|
29
|
-
"@teambit/workspace": "0.0.
|
|
28
|
+
"@teambit/logger": "0.0.747",
|
|
29
|
+
"@teambit/workspace": "0.0.974"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/react": "^17.0.8",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@teambit/legacy": "1.0.
|
|
42
|
+
"@teambit/legacy": "1.0.436",
|
|
43
43
|
"react": "^16.8.0 || ^17.0.0",
|
|
44
44
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
45
45
|
},
|
|
Binary file
|