@teambit/export 1.0.106 → 1.0.108

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/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ export type { ExportMain } from './export.main.runtime';
2
+ export { ExportAspect } from './export.aspect';
3
+ export type { Network } from '@teambit/legacy/dist/scope/network/network';
4
+ export type { PushOptions } from '@teambit/legacy/dist/api/scope/lib/put';
5
+ export { ExportPersist, ExportValidate, RemovePendingDir, FetchMissingDeps } from '@teambit/legacy/dist/scope/actions';
6
+ export { ObjectList } from '@teambit/legacy/dist/scope/objects/object-list';
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/export",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "homepage": "https://bit.cloud/teambit/scope/export",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.scope",
8
8
  "name": "export",
9
- "version": "1.0.106"
9
+ "version": "1.0.108"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -15,35 +15,31 @@
15
15
  "fs-extra": "10.0.0",
16
16
  "p-map-series": "2.1.0",
17
17
  "ramda": "0.27.1",
18
- "core-js": "^3.0.0",
19
- "@babel/runtime": "7.20.0",
20
18
  "@teambit/harmony": "0.4.6",
21
19
  "@teambit/bit-error": "0.0.404",
22
20
  "@teambit/component-id": "1.2.0",
23
21
  "@teambit/lane-id": "0.0.311",
24
- "@teambit/cli": "0.0.839",
25
- "@teambit/eject": "1.0.106",
26
- "@teambit/dependency-resolver": "1.0.106",
27
- "@teambit/logger": "0.0.932",
28
- "@teambit/remove": "1.0.106",
29
- "@teambit/scope": "1.0.106",
30
- "@teambit/workspace.modules.node-modules-linker": "0.0.157",
31
- "@teambit/workspace": "1.0.106"
22
+ "@teambit/cli": "0.0.840",
23
+ "@teambit/eject": "1.0.108",
24
+ "@teambit/dependency-resolver": "1.0.108",
25
+ "@teambit/logger": "0.0.933",
26
+ "@teambit/remove": "1.0.108",
27
+ "@teambit/scope": "1.0.108",
28
+ "@teambit/workspace.modules.node-modules-linker": "0.0.158",
29
+ "@teambit/workspace": "1.0.108"
32
30
  },
33
31
  "devDependencies": {
34
32
  "@types/lodash": "4.14.165",
35
- "@types/react": "^17.0.8",
36
33
  "@types/fs-extra": "9.0.7",
37
34
  "@types/mocha": "9.1.0",
38
- "@types/node": "12.20.4",
39
- "@types/react-dom": "^17.0.5",
40
- "@types/jest": "^26.0.0",
41
- "@types/testing-library__jest-dom": "5.9.5"
35
+ "@types/jest": "^29.2.2",
36
+ "@types/testing-library__jest-dom": "^5.9.5",
37
+ "@teambit/harmony.envs.core-aspect-env": "0.0.13"
42
38
  },
43
39
  "peerDependencies": {
44
- "@teambit/legacy": "1.0.624",
45
- "react": "^16.8.0 || ^17.0.0",
46
- "react-dom": "^16.8.0 || ^17.0.0"
40
+ "react": "^17.0.0 || ^18.0.0",
41
+ "@types/react": "^18.2.12",
42
+ "@teambit/legacy": "1.0.624"
47
43
  },
48
44
  "license": "Apache-2.0",
49
45
  "optionalDependencies": {},
@@ -57,7 +53,7 @@
57
53
  },
58
54
  "private": false,
59
55
  "engines": {
60
- "node": ">=12.22.0"
56
+ "node": ">=16.0.0"
61
57
  },
62
58
  "repository": {
63
59
  "type": "git",
@@ -66,12 +62,9 @@
66
62
  "keywords": [
67
63
  "bit",
68
64
  "bit-aspect",
65
+ "bit-core-aspect",
69
66
  "components",
70
67
  "collaboration",
71
- "web",
72
- "react",
73
- "react-components",
74
- "angular",
75
- "angular-components"
68
+ "web"
76
69
  ]
77
70
  }
@@ -0,0 +1,27 @@
1
+ import chalk from 'chalk';
2
+ import { Command, CommandOptions } from '@teambit/cli';
3
+ import { ScopeMain } from '@teambit/scope';
4
+
5
+ export class ResumeExportCmd implements Command {
6
+ name = 'resume-export <export-id> <remotes...>';
7
+ description = 'EXPERIMENTAL. resume failed export';
8
+ extendedDescription = `resume failed export to persist the pending objects on the given remotes.
9
+ the export-id is the id the client received in the error message during the failure.
10
+ alternatively, exporting to any one of the failed scopes, throws server-is-busy error with the export-id`;
11
+ alias = '';
12
+ options = [] as CommandOptions;
13
+ loader = true;
14
+ migration = true;
15
+ group = 'collaborate';
16
+ private = true;
17
+ remoteOp = true;
18
+
19
+ constructor(private scope: ScopeMain) {}
20
+
21
+ async report([exportId, remotes]: [string, string[]]): Promise<string> {
22
+ const exportedIds = await this.scope.resumeExport(exportId, remotes);
23
+ if (!exportedIds.length) return chalk.yellow('no components were left to persist for this export-id');
24
+ return `the following components were persisted successfully:
25
+ ${exportedIds.join('\n')}`;
26
+ }
27
+ }
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
+ }