* Fix assignment in `withInjectedVariables` 

* Pin all dependencies to exact version

* Remove unused deps
This commit is contained in:
Pavel 2021-04-08 13:55:33 +03:00 committed by GitHub
parent 5355eeb152
commit 15e645c2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 473 additions and 2409 deletions

2787
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +1,41 @@
{
"name": "@fluencelabs/fluence",
"version": "0.9.14",
"description": "JS SDK for the Fluence network",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"test": "jest --watch",
"test:all": "jest",
"test:unit": "jest --testPathPattern=src/__test__/unit",
"test:integration": "jest --testPathPattern=src/__test__/integration",
"build": "tsc",
"build:webpack": "webpack --mode production"
},
"repository": "https://github.com/fluencelabs/fluence-js",
"author": "Fluence Labs",
"license": "Apache-2.0",
"dependencies": {
"@fluencelabs/aquamarine-interpreter": "0.7.9",
"async": "3.2.0",
"base64-js": "1.3.1",
"bs58": "4.0.1",
"cids": "0.8.1",
"it-length-prefixed": "3.0.1",
"it-pipe": "1.1.0",
"libp2p": "0.30.10",
"libp2p-crypto": "^0.19.0",
"libp2p-mplex": "0.10.2",
"libp2p-noise": "2.0.5",
"libp2p-websockets": "0.15.3",
"loglevel": "1.7.0",
"multiaddr": "^8.1.2",
"peer-id": "0.14.3",
"uuid": "8.3.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@types/base64-js": "1.2.5",
"@types/bs58": "4.0.1",
"@types/jest": "^26.0.20",
"@types/uuid": "8.3.0",
"assert": "2.0.0",
"babel-jest": "^26.6.3",
"babel-plugin-replace-ts-export-assignment": "0.0.2",
"esm": "^3.2.25",
"jest": "^26.6.3",
"text-encoding": "^0.7.0",
"ts-jest": "^26.5.0",
"ts-loader": "7.0.5",
"typescript": "^3.9.5"
}
"name": "@fluencelabs/fluence",
"version": "0.9.14",
"description": "JS SDK for the Fluence network",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"test": "jest --watch",
"test:all": "jest",
"test:unit": "jest --testPathPattern=src/__test__/unit",
"test:integration": "jest --testPathPattern=src/__test__/integration",
"build": "tsc"
},
"repository": "https://github.com/fluencelabs/fluence-js",
"author": "Fluence Labs",
"license": "Apache-2.0",
"dependencies": {
"@fluencelabs/aquamarine-interpreter": "0.7.9",
"async": "3.2.0",
"base64-js": "1.3.1",
"bs58": "4.0.1",
"cids": "0.8.1",
"it-length-prefixed": "3.0.1",
"it-pipe": "1.1.0",
"libp2p": "0.30.10",
"libp2p-crypto": "0.19.0",
"libp2p-mplex": "0.10.2",
"libp2p-noise": "2.0.5",
"libp2p-websockets": "0.15.3",
"loglevel": "1.7.0",
"multiaddr": "8.1.2",
"peer-id": "0.14.3",
"uuid": "8.3.0"
},
"devDependencies": {
"@types/jest": "^26.0.22",
"jest": "^26.6.3",
"ts-jest": "^26.5.4",
"typescript": "^3.9.5"
}
}

View File

@ -29,7 +29,7 @@ class ScriptBuilder {
private script: string;
private isXorInjected: boolean;
private shouldInjectRelay: boolean;
private variables?: string[];
private variables: string[] = [];
constructor() {
this.isXorInjected = false;
@ -42,7 +42,7 @@ class ScriptBuilder {
}
withInjectedVariables(fields: string[]): ScriptBuilder {
this.variables = fields;
this.variables = [...this.variables, ...fields];
return this;
}