@teambit/application 1.0.142 → 1.0.143

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.
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuites>
3
+ <testsuite name="teambit.harmony/application@1.0.143" tests="0" failures="0" errors="0" skipped="0"/>
4
+ </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/application-preview"]=t():e["teambit.harmony/application-preview"]=t()}(self,(()=>(()=>{"use strict";var e={21522:(e,t,o)=>{var n={id:"teambit.harmony/application@1.0.142",homepage:"https://bit.cloud/teambit/harmony/application",exported:!0};function r(){const e=i(o(87363));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/app.svg"}));a.__bit_component=n,t.Logo=a},87363:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>l,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(21522);o(87363);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,a);return(0,r.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const l=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/application-preview"]=t():e["teambit.harmony/application-preview"]=t()}(self,(()=>(()=>{"use strict";var e={32337:(e,t,o)=>{var n={id:"teambit.harmony/application@1.0.143",homepage:"https://bit.cloud/teambit/harmony/application",exported:!0};function r(){const e=i(o(87363));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/app.svg"}));a.__bit_component=n,t.Logo=a},87363:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>l,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(32337);o(87363);const r=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}var c={},s="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,a);return(0,r.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const l=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
@@ -33,15 +33,15 @@ export declare class AppContext extends ExecutionContext {
33
33
  * This can be used in different bundle options which run require.resolve
34
34
  * for example when configuring webpack aliases or webpack expose loader on the peers deps
35
35
  */
36
- readonly hostRootDir?: string;
36
+ readonly hostRootDir?: string | undefined;
37
37
  /**
38
38
  * A port to run the app on
39
39
  */
40
- readonly port?: number;
40
+ readonly port?: number | undefined;
41
41
  /**
42
42
  * path to the application component in the workspace
43
43
  */
44
- readonly workspaceComponentPath?: string;
44
+ readonly workspaceComponentPath?: string | undefined;
45
45
  /**
46
46
  * list of env variables to include.
47
47
  */
@@ -77,15 +77,15 @@ export declare class AppContext extends ExecutionContext {
77
77
  * This can be used in different bundle options which run require.resolve
78
78
  * for example when configuring webpack aliases or webpack expose loader on the peers deps
79
79
  */
80
- hostRootDir?: string,
80
+ hostRootDir?: string | undefined,
81
81
  /**
82
82
  * A port to run the app on
83
83
  */
84
- port?: number,
84
+ port?: number | undefined,
85
85
  /**
86
86
  * path to the application component in the workspace
87
87
  */
88
- workspaceComponentPath?: string,
88
+ workspaceComponentPath?: string | undefined,
89
89
  /**
90
90
  * list of env variables to include.
91
91
  */
@@ -8,11 +8,11 @@ export declare class AppDeployContext extends AppBuildContext {
8
8
  /**
9
9
  * public dir generated by the build.
10
10
  */
11
- readonly publicDir?: string;
11
+ readonly publicDir?: string | undefined;
12
12
  /**
13
13
  * ssr dir generated by the build.
14
14
  */
15
- readonly ssrPublicDir?: string;
15
+ readonly ssrPublicDir?: string | undefined;
16
16
  constructor(
17
17
  /**
18
18
  * app build context.
@@ -25,9 +25,9 @@ export declare class AppDeployContext extends AppBuildContext {
25
25
  /**
26
26
  * public dir generated by the build.
27
27
  */
28
- publicDir?: string,
28
+ publicDir?: string | undefined,
29
29
  /**
30
30
  * ssr dir generated by the build.
31
31
  */
32
- ssrPublicDir?: string);
32
+ ssrPublicDir?: string | undefined);
33
33
  }
@@ -11,6 +11,10 @@ export type ApplicationInstance = {
11
11
  * url of the running app.
12
12
  */
13
13
  url?: string;
14
+ /**
15
+ * function for closing the server.
16
+ */
17
+ stop?: () => Promise<void>;
14
18
  };
15
19
  /**
16
20
  * an instance of an application deployment.
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["app-instance.ts"],"sourcesContent":["export type ApplicationInstance = {\n /**\n * port in which app is running.\n */\n port?: number;\n\n /**\n * name of the app\n */\n appName?: string;\n\n /**\n * url of the running app.\n */\n url?: string;\n};\n\n/**\n * an instance of an application deployment.\n */\nexport type ApplicationDeployment = {\n /**\n * timestamp of the deployment.\n */\n timestamp?: string;\n\n /**\n * name of the deployed app.\n */\n appName?: string;\n\n /**\n * url the deployed app.\n */\n url?: string;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["app-instance.ts"],"sourcesContent":["export type ApplicationInstance = {\n /**\n * port in which app is running.\n */\n port?: number;\n\n /**\n * name of the app\n */\n appName?: string;\n\n /**\n * url of the running app.\n */\n url?: string;\n\n /**\n * function for closing the server.\n */\n stop?: () => Promise<void>;\n};\n\n/**\n * an instance of an application deployment.\n */\nexport type ApplicationDeployment = {\n /**\n * timestamp of the deployment.\n */\n timestamp?: string;\n\n /**\n * name of the deployed app.\n */\n appName?: string;\n\n /**\n * url the deployed app.\n */\n url?: string;\n};\n"],"mappings":""}
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const Logo: () => JSX.Element;
@@ -86,12 +86,12 @@ export declare class ApplicationMain {
86
86
  /**
87
87
  * get an application by a component id.
88
88
  */
89
- getAppById(id: ComponentID): Promise<Application>;
89
+ getAppById(id: ComponentID): Promise<Application | undefined>;
90
90
  /**
91
91
  * calculate an application by a component.
92
92
  * This should be only used during the on component load slot
93
93
  */
94
- calculateAppByComponent(component: Component): Application;
94
+ calculateAppByComponent(component: Component): Application | undefined;
95
95
  listAppTypes(): ApplicationType<unknown>[];
96
96
  /**
97
97
  * @deprecated use `listAppsComponents` instead.
@@ -126,8 +126,8 @@ export declare class ApplicationMain {
126
126
  loadAppsToSlot(): Promise<this>;
127
127
  runApp(appName: string, options?: ServeAppOptions): Promise<{
128
128
  app: Application;
129
- port: number;
130
- errors: any;
129
+ port: number | undefined;
130
+ errors: undefined;
131
131
  isOldApi: boolean;
132
132
  }>;
133
133
  /**
@@ -8,7 +8,7 @@ export declare class AppService implements EnvService<any> {
8
8
  registerAppType: (...appType: Array<ApplicationType<any>>) => void;
9
9
  run(context: ExecutionContext): Promise<ExecutionContext & {
10
10
  dev: boolean;
11
- errors: any[];
11
+ errors: never[];
12
12
  }>;
13
13
  transform(env: Env, context: EnvContext): ApplicationTransformationMap | undefined;
14
14
  }
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.142/dist/application.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.142/dist/application.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.143/dist/application.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_application@1.0.143/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.142",
3
+ "version": "1.0.143",
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.142"
9
+ "version": "1.0.143"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -17,29 +17,28 @@
17
17
  "@teambit/lane-id": "0.0.311",
18
18
  "@teambit/harmony": "0.4.6",
19
19
  "@teambit/bit-error": "0.0.404",
20
- "@teambit/builder": "1.0.142",
21
- "@teambit/component": "1.0.142",
22
- "@teambit/isolator": "1.0.142",
23
- "@teambit/envs": "1.0.142",
24
- "@teambit/logger": "0.0.941",
20
+ "@teambit/builder": "1.0.143",
21
+ "@teambit/component": "1.0.143",
22
+ "@teambit/isolator": "1.0.143",
23
+ "@teambit/envs": "1.0.143",
24
+ "@teambit/logger": "0.0.942",
25
25
  "@teambit/cli-table": "0.0.48",
26
- "@teambit/cli": "0.0.848",
27
- "@teambit/aspect-loader": "1.0.142",
28
- "@teambit/scope": "1.0.142",
29
- "@teambit/watcher": "1.0.142",
30
- "@teambit/workspace": "1.0.142"
26
+ "@teambit/cli": "0.0.849",
27
+ "@teambit/aspect-loader": "1.0.143",
28
+ "@teambit/scope": "1.0.143",
29
+ "@teambit/watcher": "1.0.143",
30
+ "@teambit/workspace": "1.0.143"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/lodash": "4.14.165",
34
34
  "@types/pluralize": "0.0.29",
35
35
  "@types/mocha": "9.1.0",
36
- "@types/jest": "^29.2.2",
37
- "@types/testing-library__jest-dom": "^5.9.5",
38
- "@teambit/harmony.envs.core-aspect-env": "0.0.19"
36
+ "chai": "4.3.0",
37
+ "@teambit/harmony.envs.core-aspect-env": "0.0.24"
39
38
  },
40
39
  "peerDependencies": {
41
40
  "react": "^17.0.0 || ^18.0.0",
42
- "@types/react": "17.0.8",
41
+ "@types/react": "^17.0.73",
43
42
  "@teambit/legacy": "1.0.624"
44
43
  },
45
44
  "license": "Apache-2.0",
@@ -54,7 +53,8 @@
54
53
  "default": "./dist/index.js"
55
54
  },
56
55
  "./dist/*": "./dist/*",
57
- "./artifacts/*": "./artifacts/*"
56
+ "./artifacts/*": "./artifacts/*",
57
+ "./*": "./*.ts"
58
58
  },
59
59
  "private": false,
60
60
  "engines": {
package/tsconfig.json CHANGED
@@ -17,7 +17,10 @@
17
17
  "resolveJsonModule": true,
18
18
  "allowJs": true,
19
19
  "outDir": "dist",
20
- "emitDeclarationOnly": true
20
+ "emitDeclarationOnly": true,
21
+ "strict": true,
22
+ "strictPropertyInitialization": false,
23
+ "noImplicitAny": false
21
24
  },
22
25
  "exclude": [
23
26
  "artifacts",