@arcblock/forge-proto
Advanced tools
Comparing version 0.5.1 to 0.5.3
12
index.js
@@ -6,2 +6,4 @@ const fs = require('fs'); | ||
const txTypePattern = /Tx$/; | ||
// extract spec | ||
@@ -66,3 +68,5 @@ const compactSpec = object => { | ||
return { types, vendorTypes, services, clients }; | ||
const transactions = Object.keys(types).filter(x => txTypePattern.test(x)); | ||
return { types, vendorTypes, services, clients, transactions }; | ||
} | ||
@@ -139,3 +143,3 @@ | ||
const extraTypeUrls = {}; | ||
const { types, vendorTypes, clients } = processJs(path.resolve(__dirname, './lib/')); | ||
const { types, vendorTypes, clients, transactions } = processJs(path.resolve(__dirname, './lib/')); | ||
const { messages, enums, rpcs, spec, typeUrls } = processJson( | ||
@@ -155,2 +159,5 @@ path.resolve(__dirname, './lib/spec.json'), | ||
debug('addSource.types', jsResult.types); | ||
Object.keys(jsResult.types) | ||
.filter(x => txTypePattern.test(x)) | ||
.forEach(x => transactions.push(x)); | ||
@@ -195,2 +202,3 @@ if (fs.existsSync(path.join(baseDir, 'spec.json'))) { | ||
messages, | ||
transactions, | ||
rpcs: Object.keys(clients).reduce((acc, x) => { | ||
@@ -197,0 +205,0 @@ acc[x] = clients[x]; |
@@ -14,3 +14,3 @@ // GENERATED CODE -- DO NOT EDIT! | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -26,3 +26,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -34,6 +34,5 @@ | ||
// ABI for forge application | ||
// | ||
var ForgeAppRpcService = exports.ForgeAppRpcService = { | ||
var ForgeAppRpcService = (exports.ForgeAppRpcService = { | ||
process_one: { | ||
@@ -61,4 +60,4 @@ path: '/forge_abi.ForgeAppRpc/process_one', | ||
}, | ||
}; | ||
}); | ||
exports.ForgeAppRpcClient = grpc.makeGenericClientConstructor(ForgeAppRpcService); |
@@ -14,3 +14,3 @@ // GENERATED CODE -- DO NOT EDIT! | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -26,3 +26,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -34,4 +34,3 @@ | ||
var EventRpcService = exports.EventRpcService = { | ||
var EventRpcService = (exports.EventRpcService = { | ||
subscribe: { | ||
@@ -48,4 +47,4 @@ path: '/forge_abi.EventRpc/subscribe', | ||
}, | ||
}; | ||
}); | ||
exports.EventRpcClient = grpc.makeGenericClientConstructor(EventRpcService); |
@@ -15,3 +15,3 @@ // GENERATED CODE -- DO NOT EDIT! | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -27,3 +27,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -39,3 +39,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -51,3 +51,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -63,3 +63,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -75,3 +75,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -87,3 +87,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -99,3 +99,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -111,3 +111,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -123,3 +123,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -135,3 +135,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -147,3 +147,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -159,3 +159,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -171,3 +171,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -183,3 +183,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -195,3 +195,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -207,3 +207,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -219,3 +219,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -231,3 +231,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -243,3 +243,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -255,3 +255,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -267,3 +267,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -279,3 +279,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -291,3 +291,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -303,3 +303,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -315,3 +315,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -327,3 +327,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -339,3 +339,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -351,3 +351,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -363,3 +363,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -375,3 +375,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -387,3 +387,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -399,3 +399,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -411,3 +411,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -419,6 +419,5 @@ | ||
// forge RPC definition | ||
// | ||
var ChainRpcService = exports.ChainRpcService = { | ||
var ChainRpcService = (exports.ChainRpcService = { | ||
// tx related | ||
@@ -492,6 +491,6 @@ create_tx: { | ||
}, | ||
}; | ||
}); | ||
exports.ChainRpcClient = grpc.makeGenericClientConstructor(ChainRpcService); | ||
var WalletRpcService = exports.WalletRpcService = { | ||
var WalletRpcService = (exports.WalletRpcService = { | ||
// wallet related | ||
@@ -553,6 +552,6 @@ create_wallet: { | ||
}, | ||
}; | ||
}); | ||
exports.WalletRpcClient = grpc.makeGenericClientConstructor(WalletRpcService); | ||
var StateRpcService = exports.StateRpcService = { | ||
var StateRpcService = (exports.StateRpcService = { | ||
// state related | ||
@@ -603,6 +602,6 @@ get_account_state: { | ||
}, | ||
}; | ||
}); | ||
exports.StateRpcClient = grpc.makeGenericClientConstructor(StateRpcService); | ||
var FileRpcService = exports.FileRpcService = { | ||
var FileRpcService = (exports.FileRpcService = { | ||
// filesystem related | ||
@@ -631,4 +630,4 @@ store_file: { | ||
}, | ||
}; | ||
}); | ||
exports.FileRpcClient = grpc.makeGenericClientConstructor(FileRpcService); |
@@ -12,3 +12,3 @@ // GENERATED CODE -- DO NOT EDIT! | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -24,3 +24,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -36,3 +36,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -48,3 +48,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -60,3 +60,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -72,3 +72,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -84,3 +84,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -96,3 +96,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -108,3 +108,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -120,3 +120,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -132,3 +132,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -144,3 +144,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -156,3 +156,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -168,3 +168,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -180,3 +180,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -192,3 +192,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -204,3 +204,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -216,3 +216,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -228,3 +228,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -240,3 +240,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -252,3 +252,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -264,3 +264,3 @@ | ||
} | ||
return new Buffer(arg.serializeBinary()); | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
@@ -267,0 +267,0 @@ |
{ | ||
"name": "@arcblock/forge-proto", | ||
"description": "Static modules generated from forge-sdk protobuf files", | ||
"version": "0.5.1", | ||
"version": "0.5.3", | ||
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)", | ||
@@ -50,3 +50,3 @@ "bugs": { | ||
}, | ||
"gitHead": "fa7b8a29b19cae9c5342f257ef7802c18dc1ddb4" | ||
"gitHead": "aaea0fde695553645465a083d0cd7f412908fdd9" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
945196
27120