0.15.0 • Published 2 years ago

terra-web-extension v0.15.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Run chromium browser installed the Terra Station extension for testing

CLI

Install

npm install -g terra-web-extension

Command-line tool

# basic 
terra-web-extension https://localhost:3000

If you want to keep your chrome browser user data

terra-web-extension https://localhost:3000 --userData="/your/chromium/user-data-path"

Pre-config test

{
  "$schema": "https://assets.terra.money/schemas/web-extension-test-config.json",
  "wallets": [
    {
      "name": "validator",
      "mnemonic": "satisfy adjust timber high purchase tuition stool faith fine install that you unaware feed domain license impose boss human eager hat rent enjoy dawn"
    },
    {
      "name": "test1",
      "mnemonic": "notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius"
    }
  ],
  "selectedWallet": "test1",
  "selectedNetwork": "testnet"
}

Create a config file like above

terra-web-extension https://localhost:3000 --config="./config.json"

Then, you can use the set extension immediately.

Without npm install -g

npx terra-web-extension@latest https://localhost:3000

API

Install

npm install terra-web-extension --dev

Script

const runBrowser = require('terra-web-extension')

runBrowser('https://localhost:3000')

If you want to do a test with Terra Station extension to run another extension together (for extension developers)

const runBrowser = require('terra-web-extension')

runBrowser('https://localhost:3000', {
  extensionPaths: [
    '/Your/extension/path1', // unpacked extension directories
    '/Your/extension/path2',
  ]
})

If you want to keep your chrome browser user data

const runBrowser = require('terra-web-extension')

runBrowser('https://localhost:3000', {
  puppeteerLaunchOptions: {
    userDataDir: '/your/chromium/user-data-path',
  }
})

If you want to use pre-config json file

const runBrowser = require('terra-web-extension')

runBrowser('https://localhost:3000', {
  configPath: './config.json',
})
0.15.0

2 years ago

0.14.0

2 years ago

0.13.0

2 years ago

0.12.2

2 years ago

0.12.1

2 years ago

0.12.0

2 years ago

0.11.4

2 years ago

0.11.3

2 years ago

0.11.2

2 years ago

0.11.1

2 years ago

0.11.0

2 years ago