Update js-sandbox README
This commit is contained in:
@@ -15,36 +15,35 @@
|
|||||||
|
|
||||||
This package deals with providing a JavaScript sandbox for executing various security sensitive external scripts.
|
This package deals with providing a JavaScript sandbox for executing various security sensitive external scripts.
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Install the [npm package](https://www.npmjs.com/package/@hoppscotch/js-sandbox).
|
|
||||||
|
|
||||||
```
|
|
||||||
npm install --save @hoppscotch/js-sandbox
|
|
||||||
```
|
|
||||||
|
|
||||||
## How does this work?
|
## How does this work?
|
||||||
|
|
||||||
This package makes use of [quickjs-empscripten](https://www.npmjs.com/package/quickjs-emscripten) for building sandboxes for running external code on Hoppscotch.
|
This package makes use of [quickjs-empscripten](https://www.npmjs.com/package/quickjs-emscripten) for building sandboxes for running external code on Hoppscotch.
|
||||||
|
|
||||||
Currently implemented sandboxes:
|
Currently implemented sandboxes:
|
||||||
- Hoppscotch Test Scripts
|
- Hoppscotch Test Scripts
|
||||||
|
- Hoppscotch Pre Request Scripts
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
1. Clone the repository
|
1. Clone the repository
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/hoppscotch/hopp-js-sandbox
|
git clone https://github.com/hoppscotch/hoppscotch
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install the package dependencies
|
2. Install the package dependencies
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Try out the demo [`src/demo.ts`](https://github.com/hoppscotch/hopp-js-sandbox/blob/main/src/demo.ts) using:
|
3. Navigate to the [package folder](https://github.com/hoppscotch/hoppscotch/tree/main/packages/hoppscotch-js-sandbox)
|
||||||
|
```
|
||||||
|
cd hoppscotch/packages/hoppscotch-js-sandbox
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
4. Try out the demo [`src/demo.ts`](https://github.com/hoppscotch/hoppscotch/blob/main/packages/hoppscotch-js-sandbox/src/demo.ts) using:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run demo
|
npm run demo
|
||||||
|
|||||||
Reference in New Issue
Block a user