Skip to content

Commit

Permalink
Merge branch 'release/v2.0.0-beta.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzoh committed Mar 20, 2019
2 parents db7f0d1 + 315cf0d commit c74fa67
Show file tree
Hide file tree
Showing 31 changed files with 44 additions and 173 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
> Livecoding is a desktop appliaction where newbies can learn the basics of programmation.
> The principle is simple : You write commands in the in-app editor, press send, and the commands will interact the a little game (like pacman).
## Changelog - v2.0.0-beta.9
## Changelog - v2.0.0-beta.10

*This version is unstable - do not use in production !*

**Client :**
- Game menu now in a dedicated modal.
- The editor noe auto resize when you resize the browser window.
- On little screens a burger menu regroups the right navbar menus.
- Manifest validator now uses the proxy language list to check the available languages.
- The gameManager now injects the console in the game constructor for easy logging.

**Processor :**
- Fix processor crash with commands return params.
- Now support process interuption via `PROCESS_ENDED_BY_USER` code.
- Fix command errors with first command execution.
- Fix string parsing error in php engine.

**Pokedash game :**
The legacy game shipped with livecoding is deprecated, the new default game are developped in his dedicated repo : [LiveCoding-Pokedash-Game](https://github.com/CPNV-ES/LiveCoding-Pokedash-Game).
Expand Down
4 changes: 2 additions & 2 deletions client/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width;initial-scale=1;maximum-scale=1;user-scalable=0;"><link rel=stylesheet href=https://use.fontawesome.com/releases/v5.2.0/css/all.css><link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono:400,400i" rel=stylesheet><title>LiveCoding</title><style>.loader-container {
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel=stylesheet href=https://use.fontawesome.com/releases/v5.2.0/css/all.css><link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono:400,400i" rel=stylesheet><title>LiveCoding</title><style>.loader-container {
margin-top: 30vh;
display: flex;
align-items: center;
Expand Down Expand Up @@ -58,4 +58,4 @@
100% {
transform: translate(19px, 0);
}
}</style><link href=/LiveCoding/js/chunk-2d0a3577.7be23f74.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0a43df.826105cb.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0aa90c.e5cb9965.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0aab07.3d11ad3a.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0abc00.7f283706.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0ae937.6d80902d.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0aeb45.77bb6e1c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0afa49.f6cafe9c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0b2762.3eb80639.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0b6187.60705860.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0ba136.c2ab0fe0.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0bb267.176df850.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0bcec1.d9d4b342.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0bff92.62de0f0e.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c0494.0065452a.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c0a09.1c8b5da4.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c1ed0.28a2f58c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c4313.83748bfa.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c46d1.7b37816c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c512b.137359a7.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0cf16e.1f7d624c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d056d.1321372c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d0645.1ff67e1e.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d2f22.2d46f17b.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d7e63.2f7df359.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e1b57.eff1735d.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e1fbe.4c524960.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e22d6.16f4c93f.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e542a.ae492a0f.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e57ec.f2de30d6.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e6553.5aac81b6.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e6c86.608e1c8b.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0ea098.ce4a8b4a.js rel=prefetch><link href=/LiveCoding/js/chunk-2d208ac5.083909ee.js rel=prefetch><link href=/LiveCoding/js/chunk-2d209408.5bba37e8.js rel=prefetch><link href=/LiveCoding/js/chunk-2d20f745.fa607cb3.js rel=prefetch><link href=/LiveCoding/js/chunk-2d20ff23.5849963d.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2138c7.742b81c2.js rel=prefetch><link href=/LiveCoding/js/chunk-2d216f3b.537dc933.js rel=prefetch><link href=/LiveCoding/js/chunk-2d217e5b.1892e718.js rel=prefetch><link href=/LiveCoding/js/chunk-2d21b84a.c881a93c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d21dcd2.1ac39739.js rel=prefetch><link href=/LiveCoding/js/chunk-2d21f327.4b78d9de.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2214b3.195e3c76.js rel=prefetch><link href=/LiveCoding/js/chunk-2d221814.2034f211.js rel=prefetch><link href=/LiveCoding/js/chunk-2d221a34.2a8a8654.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22502a.8ec4a8af.js rel=prefetch><link href=/LiveCoding/js/chunk-2d228ca6.78c56d3c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2295e9.f915af09.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22c171.8bf26ffe.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22c2b8.0af9d737.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22ca58.5a15fef4.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2311f7.dc1ba2eb.js rel=prefetch><link href=/LiveCoding/js/chunk-2d237ee7.bb0b1217.js rel=prefetch><link href=/LiveCoding/js/chunk-2d238465.d9d37e4c.js rel=prefetch><link href=/LiveCoding/js/chunk-7532b3ea.39a25a8d.js rel=prefetch><link href=/LiveCoding/js/chunk-774ac664.db105340.js rel=prefetch><link href=/LiveCoding/css/app.b2d20be3.css rel=preload as=style><link href=/LiveCoding/css/chunk-vendors.2c9fa0f8.css rel=preload as=style><link href=/LiveCoding/js/app.8bc24cf5.js rel=preload as=script><link href=/LiveCoding/js/chunk-vendors.2f51b49a.js rel=preload as=script><link href=/LiveCoding/css/chunk-vendors.2c9fa0f8.css rel=stylesheet><link href=/LiveCoding/css/app.b2d20be3.css rel=stylesheet><link rel=icon type=image/png sizes=32x32 href=/LiveCoding/img/icons/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=/LiveCoding/img/icons/favicon-16x16.png><link rel=manifest href=/LiveCoding/manifest.json><meta name=theme-color content=#4DBA87><meta name=apple-mobile-web-app-capable content=no><meta name=apple-mobile-web-app-status-bar-style content=default><meta name=apple-mobile-web-app-title content=livecoding><link rel=apple-touch-icon href=/LiveCoding/img/icons/apple-touch-icon-152x152.png><link rel=mask-icon href=/LiveCoding/img/icons/safari-pinned-tab.svg color=#4DBA87><meta name=msapplication-TileImage content=/LiveCoding/img/icons/msapplication-icon-144x144.png><meta name=msapplication-TileColor content=#000000></head><body><div id=app><div class=loader-container><div class=points-loader><div></div><div></div><div></div><div></div></div></div></div><script src=/LiveCoding/js/chunk-vendors.2f51b49a.js></script><script src=/LiveCoding/js/app.8bc24cf5.js></script></body></html>
}</style><link href=/LiveCoding/js/chunk-2d0a3577.7be23f74.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0a43df.826105cb.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0aa90c.e5cb9965.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0aab07.3d11ad3a.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0abc00.7f283706.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0ae937.6d80902d.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0aeb45.77bb6e1c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0afa49.f6cafe9c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0b2762.3eb80639.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0b6187.60705860.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0ba136.c2ab0fe0.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0bb267.176df850.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0bcec1.d9d4b342.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0bff92.62de0f0e.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c0494.0065452a.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c0a09.1c8b5da4.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c1ed0.28a2f58c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c4313.83748bfa.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c46d1.7b37816c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0c512b.137359a7.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0cf16e.1f7d624c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d056d.1321372c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d0645.1ff67e1e.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d2f22.2d46f17b.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0d7e63.2f7df359.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e1b57.eff1735d.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e1fbe.4c524960.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e22d6.16f4c93f.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e542a.ae492a0f.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e57ec.f2de30d6.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e6553.5aac81b6.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0e6c86.608e1c8b.js rel=prefetch><link href=/LiveCoding/js/chunk-2d0ea098.ce4a8b4a.js rel=prefetch><link href=/LiveCoding/js/chunk-2d208ac5.083909ee.js rel=prefetch><link href=/LiveCoding/js/chunk-2d209408.5bba37e8.js rel=prefetch><link href=/LiveCoding/js/chunk-2d20f745.fa607cb3.js rel=prefetch><link href=/LiveCoding/js/chunk-2d20ff23.5849963d.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2138c7.742b81c2.js rel=prefetch><link href=/LiveCoding/js/chunk-2d216f3b.537dc933.js rel=prefetch><link href=/LiveCoding/js/chunk-2d217e5b.1892e718.js rel=prefetch><link href=/LiveCoding/js/chunk-2d21b84a.c881a93c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d21dcd2.1ac39739.js rel=prefetch><link href=/LiveCoding/js/chunk-2d21f327.4b78d9de.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2214b3.195e3c76.js rel=prefetch><link href=/LiveCoding/js/chunk-2d221814.2034f211.js rel=prefetch><link href=/LiveCoding/js/chunk-2d221a34.2a8a8654.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22502a.8ec4a8af.js rel=prefetch><link href=/LiveCoding/js/chunk-2d228ca6.78c56d3c.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2295e9.f915af09.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22c171.8bf26ffe.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22c2b8.0af9d737.js rel=prefetch><link href=/LiveCoding/js/chunk-2d22ca58.5a15fef4.js rel=prefetch><link href=/LiveCoding/js/chunk-2d2311f7.dc1ba2eb.js rel=prefetch><link href=/LiveCoding/js/chunk-2d237ee7.bb0b1217.js rel=prefetch><link href=/LiveCoding/js/chunk-2d238465.d9d37e4c.js rel=prefetch><link href=/LiveCoding/js/chunk-7532b3ea.39a25a8d.js rel=prefetch><link href=/LiveCoding/js/chunk-774ac664.db105340.js rel=prefetch><link href=/LiveCoding/css/app.b2d20be3.css rel=preload as=style><link href=/LiveCoding/css/chunk-vendors.2c9fa0f8.css rel=preload as=style><link href=/LiveCoding/js/app.1c2417ff.js rel=preload as=script><link href=/LiveCoding/js/chunk-vendors.004e6330.js rel=preload as=script><link href=/LiveCoding/css/chunk-vendors.2c9fa0f8.css rel=stylesheet><link href=/LiveCoding/css/app.b2d20be3.css rel=stylesheet><link rel=icon type=image/png sizes=32x32 href=/LiveCoding/img/icons/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=/LiveCoding/img/icons/favicon-16x16.png><link rel=manifest href=/LiveCoding/manifest.json><meta name=theme-color content=#4DBA87><meta name=apple-mobile-web-app-capable content=no><meta name=apple-mobile-web-app-status-bar-style content=default><meta name=apple-mobile-web-app-title content=livecoding><link rel=apple-touch-icon href=/LiveCoding/img/icons/apple-touch-icon-152x152.png><link rel=mask-icon href=/LiveCoding/img/icons/safari-pinned-tab.svg color=#4DBA87><meta name=msapplication-TileImage content=/LiveCoding/img/icons/msapplication-icon-144x144.png><meta name=msapplication-TileColor content=#000000></head><body><div id=app><div class=loader-container><div class=points-loader><div></div><div></div><div></div><div></div></div></div></div><script src=/LiveCoding/js/chunk-vendors.004e6330.js></script><script src=/LiveCoding/js/app.1c2417ff.js></script></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
self.__precacheManifest = [
{
"revision": "28f70cad6414e555a897",
"revision": "d59aa6a096da252850f1",
"url": "/LiveCoding/css/app.b2d20be3.css"
},
{
"revision": "28f70cad6414e555a897",
"url": "/LiveCoding/js/app.8bc24cf5.js"
"revision": "d59aa6a096da252850f1",
"url": "/LiveCoding/js/app.1c2417ff.js"
},
{
"revision": "584ffc7cd02d5b743335",
Expand Down Expand Up @@ -236,12 +236,12 @@ self.__precacheManifest = [
"url": "/LiveCoding/js/chunk-774ac664.db105340.js"
},
{
"revision": "1b0b59702788da9637ab",
"revision": "294cca23548d0c415eff",
"url": "/LiveCoding/css/chunk-vendors.2c9fa0f8.css"
},
{
"revision": "1b0b59702788da9637ab",
"url": "/LiveCoding/js/chunk-vendors.2f51b49a.js"
"revision": "294cca23548d0c415eff",
"url": "/LiveCoding/js/chunk-vendors.004e6330.js"
},
{
"revision": "679bf55259d721f8f65649d4535d23e4",
Expand All @@ -260,7 +260,7 @@ self.__precacheManifest = [
"url": "/LiveCoding/typescript.worker.js"
},
{
"revision": "c63497b60e126f786c3d1aa82d668a3d",
"revision": "b6794925de3356d5afb469400332b96e",
"url": "/LiveCoding/index.html"
},
{
Expand Down
2 changes: 1 addition & 1 deletion client/dist/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");

importScripts(
"/LiveCoding/precache-manifest.6cef750533a071b30b6a7acf0fb5c3d9.js"
"/LiveCoding/precache-manifest.715c4f1c524498d52eae93fa9b05ef41.js"
);

workbox.core.setCacheNameDetails({prefix: "livecoding"});
Expand Down
2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono:400,400i" rel="stylesheet">
<title>LiveCoding</title>
Expand Down
11 changes: 6 additions & 5 deletions client/src/game/GameManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ export default class GameManager {
*
* Change the game api, this method must be asynchronus
*/
startGame () {
startGame (console) {
// Create the base game class instance
window.game = new this.provider.gameModule.Game(
document.getElementById('game-box'),
this.provider.assetsBasePath
)
window.game = new this.provider.gameModule.Game({
element: document.getElementById('game-box'),
assetsBasePath: this.provider.assetsBasePath,
console: console
})
// Create a key to eval commands in the game scope
/* eslint-disable no-eval */
window.gameCommandEval = eval
Expand Down
6 changes: 3 additions & 3 deletions client/src/game/GameManifestValidator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import availableLanguages from '@/processor/AvailableLanguages'
import { ProcessorProxyFactory } from '@/processor/ProcessorProxyFactory'

/**
* Responsible to validates the manifest.json style
Expand Down Expand Up @@ -65,11 +65,11 @@ export class GameManifestValidator {
checkLanguages () {
if (this.formatChecked) {
// Check if each manifest languages are included in the availableLanguages constant
if (Object.keys(this.manifest.interpreters).every(e => availableLanguages.includes(e))) {
if (Object.keys(this.manifest.interpreters).every(l => ProcessorProxyFactory.processorProxies.map(e => e.name).includes(l))) {
console.log('Tous les languanges sont suportés')
return true
} else {
throw new Error(`Some specified languages are not suported by the platform, supported languages : ${availableLanguages.toString()}`)
throw new Error(`Some specified languages are not suported by the platform, supported languages : ${ProcessorProxyFactory.processorProxies.map(e => e.name).toString()}`)
}
} else {
throw new Error('You need to check the manifest format before checking the languages !')
Expand Down
10 changes: 0 additions & 10 deletions client/src/processor/AvailableLanguages.js

This file was deleted.

3 changes: 0 additions & 3 deletions client/src/processor/LocalProcessorProxy.js

This file was deleted.

5 changes: 0 additions & 5 deletions client/src/processor/ProcessorProxyFactory.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { LocalProcessorProxy } from './LocalProcessorProxy'
import { ExternalWebSocketProcessorProxy } from './ExternalWebSocketProcessorProxy'

/**
Expand All @@ -10,10 +9,6 @@ export class ProcessorProxyFactory {
*/
static get processorProxies () {
return [
{
name: 'javascript',
class: LocalProcessorProxy
},
{
name: 'php',
class: ExternalWebSocketProcessorProxy
Expand Down
8 changes: 7 additions & 1 deletion client/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ export default {
commit('SET_GAME_MANAGER', window.gameManager)
dispatch('console/success', 'OK, Game loaded !')
// Launch the game
window.gameManager.startGame()
window.gameManager.startGame({
info: (m) => dispatch('console/info', m),
log: (m) => dispatch('console/log', m),
success: (m) => dispatch('console/success', m),
warning: (m) => dispatch('console/warning', m),
error: (m) => dispatch('console/error', m)
})
dispatch('console/success', 'OK, Game started, ready to go !')
} catch (e) {
console.error(e)
Expand Down
File renamed without changes.
56 changes: 0 additions & 56 deletions server/core/Processor.py

This file was deleted.

2 changes: 1 addition & 1 deletion server/core/connection.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Create a new socket connection

from mlogging import mlog
from mod import mlog
from mod import connection
import socket
import sys
Expand Down
1 change: 0 additions & 1 deletion server/core/dataLink.py

This file was deleted.

Loading

0 comments on commit c74fa67

Please sign in to comment.