mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
commit
0866127916
37 changed files with 790 additions and 316 deletions
|
@ -24,7 +24,7 @@ var routes = routeJson.map(function (route) {
|
|||
|
||||
async.auto({
|
||||
version: function (cb) {
|
||||
fastly.getLatestVersion(function (err, response) {
|
||||
fastly.getLatestActiveVersion(function (err, response) {
|
||||
if (err) return cb(err);
|
||||
// Validate latest version before continuing
|
||||
if (response.active || response.locked) {
|
||||
|
|
|
@ -24,11 +24,11 @@ module.exports = function (apiKey, serviceId) {
|
|||
};
|
||||
|
||||
/*
|
||||
* getLatestVersion: Get the most recent version for the configured service
|
||||
* getLatestActiveVersion: Get the most recent version for the configured service
|
||||
*
|
||||
* @param {callback} Callback with signature *err, latestVersion)
|
||||
*/
|
||||
fastly.getLatestVersion = function (cb) {
|
||||
fastly.getLatestActiveVersion = function (cb) {
|
||||
if (!this.serviceId) {
|
||||
return cb('Failed to get latest version. No serviceId configured');
|
||||
}
|
||||
|
@ -37,11 +37,15 @@ module.exports = function (apiKey, serviceId) {
|
|||
if (err) {
|
||||
return cb('Failed to fetch versions: ' + err);
|
||||
}
|
||||
var latestVersion = versions.reduce(function (lateVersion, version) {
|
||||
if (!lateVersion) return version;
|
||||
if (version.number > lateVersion.number) return version;
|
||||
return lateVersion;
|
||||
});
|
||||
var latestVersion = versions.reduce((latestActiveSoFar, cur) => {
|
||||
// if one of [latestActiveSoFar, cur] is active and the other isn't,
|
||||
// return whichever is active. If both are not active, return
|
||||
// latestActiveSoFar.
|
||||
if (!cur || !cur.active) return latestActiveSoFar;
|
||||
if (!latestActiveSoFar || !latestActiveSoFar.active) return cur;
|
||||
// when both are active, prefer whichever has a higher version number.
|
||||
return (cur.number > latestActiveSoFar.number) ? cur : latestActiveSoFar;
|
||||
}, null);
|
||||
return cb(null, latestVersion);
|
||||
});
|
||||
};
|
||||
|
|
331
package-lock.json
generated
331
package-lock.json
generated
|
@ -5,9 +5,9 @@
|
|||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/cli": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.6.2.tgz",
|
||||
"integrity": "sha512-JDZ+T/br9pPfT2lmAMJypJDTTTHM9ePD/ED10TRjRzJVdEVy+JB3iRlhzYmTt5YkNgHvxWGlUVnLtdv6ruiDrQ==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.6.3.tgz",
|
||||
"integrity": "sha512-kWKOEeuylpa781yCeA5//eEx1u3WtLZqbi2VWXLKmb3QDPb5T2f7Yk311MK7bvvjR70dluAeiu4VXXsG1WwJsw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chokidar": "^2.1.8",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"mkdirp": "^0.5.1",
|
||||
"output-file-sync": "^2.0.0",
|
||||
"slash": "^2.0.0",
|
||||
"source-map": "^0.5.0"
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"anymatch": {
|
||||
|
@ -462,9 +462,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
@ -479,25 +479,25 @@
|
|||
}
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.2.tgz",
|
||||
"integrity": "sha512-l8zto/fuoZIbncm+01p8zPSDZu/VuuJhAfA7d/AbzM09WR7iVhavvfNDYCNpo1VvLk6E6xgAoP9P+/EMJHuRkQ==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.6.3.tgz",
|
||||
"integrity": "sha512-QfQ5jTBgXLzJuo7Mo8bZK/ePywmgNRgk/UQykiKwEtZPiFIn8ZqE6jB+AnD1hbB1S2xQyL4//it5vuAUOVAMTw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.5.5",
|
||||
"@babel/generator": "^7.6.2",
|
||||
"@babel/generator": "^7.6.3",
|
||||
"@babel/helpers": "^7.6.2",
|
||||
"@babel/parser": "^7.6.2",
|
||||
"@babel/parser": "^7.6.3",
|
||||
"@babel/template": "^7.6.0",
|
||||
"@babel/traverse": "^7.6.2",
|
||||
"@babel/types": "^7.6.0",
|
||||
"@babel/traverse": "^7.6.3",
|
||||
"@babel/types": "^7.6.3",
|
||||
"convert-source-map": "^1.1.0",
|
||||
"debug": "^4.1.0",
|
||||
"json5": "^2.1.0",
|
||||
"lodash": "^4.17.13",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.4.1",
|
||||
"source-map": "^0.5.0"
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
|
@ -510,21 +510,21 @@
|
|||
}
|
||||
},
|
||||
"@babel/generator": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.2.tgz",
|
||||
"integrity": "sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.3.tgz",
|
||||
"integrity": "sha512-hLhYbAb3pHwxjlijC4AQ7mqZdcoujiNaW7izCT04CIowHK8psN0IN8QjDv0iyFtycF5FowUOTwDloIheI25aMw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.6.0",
|
||||
"@babel/types": "^7.6.3",
|
||||
"jsesc": "^2.5.1",
|
||||
"lodash": "^4.17.13",
|
||||
"source-map": "^0.5.0"
|
||||
"source-map": "^0.6.1"
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.2.tgz",
|
||||
"integrity": "sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.3.tgz",
|
||||
"integrity": "sha512-sUZdXlva1dt2Vw2RqbMkmfoImubO0D0gaCrNngV6Hi0DA4x3o4mlrq0tbfY0dZEUIccH8I6wQ4qgEtwcpOR6Qg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/template": {
|
||||
|
@ -539,26 +539,26 @@
|
|||
}
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.2.tgz",
|
||||
"integrity": "sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz",
|
||||
"integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.5.5",
|
||||
"@babel/generator": "^7.6.2",
|
||||
"@babel/generator": "^7.6.3",
|
||||
"@babel/helper-function-name": "^7.1.0",
|
||||
"@babel/helper-split-export-declaration": "^7.4.4",
|
||||
"@babel/parser": "^7.6.2",
|
||||
"@babel/types": "^7.6.0",
|
||||
"@babel/parser": "^7.6.3",
|
||||
"@babel/types": "^7.6.3",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.13"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz",
|
||||
"integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz",
|
||||
"integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esutils": "^2.0.2",
|
||||
|
@ -588,9 +588,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz",
|
||||
"integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==",
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz",
|
||||
"integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
|
@ -609,9 +609,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
},
|
||||
"to-fast-properties": {
|
||||
|
@ -696,21 +696,21 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@babel/generator": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.2.tgz",
|
||||
"integrity": "sha512-j8iHaIW4gGPnViaIHI7e9t/Hl8qLjERI6DcV9kEpAIDJsAOrcnXqRS7t+QbhL76pwbtqP+QCQLL0z1CyVmtjjQ==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.6.3.tgz",
|
||||
"integrity": "sha512-hLhYbAb3pHwxjlijC4AQ7mqZdcoujiNaW7izCT04CIowHK8psN0IN8QjDv0iyFtycF5FowUOTwDloIheI25aMw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.6.0",
|
||||
"@babel/types": "^7.6.3",
|
||||
"jsesc": "^2.5.1",
|
||||
"lodash": "^4.17.13",
|
||||
"source-map": "^0.5.0"
|
||||
"source-map": "^0.6.1"
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.2.tgz",
|
||||
"integrity": "sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.6.3.tgz",
|
||||
"integrity": "sha512-sUZdXlva1dt2Vw2RqbMkmfoImubO0D0gaCrNngV6Hi0DA4x3o4mlrq0tbfY0dZEUIccH8I6wQ4qgEtwcpOR6Qg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/template": {
|
||||
|
@ -725,17 +725,17 @@
|
|||
}
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.2.tgz",
|
||||
"integrity": "sha512-8fRE76xNwNttVEF2TwxJDGBLWthUkHWSldmfuBzVRmEDWOtu4XdINTgN7TDWzuLg4bbeIMLvfMFD9we5YcWkRQ==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.6.3.tgz",
|
||||
"integrity": "sha512-unn7P4LGsijIxaAJo/wpoU11zN+2IaClkQAxcJWBNCMS6cmVh802IyLHNkAjQ0iYnRS3nnxk5O3fuXW28IMxTw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.5.5",
|
||||
"@babel/generator": "^7.6.2",
|
||||
"@babel/generator": "^7.6.3",
|
||||
"@babel/helper-function-name": "^7.1.0",
|
||||
"@babel/helper-split-export-declaration": "^7.4.4",
|
||||
"@babel/parser": "^7.6.2",
|
||||
"@babel/types": "^7.6.0",
|
||||
"@babel/parser": "^7.6.3",
|
||||
"@babel/types": "^7.6.3",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.13"
|
||||
|
@ -753,9 +753,9 @@
|
|||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz",
|
||||
"integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==",
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.3.tgz",
|
||||
"integrity": "sha512-CqbcpTxMcpuQTMhjI37ZHVgjBkysg5icREQIEZ0eG1yCNwg3oy+5AaLiOKmjsCj6nqOsa6Hf0ObjRVwokb7srA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esutils": "^2.0.2",
|
||||
|
@ -791,9 +791,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
},
|
||||
"to-fast-properties": {
|
||||
|
@ -1763,17 +1763,28 @@
|
|||
}
|
||||
},
|
||||
"babel-eslint": {
|
||||
"version": "10.0.2",
|
||||
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.2.tgz",
|
||||
"integrity": "sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q==",
|
||||
"version": "10.0.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.3.tgz",
|
||||
"integrity": "sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"@babel/parser": "^7.0.0",
|
||||
"@babel/traverse": "^7.0.0",
|
||||
"@babel/types": "^7.0.0",
|
||||
"eslint-scope": "3.7.1",
|
||||
"eslint-visitor-keys": "^1.0.0"
|
||||
"eslint-visitor-keys": "^1.0.0",
|
||||
"resolve": "^1.12.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"resolve": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
|
||||
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-generator": {
|
||||
|
@ -5059,16 +5070,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
|
||||
"integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esrecurse": "^4.1.0",
|
||||
"estraverse": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"eslint-utils": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz",
|
||||
|
@ -5971,28 +5972,28 @@
|
|||
"dependencies": {
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6003,14 +6004,14 @@
|
|||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6021,42 +6022,42 @@
|
|||
},
|
||||
"chownr": {
|
||||
"version": "1.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
|
||||
"integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6066,28 +6067,28 @@
|
|||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fs-minipass": {
|
||||
"version": "1.2.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
|
||||
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6097,14 +6098,14 @@
|
|||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"gauge": {
|
||||
"version": "2.7.4",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6121,7 +6122,7 @@
|
|||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6136,14 +6137,14 @@
|
|||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6153,7 +6154,7 @@
|
|||
},
|
||||
"ignore-walk": {
|
||||
"version": "3.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
|
||||
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6163,7 +6164,7 @@
|
|||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6174,21 +6175,21 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6198,14 +6199,14 @@
|
|||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6215,14 +6216,14 @@
|
|||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.3.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
|
||||
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6233,7 +6234,7 @@
|
|||
},
|
||||
"minizlib": {
|
||||
"version": "1.2.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
|
||||
"integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6243,7 +6244,7 @@
|
|||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6253,14 +6254,14 @@
|
|||
},
|
||||
"ms": {
|
||||
"version": "2.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "2.3.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz",
|
||||
"integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6272,7 +6273,7 @@
|
|||
},
|
||||
"node-pre-gyp": {
|
||||
"version": "0.12.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
|
||||
"integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6291,7 +6292,7 @@
|
|||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
|
||||
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6302,14 +6303,14 @@
|
|||
},
|
||||
"npm-bundled": {
|
||||
"version": "1.0.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
|
||||
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.4.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz",
|
||||
"integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6320,7 +6321,7 @@
|
|||
},
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6333,21 +6334,21 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6357,21 +6358,21 @@
|
|||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"osenv": {
|
||||
"version": "0.1.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6382,21 +6383,21 @@
|
|||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"rc": {
|
||||
"version": "1.2.8",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6409,7 +6410,7 @@
|
|||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
|
@ -6418,7 +6419,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6434,7 +6435,7 @@
|
|||
},
|
||||
"rimraf": {
|
||||
"version": "2.6.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
|
||||
"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6444,49 +6445,49 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6498,7 +6499,7 @@
|
|||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6508,7 +6509,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6518,14 +6519,14 @@
|
|||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"tar": {
|
||||
"version": "4.4.8",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
|
||||
"integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6541,14 +6542,14 @@
|
|||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
|
@ -6558,14 +6559,14 @@
|
|||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.0.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
|
||||
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
|
@ -11510,7 +11511,7 @@
|
|||
"dependencies": {
|
||||
"concat-stream": {
|
||||
"version": "1.5.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.1.tgz",
|
||||
"integrity": "sha1-87gKz54fSOOHXAaItBtsMWAu6hw=",
|
||||
"requires": {
|
||||
"inherits": "~2.0.1",
|
||||
|
@ -11520,12 +11521,12 @@
|
|||
"dependencies": {
|
||||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
|
||||
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.0.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.5.tgz",
|
||||
"integrity": "sha1-okJvjc1FUcd6M/lu3yiGojyClmk=",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
|
@ -11538,7 +11539,7 @@
|
|||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"isarray": {
|
||||
|
@ -11548,31 +11549,31 @@
|
|||
},
|
||||
"process-nextick-args": {
|
||||
"version": "1.0.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz",
|
||||
"integrity": "sha1-D5awAc6pCxJZLOVm7bl+wR5pvQU="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
}
|
||||
}
|
||||
},
|
||||
"typedarray": {
|
||||
"version": "0.0.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
}
|
||||
}
|
||||
},
|
||||
"https-proxy-agent": {
|
||||
"version": "0.3.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz",
|
||||
"integrity": "sha1-cT+jjl01P1DrFKNC/r4pAz7RYZs=",
|
||||
"requires": {
|
||||
"agent-base": "~1.0.1",
|
||||
|
@ -11582,12 +11583,12 @@
|
|||
"dependencies": {
|
||||
"agent-base": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-1.0.2.tgz",
|
||||
"integrity": "sha1-aJDT+yFwBLYrcPiSjg+uX4lSpwY="
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.2.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
|
||||
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
|
||||
"requires": {
|
||||
"ms": "0.7.1"
|
||||
|
@ -11595,26 +11596,26 @@
|
|||
"dependencies": {
|
||||
"ms": {
|
||||
"version": "0.7.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
|
||||
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
|
||||
}
|
||||
}
|
||||
},
|
||||
"extend": {
|
||||
"version": "3.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
|
||||
"integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
"json-stringify-safe": {
|
||||
"version": "5.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
||||
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.13",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.13.tgz",
|
||||
"integrity": "sha1-9u73ZPUUyJ4rniMUanW6EGdW0j4=",
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
|
@ -11625,12 +11626,12 @@
|
|||
"dependencies": {
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
|
||||
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
|
||||
},
|
||||
"isarray": {
|
||||
|
@ -11640,19 +11641,19 @@
|
|||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "4.3.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
|
||||
"integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto="
|
||||
},
|
||||
"yakaa": {
|
||||
"version": "1.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/yakaa/-/yakaa-1.0.1.tgz",
|
||||
"integrity": "sha1-PsqucvPQidpYCJQDEmIEzsdy5go="
|
||||
}
|
||||
}
|
||||
|
@ -15559,15 +15560,15 @@
|
|||
}
|
||||
},
|
||||
"scratch-gui": {
|
||||
"version": "0.1.0-prerelease.20190926141105",
|
||||
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190926141105.tgz",
|
||||
"integrity": "sha512-0/OLyeiU1qa+e35dsy+P/sz0V9bdgbID5Rs1VUuxpj+F+8QFUNuoZTWwKgqtAIb4M7Q6zg5ve+1iDrnzOMw3bQ==",
|
||||
"version": "0.1.0-prerelease.20191009193408",
|
||||
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20191009193408.tgz",
|
||||
"integrity": "sha512-FSYIjelP9NX7zrGah0od+UTszdbQcBHqyW2zTHE42hBwvg+nj+Q/p7IEIsAEG6hh7B++TXugzL5bKNmVZnjycQ==",
|
||||
"dev": true
|
||||
},
|
||||
"scratch-l10n": {
|
||||
"version": "3.5.20190924223720",
|
||||
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.5.20190924223720.tgz",
|
||||
"integrity": "sha512-5bNisTEe9WJI+w3TQQ7XVutoFZuBKtHLLfijFd2vOkLv93XoxEQvpW62uz34uyj2tX9N8JPzCB+KaJalC+Z8Mg==",
|
||||
"version": "3.6.20191008224547",
|
||||
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.6.20191008224547.tgz",
|
||||
"integrity": "sha512-J6AgB6oB+/ibamUNeyTdtSvkPzJchiD50xoUqzzlcPOv+AWOFSTOakGPzJnGE6/WeZ0njBThvy1rh23lamqiow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/cli": "^7.1.2",
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"autoprefixer": "6.3.6",
|
||||
"babel-cli": "6.26.0",
|
||||
"babel-core": "6.23.1",
|
||||
"babel-eslint": "10.0.2",
|
||||
"babel-eslint": "10.0.3",
|
||||
"babel-loader": "7.1.0",
|
||||
"babel-plugin-transform-object-rest-spread": "6.26.0",
|
||||
"babel-plugin-transform-require-context": "0.1.1",
|
||||
|
@ -126,7 +126,7 @@
|
|||
"redux-mock-store": "^1.2.3",
|
||||
"redux-thunk": "2.0.1",
|
||||
"sass-loader": "6.0.6",
|
||||
"scratch-gui": "0.1.0-prerelease.20190926141105",
|
||||
"scratch-gui": "0.1.0-prerelease.20191009193408",
|
||||
"scratch-l10n": "latest",
|
||||
"selenium-webdriver": "3.6.0",
|
||||
"slick-carousel": "1.6.0",
|
||||
|
|
|
@ -44,7 +44,7 @@ const ExtensionRequirements = props => (
|
|||
alt=""
|
||||
src="svgs/extensions/android.svg"
|
||||
/>
|
||||
Android 5.0+
|
||||
Android 6.0+
|
||||
</span>
|
||||
</React.Fragment>
|
||||
)}
|
||||
|
|
|
@ -135,7 +135,7 @@ const Footer = props => (
|
|||
</dd>
|
||||
<dd>
|
||||
<a href="/download">
|
||||
<FormattedMessage id="general.offlineEditor" />
|
||||
<FormattedMessage id="general.download" />
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
|
|
|
@ -26,3 +26,8 @@ input[type="checkbox"].formik-checkbox {
|
|||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.formik-checkbox-label {
|
||||
padding-top: .0625rem;
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
overflow: visible;
|
||||
color: $type-white;
|
||||
z-index: 1;
|
||||
font-weight: 500;
|
||||
|
||||
&:before {
|
||||
display: block;
|
||||
|
@ -82,7 +83,6 @@
|
|||
.validation-info {
|
||||
background-color: $ui-blue;
|
||||
box-shadow: 0 0 4px 2px rgba(0, 0, 0, .15);
|
||||
font-weight: 500;
|
||||
|
||||
&:before {
|
||||
background-color: $ui-blue;
|
||||
|
|
|
@ -46,11 +46,16 @@ const InstallScratch = ({
|
|||
>
|
||||
<span className="step-description">
|
||||
<React.Fragment>
|
||||
{isDownloaded(currentOS) && (
|
||||
{currentOS === OS_ENUM.WINDOWS && (
|
||||
<FormattedMessage
|
||||
id={CHROME_APP_RELEASED ? 'installScratch.downloadScratchAppGeneric' :
|
||||
id={CHROME_APP_RELEASED ? 'installScratch.getScratchAppWindows' :
|
||||
'installScratch.downloadScratchDesktop'}
|
||||
/>
|
||||
)}
|
||||
{currentOS === OS_ENUM.MACOS && (
|
||||
<FormattedMessage
|
||||
id={CHROME_APP_RELEASED ? 'installScratch.getScratchAppMacOs' :
|
||||
'installScratch.downloadScratchDesktop'}
|
||||
values={{operatingsystem: currentOS}}
|
||||
/>
|
||||
)}
|
||||
{isFromGooglePlay(currentOS) && (
|
||||
|
|
|
@ -174,7 +174,7 @@ class EmailStep extends React.Component {
|
|||
/* eslint-disable react/jsx-no-bind */
|
||||
onBlur={() => validateField('email')}
|
||||
onChange={e => {
|
||||
setFieldValue('email', e.target.value);
|
||||
setFieldValue('email', e.target.value.substring(0, 254));
|
||||
setFieldTouched('email');
|
||||
setFieldError('email', null);
|
||||
}}
|
||||
|
|
|
@ -150,8 +150,8 @@ class GenderStep extends React.Component {
|
|||
value={values.custom}
|
||||
/* eslint-disable react/jsx-no-bind */
|
||||
onSetCustom={newCustomVal => setValues({
|
||||
gender: newCustomVal,
|
||||
custom: newCustomVal
|
||||
gender: newCustomVal.substring(0, 25),
|
||||
custom: newCustomVal.substring(0, 25)
|
||||
})}
|
||||
onSetCustomRef={this.handleSetCustomRef}
|
||||
/* eslint-enable react/jsx-no-bind */
|
||||
|
|
|
@ -42,10 +42,16 @@
|
|||
margin: 0;
|
||||
border-top-left-radius: 1rem;
|
||||
border-top-right-radius: 1rem;
|
||||
|
||||
/* match the small window setting for modal as a whole */
|
||||
@media #{$small}, #{$small-height} {
|
||||
border-top-left-radius: 0rem;
|
||||
border-top-right-radius: 0rem;
|
||||
}
|
||||
}
|
||||
|
||||
.join-flow-header-image {
|
||||
width: 27.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.join-flow-footer-message {
|
||||
|
@ -53,7 +59,11 @@
|
|||
padding: 0.875rem 1.5rem;
|
||||
background-color: $ui-blue-25percent;
|
||||
font-size: .75rem;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: $ui-blue;
|
||||
}
|
||||
|
||||
.join-flow-footer-message a {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
|
|
@ -136,9 +136,8 @@
|
|||
}
|
||||
|
||||
.join-flow-inner-email-step {
|
||||
padding-top: 1.25rem;
|
||||
padding-top: .75rem;
|
||||
padding-bottom: 0;
|
||||
min-height: 16.625rem;
|
||||
}
|
||||
|
||||
.join-flow-inner-welcome-step {
|
||||
|
@ -217,7 +216,7 @@
|
|||
|
||||
.join-flow-email-checkbox-row {
|
||||
font-size: .75rem;
|
||||
margin: 1.5rem .125rem .25rem;
|
||||
margin: 1.5rem .125rem 1rem;
|
||||
}
|
||||
|
||||
a.join-flow-link:link, a.join-flow-link:visited, a.join-flow-link:active {
|
||||
|
|
|
@ -16,14 +16,14 @@ const NextStepButton = props => (
|
|||
type="submit"
|
||||
{...omit(props, ['intl', 'text', 'waiting'])}
|
||||
>
|
||||
{props.waiting ?
|
||||
<Spinner /> : (
|
||||
<ModalTitle
|
||||
className="next-step-title"
|
||||
title={props.content ? props.content : props.intl.formatMessage({id: 'general.next'})}
|
||||
/>
|
||||
)
|
||||
}
|
||||
{props.waiting ? (
|
||||
<Spinner className="next-step-spinner" />
|
||||
) : (
|
||||
<ModalTitle
|
||||
className="next-step-title"
|
||||
title={props.content ? props.content : props.intl.formatMessage({id: 'general.next'})}
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
);
|
||||
|
||||
|
|
|
@ -14,6 +14,12 @@
|
|||
transition: background-color .25s ease;
|
||||
background-color: $ui-orange-90percent;
|
||||
}
|
||||
|
||||
/* match the small window setting for modal as a whole */
|
||||
@media #{$small}, #{$small-height} {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.next-step-title {
|
||||
|
@ -22,3 +28,8 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.next-step-spinner {
|
||||
width: 2.625rem;
|
||||
height: 2.625rem;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ class UsernameStep extends React.Component {
|
|||
constructor (props) {
|
||||
super(props);
|
||||
bindAll(this, [
|
||||
'handleChangeShowPassword',
|
||||
'handleFocused',
|
||||
'handleSetUsernameRef',
|
||||
'handleValidSubmit',
|
||||
|
@ -30,17 +29,13 @@ class UsernameStep extends React.Component {
|
|||
'validateForm'
|
||||
]);
|
||||
this.state = {
|
||||
focused: null,
|
||||
showPassword: false
|
||||
focused: null
|
||||
};
|
||||
}
|
||||
componentDidMount () {
|
||||
// automatically start with focus on username field
|
||||
if (this.usernameInput) this.usernameInput.focus();
|
||||
}
|
||||
handleChangeShowPassword () {
|
||||
this.setState({showPassword: !this.state.showPassword});
|
||||
}
|
||||
// track the currently focused input field, to determine whether each field should
|
||||
// display a tooltip. (We only display it if a field is focused and has never been touched.)
|
||||
handleFocused (fieldName) {
|
||||
|
@ -114,7 +109,7 @@ class UsernameStep extends React.Component {
|
|||
username: '',
|
||||
password: '',
|
||||
passwordConfirm: '',
|
||||
showPassword: false
|
||||
showPassword: true
|
||||
}}
|
||||
validate={this.validateForm}
|
||||
validateOnBlur={false}
|
||||
|
@ -162,7 +157,7 @@ class UsernameStep extends React.Component {
|
|||
/* eslint-disable react/jsx-no-bind */
|
||||
onBlur={() => validateField('username')}
|
||||
onChange={e => {
|
||||
setFieldValue('username', e.target.value);
|
||||
setFieldValue('username', e.target.value.substring(0, 30));
|
||||
setFieldTouched('username');
|
||||
setFieldError('username', null);
|
||||
}}
|
||||
|
@ -192,7 +187,7 @@ class UsernameStep extends React.Component {
|
|||
validationClassName="validation-full-width-input"
|
||||
onBlur={() => validateField('password')}
|
||||
onChange={e => {
|
||||
setFieldValue('password', e.target.value);
|
||||
setFieldValue('password', e.target.value.substring(0, 128));
|
||||
setFieldTouched('password');
|
||||
setFieldError('password', null);
|
||||
}}
|
||||
|
@ -230,20 +225,19 @@ class UsernameStep extends React.Component {
|
|||
validationClassName="validation-full-width-input"
|
||||
onBlur={() => validateField('passwordConfirm')}
|
||||
onChange={e => {
|
||||
setFieldValue('passwordConfirm', e.target.value);
|
||||
setFieldValue('passwordConfirm', e.target.value.substring(0, 128));
|
||||
setFieldTouched('passwordConfirm');
|
||||
setFieldError('passwordConfirm', null);
|
||||
}}
|
||||
onFocus={() => this.handleFocused('passwordConfirm')}
|
||||
/* eslint-enable react/jsx-no-bind */
|
||||
/>
|
||||
<div className="join-flow-input-title">
|
||||
<FormikCheckbox
|
||||
id="showPassword"
|
||||
label={this.props.intl.formatMessage({id: 'registration.showPassword'})}
|
||||
name="showPassword"
|
||||
/>
|
||||
</div>
|
||||
<FormikCheckbox
|
||||
id="showPassword"
|
||||
label={this.props.intl.formatMessage({id: 'registration.showPassword'})}
|
||||
labelClassName="join-flow-input-title"
|
||||
name="showPassword"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</JoinFlowStep>
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
@import "../../../colors";
|
||||
@import "../../../frameless";
|
||||
|
||||
/* unusually for a modal, the join flow modal cares about the screen around it
|
||||
being clickable, because of the standalone join view. */
|
||||
.mod-join {
|
||||
width: 27.4375rem;
|
||||
|
||||
@media #{$small} {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* enable vertical scrolling when modal showing, if page is short */
|
||||
.modal-overlay {
|
||||
@media #{$small-height}, #{$medium-height} {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
@media #{$small}, #{$small-height} {
|
||||
height: unset;
|
||||
}
|
||||
}
|
||||
|
||||
/* lower the modal slightly to accomodate Scratch logo above it */
|
||||
.modal-sizes {
|
||||
@media #{$small}, #{$small-height}, #{$medium}, #{$medium-height} {
|
||||
margin: 3.5rem auto;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ const LoginDropdown = require('../../login/login-dropdown.jsx');
|
|||
const CanceledDeletionModal = require('../../login/canceled-deletion-modal.jsx');
|
||||
const NavigationBox = require('../base/navigation.jsx');
|
||||
const Registration = require('../../registration/registration.jsx');
|
||||
const Scratch3Registration = require('../../registration/scratch3-registration.jsx');
|
||||
const AccountNav = require('./accountnav.jsx');
|
||||
|
||||
require('./navigation.scss');
|
||||
|
@ -28,6 +27,7 @@ class Navigation extends React.Component {
|
|||
super(props);
|
||||
bindAll(this, [
|
||||
'getProfileUrl',
|
||||
'handleClickRegistration',
|
||||
'handleSearchSubmit'
|
||||
]);
|
||||
this.state = {
|
||||
|
@ -78,6 +78,13 @@ class Navigation extends React.Component {
|
|||
if (!this.props.user) return;
|
||||
return `/users/${this.props.user.username}/`;
|
||||
}
|
||||
handleClickRegistration (event) {
|
||||
if (this.props.useScratch3Registration) {
|
||||
this.props.navigateToRegistration(event);
|
||||
} else {
|
||||
this.props.handleOpenRegistration(event);
|
||||
}
|
||||
}
|
||||
handleSearchSubmit (formData) {
|
||||
let targetUrl = '/search/projects';
|
||||
if (formData.q) {
|
||||
|
@ -189,9 +196,12 @@ class Navigation extends React.Component {
|
|||
className="link right join"
|
||||
key="join"
|
||||
>
|
||||
{/* there's no css class registrationLink -- this is
|
||||
just to make the link findable for testing */}
|
||||
<a
|
||||
className="registrationLink"
|
||||
href="#"
|
||||
onClick={this.props.handleOpenRegistration}
|
||||
onClick={this.handleClickRegistration}
|
||||
>
|
||||
<FormattedMessage id="general.joinScratch" />
|
||||
</a>
|
||||
|
@ -214,18 +224,10 @@ class Navigation extends React.Component {
|
|||
</li>
|
||||
]) : []
|
||||
}
|
||||
{this.props.registrationOpen && (
|
||||
this.props.useScratch3Registration ? (
|
||||
<Scratch3Registration
|
||||
createProjectOnComplete
|
||||
isOpen
|
||||
key="scratch3registration"
|
||||
/>
|
||||
) : (
|
||||
<Registration
|
||||
key="registration"
|
||||
/>
|
||||
)
|
||||
{this.props.registrationOpen && !this.props.useScratch3Registration && (
|
||||
<Registration
|
||||
key="registration"
|
||||
/>
|
||||
)}
|
||||
</ul>
|
||||
<CanceledDeletionModal />
|
||||
|
@ -243,6 +245,7 @@ Navigation.propTypes = {
|
|||
handleToggleAccountNav: PropTypes.func,
|
||||
handleToggleLoginOpen: PropTypes.func,
|
||||
intl: intlShape,
|
||||
navigateToRegistration: PropTypes.func,
|
||||
permissions: PropTypes.shape({
|
||||
admin: PropTypes.bool,
|
||||
social: PropTypes.bool,
|
||||
|
@ -305,14 +308,24 @@ const mapDispatchToProps = dispatch => ({
|
|||
event.preventDefault();
|
||||
dispatch(navigationActions.toggleLoginOpen());
|
||||
},
|
||||
navigateToRegistration: event => {
|
||||
event.preventDefault();
|
||||
navigationActions.navigateToRegistration();
|
||||
},
|
||||
setMessageCount: newCount => {
|
||||
dispatch(messageCountActions.setCount(newCount));
|
||||
}
|
||||
});
|
||||
|
||||
// Allow incoming props to override redux-provided props. Used to mock in tests.
|
||||
const mergeProps = (stateProps, dispatchProps, ownProps) => Object.assign(
|
||||
{}, stateProps, dispatchProps, ownProps
|
||||
);
|
||||
|
||||
const ConnectedNavigation = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
mapDispatchToProps,
|
||||
mergeProps
|
||||
)(Navigation);
|
||||
|
||||
module.exports = injectIntl(ConnectedNavigation);
|
||||
|
|
|
@ -2,18 +2,13 @@
|
|||
/* This class can be used on an icon that should spin.
|
||||
It first plays the intro animation, then spins forever. */
|
||||
animation-name: intro, spin;
|
||||
animation-duration: .25s, .5s;
|
||||
animation-timing-function: cubic-bezier(.3, -3, .6, 3), linear;
|
||||
animation-duration: .25s, 1s;
|
||||
animation-timing-function: cubic-bezier(.3, -3, .6, 3), cubic-bezier(0.4, 0.1, 0.4, 1);
|
||||
animation-delay: 0s, .25s;
|
||||
animation-iteration-count: 1, infinite;
|
||||
animation-direction: normal;
|
||||
width: 1.4rem; /* standard is 1.4 rem but can be overwritten by parent */
|
||||
height: 1.4rem;
|
||||
-webkit-animation-name: intro, spin;
|
||||
-webkit-animation-duration: .25s, .5s;
|
||||
-webkit-animation-iteration-count: 1, infinite;
|
||||
-webkit-animation-delay: 0s, .25s;
|
||||
-webkit-animation-timing-function: cubic-bezier(.3, -3, .6, 3), linear;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
|
@ -21,24 +16,20 @@
|
|||
0% {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
-webkit-transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0);
|
||||
-webkit-transform: rotate(0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
"general.notRequired": "Not Required",
|
||||
"general.okay": "Okay",
|
||||
"general.other": "Other",
|
||||
"general.offlineEditor": "Offline Editor",
|
||||
"general.download": "Download",
|
||||
"general.password": "Password",
|
||||
"general.press": "Press",
|
||||
"general.privacyPolicy": "Privacy Policy",
|
||||
|
@ -137,12 +137,14 @@
|
|||
"installScratch.or": "or",
|
||||
"installScratch.directDownload": "Direct download",
|
||||
"installScratch.desktopHeaderTitle": "Install Scratch Desktop",
|
||||
"installScratch.appHeaderTitle": "Install Scratch for {operatingsystem}",
|
||||
"installScratch.appHeaderTitle": "Install the Scratch app for {operatingsystem}",
|
||||
"installScratch.downloadScratchDesktop": "Download Scratch Desktop",
|
||||
"installScratch.downloadScratchAppGeneric": "Download Scratch for {operatingsystem}",
|
||||
"installScratch.getScratchAppPlay": "Get Scratch on the Google Play Store",
|
||||
"installScratch.getScratchAppPlay": "Get the Scratch app on the Google Play Store",
|
||||
"installScratch.getScratchAppMacOs": "Get the Scratch app on the Mac App Store",
|
||||
"installScratch.getScratchAppWindows": "Get the Scratch app on the Microsoft Store",
|
||||
"installScratch.useScratchApp": "Open the Scratch app on your device.",
|
||||
|
||||
|
||||
"installScratchLink.installHeaderTitle": "Install Scratch Link",
|
||||
"installScratchLink.downloadAndInstall": "Download and install Scratch Link.",
|
||||
"installScratchLink.startScratchLink": "Start Scratch Link and make sure it is running. It should appear in your toolbar.",
|
||||
|
|
18
src/lib/sentry.js
Normal file
18
src/lib/sentry.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
const initSentry = () => {
|
||||
// initialize Sentry instance, making sure it hasn't been initialized already
|
||||
if (!window.Sentry && `${process.env.SENTRY_DSN}` !== '') {
|
||||
const Sentry = require('@sentry/browser');
|
||||
|
||||
Sentry.init({
|
||||
dsn: `${process.env.SENTRY_DSN}`,
|
||||
// Do not collect global onerror, only collect specifically from React error boundaries.
|
||||
// TryCatch plugin also includes errors from setTimeouts (i.e. the VM)
|
||||
integrations: integrations => integrations.filter(i =>
|
||||
!(i.name === 'GlobalHandlers' || i.name === 'TryCatch'))
|
||||
});
|
||||
|
||||
window.Sentry = Sentry; // Allow GUI access to Sentry via window
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = initSentry;
|
|
@ -92,6 +92,10 @@ module.exports.setSearchTerm = searchTerm => ({
|
|||
searchTerm: searchTerm
|
||||
});
|
||||
|
||||
module.exports.navigateToRegistration = () => {
|
||||
window.location = '/join';
|
||||
};
|
||||
|
||||
module.exports.handleCompleteRegistration = createProject => (dispatch => {
|
||||
if (createProject) {
|
||||
window.location = '/projects/editor/?tutorial=getStarted';
|
||||
|
|
|
@ -177,12 +177,20 @@
|
|||
},
|
||||
{
|
||||
"name": "projects",
|
||||
"pattern": "^/projects(/editor|(/\\d+(/editor|/fullscreen|/embed)?)?)?/?(\\?.*)?$",
|
||||
"pattern": "^/projects(/editor|(/\\d+(/editor|/fullscreen)?)?)?/?(\\?.*)?$",
|
||||
"routeAlias": "/projects/?$",
|
||||
"view": "preview/preview",
|
||||
"title": "Scratch Project",
|
||||
"dynamicMetaTags": true
|
||||
},
|
||||
{
|
||||
"name": "embed",
|
||||
"pattern": "^/projects/\\d+/embed/?(\\?.*)?$",
|
||||
"routeAlias": "/projects/?$",
|
||||
"view": "preview/embed",
|
||||
"title": "Scratch Project",
|
||||
"dynamicMetaTags": true
|
||||
},
|
||||
{
|
||||
"name": "parents",
|
||||
"pattern": "^/parents/?(\\?.*)?$",
|
||||
|
|
|
@ -95,7 +95,7 @@ class Download extends React.Component {
|
|||
alt=""
|
||||
src="svgs/extensions/android.svg"
|
||||
/>
|
||||
Android 5.0+
|
||||
Android 6.0+
|
||||
</span>
|
||||
</React.Fragment>
|
||||
)}
|
||||
|
@ -181,7 +181,17 @@ class Download extends React.Component {
|
|||
<FormattedMessage id="download.troubleshootingTitle" />
|
||||
</h2>
|
||||
|
||||
{isDownloaded(this.state.OS) && (
|
||||
{CHROME_APP_RELEASED && (
|
||||
<React.Fragment>
|
||||
<h3 className="faq-question">
|
||||
<FormattedMessage id="download.doIHaveToDownload" />
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage id="download.doIHaveToDownloadAnswer" />
|
||||
</p>
|
||||
</React.Fragment>
|
||||
)}
|
||||
{!CHROME_APP_RELEASED && (
|
||||
<React.Fragment>
|
||||
<h3 className="faq-question">
|
||||
<FormattedMessage id="download.canIUseScratchLink" />
|
||||
|
@ -191,25 +201,29 @@ class Download extends React.Component {
|
|||
</p>
|
||||
</React.Fragment>
|
||||
)}
|
||||
{isFromGooglePlay(this.state.OS) && (
|
||||
{CHROME_APP_RELEASED && (
|
||||
<React.Fragment>
|
||||
<h3 className="faq-question">
|
||||
<FormattedMessage id="download.canIUseExtensions" />
|
||||
<FormattedMessage id="download.howConnectHardwareDevices" />
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage id="download.canIUseExtensionsAnswer" />
|
||||
</p>
|
||||
{isDownloaded(this.state.OS) && (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="download.howConnectHardwareDevicesAnswerLink"
|
||||
values={{operatingsystem: this.state.OS}}
|
||||
/>
|
||||
</p>
|
||||
)}
|
||||
{isFromGooglePlay(this.state.OS) && (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="download.howConnectHardwareDevicesAnswerApp"
|
||||
values={{operatingsystem: this.state.OS}}
|
||||
/>
|
||||
</p>
|
||||
)}
|
||||
</React.Fragment>
|
||||
)}
|
||||
<h3 className="faq-question">
|
||||
{isFromGooglePlay(this.state.OS) ?
|
||||
<FormattedMessage id="download.appAndBrowser" /> :
|
||||
<FormattedMessage id="download.desktopAndBrowser" />
|
||||
}
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage id="download.yesAnswer" />
|
||||
</p>
|
||||
{isDownloaded(this.state.OS) && (CHROME_APP_RELEASED ? (
|
||||
<React.Fragment>
|
||||
<h3 className="faq-question">
|
||||
|
@ -248,6 +262,25 @@ class Download extends React.Component {
|
|||
</p>
|
||||
</React.Fragment>
|
||||
)}
|
||||
<h3 className="faq-question">
|
||||
{CHROME_APP_RELEASED ?
|
||||
<FormattedMessage id="download.appAndBrowser" /> :
|
||||
<FormattedMessage id="download.desktopAndBrowser" />
|
||||
}
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage id="download.yesAnswer" />
|
||||
</p>
|
||||
{CHROME_APP_RELEASED && (
|
||||
<React.Fragment>
|
||||
<h3 className="faq-question">
|
||||
<FormattedMessage id="download.onPhone" />
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage id="download.onPhoneAnswer" />
|
||||
</p>
|
||||
</React.Fragment>
|
||||
)}
|
||||
{!CHROME_APP_RELEASED && (
|
||||
<React.Fragment>
|
||||
<h3 className="faq-question">
|
||||
|
@ -259,10 +292,16 @@ class Download extends React.Component {
|
|||
</React.Fragment>
|
||||
)}
|
||||
<h3 className="faq-question">
|
||||
<FormattedMessage id="download.whenSupportLinux" />
|
||||
{CHROME_APP_RELEASED ?
|
||||
<FormattedMessage id="download.whenSupportLinuxApp" /> :
|
||||
<FormattedMessage id="download.whenSupportLinux" />
|
||||
}
|
||||
</h3>
|
||||
<p>
|
||||
<FormattedMessage id="download.supportLinuxAnswer" />
|
||||
{CHROME_APP_RELEASED ?
|
||||
<FormattedMessage id="download.whenSupportLinuxAppAnswer" /> :
|
||||
<FormattedMessage id="download.supportLinuxAnswer" />
|
||||
}
|
||||
</p>
|
||||
</FlexRow>
|
||||
</div>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
.download-info {
|
||||
padding-right: $cols1;
|
||||
max-width: $cols6 + ($gutter / $em);
|
||||
max-width: $cols7 + ($gutter / $em);
|
||||
align-items: flex-start;
|
||||
|
||||
.download-copy {
|
||||
|
@ -110,7 +110,7 @@
|
|||
|
||||
.download-image {
|
||||
width: 100%;
|
||||
max-width: $cols6;
|
||||
max-width: $cols5;
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
|
|
|
@ -1,35 +1,44 @@
|
|||
{
|
||||
"download.title": "Scratch Desktop",
|
||||
"download.intro": "You can install the Scratch Desktop editor to work on projects without an internet connection. This version will work on Windows and MacOS.",
|
||||
"download.appTitle": "Download Scratch",
|
||||
"download.appIntro": "You can install Scratch for free to work on projects without an internet connection.",
|
||||
"download.appTitle": "Download the Scratch App",
|
||||
"download.appIntro": "Would you like to create and save Scratch projects without an internet connection? Download the free Scratch app.",
|
||||
"download.requirements": "Requirements",
|
||||
"download.imgAltDownloadIllustration" : "Scratch 3.0 Desktop screenshot",
|
||||
"download.troubleshootingTitle": "FAQ",
|
||||
"download.startScratchDesktop": "Start Scratch Desktop",
|
||||
"download.howDoIInstall": "How do I install Scratch Desktop?",
|
||||
"download.whenSupportLinuxApp": "When will you have the Scratch app available for Linux?",
|
||||
"download.whenSupportLinux": "When will you have Scratch Desktop for Linux?",
|
||||
"download.supportLinuxAnswer" : "Scratch Desktop on Linux is currently not supported. We are working with partners and the open-source community to determine if there is a way we can support Linux in the future. Stay tuned!",
|
||||
"download.whenSupportLinuxAppAnswer" : "The Scratch app is currently not supported on Linux. We are working with partners and the open-source community to determine if there is a way we can support Linux in the future. Stay tuned!",
|
||||
"download.supportChromeOS" : "When will you have Scratch Desktop for Chromebooks?",
|
||||
"download.supportChromeOSAnswer": "Scratch Desktop for Chromebooks is not yet available. We are working on it and expect to release later in 2019.",
|
||||
"download.olderVersionsTitle" : "Older Versions",
|
||||
"download.olderVersions": "Looking for earlier Scratch Offline Editors?",
|
||||
"download.olderVersions": "Looking for an earlier version of Scratch?",
|
||||
"download.scratch1-4Desktop" : "Scratch 1.4",
|
||||
"download.scratch2Desktop" : "Scratch 2.0 Offline Editor",
|
||||
"download.cannotAccessMacStore" : "What if I can't access the Mac App Store?",
|
||||
"download.cannotAccessWindowsStore" : "What if I can't access the Microsoft Store?",
|
||||
"download.macMoveToApplications" : "Open the .dmg file. Move Scratch Desktop into Applications.",
|
||||
"download.winMoveToApplications" : "Run the .exe file.",
|
||||
"download.doIHaveToDownload" : "Do I have to download an app to use Scratch?",
|
||||
"download.doIHaveToDownloadAnswer" : "No. You can also use the Scratch project editor in any web browser on any device by going to scratch.mit.edu and clicking \"Create\".",
|
||||
"download.canIUseScratchLink" : "Can I use Scratch Link to connect to extensions?",
|
||||
"download.canIUseScratchLinkAnswer" : "Yes. However, you will need an Internet connection to use Scratch Link.",
|
||||
"download.canIUseExtensions" : "Can I connect to hardware extensions?",
|
||||
"download.canIUseExtensionsAnswer" : "Yes. With the Scratch app you can connect to extensions, and you do not need Scratch Link.",
|
||||
"download.howConnectHardwareDevices" : "How do I connect the Scratch app to hardware devices?",
|
||||
"download.howConnectHardwareDevicesAnswerLink" : "You will need to install and run Scratch Link in order to connect to hardware devices when using Scratch app for {operatingsystem}. You will also need an internet connection to use Scratch Link.",
|
||||
"download.howConnectHardwareDevicesAnswerApp" : "With the Scratch app you can connect to hardware devices like the micro:bit or LEGO Boost. When using the Scratch app for {operatingsystem} you do not need Scratch Link.",
|
||||
"download.desktopAndBrowser": "Can I use Scratch Desktop and also have Scratch open in the browser?",
|
||||
"download.appAndBrowser": "Can I use the Scratch app and also have Scratch open in the browser?",
|
||||
"download.yesAnswer" : "Yes.",
|
||||
"download.onPhone": "Can I install Scratch on my Android phone?",
|
||||
"download.onPhoneAnswer" : "No. The current version of Scratch for Android only works on tablets.",
|
||||
"download.canIShare": "Can I share from Scratch Desktop?",
|
||||
"download.canIShareAnswer": "This isn’t supported currently. For now, you can save a project from Scratch Desktop, upload it to your Scratch account, and share it there. In a later version we will add the ability to upload to your Scratch account directly in Scratch Desktop.",
|
||||
"download.canIShareApp": "Can I share from Scratch for {operatingsystem}?",
|
||||
"download.canIShareAnswerPlayStore": "Yes. Click the 3-dots menu on a project in the lobby and select Share from the options. In addition to sharing by email you can sign in to your Scratch account and share the project on the Scratch Community.",
|
||||
"download.canIShareAnswerDownloaded": "This isn’t supported currently. For now, you can save a project from Scratch for {operatingsystem}, upload it to your Scratch account, and share it there. In a later version we will add the ability to upload to your Scratch account directly in Scratch for {operatingsystem}."
|
||||
"download.canIShareApp": "Can I share to the online community from the Scratch app for {operatingsystem}?",
|
||||
"download.canIShareAnswerPlayStore": "Yes. Click the 3-dots menu on a project in the lobby and select \"Share\" from the options. In addition to sharing by email, you can sign in to your Scratch account and share a project to the Scratch online community.",
|
||||
"download.canIShareAnswerDownloaded": "Sharing directly to online community from the Scratch app for {operatingsystem} is not currently supported. For now, you can export a project from the Scratch app, then log onto the Scratch website, and upload and share your project there."
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ const Faq = injectIntl(props => (
|
|||
<li><FormattedMessage
|
||||
id="faq.requirementsNoteDesktop"
|
||||
values={{downloadLink: (
|
||||
<a href="/download"><FormattedMessage id="faq.scratchDesktop" /></a>
|
||||
<a href="/download"><FormattedMessage id="faq.scratchApp" /></a>
|
||||
)}}
|
||||
/></li>
|
||||
<li><FormattedMessage id="faq.requirementsNoteWebGL" /></li>
|
||||
|
@ -69,7 +69,7 @@ const Faq = injectIntl(props => (
|
|||
<dd><FormattedMessage
|
||||
id="faq.offlineBody"
|
||||
values={{downloadLink: (
|
||||
<a href="/download"><FormattedMessage id="faq.scratchDesktop" /></a>
|
||||
<a href="/download"><FormattedMessage id="faq.scratchApp" /></a>
|
||||
)}}
|
||||
/></dd>
|
||||
|
||||
|
@ -482,7 +482,7 @@ const Faq = injectIntl(props => (
|
|||
id="faq.noInternetBody"
|
||||
values={{downloadLink: (
|
||||
<a href="/download">
|
||||
<FormattedMessage id="faq.scratchDesktop" />
|
||||
<FormattedMessage id="faq.scratchApp" />
|
||||
</a>
|
||||
)}}
|
||||
/></dd>
|
||||
|
@ -523,7 +523,7 @@ const Faq = injectIntl(props => (
|
|||
id="faq.lawComplianceBody2"
|
||||
values={{downloadLink: (
|
||||
<a href="/download">
|
||||
<FormattedMessage id="faq.scratchDesktop" />
|
||||
<FormattedMessage id="faq.scratchApp" />
|
||||
</a>
|
||||
)}}
|
||||
/>
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
"faq.requirementsTabletSafari":"Mobile Safari (11+)",
|
||||
"faq.requirementsNote":"Note:",
|
||||
"faq.requirementsNoteDesktop":"If your computer doesn’t meet these requirements, you can try the {downloadLink} editor (see next item in FAQ). ",
|
||||
"faq.scratchDesktop":"Scratch Desktop",
|
||||
"faq.scratchApp":"Scratch app",
|
||||
"faq.requirementsNoteWebGL":"If you encounter a WebGL error, try a different browser.",
|
||||
"faq.requirementsNoteTablets":"On tablets, there is currently not a way to use \"key pressed\" blocks or right-click context menus.",
|
||||
"faq.offlineTitle":"Do you have a downloadable version so I can create and view projects offline?",
|
||||
"faq.offlineBody":"The Scratch Desktop editor allows you to create Scratch projects without an internet connection. You can download {downloadLink} from the website. This was previously called the Scratch Offline editor.",
|
||||
"faq.offlineBody":"The Scratch app allows you to create Scratch projects without an internet connection. You can download the {downloadLink} from the Scratch website or the app store for your device. (This was previously called the \"Scratch Offline Editor\").",
|
||||
"faq.uploadOldTitle":"Can I still upload projects created with older versions of Scratch to the website?",
|
||||
"faq.uploadOldBody":"Yes: You can share or upload projects made with earlier versions of Scratch, and they will be visible and playable. (However, you can’t download projects made with or edited in later versions of Scratch and open them in earlier versions. For example, you can’t open a Scratch 3.0 project in the desktop version of {scratch2Link}, because Scratch 2.0 doesn’t know how to read the .sb3 project file format.)",
|
||||
"faq.scratch2":"Scratch 2.0",
|
||||
|
@ -182,9 +182,9 @@
|
|||
"faq.howBody":"Scratch is used in hundreds of thousands of schools around the world, in many different subject areas (including language arts, science, history, math, and computer science). You can learn more about strategies and resources for using Scratch in schools and other learning environments (such as museums, libraries, and community centers) on our {educatorsLink}.",
|
||||
"faq.educatorsLinkText":"Educators Page",
|
||||
"faq.noInternetTitle":"Is there a way for students to use Scratch without an internet connection?",
|
||||
"faq.noInternetBody":"Yes. {downloadLink} is a version of Scratch that runs on a desktop or laptop computer. Currently, Scratch Desktop is available for Mac and Windows machines.",
|
||||
"faq.noInternetBody":"Yes. The {downloadLink} is a downloadable version of Scratch that can run on tablets, laptops, and desktops. Currently, the Scratch app is available on Windows, Mac, Chromebook, and Android devices.",
|
||||
"faq.communityTitle":"Can I turn off the online community for my students?",
|
||||
"faq.communityBody":"The Scratch online community provides a way for young people to share, collaborate, and learn with their peers within a moderated community governed by the Scratch {cgLink}. However, we understand that some educators prefer that their students not participate in an online community. These educators may wish to install Scratch Desktop, which runs offline and locally on a desktop or laptop computer.",
|
||||
"faq.communityBody":"The Scratch online community provides a way for young people to share, collaborate, and learn with their peers within a moderated community governed by the Scratch {cgLink}. However, we understand that some educators prefer that their students not participate in an online community. These educators may wish to install the Scratch app, which runs offline and locally on a desktop or laptop computer.",
|
||||
"faq.teacherAccountTitle":"What is a Scratch Teacher Account?",
|
||||
"faq.teacherAccountBody":"A Scratch Teacher Account provides teachers and other educators with additional features to manage student participation on Scratch, including the ability to create student accounts, organize student projects into studios, and monitor student comments. For more information on Scratch Teacher Accounts, see the {eduFaqLink}.",
|
||||
"faq.eduFaqLinkText":"Scratch Teacher Account FAQ",
|
||||
|
@ -192,7 +192,7 @@
|
|||
"faq.requestBody":"You may request a Scratch Teacher Account from the {educatorsLink} on Scratch. We ask for additional information during the registration process in order to verify your role as an educator.",
|
||||
"faq.dataTitle":"What data does Scratch collect about students?",
|
||||
"faq.dataBody":"When a student first signs up on Scratch, we ask for basic demographic data including gender, age (birth month and year), country, and an email address for verification. This data is used (in aggregated form) in research studies intended to improve our understanding of how people learn with Scratch. When an educator uses a Scratch Teacher Account to create student accounts in bulk, students are not required to provide an email address for account setup.",
|
||||
"faq.lawComplianceTitle":"Is Scratch (online version) compliant with United States local and federal data privacy laws?",
|
||||
"faq.lawComplianceTitle":"Is the online version of Scratch compliant with United States local and federal data privacy laws?",
|
||||
"faq.lawComplianceBody1":"Scratch cares deeply about the privacy of students and of all individuals who use our platform. We have in place physical and electronic procedures to protect the information we collect on the Scratch website. Although we are not in a position to offer contractual guarantees with each entity that uses our free educational product, we are in compliance with all United States federal laws that are applicable to MIT and the Scratch Foundation, the organizations that have created and maintained Scratch. We encourage you to read the Scratch Privacy Policy for more information.",
|
||||
"faq.lawComplianceBody2":"If you would like to build projects with Scratch without submitting any Personal Information to us, you can download {downloadLink}. Projects created in Scratch Desktop are not accessible by the Scratch Team, and using Scratch Desktop does not disclose any personally identifying information to Scratch unless you upload these projects to the Scratch online community."
|
||||
"faq.lawComplianceBody2":"If you would like to build projects with Scratch without submitting any Personal Information to us, you can download the {downloadLink}. Projects created in the Scratch app are not accessible by the Scratch Team, and using the Scratch app does not disclose any personally identifying information to Scratch unless you upload these projects to the Scratch online community."
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
"ideas.tryTheTutorial": "Try the tutorial",
|
||||
"ideas.codingCards": "Coding Cards",
|
||||
"ideas.educatorGuide": "Educator Guide",
|
||||
"ideas.desktopEditorHeader": "Scratch Desktop Download",
|
||||
"ideas.desktopEditorBody": "To create projects without an Internet connection, you can <a href=\"/download\">download Scratch Desktop</a>.",
|
||||
"ideas.desktopEditorHeader": "Scratch App Download",
|
||||
"ideas.desktopEditorBody": "To create projects without an Internet connection, you can <a href=\"/download\">download the Scratch app</a>.",
|
||||
"ideas.questionsHeader": "Questions",
|
||||
"ideas.questionsBody": "Have more questions? See the <a href=\"/info/faq\">Frequently Asked Questions</a> or visit the <a href=\"/discuss/7/\">Help with Scripts Forum</a>.",
|
||||
|
||||
|
|
|
@ -8,21 +8,11 @@
|
|||
left: calc(25% - 76px);
|
||||
|
||||
.logo {
|
||||
width: 76px;
|
||||
}
|
||||
width: 76px;
|
||||
}
|
||||
}
|
||||
|
||||
@media #{$small} {
|
||||
.join {
|
||||
left: calc(50% - 38px);
|
||||
}
|
||||
}
|
||||
@media #{$medium} {
|
||||
.join {
|
||||
left: calc(50% - 38px);
|
||||
}
|
||||
}
|
||||
@media #{$intermediate} {
|
||||
@media #{$small}, #{$medium}, #{$intermediate} {
|
||||
.join {
|
||||
left: calc(50% - 38px);
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
"parents.faqPrivacyPolicyBody": "To protect children's online privacy, we limit what we collect during the signup process, and what we make public on the website. We don't sell or rent account information to anyone. You can find out more about our {privacyPolicy} page.",
|
||||
"parents.faqFAQLinkText": "frequently asked questions page",
|
||||
"parents.faqOfflineTitle": "Is there a way to use Scratch without participating online?",
|
||||
"parents.faqOfflineBody" : "The Scratch Desktop editor allows you to create Scratch projects without an internet connection. You can download {scratchDesktop} from the website. This was previously called the Scratch Offline editor.",
|
||||
"parents.faqScratchDesktop": "Scratch Desktop",
|
||||
"parents.faqOfflineBody" : "Yes, the Scratch app allows you to create Scratch projects without an internet connection. You can download the {scratchApp} from the Scratch website or the app store on your device.",
|
||||
"parents.faqScratchApp": "Scratch app",
|
||||
"parents.faqOffline2LinkText": "Scratch 2.0 offline editor",
|
||||
"parents.faqOffline14LinkText": "Scratch 1.4 offline editor"
|
||||
}
|
||||
|
|
|
@ -247,10 +247,10 @@ const Landing = () => (
|
|||
<FormattedMessage
|
||||
id="parents.faqOfflineBody"
|
||||
values={{
|
||||
scratchDesktop: (
|
||||
scratchApp: (
|
||||
<a href="/download">
|
||||
<FormattedMessage
|
||||
id="parents.faqScratchDesktop"
|
||||
id="parents.faqScratchApp"
|
||||
/>
|
||||
</a>
|
||||
)
|
||||
|
|
97
src/views/preview/embed-view.jsx
Normal file
97
src/views/preview/embed-view.jsx
Normal file
|
@ -0,0 +1,97 @@
|
|||
// embed view
|
||||
|
||||
const React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
const connect = require('react-redux').connect;
|
||||
const injectIntl = require('react-intl').injectIntl;
|
||||
|
||||
const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx');
|
||||
const projectShape = require('./projectshape.jsx').projectShape;
|
||||
const NotAvailable = require('../../components/not-available/not-available.jsx');
|
||||
const Meta = require('./meta.jsx');
|
||||
|
||||
const previewActions = require('../../redux/preview.js');
|
||||
|
||||
const GUI = require('scratch-gui');
|
||||
const IntlGUI = injectIntl(GUI.default);
|
||||
|
||||
const initSentry = require('../../lib/sentry.js');
|
||||
initSentry();
|
||||
|
||||
class EmbedView extends React.Component {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
const pathname = window.location.pathname.toLowerCase();
|
||||
const parts = pathname.split('/').filter(Boolean);
|
||||
this.state = {
|
||||
extensions: [],
|
||||
invalidProject: parts.length === 1,
|
||||
projectId: parts[1]
|
||||
};
|
||||
}
|
||||
componentDidMount () {
|
||||
this.props.getProjectInfo(this.state.projectId);
|
||||
}
|
||||
render () {
|
||||
if (this.props.projectNotAvailable || this.state.invalidProject) {
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<div className="preview">
|
||||
<NotAvailable />
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Meta projectInfo={this.props.projectInfo} />
|
||||
<IntlGUI
|
||||
assetHost={this.props.assetHost}
|
||||
basePath="/"
|
||||
className="gui"
|
||||
projectHost={this.props.projectHost}
|
||||
projectId={this.state.projectId}
|
||||
projectTitle={this.props.projectInfo.title}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
EmbedView.propTypes = {
|
||||
assetHost: PropTypes.string.isRequired,
|
||||
getProjectInfo: PropTypes.func.isRequired,
|
||||
projectHost: PropTypes.string.isRequired,
|
||||
projectInfo: projectShape,
|
||||
projectNotAvailable: PropTypes.bool
|
||||
};
|
||||
|
||||
EmbedView.defaultProps = {
|
||||
assetHost: process.env.ASSET_HOST,
|
||||
projectHost: process.env.PROJECT_HOST
|
||||
};
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
projectInfo: state.preview.projectInfo,
|
||||
projectNotAvailable: state.preview.projectNotAvailable
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
getProjectInfo: (id, token) => {
|
||||
dispatch(previewActions.getProjectInfo(id, token));
|
||||
}
|
||||
});
|
||||
|
||||
module.exports.View = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(EmbedView);
|
||||
|
||||
GUI.setAppElement(document.getElementById('app'));
|
||||
module.exports.initGuiState = GUI.initEmbedded;
|
||||
module.exports.guiReducers = GUI.guiReducers;
|
||||
module.exports.guiInitialState = GUI.guiInitialState;
|
||||
module.exports.guiMiddleware = GUI.guiMiddleware;
|
||||
module.exports.initLocale = GUI.initLocale;
|
||||
module.exports.localesInitialState = GUI.localesInitialState;
|
30
src/views/preview/embed.jsx
Normal file
30
src/views/preview/embed.jsx
Normal file
|
@ -0,0 +1,30 @@
|
|||
const React = require('react');
|
||||
const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx');
|
||||
const render = require('../../lib/render.jsx');
|
||||
|
||||
// Require this even though we don't use it because, without it, webpack runs out of memory...
|
||||
const Page = require('../../components/page/www/page.jsx'); // eslint-disable-line no-unused-vars
|
||||
|
||||
const previewActions = require('../../redux/preview.js');
|
||||
|
||||
const isSupportedBrowser = require('../../lib/supported-browser').default;
|
||||
const UnsupportedBrowser = require('./unsupported-browser.jsx');
|
||||
|
||||
if (isSupportedBrowser()) {
|
||||
const EmbedView = require('./embed-view.jsx');
|
||||
render(
|
||||
<EmbedView.View />,
|
||||
document.getElementById('app'),
|
||||
{
|
||||
preview: previewActions.previewReducer,
|
||||
...EmbedView.guiReducers
|
||||
},
|
||||
{
|
||||
locales: EmbedView.initLocale(EmbedView.localesInitialState, window._locale),
|
||||
scratchGui: EmbedView.initGuiState(EmbedView.guiInitialState)
|
||||
},
|
||||
EmbedView.guiMiddleware
|
||||
);
|
||||
} else {
|
||||
render(<ErrorBoundary><UnsupportedBrowser /></ErrorBoundary>, document.getElementById('app'));
|
||||
}
|
|
@ -35,17 +35,8 @@ const IntlGUI = injectIntl(GUI.default);
|
|||
|
||||
const localStorageAvailable = 'localStorage' in window && window.localStorage !== null;
|
||||
|
||||
const Sentry = require('@sentry/browser');
|
||||
if (`${process.env.SENTRY_DSN}` !== '') {
|
||||
Sentry.init({
|
||||
dsn: `${process.env.SENTRY_DSN}`,
|
||||
// Do not collect global onerror, only collect specifically from React error boundaries.
|
||||
// TryCatch plugin also includes errors from setTimeouts (i.e. the VM)
|
||||
integrations: integrations => integrations.filter(i =>
|
||||
!(i.name === 'GlobalHandlers' || i.name === 'TryCatch'))
|
||||
});
|
||||
window.Sentry = Sentry; // Allow GUI access to Sentry via window
|
||||
}
|
||||
const initSentry = require('../../lib/sentry.js');
|
||||
initSentry();
|
||||
|
||||
class Preview extends React.Component {
|
||||
constructor (props) {
|
||||
|
@ -258,7 +249,7 @@ class Preview extends React.Component {
|
|||
// this is a project.json as an object
|
||||
// validate expects a string or buffer as input
|
||||
// TODO not sure if we need to check that it also isn't a data view
|
||||
input = JSON.stringify(input);
|
||||
input = JSON.stringify(input); // NOTE: what is the point of doing this??
|
||||
}
|
||||
parser(projectAsset.data, false, (err, projectData) => {
|
||||
if (err) {
|
||||
|
@ -1092,16 +1083,13 @@ module.exports.initGuiState = guiInitialState => {
|
|||
const parts = pathname.split('/').filter(Boolean);
|
||||
// parts[0]: 'projects'
|
||||
// parts[1]: either :id or 'editor'
|
||||
// parts[2]: undefined if no :id, otherwise either 'editor', 'fullscreen' or 'embed'
|
||||
// parts[2]: undefined if no :id, otherwise either 'editor' or 'fullscreen'
|
||||
if (parts.indexOf('editor') === -1) {
|
||||
guiInitialState = GUI.initPlayer(guiInitialState);
|
||||
}
|
||||
if (parts.indexOf('fullscreen') !== -1) {
|
||||
guiInitialState = GUI.initFullScreen(guiInitialState);
|
||||
}
|
||||
if (parts.indexOf('embed') !== -1) {
|
||||
guiInitialState = GUI.initEmbedded(guiInitialState);
|
||||
}
|
||||
return guiInitialState;
|
||||
};
|
||||
|
||||
|
|
70
test/unit/components/navigation.test.jsx
Normal file
70
test/unit/components/navigation.test.jsx
Normal file
|
@ -0,0 +1,70 @@
|
|||
const React = require('react');
|
||||
const {shallowWithIntl} = require('../../helpers/intl-helpers.jsx');
|
||||
import configureStore from 'redux-mock-store';
|
||||
const Navigation = require('../../../src/components/navigation/www/navigation.jsx');
|
||||
const sessionActions = require('../../../src/redux/session.js');
|
||||
|
||||
describe('Navigation', () => {
|
||||
const mockStore = configureStore();
|
||||
let store;
|
||||
|
||||
beforeEach(() => {
|
||||
store = null;
|
||||
});
|
||||
|
||||
const getNavigationWrapper = props => {
|
||||
const wrapper = shallowWithIntl(
|
||||
<Navigation
|
||||
{...props}
|
||||
/>
|
||||
, {context: {store}}
|
||||
);
|
||||
return wrapper
|
||||
.dive() // unwrap redux connect(injectIntl(JoinFlow))
|
||||
.dive(); // unwrap injectIntl(JoinFlow)
|
||||
};
|
||||
|
||||
test('when using old join flow, clicking Join Scratch attemps to open registration', () => {
|
||||
store = mockStore({
|
||||
navigation: {
|
||||
useScratch3Registration: false
|
||||
},
|
||||
session: {
|
||||
status: sessionActions.Status.FETCHED
|
||||
},
|
||||
messageCount: {
|
||||
messageCount: 0
|
||||
}
|
||||
});
|
||||
const props = {
|
||||
handleOpenRegistration: jest.fn()
|
||||
};
|
||||
const navWrapper = getNavigationWrapper(props);
|
||||
const navInstance = navWrapper.instance();
|
||||
|
||||
navWrapper.find('a.registrationLink').simulate('click');
|
||||
expect(navInstance.props.handleOpenRegistration).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('when using new join flow, clicking Join Scratch attemps to navigate to registration', () => {
|
||||
store = mockStore({
|
||||
navigation: {
|
||||
useScratch3Registration: true
|
||||
},
|
||||
session: {
|
||||
status: sessionActions.Status.FETCHED
|
||||
},
|
||||
messageCount: {
|
||||
messageCount: 0
|
||||
}
|
||||
});
|
||||
const props = {
|
||||
navigateToRegistration: jest.fn()
|
||||
};
|
||||
const navWrapper = getNavigationWrapper(props);
|
||||
const navInstance = navWrapper.instance();
|
||||
|
||||
navWrapper.find('a.registrationLink').simulate('click');
|
||||
expect(navInstance.props.navigateToRegistration).toHaveBeenCalled();
|
||||
});
|
||||
});
|
160
test/unit/lib/fastly-extended.test.js
Normal file
160
test/unit/lib/fastly-extended.test.js
Normal file
|
@ -0,0 +1,160 @@
|
|||
describe('fastly library', () => {
|
||||
let mockedFastlyRequest = {};
|
||||
|
||||
jest.mock('fastly', () => (() => ({
|
||||
request: mockedFastlyRequest
|
||||
})));
|
||||
const fastlyExtended = require('../../../bin/lib/fastly-extended'); // eslint-disable-line global-require
|
||||
|
||||
test('getLatestActiveVersion returns largest active VCL number, ' +
|
||||
'when called with VCLs in sequential order', done => {
|
||||
mockedFastlyRequest = jest.fn((method, url, cb) => {
|
||||
cb(null, [
|
||||
{
|
||||
number: 1,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 2,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 3,
|
||||
active: true
|
||||
},
|
||||
{
|
||||
number: 4,
|
||||
active: false
|
||||
}
|
||||
]);
|
||||
});
|
||||
const fastlyInstance = fastlyExtended('api_key', 'service_id');
|
||||
|
||||
fastlyInstance.getLatestActiveVersion((err, response) => {
|
||||
expect(err).toBe(null);
|
||||
expect(response).toEqual({
|
||||
number: 3,
|
||||
active: true
|
||||
});
|
||||
expect(mockedFastlyRequest).toHaveBeenCalledWith(
|
||||
'GET', '/service/service_id/version', expect.any(Function)
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('getLatestActiveVersion returns largest active VCL number, when called with VCLs in mixed up order', done => {
|
||||
mockedFastlyRequest = jest.fn((method, url, cb) => {
|
||||
cb(null, [
|
||||
{
|
||||
number: 4,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 1,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 2,
|
||||
active: true
|
||||
},
|
||||
{
|
||||
number: 3,
|
||||
active: false
|
||||
}
|
||||
]);
|
||||
});
|
||||
const fastlyInstance = fastlyExtended('api_key', 'service_id');
|
||||
|
||||
fastlyInstance.getLatestActiveVersion((err, response) => {
|
||||
expect(err).toBe(null);
|
||||
expect(response).toEqual({
|
||||
number: 2,
|
||||
active: true
|
||||
});
|
||||
expect(mockedFastlyRequest).toHaveBeenCalledWith(
|
||||
'GET', '/service/service_id/version', expect.any(Function)
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('getLatestActiveVersion returns null, when none of the VCL versions are active', done => {
|
||||
mockedFastlyRequest = jest.fn((method, url, cb) => {
|
||||
cb(null, [
|
||||
{
|
||||
number: 4,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 1,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 2,
|
||||
active: false
|
||||
},
|
||||
{
|
||||
number: 3,
|
||||
active: false
|
||||
}
|
||||
]);
|
||||
});
|
||||
const fastlyInstance = fastlyExtended('api_key', 'service_id');
|
||||
|
||||
fastlyInstance.getLatestActiveVersion((err, response) => {
|
||||
expect(err).toBe(null);
|
||||
expect(response).toEqual(null);
|
||||
expect(mockedFastlyRequest).toHaveBeenCalledWith(
|
||||
'GET', '/service/service_id/version', expect.any(Function)
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('getLatestActiveVersion returns largest active VCL number, ' +
|
||||
'when called with a single active VCL', done => {
|
||||
mockedFastlyRequest = jest.fn((method, url, cb) => {
|
||||
cb(null, [
|
||||
{
|
||||
number: 1,
|
||||
active: true
|
||||
}
|
||||
]);
|
||||
});
|
||||
const fastlyInstance = fastlyExtended('api_key', 'service_id');
|
||||
|
||||
fastlyInstance.getLatestActiveVersion((err, response) => {
|
||||
expect(err).toBe(null);
|
||||
expect(response).toEqual({
|
||||
number: 1,
|
||||
active: true
|
||||
});
|
||||
expect(mockedFastlyRequest).toHaveBeenCalledWith(
|
||||
'GET', '/service/service_id/version', expect.any(Function)
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('getLatestActiveVersion returns null, when called with a single inactive VCL', done => {
|
||||
mockedFastlyRequest = jest.fn((method, url, cb) => {
|
||||
cb(null, [
|
||||
{
|
||||
number: 1,
|
||||
active: false
|
||||
}
|
||||
]);
|
||||
});
|
||||
const fastlyInstance = fastlyExtended('api_key', 'service_id');
|
||||
|
||||
fastlyInstance.getLatestActiveVersion((err, response) => {
|
||||
expect(err).toBe(null);
|
||||
expect(response).toEqual(null);
|
||||
expect(mockedFastlyRequest).toHaveBeenCalledWith(
|
||||
'GET', '/service/service_id/version', expect.any(Function)
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue