@teambit/builder 0.0.815 → 0.0.818

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.
Files changed (50) hide show
  1. package/artifact/artifact-extractor.ts +31 -30
  2. package/artifact/artifact-factory.ts +10 -17
  3. package/artifact/artifact-list.ts +61 -19
  4. package/artifact/artifact.ts +27 -18
  5. package/artifact/fs-artifact.ts +21 -0
  6. package/artifact/index.ts +1 -0
  7. package/dist/artifact/artifact-extractor.js +43 -26
  8. package/dist/artifact/artifact-extractor.js.map +1 -1
  9. package/dist/artifact/artifact-factory.d.ts +4 -4
  10. package/dist/artifact/artifact-factory.js +9 -10
  11. package/dist/artifact/artifact-factory.js.map +1 -1
  12. package/dist/artifact/artifact-list.d.ts +15 -12
  13. package/dist/artifact/artifact-list.js +68 -13
  14. package/dist/artifact/artifact-list.js.map +1 -1
  15. package/dist/artifact/artifact.d.ts +8 -26
  16. package/dist/artifact/artifact.js +33 -14
  17. package/dist/artifact/artifact.js.map +1 -1
  18. package/dist/artifact/fs-artifact.d.ts +18 -0
  19. package/dist/artifact/fs-artifact.js +35 -0
  20. package/dist/artifact/fs-artifact.js.map +1 -0
  21. package/dist/artifact/index.d.ts +1 -0
  22. package/dist/artifact/index.js +16 -0
  23. package/dist/artifact/index.js.map +1 -1
  24. package/dist/build-pipe.d.ts +2 -2
  25. package/dist/build-pipe.js.map +1 -1
  26. package/dist/build-pipeline-result-list.js +2 -2
  27. package/dist/build-pipeline-result-list.js.map +1 -1
  28. package/dist/build-task.d.ts +5 -0
  29. package/dist/build-task.js.map +1 -1
  30. package/dist/builder.graphql.d.ts +80 -4
  31. package/dist/builder.graphql.js +122 -16
  32. package/dist/builder.graphql.js.map +1 -1
  33. package/dist/builder.main.runtime.d.ts +30 -16
  34. package/dist/builder.main.runtime.js +88 -41
  35. package/dist/builder.main.runtime.js.map +1 -1
  36. package/dist/builder.route.d.ts +20 -0
  37. package/dist/builder.route.js +145 -0
  38. package/dist/builder.route.js.map +1 -0
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/storage/default-resolver.d.ts +2 -2
  42. package/dist/storage/default-resolver.js.map +1 -1
  43. package/dist/storage/storage-resolver.d.ts +3 -3
  44. package/dist/storage/storage-resolver.js.map +1 -1
  45. package/package-tar/teambit-builder-0.0.818.tgz +0 -0
  46. package/package.json +20 -14
  47. package/{preview-1660361218837.js → preview-1660620618310.js} +2 -2
  48. package/storage/default-resolver.ts +2 -2
  49. package/storage/storage-resolver.ts +3 -3
  50. package/package-tar/teambit-builder-0.0.815.tgz +0 -0
@@ -1,6 +1,6 @@
1
1
  import { Component } from '@teambit/component';
2
2
  import { ArtifactVinyl } from '@teambit/legacy/dist/consumer/component/sources/artifact';
3
- import { Artifact } from '../artifact';
3
+ import { FsArtifact } from '../artifact';
4
4
  export declare type StoreResult = {
5
5
  [path: string]: string;
6
6
  };
@@ -14,13 +14,13 @@ export interface WholeArtifactStorageResolver extends BaseStorageResolver {
14
14
  /**
15
15
  * store artifacts in the storage.
16
16
  */
17
- store(component: Component, artifact: Artifact): Promise<StoreResult | undefined | void>;
17
+ store(component: Component, artifact: FsArtifact): Promise<StoreResult | undefined | void>;
18
18
  }
19
19
  export interface FileStorageResolver extends BaseStorageResolver {
20
20
  /**
21
21
  * store artifacts in the storage.
22
22
  */
23
- storeFile(component: Component, artifact: Artifact, file: ArtifactVinyl): Promise<string | undefined | void>;
23
+ storeFile(component: Component, artifact: FsArtifact, file: ArtifactVinyl): Promise<string | undefined | void>;
24
24
  }
25
25
  export declare type ArtifactStorageResolver = FileStorageResolver | WholeArtifactStorageResolver;
26
26
  export {};
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["storage-resolver.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { ArtifactVinyl } from '@teambit/legacy/dist/consumer/component/sources/artifact';\nimport { Artifact } from '../artifact';\n\nexport type StoreResult = {\n [path: string]: string;\n};\n\ninterface BaseStorageResolver {\n /**\n * name of the storage resolver.\n */\n name: string;\n}\n\nexport interface WholeArtifactStorageResolver extends BaseStorageResolver {\n /**\n * store artifacts in the storage.\n */\n store(component: Component, artifact: Artifact): Promise<StoreResult | undefined | void>;\n}\n\nexport interface FileStorageResolver extends BaseStorageResolver {\n /**\n * store artifacts in the storage.\n */\n storeFile(component: Component, artifact: Artifact, file: ArtifactVinyl): Promise<string | undefined | void>;\n}\n\nexport type ArtifactStorageResolver = FileStorageResolver | WholeArtifactStorageResolver;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["storage-resolver.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { ArtifactVinyl } from '@teambit/legacy/dist/consumer/component/sources/artifact';\nimport { FsArtifact } from '../artifact';\n\nexport type StoreResult = {\n [path: string]: string;\n};\n\ninterface BaseStorageResolver {\n /**\n * name of the storage resolver.\n */\n name: string;\n}\n\nexport interface WholeArtifactStorageResolver extends BaseStorageResolver {\n /**\n * store artifacts in the storage.\n */\n store(component: Component, artifact: FsArtifact): Promise<StoreResult | undefined | void>;\n}\n\nexport interface FileStorageResolver extends BaseStorageResolver {\n /**\n * store artifacts in the storage.\n */\n storeFile(component: Component, artifact: FsArtifact, file: ArtifactVinyl): Promise<string | undefined | void>;\n}\n\nexport type ArtifactStorageResolver = FileStorageResolver | WholeArtifactStorageResolver;\n"],"mappings":""}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/builder",
3
- "version": "0.0.815",
3
+ "version": "0.0.818",
4
4
  "homepage": "https://bit.dev/teambit/pipelines/builder",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.pipelines",
8
8
  "name": "builder",
9
- "version": "0.0.815"
9
+ "version": "0.0.818"
10
10
  },
11
11
  "dependencies": {
12
12
  "p-map-series": "2.1.0",
@@ -14,6 +14,9 @@
14
14
  "lodash": "4.17.21",
15
15
  "chalk": "2.4.2",
16
16
  "graphql-tag": "2.12.1",
17
+ "is-binary-path": "2.1.0",
18
+ "archiver": "5.3.1",
19
+ "mime": "2.5.2",
17
20
  "ink": "3.2.0",
18
21
  "filenamify": "4.2.0",
19
22
  "fs-extra": "10.0.0",
@@ -23,23 +26,26 @@
23
26
  "core-js": "^3.0.0",
24
27
  "@teambit/graph.cleargraph": "0.0.1",
25
28
  "@teambit/harmony": "0.3.3",
26
- "@teambit/component": "0.0.815",
27
- "@teambit/envs": "0.0.815",
28
- "@teambit/logger": "0.0.637",
29
- "@teambit/tester": "0.0.815",
30
- "@teambit/isolator": "0.0.815",
31
- "@teambit/cli": "0.0.544",
32
- "@teambit/workspace": "0.0.815",
33
- "@teambit/aspect-loader": "0.0.815",
34
- "@teambit/generator": "0.0.815",
35
- "@teambit/graphql": "0.0.815",
36
- "@teambit/scope": "0.0.815",
29
+ "@teambit/component": "0.0.818",
30
+ "@teambit/envs": "0.0.818",
31
+ "@teambit/logger": "0.0.639",
32
+ "@teambit/tester": "0.0.818",
33
+ "@teambit/isolator": "0.0.818",
34
+ "@teambit/cli": "0.0.546",
35
+ "@teambit/workspace": "0.0.818",
36
+ "@teambit/aspect-loader": "0.0.818",
37
+ "@teambit/generator": "0.0.818",
38
+ "@teambit/graphql": "0.0.818",
39
+ "@teambit/scope": "0.0.818",
40
+ "@teambit/express": "0.0.644",
37
41
  "@teambit/bit-error": "0.0.394",
38
42
  "@teambit/component-id": "0.0.405"
39
43
  },
40
44
  "devDependencies": {
41
45
  "@types/lodash": "4.14.165",
42
46
  "@types/react": "^17.0.8",
47
+ "@types/archiver": "5.3.1",
48
+ "@types/mime": "2.0.3",
43
49
  "@types/fs-extra": "9.0.7",
44
50
  "@types/minimatch": "3.0.4",
45
51
  "@types/mocha": "9.1.0",
@@ -50,7 +56,7 @@
50
56
  "@teambit/pipelines.aspect-docs.builder": "0.0.139"
51
57
  },
52
58
  "peerDependencies": {
53
- "@teambit/legacy": "1.0.327",
59
+ "@teambit/legacy": "1.0.329",
54
60
  "react-dom": "^16.8.0 || ^17.0.0",
55
61
  "react": "^16.8.0 || ^17.0.0"
56
62
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.815/dist/builder.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.815/dist/builder.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.818/dist/builder.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.818/dist/builder.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,11 +1,11 @@
1
1
  import { Component } from '@teambit/component';
2
+ import { FsArtifact } from '../artifact';
2
3
  import { WholeArtifactStorageResolver } from './storage-resolver';
3
- import type { Artifact } from '../artifact';
4
4
 
5
5
  export class DefaultResolver implements WholeArtifactStorageResolver {
6
6
  name = 'default';
7
7
 
8
- async store(component: Component, artifact: Artifact) {
8
+ async store(component: Component, artifact: FsArtifact) {
9
9
  artifact.files.populateVinylsFromPaths(artifact.rootDir);
10
10
  }
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import { Component } from '@teambit/component';
2
2
  import { ArtifactVinyl } from '@teambit/legacy/dist/consumer/component/sources/artifact';
3
- import { Artifact } from '../artifact';
3
+ import { FsArtifact } from '../artifact';
4
4
 
5
5
  export type StoreResult = {
6
6
  [path: string]: string;
@@ -17,14 +17,14 @@ export interface WholeArtifactStorageResolver extends BaseStorageResolver {
17
17
  /**
18
18
  * store artifacts in the storage.
19
19
  */
20
- store(component: Component, artifact: Artifact): Promise<StoreResult | undefined | void>;
20
+ store(component: Component, artifact: FsArtifact): Promise<StoreResult | undefined | void>;
21
21
  }
22
22
 
23
23
  export interface FileStorageResolver extends BaseStorageResolver {
24
24
  /**
25
25
  * store artifacts in the storage.
26
26
  */
27
- storeFile(component: Component, artifact: Artifact, file: ArtifactVinyl): Promise<string | undefined | void>;
27
+ storeFile(component: Component, artifact: FsArtifact, file: ArtifactVinyl): Promise<string | undefined | void>;
28
28
  }
29
29
 
30
30
  export type ArtifactStorageResolver = FileStorageResolver | WholeArtifactStorageResolver;