@maci-protocol/coordinator 0.0.0-ci.80cbc33 → 0.0.0-ci.82590d6
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/README.md +60 -24
- package/build/ts/common/http.d.ts +6 -0
- package/build/ts/common/http.d.ts.map +1 -0
- package/build/ts/common/http.js +49 -0
- package/build/ts/common/http.js.map +1 -0
- package/build/ts/common/index.d.ts +1 -0
- package/build/ts/common/index.d.ts.map +1 -1
- package/build/ts/common/index.js +1 -0
- package/build/ts/common/index.js.map +1 -1
- package/build/ts/deployer/deployer.controller.d.ts.map +1 -1
- package/build/ts/deployer/deployer.controller.js +19 -6
- package/build/ts/deployer/deployer.controller.js.map +1 -1
- package/build/ts/proof/__tests__/proof.controller.test.js +2 -2
- package/build/ts/proof/__tests__/proof.controller.test.js.map +1 -1
- package/build/ts/proof/proof.controller.d.ts.map +1 -1
- package/build/ts/proof/proof.controller.js +37 -11
- package/build/ts/proof/proof.controller.js.map +1 -1
- package/build/ts/scheduler/__tests__/scheduler.controller.test.js +3 -3
- package/build/ts/scheduler/__tests__/scheduler.controller.test.js.map +1 -1
- package/build/ts/scheduler/scheduler.controller.d.ts.map +1 -1
- package/build/ts/scheduler/scheduler.controller.js +13 -6
- package/build/ts/scheduler/scheduler.controller.js.map +1 -1
- package/build/ts/subgraph/__tests__/subgraph.controller.test.js +1 -1
- package/build/ts/subgraph/__tests__/subgraph.controller.test.js.map +1 -1
- package/build/ts/subgraph/subgraph.controller.d.ts.map +1 -1
- package/build/ts/subgraph/subgraph.controller.js +8 -3
- package/build/ts/subgraph/subgraph.controller.js.map +1 -1
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph.controller.d.ts","sourceRoot":"","sources":["../../../ts/subgraph/subgraph.controller.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"subgraph.controller.d.ts","sourceRoot":"","sources":["../../../ts/subgraph/subgraph.controller.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAKrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAIa,kBAAkB;IAWjB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAV5C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE9D;;;;OAIG;gBAC0B,eAAe,EAAE,eAAe;IAE7D;;;;;OAKG;IAUG,MAAM,CAAS,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM9E"}
|
|
@@ -15,6 +15,7 @@ var SubgraphController_1;
|
|
|
15
15
|
import { Body, Controller, HttpException, HttpStatus, Logger, Post, UseGuards } from "@nestjs/common";
|
|
16
16
|
import { ApiBearerAuth, ApiBody, ApiResponse, ApiTags } from "@nestjs/swagger";
|
|
17
17
|
import { AccountSignatureGuard } from "../auth/AccountSignatureGuard.service";
|
|
18
|
+
import { mapErrorToHttpStatus } from "../common/http";
|
|
18
19
|
import { DeploySubgraphDto } from "./dto";
|
|
19
20
|
import { SubgraphService } from "./subgraph.service";
|
|
20
21
|
let SubgraphController = SubgraphController_1 = class SubgraphController {
|
|
@@ -40,15 +41,19 @@ let SubgraphController = SubgraphController_1 = class SubgraphController {
|
|
|
40
41
|
async deploy(args) {
|
|
41
42
|
return this.subgraphService.deploy(args).catch((error) => {
|
|
42
43
|
this.logger.error(`Error:`, error);
|
|
43
|
-
throw new HttpException(error.message,
|
|
44
|
+
throw new HttpException(error.message, mapErrorToHttpStatus(error));
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
__decorate([
|
|
48
49
|
ApiBody({ type: DeploySubgraphDto }),
|
|
49
50
|
ApiResponse({ status: HttpStatus.CREATED, description: "The subgraph was successfully deployed" }),
|
|
50
|
-
ApiResponse({ status: HttpStatus.FORBIDDEN, description: "
|
|
51
|
-
ApiResponse({ status: HttpStatus.BAD_REQUEST, description: "
|
|
51
|
+
ApiResponse({ status: HttpStatus.FORBIDDEN, description: "Invalid approval signature" }),
|
|
52
|
+
ApiResponse({ status: HttpStatus.BAD_REQUEST, description: "Invalid input" }),
|
|
53
|
+
ApiResponse({
|
|
54
|
+
status: HttpStatus.INTERNAL_SERVER_ERROR,
|
|
55
|
+
description: "Subgraph deployment failed or deploy key missing",
|
|
56
|
+
}),
|
|
52
57
|
Post("deploy"),
|
|
53
58
|
__param(0, Body()),
|
|
54
59
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subgraph.controller.js","sourceRoot":"","sources":["../../../ts/subgraph/subgraph.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"subgraph.controller.js","sourceRoot":"","sources":["../../../ts/subgraph/subgraph.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/E,OAAO,EAA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