diff --git a/.env.template b/.env.template new file mode 100644 index 00000000..81044e99 --- /dev/null +++ b/.env.template @@ -0,0 +1 @@ +DEBUG_MODE=false \ No newline at end of file diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 00000000..88bd4543 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,102 @@ +name: Build, push and deploy Docker image + +on: + - push + +# Enables BuildKit +env: + DOCKER_BUILDKIT: 1 + +jobs: + + build-front: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + + # Create a slugified value of the branch + - uses: rlespinasse/github-slug-action@master + + - name: "Build and push front image" + uses: docker/build-push-action@v1 + with: + dockerfile: front/Dockerfile + path: front/ + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: thecodingmachine/workadventure-front + tags: ${{ env.GITHUB_REF_SLUG }} + add_git_labels: true + + build-back: + + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + # Create a slugified value of the branch + - uses: rlespinasse/github-slug-action@master + + - name: "Build and push back image" + uses: docker/build-push-action@v1 + with: + dockerfile: back/Dockerfile + path: back/ + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: thecodingmachine/workadventure-back + tags: ${{ env.GITHUB_REF_SLUG }} + add_git_labels: true + + deeploy: + needs: + - build-front + - build-back + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # Create a slugified value of the branch + - uses: rlespinasse/github-slug-action@1.1.0 + + - name: Deploy + uses: thecodingmachine/deeployer@master + env: + KUBE_CONFIG_FILE: ${{ secrets.KUBE_CONFIG_FILE }} + with: + namespace: workadventure-${{ env.GITHUB_REF_SLUG }} + + - name: Add a comment in PR + uses: unsplash/comment-on-pr@v1.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + msg: Environment deployed at https://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + check_for_duplicate_msg: true + + - name: Run Cypress tests + uses: cypress-io/github-action@v1 + env: + CYPRESS_BASE_URL: https://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + with: + env: host=${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com,port=80 + spec: cypress/integration/spec.js + wait-on: https://${{ env.GITHUB_REF_SLUG }}.workadventure.test.thecodingmachine.com + working-directory: e2e + + - name: "Upload the screenshot on test failure" + uses: actions/upload-artifact@v1 + if: failure() + with: + name: "screenshot" + path: "./e2e/cypress/screenshots/spec.js/WorkAdventureGame -- loads (failed).png" diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 6e6745e4..a6c86baa 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -65,3 +65,4 @@ jobs: - name: "Jasmine" run: yarn test working-directory: "back" + diff --git a/.gitignore b/.gitignore index a806c47e..bc00a82a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.env .idea .vagrant Vagrantfile \ No newline at end of file diff --git a/README.md b/README.md index d71c3f0b..c36aac6b 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,19 @@ Note: on some OSes, you will need to add this line to your `/etc/hosts` file: workadventure.localhost 127.0.0.1 ``` +## Designing a map + +If you want to design your own map, you can use [Tiled](https://www.mapeditor.org/). + +A few things to notice: + +- your map can have as many layers as your want +- your map MUST contain a layer named "floorLayer" of type "objectgroup" that represents the layer on which characters will be drawn. +- the tilesets in your map MUST be embedded. You can refer to an external typeset in a TSX file. Click the "embed tileset" button in the tileset tab to embed tileset data. +- your map MUST be exported in JSON format. You need to use a recent version of Tiled to get JSON format export (1.3+) + +![](doc/images/tiled_screenshot_1.png) + ### MacOS developers, your environment with Vagrant If you are using MacOS, you can increase Docker performance using Vagrant. If you want more explanations, you can read [this medium article](https://medium.com/better-programming/vagrant-to-increase-docker-performance-with-macos-25b354b0c65c). @@ -98,4 +111,4 @@ Vagrant destroy * `Vagrant destroy`: delete your VM Vagrant. ## Features developed -You have more details of features developed in back [README.md](./back/README.md). \ No newline at end of file +You have more details of features developed in back [README.md](./back/README.md). diff --git a/back/.dockerignore b/back/.dockerignore new file mode 100644 index 00000000..576c21a2 --- /dev/null +++ b/back/.dockerignore @@ -0,0 +1,5 @@ +/dist/ +/node_modules/ +/dist/bundle.js +/yarn-error.log +/Dockerfile diff --git a/back/Dockerfile b/back/Dockerfile new file mode 100644 index 00000000..8b1b8f61 --- /dev/null +++ b/back/Dockerfile @@ -0,0 +1,9 @@ +FROM thecodingmachine/nodejs:12 + +COPY --chown=docker:docker . . +RUN yarn install + +ENV NODE_ENV=production + +CMD ["yarn", "run", "prod"] + diff --git a/back/package.json b/back/package.json index 4fe7681d..d4bf6349 100644 --- a/back/package.json +++ b/back/package.json @@ -25,13 +25,15 @@ "@types/http-status-codes": "^1.2.0", "@types/jsonwebtoken": "^8.3.8", "@types/socket.io": "^2.1.4", + "@types/uuidv4": "^5.0.0", "body-parser": "^1.19.0", "express": "^4.17.1", "http-status-codes": "^1.4.0", "jsonwebtoken": "^8.5.1", "socket.io": "^2.3.0", "ts-node-dev": "^1.0.0-pre.44", - "typescript": "^3.8.3" + "typescript": "^3.8.3", + "uuidv4": "^6.0.7" }, "devDependencies": { "@types/jasmine": "^3.5.10", diff --git a/back/src/Controller/AuthenticateController.ts b/back/src/Controller/AuthenticateController.ts index 7555c67a..f9eed470 100644 --- a/back/src/Controller/AuthenticateController.ts +++ b/back/src/Controller/AuthenticateController.ts @@ -2,6 +2,7 @@ import {Application, Request, Response} from "express"; import Jwt from "jsonwebtoken"; import {BAD_REQUEST, OK} from "http-status-codes"; import {SECRET_KEY, ROOM} from "../Enum/EnvironmentVariable"; //TODO fix import by "_Enum/..." +import { uuid } from 'uuidv4'; export class AuthenticateController{ App : Application; @@ -21,8 +22,13 @@ export class AuthenticateController{ }); } //TODO check user email for The Coding Machine game - let token = Jwt.sign({email: param.email, roomId: ROOM}, SECRET_KEY, {expiresIn: '24h'}); - return res.status(OK).send({token: token, roomId: ROOM}); + let userId = uuid(); + let token = Jwt.sign({email: param.email, roomId: ROOM, userId: userId}, SECRET_KEY, {expiresIn: '24h'}); + return res.status(OK).send({ + token: token, + roomId: ROOM, + userId: userId + }); }); } } \ No newline at end of file diff --git a/back/src/Controller/IoSocketController.ts b/back/src/Controller/IoSocketController.ts index 06e0cb11..acd5843f 100644 --- a/back/src/Controller/IoSocketController.ts +++ b/back/src/Controller/IoSocketController.ts @@ -104,7 +104,8 @@ export class IoSocketController{ roomId: , position: { x : , - y : + y : , + direction: } }, ... @@ -125,8 +126,7 @@ export class IoSocketController{ } arrayMap.forEach((value : any) => { let roomId = value[0]; - let data = value[1]; - this.Io.in(roomId).emit('user-position', JSON.stringify(data)); + this.Io.in(roomId).emit('user-position', JSON.stringify(arrayMap)); }); this.seTimeOutInProgress = setTimeout(() => { this.shareUsersPosition(); diff --git a/back/src/Model/Websocket/MessageUserPosition.ts b/back/src/Model/Websocket/MessageUserPosition.ts index 2e79f5ef..117c99cb 100644 --- a/back/src/Model/Websocket/MessageUserPosition.ts +++ b/back/src/Model/Websocket/MessageUserPosition.ts @@ -4,19 +4,22 @@ import {PointInterface} from "./PointInterface"; export class Point implements PointInterface{ x: number; y: number; + direction: string; - constructor(x : number, y : number) { + constructor(x : number, y : number, direction : string = "none") { if(x === null || y === null){ throw Error("position x and y cannot be null"); } this.x = x; this.y = y; + this.direction = direction; } toJson(){ return { x : this.x, - y: this.y + y: this.y, + direction: this.direction } } } @@ -24,9 +27,10 @@ export class Point implements PointInterface{ export class MessageUserPosition extends Message{ position: PointInterface; - constructor(data: any) { - super(data); - this.position = new Point(data.position.x, data.position.y); + constructor(message: string) { + super(message); + let data = JSON.parse(message); + this.position = new Point(data.position.x, data.position.y, data.position.direction); } toString() { diff --git a/back/src/Model/Websocket/PointInterface.ts b/back/src/Model/Websocket/PointInterface.ts index 7f2ab39a..7b464a5d 100644 --- a/back/src/Model/Websocket/PointInterface.ts +++ b/back/src/Model/Websocket/PointInterface.ts @@ -1,5 +1,6 @@ export interface PointInterface { x: number; y: number; + direction: string; toJson() : object; } \ No newline at end of file diff --git a/back/yarn.lock b/back/yarn.lock index 27f4503e..4b4f1fe2 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -135,6 +135,13 @@ resolved "https://registry.yarnpkg.com/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz#9aa30c04db212a9a0649d6ae6fd50accc40748a1" integrity sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ== +"@types/uuidv4@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/uuidv4/-/uuidv4-5.0.0.tgz#2c94e67b0c06d5adb28fb7ced1a1b5f0866ecd50" + integrity sha512-xUrhYSJnkTq9CP79cU3svoKTLPCIbMMnu9Twf/tMpHATYSHCAAeDNeb2a/29YORhk5p4atHhCTMsIBU/tvdh6A== + dependencies: + uuidv4 "*" + "@typescript-eslint/eslint-plugin@^2.26.0": version "2.26.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.26.0.tgz#04c96560c8981421e5a9caad8394192363cc423f" @@ -2094,6 +2101,18 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= +uuid@7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +uuidv4@*, uuidv4@^6.0.7: + version "6.0.7" + resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.0.7.tgz#15e920848e1afbbd97b4919bc50f4f2f2278f880" + integrity sha512-4mpYRFNqO22EckzxPSJ/+xjn9GgO6SAqEJ33yt23Y+HZZoZOt/6l4U4iIjc86ZfxSN2fSCGGmHNb3kiACFNd1g== + dependencies: + uuid "7.0.3" + v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" diff --git a/deeployer.libsonnet b/deeployer.libsonnet new file mode 100644 index 00000000..84ea3eca --- /dev/null +++ b/deeployer.libsonnet @@ -0,0 +1,35 @@ +{ + local env = std.extVar("env"), + local namespace = env.GITHUB_REF_SLUG, + local tag = if namespace == "master" then "latest" else namespace, + "$schema": "https://raw.githubusercontent.com/thecodingmachine/deeployer/master/deeployer.schema.json", + "containers": { + "back": { + "image": "thecodingmachine/workadventure-back:"+tag, + "host": { + "url": "api."+namespace+".workadventure.test.thecodingmachine.com", + "https": "enable" + }, + "ports": [8080], + "env": { + "SECRET_KEY": "tempSecretKeyNeedsToChange" + } + }, + "front": { + "image": "thecodingmachine/workadventure-front:"+tag, + "host": { + "url": namespace+".workadventure.test.thecodingmachine.com", + "https": "enable" + }, + "ports": [80], + "env": { + "API_URL": "https://api."+namespace+".workadventure.test.thecodingmachine.com" + } + } + }, + "config": { + "https": { + "mail": "d.negrier@thecodingmachine.com" + } + } +} diff --git a/doc/images/tiled_screenshot_1.png b/doc/images/tiled_screenshot_1.png new file mode 100644 index 00000000..108dfed8 Binary files /dev/null and b/doc/images/tiled_screenshot_1.png differ diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml new file mode 100644 index 00000000..bdf5855a --- /dev/null +++ b/docker-compose.ci.yml @@ -0,0 +1,20 @@ +version: '3' + +services: + + wait_app: + image: dadarek/wait-for-dependencies + depends_on: + - reverse-proxy + command: front:8080 + cypress: + # the Docker image to use from https://github.com/cypress-io/cypress-docker-images + image: "cypress/included:3.8.3" + depends_on: + - reverse-proxy + environment: + # pass base url to test pointing at the web application + - CYPRESS_baseUrl=http://front:8080 + working_dir: /e2e + volumes: + - ./e2e/:/e2e \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index a23a5204..ca2197a8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,12 +7,16 @@ services: - "80:80" # The Web UI (enabled by --api.insecure=true) - "8080:8080" + depends_on: + - back + - front volumes: - /var/run/docker.sock:/var/run/docker.sock front: image: thecodingmachine/nodejs:12 environment: + DEBUG_MODE: "$DEBUG_MODE" HOST: "0.0.0.0" NODE_ENV: development API_URL: http://api.workadventure.localhost diff --git a/e2e/.gitignore b/e2e/.gitignore new file mode 100644 index 00000000..92fb84fd --- /dev/null +++ b/e2e/.gitignore @@ -0,0 +1,3 @@ +screenshots/ +videos/ +node_modules/ \ No newline at end of file diff --git a/e2e/CYPRESS.md b/e2e/CYPRESS.md new file mode 100644 index 00000000..dce9d698 --- /dev/null +++ b/e2e/CYPRESS.md @@ -0,0 +1,36 @@ +# Testing with cypress + +This project use [cypress](https://www.cypress.io/) to do functional testing of the website. +Unfortunately we cannot integrate it with docker-compose for the moment, so you will need to install some packages locally on your pc. + +## Getting Started + +You will need to install theses dependancies on linux (don't know about mac): + +```bash +sudo apt update +sudo apt install libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb +``` + +Cypress can be installed locally in the e2e directory +```bash +cd e2e +npm install +``` + + +How to use: +```bash +npm run cy:run +npm run cy:open +``` + +The first command will run all tests in the terminal, while the second will open the interactive task runner which allow you to easily manage the test workflow + +[More details here](https://docs.cypress.io/guides/getting-started/testing-your-app.html#Step-1-Start-your-server) + +## How to test a game + +Cypress cannot "see" and so cannot directly manipulate the canva created by Phaser. + +This means we have to do workarounds such as exposing core objects in the window so that cypress can manipulate them or doing console that cypress can catch. \ No newline at end of file diff --git a/e2e/cypress.json b/e2e/cypress.json new file mode 100644 index 00000000..cea4979b --- /dev/null +++ b/e2e/cypress.json @@ -0,0 +1,7 @@ +{ + "baseUrl": "http://workadventure.localhost", + "video": false, + "defaultCommandTimeout": 20000, + "pluginsFile": false, + "supportFile": false +} \ No newline at end of file diff --git a/e2e/cypress/integration/spec.js b/e2e/cypress/integration/spec.js new file mode 100644 index 00000000..7f94a502 --- /dev/null +++ b/e2e/cypress/integration/spec.js @@ -0,0 +1,25 @@ +Cypress.on('window:before:load', (win) => { + // because this is called before any scripts + // have loaded - the ga function is undefined + // so we need to create it. + win.cypressAsserter = cy.stub().as('ca') +}) + +describe('WorkAdventureGame', () => { + beforeEach(() => { + cy.visit('/', { + onBeforeLoad (win) { + cy.spy(win.console, 'log').as('console.log') + }, + }) + + }); + + it('loads', () => { + cy.get('@console.log').should('be.calledWith', 'Started the game') + cy.get('@console.log').should('be.calledWith', 'Preloading') + cy.get('@console.log').should('be.calledWith', 'Preloading done') + cy.get('@console.log').should('be.calledWith', 'startInit') + cy.get('@console.log').should('be.calledWith', 'startInit done') + }); +}); \ No newline at end of file diff --git a/e2e/package-lock.json b/e2e/package-lock.json new file mode 100644 index 00000000..bfd6255c --- /dev/null +++ b/e2e/package-lock.json @@ -0,0 +1,1406 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@cypress/listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-p3SS9LEdzHxEajSz4ochr9M8ZCo=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.30.1", + "figures": "1.7.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "requires": { + "debug": "3.2.6", + "lodash.once": "4.1.1" + } + }, + "@types/sizzle": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz", + "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==" + }, + "ajv": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", + "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "requires": { + "fast-deep-equal": "3.1.1", + "fast-json-stable-stringify": "2.1.0", + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" + } + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "arch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", + "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "2.1.2" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "4.17.15" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "0.14.5" + } + }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "cachedir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-1.3.0.tgz", + "integrity": "sha512-O1ji32oyON9laVPJL1IZ5bmwd2cB46VfpxkDequezH+15FDzzVddEyrGEeX4WusDSqKxdyFdDQDEG1yo1GoWkg==", + "requires": { + "os-homedir": "1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.5.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.3" + } + } + } + }, + "check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA=" + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==" + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "1.0.1" + } + }, + "cli-spinners": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=" + }, + "cli-truncate": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", + "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", + "requires": { + "slice-ansi": "0.0.4", + "string-width": "1.0.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" + }, + "common-tags": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", + "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "1.1.1", + "inherits": "2.0.4", + "readable-stream": "2.3.7", + "typedarray": "0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "1.0.5", + "path-key": "2.0.1", + "semver": "5.7.1", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + }, + "cypress": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-3.8.3.tgz", + "integrity": "sha512-I9L/d+ilTPPA4vq3NC1OPKmw7jJIpMKNdyfR8t1EXYzYCjyqbc59migOm1YSse/VRbISLJ+QGb5k4Y3bz2lkYw==", + "requires": { + "@cypress/listr-verbose-renderer": "0.4.1", + "@cypress/xvfb": "1.2.4", + "@types/sizzle": "2.3.2", + "arch": "2.1.1", + "bluebird": "3.5.0", + "cachedir": "1.3.0", + "chalk": "2.4.2", + "check-more-types": "2.24.0", + "commander": "2.15.1", + "common-tags": "1.8.0", + "debug": "3.2.6", + "eventemitter2": "4.1.2", + "execa": "0.10.0", + "executable": "4.1.1", + "extract-zip": "1.6.7", + "fs-extra": "5.0.0", + "getos": "3.1.1", + "is-ci": "1.2.1", + "is-installed-globally": "0.1.0", + "lazy-ass": "1.6.0", + "listr": "0.12.0", + "lodash": "4.17.15", + "log-symbols": "2.2.0", + "minimist": "1.2.0", + "moment": "2.24.0", + "ramda": "0.24.1", + "request": "2.88.0", + "request-progress": "3.0.0", + "supports-color": "5.5.0", + "tmp": "0.1.0", + "untildify": "3.0.3", + "url": "0.11.0", + "yauzl": "2.10.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "date-fns": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", + "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "2.1.2" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "0.1.1", + "safer-buffer": "2.1.2" + } + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eventemitter2": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-4.1.2.tgz", + "integrity": "sha1-DhqEd6+CGm7zmVsxG/dMI6UkfxU=" + }, + "execa": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", + "requires": { + "cross-spawn": "6.0.5", + "get-stream": "3.0.0", + "is-stream": "1.1.0", + "npm-run-path": "2.0.2", + "p-finally": "1.0.0", + "signal-exit": "3.0.2", + "strip-eof": "1.0.0" + } + }, + "executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "requires": { + "pify": "2.3.0" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extract-zip": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", + "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=", + "requires": { + "concat-stream": "1.6.2", + "debug": "2.6.9", + "mkdirp": "0.5.1", + "yauzl": "2.4.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "yauzl": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz", + "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=", + "requires": { + "fd-slicer": "1.0.1" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fd-slicer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", + "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=", + "requires": { + "pend": "1.2.0" + } + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "1.0.5", + "object-assign": "4.1.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.8", + "mime-types": "2.1.26" + } + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "requires": { + "graceful-fs": "4.2.3", + "jsonfile": "4.0.0", + "universalify": "0.1.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "getos": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.1.1.tgz", + "integrity": "sha512-oUP1rnEhAr97rkitiszGP9EgDVYnmchgFzfqRzSkgtfv7ai6tEi7Ko8GgjNXts7VLWEqrTWyhsOKLe5C5b/Zkg==", + "requires": { + "async": "2.6.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.4", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "global-dirs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", + "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", + "requires": { + "ini": "1.3.5" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "6.11.0", + "har-schema": "2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.16.1" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "requires": { + "repeating": "2.0.1" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "requires": { + "ci-info": "1.6.0" + } + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-installed-globally": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", + "requires": { + "global-dirs": "0.1.1", + "is-path-inside": "1.0.1" + } + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "requires": { + "path-is-inside": "1.0.2" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "4.2.3" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha1-eZllXoZGwX8In90YfRUNMyTVRRM=" + }, + "listr": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz", + "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "figures": "1.7.0", + "indent-string": "2.1.0", + "is-promise": "2.1.0", + "is-stream": "1.1.0", + "listr-silent-renderer": "1.1.1", + "listr-update-renderer": "0.2.0", + "listr-verbose-renderer": "0.4.1", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "ora": "0.2.3", + "p-map": "1.2.0", + "rxjs": "5.5.12", + "stream-to-observable": "0.1.0", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "requires": { + "chalk": "1.1.3" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "listr-silent-renderer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", + "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=" + }, + "listr-update-renderer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz", + "integrity": "sha1-yoDhd5tOcCZoB+ju0a1qvjmFUPk=", + "requires": { + "chalk": "1.1.3", + "cli-truncate": "0.2.1", + "elegant-spinner": "1.0.1", + "figures": "1.7.0", + "indent-string": "3.2.0", + "log-symbols": "1.0.2", + "log-update": "1.0.2", + "strip-ansi": "3.0.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "requires": { + "chalk": "1.1.3" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "listr-verbose-renderer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", + "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "date-fns": "1.30.1", + "figures": "1.7.0" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "log-symbols": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", + "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", + "requires": { + "chalk": "2.4.2" + } + }, + "log-update": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", + "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", + "requires": { + "ansi-escapes": "1.4.0", + "cli-cursor": "1.0.2" + } + }, + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "requires": { + "mime-db": "1.43.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "2.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "ora": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", + "requires": { + "chalk": "1.1.3", + "cli-cursor": "1.0.2", + "cli-spinners": "0.1.2", + "object-assign": "4.1.1" + }, + "dependencies": { + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-map": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "psl": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", + "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "ramda": { + "version": "0.24.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.24.1.tgz", + "integrity": "sha1-w7d1UZfzW43DUCIoJixMkd22uFc=" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.4", + "isarray": "1.0.0", + "process-nextick-args": "2.0.1", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "requires": { + "is-finite": "1.0.2" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.9.1", + "caseless": "0.12.0", + "combined-stream": "1.0.8", + "extend": "3.0.2", + "forever-agent": "0.6.1", + "form-data": "2.3.3", + "har-validator": "5.1.3", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.26", + "oauth-sign": "0.9.0", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.4.3", + "tunnel-agent": "0.6.0", + "uuid": "3.4.0" + } + }, + "request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=", + "requires": { + "throttleit": "1.0.0" + } + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "1.1.1", + "onetime": "1.1.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "7.1.6" + } + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "0.2.4", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.2", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.2", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" + } + }, + "stream-to-observable": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz", + "integrity": "sha1-Rb8dny19wJvtgfHDB8Qw5ouEz/4=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "3.0.0" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + }, + "throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=" + }, + "tmp": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", + "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "requires": { + "rimraf": "2.7.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "1.7.0", + "punycode": "1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "untildify": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-3.0.3.tgz", + "integrity": "sha512-iSk/J8efr8uPT/Z4eSUywnqyrQU7DSdMfdqK4iWEaUVVmcP5JcnpRqmVMwcwcnmI1ATFNgC5V90u09tBynNFKA==" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "2.1.1" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "2.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "requires": { + "buffer-crc32": "0.2.13", + "fd-slicer": "1.1.0" + }, + "dependencies": { + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "requires": { + "pend": "1.2.0" + } + } + } + } + } +} diff --git a/e2e/package.json b/e2e/package.json new file mode 100644 index 00000000..97bd098c --- /dev/null +++ b/e2e/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "cypress": "^3.8.3" + }, + "scripts": { + "cy:run": "cypress run", + "cy:open": "cypress open" + } +} diff --git a/front/.dockerignore b/front/.dockerignore new file mode 100644 index 00000000..64d1025d --- /dev/null +++ b/front/.dockerignore @@ -0,0 +1,4 @@ +/node_modules/ +/dist/bundle.js +/yarn-error.log +/Dockerfile diff --git a/front/Dockerfile b/front/Dockerfile new file mode 100644 index 00000000..ee15270e --- /dev/null +++ b/front/Dockerfile @@ -0,0 +1,9 @@ +# we are rebuilding on each deploy to cope with the API_URL environment URL +FROM thecodingmachine/nodejs:12-apache + +COPY --chown=docker:docker . . +RUN yarn install + +ENV NODE_ENV=production +ENV STARTUP_COMMAND_1="yarn run build" +ENV APACHE_DOCUMENT_ROOT=dist/ diff --git a/front/dist/maps/floortileset.png b/front/dist/maps/floortileset.png new file mode 100644 index 00000000..c672dcbb Binary files /dev/null and b/front/dist/maps/floortileset.png differ diff --git a/front/dist/maps/map.json b/front/dist/maps/map.json index d116dc3e..773e3b9f 100644 --- a/front/dist/maps/map.json +++ b/front/dist/maps/map.json @@ -3,33 +3,45 @@ { "export": { - "target":"." + "format":"json", + "target":"map.json" } }, - "height":20, + "height":18, "infinite":false, "layers":[ { - "data":[1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 1, 2, 2, 2, 2, 2, 2, 3, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 17, 18, 18, 18, 18, 18, 18, 19, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 17, 18, 18, 18, 18, 18, 18, 19, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 17, 18, 18, 18, 18, 18, 18, 19, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 33, 34, 34, 34, 34, 34, 34, 35, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178], - "height":20, - "id":1, - "name":"Calque 1", + "data":[294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 294, 294, 294, 294, 294, 294, 294, 294, 294], + "height":18, + "id":2, + "name":"bottom", "opacity":1, "type":"tilelayer", "visible":true, - "width":20, + "width":46, "x":0, "y":0 }, { - "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 62, 62, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 94, 94, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 110, 110, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 209, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 193, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 195, 164, 209, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 211], - "height":20, + "draworder":"topdown", "id":3, - "name":"Calque 2", + "name":"floorLayer", + "objects":[], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, + { + "data":[0, 0, 115, 51, 52, 116, 115, 51, 52, 116, 115, 51, 52, 116, 0, 0, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 245, 246, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 68, 0, 0, 67, 68, 0, 0, 67, 68, 0, 0, 0, 73, 74, 0, 0,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24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 52, 116, 0, 0, 51, 52, 116, 0, 0, 0, 29, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 0, 0, 0, 0, 0, 98, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 67, 68, 0, 0, 115, 67, 68, 0, 0, 0, 0, 13, 14, 13, 14, 13, 14, 13, 14, 13, 14, 13, 14, 13, 14, 13, 14, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 52, 116, 0, 0, 51, 52, 116, 0, 0, 0, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 181, 0, 0, 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 67, 68, 0, 0, 115, 67, 68, 0, 0, 0, 0, 45, 46, 45, 46, 45, 46, 45, 46, 45, 46, 45, 46, 45, 46, 45, 46, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 113, 0, 113, 0, 113, 0, 0, 51, 52, 0, 0, 0, 113, 0, 113, 0, 113, 0, 0, 51, 49, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, 0, 0, 0, 0, 0, 51, 49, 50, 49, 50, 49, 50, 0, 115, 67, 68, 116, 0, 49, 50, 49, 50, 49, 50, 0, 115, 67, 65, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 52, 0, 0, 0, 0, 115, 67, 65, 66, 65, 66, 65, 66, 0, 0, 51, 52, 0, 0, 65, 66, 65, 66, 65, 66, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 67, 68, 116, 0, 0, 0, 0, 0, 114, 0, 114, 0, 114, 0, 0, 115, 67, 68, 116, 0, 114, 0, 114, 0, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":18, + "id":1, + "name":"top", "opacity":1, "type":"tilelayer", "visible":true, - "width":20, + "width":46, "x":0, "y":0 }], @@ -41,20 +53,34 @@ "tileheight":32, "tilesets":[ { - "columns":16, "firstgid":1, - "image":"tiles.png", - "imageheight":512, - "imagewidth":512, + "source":"office_1.tsx" + }, + { + "columns":8, + "firstgid":257, + "image":"floortileset.png", + "imageheight":256, + "imagewidth":256, "margin":0, - "name":"tiles", + "name":"floortileset", "spacing":0, - "tilecount":256, + "tilecount":64, "tileheight":32, + "tiles":[ + { + "id":37, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }], "tilewidth":32 }], "tilewidth":32, "type":"map", "version":1.2, - "width":20 + "width":46 } \ No newline at end of file diff --git a/front/dist/maps/map2.json b/front/dist/maps/map2.json index 9a10e634..e7bbefc4 100644 --- a/front/dist/maps/map2.json +++ b/front/dist/maps/map2.json @@ -21,6 +21,17 @@ "x":0, "y":0 }, + { + "draworder":"topdown", + "id":3, + "name":"floorLayer", + "objects":[], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }, { "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 17, 18, 19, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 17, 18, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 35, 33, 34, 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "height":100, @@ -33,7 +44,7 @@ "x":0, "y":0 }], - "nextlayerid":3, + "nextlayerid":4, "nextobjectid":1, "orientation":"orthogonal", "renderorder":"right-down", @@ -155,6 +166,12 @@ }, { "id":77, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }], "terrain":[2, 2, 2, 2] }, { diff --git a/front/dist/maps/office_1.tsx b/front/dist/maps/office_1.tsx new file mode 100644 index 00000000..6a0d5cdb --- /dev/null +++ b/front/dist/maps/office_1.tsx @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/front/dist/maps/tilesets_deviant_milkian_1.png b/front/dist/maps/tilesets_deviant_milkian_1.png new file mode 100644 index 00000000..47400131 Binary files /dev/null and b/front/dist/maps/tilesets_deviant_milkian_1.png differ diff --git a/front/dist/resources/objects/rockSprite.png b/front/dist/resources/objects/rockSprite.png new file mode 100644 index 00000000..40820abd Binary files /dev/null and b/front/dist/resources/objects/rockSprite.png differ diff --git a/front/src/Connexion.ts b/front/src/Connexion.ts index 4f094152..0d9f998a 100644 --- a/front/src/Connexion.ts +++ b/front/src/Connexion.ts @@ -1,14 +1,10 @@ +import {GameManagerInterface} from "./Phaser/Game/GameManager"; + const SocketIo = require('socket.io-client'); import Axios from "axios"; import {API_URL} from "./Enum/EnvironmentVariable"; -export interface PointInterface { - x: number; - y: number; - toJson() : object; -} - -export class Message { +class Message { userId: string; roomId: string; @@ -25,27 +21,42 @@ export class Message { } } -export class Point implements PointInterface{ +export interface PointInterface { x: number; y: number; + direction : string; + toJson() : object; +} - constructor(x : number, y : number) { +class Point implements PointInterface{ + x: number; + y: number; + direction : string; + + constructor(x : number, y : number, direction : string = "none") { if(x === null || y === null){ throw Error("position x and y cannot be null"); } this.x = x; this.y = y; + this.direction = direction; } toJson(){ return { x : this.x, - y: this.y + y: this.y, + direction: this.direction } } } -export class MessageUserPosition extends Message{ +export interface MessageUserPositionInterface { + userId: string; + roomId: string; + position: PointInterface; +} +class MessageUserPosition extends Message implements MessageUserPositionInterface{ position: PointInterface; constructor(userId : string, roomId : string, point : Point) { @@ -64,18 +75,61 @@ export class MessageUserPosition extends Message{ } } -export class Connexion { +export interface ListMessageUserPositionInterface { + roomId : string; + listUsersPosition: Array; +} +class ListMessageUserPosition{ + roomId : string; + listUsersPosition: Array; + + constructor(roomId : string, data : any) { + this.roomId = roomId; + this.listUsersPosition = new Array(); + data.forEach((userPosition: any) => { + this.listUsersPosition.push(new MessageUserPosition( + userPosition.userId, + userPosition.roomId, + new Point( + userPosition.position.x, + userPosition.position.y, + userPosition.position.direction + ) + )); + }); + } +} +export interface ConnexionInterface { socket : any; token : string; email : string; + userId: string; + startedRoom : string; + createConnexion() : Promise; + joinARoom(roomId : string) : void; + sharePosition(roomId : string, x : number, y : number, direction : string) : void; + positionOfAllUser() : void; +} +export class Connexion implements ConnexionInterface{ + socket : any; + token : string; + email : string; + userId: string; startedRoom : string; - constructor(email : string) { + GameManager: GameManagerInterface; + + constructor(email : string, GameManager: GameManagerInterface) { this.email = email; - Axios.post(`${API_URL}/login`, {email: email}) + this.GameManager = GameManager; + } + + createConnexion() : Promise{ + return Axios.post(`${API_URL}/login`, {email: this.email}) .then((res) => { this.token = res.data.token; this.startedRoom = res.data.roomId; + this.userId = res.data.userId; this.socket = SocketIo(`${API_URL}`, { query: { @@ -87,12 +141,13 @@ export class Connexion { this.joinARoom(this.startedRoom); //share your first position - this.sharePosition(0, 0); + this.sharePosition(this.startedRoom, 0, 0); - //create listen event to get all data user shared by the back this.positionOfAllUser(); this.errorMessage(); + + return this; }) .catch((err) => { console.error(err); @@ -104,18 +159,23 @@ export class Connexion { * Permit to join a room * @param roomId */ - joinARoom(roomId : string){ - let messageUserPosition = new MessageUserPosition(this.email, this.startedRoom, new Point(0, 0)); + joinARoom(roomId : string) : void { + let messageUserPosition = new MessageUserPosition(this.userId, this.startedRoom, new Point(0, 0)); this.socket.emit('join-room', messageUserPosition.toString()); } /** - * Permit to share your position in map + * + * @param roomId * @param x * @param y + * @param direction */ - sharePosition(x : number, y : number){ - let messageUserPosition = new MessageUserPosition(this.email, this.startedRoom, new Point(x, y)); + sharePosition(roomId : string, x : number, y : number, direction : string = "none") : void{ + if(!this.socket){ + return; + } + let messageUserPosition = new MessageUserPosition(this.userId, roomId, new Point(x, y, direction)); this.socket.emit('user-position', messageUserPosition.toString()); } @@ -127,20 +187,24 @@ export class Connexion { * roomId: , * position: { * x : , - * y : + * y : , + * direction: * } * }, * ... * ] **/ - positionOfAllUser(){ - this.socket.on("user-position", (message : string) => { - //TODO show all user in map - console.info("user-position", message); + positionOfAllUser() : void { + this.socket.on("user-position", (message: string) => { + let dataList = JSON.parse(message); + dataList.forEach((UserPositions: any) => { + let listMessageUserPosition = new ListMessageUserPosition(UserPositions[0], UserPositions[1]); + this.GameManager.shareUserPosition(listMessageUserPosition); + }); }); } - errorMessage(){ + errorMessage() : void { this.socket.on('message-error', (message : string) => { console.error("message-error", message); }) diff --git a/front/src/Cypress/CypressAsserter.ts b/front/src/Cypress/CypressAsserter.ts new file mode 100644 index 00000000..95adb156 --- /dev/null +++ b/front/src/Cypress/CypressAsserter.ts @@ -0,0 +1,32 @@ +declare let window:any; + +//this class is used to communicate with cypress, our e2e testing client +//Since cypress cannot manipulate canvas, we notified it with console logs +class CypressAsserter { + + constructor() { + window.cypressAsserter = this + } + + gameStarted() { + console.log('Started the game') + } + + preloadStarted() { + console.log('Preloading') + } + + preloadFinished() { + console.log('Preloading done') + } + + initStarted() { + console.log('startInit') + } + + initFinished() { + console.log('startInit done') + } +} + +export const cypressAsserter = new CypressAsserter() \ No newline at end of file diff --git a/front/src/Enum/EnvironmentVariable.ts b/front/src/Enum/EnvironmentVariable.ts index 71934e6c..db5b912c 100644 --- a/front/src/Enum/EnvironmentVariable.ts +++ b/front/src/Enum/EnvironmentVariable.ts @@ -1,7 +1,13 @@ +const DEBUG_MODE: boolean = !!process.env.DEBUG_MODE || false; const API_URL = process.env.API_URL || "http://api.workadventure.localhost"; +const ROOM = [process.env.ROOM || "THECODINGMACHINE"]; const RESOLUTION = 2; +const ZOOM_LEVEL = 3/4; export { + DEBUG_MODE, API_URL, - RESOLUTION + RESOLUTION, + ZOOM_LEVEL, + ROOM } \ No newline at end of file diff --git a/front/src/GameScene.ts b/front/src/GameScene.ts deleted file mode 100644 index 2cb36131..00000000 --- a/front/src/GameScene.ts +++ /dev/null @@ -1,185 +0,0 @@ -import {RESOLUTION} from "./Enum/EnvironmentVariable"; - -export class GameScene extends Phaser.Scene { - private player: Phaser.GameObjects.Sprite; - - private keyZ: Phaser.Input.Keyboard.Key; - private keyQ: Phaser.Input.Keyboard.Key; - private keyS: Phaser.Input.Keyboard.Key; - private keyD: Phaser.Input.Keyboard.Key; - private keyRight: Phaser.Input.Keyboard.Key; - private keyLeft: Phaser.Input.Keyboard.Key; - private keyUp: Phaser.Input.Keyboard.Key; - private keyDown: Phaser.Input.Keyboard.Key; - private keyShift: Phaser.Input.Keyboard.Key; - - private Mappy : Phaser.Tilemaps.Tilemap; - - private startX = ((window.innerWidth / 2) / RESOLUTION); - private startY = ((window.innerHeight / 2) / RESOLUTION); - - constructor() { - super({ - key: "GameScene" - }); - } - - preload(): void { - this.load.image('tiles', 'maps/tiles.png'); - this.load.tilemapTiledJSON('map', 'maps/map2.json'); - this.load.spritesheet('player', - 'resources/characters/pipoya/Male 01-1.png', - { frameWidth: 32, frameHeight: 32 } - ); - } - - init(): void { - this.keyShift = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SHIFT); - - this.keyZ = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Z); - this.keyQ = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q); - this.keyS = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.S); - this.keyD = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.D); - - this.keyUp = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.UP); - this.keyLeft = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.LEFT); - this.keyDown = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.DOWN); - this.keyRight = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.RIGHT); - } - - private moveCamera(x:number, y:number, speedMultiplier: number): void { - this.cameras.main.scrollX += speedMultiplier * 2 * x; - this.cameras.main.scrollY += speedMultiplier * 2 * y; - } - - create(): void { - this.Mappy = this.add.tilemap("map"); - let terrain = this.Mappy.addTilesetImage("tiles", "tiles"); - - let bottomLayer = this.Mappy.createStaticLayer("Calque 1", [terrain], 0, 0); - let topLayer = this.Mappy.createStaticLayer("Calque 2", [terrain], 0, 0); - - // Let's manage animations of the player - this.anims.create({ - key: 'down', - frames: this.anims.generateFrameNumbers('player', { start: 0, end: 2 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'left', - frames: this.anims.generateFrameNumbers('player', { start: 3, end: 5 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'right', - frames: this.anims.generateFrameNumbers('player', { start: 6, end: 8 }), - frameRate: 10, - repeat: -1 - }); - - this.anims.create({ - key: 'up', - frames: this.anims.generateFrameNumbers('player', { start: 9, end: 11 }), - frameRate: 10, - repeat: -1 - }); - - //let player = this.add.sprite(450, 450, 'player'); - //player.anims.play('down'); - //player.setBounce(0.2); - //player.setCollideWorldBounds(true); - this.player = this.add.sprite(this.startX, this.startY, 'player'); - } - - private angle: number = 0; - - update(dt: number): void { - let xCameraPosition = this.cameras.main.scrollX; - let yCameraPosition = this.cameras.main.scrollY; - - let speedMultiplier = this.keyShift.isDown ? 5 : 1; - - if (this.keyZ.isDown || this.keyUp.isDown) { - this.managePlayerAnimation('up'); - if (this.player.y > 0) { - this.player.setY(this.player.y - 2); - } else { - this.player.setY(0); - } - - if (yCameraPosition > 0) { - if (this.player.y < (this.Mappy.widthInPixels - this.startY)) { - this.moveCamera(0, -1, speedMultiplier); - } - } else { - this.cameras.main.scrollY = 0; - } - } else if (this.keyQ.isDown || this.keyLeft.isDown) { - - this.managePlayerAnimation('left'); - if (this.player.x > 0) { - this.player.setX(this.player.x - 2); - } else { - this.player.setX(0); - } - - if (xCameraPosition > 0) { - if (this.player.x < (this.Mappy.heightInPixels - this.startX)) { - this.moveCamera(-1, 0, speedMultiplier); - } - } else { - this.cameras.main.scrollX = 0; - } - } else if (this.keyS.isDown || this.keyDown.isDown) { - - this.managePlayerAnimation('down'); - if (this.Mappy.heightInPixels > this.player.y) { - this.player.setY(this.player.y + 2); - } else { - this.player.setY(this.Mappy.heightInPixels); - } - - if (this.Mappy.heightInPixels > (yCameraPosition + (window.innerHeight / RESOLUTION))) { - if (this.player.y > this.startY) { - this.moveCamera(0, 1, speedMultiplier); - } - } else { - this.cameras.main.scrollY = (this.Mappy.heightInPixels - (window.innerHeight / RESOLUTION)); - } - } else if (this.keyD.isDown || this.keyRight.isDown) { - - this.managePlayerAnimation('right'); - if (this.Mappy.widthInPixels > this.player.x) { - this.player.setX(this.player.x + 2) - } else { - this.player.setX(this.Mappy.widthInPixels) - } - - if (this.Mappy.widthInPixels > (xCameraPosition + (window.innerWidth / RESOLUTION))) { - if (this.player.x > this.startX) { - this.moveCamera(1, 0, speedMultiplier); - } - } else { - this.cameras.main.scrollX = (this.Mappy.widthInPixels - (window.innerWidth / RESOLUTION)); - } - } else { - this.managePlayerAnimation('none'); - } - /*this.cameras.main.scrollX = Math.floor(300 + 300 * Math.cos(this.angle)); - this.cameras.main.scrollY = Math.floor(300 + 300 * Math.sin(this.angle)); - - this.angle = dt * 0.0001;*/ - } - - managePlayerAnimation(direction: string) { - if (!this.player.anims.currentAnim || this.player.anims.currentAnim.key !== direction) { - this.player.anims.play(direction); - } else if (direction === 'none' && this.player.anims.currentAnim) { - this.player.anims.currentAnim.destroy(); - } - } -} diff --git a/front/src/Phaser/Entity/PlayableCaracter.ts b/front/src/Phaser/Entity/PlayableCaracter.ts new file mode 100644 index 00000000..3a18ea73 --- /dev/null +++ b/front/src/Phaser/Entity/PlayableCaracter.ts @@ -0,0 +1,58 @@ +import {getPlayerAnimations, playAnimation, PlayerAnimationNames} from "../Player/Animation"; +import {ActiveEventList, UserInputEvent} from "../UserInput/UserInputManager"; +import {SpeechBubble} from "./SpeechBubble"; + +export class PlayableCaracter extends Phaser.Physics.Arcade.Sprite { + private bubble: SpeechBubble; + + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: string | number) { + super(scene, x, y, texture, frame); + + this.scene.sys.updateList.add(this); + this.scene.sys.displayList.add(this); + this.setScale(2); + this.scene.physics.world.enableBody(this); + this.setImmovable(true); + this.setCollideWorldBounds(true); + this.setSize(16, 16); //edit the hitbox to better match the caracter model + this.setOffset(8, 16); + } + + move(x: number, y: number){ + + this.setVelocity(x, y); + + //todo improve animations to better account for diagonal movement + if (this.body.velocity.x > 0) { //moving right + this.play(PlayerAnimationNames.WalkRight, true); + } + if (this.body.velocity.x < 0) { //moving left + this.anims.playReverse(PlayerAnimationNames.WalkLeft, true); + } + if (this.body.velocity.y < 0) { //moving up + this.play(PlayerAnimationNames.WalkUp, true); + } + if (this.body.velocity.y > 0) { //moving down + this.play(PlayerAnimationNames.WalkDown, true); + } + + if(this.bubble) { + this.bubble.moveBubble(this.x, this.y); + } + } + + stop(){ + this.setVelocity(0, 0); + this.play(PlayerAnimationNames.None, true); + } + + say(text: string) { + if (this.bubble) return; + this.bubble = new SpeechBubble(this.scene, this, text) + //todo make the buble destroy on player movement? + setTimeout(() => { + this.bubble.destroy(); + this.bubble = null; + }, 3000) + } +} \ No newline at end of file diff --git a/front/src/Phaser/Entity/SpeechBubble.ts b/front/src/Phaser/Entity/SpeechBubble.ts new file mode 100644 index 00000000..51aaa169 --- /dev/null +++ b/front/src/Phaser/Entity/SpeechBubble.ts @@ -0,0 +1,88 @@ +import Scene = Phaser.Scene; +import {PlayableCaracter} from "./PlayableCaracter"; + +export class SpeechBubble { + private bubble: Phaser.GameObjects.Graphics; + private content: Phaser.GameObjects.Text; + + /** + * + * @param scene + * @param player + * @param text + */ + constructor(scene: Scene, player: PlayableCaracter, text: string = "") { + + let bubbleHeight = 50; + let bubblePadding = 10; + let bubbleWidth = bubblePadding * 2 + text.length * 10; + let arrowHeight = bubbleHeight / 4; + + this.bubble = scene.add.graphics({ x: player.x + 16, y: player.y - 80 }); + + // Bubble shadow + this.bubble.fillStyle(0x222222, 0.5); + this.bubble.fillRoundedRect(6, 6, bubbleWidth, bubbleHeight, 16); + + // this.bubble color + this.bubble.fillStyle(0xffffff, 1); + + // this.bubble outline line style + this.bubble.lineStyle(4, 0x565656, 1); + + // this.bubble shape and outline + this.bubble.strokeRoundedRect(0, 0, bubbleWidth, bubbleHeight, 16); + this.bubble.fillRoundedRect(0, 0, bubbleWidth, bubbleHeight, 16); + + // Calculate arrow coordinates + let point1X = Math.floor(bubbleWidth / 7); + let point1Y = bubbleHeight; + let point2X = Math.floor((bubbleWidth / 7) * 2); + let point2Y = bubbleHeight; + let point3X = Math.floor(bubbleWidth / 7); + let point3Y = Math.floor(bubbleHeight + arrowHeight); + + // bubble arrow shadow + this.bubble.lineStyle(4, 0x222222, 0.5); + this.bubble.lineBetween(point2X - 1, point2Y + 6, point3X + 2, point3Y); + + // bubble arrow fill + this.bubble.fillTriangle(point1X, point1Y, point2X, point2Y, point3X, point3Y); + this.bubble.lineStyle(2, 0x565656, 1); + this.bubble.lineBetween(point2X, point2Y, point3X, point3Y); + this.bubble.lineBetween(point1X, point1Y, point3X, point3Y); + + this.content = scene.add.text(0, 0, text, { fontFamily: 'Arial', fontSize: 20, color: '#000000', align: 'center', wordWrap: { width: bubbleWidth - (bubblePadding * 2) } }); + + let bounds = this.content.getBounds(); + this.content.setPosition(this.bubble.x + (bubbleWidth / 2) - (bounds.width / 2), this.bubble.y + (bubbleHeight / 2) - (bounds.height / 2)); + } + + /** + * + * @param x + * @param y + */ + moveBubble(x : number, y : number) { + if (this.bubble) { + this.bubble.setPosition((x + 16), (y - 80)); + } + if (this.content) { + let bubbleHeight = 50; + let bubblePadding = 10; + let bubbleWidth = bubblePadding * 2 + this.content.text.length * 10; + let bounds = this.content.getBounds(); + //this.content.setPosition(x, y); + this.content.setPosition(this.bubble.x + (bubbleWidth / 2) - (bounds.width / 2), this.bubble.y + (bubbleHeight / 2) - (bounds.height / 2)); + } + } + + destroy(): void { + this.bubble.setVisible(false) //todo find a better way + this.bubble.destroy(); + this.bubble = null; + this.content.destroy(); + this.content = null; + } + +} \ No newline at end of file diff --git a/front/src/Phaser/Entity/Sprite.ts b/front/src/Phaser/Entity/Sprite.ts new file mode 100644 index 00000000..f2abad52 --- /dev/null +++ b/front/src/Phaser/Entity/Sprite.ts @@ -0,0 +1,8 @@ +export class Sprite extends Phaser.GameObjects.Sprite { + + constructor(scene: Phaser.Scene, x: number, y: number, texture: string, frame?: number | string) { + super(scene, x, y, texture, frame); + scene.sys.updateList.add(this); + scene.sys.displayList.add(this); + } +} \ No newline at end of file diff --git a/front/src/Phaser/Game/GameManager.ts b/front/src/Phaser/Game/GameManager.ts new file mode 100644 index 00000000..d03a3152 --- /dev/null +++ b/front/src/Phaser/Game/GameManager.ts @@ -0,0 +1,77 @@ +import {GameSceneInterface, GameScene} from "./GameScene"; +import {ROOM} from "../../Enum/EnvironmentVariable" +import {Connexion, ConnexionInterface, ListMessageUserPositionInterface} from "../../Connexion"; + +export enum StatusGameManagerEnum { + IN_PROGRESS = 1, + CURRENT_USER_CREATED = 2 +} + +export let ConnexionInstance : ConnexionInterface; + +export interface GameManagerInterface { + GameScenes: Array; + status : number; + createCurrentPlayer() : void; + shareUserPosition(ListMessageUserPosition : ListMessageUserPositionInterface): void; +} +export class GameManager implements GameManagerInterface { + GameScenes: Array = []; + status: number; + + constructor() { + this.status = StatusGameManagerEnum.IN_PROGRESS; + ConnexionInstance = new Connexion("test@gmail.com", this); + } + + createGame(){ + return ConnexionInstance.createConnexion().then(() => { + this.configureGame(); + /** TODO add loader in the page **/ + }).catch((err) => { + console.error(err); + throw err; + }); + } + + /** + * permit to config rooms + */ + configureGame() { + ROOM.forEach((roomId) => { + let newGame = new GameScene(roomId, this); + this.GameScenes.push((newGame as GameSceneInterface)); + }); + } + + /** + * Permit to create player in started room + * @param RoomId + * @param UserId + */ + createCurrentPlayer(): void { + //Get started room send by the backend + let game: GameSceneInterface = this.GameScenes.find((Game: GameSceneInterface) => Game.RoomId === ConnexionInstance.startedRoom); + game.createCurrentPlayer(ConnexionInstance.userId); + this.status = StatusGameManagerEnum.CURRENT_USER_CREATED; + } + + /** + * Share position in game + * @param ListMessageUserPosition + */ + shareUserPosition(ListMessageUserPosition: ListMessageUserPositionInterface): void { + if (this.status === StatusGameManagerEnum.IN_PROGRESS) { + return; + } + try { + let Game: GameSceneInterface = this.GameScenes.find((Game: GameSceneInterface) => Game.RoomId === ListMessageUserPosition.roomId); + if (!Game) { + return; + } + Game.shareUserPosition(ListMessageUserPosition.listUsersPosition) + } catch (e) { + console.error(e); + } + } +} \ No newline at end of file diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts new file mode 100644 index 00000000..32f57ae3 --- /dev/null +++ b/front/src/Phaser/Game/GameScene.ts @@ -0,0 +1,266 @@ +import {GameManagerInterface, StatusGameManagerEnum} from "./GameManager"; +import {MessageUserPositionInterface} from "../../Connexion"; +import {CurrentGamerInterface, GamerInterface, Player} from "../Player/Player"; +import {DEBUG_MODE, RESOLUTION, ZOOM_LEVEL} from "../../Enum/EnvironmentVariable"; +import Tile = Phaser.Tilemaps.Tile; +import {ITiledMap, ITiledTileSet} from "../Map/ITiledMap"; +import {cypressAsserter} from "../../Cypress/CypressAsserter"; + +export enum Textures { + Rock = 'rock', + Player = 'playerModel', + Map = 'map' +} + +export interface GameSceneInterface extends Phaser.Scene { + RoomId : string; + Map: Phaser.Tilemaps.Tilemap; + createCurrentPlayer(UserId : string) : void; + shareUserPosition(UsersPosition : Array): void; +} +export class GameScene extends Phaser.Scene implements GameSceneInterface{ + GameManager : GameManagerInterface; + RoomId : string; + Terrains : Array; + CurrentPlayer: CurrentGamerInterface; + MapPlayers : Phaser.Physics.Arcade.Group; + Map: Phaser.Tilemaps.Tilemap; + Layers : Array; + Objects : Array; + map: ITiledMap; + startX = (window.innerWidth / 2) / RESOLUTION; + startY = (window.innerHeight / 2) / RESOLUTION; + + + constructor(RoomId : string, GameManager : GameManagerInterface) { + super({ + key: "GameScene" + }); + this.RoomId = RoomId; + this.GameManager = GameManager; + this.Terrains = []; + } + + //hook preload scene + preload(): void { + cypressAsserter.preloadStarted(); + let mapUrl = 'maps/map.json'; + this.load.on('filecomplete-tilemapJSON-'+Textures.Map, (key: string, type: string, data: any) => { + // Triggered when the map is loaded + // Load tiles attached to the map recursively + this.map = data.data; + this.map.tilesets.forEach((tileset) => { + if (typeof tileset.name === 'undefined' || typeof tileset.image === 'undefined') { + console.warn("Don't know how to handle tileset ", tileset) + return; + } + let path = mapUrl.substr(0, mapUrl.lastIndexOf('/')); + this.load.image(tileset.name, path + '/' + tileset.image); + }) + }); + this.load.tilemapTiledJSON(Textures.Map, mapUrl); + this.load.image(Textures.Rock, 'resources/objects/rockSprite.png'); + this.load.spritesheet(Textures.Player, + 'resources/characters/pipoya/Male 01-1.png', + { frameWidth: 32, frameHeight: 32 } + ); + cypressAsserter.preloadFinished(); + } + + //hook initialisation + init(){} + + //hook create scene + create(): void { + cypressAsserter.initStarted(); + + //initalise map + this.Map = this.add.tilemap("map"); + this.map.tilesets.forEach((tileset: ITiledTileSet) => { + this.Terrains.push(this.Map.addTilesetImage(tileset.name, tileset.name)); + }); + + //permit to set bound collision + this.physics.world.setBounds(0,0, this.Map.widthInPixels, this.Map.heightInPixels); + + //add layer on map + this.Layers = new Array(); + let depth = -2; + this.map.layers.forEach((layer) => { + if (layer.type === 'tilelayer') { + this.addLayer( this.Map.createStaticLayer(layer.name, this.Terrains, 0, 0).setDepth(depth) ); + } else if (layer.type === 'objectgroup' && layer.name === 'floorLayer') { + depth = -1; + } + }); + + if (depth === -2) { + throw new Error('Your map MUST contain a layer of type "objectgroup" whose name is "floorLayer" that represents the layer characters are drawn at.'); + } + + //add entities + this.Objects = new Array(); + this.addSpite(this.physics.add.sprite(200, 400, Textures.Rock, 26)); + + //init event click + this.EventToClickOnTile(); + + //initialise list of other player + this.MapPlayers = this.physics.add.group({ immovable: true }); + + //notify game manager can to create currentUser in map + this.GameManager.createCurrentPlayer(); + + + //initialise camera + this.initCamera(); + cypressAsserter.initFinished(); + } + + //todo: in a dedicated class/function? + initCamera() { + this.cameras.main.setBounds(0,0, this.Map.widthInPixels, this.Map.heightInPixels); + this.cameras.main.startFollow(this.CurrentPlayer); + this.cameras.main.setZoom(ZOOM_LEVEL); + } + + addLayer(Layer : Phaser.Tilemaps.StaticTilemapLayer){ + this.Layers.push(Layer); + } + + createCollisionWithPlayer() { + //add collision layer + this.Layers.forEach((Layer: Phaser.Tilemaps.StaticTilemapLayer) => { + this.physics.add.collider(this.CurrentPlayer, Layer, (object1: any, object2: any) => { + //this.CurrentPlayer.say("Collision with layer : "+ (object2 as Tile).layer.name) + }); + Layer.setCollisionByProperty({collides: true}); + if (DEBUG_MODE) { + //debug code to see the collision hitbox of the object in the top layer + Layer.renderDebug(this.add.graphics(), { + tileColor: null, //non-colliding tiles + collidingTileColor: new Phaser.Display.Color(243, 134, 48, 200), // Colliding tiles, + faceColor: new Phaser.Display.Color(40, 39, 37, 255) // Colliding face edges + }); + } + }); + } + + addSpite(Object : Phaser.Physics.Arcade.Sprite){ + Object.setImmovable(true); + this.Objects.push(Object); + } + + createCollisionObject(){ + this.Objects.forEach((Object : Phaser.Physics.Arcade.Sprite) => { + this.physics.add.collider(this.CurrentPlayer, Object, (object1: any, object2: any) => { + //this.CurrentPlayer.say("Collision with object : " + (object2 as Phaser.Physics.Arcade.Sprite).texture.key) + }); + }) + } + + createCurrentPlayer(UserId : string){ + //initialise player + this.CurrentPlayer = new Player( + UserId, + this, + this.startX, + this.startY, + ); + this.CurrentPlayer.initAnimation(); + + //create collision + this.createCollisionWithPlayer(); + this.createCollisionObject(); + } + + EventToClickOnTile(){ + // debug code to get a tile properties by clicking on it + this.input.on("pointerdown", (pointer: Phaser.Input.Pointer)=>{ + //pixel position toz tile position + let tile = this.Map.getTileAt(this.Map.worldToTileX(pointer.worldX), this.Map.worldToTileY(pointer.worldY)); + if(tile){ + console.log(tile) + this.CurrentPlayer.say("Your touch " + tile.layer.name); + } + }); + } + + /** + * @param time + * @param delta The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ + update(time: number, delta: number) : void { + this.CurrentPlayer.moveUser(delta); + } + + /** + * Share position in scene + * @param UsersPosition + */ + shareUserPosition(UsersPosition : Array): void { + this.updateOrCreateMapPlayer(UsersPosition); + } + + /** + * Create new player and clean the player on the map + * @param UsersPosition + */ + updateOrCreateMapPlayer(UsersPosition : Array){ + if(!this.CurrentPlayer){ + return; + } + + //add or create new user + UsersPosition.forEach((userPosition : MessageUserPositionInterface) => { + if(userPosition.userId === this.CurrentPlayer.userId){ + return; + } + let player = this.findPlayerInMap(userPosition.userId); + if(!player){ + this.addPlayer(userPosition); + }else{ + player.updatePosition(userPosition); + } + }); + + //clean map + this.MapPlayers.getChildren().forEach((player: GamerInterface) => { + if(UsersPosition.find((message : MessageUserPositionInterface) => message.userId === player.userId)){ + return; + } + player.destroy(); + this.MapPlayers.remove(player); + }); + } + + private findPlayerInMap(UserId : string) : GamerInterface | null{ + let player = this.MapPlayers.getChildren().find((player: Player) => UserId === player.userId); + if(!player){ + return null; + } + return (player as GamerInterface); + } + + /** + * Create new player + * @param MessageUserPosition + */ + addPlayer(MessageUserPosition : MessageUserPositionInterface){ + //initialise player + let player = new Player( + MessageUserPosition.userId, + this, + MessageUserPosition.position.x, + MessageUserPosition.position.y, + ); + player.initAnimation(); + this.MapPlayers.add(player); + player.updatePosition(MessageUserPosition); + + //init colision + this.physics.add.collider(this.CurrentPlayer, player, (CurrentPlayer: CurrentGamerInterface, MapPlayer: GamerInterface) => { + CurrentPlayer.say("Hello, how are you ? "); + }); + } +} diff --git a/front/src/Phaser/Map/ITiledMap.ts b/front/src/Phaser/Map/ITiledMap.ts new file mode 100644 index 00000000..ca10f218 --- /dev/null +++ b/front/src/Phaser/Map/ITiledMap.ts @@ -0,0 +1,113 @@ +/** + * Tiled Map Interface + * + * Represents the interface for the Tiled exported data structure (JSON). Used + * when loading resources via Resource loader. + */ +export interface ITiledMap { + width: number; + height: number; + layers: ITiledMapLayer[]; + nextobjectid: number; + + /** + * Map orientation (orthogonal) + */ + orientation: string; + properties: {[key: string]: string}; + + /** + * Render order (right-down) + */ + renderorder: string; + tileheight: number; + tilewidth: number; + tilesets: ITiledTileSet[]; + version: number; +} + +export interface ITiledMapLayer { + data: number[]|string; + height: number; + name: string; + opacity: number; + properties: {[key: string]: string}; + encoding: string; + compression?: string; + + /** + * Type of layer (tilelayer, objectgroup) + */ + type: string; + visible: boolean; + width: number; + x: number; + y: number; + + /** + * Draw order (topdown (default), index) + */ + draworder: string; + objects: ITiledMapObject[]; +} + +export interface ITiledMapObject { + id: number; + + /** + * Tile object id + */ + gid: number; + height: number; + name: string; + properties: {[key: string]: string}; + rotation: number; + type: string; + visible: boolean; + width: number; + x: number; + y: number; + + /** + * Whether or not object is an ellipse + */ + ellipse: boolean; + + /** + * Polygon points + */ + polygon: {x: number, y: number}[]; + + /** + * Polyline points + */ + polyline: {x: number, y: number}[]; +} + +export interface ITiledTileSet { + firstgid: number; + image: string; + + imageheight: number; + imagewidth: number; + margin: number; + name: string; + properties: {[key: string]: string}; + spacing: number; + tilecount: number; + tileheight: number; + tilewidth: number; + transparentcolor: string; + terrains: ITiledMapTerrain[]; + tiles: {[key: string]: { terrain: number[] }}; + + /** + * Refers to external tileset file (should be JSON) + */ + source: string; +} + +export interface ITiledMapTerrain { + name: string; + tile: number; +} diff --git a/front/src/Phaser/NonPlayer/NonPlayer.ts b/front/src/Phaser/NonPlayer/NonPlayer.ts new file mode 100644 index 00000000..63012e46 --- /dev/null +++ b/front/src/Phaser/NonPlayer/NonPlayer.ts @@ -0,0 +1,40 @@ +import {PlayableCaracter} from "../Entity/PlayableCaracter"; +import {Textures} from "../Game/GameScene"; +import {UserInputEvent} from "../UserInput/UserInputManager"; +import {Player} from "../Player/Player"; +import {MessageUserPositionInterface} from "../../Connexion"; +import {playAnimation} from "../Player/Animation"; + +export class NonPlayer extends PlayableCaracter { + + isFleeing: boolean = false; + fleeingDirection:any = null //todo create a vector class + + constructor(scene: Phaser.Scene, x: number, y: number) { + super(scene, x, y, Textures.Player, 1); + this.setSize(32, 32); //edit the hitbox to better match the caracter model + } + + + updatePosition(MessageUserPosition : MessageUserPositionInterface){ + playAnimation(this, MessageUserPosition.position.direction); + this.setX(MessageUserPosition.position.x); + this.setY(MessageUserPosition.position.y); + } + + fleeFrom(player:Player) { + if (this.isFleeing) return; + this.say("Don't touch me!"); + this.isFleeing = true; + + setTimeout(() => { + this.say("Feww, I escaped."); + this.isFleeing = false + this.fleeingDirection = null + }, 3000); + + let vectorX = this.x - player.x; + let vectorY = this.y - player.y; + this.fleeingDirection = {x: vectorX, y: vectorY} + } +} \ No newline at end of file diff --git a/front/src/Phaser/Player/Animation.ts b/front/src/Phaser/Player/Animation.ts new file mode 100644 index 00000000..48f34682 --- /dev/null +++ b/front/src/Phaser/Player/Animation.ts @@ -0,0 +1,58 @@ +import {Textures} from "../Game/GameScene"; + +interface AnimationData { + key: string; + frameRate: number; + repeat: number; + frameModel: string; //todo use an enum + frameStart: number; + frameEnd: number; +} + +export enum PlayerAnimationNames { + WalkDown = 'down', + WalkLeft = 'left', + WalkUp = 'up', + WalkRight = 'right', + None = 'none', +} + +export const getPlayerAnimations = (): AnimationData[] => { + return [{ + key: PlayerAnimationNames.WalkDown, + frameModel: Textures.Player, + frameStart: 0, + frameEnd: 2, + frameRate: 10, + repeat: -1 + }, { + key: PlayerAnimationNames.WalkLeft, + frameModel: Textures.Player, + frameStart: 3, + frameEnd: 5, + frameRate: 10, + repeat: -1 + }, { + key: PlayerAnimationNames.WalkRight, + frameModel: Textures.Player, + frameStart: 6, + frameEnd: 8, + frameRate: 10, + repeat: -1 + }, { + key: PlayerAnimationNames.WalkUp, + frameModel: Textures.Player, + frameStart: 9, + frameEnd: 11, + frameRate: 10, + repeat: -1 + }]; +}; + +export const playAnimation = (Player : Phaser.GameObjects.Sprite, direction : string) => { + if (!Player.anims.currentAnim || Player.anims.currentAnim.key !== direction) { + Player.anims.play(direction); + } else if (direction === PlayerAnimationNames.None && Player.anims.currentAnim) { + Player.anims.currentAnim.destroy(); + } +} diff --git a/front/src/Phaser/Player/Player.ts b/front/src/Phaser/Player/Player.ts new file mode 100644 index 00000000..e99fa42a --- /dev/null +++ b/front/src/Phaser/Player/Player.ts @@ -0,0 +1,107 @@ +import {getPlayerAnimations, playAnimation, PlayerAnimationNames} from "./Animation"; +import {GameSceneInterface, Textures} from "../Game/GameScene"; +import {ConnexionInstance} from "../Game/GameManager"; +import {MessageUserPositionInterface} from "../../Connexion"; +import {ActiveEventList, UserInputEvent, UserInputManager} from "../UserInput/UserInputManager"; +import {PlayableCaracter} from "../Entity/PlayableCaracter"; + +export interface CurrentGamerInterface extends PlayableCaracter{ + userId : string; + PlayerValue : string; + initAnimation() : void; + moveUser(delta: number) : void; + say(text : string) : void; +} + +export interface GamerInterface extends PlayableCaracter{ + userId : string; + PlayerValue : string; + initAnimation() : void; + updatePosition(MessageUserPosition : MessageUserPositionInterface) : void; + say(text : string) : void; +} + +export class Player extends PlayableCaracter implements CurrentGamerInterface, GamerInterface { + userId: string; + PlayerValue: string; + userInputManager: UserInputManager; + + constructor( + userId: string, + Scene: GameSceneInterface, + x: number, + y: number, + PlayerValue: string = Textures.Player + ) { + super(Scene, x, y, PlayerValue, 1); + + //create input to move + this.userInputManager = new UserInputManager(Scene); + + //set data + this.userId = userId; + this.PlayerValue = PlayerValue; + + //the current player model should be push away by other players to prevent conflict + this.setImmovable(false); + } + + initAnimation(): void { + getPlayerAnimations().forEach(d => { + this.scene.anims.create({ + key: d.key, + frames: this.scene.anims.generateFrameNumbers(d.frameModel, {start: d.frameStart, end: d.frameEnd}), + frameRate: d.frameRate, + repeat: d.repeat + }); + }) + } + + moveUser(delta: number): void { + //if user client on shift, camera and player speed + let haveMove = false; + let direction = null; + + let activeEvents = this.userInputManager.getEventListForGameTick(); + let speedMultiplier = activeEvents.get(UserInputEvent.SpeedUp) ? 25 : 9; + let moveAmount = speedMultiplier * delta; + + if (activeEvents.get(UserInputEvent.MoveUp)) { + this.move(0, -moveAmount); + haveMove = true; + direction = PlayerAnimationNames.WalkUp; + } + if (activeEvents.get(UserInputEvent.MoveLeft)) { + this.move(-moveAmount, 0); + haveMove = true; + direction = PlayerAnimationNames.WalkLeft; + } + if (activeEvents.get(UserInputEvent.MoveDown)) { + this.move(0, moveAmount); + haveMove = true; + direction = PlayerAnimationNames.WalkDown; + } + if (activeEvents.get(UserInputEvent.MoveRight)) { + this.move(moveAmount, 0); + haveMove = true; + direction = PlayerAnimationNames.WalkRight; + } + if (!haveMove) { + direction = PlayerAnimationNames.None; + this.stop(); + } + this.sharePosition(direction); + } + + private sharePosition(direction: string) { + if (ConnexionInstance) { + ConnexionInstance.sharePosition((this.scene as GameSceneInterface).RoomId, this.x, this.y, direction); + } + } + + updatePosition(MessageUserPosition: MessageUserPositionInterface) { + playAnimation(this, MessageUserPosition.position.direction); + this.setX(MessageUserPosition.position.x); + this.setY(MessageUserPosition.position.y); + } +} diff --git a/front/src/Phaser/UserInput/UserInputManager.ts b/front/src/Phaser/UserInput/UserInputManager.ts new file mode 100644 index 00000000..6c5b32c2 --- /dev/null +++ b/front/src/Phaser/UserInput/UserInputManager.ts @@ -0,0 +1,68 @@ +import Map = Phaser.Structs.Map; +import {GameSceneInterface} from "../Game/GameScene"; + +interface UserInputManagerDatum { + keyCode: number; + keyInstance: Phaser.Input.Keyboard.Key; + event: UserInputEvent +} + +export enum UserInputEvent { + MoveLeft = 1, + MoveUp, + MoveRight, + MoveDown, + SpeedUp, + Interact, + Shout, +} + +//we cannot the map structure so we have to create a replacment +export class ActiveEventList { + private KeysCode : any; + constructor() { + this.KeysCode = {}; + } + get(event: UserInputEvent): boolean { + return this.KeysCode[event] || false; + } + set(event: UserInputEvent, value: boolean): boolean { + return this.KeysCode[event] = true; + } +} + +//this class is responsible for catching user inputs and listing all active user actions at every game tick events. +export class UserInputManager { + private KeysCode: UserInputManagerDatum[] = [ + {keyCode: Phaser.Input.Keyboard.KeyCodes.Z, event: UserInputEvent.MoveUp, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.Q, event: UserInputEvent.MoveLeft, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.S, event: UserInputEvent.MoveDown, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.D, event: UserInputEvent.MoveRight, keyInstance: null}, + + {keyCode: Phaser.Input.Keyboard.KeyCodes.UP, event: UserInputEvent.MoveUp, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.LEFT, event: UserInputEvent.MoveLeft, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.DOWN, event: UserInputEvent.MoveDown, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.RIGHT, event: UserInputEvent.MoveRight, keyInstance: null}, + + {keyCode: Phaser.Input.Keyboard.KeyCodes.SHIFT, event: UserInputEvent.SpeedUp, keyInstance: null}, + + {keyCode: Phaser.Input.Keyboard.KeyCodes.E, event: UserInputEvent.Interact, keyInstance: null}, + {keyCode: Phaser.Input.Keyboard.KeyCodes.F, event: UserInputEvent.Shout, keyInstance: null}, + ]; + + constructor(Scene : GameSceneInterface) { + this.KeysCode.forEach(d => { + d.keyInstance = Scene.input.keyboard.addKey(d.keyCode); + }); + } + + getEventListForGameTick(): ActiveEventList { + let eventsMap = new ActiveEventList(); + this.KeysCode.forEach(d => { + if (d. keyInstance.isDown) { + eventsMap.set(d.event, true); + } + }); + return eventsMap; + } +} \ No newline at end of file diff --git a/front/src/index.ts b/front/src/index.ts index cf100627..e5306389 100644 --- a/front/src/index.ts +++ b/front/src/index.ts @@ -1,22 +1,32 @@ import 'phaser'; import GameConfig = Phaser.Types.Core.GameConfig; -import {GameScene} from "./GameScene"; -import {Connexion} from "./Connexion"; -import {RESOLUTION} from "./Enum/EnvironmentVariable"; +import {GameManager} from "./Phaser/Game/GameManager"; +import {DEBUG_MODE, RESOLUTION} from "./Enum/EnvironmentVariable"; +import {cypressAsserter} from "./Cypress/CypressAsserter"; + +let gameManager = new GameManager(); const config: GameConfig = { title: "Office game", width: window.innerWidth / RESOLUTION, height: window.innerHeight / RESOLUTION, parent: "game", - scene: [GameScene], + scene: gameManager.GameScenes, zoom: RESOLUTION, + physics: { + default: "arcade", + arcade: { + debug: DEBUG_MODE + } + } }; -let game = new Phaser.Game(config); +cypressAsserter.gameStarted(); -window.addEventListener('resize', function (event) { - game.scale.resize(window.innerWidth / RESOLUTION, window.innerHeight / RESOLUTION); +gameManager.createGame().then(() => { + let game = new Phaser.Game(config); + + window.addEventListener('resize', function (event) { + game.scale.resize(window.innerWidth / RESOLUTION, window.innerHeight / RESOLUTION); + }); }); - -const connexion = new Connexion("test@gmail.com"); diff --git a/front/webpack.config.js b/front/webpack.config.js index 21431e4c..ff164804 100644 --- a/front/webpack.config.js +++ b/front/webpack.config.js @@ -29,6 +29,6 @@ module.exports = { new webpack.ProvidePlugin({ Phaser: 'phaser' }), - new webpack.EnvironmentPlugin(['API_URL']) + new webpack.EnvironmentPlugin(['API_URL', 'DEBUG_MODE']) ] };