@teambit/workspace 1.0.1200 → 1.0.1202

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/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export type { WorkspaceMain } from './workspace.main.runtime';
6
6
  export * from './events';
7
7
  export type { WorkspaceUI } from './workspace.ui.runtime';
8
8
  export type { SerializableResults, OnComponentLoad, OnComponentEventResult } from './on-component-events';
9
+ export { CheckTypes } from './watch-options';
10
+ export type { WatchOptions } from './watch-options';
9
11
  export { ComponentStatus } from './workspace-component';
10
12
  export type { WorkspaceModelComponent } from './ui/workspace/workspace-model';
11
13
  export { Workspace as WorkspaceModel } from './ui/workspace/workspace-model';
package/dist/index.js CHANGED
@@ -5,11 +5,18 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var _exportNames = {
7
7
  WorkspaceAspect: true,
8
+ CheckTypes: true,
8
9
  ComponentStatus: true,
9
10
  WorkspaceModel: true,
10
11
  WorkspaceContext: true,
11
12
  OutsideWorkspaceError: true
12
13
  };
14
+ Object.defineProperty(exports, "CheckTypes", {
15
+ enumerable: true,
16
+ get: function () {
17
+ return _watchOptions().CheckTypes;
18
+ }
19
+ });
13
20
  Object.defineProperty(exports, "ComponentStatus", {
14
21
  enumerable: true,
15
22
  get: function () {
@@ -60,6 +67,13 @@ Object.keys(_events).forEach(function (key) {
60
67
  }
61
68
  });
62
69
  });
70
+ function _watchOptions() {
71
+ const data = require("./watch-options");
72
+ _watchOptions = function () {
73
+ return data;
74
+ };
75
+ return data;
76
+ }
63
77
  function _workspaceComponent() {
64
78
  const data = require("./workspace-component");
65
79
  _workspaceComponent = function () {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_workspace","data","require","_events","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_workspaceComponent","_workspaceModel","_workspaceContext","_outsideWorkspace","_default","default","WorkspaceAspect"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceAspect } from './workspace.aspect';\n// eslint-disable-next-line import/prefer-default-export\nexport type { default as Workspace, ExtensionsOrigin } from './workspace';\n// TODO: change to module path once track the utils folder\nexport type { ResolvedComponent } from '@teambit/harmony.modules.resolved-component';\nexport type { AlreadyExistsError as ComponentConfigFileAlreadyExistsError } from './component-config-file';\nexport type { WorkspaceMain } from './workspace.main.runtime';\nexport * from './events';\nexport type { WorkspaceUI } from './workspace.ui.runtime';\nexport type { SerializableResults, OnComponentLoad, OnComponentEventResult } from './on-component-events';\nexport { ComponentStatus } from './workspace-component';\nexport type { WorkspaceModelComponent } from './ui/workspace/workspace-model';\nexport { Workspace as WorkspaceModel } from './ui/workspace/workspace-model';\nexport { WorkspaceContext } from './ui/workspace/workspace-context';\nexport { OutsideWorkspaceError } from './exceptions/outside-workspace';\nexport type { WorkspaceComponent, ComponentLoadOptions as WorkspaceComponentLoadOptions } from './workspace-component';\nexport type { ComponentConfigFile } from './component-config-file';\nexport type { CompFiles, FilesStatus } from './workspace-component/comp-files';\nexport type { MergeOptions as BitmapMergeOptions } from './bit-map';\nexport type { WorkspaceExtConfig } from './types';\nexport type { AutoTagResult } from './auto-tag';\nexport { WorkspaceAspect };\nexport default WorkspaceAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOA,IAAAE,OAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAGA,SAAAS,oBAAA;EAAA,MAAAf,IAAA,GAAAC,OAAA;EAAAc,mBAAA,YAAAA,CAAA;IAAA,OAAAf,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAgB,gBAAA;EAAA,MAAAhB,IAAA,GAAAC,OAAA;EAAAe,eAAA,YAAAA,CAAA;IAAA,OAAAhB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAiB,kBAAA;EAAA,MAAAjB,IAAA,GAAAC,OAAA;EAAAgB,iBAAA,YAAAA,CAAA;IAAA,OAAAjB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAkB,kBAAA;EAAA,MAAAlB,IAAA,GAAAC,OAAA;EAAAiB,iBAAA,YAAAA,CAAA;IAAA,OAAAlB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAbA;AAEA;AAAA,IAAAmB,QAAA,GAAAR,OAAA,CAAAS,OAAA,GAmBeC,4BAAe","ignoreList":[]}
1
+ {"version":3,"names":["_workspace","data","require","_events","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_watchOptions","_workspaceComponent","_workspaceModel","_workspaceContext","_outsideWorkspace","_default","default","WorkspaceAspect"],"sources":["index.ts"],"sourcesContent":["import { WorkspaceAspect } from './workspace.aspect';\n// eslint-disable-next-line import/prefer-default-export\nexport type { default as Workspace, ExtensionsOrigin } from './workspace';\n// TODO: change to module path once track the utils folder\nexport type { ResolvedComponent } from '@teambit/harmony.modules.resolved-component';\nexport type { AlreadyExistsError as ComponentConfigFileAlreadyExistsError } from './component-config-file';\nexport type { WorkspaceMain } from './workspace.main.runtime';\nexport * from './events';\nexport type { WorkspaceUI } from './workspace.ui.runtime';\nexport type { SerializableResults, OnComponentLoad, OnComponentEventResult } from './on-component-events';\nexport { CheckTypes } from './watch-options';\nexport type { WatchOptions } from './watch-options';\nexport { ComponentStatus } from './workspace-component';\nexport type { WorkspaceModelComponent } from './ui/workspace/workspace-model';\nexport { Workspace as WorkspaceModel } from './ui/workspace/workspace-model';\nexport { WorkspaceContext } from './ui/workspace/workspace-context';\nexport { OutsideWorkspaceError } from './exceptions/outside-workspace';\nexport type { WorkspaceComponent, ComponentLoadOptions as WorkspaceComponentLoadOptions } from './workspace-component';\nexport type { ComponentConfigFile } from './component-config-file';\nexport type { CompFiles, FilesStatus } from './workspace-component/comp-files';\nexport type { MergeOptions as BitmapMergeOptions } from './bit-map';\nexport type { WorkspaceExtConfig } from './types';\nexport type { AutoTagResult } from './auto-tag';\nexport { WorkspaceAspect };\nexport default WorkspaceAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAOA,IAAAE,OAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAGA,SAAAS,cAAA;EAAA,MAAAf,IAAA,GAAAC,OAAA;EAAAc,aAAA,YAAAA,CAAA;IAAA,OAAAf,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAgB,oBAAA;EAAA,MAAAhB,IAAA,GAAAC,OAAA;EAAAe,mBAAA,YAAAA,CAAA;IAAA,OAAAhB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAiB,gBAAA;EAAA,MAAAjB,IAAA,GAAAC,OAAA;EAAAgB,eAAA,YAAAA,CAAA;IAAA,OAAAjB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAkB,kBAAA;EAAA,MAAAlB,IAAA,GAAAC,OAAA;EAAAiB,iBAAA,YAAAA,CAAA;IAAA,OAAAlB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAmB,kBAAA;EAAA,MAAAnB,IAAA,GAAAC,OAAA;EAAAkB,iBAAA,YAAAA,CAAA;IAAA,OAAAnB,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAfA;AAEA;AAAA,IAAAoB,QAAA,GAAAT,OAAA,CAAAU,OAAA,GAqBeC,4BAAe","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { Component, ComponentID, AspectData } from '@teambit/component';
2
2
  import type { ComponentLoadOptions } from '@teambit/legacy.consumer-component';
3
3
  import type { PathOsBasedAbsolute } from '@teambit/legacy.utils';
4
- import type { WatchOptions } from '@teambit/watcher';
4
+ import type { WatchOptions } from './watch-options';
5
5
  export type SerializableResults = {
6
6
  results: any;
7
7
  toString: () => string;
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["on-component-events.ts"],"sourcesContent":["import type { Component, ComponentID, AspectData } from '@teambit/component';\nimport type { ComponentLoadOptions } from '@teambit/legacy.consumer-component';\nimport type { PathOsBasedAbsolute } from '@teambit/legacy.utils';\nimport type { WatchOptions } from '@teambit/watcher';\n\nexport type SerializableResults = { results: any; toString: () => string };\nexport type OnComponentChange = (\n component: Component,\n files: PathOsBasedAbsolute[],\n removedFiles: PathOsBasedAbsolute[],\n watchOpts: WatchOptions\n) => Promise<SerializableResults | void>;\nexport type OnComponentAdd = (\n component: Component,\n files: string[],\n watchOpts: WatchOptions\n) => Promise<SerializableResults | void>;\nexport type OnComponentRemove = (componentId: ComponentID) => Promise<SerializableResults>;\nexport type OnComponentEventResult = { extensionId: string; results: SerializableResults };\n\nexport type OnComponentLoad = (\n component: Component,\n loadOpts?: ComponentLoadOptions\n) => Promise<AspectData | undefined>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["on-component-events.ts"],"sourcesContent":["import type { Component, ComponentID, AspectData } from '@teambit/component';\nimport type { ComponentLoadOptions } from '@teambit/legacy.consumer-component';\nimport type { PathOsBasedAbsolute } from '@teambit/legacy.utils';\nimport type { WatchOptions } from './watch-options';\n\nexport type SerializableResults = { results: any; toString: () => string };\nexport type OnComponentChange = (\n component: Component,\n files: PathOsBasedAbsolute[],\n removedFiles: PathOsBasedAbsolute[],\n watchOpts: WatchOptions\n) => Promise<SerializableResults | void>;\nexport type OnComponentAdd = (\n component: Component,\n files: string[],\n watchOpts: WatchOptions\n) => Promise<SerializableResults | void>;\nexport type OnComponentRemove = (componentId: ComponentID) => Promise<SerializableResults>;\nexport type OnComponentEventResult = { extensionId: string; results: SerializableResults };\n\nexport type OnComponentLoad = (\n component: Component,\n loadOpts?: ComponentLoadOptions\n) => Promise<AspectData | undefined>;\n"],"mappings":"","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1200/dist/workspace.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1200/dist/workspace.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1202/dist/workspace.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.workspace_workspace@1.0.1202/dist/workspace.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -0,0 +1,18 @@
1
+ import type { ComponentID } from '@teambit/component-id';
2
+ export declare enum CheckTypes {
3
+ None = 0,// keep this. it equals zero. this way we can do "if checkTypes() ... "
4
+ EntireProject = 1,
5
+ ChangedFile = 2
6
+ }
7
+ export type WatchOptions = {
8
+ initiator?: any;
9
+ verbose?: boolean;
10
+ spawnTSServer?: boolean;
11
+ checkTypes?: CheckTypes;
12
+ preCompile?: boolean;
13
+ compile?: boolean;
14
+ import?: boolean;
15
+ preImport?: boolean;
16
+ generateTypes?: boolean;
17
+ trigger?: ComponentID;
18
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CheckTypes = void 0;
7
+ // the watch options live here and not in the watcher aspect, because the workspace passes them to
8
+ // the onComponentChange/onComponentAdd hooks, and the watcher aspect depends on the workspace.
9
+ let CheckTypes = exports.CheckTypes = /*#__PURE__*/function (CheckTypes) {
10
+ CheckTypes[CheckTypes["None"] = 0] = "None";
11
+ // keep this. it equals zero. this way we can do "if checkTypes() ... "
12
+ CheckTypes[CheckTypes["EntireProject"] = 1] = "EntireProject";
13
+ CheckTypes[CheckTypes["ChangedFile"] = 2] = "ChangedFile";
14
+ return CheckTypes;
15
+ }({});
16
+
17
+ //# sourceMappingURL=watch-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CheckTypes","exports"],"sources":["watch-options.ts"],"sourcesContent":["import type { ComponentID } from '@teambit/component-id';\n\n// the watch options live here and not in the watcher aspect, because the workspace passes them to\n// the onComponentChange/onComponentAdd hooks, and the watcher aspect depends on the workspace.\n\nexport enum CheckTypes {\n None, // keep this. it equals zero. this way we can do \"if checkTypes() ... \"\n EntireProject,\n ChangedFile,\n}\n\nexport type WatchOptions = {\n initiator?: any; // the real type is CompilationInitiator, however it creates a circular dependency with the compiler aspect.\n verbose?: boolean; // print watch events to the console. (also ts-server events if spawnTSServer is true)\n spawnTSServer?: boolean; // needed for check types and extract API/docs.\n checkTypes?: CheckTypes; // if enabled, the spawnTSServer becomes true.\n preCompile?: boolean; // whether compile all components before start watching\n compile?: boolean; // whether compile modified/added components during watch process\n import?: boolean; // whether import objects during watch when .bitmap got version changes\n preImport?: boolean; // whether import objects before starting the watch process in case .bitmap is more updated than local scope.\n generateTypes?: boolean; // whether generate d.ts files for typescript files during watch process (hurts performance)\n trigger?: ComponentID; // trigger onComponentChange for the specified component-id. helpful when this comp must be a bundle, and needs to be recompile on any dep change.\n};\n"],"mappings":";;;;;;AAEA;AACA;AAAA,IAEYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EACd;EADIA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}
@@ -22,7 +22,7 @@ import type { PathOsBased, PathOsBasedRelative, PathOsBasedAbsolute } from '@tea
22
22
  import type { CompIdGraph, DepEdgeType } from '@teambit/graph';
23
23
  import type { Dependency as LegacyDependency } from '@teambit/legacy.consumer-component';
24
24
  import { ConsumerComponent } from '@teambit/legacy.consumer-component';
25
- import type { WatchOptions } from '@teambit/watcher';
25
+ import type { WatchOptions } from './watch-options';
26
26
  import type { ComponentLog, Lane } from '@teambit/objects';
27
27
  import type { JsonVinyl } from '@teambit/component.sources';
28
28
  import { SourceFile } from '@teambit/component.sources';