Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ff09ed0
dependency version bump
NoahMarconi Nov 20, 2020
63e0f55
dependency version bump
NoahMarconi Nov 20, 2020
8edfec6
fix: patch in chaincode adapter for mock
diestrin Sep 20, 2019
fbc9638
feat: allow internal calls for invokables
diestrin Sep 20, 2019
0522953
fix: invokable local call
diestrin Sep 20, 2019
5064090
feat: optional params on controllers
diestrin Sep 20, 2019
c33b899
feat: export adapter-in-chaincode in fabric
diestrin Sep 20, 2019
9284a2e
fix: name collition for optional decorator
diestrin Sep 20, 2019
eee8e13
fix: in chaincode adapter return nothing
diestrin Sep 20, 2019
b7434ec
fix: throw errors for in-chaincode adapter
diestrin Sep 20, 2019
5cf57ee
fix: restore args for in-chaincode calls
diestrin Sep 21, 2019
b351154
fix: client helper to accept undefined args
diestrin Sep 21, 2019
bcdc2ef
feat: flatten object invokable results
diestrin Sep 24, 2019
c1d1770
fix: mock adapter to accept undefined
diestrin Sep 26, 2019
67ad704
test: update unit tests with invokable changes
diestrin Jan 14, 2020
cb5e19f
Convector Core Added Type Definition to Chaincode-tx. Now compiles in…
pratikpc Feb 17, 2020
d95abe4
fix: allow multiple controller client methods use
May 12, 2020
fc4571f
fix: remove only from unit test
JonathanDe Aug 13, 2020
7887c98
fix: allow query transactions to receive undefined parameters
JonathanDe Aug 13, 2020
2d632d3
feat: add log on invoke function error
JonathanDe Aug 14, 2020
2c2a460
fix: add storageOptions parameter to query method
JonathanDe Aug 13, 2020
a279652
fix compile errors
NoahMarconi Nov 20, 2020
74f7089
tests pass
NoahMarconi Nov 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions @worldsibu/convector-adapter-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
},
"dependencies": {
"@worldsibu/convector-core": "^1.3.8",
"tslib": "^1.9.0"
"tslib": "^2.0.3"
},
"devDependencies": {
"http-server": "^0.11.1",
"http-server": "^0.12.3",
"npm-scripts-watcher": "^1.0.2",
"rimraf": "^2.6.2",
"ts-node": "^6.0.3",
"tslint": "^5.9.1",
"typedoc": "^0.11.1",
"typescript": "2.8.3"
"rimraf": "^3.0.2",
"ts-node": "^9.0.0",
"tslint": "^6.1.3",
"typedoc": "^0.19.2",
"typescript": "4.1.2"
}
}
11 changes: 0 additions & 11 deletions @worldsibu/convector-adapter-fabric-in-chaincode/package-lock.json

This file was deleted.

20 changes: 10 additions & 10 deletions @worldsibu/convector-adapter-fabric-in-chaincode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@
"docs:serve": "http-server docs"
},
"peerDependencies": {
"fabric-ca-client": ">=1.1.2",
"fabric-client": ">=1.1.2"
"fabric-ca-client": ">=1.4.14",
"fabric-client": ">=1.4.14"
},
"dependencies": {
"@worldsibu/convector-core": "^1.3.8",
"@worldsibu/convector-core-chaincode": "^1.3.8",
"@worldsibu/convector-storage-stub": "^1.3.8",
"tslib": "^1.9.0"
"tslib": "^2.0.3"
},
"devDependencies": {
"@worldsibu/convector-adapter-mock": "^1.3.8",
"http-server": "^0.11.1",
"mocha": "^5.0.3",
"http-server": "^0.12.3",
"mocha": "^8.2.1",
"npm-scripts-watcher": "^1.0.2",
"rimraf": "^2.6.2",
"ts-node": "^6.0.3",
"tslint": "^5.9.1",
"typedoc": "^0.11.1",
"typescript": "2.8.3"
"rimraf": "^3.0.2",
"ts-node": "^9.0.0",
"tslint": "^6.1.3",
"typedoc": "^0.19.2",
"typescript": "4.1.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,31 @@ export class InChaincodeAdapter implements ControllerAdapter {
}

const stub = config.tx.stub.getStub();
// Patch mock stub
let beforeTx = stub.constructor.name === 'ChaincodeMockStub' ? {
signedProposal: (stub as any).signedProposal,
txID: (stub as any).txID,
transientMap: (stub as any).transientMap,
args: (stub as any).args
} : {};
const res = await stub.invokeChaincode(config.chaincode, [fn, ...args], config.channel);
const storage = BaseStorage.current as StubStorage;

// Make sure the stub is still the same
// On unit tests it might change the context for the subsecuent calls
storage.stubHelper = config.tx.stub;
Object.assign(stub, beforeTx);

if (res.status === 500) {
const rawMessage = res.message.toString();
throw rawMessage ? JSON.parse(rawMessage) : res;
}

const rawResult = res.payload.toString('utf8');

return {
...res,
result: JSON.parse(res.payload.toString('utf8'))
result: rawResult ? JSON.parse(rawResult) : undefined
};
}
}
11 changes: 0 additions & 11 deletions @worldsibu/convector-adapter-fabric/package-lock.json

This file was deleted.

18 changes: 9 additions & 9 deletions @worldsibu/convector-adapter-fabric/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
"docs:serve": "http-server docs"
},
"peerDependencies": {
"fabric-ca-client": ">=1.1.2",
"fabric-client": ">=1.1.2"
"fabric-ca-client": ">=1.4.14",
"fabric-client": ">=1.4.14"
},
"dependencies": {
"@worldsibu/convector-common-fabric-helper": "^1.3.8",
"@worldsibu/convector-core": "^1.3.8",
"tslib": "^1.9.0"
"tslib": "^2.0.3"
},
"devDependencies": {
"http-server": "^0.11.1",
"http-server": "^0.12.3",
"npm-scripts-watcher": "^1.0.2",
"rimraf": "^2.6.2",
"ts-node": "^6.0.3",
"tslint": "^5.9.1",
"typedoc": "^0.11.1",
"typescript": "2.8.3"
"rimraf": "^3.0.2",
"ts-node": "^9.0.0",
"tslint": "^6.1.3",
"typedoc": "^0.19.2",
"typescript": "4.1.2"
}
}
Loading