@teambit/api-server 0.0.98 → 0.0.100
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/api-for-vscode.d.ts +11 -1
- package/dist/api-for-vscode.js +84 -1
- package/dist/api-for-vscode.js.map +1 -1
- package/dist/api-server.main.runtime.d.ts +4 -2
- package/dist/api-server.main.runtime.js +10 -3
- package/dist/api-server.main.runtime.js.map +1 -1
- package/dist/vscode.route.js +3 -2
- package/dist/vscode.route.js.map +1 -1
- package/package-tar/teambit-api-server-0.0.100.tgz +0 -0
- package/package.json +12 -8
- package/package-tar/teambit-api-server-0.0.98.tgz +0 -0
- /package/dist/{preview-1687490573363.js → preview-1687750044063.js} +0 -0
package/dist/api-for-vscode.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { Workspace } from '@teambit/workspace';
|
|
2
2
|
import { PathOsBasedAbsolute, PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';
|
|
3
|
+
import { SnappingMain } from '@teambit/snapping';
|
|
3
4
|
export declare class APIForVSCode {
|
|
4
5
|
private workspace;
|
|
5
|
-
|
|
6
|
+
private snapping;
|
|
7
|
+
constructor(workspace: Workspace, snapping: SnappingMain);
|
|
6
8
|
listIdsWithPaths(): Promise<{}>;
|
|
7
9
|
getMainFilePath(id: string): Promise<PathOsBasedAbsolute>;
|
|
8
10
|
getCompFiles(id: string): Promise<{
|
|
9
11
|
dirAbs: string;
|
|
10
12
|
filesRelative: PathOsBasedRelative[];
|
|
11
13
|
}>;
|
|
14
|
+
getCompFilesDirPathFromLastSnap(id: string): Promise<{
|
|
15
|
+
[relativePath: string]: string;
|
|
16
|
+
}>;
|
|
17
|
+
getCompFilesDirPathFromLastSnapForAllComps(): Promise<{
|
|
18
|
+
[relativePath: string]: string;
|
|
19
|
+
}>;
|
|
20
|
+
getCurrentLaneName(): string;
|
|
21
|
+
tagOrSnap(message?: string): Promise<import("@teambit/snapping").TagResults | import("@teambit/snapping").SnapResults | null>;
|
|
12
22
|
}
|
package/dist/api-for-vscode.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
5
|
require("core-js/modules/es.promise.js");
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.APIForVSCode = void 0;
|
|
10
|
+
function _defineProperty2() {
|
|
11
|
+
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
_defineProperty2 = function () {
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
9
17
|
function _path() {
|
|
10
18
|
const data = _interopRequireDefault(require("path"));
|
|
11
19
|
_path = function () {
|
|
@@ -13,9 +21,35 @@ function _path() {
|
|
|
13
21
|
};
|
|
14
22
|
return data;
|
|
15
23
|
}
|
|
24
|
+
function _fsExtra() {
|
|
25
|
+
const data = _interopRequireDefault(require("fs-extra"));
|
|
26
|
+
_fsExtra = function () {
|
|
27
|
+
return data;
|
|
28
|
+
};
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
function _path2() {
|
|
32
|
+
const data = require("@teambit/legacy/dist/utils/path");
|
|
33
|
+
_path2 = function () {
|
|
34
|
+
return data;
|
|
35
|
+
};
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
function _pMap() {
|
|
39
|
+
const data = _interopRequireDefault(require("p-map"));
|
|
40
|
+
_pMap = function () {
|
|
41
|
+
return data;
|
|
42
|
+
};
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
46
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
47
|
+
const FILES_HISTORY_DIR = 'files-history';
|
|
48
|
+
const LAST_SNAP_DIR = 'last-snap';
|
|
16
49
|
class APIForVSCode {
|
|
17
|
-
constructor(workspace) {
|
|
50
|
+
constructor(workspace, snapping) {
|
|
18
51
|
this.workspace = workspace;
|
|
52
|
+
this.snapping = snapping;
|
|
19
53
|
}
|
|
20
54
|
async listIdsWithPaths() {
|
|
21
55
|
const ids = await this.workspace.listIds();
|
|
@@ -39,6 +73,55 @@ class APIForVSCode {
|
|
|
39
73
|
filesRelative
|
|
40
74
|
};
|
|
41
75
|
}
|
|
76
|
+
async getCompFilesDirPathFromLastSnap(id) {
|
|
77
|
+
const compId = await this.workspace.resolveComponentId(id);
|
|
78
|
+
if (!compId.hasVersion()) return {}; // it's a new component.
|
|
79
|
+
const compDir = this.workspace.componentDir(compId, {
|
|
80
|
+
ignoreVersion: true
|
|
81
|
+
}, {
|
|
82
|
+
relative: true
|
|
83
|
+
});
|
|
84
|
+
// const dirName = filenamify(compId.toString(), { replacement: '_' });
|
|
85
|
+
const filePathsRootDir = _path().default.join(this.workspace.scope.path, FILES_HISTORY_DIR, LAST_SNAP_DIR, compDir);
|
|
86
|
+
await _fsExtra().default.remove(filePathsRootDir); // in case it has old data
|
|
87
|
+
|
|
88
|
+
const modelComponent = await this.workspace.scope.getBitObjectModelComponent(compId);
|
|
89
|
+
if (!modelComponent) {
|
|
90
|
+
throw new Error(`unable to find ${compId.toString()} in the local scope, please run "bit import"`);
|
|
91
|
+
}
|
|
92
|
+
const versionObject = await this.workspace.scope.getBitObjectVersion(modelComponent, compId.version);
|
|
93
|
+
if (!versionObject) throw new Error(`unable to find the Version object of ${compId.toString()}, please run "bit import"`);
|
|
94
|
+
const sourceFiles = await versionObject.modelFilesToSourceFiles(this.workspace.scope.legacyScope.objects);
|
|
95
|
+
const results = {};
|
|
96
|
+
await Promise.all(sourceFiles.map(async file => {
|
|
97
|
+
const filePath = _path().default.join(filePathsRootDir, file.relative);
|
|
98
|
+
await _fsExtra().default.outputFile(filePath, file.contents);
|
|
99
|
+
results[(0, _path2().pathJoinLinux)(compDir, file.relative)] = filePath;
|
|
100
|
+
}));
|
|
101
|
+
return results;
|
|
102
|
+
}
|
|
103
|
+
async getCompFilesDirPathFromLastSnapForAllComps() {
|
|
104
|
+
const ids = await this.workspace.listIds();
|
|
105
|
+
let results = {};
|
|
106
|
+
await (0, _pMap().default)(ids, async id => {
|
|
107
|
+
const idStr = id.toStringWithoutVersion();
|
|
108
|
+
const compResults = await this.getCompFilesDirPathFromLastSnap(idStr);
|
|
109
|
+
results = _objectSpread(_objectSpread({}, results), compResults);
|
|
110
|
+
}, {
|
|
111
|
+
concurrency: 30
|
|
112
|
+
});
|
|
113
|
+
return results;
|
|
114
|
+
}
|
|
115
|
+
getCurrentLaneName() {
|
|
116
|
+
return this.workspace.getCurrentLaneId().name;
|
|
117
|
+
}
|
|
118
|
+
async tagOrSnap(message = '') {
|
|
119
|
+
const params = {
|
|
120
|
+
message,
|
|
121
|
+
build: false
|
|
122
|
+
};
|
|
123
|
+
return this.workspace.isOnMain() ? this.snapping.tag(params) : this.snapping.snap(params);
|
|
124
|
+
}
|
|
42
125
|
}
|
|
43
126
|
exports.APIForVSCode = APIForVSCode;
|
|
44
127
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["APIForVSCode","constructor","workspace","listIdsWithPaths","ids","listIds","reduce","acc","id","toStringWithoutVersion","componentDir","getMainFilePath","compId","resolveComponentId","comp","get","path","join","state","_consumer","mainFile","getCompFiles","dirAbs","filesRelative","filesystem","files","map","file","relative"],"sources":["api-for-vscode.ts"],"sourcesContent":["import path from 'path';\nimport { Workspace } from '@teambit/workspace';\nimport { PathOsBasedAbsolute, PathOsBasedRelative } from '@teambit/legacy/dist/utils/path';\n\nexport class APIForVSCode {\n constructor(private workspace: Workspace) {}\n\n async listIdsWithPaths() {\n const ids = await this.workspace.listIds();\n return ids.reduce((acc, id) => {\n acc[id.toStringWithoutVersion()] = this.workspace.componentDir(id);\n return acc;\n }, {});\n }\n\n async getMainFilePath(id: string): Promise<PathOsBasedAbsolute> {\n const compId = await this.workspace.resolveComponentId(id);\n const comp = await this.workspace.get(compId);\n return path.join(this.workspace.componentDir(compId), comp.state._consumer.mainFile);\n }\n\n async getCompFiles(id: string): Promise<{ dirAbs: string; filesRelative: PathOsBasedRelative[] }> {\n const compId = await this.workspace.resolveComponentId(id);\n const comp = await this.workspace.get(compId);\n const dirAbs = this.workspace.componentDir(compId);\n const filesRelative = comp.state.filesystem.files.map((file) => file.relative);\n return { dirAbs, filesRelative };\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["FILES_HISTORY_DIR","LAST_SNAP_DIR","APIForVSCode","constructor","workspace","snapping","listIdsWithPaths","ids","listIds","reduce","acc","id","toStringWithoutVersion","componentDir","getMainFilePath","compId","resolveComponentId","comp","get","path","join","state","_consumer","mainFile","getCompFiles","dirAbs","filesRelative","filesystem","files","map","file","relative","getCompFilesDirPathFromLastSnap","hasVersion","compDir","ignoreVersion","filePathsRootDir","scope","fs","remove","modelComponent","getBitObjectModelComponent","Error","toString","versionObject","getBitObjectVersion","version","sourceFiles","modelFilesToSourceFiles","legacyScope","objects","results","Promise","all","filePath","outputFile","contents","pathJoinLinux","getCompFilesDirPathFromLastSnapForAllComps","pMap","idStr","compResults","concurrency","getCurrentLaneName","getCurrentLaneId","name","tagOrSnap","message","params","build","isOnMain","tag","snap"],"sources":["api-for-vscode.ts"],"sourcesContent":["import path from 'path';\nimport fs from 'fs-extra';\nimport { Workspace } from '@teambit/workspace';\nimport { PathOsBasedAbsolute, PathOsBasedRelative, pathJoinLinux } from '@teambit/legacy/dist/utils/path';\nimport pMap from 'p-map';\nimport { SnappingMain } from '@teambit/snapping';\n\nconst FILES_HISTORY_DIR = 'files-history';\nconst LAST_SNAP_DIR = 'last-snap';\n\nexport class APIForVSCode {\n constructor(private workspace: Workspace, private snapping: SnappingMain) {}\n\n async listIdsWithPaths() {\n const ids = await this.workspace.listIds();\n return ids.reduce((acc, id) => {\n acc[id.toStringWithoutVersion()] = this.workspace.componentDir(id);\n return acc;\n }, {});\n }\n\n async getMainFilePath(id: string): Promise<PathOsBasedAbsolute> {\n const compId = await this.workspace.resolveComponentId(id);\n const comp = await this.workspace.get(compId);\n return path.join(this.workspace.componentDir(compId), comp.state._consumer.mainFile);\n }\n\n async getCompFiles(id: string): Promise<{ dirAbs: string; filesRelative: PathOsBasedRelative[] }> {\n const compId = await this.workspace.resolveComponentId(id);\n const comp = await this.workspace.get(compId);\n const dirAbs = this.workspace.componentDir(compId);\n const filesRelative = comp.state.filesystem.files.map((file) => file.relative);\n return { dirAbs, filesRelative };\n }\n\n async getCompFilesDirPathFromLastSnap(id: string): Promise<{ [relativePath: string]: string }> {\n const compId = await this.workspace.resolveComponentId(id);\n if (!compId.hasVersion()) return {}; // it's a new component.\n const compDir = this.workspace.componentDir(compId, { ignoreVersion: true }, { relative: true });\n // const dirName = filenamify(compId.toString(), { replacement: '_' });\n const filePathsRootDir = path.join(this.workspace.scope.path, FILES_HISTORY_DIR, LAST_SNAP_DIR, compDir);\n await fs.remove(filePathsRootDir); // in case it has old data\n\n const modelComponent = await this.workspace.scope.getBitObjectModelComponent(compId);\n if (!modelComponent) {\n throw new Error(`unable to find ${compId.toString()} in the local scope, please run \"bit import\"`);\n }\n const versionObject = await this.workspace.scope.getBitObjectVersion(modelComponent, compId.version as string);\n if (!versionObject)\n throw new Error(`unable to find the Version object of ${compId.toString()}, please run \"bit import\"`);\n const sourceFiles = await versionObject.modelFilesToSourceFiles(this.workspace.scope.legacyScope.objects);\n const results: { [relativePath: string]: string } = {};\n await Promise.all(\n sourceFiles.map(async (file) => {\n const filePath = path.join(filePathsRootDir, file.relative);\n await fs.outputFile(filePath, file.contents);\n results[pathJoinLinux(compDir, file.relative)] = filePath;\n })\n );\n return results;\n }\n\n async getCompFilesDirPathFromLastSnapForAllComps(): Promise<{ [relativePath: string]: string }> {\n const ids = await this.workspace.listIds();\n let results = {};\n await pMap(\n ids,\n async (id) => {\n const idStr = id.toStringWithoutVersion();\n const compResults = await this.getCompFilesDirPathFromLastSnap(idStr);\n results = { ...results, ...compResults };\n },\n { concurrency: 30 }\n );\n return results;\n }\n\n getCurrentLaneName(): string {\n return this.workspace.getCurrentLaneId().name;\n }\n\n async tagOrSnap(message = '') {\n const params = { message, build: false };\n return this.workspace.isOnMain() ? this.snapping.tag(params) : this.snapping.snap(params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAyB;AAAA;AAGzB,MAAMA,iBAAiB,GAAG,eAAe;AACzC,MAAMC,aAAa,GAAG,WAAW;AAE1B,MAAMC,YAAY,CAAC;EACxBC,WAAW,CAASC,SAAoB,EAAUC,QAAsB,EAAE;IAAA,KAAtDD,SAAoB,GAApBA,SAAoB;IAAA,KAAUC,QAAsB,GAAtBA,QAAsB;EAAG;EAE3E,MAAMC,gBAAgB,GAAG;IACvB,MAAMC,GAAG,GAAG,MAAM,IAAI,CAACH,SAAS,CAACI,OAAO,EAAE;IAC1C,OAAOD,GAAG,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEC,EAAE,KAAK;MA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Aa,EAACvB,OAAO,EAAEJ,IAAI,CAACC,QAAQ,CAAC,CAAC,GAAGuB,QAAQ;IAC3D,CAAC,CAAC,CACH;IACD,OAAOH,OAAO;EAChB;EAEA,MAAMO,0CAA0C,GAAgD;IAC9F,MAAMnD,GAAG,GAAG,MAAM,IAAI,CAACH,SAAS,CAACI,OAAO,EAAE;IAC1C,IAAI2C,OAAO,GAAG,CAAC,CAAC;IAChB,MAAM,IAAAQ,eAAI,EACRpD,GAAG,EACH,MAAOI,EAAE,IAAK;MACZ,MAAMiD,KAAK,GAAGjD,EAAE,CAACC,sBAAsB,EAAE;MACzC,MAAMiD,WAAW,GAAG,MAAM,IAAI,CAAC7B,+BAA+B,CAAC4B,KAAK,CAAC;MACrET,OAAO,mCAAQA,OAAO,GAAKU,WAAW,CAAE;IAC1C,CAAC,EACD;MAAEC,WAAW,EAAE;IAAG,CAAC,CACpB;IACD,OAAOX,OAAO;EAChB;EAEAY,kBAAkB,GAAW;IAC3B,OAAO,IAAI,CAAC3D,SAAS,CAAC4D,gBAAgB,EAAE,CAACC,IAAI;EAC/C;EAEA,MAAMC,SAAS,CAACC,OAAO,GAAG,EAAE,EAAE;IAC5B,MAAMC,MAAM,GAAG;MAAED,OAAO;MAAEE,KAAK,EAAE;IAAM,CAAC;IACxC,OAAO,IAAI,CAACjE,SAAS,CAACkE,QAAQ,EAAE,GAAG,IAAI,CAACjE,QAAQ,CAACkE,GAAG,CAACH,MAAM,CAAC,GAAG,IAAI,CAAC/D,QAAQ,CAACmE,IAAI,CAACJ,MAAM,CAAC;EAC3F;AACF;AAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CLIMain } from '@teambit/cli';
|
|
2
2
|
import { ExpressMain } from '@teambit/express';
|
|
3
3
|
import { Logger, LoggerMain } from '@teambit/logger';
|
|
4
|
+
import { SnappingMain } from '@teambit/snapping';
|
|
4
5
|
import { WatcherMain } from '@teambit/watcher';
|
|
5
6
|
import { Workspace } from '@teambit/workspace';
|
|
6
7
|
export declare class ApiServerMain {
|
|
@@ -14,12 +15,13 @@ export declare class ApiServerMain {
|
|
|
14
15
|
}): Promise<unknown>;
|
|
15
16
|
static dependencies: import("@teambit/harmony").Aspect[];
|
|
16
17
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
17
|
-
static provider([cli, workspace, loggerMain, express, watcher]: [
|
|
18
|
+
static provider([cli, workspace, loggerMain, express, watcher, snapping]: [
|
|
18
19
|
CLIMain,
|
|
19
20
|
Workspace,
|
|
20
21
|
LoggerMain,
|
|
21
22
|
ExpressMain,
|
|
22
|
-
WatcherMain
|
|
23
|
+
WatcherMain,
|
|
24
|
+
SnappingMain
|
|
23
25
|
]): Promise<ApiServerMain>;
|
|
24
26
|
}
|
|
25
27
|
export default ApiServerMain;
|
|
@@ -35,6 +35,13 @@ function _logger() {
|
|
|
35
35
|
};
|
|
36
36
|
return data;
|
|
37
37
|
}
|
|
38
|
+
function _snapping() {
|
|
39
|
+
const data = _interopRequireDefault(require("@teambit/snapping"));
|
|
40
|
+
_snapping = function () {
|
|
41
|
+
return data;
|
|
42
|
+
};
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
38
45
|
function _watcher() {
|
|
39
46
|
const data = _interopRequireDefault(require("@teambit/watcher"));
|
|
40
47
|
_watcher = function () {
|
|
@@ -109,12 +116,12 @@ class ApiServerMain {
|
|
|
109
116
|
this.logger.consoleSuccess(`Bit Server is listening on port ${port}`);
|
|
110
117
|
});
|
|
111
118
|
}
|
|
112
|
-
static async provider([cli, workspace, loggerMain, express, watcher]) {
|
|
119
|
+
static async provider([cli, workspace, loggerMain, express, watcher, snapping]) {
|
|
113
120
|
const logger = loggerMain.createLogger(_apiServer().ApiServerAspect.id);
|
|
114
121
|
const apiServer = new ApiServerMain(workspace, logger, express, watcher);
|
|
115
122
|
cli.register(new (_server().ServerCmd)(apiServer));
|
|
116
123
|
const cliRoute = new (_cli2().CLIRoute)(logger, cli);
|
|
117
|
-
const apiForVscode = new (_apiForVscode().APIForVSCode)(workspace);
|
|
124
|
+
const apiForVscode = new (_apiForVscode().APIForVSCode)(workspace, snapping);
|
|
118
125
|
const vscodeRoute = new (_vscode().VSCodeRoute)(logger, apiForVscode);
|
|
119
126
|
// register only when the workspace is available. don't register this on a remote-scope, for security reasons.
|
|
120
127
|
if (workspace) {
|
|
@@ -124,7 +131,7 @@ class ApiServerMain {
|
|
|
124
131
|
}
|
|
125
132
|
}
|
|
126
133
|
exports.ApiServerMain = ApiServerMain;
|
|
127
|
-
(0, _defineProperty2().default)(ApiServerMain, "dependencies", [_cli().CLIAspect, _workspace().default, _logger().LoggerAspect, _express().ExpressAspect, _watcher().default]);
|
|
134
|
+
(0, _defineProperty2().default)(ApiServerMain, "dependencies", [_cli().CLIAspect, _workspace().default, _logger().LoggerAspect, _express().ExpressAspect, _watcher().default, _snapping().default]);
|
|
128
135
|
(0, _defineProperty2().default)(ApiServerMain, "runtime", _cli().MainRuntime);
|
|
129
136
|
_apiServer().ApiServerAspect.addRuntime(ApiServerMain);
|
|
130
137
|
var _default = ApiServerMain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ApiServerMain","constructor","workspace","logger","express","watcher","runApiServer","options","port","listen","Error","process","cwd","watch","preCompile","catch","err","error","Promise","consoleSuccess","provider","cli","loggerMain","createLogger","ApiServerAspect","id","apiServer","register","ServerCmd","cliRoute","CLIRoute","apiForVscode","APIForVSCode","vscodeRoute","VSCodeRoute","CLIAspect","WorkspaceAspect","LoggerAspect","ExpressAspect","WatcherAspect","MainRuntime","addRuntime"],"sources":["api-server.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport WatcherAspect, { WatcherMain } from '@teambit/watcher';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { ApiServerAspect } from './api-server.aspect';\nimport { CLIRoute } from './cli.route';\nimport { ServerCmd } from './server.cmd';\nimport { VSCodeRoute } from './vscode.route';\nimport { APIForVSCode } from './api-for-vscode';\n\nexport class ApiServerMain {\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private express: ExpressMain,\n private watcher: WatcherMain\n ) {}\n\n async runApiServer(options: { port: number }) {\n const port = options.port || 3000;\n await this.express.listen(port);\n if (!this.workspace) {\n throw new Error(`unable to run bit-server, the current directory ${process.cwd()} is not a workspace`);\n }\n this.watcher\n .watch({\n preCompile: false,\n })\n .catch((err) => {\n // don't throw an error, we don't want to break the \"run\" process\n this.logger.error('watcher found an error', err);\n });\n\n // never ending promise to not exit the process (is there a better way?)\n return new Promise(() => {\n this.logger.consoleSuccess(`Bit Server is listening on port ${port}`);\n });\n }\n\n static dependencies = [CLIAspect, WorkspaceAspect, LoggerAspect, ExpressAspect, WatcherAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace, loggerMain, express, watcher]: [\n CLIMain,\n Workspace,\n LoggerMain,\n ExpressMain,\n WatcherMain\n ]) {\n const logger = loggerMain.createLogger(ApiServerAspect.id);\n const apiServer = new ApiServerMain(workspace, logger, express, watcher);\n cli.register(new ServerCmd(apiServer));\n\n const cliRoute = new CLIRoute(logger, cli);\n const apiForVscode = new APIForVSCode(workspace);\n const vscodeRoute = new VSCodeRoute(logger, apiForVscode);\n // register only when the workspace is available. don't register this on a remote-scope, for security reasons.\n if (workspace) {\n express.register([cliRoute, vscodeRoute]);\n }\n\n return apiServer;\n }\n}\n\nApiServerAspect.addRuntime(ApiServerMain);\n\nexport default ApiServerMain;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,aAAa,CAAC;EACzBC,WAAW,CACDC,SAAoB,EACpBC,MAAc,EACdC,OAAoB,EACpBC,OAAoB,EAC5B;IAAA,KAJQH,SAAoB,GAApBA,SAAoB;IAAA,KACpBC,MAAc,GAAdA,MAAc;IAAA,KACdC,OAAoB,GAApBA,OAAoB;IAAA,KACpBC,OAAoB,GAApBA,OAAoB;EAC3B;EAEH,MAAMC,YAAY,CAACC,OAAyB,EAAE;IAC5C,MAAMC,IAAI,GAAGD,OAAO,CAACC,IAAI,IAAI,IAAI;IACjC,MAAM,IAAI,CAACJ,OAAO,CAACK,MAAM,CAACD,IAAI,CAAC;IAC/B,IAAI,CAAC,IAAI,CAACN,SAAS,EAAE;MACnB,MAAM,IAAIQ,KAAK,CAAE,mDAAkDC,OAAO,CAACC,GAAG,EAAG,qBAAoB,CAAC;IACxG;IACA,IAAI,CAACP,OAAO,CACTQ,KAAK,CAAC;MACLC,UAAU,EAAE;IACd,CAAC,CAAC,CACDC,KAAK,CAAEC,GAAG,IAAK;MACd;MACA,IAAI,CAACb,MAAM,CAACc,KAAK,CAAC,wBAAwB,EAAED,GAAG,CAAC;IAClD,CAAC,CAAC;;IAEJ;IACA,OAAO,IAAIE,OAAO,CAAC,MAAM;MACvB,IAAI,CAACf,MAAM,CAACgB,cAAc,CAAE,mCAAkCX,IAAK,EAAC,CAAC;IACvE,CAAC,CAAC;EACJ;EAIA,aAAaY,QAAQ,CAAC,CAACC,GAAG,EAAEnB,SAAS,EAAEoB,UAAU,EAAElB,OAAO,EAAEC,OAAO,
|
|
1
|
+
{"version":3,"names":["ApiServerMain","constructor","workspace","logger","express","watcher","runApiServer","options","port","listen","Error","process","cwd","watch","preCompile","catch","err","error","Promise","consoleSuccess","provider","cli","loggerMain","snapping","createLogger","ApiServerAspect","id","apiServer","register","ServerCmd","cliRoute","CLIRoute","apiForVscode","APIForVSCode","vscodeRoute","VSCodeRoute","CLIAspect","WorkspaceAspect","LoggerAspect","ExpressAspect","WatcherAspect","SnappingAspect","MainRuntime","addRuntime"],"sources":["api-server.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ExpressAspect, ExpressMain } from '@teambit/express';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport SnappingAspect, { SnappingMain } from '@teambit/snapping';\nimport WatcherAspect, { WatcherMain } from '@teambit/watcher';\nimport WorkspaceAspect, { Workspace } from '@teambit/workspace';\nimport { ApiServerAspect } from './api-server.aspect';\nimport { CLIRoute } from './cli.route';\nimport { ServerCmd } from './server.cmd';\nimport { VSCodeRoute } from './vscode.route';\nimport { APIForVSCode } from './api-for-vscode';\n\nexport class ApiServerMain {\n constructor(\n private workspace: Workspace,\n private logger: Logger,\n private express: ExpressMain,\n private watcher: WatcherMain\n ) {}\n\n async runApiServer(options: { port: number }) {\n const port = options.port || 3000;\n await this.express.listen(port);\n if (!this.workspace) {\n throw new Error(`unable to run bit-server, the current directory ${process.cwd()} is not a workspace`);\n }\n this.watcher\n .watch({\n preCompile: false,\n })\n .catch((err) => {\n // don't throw an error, we don't want to break the \"run\" process\n this.logger.error('watcher found an error', err);\n });\n\n // never ending promise to not exit the process (is there a better way?)\n return new Promise(() => {\n this.logger.consoleSuccess(`Bit Server is listening on port ${port}`);\n });\n }\n\n static dependencies = [CLIAspect, WorkspaceAspect, LoggerAspect, ExpressAspect, WatcherAspect, SnappingAspect];\n static runtime = MainRuntime;\n static async provider([cli, workspace, loggerMain, express, watcher, snapping]: [\n CLIMain,\n Workspace,\n LoggerMain,\n ExpressMain,\n WatcherMain,\n SnappingMain\n ]) {\n const logger = loggerMain.createLogger(ApiServerAspect.id);\n const apiServer = new ApiServerMain(workspace, logger, express, watcher);\n cli.register(new ServerCmd(apiServer));\n\n const cliRoute = new CLIRoute(logger, cli);\n const apiForVscode = new APIForVSCode(workspace, snapping);\n const vscodeRoute = new VSCodeRoute(logger, apiForVscode);\n // register only when the workspace is available. don't register this on a remote-scope, for security reasons.\n if (workspace) {\n express.register([cliRoute, vscodeRoute]);\n }\n\n return apiServer;\n }\n}\n\nApiServerAspect.addRuntime(ApiServerMain);\n\nexport default ApiServerMain;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,aAAa,CAAC;EACzBC,WAAW,CACDC,SAAoB,EACpBC,MAAc,EACdC,OAAoB,EACpBC,OAAoB,EAC5B;IAAA,KAJQH,SAAoB,GAApBA,SAAoB;IAAA,KACpBC,MAAc,GAAdA,MAAc;IAAA,KACdC,OAAoB,GAApBA,OAAoB;IAAA,KACpBC,OAAoB,GAApBA,OAAoB;EAC3B;EAEH,MAAMC,YAAY,CAACC,OAAyB,EAAE;IAC5C,MAAMC,IAAI,GAAGD,OAAO,CAACC,IAAI,IAAI,IAAI;IACjC,MAAM,IAAI,CAACJ,OAAO,CAACK,MAAM,CAACD,IAAI,CAAC;IAC/B,IAAI,CAAC,IAAI,CAACN,SAAS,EAA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EAAEC,sBAAY,EAAEC,wBAAa,EAAEC,kBAAa,EAAEC,mBAAc,CAAC;AAAA,gCA7BnGzC,aAAa,aA8BP0C,kBAAW;AAyB9BjB,4BAAe,CAACkB,UAAU,CAAC3C,aAAa,CAAC;AAAC,eAE3BA,aAAa;AAAA"}
|
package/dist/vscode.route.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
require("core-js/modules/es.array.iterator.js");
|
|
4
5
|
require("core-js/modules/es.promise.js");
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
@@ -36,7 +37,7 @@ class VSCodeRoute {
|
|
|
36
37
|
(0, _defineProperty2().default)(this, "method", 'post');
|
|
37
38
|
(0, _defineProperty2().default)(this, "route", '/vscode/:method');
|
|
38
39
|
(0, _defineProperty2().default)(this, "middlewares", [async (req, res) => {
|
|
39
|
-
this.logger.debug(`
|
|
40
|
+
this.logger.debug(`api-vscode: got request for ${req.params.method}`);
|
|
40
41
|
try {
|
|
41
42
|
if (!this.apiForVscode[req.params.method]) {
|
|
42
43
|
throw new Error(`API "${req.params.method}" was not found`);
|
|
@@ -47,7 +48,7 @@ class VSCodeRoute {
|
|
|
47
48
|
} = body;
|
|
48
49
|
this.logger.console(`started a new api-vscode call: ${req.params.method}, total: ${(args === null || args === void 0 ? void 0 : args.length) || 0} args`);
|
|
49
50
|
const startTask = process.hrtime();
|
|
50
|
-
const result = await this.apiForVscode[req.params.method](args);
|
|
51
|
+
const result = await this.apiForVscode[req.params.method](...args);
|
|
51
52
|
const duration = (0, _prettyTime().default)(process.hrtime(startTask));
|
|
52
53
|
this.logger.consoleSuccess(`api-vscode call: ${req.params.method} had been completed in ${duration}`);
|
|
53
54
|
res.json(result);
|
package/dist/vscode.route.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VSCodeRoute","constructor","logger","apiForVscode","req","res","debug","params","method","Error","body","args","console","length","startTask","process","hrtime","result","duration","prettyTime","consoleSuccess","json","err","error","consoleFailure","message","status","jsonp"],"sources":["vscode.route.ts"],"sourcesContent":["import prettyTime from 'pretty-time';\nimport { Route, Request, Response } from '@teambit/express';\nimport { Logger } from '@teambit/logger';\nimport { APIForVSCode } from './api-for-vscode';\n\n/**\n * example usage:\n * post to http://localhost:3000/api/vscode/list-dirs\n * with the following json as the body\n *\n{\n \"args\": [\"some-args\"]\n}\n */\nexport class VSCodeRoute implements Route {\n constructor(private logger: Logger, private apiForVscode: APIForVSCode) {}\n\n method = 'post';\n route = '/vscode/:method';\n\n middlewares = [\n async (req: Request, res: Response) => {\n this.logger.debug(`
|
|
1
|
+
{"version":3,"names":["VSCodeRoute","constructor","logger","apiForVscode","req","res","debug","params","method","Error","body","args","console","length","startTask","process","hrtime","result","duration","prettyTime","consoleSuccess","json","err","error","consoleFailure","message","status","jsonp"],"sources":["vscode.route.ts"],"sourcesContent":["import prettyTime from 'pretty-time';\nimport { Route, Request, Response } from '@teambit/express';\nimport { Logger } from '@teambit/logger';\nimport { APIForVSCode } from './api-for-vscode';\n\n/**\n * example usage:\n * post to http://localhost:3000/api/vscode/list-dirs\n * with the following json as the body\n *\n{\n \"args\": [\"some-args\"]\n}\n */\nexport class VSCodeRoute implements Route {\n constructor(private logger: Logger, private apiForVscode: APIForVSCode) {}\n\n method = 'post';\n route = '/vscode/:method';\n\n middlewares = [\n async (req: Request, res: Response) => {\n this.logger.debug(`api-vscode: got request for ${req.params.method}`);\n try {\n if (!this.apiForVscode[req.params.method]) {\n throw new Error(`API \"${req.params.method}\" was not found`);\n }\n const body = req.body;\n const { args } = body;\n this.logger.console(`started a new api-vscode call: ${req.params.method}, total: ${args?.length || 0} args`);\n const startTask = process.hrtime();\n const result = await this.apiForVscode[req.params.method](...args);\n const duration = prettyTime(process.hrtime(startTask));\n this.logger.consoleSuccess(`api-vscode call: ${req.params.method} had been completed in ${duration}`);\n res.json(result);\n } catch (err: any) {\n this.logger.error(`api-vscode call: ${req.params.method} had failed`, err);\n this.logger.consoleFailure(`api-vscode call: ${req.params.method} had failed. ${err.message}`);\n res.status(500).jsonp(err.message);\n }\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,WAAW,CAAkB;EACxCC,WAAW,CAASC,MAAc,EAAUC,YAA0B,EAAE;IAAA,KAApDD,MAAc,GAAdA,MAAc;IAAA,KAAUC,YAA0B,GAA1BA,YAA0B;IAAA,gDAE7D,MAAM;IAAA,+CACP,iBAAiB;IAAA,qDAEX,CACZ,OAAOC,GAAY,EAAEC,GAAa,KAAK;MACrC,IAAI,CAACH,MAAM,CAACI,KAAK,CAAE,+BAA8BF,GAAG,CAACG,MAAM,CAACC,MAAO,EAAC,CAAC;MACrE,IAAI;QACF,IAAI,CAAC,IAAI,CAACL,YAAY,CAACC,GAAG,CAACG,MAAM,CAACC,MAAM,CAAC,EAAE;UACzC,MAAM,IAAIC,KAAK,CAAE,QAAOL,GAAG,CAACG,MAAM,CAACC,MAAO,iBAAgB,CAAC;QAC7D;QACA,MAAME,IAAI,GAAGN,GAAG,CAACM,IAAI;QACrB,MAAM;UAAEC;QAAK,CAAC,GAAGD,IAAI;QACrB,IAAI,CAACR,MAAM,CAACU,OAAO,CAAE,kCAAiCR,GAAG,CAACG,MAAM,CAACC,MAAO,YAAW,CAAAG,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,MAAM,KAAI,CAAE,OAAM,CAAC;QAC5G,MAAMC,SAAS,GAAGC,OAAO,CAACC,MAAM,EAAE;QAClC,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACd,YAAY,CAACC,GAAG,CAACG,MAAM,CAACC,MAAM,CAAC,CAAC,GAAGG,IAAI,CAAC;QAClE,MAAMO,QAAQ,GAAG,IAAAC,qBAAU,EAACJ,OAAO,CAACC,MAAM,CAACF,SAAS,CAAC,CAAC;QACtD,IAAI,CAACZ,MAAM,CAACkB,cAAc,CAAE,oBAAmBhB,GAAG,CAACG,MAAM,CAACC,MAAO,0BAAyBU,QAAS,EAAC,CAAC;QACrGb,GAAG,CAACgB,IAAI,CAACJ,MAAM,CAAC;MAClB,CAAC,CAAC,OAAOK,GAAQ,EAAE;QACjB,IAAI,CAACpB,MAAM,CAACqB,KAAK,CAAE,oBAAmBnB,GAAG,CAACG,MAAM,CAACC,MAAO,aAAY,EAAEc,GAAG,CAAC;QAC1E,IAAI,CAACpB,MAAM,CAACsB,cAAc,CAAE,oBAAmBpB,GAAG,CAACG,MAAM,CAACC,MAAO,gBAAec,GAAG,CAACG,OAAQ,EAAC,CAAC;QAC9FpB,GAAG,CAACqB,MAAM,CAAC,GAAG,CAAC,CAACC,KAAK,CAACL,GAAG,CAACG,OAAO,CAAC;MACpC;IACF,CAAC,CACF;EA1BwE;AA2B3E;AAAC"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/api-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.100",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/api-server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "api-server",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.100"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"fs-extra": "10.0.0",
|
|
13
|
+
"p-map": "4.0.0",
|
|
12
14
|
"pretty-time": "1.1.0",
|
|
13
15
|
"core-js": "^3.0.0",
|
|
14
16
|
"@babel/runtime": "7.20.0",
|
|
15
17
|
"@teambit/harmony": "0.4.6",
|
|
16
|
-
"@teambit/
|
|
17
|
-
"@teambit/
|
|
18
|
-
"@teambit/
|
|
19
|
-
"@teambit/
|
|
20
|
-
"@teambit/
|
|
18
|
+
"@teambit/snapping": "0.0.403",
|
|
19
|
+
"@teambit/workspace": "0.0.1088",
|
|
20
|
+
"@teambit/cli": "0.0.731",
|
|
21
|
+
"@teambit/express": "0.0.829",
|
|
22
|
+
"@teambit/logger": "0.0.824",
|
|
23
|
+
"@teambit/watcher": "0.0.100"
|
|
21
24
|
},
|
|
22
25
|
"devDependencies": {
|
|
26
|
+
"@types/fs-extra": "9.0.7",
|
|
23
27
|
"@types/mocha": "9.1.0",
|
|
24
28
|
"@types/node": "12.20.4",
|
|
25
29
|
"@types/react": "^17.0.8",
|
|
@@ -28,7 +32,7 @@
|
|
|
28
32
|
"@types/testing-library__jest-dom": "5.9.5"
|
|
29
33
|
},
|
|
30
34
|
"peerDependencies": {
|
|
31
|
-
"@teambit/legacy": "1.0.
|
|
35
|
+
"@teambit/legacy": "1.0.512",
|
|
32
36
|
"react": "^16.8.0 || ^17.0.0",
|
|
33
37
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
34
38
|
},
|
|
Binary file
|
|
File without changes
|