@teambit/workspace 0.0.880 → 0.0.882

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 (106) hide show
  1. package/dist/bit-map.js +10 -51
  2. package/dist/bit-map.js.map +1 -1
  3. package/dist/build-graph-from-fs.js +3 -54
  4. package/dist/build-graph-from-fs.js.map +1 -1
  5. package/dist/capsule.cmd.js +2 -34
  6. package/dist/capsule.cmd.js.map +1 -1
  7. package/dist/component-config-file/component-config-file.js +2 -60
  8. package/dist/component-config-file/component-config-file.js.map +1 -1
  9. package/dist/component-config-file/exceptions/already-exists.js +0 -6
  10. package/dist/component-config-file/exceptions/already-exists.js.map +1 -1
  11. package/dist/component-config-file/exceptions/index.js +0 -3
  12. package/dist/component-config-file/exceptions/index.js.map +1 -1
  13. package/dist/component-config-file/index.js +0 -6
  14. package/dist/component-config-file/index.js.map +1 -1
  15. package/dist/component-tree.widget.js +0 -18
  16. package/dist/component-tree.widget.js.map +1 -1
  17. package/dist/constants.js.map +1 -1
  18. package/dist/eject-conf.cmd.js +0 -23
  19. package/dist/eject-conf.cmd.js.map +1 -1
  20. package/dist/envs-subcommands/envs-replace.cmd.js +0 -13
  21. package/dist/envs-subcommands/envs-replace.cmd.js.map +1 -1
  22. package/dist/envs-subcommands/envs-set.cmd.js +0 -16
  23. package/dist/envs-subcommands/envs-set.cmd.js.map +1 -1
  24. package/dist/envs-subcommands/envs-unset.cmd.js +0 -18
  25. package/dist/envs-subcommands/envs-unset.cmd.js.map +1 -1
  26. package/dist/events/index.js +0 -6
  27. package/dist/events/index.js.map +1 -1
  28. package/dist/events/on-component-add-event.js +1 -12
  29. package/dist/events/on-component-add-event.js.map +1 -1
  30. package/dist/events/on-component-change-event.js +1 -12
  31. package/dist/events/on-component-change-event.js.map +1 -1
  32. package/dist/events/on-component-removed-event.js +1 -12
  33. package/dist/events/on-component-removed-event.js.map +1 -1
  34. package/dist/exceptions/incorrect-env-aspect.js +0 -6
  35. package/dist/exceptions/incorrect-env-aspect.js.map +1 -1
  36. package/dist/index.js +0 -19
  37. package/dist/index.js.map +1 -1
  38. package/dist/list.cmd.js +2 -15
  39. package/dist/list.cmd.js.map +1 -1
  40. package/dist/pattern.cmd.js +0 -16
  41. package/dist/pattern.cmd.js.map +1 -1
  42. package/dist/scope-subcommands/scope-set.cmd.js +0 -17
  43. package/dist/scope-subcommands/scope-set.cmd.js.map +1 -1
  44. package/dist/ui/index.js +0 -3
  45. package/dist/ui/index.js.map +1 -1
  46. package/dist/ui/workspace/default-component.js.map +1 -1
  47. package/dist/ui/workspace/index.js +0 -2
  48. package/dist/ui/workspace/index.js.map +1 -1
  49. package/dist/ui/workspace/use-workspace.js +14 -49
  50. package/dist/ui/workspace/use-workspace.js.map +1 -1
  51. package/dist/ui/workspace/workspace-context.js +0 -7
  52. package/dist/ui/workspace/workspace-context.js.map +1 -1
  53. package/dist/ui/workspace/workspace-model.js +2 -14
  54. package/dist/ui/workspace/workspace-model.js.map +1 -1
  55. package/dist/ui/workspace/workspace-overview/index.js +0 -3
  56. package/dist/ui/workspace/workspace-overview/index.js.map +1 -1
  57. package/dist/ui/workspace/workspace-overview/workspace-overview.js +0 -23
  58. package/dist/ui/workspace/workspace-overview/workspace-overview.js.map +1 -1
  59. package/dist/ui/workspace/workspace-provider.js +0 -8
  60. package/dist/ui/workspace/workspace-provider.js.map +1 -1
  61. package/dist/ui/workspace/workspace.js +2 -52
  62. package/dist/ui/workspace/workspace.js.map +1 -1
  63. package/dist/use.cmd.js +0 -13
  64. package/dist/use.cmd.js.map +1 -1
  65. package/dist/watch/check-types.js +0 -1
  66. package/dist/watch/check-types.js.map +1 -1
  67. package/dist/watch/output-formatter.js +1 -12
  68. package/dist/watch/output-formatter.js.map +1 -1
  69. package/dist/watch/watch-queue.js +0 -13
  70. package/dist/watch/watch-queue.js.map +1 -1
  71. package/dist/watch/watch.cmd.js +6 -41
  72. package/dist/watch/watch.cmd.js.map +1 -1
  73. package/dist/watch/watcher.js +13 -133
  74. package/dist/watch/watcher.js.map +1 -1
  75. package/dist/workspace-component/component-status.js +0 -4
  76. package/dist/workspace-component/component-status.js.map +1 -1
  77. package/dist/workspace-component/index.js +0 -6
  78. package/dist/workspace-component/index.js.map +1 -1
  79. package/dist/workspace-component/workspace-component-loader.js +21 -114
  80. package/dist/workspace-component/workspace-component-loader.js.map +1 -1
  81. package/dist/workspace-component/workspace-component.js +1 -11
  82. package/dist/workspace-component/workspace-component.js.map +1 -1
  83. package/dist/workspace-section.js +2 -0
  84. package/dist/workspace-section.js.map +1 -1
  85. package/dist/workspace.aspect.js +0 -5
  86. package/dist/workspace.aspect.js.map +1 -1
  87. package/dist/workspace.composition.js +0 -6
  88. package/dist/workspace.composition.js.map +1 -1
  89. package/dist/workspace.graphql.js +0 -12
  90. package/dist/workspace.graphql.js.map +1 -1
  91. package/dist/workspace.js +134 -545
  92. package/dist/workspace.js.map +1 -1
  93. package/dist/workspace.main.runtime.js +0 -55
  94. package/dist/workspace.main.runtime.js.map +1 -1
  95. package/dist/workspace.provider.js +8 -77
  96. package/dist/workspace.provider.js.map +1 -1
  97. package/dist/workspace.ui-root.js +3 -17
  98. package/dist/workspace.ui-root.js.map +1 -1
  99. package/dist/workspace.ui.drawer.js +2 -24
  100. package/dist/workspace.ui.drawer.js.map +1 -1
  101. package/dist/workspace.ui.runtime.js +0 -75
  102. package/dist/workspace.ui.runtime.js.map +1 -1
  103. package/package-tar/teambit-workspace-0.0.882.tgz +0 -0
  104. package/package.json +33 -33
  105. package/{preview-1666312873430.js → preview-1666496165706.js} +2 -2
  106. package/package-tar/teambit-workspace-0.0.880.tgz +0 -0
@@ -1,22 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  require("core-js/modules/es.promise.js");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.WorkspaceComponent = void 0;
9
-
10
8
  function _component() {
11
9
  const data = require("@teambit/component");
12
-
13
10
  _component = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  // TODO: refactor this to a composition rather than to use inheritance
21
16
  class WorkspaceComponent extends _component().Component {
22
17
  constructor(
@@ -46,25 +41,20 @@ class WorkspaceComponent extends _component().Component {
46
41
  this.tags = tags;
47
42
  this.workspace = workspace;
48
43
  }
49
-
50
44
  async getStatus() {
51
45
  return this.workspace.getComponentStatus(this);
52
46
  }
47
+
53
48
  /**
54
49
  * get all issues reported on the component.
55
50
  */
56
-
57
-
58
51
  getIssues() {
59
52
  return this.workspace.getComponentIssues(this);
60
53
  }
61
-
62
54
  static fromComponent(component, workspace) {
63
55
  return new WorkspaceComponent(component.id, component.head, component.state, component.tags, workspace);
64
56
  }
65
-
66
57
  }
67
-
68
58
  exports.WorkspaceComponent = WorkspaceComponent;
69
59
 
70
60
  //# sourceMappingURL=workspace-component.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WorkspaceComponent","Component","constructor","id","head","workspaceState","tags","TagMap","workspace","getStatus","getComponentStatus","getIssues","getComponentIssues","fromComponent","component","state"],"sources":["workspace-component.ts"],"sourcesContent":["import { Component, ComponentID, Snap, State, TagMap } from '@teambit/component';\nimport { IssuesList } from '@teambit/component-issues';\nimport { Workspace } from '../workspace';\nimport { ComponentStatus } from './component-status';\n\n// TODO: refactor this to a composition rather than to use inheritance\nexport class WorkspaceComponent extends Component {\n constructor(\n /**\n * component ID represented by the `ComponentId` type.\n */\n readonly id: ComponentID,\n\n /**\n * head version of the component. can be `null` for new components.\n */\n readonly head: Snap | null = null,\n\n /**\n * state of the component.\n */\n workspaceState: State,\n\n /**\n * tags of the component.\n */\n readonly tags: TagMap = new TagMap(),\n\n /**\n * workspace extension.\n */\n readonly workspace: Workspace\n ) {\n super(id, head, workspaceState, tags, workspace);\n }\n\n async getStatus(): Promise<ComponentStatus> {\n return this.workspace.getComponentStatus(this);\n }\n\n /**\n * get all issues reported on the component.\n */\n getIssues(): IssuesList | null {\n return this.workspace.getComponentIssues(this);\n }\n\n static fromComponent(component: Component, workspace: Workspace) {\n return new WorkspaceComponent(component.id, component.head, component.state, component.tags, workspace);\n }\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAKA;AACO,MAAMA,kBAAN,SAAiCC,sBAAjC,CAA2C;EAChDC,WAAW;EACT;AACJ;AACA;EACaC,EAJA;EAMT;AACJ;AACA;EACaC,IAAiB,GAAG,IATpB;EAWT;AACJ;AACA;EACIC,cAdS;EAgBT;AACJ;AACA;EACaC,IAAY,GAAG,KAAIC,mBAAJ,GAnBf;EAqBT;AACJ;AACA;EACaC,SAxBA,EAyBT;IACA,MAAML,EAAN,EAAUC,IAAV,EAAgBC,cAAhB,EAAgCC,IAAhC,EAAsCE,SAAtC;IADA,KArBSL,EAqBT,GArBSA,EAqBT;IAAA,KAhBSC,IAgBT,GAhBSA,IAgBT;IAAA,KANSE,IAMT,GANSA,IAMT;IAAA,KADSE,SACT,GADSA,SACT;EAED;;EAEc,MAATC,SAAS,GAA6B;IAC1C,OAAO,KAAKD,SAAL,CAAeE,kBAAf,CAAkC,IAAlC,CAAP;EACD;EAED;AACF;AACA;;;EACEC,SAAS,GAAsB;IAC7B,OAAO,KAAKH,SAAL,CAAeI,kBAAf,CAAkC,IAAlC,CAAP;EACD;;EAEmB,OAAbC,aAAa,CAACC,SAAD,EAAuBN,SAAvB,EAA6C;IAC/D,OAAO,IAAIR,kBAAJ,CAAuBc,SAAS,CAACX,EAAjC,EAAqCW,SAAS,CAACV,IAA/C,EAAqDU,SAAS,CAACC,KAA/D,EAAsED,SAAS,CAACR,IAAhF,EAAsFE,SAAtF,CAAP;EACD;;AA3C+C"}
1
+ {"version":3,"names":["WorkspaceComponent","Component","constructor","id","head","workspaceState","tags","TagMap","workspace","getStatus","getComponentStatus","getIssues","getComponentIssues","fromComponent","component","state"],"sources":["workspace-component.ts"],"sourcesContent":["import { Component, ComponentID, Snap, State, TagMap } from '@teambit/component';\nimport { IssuesList } from '@teambit/component-issues';\nimport { Workspace } from '../workspace';\nimport { ComponentStatus } from './component-status';\n\n// TODO: refactor this to a composition rather than to use inheritance\nexport class WorkspaceComponent extends Component {\n constructor(\n /**\n * component ID represented by the `ComponentId` type.\n */\n readonly id: ComponentID,\n\n /**\n * head version of the component. can be `null` for new components.\n */\n readonly head: Snap | null = null,\n\n /**\n * state of the component.\n */\n workspaceState: State,\n\n /**\n * tags of the component.\n */\n readonly tags: TagMap = new TagMap(),\n\n /**\n * workspace extension.\n */\n readonly workspace: Workspace\n ) {\n super(id, head, workspaceState, tags, workspace);\n }\n\n async getStatus(): Promise<ComponentStatus> {\n return this.workspace.getComponentStatus(this);\n }\n\n /**\n * get all issues reported on the component.\n */\n getIssues(): IssuesList | null {\n return this.workspace.getComponentIssues(this);\n }\n\n static fromComponent(component: Component, workspace: Workspace) {\n return new WorkspaceComponent(component.id, component.head, component.state, component.tags, workspace);\n }\n}\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;AACO,MAAMA,kBAAkB,SAASC,sBAAS,CAAC;EAChDC,WAAW;EACT;AACJ;AACA;EACaC,EAAe;EAExB;AACJ;AACA;EACaC,IAAiB,GAAG,IAAI;EAEjC;AACJ;AACA;EACIC,cAAqB;EAErB;AACJ;AACA;EACaC,IAAY,GAAG,KAAIC,mBAAM,GAAE;EAEpC;AACJ;AACA;EACaC,SAAoB,EAC7B;IACA,KAAK,CAACL,EAAE,EAAEC,IAAI,EAAEC,cAAc,EAAEC,IAAI,EAAEE,SAAS,CAAC;IAAC,KAtBxCL,EAAe,GAAfA,EAAe;IAAA,KAKfC,IAAiB,GAAjBA,IAAiB;IAAA,KAUjBE,IAAY,GAAZA,IAAY;IAAA,KAKZE,SAAoB,GAApBA,SAAoB;EAG/B;EAEA,MAAMC,SAAS,GAA6B;IAC1C,OAAO,IAAI,CAACD,SAAS,CAACE,kBAAkB,CAAC,IAAI,CAAC;EAChD;;EAEA;AACF;AACA;EACEC,SAAS,GAAsB;IAC7B,OAAO,IAAI,CAACH,SAAS,CAACI,kBAAkB,CAAC,IAAI,CAAC;EAChD;EAEA,OAAOC,aAAa,CAACC,SAAoB,EAAEN,SAAoB,EAAE;IAC/D,OAAO,IAAIR,kBAAkB,CAACc,SAAS,CAACX,EAAE,EAAEW,SAAS,CAACV,IAAI,EAAEU,SAAS,CAACC,KAAK,EAAED,SAAS,CAACR,IAAI,EAAEE,SAAS,CAAC;EACzG;AACF;AAAC"}
@@ -2,6 +2,7 @@
2
2
  // constructor(
3
3
  // readonly route: string
4
4
  // ) {}
5
+
5
6
  // toRoute() {
6
7
  // return {
7
8
  // path: this.toRoute
@@ -9,6 +10,7 @@
9
10
  // };
10
11
  // }
11
12
  // };
13
+
12
14
  // export interface WorkspaceSection {}
13
15
  "use strict";
14
16
 
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["workspace-section.ts"],"sourcesContent":["// export class WorkspaceSection {\n// constructor(\n// readonly route: string\n// ) {}\n\n// toRoute() {\n// return {\n// path: this.toRoute\n// children:\n// };\n// }\n// };\n\n// export interface WorkspaceSection {}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA"}
1
+ {"version":3,"names":[],"sources":["workspace-section.ts"],"sourcesContent":["// export class WorkspaceSection {\n// constructor(\n// readonly route: string\n// ) {}\n\n// toRoute() {\n// return {\n// path: this.toRoute\n// children:\n// };\n// }\n// };\n\n// export interface WorkspaceSection {}\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AAAA"}
@@ -4,23 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.WorkspaceAspect = void 0;
7
-
8
7
  function _harmony() {
9
8
  const data = require("@teambit/harmony");
10
-
11
9
  _harmony = function () {
12
10
  return data;
13
11
  };
14
-
15
12
  return data;
16
13
  }
17
-
18
14
  const WorkspaceAspect = _harmony().Aspect.create({
19
15
  id: 'teambit.workspace/workspace',
20
16
  dependencies: [],
21
17
  defaultConfig: {}
22
18
  });
23
-
24
19
  exports.WorkspaceAspect = WorkspaceAspect;
25
20
  var _default = WorkspaceAspect;
26
21
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["WorkspaceAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["workspace.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const WorkspaceAspect = Aspect.create({\n id: 'teambit.workspace/workspace',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default WorkspaceAspect;\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,eAAe,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EAC3CC,EAAE,EAAE,6BADuC;EAE3CC,YAAY,EAAE,EAF6B;EAG3CC,aAAa,EAAE;AAH4B,CAAd,CAAxB;;;eAMQL,e"}
1
+ {"version":3,"names":["WorkspaceAspect","Aspect","create","id","dependencies","defaultConfig"],"sources":["workspace.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const WorkspaceAspect = Aspect.create({\n id: 'teambit.workspace/workspace',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default WorkspaceAspect;\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,eAAe,GAAGC,iBAAM,CAACC,MAAM,CAAC;EAC3CC,EAAE,EAAE,6BAA6B;EACjCC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC;AAAA,eAEYL,eAAe;AAAA"}
@@ -1,22 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.Logo = void 0;
9
-
10
8
  function _react() {
11
9
  const data = _interopRequireDefault(require("react"));
12
-
13
10
  _react = function () {
14
11
  return data;
15
12
  };
16
-
17
13
  return data;
18
14
  }
19
-
20
15
  const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
21
16
  style: {
22
17
  height: '100%',
@@ -29,7 +24,6 @@ const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
29
24
  },
30
25
  src: "https://static.bit.dev/extensions-icons/workspace.svg"
31
26
  }));
32
-
33
27
  exports.Logo = Logo;
34
28
 
35
29
  //# sourceMappingURL=workspace.composition.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["workspace.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/workspace.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAV;IAAkBC,OAAO,EAAE,MAA3B;IAAmCC,cAAc,EAAE;EAAnD;AAAZ,gBACE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAT,CAAZ;EAA2B,GAAG,EAAC;AAA/B,EADF,CADK"}
1
+ {"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["workspace.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/workspace.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAE;EAAC,GAAG,EAAC;AAAuD,EAAG,CAE5F;AAAC"}
@@ -1,34 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  require("core-js/modules/es.promise.js");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports.default = void 0;
11
-
12
9
  function _graphqlTag() {
13
10
  const data = _interopRequireDefault(require("graphql-tag"));
14
-
15
11
  _graphqlTag = function () {
16
12
  return data;
17
13
  };
18
-
19
14
  return data;
20
15
  }
21
-
22
16
  function _workspace() {
23
17
  const data = require("./workspace");
24
-
25
18
  _workspace = function () {
26
19
  return data;
27
20
  };
28
-
29
21
  return data;
30
22
  }
31
-
32
23
  var _default = (workspace, graphql) => {
33
24
  return {
34
25
  typeDefs: (0, _graphqlTag().default)`
@@ -128,12 +119,10 @@ var _default = (workspace, graphql) => {
128
119
  },
129
120
  issuesCount: wsComponent => {
130
121
  var _wsComponent$getIssue;
131
-
132
122
  return ((_wsComponent$getIssue = wsComponent.getIssues()) === null || _wsComponent$getIssue === void 0 ? void 0 : _wsComponent$getIssue.count) || 0;
133
123
  },
134
124
  issues: wsComponent => {
135
125
  var _wsComponent$getIssue2;
136
-
137
126
  return (_wsComponent$getIssue2 = wsComponent.getIssues()) === null || _wsComponent$getIssue2 === void 0 ? void 0 : _wsComponent$getIssue2.toObjectWithDataAsString();
138
127
  }
139
128
  },
@@ -168,7 +157,6 @@ var _default = (workspace, graphql) => {
168
157
  }
169
158
  };
170
159
  };
171
-
172
160
  exports.default = _default;
173
161
 
174
162
  //# sourceMappingURL=workspace.graphql.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["workspace","graphql","typeDefs","gql","resolvers","Subscription","componentAdded","subscribe","pubsub","asyncIterator","ComponentAdded","componentChanged","ComponentChanged","componentRemoved","ComponentRemoved","Component","status","wsComponent","getStatus","issuesCount","getIssues","count","issues","toObjectWithDataAsString","Workspace","path","ws","name","icon","components","offset","limit","list","getComponent","id","componentID","resolveComponentId","component","get","error","Query"],"sources":["workspace.graphql.ts"],"sourcesContent":["import { GraphqlMain } from '@teambit/graphql';\nimport gql from 'graphql-tag';\n\nimport { ComponentAdded, ComponentChanged, ComponentRemoved, Workspace } from './workspace';\nimport { WorkspaceComponent } from './workspace-component';\n\nexport default (workspace: Workspace, graphql: GraphqlMain) => {\n return {\n typeDefs: gql`\n type ModifyInfo {\n # is the component modified.\n hasModifiedFiles: Boolean\n\n # the component has Modified Dependencies\n hasModifiedDependencies: Boolean\n }\n\n type ComponentStatus {\n # component is pending to be tagged automatically.\n modifyInfo: ModifyInfo\n\n # is the new component new.\n isNew: Boolean\n\n # is the component deleted from the workspace.\n isDeleted: Boolean\n\n # is the component staged.\n isStaged: Boolean\n\n # does the component exists in the workspace.\n isInWorkspace: Boolean\n\n # does the component exists in the scope.\n isInScope: Boolean\n\n # does the component is outdated (pending for update).\n isOutdated: Boolean\n }\n\n extend type Component {\n status: ComponentStatus\n }\n\n type Issue {\n type: String!\n description: String!\n solution: String\n data: String\n }\n\n extend type Component {\n # the count of errors in component in workspace\n issuesCount: Int\n issues: [Issue]\n }\n\n type Workspace {\n name: String\n path: String\n icon: String\n components(offset: Int, limit: Int): [Component]\n getComponent(id: String!): Component\n }\n\n type Subscription {\n componentAdded: ComponentAdded\n componentChanged: ComponentChanged\n componentRemoved: ComponentRemoved\n }\n\n type ComponentAdded {\n component: Component\n }\n\n type ComponentChanged {\n component: Component\n }\n\n type ComponentRemoved {\n componentIds: [ComponentID]\n }\n\n type Query {\n workspace: Workspace\n }\n `,\n resolvers: {\n Subscription: {\n componentAdded: {\n subscribe: () => graphql.pubsub.asyncIterator(ComponentAdded),\n },\n componentChanged: {\n subscribe: () => graphql.pubsub.asyncIterator(ComponentChanged),\n },\n componentRemoved: {\n subscribe: () => graphql.pubsub.asyncIterator(ComponentRemoved),\n },\n },\n Component: {\n status: async (wsComponent: WorkspaceComponent) => {\n return wsComponent.getStatus();\n },\n issuesCount: (wsComponent: WorkspaceComponent): number => {\n return wsComponent.getIssues()?.count || 0;\n },\n issues: (wsComponent: WorkspaceComponent) => {\n return wsComponent.getIssues()?.toObjectWithDataAsString();\n },\n },\n Workspace: {\n path: (ws) => ws.path,\n name: (ws) => ws.name,\n icon: (ws) => ws.icon,\n components: async (ws: Workspace, { offset, limit }: { offset: number; limit: number }) => {\n return ws.list({ offset, limit });\n },\n getComponent: async (ws: Workspace, { id }: { id: string }) => {\n try {\n const componentID = await ws.resolveComponentId(id);\n const component = await ws.get(componentID);\n return component;\n } catch (error: any) {\n return null;\n }\n },\n },\n Query: {\n workspace: () => workspace,\n },\n },\n };\n};\n"],"mappings":";;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;eAGe,CAACA,SAAD,EAAuBC,OAAvB,KAAgD;EAC7D,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAA,CAAI;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA/ES;IAgFLC,SAAS,EAAE;MACTC,YAAY,EAAE;QACZC,cAAc,EAAE;UACdC,SAAS,EAAE,MAAMN,OAAO,CAACO,MAAR,CAAeC,aAA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nB,OAAO,IAAP;UACD;QACF;MAfQ,CAvBF;MAwCTC,KAAK,EAAE;QACLxC,SAAS,EAAE,MAAMA;MADZ;IAxCE;EAhFN,CAAP;AA6HD,C"}
1
+ {"version":3,"names":["workspace","graphql","typeDefs","gql","resolvers","Subscription","componentAdded","subscribe","pubsub","asyncIterator","ComponentAdded","componentChanged","ComponentChanged","componentRemoved","ComponentRemoved","Component","status","wsComponent","getStatus","issuesCount","getIssues","count","issues","toObjectWithDataAsString","Workspace","path","ws","name","icon","components","offset","limit","list","getComponent","id","componentID","resolveComponentId","component","get","error","Query"],"sources":["workspace.graphql.ts"],"sourcesContent":["import { GraphqlMain } from '@teambit/graphql';\nimport gql from 'graphql-tag';\n\nimport { ComponentAdded, ComponentChanged, ComponentRemoved, Workspace } from './workspace';\nimport { WorkspaceComponent } from './workspace-component';\n\nexport default (workspace: Workspace, graphql: GraphqlMain) => {\n return {\n typeDefs: gql`\n type ModifyInfo {\n # is the component modified.\n hasModifiedFiles: Boolean\n\n # the component has Modified Dependencies\n hasModifiedDependencies: Boolean\n }\n\n type ComponentStatus {\n # component is pending to be tagged automatically.\n modifyInfo: ModifyInfo\n\n # is the new component new.\n isNew: Boolean\n\n # is the component deleted from the workspace.\n isDeleted: Boolean\n\n # is the component staged.\n isStaged: Boolean\n\n # does the component exists in the workspace.\n isInWorkspace: Boolean\n\n # does the component exists in the scope.\n isInScope: Boolean\n\n # does the component is outdated (pending for update).\n isOutdated: Boolean\n }\n\n extend type Component {\n status: ComponentStatus\n }\n\n type Issue {\n type: String!\n description: String!\n solution: String\n data: String\n }\n\n extend type Component {\n # the count of errors in component in workspace\n issuesCount: Int\n issues: [Issue]\n }\n\n type Workspace {\n name: String\n path: String\n icon: String\n components(offset: Int, limit: Int): [Component]\n getComponent(id: String!): Component\n }\n\n type Subscription {\n componentAdded: ComponentAdded\n componentChanged: ComponentChanged\n componentRemoved: ComponentRemoved\n }\n\n type ComponentAdded {\n component: Component\n }\n\n type ComponentChanged {\n component: Component\n }\n\n type ComponentRemoved {\n componentIds: [ComponentID]\n }\n\n type Query {\n workspace: Workspace\n }\n `,\n resolvers: {\n Subscription: {\n componentAdded: {\n subscribe: () => graphql.pubsub.asyncIterator(ComponentAdded),\n },\n componentChanged: {\n subscribe: () => graphql.pubsub.asyncIterator(ComponentChanged),\n },\n componentRemoved: {\n subscribe: () => graphql.pubsub.asyncIterator(ComponentRemoved),\n },\n },\n Component: {\n status: async (wsComponent: WorkspaceComponent) => {\n return wsComponent.getStatus();\n },\n issuesCount: (wsComponent: WorkspaceComponent): number => {\n return wsComponent.getIssues()?.count || 0;\n },\n issues: (wsComponent: WorkspaceComponent) => {\n return wsComponent.getIssues()?.toObjectWithDataAsString();\n },\n },\n Workspace: {\n path: (ws) => ws.path,\n name: (ws) => ws.name,\n icon: (ws) => ws.icon,\n components: async (ws: Workspace, { offset, limit }: { offset: number; limit: number }) => {\n return ws.list({ offset, limit });\n },\n getComponent: async (ws: Workspace, { id }: { id: string }) => {\n try {\n const componentID = await ws.resolveComponentId(id);\n const component = await ws.get(componentID);\n return component;\n } catch (error: any) {\n return null;\n }\n },\n },\n Query: {\n workspace: () => workspace,\n },\n },\n };\n};\n"],"mappings":";;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA4F,eAG7E,CAACA,SAAoB,EAAEC,OAAoB,KAAK;EAC7D,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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