diff --git a/README.md b/README.md index 5a600f2..3fdb8d0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A bytecode library for Java written in Node.js [](https://badge.fury.io/js/jvm) -[](https://runetek.io/jvm.js/) +[](https://doc.esdoc.org/github.com/kylestev/jvm.js/) [](https://david-dm.org/kylestev/jvm.js) This module is under active development and has not yet reached a stable release. diff --git a/package.json b/package.json index 57e513f..eee7f02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jvm", - "version": "0.5.0", + "version": "0.5.3", "license": "MIT", "repository": { "type": "git", @@ -21,8 +21,7 @@ "adm-zip": "^0.4.9", "binary-parser": "^1.1.5", "cjson": "^0.5.0", - "lodash": "^4.17.5", - "promisify-node": "^0.4.0" + "lodash": "^4.17.5" }, "devDependencies": { "babel-cli": "^6.0.0", diff --git a/src/core/Jar.js b/src/core/Jar.js index 7df68c2..523e9bb 100644 --- a/src/core/Jar.js +++ b/src/core/Jar.js @@ -2,8 +2,6 @@ import * as _ from 'lodash'; import { ClassLoader } from './ClassLoader'; import { ClassCollection } from './ClassCollection'; -const promisify = require('promisify-node'); -const fs = promisify('fs'); const AdmZip = require('adm-zip'); /** diff --git a/src/core/jvm/instructions/AbstractBranchInstruction.js b/src/core/jvm/instructions/AbstractBranchInstruction.js index 84b8f82..499d4f3 100644 --- a/src/core/jvm/instructions/AbstractBranchInstruction.js +++ b/src/core/jvm/instructions/AbstractBranchInstruction.js @@ -23,3 +23,5 @@ export default class AbstractBranchInstruction extends AbstractInstruction { return super.toString({ branchOffset: this.branchOffset, totalOffset: this.totalOffset }); } } + +module.exports = AbstractBranchInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/AbstractInstruction.js b/src/core/jvm/instructions/AbstractInstruction.js index 027505f..df81461 100644 --- a/src/core/jvm/instructions/AbstractInstruction.js +++ b/src/core/jvm/instructions/AbstractInstruction.js @@ -50,3 +50,5 @@ export default class AbstractInstruction { return this.opname + ' [' + params + ']'; } } + +module.exports = AbstractInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/ArithmeticInstruction.js b/src/core/jvm/instructions/ArithmeticInstruction.js index 12f1385..4be5cec 100644 --- a/src/core/jvm/instructions/ArithmeticInstruction.js +++ b/src/core/jvm/instructions/ArithmeticInstruction.js @@ -7,3 +7,5 @@ export default class ArithmeticInstruction extends InstructionWrapper { super(instruction); } } + +module.exports = ArithmeticInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/BranchInstruction.js b/src/core/jvm/instructions/BranchInstruction.js index 7d764cb..18c3c1e 100644 --- a/src/core/jvm/instructions/BranchInstruction.js +++ b/src/core/jvm/instructions/BranchInstruction.js @@ -27,3 +27,5 @@ export default class BranchInstruction extends AbstractBranchInstruction { }); } } + +module.exports = BranchInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/CastInstruction.js b/src/core/jvm/instructions/CastInstruction.js index 8d87014..6409824 100644 --- a/src/core/jvm/instructions/CastInstruction.js +++ b/src/core/jvm/instructions/CastInstruction.js @@ -7,3 +7,5 @@ export default class CastInstruction extends InstructionWrapper { super(instruction); } } + +module.exports = CastInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/ConstantInstruction.js b/src/core/jvm/instructions/ConstantInstruction.js index c80053c..3246b33 100644 --- a/src/core/jvm/instructions/ConstantInstruction.js +++ b/src/core/jvm/instructions/ConstantInstruction.js @@ -38,3 +38,5 @@ export default class ConstantInstruction extends InstructionWrapper { return super.toString({ val: this.val }); } } + +module.exports = InstructionWrapper; \ No newline at end of file diff --git a/src/core/jvm/instructions/FieldInstruction.js b/src/core/jvm/instructions/FieldInstruction.js index 53ad38e..603278f 100644 --- a/src/core/jvm/instructions/FieldInstruction.js +++ b/src/core/jvm/instructions/FieldInstruction.js @@ -7,3 +7,5 @@ export default class FieldInstruction extends MemberInstruction { super(methodInfo, idx, opcode); } } + +module.exports = FieldInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/ImmediateByteInstruction.js b/src/core/jvm/instructions/ImmediateByteInstruction.js index e806984..4a895a4 100644 --- a/src/core/jvm/instructions/ImmediateByteInstruction.js +++ b/src/core/jvm/instructions/ImmediateByteInstruction.js @@ -34,3 +34,5 @@ export default class ImmediateByteInstruction extends AbstractInstruction { }); } } + +module.exports = ImmediateByteInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/ImmediateShortInstruction.js b/src/core/jvm/instructions/ImmediateShortInstruction.js index 0bf5c40..fc83eda 100644 --- a/src/core/jvm/instructions/ImmediateShortInstruction.js +++ b/src/core/jvm/instructions/ImmediateShortInstruction.js @@ -29,3 +29,5 @@ export default class ImmediateShortInstruction extends AbstractInstruction { }); } } + +module.exports = ImmediateShortInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/IncrementInstruction.js b/src/core/jvm/instructions/IncrementInstruction.js index da3d8fd..a3ca8c1 100644 --- a/src/core/jvm/instructions/IncrementInstruction.js +++ b/src/core/jvm/instructions/IncrementInstruction.js @@ -37,3 +37,5 @@ export default class IncrementInstruction extends ImmediateByteInstruction { return super.toString({ increment: this.increment }); } } + +module.exports = IncrementInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/InvokeDynamicInstruction.js b/src/core/jvm/instructions/InvokeDynamicInstruction.js index ecc1803..90d16ed 100644 --- a/src/core/jvm/instructions/InvokeDynamicInstruction.js +++ b/src/core/jvm/instructions/InvokeDynamicInstruction.js @@ -28,3 +28,5 @@ export default class InvokeDynamicInstruction extends ImmediateShortInstruction }); } } + +module.exports = InvokeDynamicInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/InvokeInterfaceInstruction.js b/src/core/jvm/instructions/InvokeInterfaceInstruction.js index ba35b14..8f040ef 100644 --- a/src/core/jvm/instructions/InvokeInterfaceInstruction.js +++ b/src/core/jvm/instructions/InvokeInterfaceInstruction.js @@ -36,3 +36,5 @@ export default class InvokeInterfaceInstruction extends ImmediateShortInstructio return super.toString({ count: this.count }); } } + +module.exports = InvokeInterfaceInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/LookupSwitchInstruction.js b/src/core/jvm/instructions/LookupSwitchInstruction.js index d7ba9bd..db57a0e 100644 --- a/src/core/jvm/instructions/LookupSwitchInstruction.js +++ b/src/core/jvm/instructions/LookupSwitchInstruction.js @@ -54,3 +54,5 @@ export default class LookupSwitchInstruction extends PaddedInstruction { return super.toString({ defaultOffset: this.defaultOffset, offsetPairs: this.offsetPairs }); } } + +module.exports = LookupSwitchInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/MemberInstruction.js b/src/core/jvm/instructions/MemberInstruction.js index 7b34f8d..3a9cc25 100644 --- a/src/core/jvm/instructions/MemberInstruction.js +++ b/src/core/jvm/instructions/MemberInstruction.js @@ -32,3 +32,5 @@ export default class MemberInstruction extends ImmediateShortInstruction { return super.toString({ name: this.name, desc: this.desc, owner: this.owner }); } } + +module.exports = MemberInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/MethodInstruction.js b/src/core/jvm/instructions/MethodInstruction.js index c14a04f..ab8638e 100644 --- a/src/core/jvm/instructions/MethodInstruction.js +++ b/src/core/jvm/instructions/MethodInstruction.js @@ -17,3 +17,5 @@ export default class MethodInstruction extends MemberInstruction { return parameterParser(this.desc); } } + +module.exports = MemberInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/MultianewarrayInstruction.js b/src/core/jvm/instructions/MultianewarrayInstruction.js index 475f025..2b6fbab 100644 --- a/src/core/jvm/instructions/MultianewarrayInstruction.js +++ b/src/core/jvm/instructions/MultianewarrayInstruction.js @@ -32,3 +32,5 @@ export default class MultianewarrayInstruction extends ImmediateShortInstruction return super.toString({ dimensions: this.dimensions }); } } + +module.exports = MultianewarrayInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/PaddedInstruction.js b/src/core/jvm/instructions/PaddedInstruction.js index 2475d70..4795e3a 100644 --- a/src/core/jvm/instructions/PaddedInstruction.js +++ b/src/core/jvm/instructions/PaddedInstruction.js @@ -32,3 +32,5 @@ export default class PaddedInstruction extends AbstractInstruction { } } } + +module.exports = PaddedInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/PushInstruction.js b/src/core/jvm/instructions/PushInstruction.js index 7f45280..8175e67 100644 --- a/src/core/jvm/instructions/PushInstruction.js +++ b/src/core/jvm/instructions/PushInstruction.js @@ -15,3 +15,5 @@ export default class PushInstruction extends InstructionWrapper { return super.toString({ val: this.val }); } } + +module.exports = PushInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/TableSwitchInstruction.js b/src/core/jvm/instructions/TableSwitchInstruction.js index 1cc8b70..3018965 100644 --- a/src/core/jvm/instructions/TableSwitchInstruction.js +++ b/src/core/jvm/instructions/TableSwitchInstruction.js @@ -60,3 +60,5 @@ export default class TableSwitchInstruction extends PaddedInstruction { }); } } + +module.exports = TableSwitchInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/TypeInstruction.js b/src/core/jvm/instructions/TypeInstruction.js index 8bd576d..2605f2b 100644 --- a/src/core/jvm/instructions/TypeInstruction.js +++ b/src/core/jvm/instructions/TypeInstruction.js @@ -20,3 +20,5 @@ export default class TypeInstruction extends ImmediateShortInstruction { return super.toString({ type: this.type }); } } + +module.exports = TypeInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/VariableInstruction.js b/src/core/jvm/instructions/VariableInstruction.js index 71599f4..42fee72 100644 --- a/src/core/jvm/instructions/VariableInstruction.js +++ b/src/core/jvm/instructions/VariableInstruction.js @@ -32,3 +32,5 @@ export default class VariableInstruction extends InstructionWrapper { return super.toString({ val: this.val }); } } + +module.exports = VariableInstruction; \ No newline at end of file diff --git a/src/core/jvm/instructions/WideBranchInstruction.js b/src/core/jvm/instructions/WideBranchInstruction.js index eb54132..fdd5034 100644 --- a/src/core/jvm/instructions/WideBranchInstruction.js +++ b/src/core/jvm/instructions/WideBranchInstruction.js @@ -27,3 +27,5 @@ export default class WideBranchInstruction extends AbstractBranchInstruction { }); } } + +module.exports = WideBranchInstruction; \ No newline at end of file diff --git a/src/core/parsers/BytecodeInstructions.js b/src/core/parsers/BytecodeInstructions.js index 4298651..6cbb74a 100644 --- a/src/core/parsers/BytecodeInstructions.js +++ b/src/core/parsers/BytecodeInstructions.js @@ -18,7 +18,7 @@ function extractCodeFromMethod(method) { */ export function parseInstructions(method) { let code = extractCodeFromMethod(method); - let buffer = new NiceBuffer(new Buffer(code)); + let buffer = new NiceBuffer(Buffer.from(code)); let wide = false; let current = null; diff --git a/yarn.lock b/yarn.lock index b937dfb..bfc37f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -124,10 +124,6 @@ arrify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" -asap@~2.0.3: - version "2.0.6" - resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" - asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" @@ -2196,9 +2192,10 @@ lodash@^4.1.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -lodash@^4.15.0, lodash@^4.17.0, lodash@^4.2.0: +lodash@^4.15.0, lodash@^4.17.5, lodash@^4.2.0: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== lodash@^4.17.4: version "4.17.10" @@ -2298,12 +2295,6 @@ node-pre-gyp@^0.6.39: tar "^2.2.1" tar-pack "^3.4.0" -nodegit-promise@~4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/nodegit-promise/-/nodegit-promise-4.0.0.tgz#5722b184f2df7327161064a791d2e842c9167b34" - dependencies: - asap "~2.0.3" - nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -2482,13 +2473,6 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -promisify-node@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/promisify-node/-/promisify-node-0.4.0.tgz#32803874ec411784e4786c339902a87a179a469c" - dependencies: - nodegit-promise "~4.0.0" - object-assign "^4.0.1" - punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: