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
014e481f
Commit
014e481f
authored
Aug 20, 2021
by
davidzagi93@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit b4 revert
parent
9283a1c6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
34 deletions
+27
-34
.env
.env
+0
-5
defaultLayout.test.ts
apps/remix-ide-e2e/src/tests/defaultLayout.test.ts
+0
-1
libraryDeployment.test.ts
apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts
+0
-1
index.ts
libs/remix-ui/terminal/src/index.ts
+1
-1
terminalAction.ts
libs/remix-ui/terminal/src/lib/actions/terminalAction.ts
+17
-8
terminalReducer.ts
libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
+2
-5
remix-ui-terminal.tsx
libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
+7
-13
No files found.
.env
deleted
100644 → 0
View file @
9283a1c6
gist_token=<token>
account_passphrase=<passphrase>
account_password=<password>
NODE_OPTIONS=--max-old-space-size=2048
\ No newline at end of file
apps/remix-ide-e2e/src/tests/defaultLayout.test.ts
View file @
014e481f
...
@@ -50,7 +50,6 @@ module.exports = {
...
@@ -50,7 +50,6 @@ module.exports = {
'Toggles Terminal'
:
function
(
browser
:
NightwatchBrowser
)
{
'Toggles Terminal'
:
function
(
browser
:
NightwatchBrowser
)
{
browser
.
waitForElementVisible
(
'div[data-id="terminalContainer"]'
)
browser
.
waitForElementVisible
(
'div[data-id="terminalContainer"]'
)
.
pause
(
5000
)
.
assert
.
visible
(
'div[data-id="terminalContainerDisplay"]'
)
.
assert
.
visible
(
'div[data-id="terminalContainerDisplay"]'
)
.
click
(
'i[data-id="terminalToggleIcon"]'
)
.
click
(
'i[data-id="terminalToggleIcon"]'
)
.
checkElementStyle
(
'div[data-id="terminalToggleMenu"]'
,
'height'
,
'35px'
)
.
checkElementStyle
(
'div[data-id="terminalToggleMenu"]'
,
'height'
,
'35px'
)
...
...
apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts
View file @
014e481f
...
@@ -77,7 +77,6 @@ function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFuncti
...
@@ -77,7 +77,6 @@ function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFuncti
.
clickLaunchIcon
(
'udapp'
)
.
clickLaunchIcon
(
'udapp'
)
.
selectContract
(
'test'
)
// deploy lib
.
selectContract
(
'test'
)
// deploy lib
.
createContract
(
''
)
.
createContract
(
''
)
.
pause
(
60000
)
.
getText
(
'div[class^="terminal"]'
,
(
value
)
=>
{
.
getText
(
'div[class^="terminal"]'
,
(
value
)
=>
{
console
.
log
(
'value: '
,
value
)
console
.
log
(
'value: '
,
value
)
})
})
...
...
libs/remix-ui/terminal/src/index.ts
View file @
014e481f
export
*
from
'./lib/remix-ui-terminal'
;
export
*
from
'./lib/remix-ui-terminal'
libs/remix-ui/terminal/src/lib/actions/terminalAction.ts
View file @
014e481f
export
const
registerCommandAction
=
(
name
,
command
,
activate
,
dispatch
)
=>
{
export
const
registerCommandAction
=
(
name
,
command
,
activate
,
dispatch
)
=>
{
console
.
log
(
name
,
' object key'
)
const
commands
:
any
=
{}
const
commands
:
any
=
{}
const
_commands
:
any
=
{}
const
_commands
:
any
=
{}
_commands
[
name
]
=
command
_commands
[
name
]
=
command
...
@@ -91,8 +90,6 @@ export const registerCommandAction = (name, command, activate, dispatch) => {
...
@@ -91,8 +90,6 @@ export const registerCommandAction = (name, command, activate, dispatch) => {
console
.
log
({
scopedCommands
})
console
.
log
({
scopedCommands
})
return
scopedCommands
return
scopedCommands
}
}
console
.
log
(
'david test dispatch'
)
}
}
export
const
filterFnAction
=
(
name
,
filterFn
,
dispatch
)
=>
{
export
const
filterFnAction
=
(
name
,
filterFn
,
dispatch
)
=>
{
...
@@ -173,8 +170,23 @@ export const initListeningOnNetwork = (props, dispatch) => {
...
@@ -173,8 +170,23 @@ export const initListeningOnNetwork = (props, dispatch) => {
// log(this, tx, null)
// log(this, tx, null)
})
})
props
.
txListener
.
event
.
register
(
'newTransaction'
,
(
tx
,
receipt
)
=>
{
props
.
txListener
.
event
.
register
(
'newTransaction'
,
(
tx
,
receipt
)
=>
{
console
.
log
(
'new Transaction now'
)
log
(
props
,
tx
,
receipt
,
dispatch
)
log
(
props
,
tx
,
receipt
,
dispatch
)
registerCommandAction
(
'knownTransaction'
,
function
(
args
,
cmds
,
append
)
{
var
data
=
args
[
0
]
console
.
log
({
data
})
// let el
// if (data.tx.isCall) {
// console.log({ data })
// // el = renderCall(this, data)
// } else {
// // el = renderKnownTransaction(this, data, blockchain)
// }
// this.seen[data.tx.hash] = el
// append(el)
},
{
activate
:
true
},
dispatch
)
// const result = Object.assign([], tx)
// console.log({ result })
// scriptRunnerDispatch({ type: 'knownTransaction', payload: { message: result } })
})
})
const
log
=
async
(
props
,
tx
,
receipt
,
dispatch
)
=>
{
const
log
=
async
(
props
,
tx
,
receipt
,
dispatch
)
=>
{
...
@@ -202,12 +214,9 @@ export const initListeningOnNetwork = (props, dispatch) => {
...
@@ -202,12 +214,9 @@ export const initListeningOnNetwork = (props, dispatch) => {
props
.
txListener
.
event
.
register
(
'debuggingRequested'
,
async
(
hash
)
=>
{
props
.
txListener
.
event
.
register
(
'debuggingRequested'
,
async
(
hash
)
=>
{
// TODO should probably be in the run module
// TODO should probably be in the run module
console
.
log
({
hash
},
'register Call'
)
if
(
!
await
props
.
options
.
appManager
.
isActive
(
'debugger'
))
await
props
.
options
.
appManager
.
activatePlugin
(
'debugger'
)
if
(
!
await
props
.
options
.
appManager
.
isActive
(
'debugger'
))
await
props
.
options
.
appManager
.
activatePlugin
(
'debugger'
)
props
.
thisState
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
props
.
thisState
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
props
.
thisState
.
call
(
'debugger'
,
'debug'
,
hash
)
props
.
thisState
.
call
(
'debugger'
,
'debug'
,
hash
)
})
})
props
.
thisState
.
on
(
'udapp'
,
'logHtml'
,
(
log
)
=>
{
console
.
log
({
log
},
' listen to logHTML call'
)
})
}
}
libs/remix-ui/terminal/src/lib/reducers/terminalReducer.ts
View file @
014e481f
...
@@ -141,12 +141,9 @@ export const remixWelcomeTextReducer = (state, action) => {
...
@@ -141,12 +141,9 @@ export const remixWelcomeTextReducer = (state, action) => {
}
}
export
const
registerScriptRunnerReducer
=
(
state
,
action
)
=>
{
export
const
registerScriptRunnerReducer
=
(
state
,
action
)
=>
{
const
result
=
Object
.
assign
([],
action
.
payload
.
message
)
console
.
log
({
result
})
switch
(
action
.
type
)
{
switch
(
action
.
type
)
{
case
'html'
:
return
{
...
state
,
journalBlocks
:
initialState
.
journalBlocks
.
push
({
message
:
action
.
payload
.
message
,
style
:
'text-log'
})
}
case
'log'
:
case
'log'
:
return
{
return
{
...
state
,
...
state
,
...
...
libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
View file @
014e481f
...
@@ -43,8 +43,7 @@ export interface RemixUiTerminalProps {
...
@@ -43,8 +43,7 @@ export interface RemixUiTerminalProps {
registry
:
any
,
registry
:
any
,
commands
:
any
,
commands
:
any
,
txListener
:
any
,
txListener
:
any
,
eventsDecoder
:
any
,
eventsDecoder
:
any
logHtml
:
any
}
}
export
interface
ClipboardEvent
<
T
=
Element
>
extends
SyntheticEvent
<
T
,
any
>
{
export
interface
ClipboardEvent
<
T
=
Element
>
extends
SyntheticEvent
<
T
,
any
>
{
...
@@ -102,11 +101,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
...
@@ -102,11 +101,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
messagesEndRef
.
current
.
scrollIntoView
({
behavior
:
'smooth'
})
messagesEndRef
.
current
.
scrollIntoView
({
behavior
:
'smooth'
})
}
}
useEffect
(()
=>
{
scriptRunnerDispatch
({
type
:
'html'
,
payload
:
{
message
:
props
.
logHtml
}
})
},
[
props
.
logHtml
])
console
.
log
({
logHtml
:
props
.
logHtml
})
// events
// events
useEffect
(()
=>
{
useEffect
(()
=>
{
initListeningOnNetwork
(
props
,
scriptRunnerDispatch
)
initListeningOnNetwork
(
props
,
scriptRunnerDispatch
)
...
@@ -114,6 +108,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
...
@@ -114,6 +108,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
registerInfoScriptRunnerAction
(
props
.
thisState
,
'info'
,
newstate
.
commands
,
scriptRunnerDispatch
)
registerInfoScriptRunnerAction
(
props
.
thisState
,
'info'
,
newstate
.
commands
,
scriptRunnerDispatch
)
registerWarnScriptRunnerAction
(
props
.
thisState
,
'warn'
,
newstate
.
commands
,
scriptRunnerDispatch
)
registerWarnScriptRunnerAction
(
props
.
thisState
,
'warn'
,
newstate
.
commands
,
scriptRunnerDispatch
)
registerErrorScriptRunnerAction
(
props
.
thisState
,
'error'
,
newstate
.
commands
,
scriptRunnerDispatch
)
registerErrorScriptRunnerAction
(
props
.
thisState
,
'error'
,
newstate
.
commands
,
scriptRunnerDispatch
)
registerCommandAction
(
'html'
,
_blocksRenderer
(
'html'
),
{
activate
:
true
},
dispatch
)
registerCommandAction
(
'html'
,
_blocksRenderer
(
'html'
),
{
activate
:
true
},
dispatch
)
registerCommandAction
(
'log'
,
_blocksRenderer
(
'log'
),
{
activate
:
true
},
dispatch
)
registerCommandAction
(
'log'
,
_blocksRenderer
(
'log'
),
{
activate
:
true
},
dispatch
)
registerCommandAction
(
'info'
,
_blocksRenderer
(
'info'
),
{
activate
:
true
},
dispatch
)
registerCommandAction
(
'info'
,
_blocksRenderer
(
'info'
),
{
activate
:
true
},
dispatch
)
...
@@ -122,13 +117,12 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
...
@@ -122,13 +117,12 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
registerCommandAction
(
'script'
,
function
execute
(
args
,
scopedCommands
,
append
)
{
registerCommandAction
(
'script'
,
function
execute
(
args
,
scopedCommands
,
append
)
{
var
script
=
String
(
args
[
0
])
var
script
=
String
(
args
[
0
])
console
.
log
({
script
},
'script'
)
_shell
(
script
,
scopedCommands
,
function
(
error
,
output
)
{
_shell
(
script
,
scopedCommands
,
function
(
error
,
output
)
{
if
(
error
)
scriptRunnerDispatch
({
type
:
'error'
,
payload
:
{
message
:
error
}
})
if
(
error
)
scriptRunnerDispatch
({
type
:
'error'
,
payload
:
{
message
:
error
}
})
if
(
output
)
scriptRunnerDispatch
({
type
:
'script'
,
payload
:
{
message
:
'5'
}
})
if
(
output
)
scriptRunnerDispatch
({
type
:
'script'
,
payload
:
{
message
:
'5'
}
})
})
})
},
{
activate
:
true
},
dispatch
)
},
{
activate
:
true
},
dispatch
)
},
[
props
.
thisState
.
autoCompletePopup
,
autoCompletState
.
text
,
props
.
logHtml
])
},
[
props
.
thisState
.
autoCompletePopup
,
autoCompletState
.
text
])
useEffect
(()
=>
{
useEffect
(()
=>
{
scrollToBottom
()
scrollToBottom
()
...
@@ -1435,15 +1429,15 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
...
@@ -1435,15 +1429,15 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
{
{
handleAutoComplete
()
handleAutoComplete
()
}
}
<
div
data
-
id=
'terminalContainerDisplay'
style
=
{{
<
div
data
-
id=
"terminalContainerDisplay"
style
=
{{
position
:
'
absolute
',
position
:
'
absolute
',
height
:
'100
%
',
height
:
'100',
width
:
'100
%
',
width
:
'100',
opacity
:
'0
.
1',
opacity
:
'0
.
1',
zIndex
:
-1
zIndex
:
-1
}}
></
div
>
}}
></
div
>
<
div
className=
"terminal"
>
<
div
className=
"terminal"
>
<
div
id=
'journal'
className=
'journal'
data
-
id=
'terminalJournal'
>
<
div
id=
"journal"
className=
"journal"
data
-
id=
"terminalJournal"
>
{
!
clearConsole
&&
<
TerminalWelcomeMessage
packageJson=
{
props
.
version
}
/>
}
{
!
clearConsole
&&
<
TerminalWelcomeMessage
packageJson=
{
props
.
version
}
/>
}
{
newstate
.
journalBlocks
&&
newstate
.
journalBlocks
.
map
((
x
,
index
)
=>
{
{
newstate
.
journalBlocks
&&
newstate
.
journalBlocks
.
map
((
x
,
index
)
=>
{
if
(
x
.
name
===
'emptyBlock'
)
{
if
(
x
.
name
===
'emptyBlock'
)
{
...
...
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