Merge branch 'master' into warp-0.2
This commit is contained in:
commit
272ac972e8
|
@ -15,6 +15,7 @@ build:release: &build
|
||||||
script:
|
script:
|
||||||
- &init rustc --version && cargo --version
|
- &init rustc --version && cargo --version
|
||||||
- cargo build --release --verbose
|
- cargo build --release --verbose
|
||||||
|
- &clean_cargo cargo install cargo-cache --git https://github.com/matthiaskrgr/cargo-cache --no-default-features --features ci-autoclean && cargo-cache
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- languages.json
|
- languages.json
|
||||||
|
@ -30,6 +31,8 @@ test:stable: &test
|
||||||
stage: test
|
stage: test
|
||||||
services:
|
services:
|
||||||
- postgres
|
- postgres
|
||||||
|
- name: registry.gitlab.com/pastebin.run/sandbox/master
|
||||||
|
alias: sandbox
|
||||||
variables:
|
variables:
|
||||||
POSTGRES_DB: db
|
POSTGRES_DB: db
|
||||||
POSTGRES_USER: user
|
POSTGRES_USER: user
|
||||||
|
@ -37,7 +40,8 @@ test:stable: &test
|
||||||
image: rust:latest
|
image: rust:latest
|
||||||
script:
|
script:
|
||||||
- *init
|
- *init
|
||||||
- DATABASE_URL=postgresql://user:password@postgres/db cargo test --verbose --features=database_tests
|
- DATABASE_URL=postgresql://user:password@postgres/db SANDBOX_URL=http://sandbox:8888 cargo test --verbose --features=database_tests,sandbox_tests
|
||||||
|
- *clean_cargo
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_JOB_NAME}
|
key: ${CI_JOB_NAME}
|
||||||
paths:
|
paths:
|
||||||
|
|
|
@ -42,7 +42,7 @@ const languageMap = {
|
||||||
plaintext: null,
|
plaintext: null,
|
||||||
postgresql: 'sql',
|
postgresql: 'sql',
|
||||||
python2: 'python',
|
python2: 'python',
|
||||||
python3: 'python',
|
python: 'python',
|
||||||
raku: null,
|
raku: null,
|
||||||
rust: 'rust',
|
rust: 'rust',
|
||||||
sh: 'shell',
|
sh: 'shell',
|
||||||
|
|
|
@ -100,6 +100,8 @@ class Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
changeToLookLikeNewPaste() {
|
changeToLookLikeNewPaste() {
|
||||||
|
this.output.clear()
|
||||||
|
this.editor.update()
|
||||||
if (this.autodeleteText) {
|
if (this.autodeleteText) {
|
||||||
this.autodeleteText.style.display = 'none'
|
this.autodeleteText.style.display = 'none'
|
||||||
}
|
}
|
||||||
|
@ -141,7 +143,7 @@ class Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(wrapper, compilerOptions) {
|
async run(wrapper, compilerOptions) {
|
||||||
this.output.clear()
|
this.output.spin()
|
||||||
this.editor.update()
|
this.editor.update()
|
||||||
if (this.abortEval) {
|
if (this.abortEval) {
|
||||||
this.abortEval.abort()
|
this.abortEval.abort()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import './spinner.css'
|
||||||
import { Wrapper } from './types'
|
import { Wrapper } from './types'
|
||||||
import { SplitChunksPlugin } from 'webpack'
|
|
||||||
|
|
||||||
const filterRegex = /(?:\t\.(?:text|file|section|globl|p2align|type|cfi_.*|size|section)\b|.Lfunc_end).*\n?/g
|
const filterRegex = /(?:\t\.(?:text|file|section|globl|p2align|type|cfi_.*|size|section)\b|.Lfunc_end).*\n?/g
|
||||||
|
|
||||||
|
@ -46,6 +46,14 @@ export default class Output {
|
||||||
this.update()
|
this.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spin() {
|
||||||
|
this.output.textContent = ''
|
||||||
|
const spinner = document.createElement('div')
|
||||||
|
spinner.className = 'spinner'
|
||||||
|
this.output.append(spinner)
|
||||||
|
this.split.append(this.outputContainer)
|
||||||
|
}
|
||||||
|
|
||||||
update() {
|
update() {
|
||||||
const { stdout, stderr, status } = this.json
|
const { stdout, stderr, status } = this.json
|
||||||
this.clear()
|
this.clear()
|
||||||
|
|
18
js/views/editor/spinner.css
Normal file
18
js/views/editor/spinner.css
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
@keyframes spinner {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.spinner {
|
||||||
|
animation: 1s linear infinite spinner;
|
||||||
|
border: solid 3px #f5f2f0;
|
||||||
|
border-bottom-color: #c7c75c;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
|
@ -73,7 +73,7 @@
|
||||||
{
|
{
|
||||||
"identifier": "netcore",
|
"identifier": "netcore",
|
||||||
"label": "Run",
|
"label": "Run",
|
||||||
"code": "dotnet new console &>/dev/null; mv code Program.cs; dotnet run %s"
|
"code": "ln -fst . /opt/microsoft/home/csharp/bin/Debug/netcoreapp*/*; dotnet /usr/lib64/dotnet/sdk/*/Roslyn/bincore/csc.dll %s code @/opt/microsoft/home/csharp/csopts.txt >&2; dotnet project.dll"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"codemirror": "^5.49.2",
|
"codemirror": "^5.49.2",
|
||||||
"css-loader": "^3.3.0",
|
"css-loader": "^3.3.0",
|
||||||
"monaco-editor": "^0.18.1",
|
"monaco-editor": "^0.18.1",
|
||||||
"monaco-editor-webpack-plugin": "^1.7.0",
|
"monaco-editor-webpack-plugin": "1.7.0",
|
||||||
"prismjs": "^1.17.1",
|
"prismjs": "^1.17.1",
|
||||||
"style-loader": "^1.0.1",
|
"style-loader": "^1.0.1",
|
||||||
"ts-loader": "^6.2.1",
|
"ts-loader": "^6.2.1",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user