Skip to content

Commit

Permalink
Merge pull request #33 from ayecue/1.3.7
Browse files Browse the repository at this point in the history
1.3.7
  • Loading branch information
ayecue authored Sep 29, 2022
2 parents 947109d + 36c0cbc commit 6321b55
Show file tree
Hide file tree
Showing 16 changed files with 755 additions and 303 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"NodeJS": true,
"Element": true,
"localStorage": true,
"location": true
"location": true,
"KeyboardEvent": true
},
"settings": {
"import/resolver": {
Expand Down
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,37 @@ All notable changes to this project will be documented in this file.

## [1.3.6] - 10-09-2022

- fix share feature in web-ui
- fix share feature in web-ui

## [1.3.7] - 29-09-2022

- minor fix for file.get_content, return empty string instead of undefined, thanks for reporting [@TopRoupi](https://github.com/TopRoupi)
- add sort key logic in sort intrinsic, thanks for reporting [@TopRoupi](https://github.com/TopRoupi)
- add missing tan intrinsics
- add same errors in basic intrinsics as in ms
- implement format_columns logic
- improve output handler logic
- user_input supports anyKey now
- add proper router intrinsics
- rework shell intriniscs for connect_service + scp
- add shell intriniscs for launch + build + ping
- add ftpShell intrinsics for put
- add computer intrinsics for connect eth + connect wifi
- update computer intrinsics for touch + create_folder
- update file intrinsics for move + copy + chmod + set_content + get_content + set_owner
- add groups to mock env
- update crypo intrinsics
- update metaxploit intrinsics
- update metalib intrinsics
- update netsession intrinsics
- more realistic usernames, passwords, vulnerability zone names
- loading bars are supported now
- deactivate breakpoint for injection during debugging in cli execution
- keep pending state after injection in interpreter
- update meta version with a few corrections
- update parser with removed ";" checks
- support nested import_code
- support outer imports using ".."
- fix [List can be different even if the same](https://github.com/ayecue/greybel-js/issues/32), thanks for reporting [@brahermoon](https://github.com/brahermoon)
- add __isa logic for maps
- minor TextMesh Pro support for output
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ Interpreter CLI
Example: greybel-execute <myscriptfile>
Options:
-p, --params Execution parameters
-p, --params Execution parameters
-i, --interactive Interactive parameters
```

For Windows you can use something like [gitbash](https://gitforwindows.org/). Or just use the UI.
Expand Down Expand Up @@ -136,12 +137,6 @@ Not yet supported:
- `Wallet` - only pollyfill which "returns not yet supported"
- `SubWallet` - only pollyfill which "returns not yet supported"
- `Coin` - only pollyfill which "returns not yet supported"
- `Service` - only pollyfill which "returns not yet supported"
- `Metaxploit.aireplay` maxAcks are not yet supported
- `File.set_group`
- `Shell.build`
- `Shell.launch`
- `FtpShell.put`

## Debugger
Pauses execution and enables you to inspect/debug your code.
Expand All @@ -154,6 +149,39 @@ debugger

![Debugger UI](/assets/debugger-ui-preview.png?raw=true "Debugger UI")

## TextMesh Pro Rich Text support
[TextMesh Pro Rich Text](http://digitalnativestudios.com/textmeshpro/docs/rich-text/) is partially supported.

### CLI
Supports:
* color
* mark
* underline
* italic
* bold
* strikethrough
* lowercase
* uppercase

### UI
Supports:
* color
* mark
* underline
* italic
* bold
* strikethrough
* lowercase
* uppercase
* align
* cspace
* lineheight
* margin
* nobr
* pos
* size
* voffset

# REPL
```
Emulator CLI
Expand Down Expand Up @@ -245,6 +273,9 @@ This going to be very useful if you want to use the new feature but still want y

Together with the `--installer` flag in the CLI it will bundle your files for you which makes it easier to copy/paste code from your file system into the game.

### Nested import_code
Nested `import_code` is supported now as well. Each nested `import_code` will be moved to the entry file when transpiling/building.

## Import
Import will use the relative path from the file it imports to.
```
Expand Down
2 changes: 0 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ if (!semver.satisfies(process.version, engineVersion)) {
}

const build = require('../out/build').default;
const path = require('path');
const fs = require('fs');
const program = require('commander').program;
const version = require('../package.json').version;
let options = {};
Expand Down
20 changes: 19 additions & 1 deletion bin/execute
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env node
const inquirer = require('inquirer');
const semver = require('semver');
const package = require('../package.json');

Expand All @@ -23,13 +24,30 @@ program
.action(function (filepath, output) {
options.filepath = filepath;
})
.option('-params, --params <params...>', 'Execution parameters');
.option('-params, --params <params...>', 'Execution parameters')
.option('-i, --interactive', 'Interactive parameters');

program.parse(process.argv);

(async function() {
options = Object.assign(options, program.opts());

if (options.interactive) {
options.params = await inquirer
.prompt({
name: 'default',
message: 'Params:',
type: 'input',
loop: false
})
.then((inputMap) => {
return inputMap.default.split(' ');
})
.catch((err) => {
throw err;
});
}

const success = await execute(options.filepath, {
params: options.params
});
Expand Down
Loading

0 comments on commit 6321b55

Please sign in to comment.