@teambit/workspace 1.0.202 → 1.0.204
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_workspace_workspace-preview.js +1 -1
- package/artifacts/schema.json +137 -137
- package/dist/{preview-1710933261301.js → preview-1711077715212.js} +2 -2
- package/dist/workspace.js +6 -1
- package/dist/workspace.js.map +1 -1
- package/package.json +23 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.204/dist/workspace.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.workspace_workspace@1.0.204/dist/workspace.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/dist/workspace.js
CHANGED
|
@@ -1879,6 +1879,9 @@ the following envs are used in this workspace: ${availableEnvs.join(', ')}`);
|
|
|
1879
1879
|
*/
|
|
1880
1880
|
async setEnvToComponents(envId, componentIds) {
|
|
1881
1881
|
const envStrWithPossiblyVersion = await this.resolveEnvIdWithPotentialVersionForConfig(envId);
|
|
1882
|
+
const envComp = await this.get(_componentId().ComponentID.fromString(envStrWithPossiblyVersion));
|
|
1883
|
+
const isEnv = this.envs.isEnv(envComp);
|
|
1884
|
+
if (!isEnv) throw new (_bitError().BitError)(`the component ${envComp.id.toString()} is not an env`);
|
|
1882
1885
|
const envIdStrNoVersion = envId.toStringWithoutVersion();
|
|
1883
1886
|
await this.unsetEnvFromComponents(componentIds);
|
|
1884
1887
|
await Promise.all(componentIds.map(async componentId => {
|
|
@@ -1912,7 +1915,9 @@ the following envs are used in this workspace: ${availableEnvs.join(', ')}`);
|
|
|
1912
1915
|
return found.extensionId.toString();
|
|
1913
1916
|
}
|
|
1914
1917
|
const comps = await this.importAndGetMany([envId], `to get the env ${envId.toString()}`);
|
|
1915
|
-
|
|
1918
|
+
const comp = comps[0];
|
|
1919
|
+
if (!comp) throw new (_bitError().BitError)(`unable to find ${envId.toString()} in the workspace or in the remote`);
|
|
1920
|
+
return comp.id.toString();
|
|
1916
1921
|
}
|
|
1917
1922
|
|
|
1918
1923
|
/**
|