Update entry point for remixd and update origins path

pull/1821/head
David Disu 3 years ago
parent aa44306cfb
commit d0cf64491c
  1. 10
      libs/remixd/package.json
  2. 4
      libs/remixd/src/bin/remixd.ts
  3. 2
      libs/remixd/src/websocket.ts
  4. 2
      package.json
  5. 10
      workspace.json

@ -1,18 +1,18 @@
{
"name": "@remix-project/remixd",
"version": "0.5.3",
"version": "0.5.4",
"description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)",
"main": "index.js",
"types": "./index.d.ts",
"bin": {
"remixd": "./bin/remixd.js"
"remixd": "./src/bin/remixd.js"
},
"scripts": {
"test": "echo \"Error: no test specified\"",
"start": "./bin/remixd.js",
"start": "./src/bin/remixd.js",
"npip": "npip",
"lint": "eslint ./src ./bin --ext .ts",
"build": "tsc -p ./ && chmod +x ./bin/remixd.js",
"lint": "eslint ./src --ext .ts",
"build": "tsc -p ./ && chmod +x ./src/bin/remixd.js",
"dev": "nodemon"
},
"publishConfig": {

@ -151,7 +151,7 @@ function errorHandler (error: any, service: string) {
const { data } = (await Axios.get(gistUrl)) as { data: any }
try {
await writeJSON(path.resolve(path.join(__dirname, '..', 'origins.json')), { data })
await writeJSON(path.resolve(path.join(__dirname, '../..', 'origins.json')), { data })
} catch (e) {
console.error(e)
}
@ -161,7 +161,7 @@ function errorHandler (error: any, service: string) {
} catch (e) {
try {
// eslint-disable-next-line
const origins = require('../origins.json')
const origins = require('../../origins.json')
const { data } = origins
return data.includes(origin) ? data.includes(origin) : data.includes(domain)

@ -66,7 +66,7 @@ function originIsAllowed (origin: string, self: WebSocket): boolean {
} else {
try {
// eslint-disable-next-line
const origins = require('./origins.json')
const origins = require('../origins.json')
const domain = getDomain(origin)
const { data } = origins

@ -95,7 +95,7 @@
"nightwatch_local_verticalIconscontextmenu": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.js --env=chrome",
"nightwatch_local_pluginApi": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/plugin_api_*.js --env=chrome",
"onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint",
"remixd": "nx build remixd && nx serve remixd --folder=./apps/remix-ide/contracts --remixide=http://127.0.0.1:8080",
"remixd": "nx build remixd && chmod +x dist/libs/remixd/src/bin/remixd.js && dist/libs/remixd/src/bin/remixd.js -s ./apps/remix-ide/contracts --remix-ide http://127.0.0.1:8080",
"selenium": "selenium-standalone start",
"selenium-install": "selenium-standalone install",
"sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js",

@ -456,16 +456,6 @@
"main": "libs/remixd/src/index.ts",
"assets": ["libs/remixd/*.md", "libs/remixd/src/origins.json"]
}
},
"serve": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "SERVE_SCRIPT='chmod +x dist/libs/remixd/src/bin/remixd.js; dist/libs/remixd/src/bin/remixd.js '; if [ {args.folder} != undefined ]; then SERVE_SCRIPT=${SERVE_SCRIPT}' -s {args.folder}'; fi; if [ {args.remixide} != undefined ]; then SERVE_SCRIPT=${SERVE_SCRIPT}' --remix-ide {args.remixide}'; fi; eval $SERVE_SCRIPT;"
}
]
}
}
}
},

Loading…
Cancel
Save