diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js
index 8beeae8849..323ec0ba86 100644
--- a/apps/remix-ide/src/app.js
+++ b/apps/remix-ide/src/app.js
@@ -16,7 +16,11 @@ import { HiddenPanel } from './app/components/hidden-panel'
import { VerticalIcons } from './app/components/vertical-icons'
import { LandingPage } from './app/ui/landing-page/landing-page'
import { MainPanel } from './app/components/main-panel'
-import FetchAndCompile from './app/compiler/compiler-sourceVerifier-fetchAndCompile'
+
+import { CompilerArtefacts } from '@remix-core-plugin/compiler-artefacts'
+import { CompilerImports } from '@remix-core-plugin/compiler-content-imports'
+import { FetchAndCompile } from '@remix-core-plugin/compiler-fetch-and-compile'
+import { OffsetToLineColumnConverter } from '@remix-core-plugin/offset-line-to-column-converter'
import migrateFileSystem from './migrateFileSystem'
@@ -25,7 +29,7 @@ const csjs = require('csjs-inject')
const yo = require('yo-yo')
const remixLib = require('@remix-project/remix-lib')
const registry = require('./global/registry')
-const { OffsetToLineColumnConverter } = require('./lib/offsetToLineColumnConverter')
+
const QueryParams = require('./lib/query-params')
const Storage = remixLib.Storage
const RemixDProvider = require('./app/files/remixDProvider')
@@ -39,12 +43,10 @@ const DGitProvider = require('./app/files/dgitProvider')
const WorkspaceFileProvider = require('./app/files/workspaceFileProvider')
const toolTip = require('./app/ui/tooltip')
const CompilerMetadata = require('./app/files/compiler-metadata')
-const CompilerImport = require('./app/compiler/compiler-imports')
const Blockchain = require('./blockchain/blockchain.js')
const PluginManagerComponent = require('./app/components/plugin-manager-component')
-const CompilersArtefacts = require('./app/compiler/compiler-artefacts')
const CompileTab = require('./app/tabs/compile-tab')
const SettingsTab = require('./app/tabs/settings-tab')
@@ -262,14 +264,14 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
const dGitProvider = new DGitProvider()
// ----------------- import content service ------------------------
- const contentImport = new CompilerImport(fileManager)
+ const contentImport = new CompilerImports(fileManager)
const blockchain = new Blockchain(registry.get('config').api)
// ----------------- compilation metadata generation service ---------
const compilerMetadataGenerator = new CompilerMetadata(blockchain, fileManager, registry.get('config').api)
// ----------------- compilation result service (can keep track of compilation results) ----------------------------
- const compilersArtefacts = new CompilersArtefacts() // store all the compilation results (key represent a compiler name)
+ const compilersArtefacts = new CompilerArtefacts() // store all the compilation results (key represent a compiler name)
registry.put({ api: compilersArtefacts, name: 'compilersartefacts' })
// service which fetch contract artifacts from sourve-verify, put artifacts in remix and compile it
@@ -458,11 +460,11 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
console.log('couldn\'t register iframe plugins', e.message)
}
- await appManager.activatePlugin(['contentImport', 'theme', 'editor', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter'])
+ await appManager.activatePlugin(['settings', 'contentImport', 'theme', 'editor', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter'])
await appManager.activatePlugin(['mainPanel', 'menuicons', 'tabs'])
await appManager.activatePlugin(['sidePanel']) // activating host plugin separately
await appManager.activatePlugin(['home'])
- await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'settings', 'contextualListener', 'terminal', 'fetchAndCompile'])
+ await appManager.activatePlugin(['hiddenPanel', 'pluginManager', 'filePanel', 'contextualListener', 'terminal', 'fetchAndCompile'])
const queryParams = new QueryParams()
const params = queryParams.get()
diff --git a/apps/remix-ide/src/app/compiler/compiler-abstract.js b/apps/remix-ide/src/app/compiler/compiler-abstract.js
deleted file mode 100644
index fcfb32a827..0000000000
--- a/apps/remix-ide/src/app/compiler/compiler-abstract.js
+++ /dev/null
@@ -1,46 +0,0 @@
-'use strict'
-var remixLib = require('@remix-project/remix-lib')
-var txHelper = remixLib.execution.txHelper
-
-module.exports = class CompilerAbstract {
- constructor (languageversion, data, source) {
- this.languageversion = languageversion
- this.data = data
- this.source = source // source code
- }
-
- getContracts () {
- return this.data.contracts
- }
-
- getContract (name) {
- return txHelper.getContract(name, this.data.contracts)
- }
-
- visitContracts (calllback) {
- return txHelper.visitContracts(this.data.contracts, calllback)
- }
-
- getData () {
- return this.data
- }
-
- getAsts () {
- return this.data.sources // ast
- }
-
- getSourceName (fileIndex) {
- if (this.data && this.data.sources) {
- return Object.keys(this.data.sources)[fileIndex]
- } else if (Object.keys(this.source.sources).length === 1) {
- // if we don't have ast, we return the only one filename present.
- const sourcesArray = Object.keys(this.source.sources)
- return sourcesArray[0]
- }
- return null
- }
-
- getSourceCode () {
- return this.source
- }
-}
diff --git a/apps/remix-ide/src/app/compiler/compiler-input.js b/apps/remix-ide/src/app/compiler/compiler-input.js
deleted file mode 100644
index a0be3c499d..0000000000
--- a/apps/remix-ide/src/app/compiler/compiler-input.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict'
-
-module.exports = (sources, opts) => {
- return JSON.stringify({
- language: 'Solidity',
- sources: sources,
- settings: {
- optimizer: {
- enabled: opts.optimize === true || opts.optimize === 1,
- runs: 200
- },
- libraries: opts.libraries,
- outputSelection: {
- '*': {
- '': ['ast'],
- '*': ['abi', 'metadata', 'devdoc', 'userdoc', 'evm.legacyAssembly', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'evm.gasEstimates']
- }
- }
- }
- })
-}
diff --git a/apps/remix-ide/src/app/files/compiler-metadata.js b/apps/remix-ide/src/app/files/compiler-metadata.js
index fe4dfc3c43..5c10ad1c7e 100644
--- a/apps/remix-ide/src/app/files/compiler-metadata.js
+++ b/apps/remix-ide/src/app/files/compiler-metadata.js
@@ -2,7 +2,7 @@
import { Plugin } from '@remixproject/engine'
import * as packageJson from '../../../../../package.json'
import { joinPath } from '../../lib/helper'
-var CompilerAbstract = require('../compiler/compiler-abstract')
+import { CompilerAbstract } from '@remix-project/remix-solidity'
const profile = {
name: 'compilerMetadata',
diff --git a/apps/remix-ide/src/app/files/fileProvider.js b/apps/remix-ide/src/app/files/fileProvider.js
index 5d152ec74b..288eabe518 100644
--- a/apps/remix-ide/src/app/files/fileProvider.js
+++ b/apps/remix-ide/src/app/files/fileProvider.js
@@ -1,6 +1,6 @@
'use strict'
-const CompilerImport = require('../compiler/compiler-imports')
+import { CompilerImports } from '@remix-core-plugin/compiler-content-imports'
const EventManager = require('events')
const modalDialogCustom = require('../ui/modal-dialog-custom')
const tooltip = require('../ui/tooltip')
@@ -44,7 +44,7 @@ class FileProvider {
discardChanges (path) {
this.remove(path)
- const compilerImport = new CompilerImport()
+ const compilerImport = new CompilerImports()
this.providerExternalsStorage.keys().map(value => {
if (value.indexOf(path) === 0) {
compilerImport.import(
diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js
index cb0773b2b0..767f35de64 100644
--- a/apps/remix-ide/src/app/tabs/compile-tab.js
+++ b/apps/remix-ide/src/app/tabs/compile-tab.js
@@ -2,7 +2,7 @@
import { ViewPlugin } from '@remixproject/engine-web'
import * as packageJson from '../../../../../package.json'
import publishToStorage from '../../publishToStorage'
-import { compile } from '../compiler/compiler-helpers'
+import { compile } from '@remix-project/remix-solidity'
const EventEmitter = require('events')
const $ = require('jquery')
diff --git a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
index dfb0cfc5a4..7ecc3298b1 100644
--- a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
+++ b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
@@ -1,6 +1,6 @@
import toaster from '../../ui/tooltip'
-import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '../../compiler/compiler-utils'
+import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '@remix-project/remix-solidity'
const yo = require('yo-yo')
const helper = require('../../../lib/helper')
const addTooltip = require('../../ui/tooltip')
diff --git a/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js b/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
index 2ee225fef3..386f654775 100644
--- a/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
+++ b/apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
@@ -1,6 +1,6 @@
+import { CompilerAbstract } from '@remix-project/remix-solidity'
const remixLib = require('@remix-project/remix-lib')
const txHelper = remixLib.execution.txHelper
-const CompilerAbstract = require('../../../compiler/compiler-abstract')
const EventManager = remixLib.EventManager
const _paq = window._paq = window._paq || []
diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js
index b4527f1151..b5c2c2fafd 100644
--- a/apps/remix-ide/src/app/tabs/test-tab.js
+++ b/apps/remix-ide/src/app/tabs/test-tab.js
@@ -1,7 +1,6 @@
import { ViewPlugin } from '@remixproject/engine-web'
-import { canUseWorker, urlFromVersion } from '../compiler/compiler-utils'
import { removeMultipleSlashes, removeTrailingSlashes } from '../../lib/helper'
-
+import { canUseWorker, urlFromVersion } from '@remix-project/remix-solidity'
var yo = require('yo-yo')
var async = require('async')
var tooltip = require('../ui/tooltip')
diff --git a/apps/remix-ide/src/app/ui/landing-page/landing-page.js b/apps/remix-ide/src/app/ui/landing-page/landing-page.js
index 9719d0985c..e72d37db9c 100644
--- a/apps/remix-ide/src/app/ui/landing-page/landing-page.js
+++ b/apps/remix-ide/src/app/ui/landing-page/landing-page.js
@@ -1,12 +1,12 @@
import * as packageJson from '../../../../../../package.json'
import { ViewPlugin } from '@remixproject/engine-web'
import { migrateToWorkspace } from '../../../migrateFileSystem'
+import { CompilerImports } from '@remix-core-plugin/compiler-content-imports'
import JSZip from 'jszip'
const yo = require('yo-yo')
const csjs = require('csjs-inject')
const globalRegistry = require('../../../global/registry')
-const CompilerImport = require('../../compiler/compiler-imports')
const modalDialogCustom = require('../modal-dialog-custom')
const modalDialog = require('../modaldialog')
const tooltip = require('../tooltip')
@@ -240,7 +240,7 @@ export class LandingPage extends ViewPlugin {
render () {
const load = (service, item, examples, info) => {
- const compilerImport = new CompilerImport()
+ const compilerImport = new CompilerImports()
const fileProviders = globalRegistry.get('fileproviders').api
const msg = yo`
diff --git a/apps/remix-ide/src/lib/cmdInterpreterAPI.js b/apps/remix-ide/src/lib/cmdInterpreterAPI.js
index d132f13107..e8bb3e000e 100644
--- a/apps/remix-ide/src/lib/cmdInterpreterAPI.js
+++ b/apps/remix-ide/src/lib/cmdInterpreterAPI.js
@@ -1,9 +1,9 @@
'use strict'
+import { CompilerImports } from '@remix-core-plugin/compiler-content-imports'
var yo = require('yo-yo')
var async = require('async')
var EventManager = require('../lib/events')
-var CompilerImport = require('../app/compiler/compiler-imports')
var toolTip = require('../app/ui/tooltip')
var globalRegistry = require('../global/registry')
var SourceHighlighter = require('../app/editor/sourceHighlighter')
@@ -18,7 +18,7 @@ class CmdInterpreterAPI {
self._components.registry = localRegistry || globalRegistry
self._components.terminal = terminal
self._components.sourceHighlighter = new SourceHighlighter()
- self._components.fileImport = new CompilerImport()
+ self._components.fileImport = new CompilerImports()
self._components.gistHandler = new GistHandler()
self._deps = {
fileManager: self._components.registry.get('filemanager').api,
diff --git a/libs/remix-core-plugin/compiler-artefacts/.eslintrc b/libs/remix-core-plugin/compiler-artefacts/.eslintrc
new file mode 100644
index 0000000000..1655d72922
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-artefacts/.eslintrc
@@ -0,0 +1 @@
+{ "extends": "../../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
diff --git a/libs/remix-core-plugin/compiler-artefacts/README.md b/libs/remix-core-plugin/compiler-artefacts/README.md
new file mode 100644
index 0000000000..b3c08632bc
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-artefacts/README.md
@@ -0,0 +1,3 @@
+# compiler-artefacts
+
+This library was generated with [Nx](https://nx.dev).
diff --git a/libs/remix-core-plugin/compiler-artefacts/package.json b/libs/remix-core-plugin/compiler-artefacts/package.json
new file mode 100644
index 0000000000..046a760da7
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-artefacts/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "@remix-core-plugin/compiler-artefacts",
+ "version": "0.0.1",
+ "description": "This library was generated with [Nx](https://nx.dev).",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "Remix Team",
+ "license": "ISC"
+}
diff --git a/libs/remix-core-plugin/compiler-artefacts/src/index.ts b/libs/remix-core-plugin/compiler-artefacts/src/index.ts
new file mode 100644
index 0000000000..c11c162acb
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-artefacts/src/index.ts
@@ -0,0 +1 @@
+export * from './lib/compiler-artefacts'
diff --git a/apps/remix-ide/src/app/compiler/compiler-artefacts.js b/libs/remix-core-plugin/compiler-artefacts/src/lib/compiler-artefacts.ts
similarity index 92%
rename from apps/remix-ide/src/app/compiler/compiler-artefacts.js
rename to libs/remix-core-plugin/compiler-artefacts/src/lib/compiler-artefacts.ts
index 68b1cad9bd..47eb1d519b 100644
--- a/apps/remix-ide/src/app/compiler/compiler-artefacts.js
+++ b/libs/remix-core-plugin/compiler-artefacts/src/lib/compiler-artefacts.ts
@@ -1,16 +1,17 @@
'use strict'
import { Plugin } from '@remixproject/engine'
-import * as packageJson from '../../../../../package.json'
-import CompilerAbstract from './compiler-abstract'
+import { CompilerAbstract } from '@remix-project/remix-solidity'
const profile = {
name: 'compilerArtefacts',
- methods: [],
+ methods: ['get', 'addResolvedContract'],
events: [],
- version: packageJson.version
+ version: '0.0.1'
}
-module.exports = class CompilerArtefacts extends Plugin {
+export class CompilerArtefacts extends Plugin {
+ compilersArtefactsPerFile: any
+ compilersArtefacts: any
constructor () {
super(profile)
this.compilersArtefacts = {}
diff --git a/libs/remix-core-plugin/compiler-artefacts/tsconfig.json b/libs/remix-core-plugin/compiler-artefacts/tsconfig.json
new file mode 100644
index 0000000000..42882af48a
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-artefacts/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.json",
+ "files": [],
+ "include": [],
+ "references": [
+ {
+ "path": "./tsconfig.lib.json"
+ }
+ ]
+}
diff --git a/libs/remix-core-plugin/compiler-artefacts/tsconfig.lib.json b/libs/remix-core-plugin/compiler-artefacts/tsconfig.lib.json
new file mode 100644
index 0000000000..9c463b51e2
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-artefacts/tsconfig.lib.json
@@ -0,0 +1,12 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "../../../dist/out-tsc",
+ "declaration": true,
+ "rootDir": "./src",
+ "types": ["node"]
+ },
+ "exclude": ["**/*.spec.ts"],
+ "include": ["**/*.ts"]
+}
diff --git a/libs/remix-core-plugin/compiler-content-imports/.eslintrc b/libs/remix-core-plugin/compiler-content-imports/.eslintrc
new file mode 100644
index 0000000000..1655d72922
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-content-imports/.eslintrc
@@ -0,0 +1 @@
+{ "extends": "../../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
diff --git a/libs/remix-core-plugin/compiler-content-imports/README.md b/libs/remix-core-plugin/compiler-content-imports/README.md
new file mode 100644
index 0000000000..38165da82b
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-content-imports/README.md
@@ -0,0 +1,3 @@
+# compiler-content-imports
+
+This library was generated with [Nx](https://nx.dev).
diff --git a/libs/remix-core-plugin/compiler-content-imports/package.json b/libs/remix-core-plugin/compiler-content-imports/package.json
new file mode 100644
index 0000000000..95af3c807c
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-content-imports/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "@remix-core-plugin/compiler-content-imports",
+ "version": "0.0.1",
+ "description": "This library was generated with [Nx](https://nx.dev).",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "Remix Team",
+ "license": "ISC"
+}
diff --git a/libs/remix-core-plugin/compiler-content-imports/src/index.ts b/libs/remix-core-plugin/compiler-content-imports/src/index.ts
new file mode 100644
index 0000000000..f6219a88b3
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-content-imports/src/index.ts
@@ -0,0 +1 @@
+export * from './lib/compiler-content-imports'
diff --git a/apps/remix-ide/src/app/compiler/compiler-imports.js b/libs/remix-core-plugin/compiler-content-imports/src/lib/compiler-content-imports.ts
similarity index 84%
rename from apps/remix-ide/src/app/compiler/compiler-imports.js
rename to libs/remix-core-plugin/compiler-content-imports/src/lib/compiler-content-imports.ts
index 0e72bb425d..d860dc4729 100644
--- a/apps/remix-ide/src/app/compiler/compiler-imports.js
+++ b/libs/remix-core-plugin/compiler-content-imports/src/lib/compiler-content-imports.ts
@@ -1,30 +1,33 @@
'use strict'
import { Plugin } from '@remixproject/engine'
-import * as packageJson from '../../../../../package.json'
import { RemixURLResolver } from '@remix-project/remix-url-resolver'
const remixTests = require('@remix-project/remix-tests')
-const globalRegistry = require('../../global/registry')
-const addTooltip = require('../ui/tooltip')
const async = require('async')
const profile = {
name: 'contentImport',
displayName: 'content import',
- version: packageJson.version,
+ version: '0.0.1',
methods: ['resolve', 'resolveAndSave', 'isExternalUrl']
}
-module.exports = class CompilerImports extends Plugin {
+export class CompilerImports extends Plugin {
+ previouslyHandled: {}
+ fileManager: any
+ urlResolver: any
constructor (fileManager) {
super(profile)
this.fileManager = fileManager
- // const token = await this.call('settings', 'getGithubAccessToken')
- const token = globalRegistry.get('config').api.get('settings/gist-access-token') // TODO replace with the plugin call above https://github.com/ethereum/remix-ide/issues/2288
- const protocol = window.location.protocol
- this.urlResolver = new RemixURLResolver(token, protocol)
+ this.urlResolver = new RemixURLResolver()
this.previouslyHandled = {} // cache import so we don't make the request at each compilation.
}
+ async onActivation () {
+ const protocol = typeof window !== 'undefined' && window.location.protocol
+ const token = await this.call('settings', 'getGithubAccessToken')
+ this.urlResolver = new RemixURLResolver(token, protocol)
+ }
+
isRelativeImport (url) {
return /^([^/]+)/.exec(url)
}
@@ -45,7 +48,7 @@ module.exports = class CompilerImports extends Plugin {
this.import(url, null, (error, content, cleanUrl, type, url) => {
if (error) return reject(error)
resolve({ content, cleanUrl, type, url })
- })
+ }, null)
})
}
@@ -83,8 +86,8 @@ module.exports = class CompilerImports extends Plugin {
importExternal (url, targetPath, cb) {
this.import(url,
- // TODO: move to an event that is generated, the UI shouldn't be here
- (loadingMsg) => { addTooltip(loadingMsg) },
+ // TODO: handle this event
+ (loadingMsg) => { this.emit('message', loadingMsg) },
(error, content, cleanUrl, type, url) => {
if (error) return cb(error)
if (this.fileManager) {
@@ -93,7 +96,7 @@ module.exports = class CompilerImports extends Plugin {
if (provider) provider.addExternal('.deps/' + path, content, url)
}
cb(null, content)
- })
+ }, null)
}
/**
@@ -141,10 +144,12 @@ module.exports = class CompilerImports extends Plugin {
if (localhostProvider.isConnected()) {
var splitted = /([^/]+)\/(.*)$/g.exec(url)
return async.tryEach([
- (cb) => { this.resolveAndSave('localhost/installed_contracts/' + url).then((result) => cb(null, result)).catch((error) => cb(error.message)) },
- (cb) => { if (!splitted) { cb('URL not parseable: ' + url) } else { this.resolveAndSave('localhost/installed_contracts/' + splitted[1] + '/contracts/' + splitted[2]).then((result) => cb(null, result)).catch((error) => cb(error.message)) } },
- (cb) => { this.resolveAndSave('localhost/node_modules/' + url).then((result) => cb(null, result)).catch((error) => cb(error.message)) },
- (cb) => { if (!splitted) { cb('URL not parseable: ' + url) } else { this.resolveAndSave('localhost/node_modules/' + splitted[1] + '/contracts/' + splitted[2]).then((result) => cb(null, result)).catch((error) => cb(error.message)) } }],
+ (cb) => { this.resolveAndSave('localhost/installed_contracts/' + url, null).then((result) => cb(null, result)).catch((error) => cb(error.message)) },
+ // eslint-disable-next-line standard/no-callback-literal
+ (cb) => { if (!splitted) { cb('URL not parseable: ' + url) } else { this.resolveAndSave('localhost/installed_contracts/' + splitted[1] + '/contracts/' + splitted[2], null).then((result) => cb(null, result)).catch((error) => cb(error.message)) } },
+ (cb) => { this.resolveAndSave('localhost/node_modules/' + url, null).then((result) => cb(null, result)).catch((error) => cb(error.message)) },
+ // eslint-disable-next-line standard/no-callback-literal
+ (cb) => { if (!splitted) { cb('URL not parseable: ' + url) } else { this.resolveAndSave('localhost/node_modules/' + splitted[1] + '/contracts/' + splitted[2], null).then((result) => cb(null, result)).catch((error) => cb(error.message)) } }],
(error, result) => {
if (error) {
return this.importExternal(url, targetPath, (error, content) => {
diff --git a/libs/remix-core-plugin/compiler-content-imports/tsconfig.json b/libs/remix-core-plugin/compiler-content-imports/tsconfig.json
new file mode 100644
index 0000000000..42882af48a
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-content-imports/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.json",
+ "files": [],
+ "include": [],
+ "references": [
+ {
+ "path": "./tsconfig.lib.json"
+ }
+ ]
+}
diff --git a/libs/remix-core-plugin/compiler-content-imports/tsconfig.lib.json b/libs/remix-core-plugin/compiler-content-imports/tsconfig.lib.json
new file mode 100644
index 0000000000..9c463b51e2
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-content-imports/tsconfig.lib.json
@@ -0,0 +1,12 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "../../../dist/out-tsc",
+ "declaration": true,
+ "rootDir": "./src",
+ "types": ["node"]
+ },
+ "exclude": ["**/*.spec.ts"],
+ "include": ["**/*.ts"]
+}
diff --git a/libs/remix-core-plugin/compiler-fetch-and-compile/.eslintrc b/libs/remix-core-plugin/compiler-fetch-and-compile/.eslintrc
new file mode 100644
index 0000000000..1655d72922
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/.eslintrc
@@ -0,0 +1 @@
+{ "extends": "../../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
diff --git a/libs/remix-core-plugin/compiler-fetch-and-compile/README.md b/libs/remix-core-plugin/compiler-fetch-and-compile/README.md
new file mode 100644
index 0000000000..5c2aca3ead
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/README.md
@@ -0,0 +1,3 @@
+# compiler-fetch-and-compile
+
+This library was generated with [Nx](https://nx.dev).
diff --git a/libs/remix-core-plugin/compiler-fetch-and-compile/package.json b/libs/remix-core-plugin/compiler-fetch-and-compile/package.json
new file mode 100644
index 0000000000..05dfdb3372
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "@remix-core-plugin/compiler-fetch-and-compile",
+ "version": "0.0.1",
+ "description": "This library was generated with [Nx](https://nx.dev).",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "Remix Team",
+ "license": "ISC"
+}
diff --git a/libs/remix-core-plugin/compiler-fetch-and-compile/src/index.ts b/libs/remix-core-plugin/compiler-fetch-and-compile/src/index.ts
new file mode 100644
index 0000000000..2d387c7552
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/src/index.ts
@@ -0,0 +1 @@
+export * from './lib/compiler-fetch-and-compile'
diff --git a/apps/remix-ide/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js b/libs/remix-core-plugin/compiler-fetch-and-compile/src/lib/compiler-fetch-and-compile.ts
similarity index 80%
rename from apps/remix-ide/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
rename to libs/remix-core-plugin/compiler-fetch-and-compile/src/lib/compiler-fetch-and-compile.ts
index 4a513e2129..e7769b7b04 100644
--- a/apps/remix-ide/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/src/lib/compiler-fetch-and-compile.ts
@@ -1,18 +1,19 @@
-import * as packageJson from '../../../../../package.json'
+
import { Plugin } from '@remixproject/engine'
-import { compile } from './compiler-helpers'
-import globalRegistry from '../../global/registry'
+import { compile } from '@remix-project/remix-solidity'
+import { util } from '@remix-project/remix-lib'
-import remixLib from '@remix-project/remix-lib'
const ethutil = require('ethereumjs-util')
const profile = {
name: 'fetchAndCompile',
methods: ['resolve'],
- version: packageJson.version
+ version: '0.0.1'
}
-export default class FetchAndCompile extends Plugin {
+export class FetchAndCompile extends Plugin {
+ unresolvedAddresses: any[]
+ sourceVerifierNetWork: string[]
constructor () {
super(profile)
this.unresolvedAddresses = []
@@ -32,11 +33,10 @@ export default class FetchAndCompile extends Plugin {
*/
async resolve (contractAddress, codeAtAddress, targetPath) {
contractAddress = ethutil.toChecksumAddress(contractAddress)
- const compilersartefacts = globalRegistry.get('compilersartefacts').api
- const localCompilation = () => compilersartefacts.get(contractAddress) ? compilersartefacts.get(contractAddress) : compilersartefacts.get('__last') ? compilersartefacts.get('__last') : null
+ const localCompilation = async () => await this.call('compilerArtefacts', 'get', contractAddress) ? await this.call('compilerArtefacts', 'get', contractAddress) : await this.call('compilerArtefacts', 'get', '__last') ? await this.call('compilerArtefacts', 'get', '__last') : null
- const resolved = compilersartefacts.get(contractAddress)
+ const resolved = await this.call('compilerArtefacts', 'get', contractAddress)
if (resolved) return resolved
if (this.unresolvedAddresses.includes(contractAddress)) return localCompilation()
@@ -53,15 +53,15 @@ export default class FetchAndCompile extends Plugin {
if (!this.sourceVerifierNetWork.includes(network.name)) return localCompilation()
// check if the contract if part of the local compilation result
- const compilation = localCompilation()
+ const compilation = await localCompilation()
if (compilation) {
let found = false
compilation.visitContracts((contract) => {
- found = remixLib.util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress)
+ found = util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress)
return found
})
if (found) {
- compilersartefacts.addResolvedContract(contractAddress, compilation)
+ await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compilation)
setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0)
return compilation
}
@@ -118,8 +118,8 @@ export default class FetchAndCompile extends Plugin {
const compData = await compile(
compilationTargets,
settings,
- (url, cb) => this.call('contentImport', 'resolveAndSave', url).then((result) => cb(null, result)).catch((error) => cb(error.message)))
- compilersartefacts.addResolvedContract(contractAddress, compData)
+ async (url, cb) => await this.call('contentImport', 'resolveAndSave', url).then((result) => cb(null, result)).catch((error) => cb(error.message)))
+ await this.call('compilerArtefacts', 'addResolvedContract', contractAddress, compData)
return compData
} catch (e) {
this.unresolvedAddresses.push(contractAddress)
diff --git a/libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.json b/libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.json
new file mode 100644
index 0000000000..42882af48a
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.json",
+ "files": [],
+ "include": [],
+ "references": [
+ {
+ "path": "./tsconfig.lib.json"
+ }
+ ]
+}
diff --git a/libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.lib.json b/libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.lib.json
new file mode 100644
index 0000000000..9c463b51e2
--- /dev/null
+++ b/libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.lib.json
@@ -0,0 +1,12 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "../../../dist/out-tsc",
+ "declaration": true,
+ "rootDir": "./src",
+ "types": ["node"]
+ },
+ "exclude": ["**/*.spec.ts"],
+ "include": ["**/*.ts"]
+}
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/.eslintrc b/libs/remix-core-plugin/offset-line-to-column-converter/.eslintrc
new file mode 100644
index 0000000000..1655d72922
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/.eslintrc
@@ -0,0 +1 @@
+{ "extends": "../../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/README.md b/libs/remix-core-plugin/offset-line-to-column-converter/README.md
new file mode 100644
index 0000000000..17a2dea5c3
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/README.md
@@ -0,0 +1,3 @@
+# offset-line-to-column-converter
+
+This library was generated with [Nx](https://nx.dev).
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/package.json b/libs/remix-core-plugin/offset-line-to-column-converter/package.json
new file mode 100644
index 0000000000..761b79682e
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/package.json
@@ -0,0 +1,11 @@
+{
+ "name": "@remix-core-plugin/offset-line-to-column-converter",
+ "version": "0.0.1",
+ "description": "This library was generated with [Nx](https://nx.dev).",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "Remix Team",
+ "license": "ISC"
+}
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/src/index.ts b/libs/remix-core-plugin/offset-line-to-column-converter/src/index.ts
new file mode 100644
index 0000000000..d2699060ec
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/src/index.ts
@@ -0,0 +1 @@
+export * from './lib/offset-line-to-column-converter'
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/src/lib/offset-line-to-column-converter.ts b/libs/remix-core-plugin/offset-line-to-column-converter/src/lib/offset-line-to-column-converter.ts
new file mode 100644
index 0000000000..57c3f3ed2e
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/src/lib/offset-line-to-column-converter.ts
@@ -0,0 +1,77 @@
+'use strict'
+import { Plugin } from '@remixproject/engine'
+
+import { sourceMappingDecoder } from '@remix-project/remix-debug'
+
+const profile = {
+ name: 'offsetToLineColumnConverter',
+ methods: ['offsetToLineColumn'],
+ events: [],
+ version: '0.0.1'
+}
+
+export class OffsetToLineColumnConverter extends Plugin {
+ lineBreakPositionsByContent: {}
+ sourceMappingDecoder: any
+ constructor () {
+ super(profile)
+ this.lineBreakPositionsByContent = {}
+ this.sourceMappingDecoder = sourceMappingDecoder
+ }
+
+ /**
+ * Convert offset representation with line/column representation.
+ * This is also used to resolve the content:
+ * @arg file is the index of the file in the content sources array and content sources array does have filename as key and not index.
+ * So we use the asts (which references both index and filename) to look up the actual content targeted by the @arg file index.
+ * @param {{start, length}} rawLocation - offset location
+ * @param {number} file - The index where to find the source in the sources parameters
+ * @param {Object.} sources - Map of content sources
+ * @param {Object.} asts - Map of content sources
+ */
+ offsetToLineColumn (rawLocation, file, sources, asts) {
+ if (!this.lineBreakPositionsByContent[file]) {
+ const sourcesArray = Object.keys(sources)
+ if (!asts || (file === 0 && sourcesArray.length === 1)) {
+ // if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12)
+ this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[sourcesArray[0]].content)
+ } else {
+ for (var filename in asts) {
+ const source = asts[filename]
+ if (source.id === file) {
+ this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[filename].content)
+ break
+ }
+ }
+ }
+ }
+ return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
+ }
+
+ /**
+ * Convert offset representation with line/column representation.
+ * @param {{start, length}} rawLocation - offset location
+ * @param {number} file - The index where to find the source in the sources parameters
+ * @param {string} content - source
+ */
+ offsetToLineColumnWithContent (rawLocation, file, content) {
+ this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(content)
+ return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
+ }
+
+ /**
+ * Clear the cache
+ */
+ clear () {
+ this.lineBreakPositionsByContent = {}
+ }
+
+ /**
+ * called by plugin API
+ */
+ activate () {
+ this.on('solidity', 'compilationFinished', () => {
+ this.clear()
+ })
+ }
+}
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.json b/libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.json
new file mode 100644
index 0000000000..42882af48a
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.json",
+ "files": [],
+ "include": [],
+ "references": [
+ {
+ "path": "./tsconfig.lib.json"
+ }
+ ]
+}
diff --git a/libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.lib.json b/libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.lib.json
new file mode 100644
index 0000000000..9c463b51e2
--- /dev/null
+++ b/libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.lib.json
@@ -0,0 +1,12 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "../../../dist/out-tsc",
+ "declaration": true,
+ "rootDir": "./src",
+ "types": ["node"]
+ },
+ "exclude": ["**/*.spec.ts"],
+ "include": ["**/*.ts"]
+}
diff --git a/libs/remix-debug/src/eventManager.ts b/libs/remix-debug/src/eventManager.ts
index 60e83b0a78..f878395ed3 100644
--- a/libs/remix-debug/src/eventManager.ts
+++ b/libs/remix-debug/src/eventManager.ts
@@ -67,7 +67,7 @@ export class EventManager {
}
for (const listener in this.registered[eventName]) {
const l = this.registered[eventName][listener]
- l.func.apply(l.obj === this.anonymous ? {} : l.obj, args)
+ if (l.func) l.func.apply(l.obj === this.anonymous ? {} : l.obj, args)
}
}
}
diff --git a/libs/remix-lib/src/eventManager.ts b/libs/remix-lib/src/eventManager.ts
index 80280e8b27..a67548f899 100644
--- a/libs/remix-lib/src/eventManager.ts
+++ b/libs/remix-lib/src/eventManager.ts
@@ -64,7 +64,7 @@ export class EventManager {
}
for (const listener in this.registered[eventName]) {
const l = this.registered[eventName][listener]
- l.func.apply(l.obj === this.anonymous ? {} : l.obj, args)
+ if (l.func) l.func.apply(l.obj === this.anonymous ? {} : l.obj, args)
}
}
}
diff --git a/libs/remix-solidity/src/compiler/compiler-abstract.ts b/libs/remix-solidity/src/compiler/compiler-abstract.ts
new file mode 100644
index 0000000000..81cd33db28
--- /dev/null
+++ b/libs/remix-solidity/src/compiler/compiler-abstract.ts
@@ -0,0 +1,48 @@
+'use strict'
+import txHelper from './txHelper'
+
+export class CompilerAbstract {
+ languageversion: any
+ data: any
+ source: any
+ constructor (languageversion, data, source) {
+ this.languageversion = languageversion
+ this.data = data
+ this.source = source // source code
+ }
+
+ getContracts () {
+ return this.data.contracts
+ }
+
+ getContract (name) {
+ return txHelper.getContract(name, this.data.contracts)
+ }
+
+ visitContracts (calllback) {
+ return txHelper.visitContracts(this.data.contracts, calllback)
+ }
+
+ getData () {
+ return this.data
+ }
+
+ getAsts () {
+ return this.data.sources // ast
+ }
+
+ getSourceName (fileIndex) {
+ if (this.data && this.data.sources) {
+ return Object.keys(this.data.sources)[fileIndex]
+ } else if (Object.keys(this.source.sources).length === 1) {
+ // if we don't have ast, we return the only one filename present.
+ const sourcesArray = Object.keys(this.source.sources)
+ return sourcesArray[0]
+ }
+ return null
+ }
+
+ getSourceCode () {
+ return this.source
+ }
+}
diff --git a/apps/remix-ide/src/app/compiler/compiler-helpers.js b/libs/remix-solidity/src/compiler/compiler-helpers.ts
similarity index 89%
rename from apps/remix-ide/src/app/compiler/compiler-helpers.js
rename to libs/remix-solidity/src/compiler/compiler-helpers.ts
index db7d5988f3..8a70e6be4f 100644
--- a/apps/remix-ide/src/app/compiler/compiler-helpers.js
+++ b/libs/remix-solidity/src/compiler/compiler-helpers.ts
@@ -1,7 +1,7 @@
'use strict'
import { canUseWorker, urlFromVersion } from './compiler-utils'
-import { Compiler } from '@remix-project/remix-solidity'
-import CompilerAbstract from './compiler-abstract'
+import { CompilerAbstract } from './compiler-abstract'
+import { Compiler } from './compiler'
export const compile = async (compilationTargets, settings, contentResolverCallback) => {
const res = await (() => {
diff --git a/apps/remix-ide/src/app/compiler/compiler-utils.js b/libs/remix-solidity/src/compiler/compiler-utils.ts
similarity index 100%
rename from apps/remix-ide/src/app/compiler/compiler-utils.js
rename to libs/remix-solidity/src/compiler/compiler-utils.ts
diff --git a/libs/remix-solidity/src/index.ts b/libs/remix-solidity/src/index.ts
index cb204a8af6..db63062910 100644
--- a/libs/remix-solidity/src/index.ts
+++ b/libs/remix-solidity/src/index.ts
@@ -1,3 +1,6 @@
export { Compiler } from './compiler/compiler'
+export { compile } from './compiler/compiler-helpers'
export { default as CompilerInput } from './compiler/compiler-input'
+export { CompilerAbstract } from './compiler/compiler-abstract'
export * from './compiler/types'
+export * from './compiler/compiler-utils'
diff --git a/libs/remix-solidity/src/lib/eventManager.ts b/libs/remix-solidity/src/lib/eventManager.ts
index 289b2ec4eb..8282e09b6c 100644
--- a/libs/remix-solidity/src/lib/eventManager.ts
+++ b/libs/remix-solidity/src/lib/eventManager.ts
@@ -62,7 +62,7 @@ export default class EventManager {
}
for (const listener in this.registered[eventName]) {
const l = this.registered[eventName][listener]
- l.func.apply(l.obj === this.anonymous ? {} : l.obj, args)
+ if (l.func) l.func.apply(l.obj === this.anonymous ? {} : l.obj, args)
}
}
}
diff --git a/nx.json b/nx.json
index a63c015d64..dcfee1205d 100644
--- a/nx.json
+++ b/nx.json
@@ -101,6 +101,19 @@
},
"remix-ui-checkbox": {
"tags": []
+ },
+ "compiler-artefacts": {
+ "tags": [],
+ "implicitDependencies": ["remix-lib"]
+ },
+ "compiler-fetch-and-compile": {
+ "tags": []
+ },
+ "compiler-content-imports": {
+ "tags": []
+ },
+ "offset-line-to-column-converter": {
+ "tags": []
}
}
}
diff --git a/package-lock.json b/package-lock.json
index aac4527317..8f326fe235 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -21926,6 +21926,12 @@
"which": "^2.0.2"
},
"dependencies": {
+ "fsevents": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+ "optional": true
+ },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
diff --git a/tsconfig.json b/tsconfig.json
index 75db5bc6ff..88cef54a3f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -40,7 +40,19 @@
"@remix-ui/file-explorer": ["libs/remix-ui/file-explorer/src/index.ts"],
"@remix-ui/workspace": ["libs/remix-ui/workspace/src/index.ts"],
"@remix-ui/static-analyser": ["libs/remix-ui/static-analyser/src/index.ts"],
- "@remix-ui/checkbox": ["libs/remix-ui/checkbox/src/index.ts"]
+ "@remix-ui/checkbox": ["libs/remix-ui/checkbox/src/index.ts"],
+ "@remix-core-plugin/compiler-artefacts": [
+ "libs/remix-core-plugin/compiler-artefacts/src/index.ts"
+ ],
+ "@remix-core-plugin/compiler-fetch-and-compile": [
+ "libs/remix-core-plugin/compiler-fetch-and-compile/src/index.ts"
+ ],
+ "@remix-core-plugin/compiler-content-imports": [
+ "libs/remix-core-plugin/compiler-content-imports/src/index.ts"
+ ],
+ "@remix-core-plugin/offset-line-to-column-converter": [
+ "libs/remix-core-plugin/offset-line-to-column-converter/src/index.ts"
+ ]
}
},
"exclude": ["node_modules", "tmp"]
diff --git a/workspace.json b/workspace.json
index 5d2bf912c0..0f6a4698fe 100644
--- a/workspace.json
+++ b/workspace.json
@@ -760,6 +760,127 @@
}
}
}
+ },
+ "compiler-artefacts": {
+ "root": "libs/remix-core-plugin/compiler-artefacts",
+ "sourceRoot": "libs/remix-core-plugin/compiler-artefacts/src",
+ "projectType": "library",
+ "schematics": {},
+ "architect": {
+ "lint": {
+ "builder": "@nrwl/linter:lint",
+ "options": {
+ "linter": "eslint",
+ "tsConfig": [
+ "libs/remix-core-plugin/compiler-artefacts/tsconfig.lib.json"
+ ],
+ "exclude": [
+ "**/node_modules/**",
+ "!libs/remix-core-plugin/compiler-artefacts/**/*"
+ ]
+ }
+ },
+ "build": {
+ "builder": "@nrwl/node:package",
+ "options": {
+ "outputPath": "dist/libs/core-plugin/compiler-artefacts",
+ "tsConfig": "libs/remix-core-plugin/compiler-artefacts/tsconfig.lib.json",
+ "packageJson": "libs/remix-core-plugin/compiler-artefacts/package.json",
+ "main": "libs/remix-core-plugin/compiler-artefacts/src/index.ts"
+ }
+ }
+ }
+ },
+ "compiler-fetch-and-compile": {
+ "root": "libs/remix-core-plugin/compiler-fetch-and-compile",
+ "sourceRoot": "libs/remix-core-plugin/compiler-fetch-and-compile/src",
+ "projectType": "library",
+ "schematics": {},
+ "architect": {
+ "lint": {
+ "builder": "@nrwl/linter:lint",
+ "options": {
+ "linter": "eslint",
+ "tsConfig": [
+ "libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.lib.json"
+ ],
+ "exclude": [
+ "**/node_modules/**",
+ "!libs/remix-core-plugin/compiler-fetch-and-compile/**/*"
+ ]
+ }
+ },
+ "build": {
+ "builder": "@nrwl/node:package",
+ "options": {
+ "outputPath": "dist/libs/core-plugin/compiler-fetch-and-compile",
+ "tsConfig": "libs/remix-core-plugin/compiler-fetch-and-compile/tsconfig.lib.json",
+ "packageJson": "libs/remix-core-plugin/compiler-fetch-and-compile/package.json",
+ "main": "libs/remix-core-plugin/compiler-fetch-and-compile/src/index.ts"
+ }
+ }
+ }
+ },
+ "compiler-content-imports": {
+ "root": "libs/remix-core-plugin/compiler-content-imports",
+ "sourceRoot": "libs/remix-core-plugin/compiler-content-imports/src",
+ "projectType": "library",
+ "schematics": {},
+ "architect": {
+ "lint": {
+ "builder": "@nrwl/linter:lint",
+ "options": {
+ "linter": "eslint",
+ "tsConfig": [
+ "libs/remix-core-plugin/compiler-content-imports/tsconfig.lib.json"
+ ],
+ "exclude": [
+ "**/node_modules/**",
+ "!libs/remix-core-plugin/compiler-content-imports/**/*"
+ ]
+ }
+ },
+
+ "build": {
+ "builder": "@nrwl/node:package",
+ "options": {
+ "outputPath": "dist/libs/core-plugin/compiler-content-imports",
+ "tsConfig": "libs/remix-core-plugin/compiler-content-imports/tsconfig.lib.json",
+ "packageJson": "libs/remix-core-plugin/compiler-content-imports/package.json",
+ "main": "libs/remix-core-plugin/compiler-content-imports/src/index.ts"
+ }
+ }
+ }
+ },
+ "offset-line-to-column-converter": {
+ "root": "libs/remix-core-plugin/offset-line-to-column-converter",
+ "sourceRoot": "libs/remix-core-plugin/offset-line-to-column-converter/src",
+ "projectType": "library",
+ "schematics": {},
+ "architect": {
+ "lint": {
+ "builder": "@nrwl/linter:lint",
+ "options": {
+ "linter": "eslint",
+ "tsConfig": [
+ "libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.lib.json"
+ ],
+ "exclude": [
+ "**/node_modules/**",
+ "!libs/remix-core-plugin/offset-line-to-column-converter/**/*"
+ ]
+ }
+ },
+ "build": {
+ "builder": "@nrwl/node:package",
+ "options": {
+ "outputPath": "dist/libs/core-plugin/offset-line-to-column-converter",
+ "tsConfig": "libs/remix-core-plugin/offset-line-to-column-converter/tsconfig.lib.json",
+ "packageJson": "libs/remix-core-plugin/offset-line-to-column-converter/package.json",
+ "main": "libs/remix-core-plugin/coffset-line-to-column-converter/src/index.ts"
+ }
+ }
+ }
}
},
"cli": {