diff --git a/Jenkinsfile b/Jenkinsfile index 18a2532f8236797c5f074eadcd9b6c160a9ef22a..5951a3a73926717b32d52927973e298a09cff5c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,19 @@ +import groovy.json.JsonOutput + +// From https://issues.jenkins-ci.org/browse/JENKINS-44231 + +// Given arbitrary string returns a strongly escaped shell string literal. +// I.e. it will be in single quotes which turns off interpolation of $(...), etc. +// E.g.: 1'2\3\'4 5"6 (groovy string) -> '1'\''2\3\'\''4 5"6' (groovy string which can be safely pasted into shell command). +def shellString(s) { + // Replace ' with '\'' (https://unix.stackexchange.com/a/187654/260156). Then enclose with '...'. + // 1) Why not replace \ with \\? Because '...' does not treat backslashes in a special way. + // 2) And why not use ANSI-C quoting? I.e. we could replace ' with \' + // and enclose using $'...' (https://stackoverflow.com/a/8254156/4839573). + // Because ANSI-C quoting is not yet supported by Dash (default shell in Ubuntu & Debian) (https://unix.stackexchange.com/a/371873). + '\'' + s.replace('\'', '\'\\\'\'') + '\'' +} + pipeline { agent any @@ -6,9 +22,41 @@ pipeline { } stages { + stage('pre-build') { + steps { + sh 'rm -rf ./build ./tmp' + } + } + stage('build') { steps { - build 'reticulum' + script { + def baseAssetsPath = env.BASE_ASSETS_PATH + def assetBundleServer = env.ASSET_BUNDLE_SERVER + def targetS3Url = env.TARGET_S3_URL + def smokeURL = env.SMOKE_URL + def slackURL = env.SLACK_URL + + def habCommand = "sudo /usr/bin/hab-docker-studio -k mozillareality run /bin/bash scripts/hab-build-and-push.sh ${baseAssetsPath} ${assetBundleServer} ${targetS3Url} ${env.BUILD_NUMBER} ${env.GIT_COMMIT}" + sh "/usr/bin/script --return -c ${shellString(habCommand)} /dev/null" + + def gitMessage = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'[%an] %s'").trim() + def gitSha = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim() + def text = ( + "*<http://localhost:8080/job/${env.JOB_NAME}/${env.BUILD_NUMBER}|#${env.BUILD_NUMBER}>* *${env.JOB_NAME}* " + + "<https://github.com/mozilla/hubs/commit/$gitSha|$gitSha> " + + "Hubs: ```${gitSha} ${gitMessage}```\n" + + "<${smokeURL}?required_version=${env.BUILD_NUMBER}|Smoke Test> - to push:\n" + + "`/mr hubs deploy ${targetS3Url}`" + ) + def payload = 'payload=' + JsonOutput.toJson([ + text : text, + channel : "#mr-builds", + username : "buildbot", + icon_emoji: ":gift:" + ]) + sh "curl -X POST --data-urlencode ${shellString(payload)} ${slackURL}" + } } } } diff --git a/README.md b/README.md index ac2dc0909948d9fd01ab525024151664940c691c..d42dacae191ad8c4902202e5ca08fbb7b8a72404 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,3 @@ This will allow the CSP checks to pass that are served up by Reticulum so you ca * [Hubs-Ops](https://github.com/mozilla/hubs-ops) - Infrastructure as code + management tools for running necessary backend services on AWS. [](http://waffle.io/mozilla/socialmr) - diff --git a/package.json b/package.json index 77f346d45a92b2ec9fda34b4e9fcd4498dd5dabe..e00268df1c385b2f50b24aa98dec0f6a85441bde 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "postinstall": "node ./scripts/postinstall.js", - "start": "cross-env NODE_ENV=development webpack-dev-server", + "start": "cross-env NODE_ENV=development webpack-dev-server --mode=production", "build": "rimraf ./public && cross-env NODE_ENV=production webpack --mode=production", "doc": "node ./scripts/doc/build.js", "prettier": "prettier --write '*.js' 'src/**/*.js'", @@ -34,16 +34,13 @@ "classnames": "^2.2.5", "copy-to-clipboard": "^3.0.8", "copy-webpack-plugin": "^4.5.1", + "deepmerge": "^2.1.1", "detect-browser": "^2.1.0", - "device-detect": "^1.0.7", "event-target-shim": "^3.0.1", "form-urlencoded": "^2.0.4", "jsonschema": "^1.2.2", - "mobile-detect": "^1.4.1", - "moment": "^2.22.0", - "moment-timezone": "^0.5.14", "moving-average": "^1.0.0", - "naf-janus-adapter": "^0.9.0", + "naf-janus-adapter": "^0.10.1", "networked-aframe": "https://github.com/mozillareality/networked-aframe#bug/aframe-initialization-race-condition", "nipplejs": "https://github.com/mozillareality/nipplejs#mr-social-client/master", "phoenix": "^1.3.0", diff --git a/scripts/bot/package.json b/scripts/bot/package.json index 6cce5823eb1095573315d55ba19227ad718cca6a..d9072e158422a09738b3f266e96046b5e24c61bf 100644 --- a/scripts/bot/package.json +++ b/scripts/bot/package.json @@ -5,7 +5,6 @@ "devDependencies": { "docopt": "^0.6.2", "puppeteer": "1.1.0", - "query-string": "^5.0.1", - "serve": "^6.5.6" + "query-string": "^5.0.1" } } diff --git a/scripts/bot/run-bot.sh b/scripts/bot/run-bot.sh deleted file mode 100755 index aa693b25a11eca48bb83d4cc51115fdf6138f2eb..0000000000000000000000000000000000000000 --- a/scripts/bot/run-bot.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env sh - -script_directory=$(dirname "$0") -script_directory=$(realpath "$script_directory") - -echo 'Installing Hubs dependencies' -cd $script_directory/../.. -yarn -echo 'Building Hubs' -yarn build > /dev/null - -cd $script_directory -echo 'Installing bot dependencies' -yarn -echo 'Running Hubs' -yarn serve --ssl --port 8080 ../../public & -echo 'Running bots' -if [ "$1" != "" ]; then - node run-bot.js --room $1 -else - node run-bot.js -fi - -trap 'kill $(jobs -pr)' SIGINT SIGTERM EXIT diff --git a/scripts/bot/yarn.lock b/scripts/bot/yarn.lock index 3d46cd1ee8b87b01aed47b770f6ccf67ac822dab..2a00417d6e3c8f03d8a2e1661aa0a25655511164 100644 --- a/scripts/bot/yarn.lock +++ b/scripts/bot/yarn.lock @@ -2,98 +2,20 @@ # yarn lockfile v1 -accepts@~1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" - dependencies: - mime-types "~2.1.18" - negotiator "0.6.1" - -address@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" - agent-base@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce" dependencies: es6-promisify "^5.0.0" -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-align@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" - dependencies: - string-width "^2.0.0" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - dependencies: - color-convert "^1.9.0" - -arch@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.0.tgz#3613aa46149064b3c1f0607919bf1d4786e82889" - -args@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/args/-/args-4.0.0.tgz#5ca24cdba43d4b17111c56616f5f2e9d91933954" - dependencies: - camelcase "5.0.0" - chalk "2.3.2" - leven "2.1.0" - mri "1.1.0" - async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -basic-auth@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.0.tgz#015db3f353e02e56377755f962742e8981e7bbba" - dependencies: - safe-buffer "5.1.1" - -bluebird@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" - -boxen@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" - dependencies: - ansi-align "^2.0.0" - camelcase "^4.0.0" - chalk "^2.0.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^1.2.0" - widest-line "^2.0.0" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -101,100 +23,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" - -camelcase@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -camelcase@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^2.0.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -cli-boxes@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" - -clipboardy@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" - dependencies: - arch "^2.1.0" - execa "^0.8.0" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" - dependencies: - color-name "^1.1.1" - -color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -compressible@~2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" - dependencies: - mime-db ">= 1.33.0 < 2" - -compression@^1.6.2: - version "1.7.2" - resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" - dependencies: - accepts "~1.3.4" - bytes "3.0.0" - compressible "~2.0.13" - debug "2.6.9" - on-headers "~1.0.1" - safe-buffer "5.1.1" - vary "~1.1.2" - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -207,27 +35,11 @@ concat-stream@1.6.0: readable-stream "^2.2.2" typedarray "^0.0.6" -content-type@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -dargs@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" - -debug@2.6.9, debug@^2.6.0, debug@^2.6.8: +debug@2.6.9, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -239,49 +51,14 @@ debug@^3.1.0: dependencies: ms "2.0.0" -decamelize@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" -deep-extend@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" - -depd@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - -detect-port@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.2.2.tgz#57a44533632d8bc74ad255676866ca43f96c7469" - dependencies: - address "^1.0.1" - debug "^2.6.0" - docopt@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/docopt/-/docopt-0.6.2.tgz#b28e9e2220da5ec49f7ea5bb24a47787405eeb11" -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - es6-promise@^4.0.3: version "4.2.4" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29" @@ -292,42 +69,6 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - extract-zip@^1.6.5: version "1.6.6" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.6.tgz#1290ede8d20d0872b429fd3f351ca128ec5ef85c" @@ -343,30 +84,10 @@ fd-slicer@~1.0.1: dependencies: pend "~1.2.0" -filesize@3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - -fs-extra@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - glob@^7.0.5: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -378,42 +99,6 @@ glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -handlebars@4.0.11: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - -http-errors@1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" - dependencies: - depd "1.1.1" - inherits "2.0.3" - setprototypeof "1.0.3" - statuses ">= 1.3.1 < 2" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - https-proxy-agent@^2.1.0: version "2.2.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" @@ -421,10 +106,6 @@ https-proxy-agent@^2.1.0: agent-base "^4.1.0" debug "^3.1.0" -iconv-lite@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -432,102 +113,14 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" -ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - -ip@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-stream@1.1.0, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - optionalDependencies: - graceful-fs "^4.1.6" - -kind-of@^3.0.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - dependencies: - is-buffer "^1.1.5" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -leven@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -lru-cache@^4.0.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -micro-compress@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/micro-compress/-/micro-compress-1.0.0.tgz#53f5a80b4ad0320ca165a559b6e3df145d4f704f" - dependencies: - compression "^1.6.2" - -micro@9.1.4: - version "9.1.4" - resolved "https://registry.yarnpkg.com/micro/-/micro-9.1.4.tgz#dbe655f34bb3390509898ddf3fda12348f5cbaa9" - dependencies: - content-type "1.0.4" - is-stream "1.1.0" - mri "1.1.0" - raw-body "2.3.2" - -"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - -mime-types@2.1.18, mime-types@~2.1.18: - version "2.1.18" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - dependencies: - mime-db "~1.33.0" - -mime@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" - mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -542,109 +135,34 @@ minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - mkdirp@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.0.tgz#1d73076a6df986cd9344e15e71fcc05a4c9abf12" dependencies: minimist "0.0.8" -mri@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.0.tgz#5c0a3f29c8ccffbbb1ec941dcec09d71fa32f36a" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -negotiator@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" - -node-version@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.3.tgz#1081c87cce6d2dbbd61d0e51e28c287782678496" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - dependencies: - path-key "^2.0.0" - object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" - once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" -openssl-self-signed-certificate@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/openssl-self-signed-certificate/-/openssl-self-signed-certificate-1.1.6.tgz#9d3a4776b1a57e9847350392114ad2f915a83dd4" - -opn@5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" - dependencies: - is-wsl "^1.1.0" - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -path-key@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - -path-type@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - dependencies: - pify "^3.0.0" - pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" @@ -657,10 +175,6 @@ proxy-from-env@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - puppeteer@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.1.0.tgz#97fbc2fbbf9ab659e7e202a68ac1ba54b8bc0a25" @@ -682,28 +196,6 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -range-parser@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - -raw-body@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" - dependencies: - bytes "3.0.0" - http-errors "1.6.2" - iconv-lite "0.4.19" - unpipe "1.0.0" - -rc@^1.0.1, rc@^1.1.6: - version "1.2.7" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.7.tgz#8a10ca30d588d00464360372b890d06dacd02297" - dependencies: - deep-extend "^0.5.1" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - readable-stream@^2.2.2: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" @@ -716,239 +208,38 @@ readable-stream@^2.2.2: string_decoder "~1.1.1" util-deprecate "~1.0.1" -registry-auth-token@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" - dependencies: - rc "^1.1.6" - safe-buffer "^5.0.1" - -registry-url@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" - dependencies: - rc "^1.0.1" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - rimraf@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: glob "^7.0.5" -safe-buffer@5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" -send@0.16.2: - version "0.16.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.6.2" - mime "1.4.1" - ms "2.0.0" - on-finished "~2.3.0" - range-parser "~1.2.0" - statuses "~1.4.0" - -serve@^6.5.6: - version "6.5.6" - resolved "https://registry.yarnpkg.com/serve/-/serve-6.5.6.tgz#579136688f80f6bf4a618ca8e8cba10dfb4d95e3" - dependencies: - args "4.0.0" - basic-auth "2.0.0" - bluebird "3.5.1" - boxen "1.3.0" - chalk "2.4.0" - clipboardy "1.2.3" - dargs "5.1.0" - detect-port "1.2.2" - filesize "3.6.1" - fs-extra "5.0.0" - handlebars "4.0.11" - ip "1.1.5" - micro "9.1.4" - micro-compress "1.0.0" - mime-types "2.1.18" - node-version "1.1.3" - openssl-self-signed-certificate "1.1.6" - opn "5.3.0" - path-is-inside "1.0.2" - path-type "3.0.0" - send "0.16.2" - update-check "1.3.2" - -setprototypeof@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@~0.5.1: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - -"statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2": - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - -statuses@~1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" - strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" -string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: safe-buffer "~5.1.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@^5.3.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - dependencies: - has-flag "^3.0.0" - -term-size@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" - dependencies: - execa "^0.7.0" - typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" -universalify@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" - -unpipe@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - -update-check@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.3.2.tgz#460f9e9ab24820367f3edbeb4d4142d9936ff171" - dependencies: - registry-auth-token "3.3.2" - registry-url "3.1.0" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - -which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - -widest-line@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" - dependencies: - string-width "^2.1.1" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -961,19 +252,6 @@ ws@^3.0.0: safe-buffer "~5.1.0" ultron "~1.1.0" -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" diff --git a/scripts/build_local_reticulum.sh b/scripts/build_local_reticulum.sh deleted file mode 100755 index 9a19f9f202b688b27213b0478f9e1a14e67d2620..0000000000000000000000000000000000000000 --- a/scripts/build_local_reticulum.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -if [ ! -e ../reticulum ]; then - echo "This script assumes reticulum is checked out in a sibling to this folder." -fi - -rm -rf ../reticulum/priv/static ; GENERATE_SMOKE_TESTS=true BASE_ASSETS_PATH=https://hubs.local:4000/ yarn build -- --output-path ../reticulum/priv/static diff --git a/scripts/hab-build-and-push.sh b/scripts/hab-build-and-push.sh new file mode 100755 index 0000000000000000000000000000000000000000..f890d0e053a95860c5d758a5288c451ac7bc89f1 --- /dev/null +++ b/scripts/hab-build-and-push.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +export BASE_ASSETS_PATH=$1 +export ASSET_BUNDLE_SERVER=$2 +export TARGET_S3_URL=$3 +export BUILD_NUMBER=$4 +export GIT_COMMIT=$5 +export BUILD_VERSION="${BUILD_NUMBER} (${GIT_COMMIT})" + +# To build + push to S3 run: +# hab studio run "bash scripts/hab-build-and-push.sh" + +# On exit, need to make all files writable so CI can clean on next build +trap 'chmod -R a+rw .' EXIT + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +pushd "$DIR/.." + +mkdir -p .yarn +mkdir -p node_modules +mkdir -p build + +# Yarn expects /usr/local/share +# https://github.com/yarnpkg/yarn/issues/4628 +mkdir -p /usr/local/share + +rm /usr/bin/env +ln -s "$(hab pkg path core/coreutils)/bin/env" /usr/bin/env +hab pkg install -b core/coreutils core/bash core/node core/yarn core/git core/aws-cli + +yarn install --cache-folder .yarn +GENERATE_SMOKE_TESTS=true yarn build --output-path build +mkdir build/pages +mv build/*.html build/pages + +aws s3 sync --acl public-read --cache-control "max-age=31556926" build/assets "$TARGET_S3_URL/assets" +aws s3 sync --acl public-read --cache-control "no-cache" --delete build/pages "$TARGET_S3_URL/pages/latest" diff --git a/scripts/run-local-reticulum.sh b/scripts/run-local-reticulum.sh new file mode 100644 index 0000000000000000000000000000000000000000..976d858cd8dd7adea49ae587995759c431420182 --- /dev/null +++ b/scripts/run-local-reticulum.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +BASE_ASSETS_PATH=https://hubs.local:8080/ DEV_RETICULUM_SERVER=hubs.local:4000 yarn start diff --git a/src/assets/translations.data.json b/src/assets/translations.data.json index 79d11599544849a83f9982617dafddd3bb6c268a..1f8ae6a1b0986b0576ad3dd567b1fc8bb96c1d86 100644 --- a/src/assets/translations.data.json +++ b/src/assets/translations.data.json @@ -40,6 +40,7 @@ "exit.subtitle.closed": "This room is no longer available.", "exit.subtitle.full": "This room is full, please try again later.", "exit.subtitle.connect_error": "Unable to connect to this room, please try again later.", + "exit.subtitle.version_mismatch": "The version you deployed is not available yet. Your browser will refresh in 5 seconds.", "autoexit.title": "Auto-ending session in ", "autoexit.title_units": " seconds", "autoexit.subtitle": "You have started another session.", diff --git a/src/components/cursor-controller.js b/src/components/cursor-controller.js index c14e3046b50d55f910ab890cb9e77382728506f9..7e09d0cf1831a3925cac432b87dddd0625d51410 100644 --- a/src/components/cursor-controller.js +++ b/src/components/cursor-controller.js @@ -66,7 +66,7 @@ AFRAME.registerComponent("cursor-controller", { const rayObject = this.data.rayObject.object3D; rayObjectRotation.setFromRotationMatrix(rayObject.matrixWorld); this.direction - .set(0, 0, 1) + .set(0, 0, -1) .applyQuaternion(rayObjectRotation) .normalize(); this.origin.setFromMatrixPosition(rayObject.matrixWorld); diff --git a/src/hub.html b/src/hub.html index 523b9dcb722f3099ff3e52a4980fafb02db7019a..b021ae952b3eef4ad3cddf7d1c8434dfd66317ba 100644 --- a/src/hub.html +++ b/src/hub.html @@ -40,15 +40,15 @@ vr-mode-ui="enabled: false" pinch-to-move input-configurator=" - gazeCursorRayObject: #player-camera-reverse-z; + gazeCursorRayObject: #player-camera; cursorController: #cursor-controller; gazeTeleporter: #gaze-teleport; camera: #player-camera; playerRig: #player-rig; leftController: #player-left-controller; - leftControllerRayObject: #player-left-controller-reverse-z; + leftControllerRayObject: #player-left-controller; rightController: #player-right-controller; - rightControllerRayObject: #player-right-controller-reverse-z;" + rightControllerRayObject: #player-right-controller;" > <a-assets> @@ -100,7 +100,7 @@ <a-entity class="model" gltf-model-plus="inflate: true"> <template data-name="RootScene"> - <a-entity ik-controller hand-pose__left hand-pose__right animation-mixer space-invader-mesh="meshSelector: .Bot_Skinned"></a-entity> + <a-entity ik-controller hand-pose__left hand-pose__right animation-mixer space-invader-mesh="meshName: Bot_Skinned"></a-entity> </template> <template data-name="Neck"> @@ -116,13 +116,12 @@ </template> <template data-name="Chest"> - <a-entity> - <a-entity personal-space-invader="radius: 0.2; useMaterial: true;" bone-visibility> </a-entity> - <a-entity billboard> - <a-entity mixin="rounded-text-button" block-button visible-while-frozen ui-class-while-frozen position="0 0 .35"> </a-entity> - <a-entity visible-while-frozen text="value:Block; width:2.5; align:center;" position="0 0 0.36"></a-entity> - </a-entity> + <a-entity personal-space-invader="radius: 0.2; useMaterial: true;" bone-visibility> + <a-entity billboard> + <a-entity mixin="rounded-text-button" block-button visible-while-frozen ui-class-while-frozen position="0 0 .35"> </a-entity> + <a-entity visible-while-frozen text="value:Block; width:2.5; align:center;" position="0 0 0.36"></a-entity> </a-entity> + </a-entity> </template> <template data-name="Head"> @@ -142,11 +141,6 @@ </a-entity> </template> - <!-- needs to exist for the benefit of the personal space calculator --> - <template data-name="Bot_Skinned"> - <a-entity></a-entity> - </template> - <template data-name="LeftHand"> <a-entity personal-space-invader="radius: 0.1" bone-visibility></a-entity> </template> @@ -287,7 +281,6 @@ hitOpacity: 0.3; missOpacity: 0.2;" ></a-entity> - <a-entity id="player-camera-reverse-z" rotation="0 180 0"></a-entity> </a-entity> <a-entity @@ -309,7 +302,6 @@ mixin="controller-super-hands" controls-shape-offset > - <a-entity id="player-left-controller-reverse-z" rotation="0 180 0"></a-entity> </a-entity> <a-entity @@ -331,7 +323,6 @@ mixin="controller-super-hands" controls-shape-offset > - <a-entity id="player-right-controller-reverse-z" rotation="0 180 0"></a-entity> </a-entity> <a-entity gltf-model-plus="inflate: true;" @@ -365,7 +356,7 @@ <a-entity bone-visibility></a-entity> </template> - </a-entity> + </a-entity> </a-entity> <!-- Environment --> diff --git a/src/hub.js b/src/hub.js index 47c1c2f616677e890c7d471d0d20bfdd4a3a51bd..03c78589b4b340010a71558a51b20a94705b4167 100644 --- a/src/hub.js +++ b/src/hub.js @@ -1,5 +1,6 @@ +console.log(`Hubs version: ${process.env.BUILD_VERSION || "?"}`); + import "./assets/stylesheets/hub.scss"; -import moment from "moment-timezone"; import queryString from "query-string"; import { patchWebGLRenderingContext } from "./utils/webgl"; @@ -344,7 +345,7 @@ const onReady = async () => { document.body.addEventListener("connected", () => { if (!isBotMode) { hubChannel.sendEntryEvent().then(() => { - store.update({ activity: { lastEnteredAt: moment().toJSON() } }); + store.update({ activity: { lastEnteredAt: new Date().toISOString() } }); }); } remountUI({ occupantCount: NAF.connection.adapter.publisher.initialOccupants.length + 1 }); @@ -442,6 +443,16 @@ const onReady = async () => { return; } + if (qs.required_version && process.env.BUILD_VERSION) { + const buildNumber = process.env.BUILD_VERSION.split(" ", 1)[0]; // e.g. "123 (abcd5678)" + if (qs.required_version !== buildNumber) { + remountUI({ roomUnavailableReason: "version_mismatch" }); + setTimeout(() => document.location.reload(), 5000); + exitScene(); + return; + } + } + getAvailableVREntryTypes().then(availableVREntryTypes => { if (availableVREntryTypes.gearvr === VR_DEVICE_AVAILABILITY.yes) { remountUI({ availableVREntryTypes, forcedVREntryType: "gearvr" }); diff --git a/src/index.js b/src/index.js index 2383019035144bc82277e15baa01b034f6244754..32558cd4ec93844c558ce5d45fed8d54824ac01a 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,6 @@ import InfoDialog from "./react-components/info-dialog.js"; import queryString from "query-string"; const qs = queryString.parse(location.search); - registerTelemetry(); ReactDOM.render( diff --git a/src/react-components/entry-buttons.js b/src/react-components/entry-buttons.js index f2551df70f99813c5e74be91e7e627de3374feab..d2bddfd908e9a40044d2349bd0729e38a7a25caf 100644 --- a/src/react-components/entry-buttons.js +++ b/src/react-components/entry-buttons.js @@ -1,7 +1,6 @@ import React from "react"; import { FormattedMessage } from "react-intl"; import PropTypes from "prop-types"; -import MobileDetect from "mobile-detect"; import MobileScreenEntryImg from "../assets/images/mobile_screen_entry.svg"; import DesktopScreenEntryImg from "../assets/images/desktop_screen_entry.svg"; @@ -10,8 +9,6 @@ import GearVREntryImg from "../assets/images/gearvr_entry.svg"; import DaydreamEntryImg from "../assets/images/daydream_entry.svg"; import DeviceEntryImg from "../assets/images/device_entry.svg"; -const mobiledetect = new MobileDetect(navigator.userAgent); - const EntryButton = props => ( <button className="entry-button" onClick={props.onClick}> <img src={props.iconSrc} className="entry-button__icon" /> @@ -45,9 +42,9 @@ EntryButton.propTypes = { export const TwoDEntryButton = props => { const entryButtonProps = { ...props, - iconSrc: mobiledetect.mobile() ? MobileScreenEntryImg : DesktopScreenEntryImg, + iconSrc: AFRAME.utils.device.isMobile() ? MobileScreenEntryImg : DesktopScreenEntryImg, prefixMessageId: "entry.screen-prefix", - mediumMessageId: mobiledetect.mobile() ? "entry.mobile-screen" : "entry.desktop-screen" + mediumMessageId: AFRAME.utils.device.isMobile() ? "entry.mobile-screen" : "entry.desktop-screen" }; return <EntryButton {...entryButtonProps} />; @@ -59,7 +56,7 @@ export const GenericEntryButton = props => { iconSrc: GenericVREntryImg, prefixMessageId: "entry.generic-prefix", mediumMessageId: "entry.generic-medium", - subtitle: mobiledetect.mobile() ? null : "entry.generic-subtitle-desktop" + subtitle: AFRAME.utils.device.isMobile() ? null : "entry.generic-subtitle-desktop" }; return <EntryButton {...entryButtonProps} />; @@ -102,13 +99,13 @@ export const DeviceEntryButton = props => { const entryButtonProps = { ...props, iconSrc: DeviceEntryImg, - prefixMessageId: mobiledetect.mobile() ? "entry.device-prefix-mobile" : "entry.device-prefix-desktop", + prefixMessageId: AFRAME.utils.device.isMobile() ? "entry.device-prefix-mobile" : "entry.device-prefix-desktop", mediumMessageId: "entry.device-medium" }; entryButtonProps.subtitle = entryButtonProps.isInHMD ? "entry.device-subtitle-vr" - : mobiledetect.mobile() ? "entry.device-subtitle-mobile" : "entry.device-subtitle-desktop"; + : AFRAME.utils.device.isMobile() ? "entry.device-subtitle-mobile" : "entry.device-subtitle-desktop"; return <EntryButton {...entryButtonProps} />; }; diff --git a/src/react-components/hub-create-panel.js b/src/react-components/hub-create-panel.js index 7e44ce63093ad5ad3df772807794140cab9af2b9..dc10b99ac217609b07bda59422c805c5ea4f1581 100644 --- a/src/react-components/hub-create-panel.js +++ b/src/react-components/hub-create-panel.js @@ -85,7 +85,7 @@ class HubCreatePanel extends Component { const hub = await res.json(); - if (process.env.NODE_ENV === "production") { + if (process.env.NODE_ENV === "production" || document.location.host === process.env.DEV_RETICULUM_SERVER) { document.location = hub.url; } else { document.location = `/hub.html?hub_id=${hub.hub_id}`; diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index c0733064a8fa05a513b040aeeb54401aca12ef1a..ce6358cb8ca3063f11fbb35894e7e69f99469840 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -3,7 +3,6 @@ import PropTypes from "prop-types"; import classNames from "classnames"; import { VR_DEVICE_AVAILABILITY } from "../utils/vr-caps-detect"; import queryString from "query-string"; -import MobileDetect from "mobile-detect"; import { IntlProvider, FormattedMessage, addLocaleData } from "react-intl"; import en from "react-intl/locale-data/en"; import MovingAverage from "moving-average"; @@ -27,8 +26,6 @@ import Footer from "./footer"; import FontAwesomeIcon from "@fortawesome/react-fontawesome"; import faQuestion from "@fortawesome/fontawesome-free-solid/faQuestion"; -const mobiledetect = new MobileDetect(navigator.userAgent); - addLocaleData([...en]); const ENTRY_STEPS = { @@ -456,7 +453,7 @@ class UIRoot extends Component { }; shouldShowHmdMicWarning = () => { - if (mobiledetect.mobile()) return false; + if (AFRAME.utils.device.isMobile()) return false; if (!this.state.enterInVR) return false; if (!this.hasHmdMicrophone()) return false; @@ -484,7 +481,7 @@ class UIRoot extends Component { }; onAudioReadyButton = () => { - if (mobiledetect.mobile() && !this.state.enterInVR && screenfull.enabled) { + if (AFRAME.utils.device.isMobile() && !this.state.enterInVR && screenfull.enabled) { screenfull.request(); } @@ -613,7 +610,7 @@ class UIRoot extends Component { // Only show this in desktop firefox since other browsers/platforms will ignore the "screen" media constraint and // will attempt to share your webcam instead! const screenSharingCheckbox = this.props.enableScreenSharing && - !mobiledetect.mobile() && + !AFRAME.utils.device.isMobile() && /firefox/i.test(navigator.userAgent) && ( <label className="entry-panel__screen-sharing"> <input @@ -699,7 +696,7 @@ class UIRoot extends Component { clip: `rect(${maxLevelHeight - Math.floor(this.state.micLevel * maxLevelHeight)}px, 111px, 111px, 0px)` }; const speakerClip = { clip: `rect(${this.state.tonePlaying ? 0 : maxLevelHeight}px, 111px, 111px, 0px)` }; - + const subtitleId = AFRAME.utils.device.isMobile() ? "audio.subtitle-mobile" : "audio.subtitle-desktop"; const audioSetupPanel = this.state.entryStep === ENTRY_STEPS.audio_setup ? ( <div className="audio-setup-panel"> @@ -708,9 +705,7 @@ class UIRoot extends Component { <FormattedMessage id="audio.title" /> </div> <div className="audio-setup-panel__subtitle"> - {(mobiledetect.mobile() || this.state.enterInVR) && ( - <FormattedMessage id={mobiledetect.mobile() ? "audio.subtitle-mobile" : "audio.subtitle-desktop"} /> - )} + {(AFRAME.utils.device.isMobile() || this.state.enterInVR) && <FormattedMessage id={subtitleId} />} </div> <div className="audio-setup-panel__levels"> <div className="audio-setup-panel__levels__icon"> diff --git a/src/storage/store.js b/src/storage/store.js index e4e509ba3c1f1fc41b45d6816ba31f542f9c09cd..1b6d575ddd3f030a9b8e43897bfa907ba2842ffa 100644 --- a/src/storage/store.js +++ b/src/storage/store.js @@ -1,5 +1,5 @@ import { Validator } from "jsonschema"; -import merge from "lodash/merge"; +import merge from "deepmerge"; const LOCAL_STORE_KEY = "___hubs_store"; const STORE_STATE_CACHE_KEY = Symbol(); diff --git a/src/systems/personal-space-bubble.js b/src/systems/personal-space-bubble.js index 238c0b63f70c06502350b83dd354cbb256c755bf..23da15b839cd8130757587b2f717be154b243806 100644 --- a/src/systems/personal-space-bubble.js +++ b/src/systems/personal-space-bubble.js @@ -120,10 +120,10 @@ function createSphereGizmo(radius) { */ AFRAME.registerComponent("space-invader-mesh", { schema: { - meshSelector: { type: "string" } + meshName: { type: "string" } }, - init() { - this.targetMesh = this.el.querySelector(this.data.meshSelector).object3DMap.skinnedmesh; + update() { + this.targetMesh = this.el.object3D.getObjectByName(this.data.meshName); } }); diff --git a/src/utils/disable-ios-zoom.js b/src/utils/disable-ios-zoom.js index c2d17104a6ae4b9b8c99221fe5bec8a8f79cc909..b80639e5b4c4c625330e3e31f19fe4cbf24c2ea3 100644 --- a/src/utils/disable-ios-zoom.js +++ b/src/utils/disable-ios-zoom.js @@ -1,8 +1,5 @@ -import MobileDetect from "mobile-detect"; -const mobiledetect = new MobileDetect(navigator.userAgent); - export function disableiOSZoom() { - if (!mobiledetect.is("iPhone") && !mobiledetect.is("iPad")) return; + if (!AFRAME.utils.device.isIOS()) return; let lastTouchAtMs = 0; diff --git a/src/utils/hub-channel.js b/src/utils/hub-channel.js index aad95ec4e7550ff29181789b9e8a8c299f8961db..d8b87730a98dea1feb8f98793323d4b74a139553 100644 --- a/src/utils/hub-channel.js +++ b/src/utils/hub-channel.js @@ -1,4 +1,13 @@ -import moment from "moment-timezone"; +const MS_PER_DAY = 1000 * 60 * 60 * 24; +const MS_PER_MONTH = 1000 * 60 * 60 * 24 * 30; + +function isSameMonth(da, db) { + return da.getFullYear() == db.getFullYear() && da.getMonth() == db.getMonth(); +} + +function isSameDay(da, db) { + return isSameMonth(da, db) && da.getDate() == db.getDate(); +} export default class HubChannel { constructor(store) { @@ -52,18 +61,15 @@ export default class HubChannel { return entryTimingFlags; } - const lastEntered = moment(storedLastEnteredAt); - const lastEnteredPst = moment(lastEntered).tz("America/Los_Angeles"); - const nowPst = moment().tz("America/Los_Angeles"); - const dayWindowAgo = moment().subtract(1, "day"); - const monthWindowAgo = moment().subtract(1, "month"); - - entryTimingFlags.isNewDaily = - lastEnteredPst.dayOfYear() !== nowPst.dayOfYear() || lastEnteredPst.year() !== nowPst.year(); - entryTimingFlags.isNewMonthly = - lastEnteredPst.month() !== nowPst.month() || lastEnteredPst.year() !== nowPst.year(); - entryTimingFlags.isNewDayWindow = lastEntered.isBefore(dayWindowAgo); - entryTimingFlags.isNewMonthWindow = lastEntered.isBefore(monthWindowAgo); + const now = new Date(); + const lastEntered = new Date(storedLastEnteredAt); + const msSinceLastEntered = now - lastEntered; + + // note that new daily and new monthly is based on client local time + entryTimingFlags.isNewDaily = !isSameDay(now, lastEntered); + entryTimingFlags.isNewMonthly = !isSameMonth(now, lastEntered); + entryTimingFlags.isNewDayWindow = msSinceLastEntered > MS_PER_DAY; + entryTimingFlags.isNewMonthWindow = msSinceLastEntered > MS_PER_MONTH; return entryTimingFlags; }; diff --git a/src/utils/vr-caps-detect.js b/src/utils/vr-caps-detect.js index 8953f12a86f24e9848c08e3619d718a2b0eda615..685fb3ba326cebd1febc8f6d6005c7c846a6d99b 100644 --- a/src/utils/vr-caps-detect.js +++ b/src/utils/vr-caps-detect.js @@ -1,9 +1,6 @@ const { detect } = require("detect-browser"); -import MobileDetect from "mobile-detect"; const browser = detect(); -const deviceDetect = require("device-detect")(); -const mobiledetect = new MobileDetect(navigator.userAgent); // Precision on device detection is fuzzy -- we can sometimes know if a device is definitely // available, or definitely *not* available, and assume it may be available otherwise. @@ -13,12 +10,12 @@ export const VR_DEVICE_AVAILABILITY = { maybe: "maybe" // Implies this device may support this VR platform, but may not be installed or in a compatible browser }; -function isMaybeGearVRCompatibleDevice() { - return navigator.userAgent.match(/\WAndroid\W/); +function isMaybeGearVRCompatibleDevice(ua) { + return /\WAndroid\W/.test(ua); } -function isMaybeDaydreamCompatibleDevice() { - return navigator.userAgent.match(/\WAndroid\W/); +function isMaybeDaydreamCompatibleDevice(ua) { + return /\WAndroid\W/.test(ua); } // Blacklist of VR device name regex matchers that we do not want to consider as valid VR devices @@ -46,8 +43,9 @@ const GENERIC_ENTRY_TYPE_DEVICE_BLACKLIST = [/cardboard/i]; // // This function also detects if the user is already in a headset, and returns the isInHMD key to be `true` if so. export async function getAvailableVREntryTypes() { - const isSamsungBrowser = browser.name === "chrome" && navigator.userAgent.match(/SamsungBrowser/); - const isOculusBrowser = navigator.userAgent.match(/Oculus/); + const ua = navigator.userAgent; + const isSamsungBrowser = browser.name === "chrome" && /SamsungBrowser/.test(ua); + const isOculusBrowser = /Oculus/.test(ua); const isInHMD = isOculusBrowser; // This needs to be kept up-to-date with the latest browsers that can support VR and Hubs. @@ -55,7 +53,7 @@ export async function getAvailableVREntryTypes() { const isWebVRCapableBrowser = window.hasNativeWebVRImplementation; const isDaydreamCapableBrowser = !!(isWebVRCapableBrowser && browser.name === "chrome" && !isSamsungBrowser); - const isIDevice = ["iPhone", "iPad", "iPod"].indexOf(deviceDetect.device) > -1; + const isIDevice = AFRAME.utils.device.isIOS(); const isFirefoxBrowser = browser.name === "firefox"; const isUIWebView = typeof navigator.mediaDevices === "undefined"; @@ -67,7 +65,7 @@ export async function getAvailableVREntryTypes() { ? VR_DEVICE_AVAILABILITY.no : isIDevice && isUIWebView ? VR_DEVICE_AVAILABILITY.maybe : VR_DEVICE_AVAILABILITY.yes; - let generic = mobiledetect.mobile() ? VR_DEVICE_AVAILABILITY.no : VR_DEVICE_AVAILABILITY.maybe; + let generic = AFRAME.utils.device.isMobile() ? VR_DEVICE_AVAILABILITY.no : VR_DEVICE_AVAILABILITY.maybe; let cardboard = VR_DEVICE_AVAILABILITY.no; // We only consider GearVR support as "maybe" and never "yes". The only browser @@ -76,21 +74,21 @@ export async function getAvailableVREntryTypes() { // // If we are in Oculus Browser (ie, we are literally wearing a GearVR) then return 'yes'. let gearvr = VR_DEVICE_AVAILABILITY.no; - if (isMaybeGearVRCompatibleDevice()) { + if (isMaybeGearVRCompatibleDevice(ua)) { gearvr = isOculusBrowser ? VR_DEVICE_AVAILABILITY.yes : VR_DEVICE_AVAILABILITY.maybe; } // For daydream detection, we first check if they are on an Android compatible device, and assume they // may support daydream *unless* this browser has WebVR capabilities, in which case we can do better. let daydream = - isMaybeDaydreamCompatibleDevice() && !isInHMD ? VR_DEVICE_AVAILABILITY.maybe : VR_DEVICE_AVAILABILITY.no; + isMaybeDaydreamCompatibleDevice(ua) && !isInHMD ? VR_DEVICE_AVAILABILITY.maybe : VR_DEVICE_AVAILABILITY.no; if (isWebVRCapableBrowser) { const displays = await navigator.getVRDisplays(); // Generic is supported for non-blacklisted devices and presentable HMDs. generic = displays.find( - d => d.capabilities.canPresent && !GENERIC_ENTRY_TYPE_DEVICE_BLACKLIST.find(r => d.displayName.match(r)) + d => d.capabilities.canPresent && !GENERIC_ENTRY_TYPE_DEVICE_BLACKLIST.find(r => r.test(d.displayName)) ) ? VR_DEVICE_AVAILABILITY.yes : VR_DEVICE_AVAILABILITY.no; @@ -98,12 +96,12 @@ export async function getAvailableVREntryTypes() { cardboard = !isIDevice && !isFirefoxBrowser && - displays.find(d => d.capabilities.canPresent && d.displayName.match(/cardboard/i)) + displays.find(d => d.capabilities.canPresent && /cardboard/i.test(d.displayName)) ? VR_DEVICE_AVAILABILITY.yes : VR_DEVICE_AVAILABILITY.no; // For daydream detection, in a WebVR browser we can increase confidence in daydream compatibility. - const hasDaydreamWebVRDevice = displays.find(d => d.displayName.match(/daydream/i)); + const hasDaydreamWebVRDevice = displays.find(d => /daydream/i.test(d.displayName)); if (hasDaydreamWebVRDevice) { // If we detected daydream via WebVR diff --git a/webpack.config.js b/webpack.config.js index 3c92d1b38b746d1646696d0eb93d7b3f00fadd2b..454da02049360c1fc11b4c7bcbe820b6537faf2e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,6 +8,7 @@ const webpack = require("webpack"); const HTMLWebpackPlugin = require("html-webpack-plugin"); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); +const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const _ = require("lodash"); const SMOKE_PREFIX = "smoke-"; @@ -99,6 +100,7 @@ const config = { useLocalIp: true, public: "hubs.local:8080", port: 8080, + headers: { "Access-Control-Allow-Origin": "*" }, before: function(app) { // networked-aframe makes HEAD requests to the server for time syncing. Respond with an empty body. app.head("*", function(req, res, next) { @@ -194,6 +196,10 @@ const config = { } ] }, + // necessary due to https://github.com/visionmedia/debug/issues/547 + optimization: { + minimizer: [new UglifyJsPlugin({ uglifyOptions: { compress: { collapse_vars: false } } })] + }, plugins: [ // Each output page needs a HTMLWebpackPlugin entry new HTMLWebpackPlugin({ @@ -266,7 +272,8 @@ const config = { NODE_ENV: process.env.NODE_ENV, JANUS_SERVER: process.env.JANUS_SERVER, DEV_RETICULUM_SERVER: process.env.DEV_RETICULUM_SERVER, - ASSET_BUNDLE_SERVER: process.env.ASSET_BUNDLE_SERVER + ASSET_BUNDLE_SERVER: process.env.ASSET_BUNDLE_SERVER, + BUILD_VERSION: process.env.BUILD_VERSION }) }) ] diff --git a/yarn.lock b/yarn.lock index 5fb77039d60a3778228c217d3933e2cb28c55f00..49626b04509d15282f5a2194385c7c55aec7be30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2501,6 +2501,10 @@ deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" +deepmerge@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.1.1.tgz#e862b4e45ea0555072bf51e7fd0d9845170ae768" + define-properties@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" @@ -2627,10 +2631,6 @@ detective@^5.0.2: defined "^1.0.0" minimist "^1.1.1" -device-detect@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/device-detect/-/device-detect-1.0.7.tgz#d4f1aa2fc3afbbc7d4b4dc182b9822dffc50a708" - diff@^2.1.2: version "2.2.3" resolved "https://registry.yarnpkg.com/diff/-/diff-2.2.3.tgz#60eafd0d28ee906e4e8ff0a52c1229521033bf99" @@ -5288,9 +5288,9 @@ min-document@^2.19.0: dependencies: dom-walk "^0.1.0" -minijanus@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/minijanus/-/minijanus-0.6.1.tgz#4d697313d58c4bdf9b762b6252981eaf7134c05f" +minijanus@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/minijanus/-/minijanus-0.6.2.tgz#c5746bfbbd0573b5c3c47742f16646c6af6f897c" minimalistic-assert@^1.0.0: version "1.0.0" @@ -5366,10 +5366,6 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd dependencies: minimist "0.0.8" -mobile-detect@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/mobile-detect/-/mobile-detect-1.4.1.tgz#f4b67c49bb84bf0437f72e3067deb1c60ad7b23c" - module-deps@^4.0.8: version "4.1.1" resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd" @@ -5410,16 +5406,6 @@ module-deps@^6.0.0: through2 "^2.0.0" xtend "^4.0.0" -moment-timezone@^0.5.14: - version "0.5.14" - resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.14.tgz#4eb38ff9538b80108ba467a458f3ed4268ccfcb1" - dependencies: - moment ">= 2.9.0" - -"moment@>= 2.9.0", moment@^2.22.0: - version "2.22.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.0.tgz#7921ade01017dd45186e7fee5f424f0b8663a730" - move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -5475,12 +5461,12 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -naf-janus-adapter@^0.9.0: - version "0.9.5" - resolved "https://registry.yarnpkg.com/naf-janus-adapter/-/naf-janus-adapter-0.9.5.tgz#81fcbf068daf66820892544de4d8357614e0152d" +naf-janus-adapter@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/naf-janus-adapter/-/naf-janus-adapter-0.10.1.tgz#e3bd4847dba002d38446d4bea4a6908b26229928" dependencies: debug "^3.1.0" - minijanus "0.6.1" + minijanus "0.6.2" nan@^2.3.0, nan@^2.3.2: version "2.9.1"