Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
cc5378ba
Commit
cc5378ba
authored
Aug 24, 2021
by
yann300
Committed by
Aniket
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting
parent
91932c2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
19 deletions
+18
-19
remixd.test.ts
apps/remix-ide-e2e/src/tests/remixd.test.ts
+11
-12
fileManager.js
apps/remix-ide/src/app/files/fileManager.js
+6
-6
fileProvider.js
apps/remix-ide/src/app/files/fileProvider.js
+1
-1
No files found.
apps/remix-ide-e2e/src/tests/remixd.test.ts
View file @
cc5378ba
...
...
@@ -79,19 +79,18 @@ module.exports = {
.
testContracts
(
'test_import_node_modules_with_github_import.sol'
,
sources
[
4
][
'test_import_node_modules_with_github_import.sol'
],
[
'ERC20'
,
'test11'
])
},
'Static Analysis run with remixd'
:
function
(
browser
)
{
browser
.
testContracts
(
'
Untitled.sol'
,
sources
[
5
][
'test_static_analysis_with_remixd_and_hardhat
'
],
[
'test5'
])
.
clickLaunchIcon
(
'solidityStaticAnalysis'
)
.
click
(
'#staticanalysisButton button'
)
.
waitForElementPresent
(
'#staticanalysisresult .warning'
,
2000
,
true
,
function
()
{
browser
.
click
(
'[data-id="staticAnalysisModuleMiscellaneous1"'
)
.
click
(
'[data-id="staticAnalysisModuleMiscellaneous1"'
)
.
getEditorValue
((
content
)
=>
{
browser
.
assert
.
ok
(
content
.
indexOf
(
'function _sendLogPayload(bytes memory payload) private view {'
)
!==
-
1
,
'code has not been loaded'
)
browser
.
testContracts
(
'
test_static_analysis_with_remixd_and_hardhat.sol'
,
sources
[
5
][
'test_static_analysis_with_remixd_and_hardhat.sol
'
],
[
'test5'
])
.
clickLaunchIcon
(
'solidityStaticAnalysis'
)
.
click
(
'#staticanalysisButton button'
)
.
waitForElementPresent
(
'#staticanalysisresult .warning'
,
2000
,
true
,
function
()
{
browser
.
click
(
'[data-id="staticAnalysisModuleMiscellaneous1"'
)
.
getEditorValue
((
content
)
=>
{
browser
.
assert
.
ok
(
content
.
indexOf
(
'function _sendLogPayload(bytes memory payload) private view {'
)
!==
-
1
,
'code has not been loaded'
)
}
)
})
})
},
'Run git status'
:
''
+
function
(
browser
)
{
...
...
apps/remix-ide/src/app/files/fileManager.js
View file @
cc5378ba
...
...
@@ -545,29 +545,29 @@ class FileManager extends Plugin {
/**
* Try to resolve the given file path (the actual path in the file system)
* e.g if it's specified a github link, npm library, or any external content,
* e.g if it's specified a github link, npm library, or any external content,
* it returns the actual path where the content can be found.
* @param {string} file url we are trying to resolve
* @returns {{ string, provider }} file path resolved and its provider.
*/
getPathFromUrl
(
file
)
{
getPathFromUrl
(
file
)
{
const
provider
=
this
.
fileProviderOf
(
file
)
if
(
!
provider
)
throw
new
Error
(
`no provider for
${
file
}
`
)
return
{
return
{
file
:
provider
.
getPathFromUrl
(
file
)
||
file
,
// in case an external URL is given as input, we resolve it to the right internal path
provider
}
}
/**
* Try to resolve the given file URl. opposite of getPathFromUrl
*
* Try to resolve the given file URl. opposite of getPathFromUrl
* @param {string} file path we are trying to resolve
* @returns {{ string, provider }} file url resolved and its provider.
*/
getUrlFromPath
(
file
)
{
getUrlFromPath
(
file
)
{
const
provider
=
this
.
fileProviderOf
(
file
)
if
(
!
provider
)
throw
new
Error
(
`no provider for
${
file
}
`
)
return
{
return
{
file
:
provider
.
getUrlFromPath
(
file
)
||
file
,
// in case an external URL is given as input, we resolve it to the right internal path
provider
}
...
...
apps/remix-ide/src/app/files/fileProvider.js
View file @
cc5378ba
...
...
@@ -40,7 +40,7 @@ class FileProvider {
}
getUrlFromPath
(
path
)
{
if
(
!
path
.
startsWith
(
this
.
type
))
path
=
this
.
type
+
'/'
+
path
if
(
!
path
.
startsWith
(
this
.
type
))
path
=
this
.
type
+
'/'
+
path
return
this
.
providerExternalsStorage
.
get
(
path
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment