@avaprotocol/sdk-js 2.10.2 → 2.10.3
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/CHANGELOG.md +8 -0
- package/dist/index.js +1 -12
- package/dist/index.mjs +1 -12
- package/dist/models/trigger/manual.d.ts.map +1 -1
- package/dist/models/trigger/manual.js +3 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -19069,12 +19069,6 @@ function convertProtobufStepTypeToSdk(protobufType) {
|
|
|
19069
19069
|
return protobufType;
|
|
19070
19070
|
}
|
|
19071
19071
|
}
|
|
19072
|
-
function convertInputToProtobuf(input) {
|
|
19073
|
-
if (!input) {
|
|
19074
|
-
return void 0;
|
|
19075
|
-
}
|
|
19076
|
-
return convertJSValueToProtobuf(input);
|
|
19077
|
-
}
|
|
19078
19072
|
function extractInputFromProtobuf(inputValue) {
|
|
19079
19073
|
if (!inputValue) {
|
|
19080
19074
|
return void 0;
|
|
@@ -19395,12 +19389,7 @@ var ManualTrigger2 = class _ManualTrigger extends Trigger {
|
|
|
19395
19389
|
lang = dataObj.lang || import_types6.Lang.JSON;
|
|
19396
19390
|
}
|
|
19397
19391
|
}
|
|
19398
|
-
const dataValue =
|
|
19399
|
-
if (!dataValue) {
|
|
19400
|
-
throw new Error(
|
|
19401
|
-
"Failed to convert ManualTrigger data to protobuf format"
|
|
19402
|
-
);
|
|
19403
|
-
}
|
|
19392
|
+
const dataValue = convertJSValueToProtobuf(actualData);
|
|
19404
19393
|
config.setData(dataValue);
|
|
19405
19394
|
if (Object.keys(headers).length > 0) {
|
|
19406
19395
|
const headersMap = config.getHeadersMap();
|
package/dist/index.mjs
CHANGED
|
@@ -19048,12 +19048,6 @@ function convertProtobufStepTypeToSdk(protobufType) {
|
|
|
19048
19048
|
return protobufType;
|
|
19049
19049
|
}
|
|
19050
19050
|
}
|
|
19051
|
-
function convertInputToProtobuf(input) {
|
|
19052
|
-
if (!input) {
|
|
19053
|
-
return void 0;
|
|
19054
|
-
}
|
|
19055
|
-
return convertJSValueToProtobuf(input);
|
|
19056
|
-
}
|
|
19057
19051
|
function extractInputFromProtobuf(inputValue) {
|
|
19058
19052
|
if (!inputValue) {
|
|
19059
19053
|
return void 0;
|
|
@@ -19380,12 +19374,7 @@ var ManualTrigger2 = class _ManualTrigger extends Trigger {
|
|
|
19380
19374
|
lang = dataObj.lang || Lang.JSON;
|
|
19381
19375
|
}
|
|
19382
19376
|
}
|
|
19383
|
-
const dataValue =
|
|
19384
|
-
if (!dataValue) {
|
|
19385
|
-
throw new Error(
|
|
19386
|
-
"Failed to convert ManualTrigger data to protobuf format"
|
|
19387
|
-
);
|
|
19388
|
-
}
|
|
19377
|
+
const dataValue = convertJSValueToProtobuf(actualData);
|
|
19389
19378
|
config.setData(dataValue);
|
|
19390
19379
|
if (Object.keys(headers).length > 0) {
|
|
19391
19380
|
const headersMap = config.getHeadersMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/manual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAMlC,OAAO,EAEL,kBAAkB,EAKnB,MAAM,oBAAoB,CAAC;AAE5B,cAAM,aAAc,SAAQ,OAAO;gBACrB,KAAK,EAAE,kBAAkB;IAQrC,SAAS,IAAI,MAAM,CAAC,WAAW;
|
|
1
|
+
{"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../../src/models/trigger/manual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,OAAO,MAAM,aAAa,CAAC;AAMlC,OAAO,EAEL,kBAAkB,EAKnB,MAAM,oBAAoB,CAAC;AAE5B,cAAM,aAAc,SAAQ,OAAO;gBACrB,KAAK,EAAE,kBAAkB;IAQrC,SAAS,IAAI,MAAM,CAAC,WAAW;IAiE/B,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,GAAG,aAAa;IA6C3D;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,cAAc,GAAG,OAAO;CAuBlE;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as avs_pb from "@/grpc_codegen/avs_pb";
|
|
2
2
|
import Trigger from "./interface";
|
|
3
|
-
import {
|
|
3
|
+
import { convertJSValueToProtobuf, extractInputFromProtobuf, convertProtobufValueToJs, } from "../../utils";
|
|
4
4
|
import { TriggerType, Lang, LangConverter, } from "@avaprotocol/types";
|
|
5
5
|
class ManualTrigger extends Trigger {
|
|
6
6
|
constructor(props) {
|
|
@@ -38,10 +38,8 @@ class ManualTrigger extends Trigger {
|
|
|
38
38
|
}
|
|
39
39
|
// Otherwise, use this.data directly as the data content
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
throw new Error("Failed to convert ManualTrigger data to protobuf format");
|
|
44
|
-
}
|
|
41
|
+
// Convert the actual data to protobuf Value (supports primitives, arrays, objects, null, undefined)
|
|
42
|
+
const dataValue = convertJSValueToProtobuf(actualData);
|
|
45
43
|
config.setData(dataValue);
|
|
46
44
|
// Set headers and pathParams in the config for execution step debugging
|
|
47
45
|
if (Object.keys(headers).length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avaprotocol/sdk-js",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.3",
|
|
4
4
|
"description": "A JavaScript/TypeScript SDK designed to simplify integration with Ava Protocol's AVS",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepare": "node ../../scripts/prepare-package.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@avaprotocol/types": "2.8.
|
|
34
|
+
"@avaprotocol/types": "2.8.3",
|
|
35
35
|
"@grpc/grpc-js": "^1.11.3",
|
|
36
36
|
"@grpc/proto-loader": "^0.7.13",
|
|
37
37
|
"dotenv": "^16.4.5",
|