@teambit/workspace 0.0.837 → 0.0.843
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/dist/bit-map.js
CHANGED
|
@@ -202,9 +202,19 @@ class BitMap {
|
|
|
202
202
|
throw new Error(`unable to rename tagged or exported component: ${bitMapEntry.id.toString()}`);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
if (sourceId.isEqual(targetId)) {
|
|
206
|
+
throw new Error(`source-id and target-id are equal: "${sourceId.toString()}"`);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (sourceId.fullName !== targetId.fullName) {
|
|
210
|
+
this.legacyBitMap.removeComponent(bitMapEntry.id);
|
|
211
|
+
bitMapEntry.id = targetId._legacy;
|
|
212
|
+
this.legacyBitMap.setComponent(bitMapEntry.id, bitMapEntry);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (sourceId.scope !== targetId.scope) {
|
|
216
|
+
this.setDefaultScope(targetId, targetId.scope);
|
|
217
|
+
}
|
|
208
218
|
}
|
|
209
219
|
|
|
210
220
|
removeComponent(id) {
|
package/dist/bit-map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BitMap","constructor","legacyBitMap","consumer","addComponentConfig","id","aspectId","config","shouldMergeConfig","Error","bitMapEntry","getBitmapEntry","ignoreScopeAndVersion","currentConfig","isEqual","getNewConfig","merge","newConfig","markAsChanged","removeComponentConfig","markWithMinusIfNotExist","REMOVE_EXTENSION_SPECIAL_SIGN","removeEntireConfig","setEntireConfig","removeDefaultScope","defaultScope","setDefaultScope","write","writeBitMap","ignoreVersion","getComponent","_legacy","getAspectIdFromConfig","componentId","ignoreAspectVersion","undefined","toString","allVersions","Object","keys","filter","startsWith","toStringWithoutVersion","length","BitError","join","renameNewComponent","sourceId","targetId","hasVersion","removeComponent","setComponent","getExportedLaneId","isLaneExported","laneId","hasChanged"],"sources":["bit-map.ts"],"sourcesContent":["import { isEqual, merge } from 'lodash';\nimport { ComponentID } from '@teambit/component-id';\nimport LegacyBitMap from '@teambit/legacy/dist/consumer/bit-map';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { GetBitMapComponentOptions } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport ComponentMap from '@teambit/legacy/dist/consumer/bit-map/component-map';\nimport { REMOVE_EXTENSION_SPECIAL_SIGN } from '@teambit/legacy/dist/consumer/config';\nimport { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\n/**\n * consider extracting to a new component.\n * (pro: making Workspace aspect smaller. con: it's an implementation details of the workspace)\n */\nexport class BitMap {\n constructor(private legacyBitMap: LegacyBitMap, private consumer: Consumer) {}\n\n /**\n * adds component config to the .bitmap file.\n * later, upon `bit tag`, the data is saved in the scope.\n * returns a boolean indicating whether a change has been made.\n */\n addComponentConfig(\n id: ComponentID,\n aspectId: string,\n config: Record<string, any> = {},\n shouldMergeConfig = false\n ): boolean {\n if (!aspectId || typeof aspectId !== 'string') throw new Error(`expect aspectId to be string, got ${aspectId}`);\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n const currentConfig = (bitMapEntry.config ||= {})[aspectId];\n if (isEqual(currentConfig, config)) {\n return false; // no changes\n }\n const getNewConfig = () => {\n if (!config) return null;\n if (!shouldMergeConfig) return config;\n // should merge\n if (!currentConfig) return config;\n if (currentConfig === '-') return config;\n // lodash merge performs a deep merge. (the native concatenation don't)\n return merge(currentConfig, config);\n };\n const newConfig = getNewConfig();\n if (newConfig) {\n bitMapEntry.config[aspectId] = newConfig;\n } else {\n delete bitMapEntry.config[aspectId];\n }\n this.legacyBitMap.markAsChanged();\n\n return true; // changes have been made\n }\n\n removeComponentConfig(id: ComponentID, aspectId: string, markWithMinusIfNotExist: boolean): boolean {\n if (!aspectId || typeof aspectId !== 'string') throw new Error(`expect aspectId to be string, got ${aspectId}`);\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n const currentConfig = (bitMapEntry.config ||= {})[aspectId];\n if (currentConfig) {\n delete bitMapEntry.config[aspectId];\n } else {\n if (!markWithMinusIfNotExist) {\n return false; // no changes\n }\n bitMapEntry.config[aspectId] = REMOVE_EXTENSION_SPECIAL_SIGN;\n }\n\n this.legacyBitMap.markAsChanged();\n\n return true; // changes have been made\n }\n\n removeEntireConfig(id: ComponentID): boolean {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n if (!bitMapEntry.config) return false;\n delete bitMapEntry.config;\n this.legacyBitMap.markAsChanged();\n return true;\n }\n\n setEntireConfig(id: ComponentID, config: Record<string, any>) {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n bitMapEntry.config = config;\n this.legacyBitMap.markAsChanged();\n }\n\n removeDefaultScope(id: ComponentID) {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n if (bitMapEntry.defaultScope) {\n delete bitMapEntry.defaultScope;\n this.legacyBitMap.markAsChanged();\n }\n }\n\n setDefaultScope(id: ComponentID, defaultScope: string) {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n bitMapEntry.defaultScope = defaultScope;\n this.legacyBitMap.markAsChanged();\n }\n\n /**\n * write .bitmap object to the filesystem\n */\n async write() {\n await this.consumer.writeBitMap();\n }\n\n /**\n * get the data saved in the .bitmap file for this component-id.\n */\n getBitmapEntry(\n id: ComponentID,\n { ignoreVersion, ignoreScopeAndVersion }: GetBitMapComponentOptions = {}\n ): ComponentMap {\n return this.legacyBitMap.getComponent(id._legacy, { ignoreVersion, ignoreScopeAndVersion });\n }\n\n getAspectIdFromConfig(\n componentId: ComponentID,\n aspectId: ComponentID,\n ignoreAspectVersion = false\n ): string | undefined {\n const bitMapEntry = this.getBitmapEntry(componentId);\n const config = bitMapEntry.config;\n if (!config) {\n return undefined;\n }\n if (config[aspectId.toString()]) {\n return aspectId.toString();\n }\n if (!ignoreAspectVersion) {\n return undefined;\n }\n const allVersions = Object.keys(config).filter((id) => id.startsWith(`${aspectId.toStringWithoutVersion()}@`));\n if (allVersions.length > 1) {\n throw new BitError(\n `error: the same aspect ${\n aspectId.toStringWithoutVersion\n } configured multiple times for \"${componentId.toString()}\"\\n${allVersions.join('\\n')}`\n );\n }\n return allVersions.length === 1 ? allVersions[0] : undefined;\n }\n\n /**\n * components that were not tagged yet are safe to rename them from the .bitmap file.\n */\n renameNewComponent(sourceId: ComponentID, targetId: ComponentID) {\n const bitMapEntry = this.getBitmapEntry(sourceId);\n if (bitMapEntry.id.hasVersion()) {\n throw new Error(`unable to rename tagged or exported component: ${bitMapEntry.id.toString()}`);\n }\n this.legacyBitMap.removeComponent(bitMapEntry.id);\n bitMapEntry.id = targetId._legacy;\n this.legacyBitMap.setComponent(bitMapEntry.id, bitMapEntry);\n }\n\n removeComponent(id: ComponentID) {\n this.legacyBitMap.removeComponent(id._legacy);\n }\n\n /**\n * this is the lane-id of the recently exported lane. in case of a new lane, which was not exported yet, this will be\n * empty.\n */\n getExportedLaneId(): LaneId | undefined {\n return this.legacyBitMap.isLaneExported ? this.legacyBitMap.laneId : undefined;\n }\n\n /**\n * whether .bitmap file has changed in-memory\n */\n hasChanged(): boolean {\n return this.legacyBitMap.hasChanged;\n }\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAMA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;AACA;AACA;AACA;AACO,MAAMA,MAAN,CAAa;EAClBC,WAAW,CAASC,YAAT,EAA6CC,QAA7C,EAAiE;IAAA,KAAxDD,YAAwD,GAAxDA,YAAwD;IAAA,KAApBC,QAAoB,GAApBA,QAAoB;EAAE;EAE9E;AACF;AACA;AACA;AACA;;;EACEC,kBAAkB,CAChBC,EADgB,EAEhBC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","constructor","legacyBitMap","consumer","addComponentConfig","id","aspectId","config","shouldMergeConfig","Error","bitMapEntry","getBitmapEntry","ignoreScopeAndVersion","currentConfig","isEqual","getNewConfig","merge","newConfig","markAsChanged","removeComponentConfig","markWithMinusIfNotExist","REMOVE_EXTENSION_SPECIAL_SIGN","removeEntireConfig","setEntireConfig","removeDefaultScope","defaultScope","setDefaultScope","write","writeBitMap","ignoreVersion","getComponent","_legacy","getAspectIdFromConfig","componentId","ignoreAspectVersion","undefined","toString","allVersions","Object","keys","filter","startsWith","toStringWithoutVersion","length","BitError","join","renameNewComponent","sourceId","targetId","hasVersion","fullName","removeComponent","setComponent","scope","getExportedLaneId","isLaneExported","laneId","hasChanged"],"sources":["bit-map.ts"],"sourcesContent":["import { isEqual, merge } from 'lodash';\nimport { ComponentID } from '@teambit/component-id';\nimport LegacyBitMap from '@teambit/legacy/dist/consumer/bit-map';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { GetBitMapComponentOptions } from '@teambit/legacy/dist/consumer/bit-map/bit-map';\nimport ComponentMap from '@teambit/legacy/dist/consumer/bit-map/component-map';\nimport { REMOVE_EXTENSION_SPECIAL_SIGN } from '@teambit/legacy/dist/consumer/config';\nimport { BitError } from '@teambit/bit-error';\nimport { LaneId } from '@teambit/lane-id';\n/**\n * consider extracting to a new component.\n * (pro: making Workspace aspect smaller. con: it's an implementation details of the workspace)\n */\nexport class BitMap {\n constructor(private legacyBitMap: LegacyBitMap, private consumer: Consumer) {}\n\n /**\n * adds component config to the .bitmap file.\n * later, upon `bit tag`, the data is saved in the scope.\n * returns a boolean indicating whether a change has been made.\n */\n addComponentConfig(\n id: ComponentID,\n aspectId: string,\n config: Record<string, any> = {},\n shouldMergeConfig = false\n ): boolean {\n if (!aspectId || typeof aspectId !== 'string') throw new Error(`expect aspectId to be string, got ${aspectId}`);\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n const currentConfig = (bitMapEntry.config ||= {})[aspectId];\n if (isEqual(currentConfig, config)) {\n return false; // no changes\n }\n const getNewConfig = () => {\n if (!config) return null;\n if (!shouldMergeConfig) return config;\n // should merge\n if (!currentConfig) return config;\n if (currentConfig === '-') return config;\n // lodash merge performs a deep merge. (the native concatenation don't)\n return merge(currentConfig, config);\n };\n const newConfig = getNewConfig();\n if (newConfig) {\n bitMapEntry.config[aspectId] = newConfig;\n } else {\n delete bitMapEntry.config[aspectId];\n }\n this.legacyBitMap.markAsChanged();\n\n return true; // changes have been made\n }\n\n removeComponentConfig(id: ComponentID, aspectId: string, markWithMinusIfNotExist: boolean): boolean {\n if (!aspectId || typeof aspectId !== 'string') throw new Error(`expect aspectId to be string, got ${aspectId}`);\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n const currentConfig = (bitMapEntry.config ||= {})[aspectId];\n if (currentConfig) {\n delete bitMapEntry.config[aspectId];\n } else {\n if (!markWithMinusIfNotExist) {\n return false; // no changes\n }\n bitMapEntry.config[aspectId] = REMOVE_EXTENSION_SPECIAL_SIGN;\n }\n\n this.legacyBitMap.markAsChanged();\n\n return true; // changes have been made\n }\n\n removeEntireConfig(id: ComponentID): boolean {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n if (!bitMapEntry.config) return false;\n delete bitMapEntry.config;\n this.legacyBitMap.markAsChanged();\n return true;\n }\n\n setEntireConfig(id: ComponentID, config: Record<string, any>) {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n bitMapEntry.config = config;\n this.legacyBitMap.markAsChanged();\n }\n\n removeDefaultScope(id: ComponentID) {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n if (bitMapEntry.defaultScope) {\n delete bitMapEntry.defaultScope;\n this.legacyBitMap.markAsChanged();\n }\n }\n\n setDefaultScope(id: ComponentID, defaultScope: string) {\n const bitMapEntry = this.getBitmapEntry(id, { ignoreScopeAndVersion: true });\n bitMapEntry.defaultScope = defaultScope;\n this.legacyBitMap.markAsChanged();\n }\n\n /**\n * write .bitmap object to the filesystem\n */\n async write() {\n await this.consumer.writeBitMap();\n }\n\n /**\n * get the data saved in the .bitmap file for this component-id.\n */\n getBitmapEntry(\n id: ComponentID,\n { ignoreVersion, ignoreScopeAndVersion }: GetBitMapComponentOptions = {}\n ): ComponentMap {\n return this.legacyBitMap.getComponent(id._legacy, { ignoreVersion, ignoreScopeAndVersion });\n }\n\n getAspectIdFromConfig(\n componentId: ComponentID,\n aspectId: ComponentID,\n ignoreAspectVersion = false\n ): string | undefined {\n const bitMapEntry = this.getBitmapEntry(componentId);\n const config = bitMapEntry.config;\n if (!config) {\n return undefined;\n }\n if (config[aspectId.toString()]) {\n return aspectId.toString();\n }\n if (!ignoreAspectVersion) {\n return undefined;\n }\n const allVersions = Object.keys(config).filter((id) => id.startsWith(`${aspectId.toStringWithoutVersion()}@`));\n if (allVersions.length > 1) {\n throw new BitError(\n `error: the same aspect ${\n aspectId.toStringWithoutVersion\n } configured multiple times for \"${componentId.toString()}\"\\n${allVersions.join('\\n')}`\n );\n }\n return allVersions.length === 1 ? allVersions[0] : undefined;\n }\n\n /**\n * components that were not tagged yet are safe to rename them from the .bitmap file.\n */\n renameNewComponent(sourceId: ComponentID, targetId: ComponentID) {\n const bitMapEntry = this.getBitmapEntry(sourceId);\n if (bitMapEntry.id.hasVersion()) {\n throw new Error(`unable to rename tagged or exported component: ${bitMapEntry.id.toString()}`);\n }\n if (sourceId.isEqual(targetId)) {\n throw new Error(`source-id and target-id are equal: \"${sourceId.toString()}\"`);\n }\n if (sourceId.fullName !== targetId.fullName) {\n this.legacyBitMap.removeComponent(bitMapEntry.id);\n bitMapEntry.id = targetId._legacy;\n this.legacyBitMap.setComponent(bitMapEntry.id, bitMapEntry);\n }\n if (sourceId.scope !== targetId.scope) {\n this.setDefaultScope(targetId, targetId.scope);\n }\n }\n\n removeComponent(id: ComponentID) {\n this.legacyBitMap.removeComponent(id._legacy);\n }\n\n /**\n * this is the lane-id of the recently exported lane. in case of a new lane, which was not exported yet, this will be\n * empty.\n */\n getExportedLaneId(): LaneId | undefined {\n return this.legacyBitMap.isLaneExported ? this.legacyBitMap.laneId : undefined;\n }\n\n /**\n * whether .bitmap file has changed in-memory\n */\n hasChanged(): boolean {\n return this.legacyBitMap.hasChanged;\n }\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAMA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;AACA;AACA;AACA;AACO,MAAMA,MAAN,CAAa;EAClBC,WAAW,CAASC,YAAT,EAA6CC,QAA7C,EAAiE;IAAA,KAAxDD,YAAwD,GAAxDA,YAAwD;IAAA,KAApBC,QAAoB,GAApBA,QAAoB;EAAE;EAE9E;AACF;AACA;AACA;AACA;;;EACEC,kBAAkB,CAChBC,EADgB,EAEhBC,QAFgB,EAGhBC,MAA2B,GAAG,EAHd,EAIhBC,iBAAiB,GAAG,KAJJ,EAKP;IACT,IAAI,CAACF,QAAD,IAAa,OAAOA,QAAP,KAAoB,QAArC,EAA+C,MAAM,IAAIG,KAAJ,CAAW,qCAAoCH,QAAS,EAAxD,CAAN;IAC/C,MAAMI,WAAW,GAAG,KAAKC,cAAL,CAAoBN,EAApB,EAAwB;MAAEO,qBAAqB,EAAE;IAAzB,CAAxB,CAApB;IACA,MAAMC,aAAa,GAAG,CAACH,WAAW,CAACH,MAAb,KAACG,WAAW,CAACH,MAAb,GAAwB,EAAxB,GAA4BD,QAA5B,CAAtB;;IACA,IAAI,IAAAQ,iBAAA,EAAQD,aAAR,EAAuBN,MAAvB,CAAJ,EAAoC;MAClC,OAAO,KAAP,CADkC,CACpB;IACf;;IACD,MAAMQ,YAAY,GAAG,MAAM;MACzB,IAAI,CAACR,MAAL,EAAa,OAAO,IAAP;MACb,IAAI,CAACC,iBAAL,EAAwB,OAAOD,MAAP,CAFC,CAGzB;;M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;IACD,IAAIW,QAAQ,CAACjC,OAAT,CAAiBkC,QAAjB,CAAJ,EAAgC;MAC9B,MAAM,IAAIvC,KAAJ,CAAW,uCAAsCsC,QAAQ,CAACX,QAAT,EAAoB,GAArE,CAAN;IACD;;IACD,IAAIW,QAAQ,CAACG,QAAT,KAAsBF,QAAQ,CAACE,QAAnC,EAA6C;MAC3C,KAAKhD,YAAL,CAAkBiD,eAAlB,CAAkCzC,WAAW,CAACL,EAA9C;MACAK,WAAW,CAACL,EAAZ,GAAiB2C,QAAQ,CAACjB,OAA1B;MACA,KAAK7B,YAAL,CAAkBkD,YAAlB,CAA+B1C,WAAW,CAACL,EAA3C,EAA+CK,WAA/C;IACD;;IACD,IAAIqC,QAAQ,CAACM,KAAT,KAAmBL,QAAQ,CAACK,KAAhC,EAAuC;MACrC,KAAK3B,eAAL,CAAqBsB,QAArB,EAA+BA,QAAQ,CAACK,KAAxC;IACD;EACF;;EAEDF,eAAe,CAAC9C,EAAD,EAAkB;IAC/B,KAAKH,YAAL,CAAkBiD,eAAlB,CAAkC9C,EAAE,CAAC0B,OAArC;EACD;EAED;AACF;AACA;AACA;;;EACEuB,iBAAiB,GAAuB;IACtC,OAAO,KAAKpD,YAAL,CAAkBqD,cAAlB,GAAmC,KAAKrD,YAAL,CAAkBsD,MAArD,GAA8DrB,SAArE;EACD;EAED;AACF;AACA;;;EACEsB,UAAU,GAAY;IACpB,OAAO,KAAKvD,YAAL,CAAkBuD,UAAzB;EACD;;AAxKiB"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/workspace",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.843",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/workspace/workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.workspace",
|
|
8
8
|
"name": "workspace",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.843"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -38,50 +38,50 @@
|
|
|
38
38
|
"@teambit/base-ui.surfaces.split-pane.hover-splitter": "1.0.0",
|
|
39
39
|
"@teambit/base-ui.surfaces.split-pane.split-pane": "1.0.0",
|
|
40
40
|
"@teambit/bit-error": "0.0.400",
|
|
41
|
-
"@teambit/component-id": "0.0.
|
|
41
|
+
"@teambit/component-id": "0.0.417",
|
|
42
42
|
"@teambit/lane-id": "0.0.81",
|
|
43
|
-
"@teambit/legacy-bit-id": "0.0.
|
|
43
|
+
"@teambit/legacy-bit-id": "0.0.414",
|
|
44
44
|
"@teambit/logger": "0.0.655",
|
|
45
|
-
"@teambit/scope": "0.0.
|
|
45
|
+
"@teambit/scope": "0.0.843",
|
|
46
46
|
"@teambit/cli": "0.0.562",
|
|
47
|
-
"@teambit/isolator": "0.0.
|
|
48
|
-
"@teambit/component-tree": "0.0.
|
|
47
|
+
"@teambit/isolator": "0.0.843",
|
|
48
|
+
"@teambit/component-tree": "0.0.631",
|
|
49
49
|
"@teambit/component.ui.component-status-resolver": "0.0.499",
|
|
50
|
-
"@teambit/lanes.hooks.use-lanes": "0.0.
|
|
50
|
+
"@teambit/lanes.hooks.use-lanes": "0.0.22",
|
|
51
51
|
"@teambit/harmony.modules.resolved-component": "0.0.490",
|
|
52
|
-
"@teambit/dependency-resolver": "0.0.
|
|
53
|
-
"@teambit/compiler": "0.0.
|
|
54
|
-
"@teambit/component": "0.0.
|
|
55
|
-
"@teambit/graphql": "0.0.
|
|
56
|
-
"@teambit/aspect-loader": "0.0.
|
|
57
|
-
"@teambit/bundler": "0.0.
|
|
52
|
+
"@teambit/dependency-resolver": "0.0.843",
|
|
53
|
+
"@teambit/compiler": "0.0.843",
|
|
54
|
+
"@teambit/component": "0.0.843",
|
|
55
|
+
"@teambit/graphql": "0.0.843",
|
|
56
|
+
"@teambit/aspect-loader": "0.0.843",
|
|
57
|
+
"@teambit/bundler": "0.0.843",
|
|
58
58
|
"@teambit/community": "0.0.110",
|
|
59
|
-
"@teambit/envs": "0.0.
|
|
60
|
-
"@teambit/pubsub": "0.0.
|
|
61
|
-
"@teambit/ui": "0.0.
|
|
62
|
-
"@teambit/variants": "0.0.
|
|
63
|
-
"@teambit/component-issues": "0.0.
|
|
59
|
+
"@teambit/envs": "0.0.843",
|
|
60
|
+
"@teambit/pubsub": "0.0.843",
|
|
61
|
+
"@teambit/ui": "0.0.843",
|
|
62
|
+
"@teambit/variants": "0.0.665",
|
|
63
|
+
"@teambit/component-issues": "0.0.72",
|
|
64
64
|
"@teambit/config": "0.0.575",
|
|
65
65
|
"@teambit/harmony.modules.requireable-component": "0.0.490",
|
|
66
|
-
"@teambit/importer": "0.0.
|
|
66
|
+
"@teambit/importer": "0.0.272",
|
|
67
67
|
"@teambit/workspace.modules.match-pattern": "0.0.495",
|
|
68
|
-
"@teambit/component.ui.component-drawer": "0.0.
|
|
68
|
+
"@teambit/component.ui.component-drawer": "0.0.117",
|
|
69
69
|
"@teambit/design.ui.tree": "0.0.12",
|
|
70
|
-
"@teambit/ui-foundation.ui.side-bar": "0.0.
|
|
71
|
-
"@teambit/command-bar": "0.0.
|
|
70
|
+
"@teambit/ui-foundation.ui.side-bar": "0.0.634",
|
|
71
|
+
"@teambit/command-bar": "0.0.843",
|
|
72
72
|
"@teambit/component.ui.component-filters.component-filter-context": "0.0.7",
|
|
73
73
|
"@teambit/component.ui.component-filters.deprecate-filter": "0.0.7",
|
|
74
|
-
"@teambit/component.ui.component-filters.env-filter": "0.0.
|
|
75
|
-
"@teambit/graph": "0.0.
|
|
76
|
-
"@teambit/sidebar": "0.0.
|
|
74
|
+
"@teambit/component.ui.component-filters.env-filter": "0.0.13",
|
|
75
|
+
"@teambit/graph": "0.0.843",
|
|
76
|
+
"@teambit/sidebar": "0.0.843",
|
|
77
77
|
"@teambit/ui-foundation.ui.main-dropdown": "0.0.493",
|
|
78
78
|
"@teambit/ui-foundation.ui.menu": "0.0.493",
|
|
79
79
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.496",
|
|
80
80
|
"@teambit/ui-foundation.ui.tree.drawer": "0.0.505",
|
|
81
81
|
"@teambit/toolbox.time.time-format": "0.0.489",
|
|
82
82
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.496",
|
|
83
|
-
"@teambit/component-descriptor": "0.0.
|
|
84
|
-
"@teambit/deprecation": "0.0.
|
|
83
|
+
"@teambit/component-descriptor": "0.0.131",
|
|
84
|
+
"@teambit/deprecation": "0.0.843",
|
|
85
85
|
"@teambit/ui-foundation.ui.constants.z-indexes": "0.0.494",
|
|
86
86
|
"@teambit/ui-foundation.ui.buttons.collapser": "0.0.201",
|
|
87
87
|
"@teambit/ui-foundation.ui.corner": "0.0.504",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.843/dist/workspace.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@0.0.843/dist/workspace.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|