@teambit/application 0.0.522 → 0.0.524
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/app-context.js +2 -8
- package/dist/app-context.js.map +1 -1
- package/dist/app-list.cmd.js +2 -17
- package/dist/app-list.cmd.js.map +1 -1
- package/dist/app-server.js +0 -4
- package/dist/app-server.js.map +1 -1
- package/dist/app-type.plugin.js +0 -15
- package/dist/app-type.plugin.js.map +1 -1
- package/dist/app.cmd.js +2 -22
- package/dist/app.cmd.js.map +1 -1
- package/dist/app.plugin.js +2 -11
- package/dist/app.plugin.js.map +1 -1
- package/dist/application.aspect.js +0 -5
- package/dist/application.aspect.js.map +1 -1
- package/dist/application.composition.js +0 -6
- package/dist/application.composition.js.map +1 -1
- package/dist/application.main.runtime.js +14 -116
- package/dist/application.main.runtime.js.map +1 -1
- package/dist/application.service.js +0 -9
- package/dist/application.service.js.map +1 -1
- package/dist/build.task.js +0 -32
- package/dist/build.task.js.map +1 -1
- package/dist/deploy.task.js +0 -28
- package/dist/deploy.task.js.map +1 -1
- package/dist/exceptions/app-no-ssr.js +0 -3
- package/dist/exceptions/app-no-ssr.js.map +1 -1
- package/dist/exceptions/app-not-found.js +0 -3
- package/dist/exceptions/app-not-found.js.map +1 -1
- package/dist/exceptions/index.js +0 -3
- package/dist/exceptions/index.js.map +1 -1
- package/dist/index.js +0 -24
- package/dist/index.js.map +1 -1
- package/dist/run.cmd.js +0 -23
- package/dist/run.cmd.js.map +1 -1
- package/package-tar/teambit-application-0.0.524.tgz +0 -0
- package/package.json +11 -11
- package/{preview-1666312873430.js → preview-1666496165706.js} +2 -2
- package/package-tar/teambit-application-0.0.522.tgz +0 -0
package/dist/app-context.js
CHANGED
|
@@ -4,17 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AppContext = void 0;
|
|
7
|
-
|
|
8
7
|
function _envs() {
|
|
9
8
|
const data = require("@teambit/envs");
|
|
10
|
-
|
|
11
9
|
_envs = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
class AppContext extends _envs().ExecutionContext {
|
|
19
15
|
constructor(appName,
|
|
20
16
|
/**
|
|
@@ -34,13 +30,11 @@ class AppContext extends _envs().ExecutionContext {
|
|
|
34
30
|
this.appComponent = appComponent;
|
|
35
31
|
this.workdir = workdir;
|
|
36
32
|
this.hostRootDir = hostRootDir;
|
|
37
|
-
}
|
|
33
|
+
}
|
|
34
|
+
// static fromExecContext() {
|
|
38
35
|
// return new AppContext();
|
|
39
36
|
// }
|
|
40
|
-
|
|
41
|
-
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
exports.AppContext = AppContext;
|
|
45
39
|
|
|
46
40
|
//# sourceMappingURL=app-context.js.map
|
package/dist/app-context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppContext","ExecutionContext","constructor","appName","dev","appComponent","workdir","execContext","hostRootDir","upper","envRuntime","components"],"sources":["app-context.ts"],"sourcesContent":["import { ExecutionContext } from '@teambit/envs';\nimport { Component } from '@teambit/component';\n\nexport class AppContext extends ExecutionContext {\n constructor(\n readonly appName: string,\n\n /**\n * determine whether to serve the application in dev mode.\n */\n readonly dev: boolean,\n\n readonly appComponent: Component,\n\n readonly workdir: string,\n\n execContext: ExecutionContext,\n\n /**\n * A path for the host root dir\n * Host root dir is the dir where we run the app from\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n readonly hostRootDir?: string\n ) {\n super(execContext.upper, execContext.envRuntime, execContext.components);\n }\n // static fromExecContext() {\n // return new AppContext();\n // }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AppContext","ExecutionContext","constructor","appName","dev","appComponent","workdir","execContext","hostRootDir","upper","envRuntime","components"],"sources":["app-context.ts"],"sourcesContent":["import { ExecutionContext } from '@teambit/envs';\nimport { Component } from '@teambit/component';\n\nexport class AppContext extends ExecutionContext {\n constructor(\n readonly appName: string,\n\n /**\n * determine whether to serve the application in dev mode.\n */\n readonly dev: boolean,\n\n readonly appComponent: Component,\n\n readonly workdir: string,\n\n execContext: ExecutionContext,\n\n /**\n * A path for the host root dir\n * Host root dir is the dir where we run the app from\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n readonly hostRootDir?: string\n ) {\n super(execContext.upper, execContext.envRuntime, execContext.components);\n }\n // static fromExecContext() {\n // return new AppContext();\n // }\n}\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,UAAU,SAASC,wBAAgB,CAAC;EAC/CC,WAAW,CACAC,OAAe;EAExB;AACJ;AACA;EACaC,GAAY,EAEZC,YAAuB,EAEvBC,OAAe,EAExBC,WAA6B;EAE7B;AACJ;AACA;AACA;AACA;AACA;EACaC,WAAoB,EAC7B;IACA,KAAK,CAACD,WAAW,CAACE,KAAK,EAAEF,WAAW,CAACG,UAAU,EAAEH,WAAW,CAACI,UAAU,CAAC;IAAC,KArBhER,OAAe,GAAfA,OAAe;IAAA,KAKfC,GAAY,GAAZA,GAAY;IAAA,KAEZC,YAAuB,GAAvBA,YAAuB;IAAA,KAEvBC,OAAe,GAAfA,OAAe;IAAA,KAUfE,WAAoB,GAApBA,WAAoB;EAG/B;EACA;EACA;EACA;AACF;AAAC"}
|
package/dist/app-list.cmd.js
CHANGED
|
@@ -1,44 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.promise.js");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.AppListCmdDeprecated = void 0;
|
|
11
|
-
|
|
12
9
|
function _defineProperty2() {
|
|
13
10
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
|
|
15
11
|
_defineProperty2 = function () {
|
|
16
12
|
return data;
|
|
17
13
|
};
|
|
18
|
-
|
|
19
14
|
return data;
|
|
20
15
|
}
|
|
21
|
-
|
|
22
16
|
function _chalk() {
|
|
23
17
|
const data = _interopRequireDefault(require("chalk"));
|
|
24
|
-
|
|
25
18
|
_chalk = function () {
|
|
26
19
|
return data;
|
|
27
20
|
};
|
|
28
|
-
|
|
29
21
|
return data;
|
|
30
22
|
}
|
|
31
|
-
|
|
32
23
|
function _cliTable() {
|
|
33
24
|
const data = require("@teambit/cli-table");
|
|
34
|
-
|
|
35
25
|
_cliTable = function () {
|
|
36
26
|
return data;
|
|
37
27
|
};
|
|
38
|
-
|
|
39
28
|
return data;
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
// import { Logger } from '@teambit/logger';
|
|
43
31
|
|
|
44
32
|
/**
|
|
@@ -54,14 +42,13 @@ class AppListCmdDeprecated {
|
|
|
54
42
|
(0, _defineProperty2().default)(this, "group", 'apps');
|
|
55
43
|
(0, _defineProperty2().default)(this, "options", [['j', 'json', 'return the component data in json format']]);
|
|
56
44
|
}
|
|
57
|
-
|
|
58
45
|
async report(args, {
|
|
59
46
|
json
|
|
60
47
|
}) {
|
|
61
48
|
const apps = this.applicationAspect.listApps();
|
|
62
49
|
if (json) return JSON.stringify(apps, null, 2);
|
|
63
|
-
const deprecationStr = `this command is deprecated. please use "bit app list" instead\n`;
|
|
64
|
-
|
|
50
|
+
const deprecationStr = `this command is deprecated. please use "bit app list" instead\n`;
|
|
51
|
+
// eslint-disable-next-line no-console
|
|
65
52
|
console.log(_chalk().default.red());
|
|
66
53
|
if (!apps.length) return _chalk().default.yellow(`${deprecationStr}no apps found`);
|
|
67
54
|
const rows = apps.map(app => {
|
|
@@ -70,9 +57,7 @@ class AppListCmdDeprecated {
|
|
|
70
57
|
const table = new (_cliTable().CLITable)([], rows);
|
|
71
58
|
return deprecationStr + table.render();
|
|
72
59
|
}
|
|
73
|
-
|
|
74
60
|
}
|
|
75
|
-
|
|
76
61
|
exports.AppListCmdDeprecated = AppListCmdDeprecated;
|
|
77
62
|
|
|
78
63
|
//# sourceMappingURL=app-list.cmd.js.map
|
package/dist/app-list.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppListCmdDeprecated","constructor","applicationAspect","report","args","json","apps","listApps","JSON","stringify","deprecationStr","console","log","chalk","red","length","yellow","rows","map","app","name","table","CLITable","render"],"sources":["app-list.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\n// import { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { CLITable } from '@teambit/cli-table';\nimport { ApplicationMain } from './application.main.runtime';\n\n/**\n * @deprecated use AppListCmd class\n */\nexport class AppListCmdDeprecated implements Command {\n name = 'app-list';\n description = 'DEPRECATED. use \"bit app list\"';\n alias = '';\n private = true;\n group = 'apps';\n options = [['j', 'json', 'return the component data in json format']] as CommandOptions;\n\n constructor(private applicationAspect: ApplicationMain) {}\n\n async report(args: [string], { json }: { json: boolean }) {\n const apps = this.applicationAspect.listApps();\n if (json) return JSON.stringify(apps, null, 2);\n const deprecationStr = `this command is deprecated. please use \"bit app list\" instead\\n`;\n // eslint-disable-next-line no-console\n console.log(chalk.red());\n if (!apps.length) return chalk.yellow(`${deprecationStr}no apps found`);\n\n const rows = apps.map((app) => {\n return [app.name];\n });\n\n const table = new CLITable([], rows);\n return deprecationStr + table.render();\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AppListCmdDeprecated","constructor","applicationAspect","report","args","json","apps","listApps","JSON","stringify","deprecationStr","console","log","chalk","red","length","yellow","rows","map","app","name","table","CLITable","render"],"sources":["app-list.cmd.tsx"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\n// import { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { CLITable } from '@teambit/cli-table';\nimport { ApplicationMain } from './application.main.runtime';\n\n/**\n * @deprecated use AppListCmd class\n */\nexport class AppListCmdDeprecated implements Command {\n name = 'app-list';\n description = 'DEPRECATED. use \"bit app list\"';\n alias = '';\n private = true;\n group = 'apps';\n options = [['j', 'json', 'return the component data in json format']] as CommandOptions;\n\n constructor(private applicationAspect: ApplicationMain) {}\n\n async report(args: [string], { json }: { json: boolean }) {\n const apps = this.applicationAspect.listApps();\n if (json) return JSON.stringify(apps, null, 2);\n const deprecationStr = `this command is deprecated. please use \"bit app list\" instead\\n`;\n // eslint-disable-next-line no-console\n console.log(chalk.red());\n if (!apps.length) return chalk.yellow(`${deprecationStr}no apps found`);\n\n const rows = apps.map((app) => {\n return [app.name];\n });\n\n const table = new CLITable([], rows);\n return deprecationStr + table.render();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAFA;;AAKA;AACA;AACA;AACO,MAAMA,oBAAoB,CAAoB;EAQnDC,WAAW,CAASC,iBAAkC,EAAE;IAAA,KAApCA,iBAAkC,GAAlCA,iBAAkC;IAAA,8CAP/C,UAAU;IAAA,qDACH,gCAAgC;IAAA,+CACtC,EAAE;IAAA,iDACA,IAAI;IAAA,+CACN,MAAM;IAAA,iDACJ,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,0CAA0C,CAAC,CAAC;EAEZ;EAEzD,MAAMC,MAAM,CAACC,IAAc,EAAE;IAAEC;EAAwB,CAAC,EAAE;IACxD,MAAMC,IAAI,GAAG,IAAI,CAACJ,iBAAiB,CAACK,QAAQ,EAAE;IAC9C,IAAIF,IAAI,EAAE,OAAOG,IAAI,CAACC,SAAS,CAACH,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,MAAMI,cAAc,GAAI,iEAAgE;IACxF;IACAC,OAAO,CAACC,GAAG,CAACC,gBAAK,CAACC,GAAG,EAAE,CAAC;IACxB,IAAI,CAACR,IAAI,CAACS,MAAM,EAAE,OAAOF,gBAAK,CAACG,MAAM,CAAE,GAAEN,cAAe,eAAc,CAAC;IAEvE,MAAMO,IAAI,GAAGX,IAAI,CAACY,GAAG,CAAEC,GAAG,IAAK;MAC7B,OAAO,CAACA,GAAG,CAACC,IAAI,CAAC;IACnB,CAAC,CAAC;IAEF,MAAMC,KAAK,GAAG,KAAIC,oBAAQ,EAAC,EAAE,EAAEL,IAAI,CAAC;IACpC,OAAOP,cAAc,GAAGW,KAAK,CAACE,MAAM,EAAE;EACxC;AACF;AAAC"}
|
package/dist/app-server.js
CHANGED
|
@@ -4,18 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AppServer = void 0;
|
|
7
|
-
|
|
8
7
|
class AppServer {
|
|
9
8
|
constructor(app) {
|
|
10
9
|
this.app = app;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
get name() {
|
|
14
12
|
return this.app.name;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
exports.AppServer = AppServer;
|
|
20
16
|
|
|
21
17
|
//# sourceMappingURL=app-server.js.map
|
package/dist/app-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppServer","constructor","app","name"],"sources":["app-server.ts"],"sourcesContent":["import { Application } from './application';\n\nexport class AppServer {\n constructor(private app: Application) {}\n\n get name() {\n return this.app.name;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AppServer","constructor","app","name"],"sources":["app-server.ts"],"sourcesContent":["import { Application } from './application';\n\nexport class AppServer {\n constructor(private app: Application) {}\n\n get name() {\n return this.app.name;\n }\n}\n"],"mappings":";;;;;;AAEO,MAAMA,SAAS,CAAC;EACrBC,WAAW,CAASC,GAAgB,EAAE;IAAA,KAAlBA,GAAgB,GAAhBA,GAAgB;EAAG;EAEvC,IAAIC,IAAI,GAAG;IACT,OAAO,IAAI,CAACD,GAAG,CAACC,IAAI;EACtB;AACF;AAAC"}
|
package/dist/app-type.plugin.js
CHANGED
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.AppTypePlugin = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _bitError() {
|
|
21
16
|
const data = require("@teambit/bit-error");
|
|
22
|
-
|
|
23
17
|
_bitError = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
function _cli() {
|
|
31
23
|
const data = require("@teambit/cli");
|
|
32
|
-
|
|
33
24
|
_cli = function () {
|
|
34
25
|
return data;
|
|
35
26
|
};
|
|
36
|
-
|
|
37
27
|
return data;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
29
|
class AppTypePlugin {
|
|
41
30
|
constructor(pattern, appType, appSlot) {
|
|
42
31
|
this.pattern = pattern;
|
|
@@ -44,21 +33,17 @@ class AppTypePlugin {
|
|
|
44
33
|
this.appSlot = appSlot;
|
|
45
34
|
(0, _defineProperty2().default)(this, "runtimes", [_cli().MainRuntime.name]);
|
|
46
35
|
}
|
|
47
|
-
|
|
48
36
|
register(object) {
|
|
49
37
|
const app = this.appType.createApp(object);
|
|
50
38
|
this.validateApp(app);
|
|
51
39
|
this.appSlot.register([app]);
|
|
52
40
|
}
|
|
53
|
-
|
|
54
41
|
validateApp(app) {
|
|
55
42
|
if (app.name.includes(' ')) {
|
|
56
43
|
throw new (_bitError().BitError)(`app name "${app.name}" is invalid. spaces are not permitted`);
|
|
57
44
|
}
|
|
58
45
|
}
|
|
59
|
-
|
|
60
46
|
}
|
|
61
|
-
|
|
62
47
|
exports.AppTypePlugin = AppTypePlugin;
|
|
63
48
|
|
|
64
49
|
//# sourceMappingURL=app-type.plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppTypePlugin","constructor","pattern","appType","appSlot","MainRuntime","name","register","object","app","createApp","validateApp","includes","BitError"],"sources":["app-type.plugin.ts"],"sourcesContent":["import { PluginDefinition } from '@teambit/aspect-loader';\nimport { BitError } from '@teambit/bit-error';\nimport { MainRuntime } from '@teambit/cli';\nimport { Application } from './application';\nimport { ApplicationType } from './application-type';\nimport { ApplicationSlot } from './application.main.runtime';\n\nexport class AppTypePlugin implements PluginDefinition {\n constructor(readonly pattern: string, private appType: ApplicationType<unknown>, private appSlot: ApplicationSlot) {}\n\n runtimes = [MainRuntime.name];\n\n register(object: any) {\n const app = this.appType.createApp(object);\n this.validateApp(app);\n this.appSlot.register([app]);\n }\n\n private validateApp(app: Application) {\n if (app.name.includes(' ')) {\n throw new BitError(`app name \"${app.name}\" is invalid. spaces are not permitted`);\n }\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AppTypePlugin","constructor","pattern","appType","appSlot","MainRuntime","name","register","object","app","createApp","validateApp","includes","BitError"],"sources":["app-type.plugin.ts"],"sourcesContent":["import { PluginDefinition } from '@teambit/aspect-loader';\nimport { BitError } from '@teambit/bit-error';\nimport { MainRuntime } from '@teambit/cli';\nimport { Application } from './application';\nimport { ApplicationType } from './application-type';\nimport { ApplicationSlot } from './application.main.runtime';\n\nexport class AppTypePlugin implements PluginDefinition {\n constructor(readonly pattern: string, private appType: ApplicationType<unknown>, private appSlot: ApplicationSlot) {}\n\n runtimes = [MainRuntime.name];\n\n register(object: any) {\n const app = this.appType.createApp(object);\n this.validateApp(app);\n this.appSlot.register([app]);\n }\n\n private validateApp(app: Application) {\n if (app.name.includes(' ')) {\n throw new BitError(`app name \"${app.name}\" is invalid. spaces are not permitted`);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKO,MAAMA,aAAa,CAA6B;EACrDC,WAAW,CAAUC,OAAe,EAAUC,OAAiC,EAAUC,OAAwB,EAAE;IAAA,KAA9FF,OAAe,GAAfA,OAAe;IAAA,KAAUC,OAAiC,GAAjCA,OAAiC;IAAA,KAAUC,OAAwB,GAAxBA,OAAwB;IAAA,kDAEtG,CAACC,kBAAW,CAACC,IAAI,CAAC;EAFuF;EAIpHC,QAAQ,CAACC,MAAW,EAAE;IACpB,MAAMC,GAAG,GAAG,IAAI,CAACN,OAAO,CAACO,SAAS,CAACF,MAAM,CAAC;IAC1C,IAAI,CAACG,WAAW,CAACF,GAAG,CAAC;IACrB,IAAI,CAACL,OAAO,CAACG,QAAQ,CAAC,CAACE,GAAG,CAAC,CAAC;EAC9B;EAEQE,WAAW,CAACF,GAAgB,EAAE;IACpC,IAAIA,GAAG,CAACH,IAAI,CAACM,QAAQ,CAAC,GAAG,CAAC,EAAE;MAC1B,MAAM,KAAIC,oBAAQ,EAAE,aAAYJ,GAAG,CAACH,IAAK,wCAAuC,CAAC;IACnF;EACF;AACF;AAAC"}
|
package/dist/app.cmd.js
CHANGED
|
@@ -1,52 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.flat-map.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.array.iterator.js");
|
|
8
|
-
|
|
9
6
|
require("core-js/modules/es.array.unscopables.flat-map.js");
|
|
10
|
-
|
|
11
7
|
require("core-js/modules/es.promise.js");
|
|
12
|
-
|
|
13
8
|
Object.defineProperty(exports, "__esModule", {
|
|
14
9
|
value: true
|
|
15
10
|
});
|
|
16
11
|
exports.AppListCmd = exports.AppCmd = void 0;
|
|
17
|
-
|
|
18
12
|
function _defineProperty2() {
|
|
19
13
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
|
|
21
14
|
_defineProperty2 = function () {
|
|
22
15
|
return data;
|
|
23
16
|
};
|
|
24
|
-
|
|
25
17
|
return data;
|
|
26
18
|
}
|
|
27
|
-
|
|
28
19
|
function _chalk() {
|
|
29
20
|
const data = _interopRequireDefault(require("chalk"));
|
|
30
|
-
|
|
31
21
|
_chalk = function () {
|
|
32
22
|
return data;
|
|
33
23
|
};
|
|
34
|
-
|
|
35
24
|
return data;
|
|
36
25
|
}
|
|
37
|
-
|
|
38
26
|
function _cliTable() {
|
|
39
27
|
const data = require("@teambit/cli-table");
|
|
40
|
-
|
|
41
28
|
_cliTable = function () {
|
|
42
29
|
return data;
|
|
43
30
|
};
|
|
44
|
-
|
|
45
31
|
return data;
|
|
46
32
|
}
|
|
47
|
-
|
|
48
33
|
// eslint-disable-next-line max-classes-per-file
|
|
34
|
+
|
|
49
35
|
// import { Logger } from '@teambit/logger';
|
|
36
|
+
|
|
50
37
|
class AppListCmd {
|
|
51
38
|
constructor(applicationAspect) {
|
|
52
39
|
this.applicationAspect = applicationAspect;
|
|
@@ -56,7 +43,6 @@ class AppListCmd {
|
|
|
56
43
|
(0, _defineProperty2().default)(this, "group", 'apps');
|
|
57
44
|
(0, _defineProperty2().default)(this, "options", [['j', 'json', 'return the component data in json format']]);
|
|
58
45
|
}
|
|
59
|
-
|
|
60
46
|
async report(args, {
|
|
61
47
|
json
|
|
62
48
|
}) {
|
|
@@ -69,11 +55,8 @@ class AppListCmd {
|
|
|
69
55
|
const table = new (_cliTable().CLITable)(['id', 'name'], rows);
|
|
70
56
|
return table.render();
|
|
71
57
|
}
|
|
72
|
-
|
|
73
58
|
}
|
|
74
|
-
|
|
75
59
|
exports.AppListCmd = AppListCmd;
|
|
76
|
-
|
|
77
60
|
class AppCmd {
|
|
78
61
|
constructor() {
|
|
79
62
|
(0, _defineProperty2().default)(this, "name", 'app <sub-command>');
|
|
@@ -83,15 +66,12 @@ class AppCmd {
|
|
|
83
66
|
(0, _defineProperty2().default)(this, "commands", []);
|
|
84
67
|
(0, _defineProperty2().default)(this, "options", []);
|
|
85
68
|
}
|
|
86
|
-
|
|
87
69
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
88
70
|
async report(args) {
|
|
89
71
|
// it should never be here. Yargs throws an error before reaching this method.
|
|
90
72
|
return `Please specify a sub-command`;
|
|
91
73
|
}
|
|
92
|
-
|
|
93
74
|
}
|
|
94
|
-
|
|
95
75
|
exports.AppCmd = AppCmd;
|
|
96
76
|
|
|
97
77
|
//# sourceMappingURL=app.cmd.js.map
|
package/dist/app.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppListCmd","constructor","applicationAspect","report","args","json","appComponents","mapApps","JSON","stringify","length","chalk","yellow","rows","flatMap","id","apps","map","app","name","table","CLITable","render","AppCmd"],"sources":["app.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\n// import { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { CLITable } from '@teambit/cli-table';\nimport { ApplicationMain } from './application.main.runtime';\n\nexport class AppListCmd implements Command {\n name = 'list';\n description = 'list all registered apps';\n alias = '';\n group = 'apps';\n options = [['j', 'json', 'return the component data in json format']] as CommandOptions;\n\n constructor(private applicationAspect: ApplicationMain) {}\n\n async report(args: [string], { json }: { json: boolean }) {\n const appComponents = this.applicationAspect.mapApps();\n if (json) return JSON.stringify(appComponents, null, 2);\n if (!appComponents.length) return chalk.yellow('no apps found');\n\n const rows = appComponents.flatMap(([id, apps]) => {\n return apps.map((app) => [id, app.name]);\n });\n\n const table = new CLITable(['id', 'name'], rows);\n return table.render();\n }\n}\n\nexport class AppCmd implements Command {\n name = 'app <sub-command>';\n description = 'Manages apps';\n alias = '';\n group = 'apps';\n commands: Command[] = [];\n options = [] as CommandOptions;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async report(args: [string]) {\n // it should never be here. Yargs throws an error before reaching this method.\n return `Please specify a sub-command`;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AppListCmd","constructor","applicationAspect","report","args","json","appComponents","mapApps","JSON","stringify","length","chalk","yellow","rows","flatMap","id","apps","map","app","name","table","CLITable","render","AppCmd"],"sources":["app.cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\n// import { Logger } from '@teambit/logger';\nimport chalk from 'chalk';\nimport { CLITable } from '@teambit/cli-table';\nimport { ApplicationMain } from './application.main.runtime';\n\nexport class AppListCmd implements Command {\n name = 'list';\n description = 'list all registered apps';\n alias = '';\n group = 'apps';\n options = [['j', 'json', 'return the component data in json format']] as CommandOptions;\n\n constructor(private applicationAspect: ApplicationMain) {}\n\n async report(args: [string], { json }: { json: boolean }) {\n const appComponents = this.applicationAspect.mapApps();\n if (json) return JSON.stringify(appComponents, null, 2);\n if (!appComponents.length) return chalk.yellow('no apps found');\n\n const rows = appComponents.flatMap(([id, apps]) => {\n return apps.map((app) => [id, app.name]);\n });\n\n const table = new CLITable(['id', 'name'], rows);\n return table.render();\n }\n}\n\nexport class AppCmd implements Command {\n name = 'app <sub-command>';\n description = 'Manages apps';\n alias = '';\n group = 'apps';\n commands: Command[] = [];\n options = [] as CommandOptions;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async report(args: [string]) {\n // it should never be here. Yargs throws an error before reaching this method.\n return `Please specify a sub-command`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAJA;;AAEA;;AAKO,MAAMA,UAAU,CAAoB;EAOzCC,WAAW,CAASC,iBAAkC,EAAE;IAAA,KAApCA,iBAAkC,GAAlCA,iBAAkC;IAAA,8CAN/C,MAAM;IAAA,qDACC,0BAA0B;IAAA,+CAChC,EAAE;IAAA,+CACF,MAAM;IAAA,iDACJ,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,0CAA0C,CAAC,CAAC;EAEZ;EAEzD,MAAMC,MAAM,CAACC,IAAc,EAAE;IAAEC;EAAwB,CAAC,EAAE;IACxD,MAAMC,aAAa,GAAG,IAAI,CAACJ,iBAAiB,CAACK,OAAO,EAAE;IACtD,IAAIF,IAAI,EAAE,OAAOG,IAAI,CAACC,SAAS,CAACH,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,IAAI,CAACA,aAAa,CAACI,MAAM,EAAE,OAAOC,gBAAK,CAACC,MAAM,CAAC,eAAe,CAAC;IAE/D,MAAMC,IAAI,GAAGP,aAAa,CAACQ,OAAO,CAAC,CAAC,CAACC,EAAE,EAAEC,IAAI,CAAC,KAAK;MACjD,OAAOA,IAAI,CAACC,GAAG,CAAEC,GAAG,IAAK,CAACH,EAAE,EAAEG,GAAG,CAACC,IAAI,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF,MAAMC,KAAK,GAAG,KAAIC,oBAAQ,EAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAER,IAAI,CAAC;IAChD,OAAOO,KAAK,CAACE,MAAM,EAAE;EACvB;AACF;AAAC;AAEM,MAAMC,MAAM,CAAoB;EAAA;IAAA,8CAC9B,mBAAmB;IAAA,qDACZ,cAAc;IAAA,+CACpB,EAAE;IAAA,+CACF,MAAM;IAAA,kDACQ,EAAE;IAAA,iDACd,EAAE;EAAA;EAEZ;EACA,MAAMpB,MAAM,CAACC,IAAc,EAAE;IAC3B;IACA,OAAQ,8BAA6B;EACvC;AACF;AAAC"}
|
package/dist/app.plugin.js
CHANGED
|
@@ -1,46 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.AppPlugin = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _cli() {
|
|
21
16
|
const data = require("@teambit/cli");
|
|
22
|
-
|
|
23
17
|
_cli = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
class AppPlugin {
|
|
31
23
|
constructor(appSlot) {
|
|
32
24
|
this.appSlot = appSlot;
|
|
33
25
|
(0, _defineProperty2().default)(this, "pattern", '*.app.*?(ts|tsx|js|jsx)$');
|
|
34
26
|
(0, _defineProperty2().default)(this, "runtimes", [_cli().MainRuntime.name]);
|
|
35
|
-
}
|
|
27
|
+
}
|
|
36
28
|
|
|
29
|
+
// TODO - this matches NOTHING
|
|
37
30
|
|
|
38
31
|
register(object) {
|
|
39
32
|
return this.appSlot.register([object]);
|
|
40
33
|
}
|
|
41
|
-
|
|
42
34
|
}
|
|
43
|
-
|
|
44
35
|
exports.AppPlugin = AppPlugin;
|
|
45
36
|
|
|
46
37
|
//# sourceMappingURL=app.plugin.js.map
|
package/dist/app.plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AppPlugin","constructor","appSlot","MainRuntime","name","register","object"],"sources":["app.plugin.ts"],"sourcesContent":["import { PluginDefinition } from '@teambit/aspect-loader';\nimport { MainRuntime } from '@teambit/cli';\nimport { ApplicationSlot } from './application.main.runtime';\n\nexport class AppPlugin implements PluginDefinition {\n constructor(private appSlot: ApplicationSlot) {}\n\n // TODO - this matches NOTHING\n pattern = '*.app.*?(ts|tsx|js|jsx)$';\n\n runtimes = [MainRuntime.name];\n\n register(object: any) {\n return this.appSlot.register([object]);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AppPlugin","constructor","appSlot","MainRuntime","name","register","object"],"sources":["app.plugin.ts"],"sourcesContent":["import { PluginDefinition } from '@teambit/aspect-loader';\nimport { MainRuntime } from '@teambit/cli';\nimport { ApplicationSlot } from './application.main.runtime';\n\nexport class AppPlugin implements PluginDefinition {\n constructor(private appSlot: ApplicationSlot) {}\n\n // TODO - this matches NOTHING\n pattern = '*.app.*?(ts|tsx|js|jsx)$';\n\n runtimes = [MainRuntime.name];\n\n register(object: any) {\n return this.appSlot.register([object]);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,SAAS,CAA6B;EACjDC,WAAW,CAASC,OAAwB,EAAE;IAAA,KAA1BA,OAAwB,GAAxBA,OAAwB;IAAA,iDAGlC,0BAA0B;IAAA,kDAEzB,CAACC,kBAAW,CAACC,IAAI,CAAC;EALkB;;EAE/C;;EAKAC,QAAQ,CAACC,MAAW,EAAE;IACpB,OAAO,IAAI,CAACJ,OAAO,CAACG,QAAQ,CAAC,CAACC,MAAM,CAAC,CAAC;EACxC;AACF;AAAC"}
|
|
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ApplicationAspect = void 0;
|
|
7
|
-
|
|
8
7
|
function _harmony() {
|
|
9
8
|
const data = require("@teambit/harmony");
|
|
10
|
-
|
|
11
9
|
_harmony = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
const ApplicationAspect = _harmony().Aspect.create({
|
|
19
15
|
id: 'teambit.harmony/application'
|
|
20
16
|
});
|
|
21
|
-
|
|
22
17
|
exports.ApplicationAspect = ApplicationAspect;
|
|
23
18
|
|
|
24
19
|
//# sourceMappingURL=application.aspect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApplicationAspect","Aspect","create","id"],"sources":["application.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ApplicationAspect = Aspect.create({\n id: 'teambit.harmony/application',\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ApplicationAspect","Aspect","create","id"],"sources":["application.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ApplicationAspect = Aspect.create({\n id: 'teambit.harmony/application',\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,iBAAiB,GAAGC,iBAAM,CAACC,MAAM,CAAC;EAC7CC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC"}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Logo = void 0;
|
|
9
|
-
|
|
10
8
|
function _react() {
|
|
11
9
|
const data = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
10
|
_react = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
21
16
|
style: {
|
|
22
17
|
height: '100%',
|
|
@@ -29,7 +24,6 @@ const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
|
29
24
|
},
|
|
30
25
|
src: "https://static.bit.dev/extensions-icons/app.svg"
|
|
31
26
|
}));
|
|
32
|
-
|
|
33
27
|
exports.Logo = Logo;
|
|
34
28
|
|
|
35
29
|
//# sourceMappingURL=application.composition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["application.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/app.svg\" />\n </div>\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["application.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/app.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAE;EAAC,GAAG,EAAC;AAAiD,EAAG,CAEtF;AAAC"}
|