@teambit/workspace 1.0.938 → 1.0.939
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.939/dist/workspace.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.939/dist/workspace.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -11,7 +11,7 @@ export declare class CompFiles {
|
|
|
11
11
|
private repository;
|
|
12
12
|
private currentFiles;
|
|
13
13
|
readonly compDir: PathLinux;
|
|
14
|
-
|
|
14
|
+
readonly modelFiles: SourceFileModel[];
|
|
15
15
|
constructor(id: ComponentID, repository: Repository, currentFiles: SourceFile[], compDir: PathLinux, modelFiles?: SourceFileModel[]);
|
|
16
16
|
isModified(): boolean;
|
|
17
17
|
getCurrentFiles(): SourceFile[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_component","data","require","CompFiles","constructor","id","repository","currentFiles","compDir","modelFiles","isModified","length","some","file","headFile","find","h","relativePath","relative","isEqual","toSourceAsLinuxEOL","hash","getCurrentFiles","getHeadFiles","Promise","all","map","SourceFile","loadFromSourceFileModel","getFilesStatus","result","reduce","acc","getType","forEach","currentFile","c","exports"],"sources":["comp-files.ts"],"sourcesContent":["import type { ComponentID } from '@teambit/component-id';\nimport { SourceFile } from '@teambit/component.sources';\nimport type { Repository, SourceFileModel } from '@teambit/objects';\n\ntype FILE_STATUS = 'new' | 'modified' | 'deleted' | 'unchanged';\ntype PathLinux = string; // ts fails when importing it from @teambit/legacy/dist/utils/path.\nexport type FilesStatus = { [pathRelativeToCompDir: PathLinux]: FILE_STATUS };\n\nexport class CompFiles {\n constructor(\n readonly id: ComponentID,\n private repository: Repository,\n private currentFiles: SourceFile[],\n readonly compDir: PathLinux,\n
|
|
1
|
+
{"version":3,"names":["_component","data","require","CompFiles","constructor","id","repository","currentFiles","compDir","modelFiles","isModified","length","some","file","headFile","find","h","relativePath","relative","isEqual","toSourceAsLinuxEOL","hash","getCurrentFiles","getHeadFiles","Promise","all","map","SourceFile","loadFromSourceFileModel","getFilesStatus","result","reduce","acc","getType","forEach","currentFile","c","exports"],"sources":["comp-files.ts"],"sourcesContent":["import type { ComponentID } from '@teambit/component-id';\nimport { SourceFile } from '@teambit/component.sources';\nimport type { Repository, SourceFileModel } from '@teambit/objects';\n\ntype FILE_STATUS = 'new' | 'modified' | 'deleted' | 'unchanged';\ntype PathLinux = string; // ts fails when importing it from @teambit/legacy/dist/utils/path.\nexport type FilesStatus = { [pathRelativeToCompDir: PathLinux]: FILE_STATUS };\n\nexport class CompFiles {\n constructor(\n readonly id: ComponentID,\n private repository: Repository,\n private currentFiles: SourceFile[],\n readonly compDir: PathLinux,\n readonly modelFiles: SourceFileModel[] = []\n ) {}\n\n isModified(): boolean {\n if (!this.modelFiles.length) return false;\n if (this.currentFiles.length !== this.modelFiles.length) return true;\n return this.currentFiles.some((file) => {\n const headFile = this.modelFiles.find((h) => h.relativePath === file.relative);\n if (!headFile) return true;\n return !headFile.file.isEqual(file.toSourceAsLinuxEOL().hash());\n });\n }\n\n getCurrentFiles(): SourceFile[] {\n return this.currentFiles;\n }\n\n async getHeadFiles(): Promise<SourceFile[]> {\n return Promise.all(this.modelFiles.map((file) => SourceFile.loadFromSourceFileModel(file, this.repository)));\n }\n\n getFilesStatus(): FilesStatus {\n const result = this.currentFiles.reduce((acc, file) => {\n const headFile = this.modelFiles.find((h) => h.relativePath === file.relative);\n const getType = (): FILE_STATUS => {\n if (!headFile) return 'new';\n if (headFile.file.isEqual(file.toSourceAsLinuxEOL().hash())) return 'unchanged';\n return 'modified';\n };\n acc[file.relative] = getType();\n return acc;\n }, {});\n this.modelFiles.forEach((headFile) => {\n const currentFile = this.currentFiles.find((c) => c.relative === headFile.relativePath);\n if (!currentFile) {\n result[headFile.relativePath] = 'deleted';\n }\n });\n return result;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIyB;;AAGlB,MAAME,SAAS,CAAC;EACrBC,WAAWA,CACAC,EAAe,EAChBC,UAAsB,EACtBC,YAA0B,EACzBC,OAAkB,EAClBC,UAA6B,GAAG,EAAE,EAC3C;IAAA,KALSJ,EAAe,GAAfA,EAAe;IAAA,KAChBC,UAAsB,GAAtBA,UAAsB;IAAA,KACtBC,YAA0B,GAA1BA,YAA0B;IAAA,KACzBC,OAAkB,GAAlBA,OAAkB;IAAA,KAClBC,UAA6B,GAA7BA,UAA6B;EACrC;EAEHC,UAAUA,CAAA,EAAY;IACpB,IAAI,CAAC,IAAI,CAACD,UAAU,CAACE,MAAM,EAAE,OAAO,KAAK;IACzC,IAAI,IAAI,CAACJ,YAAY,CAACI,MAAM,KAAK,IAAI,CAACF,UAAU,CAACE,MAAM,EAAE,OAAO,IAAI;IACpE,OAAO,IAAI,CAACJ,YAAY,CAACK,IAAI,CAAEC,IAAI,IAAK;MACtC,MAAMC,QAAQ,GAAG,IAAI,CAACL,UAAU,CAACM,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,YAAY,KAAKJ,IAAI,CAACK,QAAQ,CAAC;MAC9E,IAAI,CAACJ,QAAQ,EAAE,OAAO,IAAI;MAC1B,OAAO,CAACA,QAAQ,CAACD,IAAI,CAACM,OAAO,CAACN,IAAI,CAACO,kBAA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ACG,YAAY,CAAC,GAAG,SAAS;MAC3C;IACF,CAAC,CAAC;IACF,OAAOa,MAAM;EACf;AACF;AAACO,OAAA,CAAAlC,SAAA,GAAAA,SAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.939",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.939"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -28,20 +28,39 @@
|
|
|
28
28
|
"reset-css": "5.0.1",
|
|
29
29
|
"@teambit/component-id": "1.2.4",
|
|
30
30
|
"@teambit/harmony": "0.4.7",
|
|
31
|
+
"@teambit/legacy.extension-data": "0.0.109",
|
|
32
|
+
"@teambit/legacy.scope": "0.0.107",
|
|
31
33
|
"@teambit/component-version": "1.0.4",
|
|
34
|
+
"@teambit/legacy.consumer-component": "0.0.108",
|
|
35
|
+
"@teambit/legacy.consumer": "0.0.107",
|
|
32
36
|
"@teambit/bit-error": "0.0.404",
|
|
33
37
|
"@teambit/lane-id": "0.0.312",
|
|
38
|
+
"@teambit/legacy.bit-map": "0.0.164",
|
|
34
39
|
"@teambit/toolbox.fs.last-modified": "0.0.14",
|
|
35
40
|
"@teambit/toolbox.path.path": "0.0.16",
|
|
36
41
|
"@teambit/graph.cleargraph": "0.0.11",
|
|
42
|
+
"@teambit/logger": "0.0.1407",
|
|
43
|
+
"@teambit/cli": "0.0.1314",
|
|
37
44
|
"@teambit/component.ui.component-status-resolver": "0.0.510",
|
|
45
|
+
"@teambit/legacy.constants": "0.0.26",
|
|
38
46
|
"@teambit/harmony.modules.resolved-component": "0.0.513",
|
|
39
47
|
"@teambit/legacy.utils": "0.0.34",
|
|
48
|
+
"@teambit/scope.remotes": "0.0.107",
|
|
49
|
+
"@teambit/config-store": "0.0.194",
|
|
50
|
+
"@teambit/config": "0.0.1489",
|
|
40
51
|
"@teambit/harmony.modules.requireable-component": "0.0.513",
|
|
41
52
|
"@teambit/toolbox.modules.module-resolver": "0.0.19",
|
|
53
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.337",
|
|
54
|
+
"@teambit/global-config": "0.0.1317",
|
|
55
|
+
"@teambit/legacy.consumer-config": "0.0.107",
|
|
56
|
+
"@teambit/variants": "0.0.1582",
|
|
42
57
|
"@teambit/component-issues": "0.0.171",
|
|
58
|
+
"@teambit/component.sources": "0.0.159",
|
|
43
59
|
"@teambit/dependencies.modules.packages-excluder": "1.0.8",
|
|
60
|
+
"@teambit/harmony.modules.in-memory-cache": "0.0.30",
|
|
44
61
|
"@teambit/legacy-bit-id": "1.1.3",
|
|
62
|
+
"@teambit/legacy.component-list": "0.0.161",
|
|
63
|
+
"@teambit/legacy.scope-api": "0.0.162",
|
|
45
64
|
"@teambit/toolbox.path.is-path-inside": "0.0.508",
|
|
46
65
|
"@teambit/workspace.modules.match-pattern": "0.0.520",
|
|
47
66
|
"@teambit/component.ui.component-drawer": "0.0.478",
|
|
@@ -59,6 +78,7 @@
|
|
|
59
78
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.522",
|
|
60
79
|
"@teambit/ui-foundation.ui.tree.drawer": "1.0.0",
|
|
61
80
|
"@teambit/design.ui.surfaces.menu.link-item": "1.0.13",
|
|
81
|
+
"@teambit/harmony.modules.concurrency": "0.0.27",
|
|
62
82
|
"@teambit/toolbox.promise.map-pool": "0.0.14",
|
|
63
83
|
"@teambit/base-react.themes.theme-switcher": "1.1.2",
|
|
64
84
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.506",
|
|
@@ -85,43 +105,23 @@
|
|
|
85
105
|
"@teambit/workspace.ui.workspace-component-card": "0.0.568",
|
|
86
106
|
"@teambit/explorer.ui.component-card": "0.0.51",
|
|
87
107
|
"@teambit/workspace.ui.empty-workspace": "0.0.509",
|
|
88
|
-
"@teambit/component": "1.0.
|
|
89
|
-
"@teambit/dependency-resolver": "1.0.
|
|
90
|
-
"@teambit/envs": "1.0.
|
|
91
|
-
"@teambit/
|
|
92
|
-
"@teambit/
|
|
93
|
-
"@teambit/
|
|
94
|
-
"@teambit/
|
|
95
|
-
"@teambit/
|
|
96
|
-
"@teambit/
|
|
97
|
-
"@teambit/
|
|
98
|
-
"@teambit/
|
|
99
|
-
"@teambit/
|
|
100
|
-
"@teambit/
|
|
101
|
-
"@teambit/
|
|
102
|
-
"@teambit/
|
|
103
|
-
"@teambit/
|
|
104
|
-
"@teambit/
|
|
105
|
-
"@teambit/scope.remotes": "0.0.107",
|
|
106
|
-
"@teambit/aspect-loader": "1.0.938",
|
|
107
|
-
"@teambit/config-store": "0.0.194",
|
|
108
|
-
"@teambit/config": "0.0.1489",
|
|
109
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.337",
|
|
110
|
-
"@teambit/graphql": "1.0.938",
|
|
111
|
-
"@teambit/bundler": "1.0.938",
|
|
112
|
-
"@teambit/global-config": "0.0.1317",
|
|
113
|
-
"@teambit/legacy.consumer-config": "0.0.107",
|
|
114
|
-
"@teambit/ui": "1.0.938",
|
|
115
|
-
"@teambit/variants": "0.0.1582",
|
|
116
|
-
"@teambit/component.sources": "0.0.159",
|
|
117
|
-
"@teambit/harmony.modules.in-memory-cache": "0.0.30",
|
|
118
|
-
"@teambit/legacy.component-list": "0.0.161",
|
|
119
|
-
"@teambit/legacy.scope-api": "0.0.162",
|
|
120
|
-
"@teambit/command-bar": "1.0.938",
|
|
121
|
-
"@teambit/sidebar": "1.0.938",
|
|
122
|
-
"@teambit/pubsub": "1.0.938",
|
|
123
|
-
"@teambit/harmony.modules.concurrency": "0.0.27",
|
|
124
|
-
"@teambit/deprecation": "1.0.938"
|
|
108
|
+
"@teambit/component": "1.0.939",
|
|
109
|
+
"@teambit/dependency-resolver": "1.0.939",
|
|
110
|
+
"@teambit/envs": "1.0.939",
|
|
111
|
+
"@teambit/objects": "0.0.446",
|
|
112
|
+
"@teambit/scope": "1.0.939",
|
|
113
|
+
"@teambit/graph": "1.0.939",
|
|
114
|
+
"@teambit/isolator": "1.0.939",
|
|
115
|
+
"@teambit/component-tree": "1.0.939",
|
|
116
|
+
"@teambit/watcher": "1.0.939",
|
|
117
|
+
"@teambit/aspect-loader": "1.0.939",
|
|
118
|
+
"@teambit/graphql": "1.0.939",
|
|
119
|
+
"@teambit/bundler": "1.0.939",
|
|
120
|
+
"@teambit/ui": "1.0.939",
|
|
121
|
+
"@teambit/command-bar": "1.0.939",
|
|
122
|
+
"@teambit/sidebar": "1.0.939",
|
|
123
|
+
"@teambit/pubsub": "1.0.939",
|
|
124
|
+
"@teambit/deprecation": "1.0.939"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
127
|
"@types/lodash": "4.14.165",
|
|
@@ -12,7 +12,7 @@ export class CompFiles {
|
|
|
12
12
|
private repository: Repository,
|
|
13
13
|
private currentFiles: SourceFile[],
|
|
14
14
|
readonly compDir: PathLinux,
|
|
15
|
-
|
|
15
|
+
readonly modelFiles: SourceFileModel[] = []
|
|
16
16
|
) {}
|
|
17
17
|
|
|
18
18
|
isModified(): boolean {
|