@rsdoctor/sdk 0.4.11 → 0.4.12
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/cjs/sdk/multiple/controller.js +2 -2
- package/dist/cjs/sdk/multiple/index.js +2 -2
- package/dist/cjs/sdk/multiple/{slave.js → primary.js} +9 -5
- package/dist/esm/sdk/multiple/controller.js +1 -1
- package/dist/esm/sdk/multiple/index.js +1 -1
- package/dist/esm/sdk/multiple/{slave.js → primary.js} +6 -2
- package/dist/type/sdk/multiple/controller.d.ts +1 -1
- package/dist/type/sdk/multiple/controller.d.ts.map +1 -1
- package/dist/type/sdk/multiple/index.d.ts +1 -1
- package/dist/type/sdk/multiple/index.d.ts.map +1 -1
- package/dist/type/sdk/multiple/{slave.d.ts → primary.d.ts} +2 -1
- package/dist/type/sdk/multiple/primary.d.ts.map +1 -0
- package/dist/type/sdk/multiple/server.d.ts +1 -1
- package/dist/type/sdk/multiple/server.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/type/sdk/multiple/slave.d.ts.map +0 -1
|
@@ -21,7 +21,7 @@ __export(controller_exports, {
|
|
|
21
21
|
RsdoctorSDKController: () => RsdoctorSDKController
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(controller_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_primary = require("./primary");
|
|
25
25
|
class RsdoctorSDKController {
|
|
26
26
|
constructor(root = process.cwd()) {
|
|
27
27
|
this.slaves = [];
|
|
@@ -56,7 +56,7 @@ class RsdoctorSDKController {
|
|
|
56
56
|
extraConfig,
|
|
57
57
|
type
|
|
58
58
|
}) {
|
|
59
|
-
const slave = new
|
|
59
|
+
const slave = new import_primary.RsdoctorPrimarySDK({
|
|
60
60
|
name,
|
|
61
61
|
stage,
|
|
62
62
|
controller: this,
|
|
@@ -16,9 +16,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
16
16
|
var multiple_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(multiple_exports);
|
|
18
18
|
__reExport(multiple_exports, require("./controller"), module.exports);
|
|
19
|
-
__reExport(multiple_exports, require("./
|
|
19
|
+
__reExport(multiple_exports, require("./primary"), module.exports);
|
|
20
20
|
// Annotate the CommonJS export names for ESM import in node:
|
|
21
21
|
0 && (module.exports = {
|
|
22
22
|
...require("./controller"),
|
|
23
|
-
...require("./
|
|
23
|
+
...require("./primary")
|
|
24
24
|
});
|
|
@@ -26,11 +26,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var primary_exports = {};
|
|
30
|
+
__export(primary_exports, {
|
|
31
31
|
RsdoctorPrimarySDK: () => RsdoctorPrimarySDK
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(primary_exports);
|
|
34
34
|
var import_path = __toESM(require("path"));
|
|
35
35
|
var import_sdk = require("../sdk");
|
|
36
36
|
var import_server = require("./server");
|
|
@@ -76,8 +76,12 @@ class RsdoctorPrimarySDK extends import_sdk.RsdoctorSDK {
|
|
|
76
76
|
finishUploadPieceSwitch?.();
|
|
77
77
|
}
|
|
78
78
|
async writeManifest() {
|
|
79
|
-
const { parent, cloudData } = this;
|
|
80
|
-
|
|
79
|
+
const { parent, cloudData, dependencies } = this;
|
|
80
|
+
if (!dependencies?.length) {
|
|
81
|
+
await Promise.all(
|
|
82
|
+
this.parent.slaves.filter((item) => !item.dependencies?.length).map((item) => item.uploadPieces)
|
|
83
|
+
);
|
|
84
|
+
}
|
|
81
85
|
if (cloudData) {
|
|
82
86
|
cloudData.name = this.name;
|
|
83
87
|
cloudData.series = parent.getSeriesData();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./controller";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./primary";
|
|
@@ -43,8 +43,12 @@ class RsdoctorPrimarySDK extends RsdoctorSDK {
|
|
|
43
43
|
finishUploadPieceSwitch?.();
|
|
44
44
|
}
|
|
45
45
|
async writeManifest() {
|
|
46
|
-
const { parent, cloudData } = this;
|
|
47
|
-
|
|
46
|
+
const { parent, cloudData, dependencies } = this;
|
|
47
|
+
if (!dependencies?.length) {
|
|
48
|
+
await Promise.all(
|
|
49
|
+
this.parent.slaves.filter((item) => !item.dependencies?.length).map((item) => item.uploadPieces)
|
|
50
|
+
);
|
|
51
|
+
}
|
|
48
52
|
if (cloudData) {
|
|
49
53
|
cloudData.name = this.name;
|
|
50
54
|
cloudData.series = parent.getSeriesData();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,qBAAa,qBAAqB;IAChC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAM;IAEpC,IAAI,SAAM;gBAEL,IAAI,SAAgB;IAIhC,IAAI,MAAM,uBAET;IAED,UAAU;IAIV,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,aAAa,CAAC,SAAS,UAAQ;IAgB/B,WAAW,CAAC,EACV,IAAI,EACJ,KAAK,EACL,WAAW,EACX,IAAI,GACL,EAAE,IAAI,CAAC,qBAAqB,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;CAa3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -17,6 +17,7 @@ export declare class RsdoctorPrimarySDK extends RsdoctorSDK {
|
|
|
17
17
|
id: number;
|
|
18
18
|
parent: RsdoctorSDKController;
|
|
19
19
|
readonly stage: number;
|
|
20
|
+
dependencies: Array<string> | undefined;
|
|
20
21
|
private uploadPieces;
|
|
21
22
|
private finishUploadPieceSwitch;
|
|
22
23
|
constructor({ name, stage, controller, extraConfig, type, }: RsdoctorSlaveSDKOptions);
|
|
@@ -29,4 +30,4 @@ export declare class RsdoctorPrimarySDK extends RsdoctorSDK {
|
|
|
29
30
|
getManifestData(): import("@rsdoctor/types/dist/manifest").RsdoctorManifestWithShardingFiles;
|
|
30
31
|
}
|
|
31
32
|
export {};
|
|
32
|
-
//# sourceMappingURL=
|
|
33
|
+
//# sourceMappingURL=primary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primary.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/primary.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAI1D,UAAU,uBAAuB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC;IACjC,UAAU,EAAE,qBAAqB,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC;CACtB;AAED,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,EAAE,EAAE,MAAM,CAAC;IAEX,MAAM,EAAE,qBAAqB,CAAC;IAE9B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAEvB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAE/C,OAAO,CAAC,YAAY,CAAiB;IAErC,OAAO,CAAC,uBAAuB,CAAc;gBAEjC,EACV,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAW,EACX,IAAI,GACL,EAAE,uBAAuB;IAgB1B,OAAO,CAAC,WAAW;IAMnB,IAAI,QAAQ,YAEX;cAEe,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;cAe5B,aAAa;IAqB7B,aAAa,CAAC,SAAS,UAAQ;IAI/B,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,eAAe;CAMhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RsdoctorServer } from '../server';
|
|
2
|
-
import type { RsdoctorPrimarySDK } from './
|
|
2
|
+
import type { RsdoctorPrimarySDK } from './primary';
|
|
3
3
|
export declare class RsdoctorSlaveServer extends RsdoctorServer {
|
|
4
4
|
protected sdk: RsdoctorPrimarySDK;
|
|
5
5
|
constructor(sdk: RsdoctorPrimarySDK, port?: number);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,SAAS,CAAC,GAAG,EAAE,kBAAkB,CAAC;gBAEtB,GAAG,EAAE,kBAAkB,EAAE,IAAI,SAAqB;IAKxD,cAAc,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;CAOxC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
25
|
"open": "^8.4.2",
|
|
26
26
|
"serve-static": "1.16.2",
|
|
27
|
-
"socket.io": "4.
|
|
27
|
+
"socket.io": "4.8.1",
|
|
28
28
|
"source-map": "^0.7.4",
|
|
29
29
|
"tapable": "2.2.1",
|
|
30
|
-
"@rsdoctor/client": "0.4.
|
|
31
|
-
"@rsdoctor/graph": "0.4.
|
|
32
|
-
"@rsdoctor/types": "0.4.
|
|
33
|
-
"@rsdoctor/utils": "0.4.
|
|
30
|
+
"@rsdoctor/client": "0.4.12",
|
|
31
|
+
"@rsdoctor/graph": "0.4.12",
|
|
32
|
+
"@rsdoctor/types": "0.4.12",
|
|
33
|
+
"@rsdoctor/utils": "0.4.12"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/body-parser": "1.19.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slave.d.ts","sourceRoot":"","sources":["../../../../src/sdk/multiple/slave.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAI1D,UAAU,uBAAuB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC;IACjC,UAAU,EAAE,qBAAqB,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC;CACtB;AAED,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,EAAE,EAAE,MAAM,CAAC;IAEX,MAAM,EAAE,qBAAqB,CAAC;IAE9B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAE9B,OAAO,CAAC,YAAY,CAAiB;IAErC,OAAO,CAAC,uBAAuB,CAAc;gBAEjC,EACV,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAW,EACX,IAAI,GACL,EAAE,uBAAuB;IAgB1B,OAAO,CAAC,WAAW;IAMnB,IAAI,QAAQ,YAEX;cAEe,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;cAe5B,aAAa;IAe7B,aAAa,CAAC,SAAS,UAAQ;IAI/B,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,eAAe;CAMhB"}
|