@teambit/cloud 0.0.387 → 0.0.388

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,5 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+
3
+ export const CloudAspect = Aspect.create({
4
+ id: 'teambit.cloud/cloud',
5
+ });
@@ -0,0 +1,85 @@
1
+ import { MainRuntime } from '@teambit/cli';
2
+ import {
3
+ getCloudDomain,
4
+ DEFAULT_HUB_DOMAIN,
5
+ getSymphonyUrl,
6
+ SYMPHONY_GRAPHQL,
7
+ getLoginUrl,
8
+ DEFAULT_ANALYTICS_DOMAIN,
9
+ DEFAULT_REGISTRY_URL,
10
+ CENTRAL_BIT_HUB_URL,
11
+ CENTRAL_BIT_HUB_NAME,
12
+ } from '@teambit/legacy/dist/constants';
13
+
14
+ import { CloudAspect } from './cloud.aspect';
15
+
16
+ export interface CloudWorkspaceConfig {
17
+ cloudDomain: string;
18
+ cloudHubDomain: string;
19
+ cloudApi: string;
20
+ cloudGraphQL: string;
21
+ loginDomain: string;
22
+ analyticsDomain: string;
23
+ registryUrl: string;
24
+ cloudExporterUrl: string;
25
+ cloudHubName: string;
26
+ }
27
+
28
+ export class CloudMain {
29
+ constructor(private config: CloudWorkspaceConfig) {}
30
+
31
+ getCloudDomain(): string {
32
+ return this.config.cloudDomain;
33
+ }
34
+
35
+ getCloudHubDomain(): string {
36
+ return this.config.cloudHubDomain;
37
+ }
38
+
39
+ getCloudApi(): string {
40
+ return this.config.cloudApi;
41
+ }
42
+
43
+ getCloudGraphQL(): string {
44
+ return this.config.cloudGraphQL;
45
+ }
46
+ getLoginDomain(): string {
47
+ return this.config.loginDomain;
48
+ }
49
+
50
+ getAnalyticsDomain(): string {
51
+ return this.config.analyticsDomain;
52
+ }
53
+
54
+ getRegistryUrl(): string {
55
+ return this.config.registryUrl;
56
+ }
57
+
58
+ getCloudExporterUrl(): string {
59
+ return this.config.cloudExporterUrl;
60
+ }
61
+
62
+ getHubName(): string {
63
+ return this.config.cloudHubName;
64
+ }
65
+
66
+ static slots = [];
67
+ static dependencies = [];
68
+ static runtime = MainRuntime;
69
+ static defaultConfig: CloudWorkspaceConfig = {
70
+ cloudDomain: getCloudDomain(),
71
+ cloudHubDomain: DEFAULT_HUB_DOMAIN,
72
+ cloudApi: getSymphonyUrl(),
73
+ cloudGraphQL: SYMPHONY_GRAPHQL,
74
+ loginDomain: getLoginUrl(),
75
+ analyticsDomain: DEFAULT_ANALYTICS_DOMAIN,
76
+ registryUrl: DEFAULT_REGISTRY_URL,
77
+ cloudExporterUrl: CENTRAL_BIT_HUB_URL,
78
+ cloudHubName: CENTRAL_BIT_HUB_NAME,
79
+ };
80
+ static async provider(_deps, config: CloudWorkspaceConfig) {
81
+ return new CloudMain(config);
82
+ }
83
+ }
84
+
85
+ CloudAspect.addRuntime(CloudMain);
@@ -21,8 +21,8 @@ export declare class CloudMain {
21
21
  getRegistryUrl(): string;
22
22
  getCloudExporterUrl(): string;
23
23
  getHubName(): string;
24
- static slots: never[];
25
- static dependencies: never[];
24
+ static slots: any[];
25
+ static dependencies: any[];
26
26
  static runtime: import("@teambit/harmony").RuntimeDefinition;
27
27
  static defaultConfig: CloudWorkspaceConfig;
28
28
  static provider(_deps: any, config: CloudWorkspaceConfig): Promise<CloudMain>;
package/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { CloudAspect } from './cloud.aspect';
2
+
3
+ export type { CloudMain } from './cloud.main.runtime';
4
+ export default CloudAspect;
5
+ export { CloudAspect };
package/package.json CHANGED
@@ -1,31 +1,25 @@
1
1
  {
2
2
  "name": "@teambit/cloud",
3
- "version": "0.0.387",
3
+ "version": "0.0.388",
4
4
  "homepage": "https://bit.cloud/teambit/cloud/cloud",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.cloud",
8
8
  "name": "cloud",
9
- "version": "0.0.387"
9
+ "version": "0.0.388"
10
10
  },
11
11
  "dependencies": {
12
- "core-js": "^3.0.0",
13
- "@babel/runtime": "7.20.0",
14
12
  "@teambit/harmony": "0.4.6",
15
- "@teambit/cli": "0.0.839"
13
+ "@teambit/cli": "0.0.840"
16
14
  },
17
15
  "devDependencies": {
18
16
  "@types/mocha": "9.1.0",
19
- "@types/node": "12.20.4",
20
- "@types/react": "^17.0.8",
21
- "@types/react-dom": "^17.0.5",
22
- "@types/jest": "^26.0.0",
23
- "@types/testing-library__jest-dom": "5.9.5"
17
+ "@types/jest": "^29.2.2",
18
+ "@types/testing-library__jest-dom": "^5.9.5",
19
+ "@teambit/harmony.envs.core-aspect-env": "0.0.13"
24
20
  },
25
21
  "peerDependencies": {
26
- "@teambit/legacy": "1.0.624",
27
- "react": "^16.8.0 || ^17.0.0",
28
- "react-dom": "^16.8.0 || ^17.0.0"
22
+ "@teambit/legacy": "1.0.624"
29
23
  },
30
24
  "license": "Apache-2.0",
31
25
  "optionalDependencies": {},
@@ -39,7 +33,7 @@
39
33
  },
40
34
  "private": false,
41
35
  "engines": {
42
- "node": ">=12.22.0"
36
+ "node": ">=16.0.0"
43
37
  },
44
38
  "repository": {
45
39
  "type": "git",
@@ -48,12 +42,9 @@
48
42
  "keywords": [
49
43
  "bit",
50
44
  "bit-aspect",
45
+ "bit-core-aspect",
51
46
  "components",
52
47
  "collaboration",
53
- "web",
54
- "react",
55
- "react-components",
56
- "angular",
57
- "angular-components"
48
+ "web"
58
49
  ]
59
50
  }
package/tsconfig.json CHANGED
@@ -1,38 +1,33 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "lib": [
4
- "es2019",
5
- "DOM",
6
- "ES6",
7
- "DOM.Iterable",
8
- "ScriptHost"
4
+ "esnext",
5
+ "dom",
6
+ "dom.Iterable"
9
7
  ],
10
- "target": "es2015",
11
- "module": "CommonJS",
12
- "jsx": "react",
13
- "allowJs": true,
14
- "composite": true,
8
+ "target": "es2020",
9
+ "module": "es2020",
10
+ "jsx": "react-jsx",
15
11
  "declaration": true,
16
12
  "sourceMap": true,
17
- "skipLibCheck": true,
18
13
  "experimentalDecorators": true,
19
- "outDir": "dist",
14
+ "skipLibCheck": true,
20
15
  "moduleResolution": "node",
21
16
  "esModuleInterop": true,
22
- "rootDir": ".",
23
17
  "resolveJsonModule": true,
24
- "emitDeclarationOnly": true,
25
- "emitDecoratorMetadata": true,
26
- "allowSyntheticDefaultImports": true,
27
- "strictPropertyInitialization": false,
28
- "strict": true,
29
- "noImplicitAny": false,
30
- "preserveConstEnums": true
18
+ "allowJs": true,
19
+ "outDir": "dist",
20
+ "emitDeclarationOnly": true
31
21
  },
32
22
  "exclude": [
23
+ "artifacts",
24
+ "public",
33
25
  "dist",
26
+ "node_modules",
27
+ "package.json",
34
28
  "esm.mjs",
35
- "package.json"
29
+ "**/*.cjs",
30
+ "./dist"
36
31
  ],
37
32
  "include": [
38
33
  "**/*",
package/types/asset.d.ts CHANGED
@@ -5,12 +5,12 @@ declare module '*.png' {
5
5
  declare module '*.svg' {
6
6
  import type { FunctionComponent, SVGProps } from 'react';
7
7
 
8
- export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
9
11
  const src: string;
10
12
  export default src;
11
13
  }
12
-
13
- // @TODO Gilad
14
14
  declare module '*.jpg' {
15
15
  const value: any;
16
16
  export = value;
@@ -27,3 +27,15 @@ declare module '*.bmp' {
27
27
  const value: any;
28
28
  export = value;
29
29
  }
30
+ declare module '*.otf' {
31
+ const value: any;
32
+ export = value;
33
+ }
34
+ declare module '*.woff' {
35
+ const value: any;
36
+ export = value;
37
+ }
38
+ declare module '*.woff2' {
39
+ const value: any;
40
+ export = value;
41
+ }