Merge pull request #7202 from LLK/release/2022-11-15

[Master] release/2022-11-15
This commit is contained in:
Ron de las Alas 2022-11-16 15:17:09 -05:00 committed by GitHub
commit d20066e4d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 461 additions and 231 deletions

View file

@ -74,8 +74,6 @@ aliases:
<<: *setup_python <<: *setup_python
- run: - run:
<<: *deploy <<: *deploy
- run:
<<: *integration
- store_test_results: - store_test_results:
path: test/results path: test/results
- run: - run:
@ -83,6 +81,17 @@ aliases:
command: tar -cvzf build.tar build command: tar -cvzf build.tar build
- store_artifacts: - store_artifacts:
path: build.tar path: build.tar
- &integration_tests_and_store
<<: *defaults
resource_class: large
steps:
- checkout
- run:
<<: *setup
- run:
<<: *integration
- store_test_results:
path: test/results
- &update-translations - &update-translations
<<: *defaults <<: *defaults
steps: steps:
@ -100,6 +109,8 @@ jobs:
<<: *build_and_deploy <<: *build_and_deploy
build-and-deploy-production: build-and-deploy-production:
<<: *build_and_deploy <<: *build_and_deploy
integration-tests:
<<: *integration_tests_and_store
update-translations: update-translations:
<<: *update-translations <<: *update-translations
build-no-deploy: build-no-deploy:
@ -119,6 +130,19 @@ workflows:
- develop - develop
- /^hotfix\/.*/ - /^hotfix\/.*/
- /^release\/.*/ - /^release\/.*/
- integration-tests:
requires:
- build-and-deploy-staging
context:
- scratch-www-all
- scratch-www-staging
- dockerhub-credentials
filters:
branches:
only:
- develop
- /^hotfix\/.*/
- /^release\/.*/
- build-and-deploy-production: - build-and-deploy-production:
context: context:
- scratch-www-all - scratch-www-all
@ -128,6 +152,17 @@ workflows:
branches: branches:
only: only:
- master - master
- integration-tests:
requires:
- build-and-deploy-production
context:
- scratch-www-all
- scratch-www-production
- dockerhub-credentials
filters:
branches:
only:
- master
Update-translations: Update-translations:
triggers: triggers:
- schedule: # every evening at 7pm EST (8pm EDT, Midnight UTC) - schedule: # every evening at 7pm EST (8pm EDT, Midnight UTC)

View file

@ -1,122 +0,0 @@
language: node_js
node_js:
- '12'
sudo: required
group: deprecated-2017Q4
cache:
directories:
- /home/travis/virtualenv/python2.7/lib/python2.7/site-packages
notifications:
slack:
secure: ezESiG7JnuSLZc2/PPhOvWUv5BHBCr+g86MsuLLw+S+zz3DUfzWHMQ1g5tUvkeSDTPmfEIX41EnPkaoWtsD3OGO0PGXgseAfA8+6Z4N1rICNZZrhXZB2s6UdwRK1e+0Jol4W3kHmt96BHyN2scLNgJYeWMgSJllVsuPhMTlKBZIXI9u540NH8Nxjl3f2WvoIg64Q1mZvMxkpPbw4xssx6U4HSFE8kTTE6+EFsSxzombFX0cLGjPiJ9QZgGVUk4UkIjyiFLQQDfQlLllCaUpqJ9+qbuCNoMSKA2yty/qyZ8Y+r4OlMberjmBzR9GRLLyXWWcaAfMIgwlRhjtLYIDAUSsGM1iwUWCgyB9maG2IiXuYLSueuMx8DcDwbpUepoDgnqBYnM2AJmT8gcsxqlKYzJpYpHDgZgBlLZQgMXqjrVJHs/Tf9XVcLS6HAn1Ww0OOT01jThfy4gClpAuqLayYexsXOoL+RaFg25E2NzuTtaFWgRfWZgcAeqYNDiUzwun2D4vZ5I+NtdRP0gzpbG2fxhFz05vAqyf1Kp6ZYb17Li3A38dIm6Lsvv3qawAIAgNaZpIZX3f89+uq6jHU8kJy1Iv823JK2Xac3vEz3SHUKJnuXFF0LO07om9AcNEXhP/JrJ617S8nfvDtZRJODMFhz8qQwie+65Ql1I871goBpVs=
env:
global:
- CXX=g++-4.8
- API_HOST_master=https://api.scratch.mit.edu
- API_HOST_STAGING=https://api.scratch.ly
- API_HOST_VAR=API_HOST_$TRAVIS_BRANCH
- API_HOST=${!API_HOST_VAR}
- API_HOST=${API_HOST:-$API_HOST_STAGING}
- ASSET_HOST_master=https://assets.scratch.mit.edu
- ASSET_HOST_STAGING=https://assets.scratch.ly
- ASSET_HOST_VAR=ASSET_HOST_$TRAVIS_BRANCH
- ASSET_HOST=${!ASSET_HOST_VAR}
- ASSET_HOST=${ASSET_HOST:-$ASSET_HOST_STAGING}
- BACKPACK_HOST_master=https://backpack.scratch.mit.edu
- BACKPACK_HOST_STAGING=https://backpack.scratch.ly
- BACKPACK_HOST_VAR=BACKPACK_HOST_$TRAVIS_BRANCH
- BACKPACK_HOST=${!BACKPACK_HOST_VAR}
- BACKPACK_HOST=${BACKPACK_HOST:-$BACKPACK_HOST_STAGING}
- CLOUDDATA_HOST_master=clouddata.scratch.mit.edu
- CLOUDDATA_HOST_STAGING=varserver2.scratch.ly
- CLOUDDATA_HOST_VAR=CLOUDDATA_HOST_$TRAVIS_BRANCH
- CLOUDDATA_HOST=${!CLOUDDATA_HOST_VAR}
- CLOUDDATA_HOST=${CLOUDDATA_HOST:-$CLOUDDATA_HOST_STAGING}
- RECAPTCHA_SITE_KEY_master=6LeRbUwUAAAAAFYhKgk3G9OKWqE_OJ7Z-7VTUCbl
- RECAPTCHA_SITE_KEY_STAGING=6LfukK4UAAAAAFR44yoZMhv8fj6xh-PMiIxwryG3
- RECAPTCHA_SITE_KEY_VAR=RECAPTCHA_SITE_KEY_$TRAVIS_BRANCH
- RECAPTCHA_SITE_KEY=${!RECAPTCHA_SITE_KEY_VAR}
- RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY:-$RECAPTCHA_SITE_KEY_STAGING}
- ROOT_URL_master=https://scratch.mit.edu
- ROOT_URL_STAGING=https://scratch.ly
- ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
- ROOT_URL=${!ROOT_URL_VAR}
- ROOT_URL=${ROOT_URL:-$ROOT_URL_STAGING}
- PROJECT_HOST_master=https://projects.scratch.mit.edu
- PROJECT_HOST_STAGING=https://projects.scratch.ly
- PROJECT_HOST_VAR=PROJECT_HOST_$TRAVIS_BRANCH
- PROJECT_HOST=${!PROJECT_HOST_VAR}
- PROJECT_HOST=${PROJECT_HOST:-$PROJECT_HOST_STAGING}
- TEST_PROJECT_ID_master=414835599
- TEST_PROJECT_ID_STAGING=1300006196
- TEST_PROJECT_ID_VAR=TEST_PROJECT_ID_$TRAVIS_BRANCH
- TEST_PROJECT_ID=${!TEST_PROJECT_ID_VAR}
- TEST_PROJECT_ID=${TEST_PROJECT_ID:-$TEST_PROJECT_ID_STAGING}
- STATIC_HOST_master=https://uploads.scratch.mit.edu
- STATIC_HOST_STAGING=https://uploads.scratch.ly
- STATIC_HOST_VAR=STATIC_HOST_$TRAVIS_BRANCH
- STATIC_HOST=${!STATIC_HOST_VAR}
- STATIC_HOST=${STATIC_HOST:-$STATIC_HOST_STAGING}
- PATH=$PATH:$PWD/test/integration/node_modules/chromedriver/bin
- AWS_ACCESS_KEY_ID=$EB_AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY=$EB_AWS_SECRET_ACCESS_KEY
- FASTLY_ACTIVATE_CHANGES=true
# FASTLY_API_KEY
- secure: XNWcCnqSAd4MpKg6FVe3WeFmdqfdH753+PBCOEkJrHS+AHmLMuWsjIQFJ3LUR9ylEQRVPR2OyXJW/R8NI9toStREgwE4fwIVo0l4fwYqLStxYpEKlcWfkJ3uNpRZhvcVmUBycelrnjJqXVdrtlxPCKX0tNkpcKH2b98We7A2/r7HxKv13upDxWTQ/qRUv0+SJCRTB4n/QInABi87Ef8Q2rNGrL0WQzQvVBeiEXOP0JSkyYK4+q65gswMKPehgiFagnYVgJN9J9Q1VrBDc06gidbznBcEpPaBAYvsTTY9dWTJxaaKNSrmOIe/OiuJUEHjb+8NL+j6Lp7wX8lzEjbr0FkVlFnxS9VbftS2KFkN7+c3RF57+tsq0xwJ6vgomIVS5FupHgl/oCJicnH/FLfynditOLZhmhF+Ed5GCAoIEamRRzcVHdjvglsEtYsDX1/z2t+HKYtPQuXYOywDRVTSPf88eEbu8ehfgNcYaIAuD6eedyDnKTOIv7owWs3Y7GsxQ2jBLGXq1YoUEkPtB0vfaHi72CeEhDQ53mEn2Ure47UMGMgUjKtiIhDBNTbECwP/ZDJv1accGRljKjDy93aCJeRi1T7Op7tDbHSl4ScieeOwOeKJMcD1U5JGdA/sRnjjgSKb24P2ys4NYr95dgqWNNGPGMxca+lGufzdEaTQT44=
# FASTLY_SERVICE_ID_master
- secure: l5jwRVj4rj7qT6iuRinVqBBOie3OwBgXDPFER15JLLj5H5HZn0iGtdyuAhjvNWp6+Q/gGU6GAJEBCx63oFESBklyKUbZEAFqVI8f8g+d9toce+rlnMLcbw5A4jfgyqxJS9IYu57v291AGO78x7+HhUxbf9XLjhl1N18sIIDcMUXQir1zjnOkyBm3M4In2pi7PLdkpYwaWDxyjR9+Jy5BE9bl68BRSoqRGidFpoWHeZM4zrXzY49gSUsHNL6UnmYwCdEOGEclSn9cAhTE2O+z24Du3Kp35JfBnI8kHFfBn/u5auiHPzuwC4QvovjrxBNX9bvjBKVOPhgaq0kw3cKxftEeMAlHciancaXnCWFGSSQ7Cw7isvbYAJsy9gbNtJoNn90KlSPLUQ8pRcPU7pcfCabBxGYFda4736dWjq++SxiCyMgmxU9Q5LqOQWNvGsLREAKp4SOg0nkv2mrebAvL3Ta/nfI1Fb5mDtxsHJldttMYQgElV5OsXncZBY5pZG5KdbffnaxS40oRT58xdMQPLx/RUK/ZLkq+3lJM7Pb/ZuSJr7WBTu54VsWrPGr53Td1kZgONH1ksAepJxCij/X4f56aiQbRm144r9ERSJZBZ8qn8GG7N3Mad+ZJkPS9Bs4DIDgJyxMm7kIhUhPfHzydsb93ns1bPI6l+S+dx2JIKHc=
# FASTLY_SERVICE_ID_STAGING
- secure: MyT0xGN75v1bVnP1fpKaenx2WijGi2OZCQV5TDeDkgqlkW9n2HOtGa4bWE+cT+hR8UieC176sGg7OvsUCy0nYm5QhR8WJc+8WGa689GsPDUMgw+hUKfk/JYeHQHNKTwAyY6iN6Jo2qQtcBMS/M8xakwYaktB0vcNNId13Fhj7IMUTUEdpSWQLTkaXGB7cHM0ak9KqivH2aqzoncJnhcRNrqVz3FaLKmqAXI8NpQcgz5uAxkBjmniIHWkJPWRvLqr3xRebDaXiMFI7pB+iTSlbzR2lqsZLzZpSBJbqKhPx99KvnHjlSq7LAjP840X5Vj5ZCPlSrZe4IIYp2g863j5nOUHj1MC1Eh6xD3bjmZ+61KaWchSWMp+XOs9grghl9kLexfwZbCNxW0s8uq+WqOY/qcbzm/go5z7WFlDJ1Qmdo2sLhdtwCwcSwyCR8nhoaHqJtKg9PJTyKbr+SWizDVlSyWRccqyJ1jd/vjd1xAG5RRM6YuP4RBqEAWGzOsx+kJMhnOOI3yIZfY7eTntMxb9Gxjyk4IsBX3pyPHJSWeb7x4bzMGCHSewMmdTzcFHvSmRaZ2w50PSqPSagR42mYJqAfaS1/eMSf2oI5kE9RmiQYP4SrLerdYFbYEt0w8/+Hu8glRqpJtMSB42yWanMIvMBahSQH9dun3TzFQKKEljwzA=
- FASTLY_SERVICE_ID_VAR=FASTLY_SERVICE_ID_$TRAVIS_BRANCH
- FASTLY_SERVICE_ID=${!FASTLY_SERVICE_ID_VAR}
- FASTLY_SERVICE_ID=${FASTLY_SERVICE_ID:-$FASTLY_SERVICE_ID_STAGING}
- GA_TRACKER_master=UA-30688952-1
- GA_TRACKER_STAGING=UA-30688952-7
- GA_TRACKER_VAR=GA_TRACKER_$TRAVIS_BRANCH
- GA_TRACKER=${!GA_TRACKER_VAR}
- GA_TRACKER=${GA_TRACKER:-$GA_TRACKER_STAGING}
- SCRATCH_ENV_master=production
- SCRATCH_ENV_STAGING=staging
- SCRATCH_ENV_VAR=SCRATCH_ENV_$TRAVIS_BRANCH
- SCRATCH_ENV=${!SCRATCH_ENV_VAR}
- SCRATCH_ENV=${SCRATCH_ENV:-$SCRATCH_ENV_STAGING}
- S3_BUCKET_NAME_master=scratch-www-production
- S3_BUCKET_NAME_STAGING=scratch-www-staging
- S3_BUCKET_NAME_VAR=S3_BUCKET_NAME_$TRAVIS_BRANCH
- S3_BUCKET_NAME=${!S3_BUCKET_NAME_VAR}
- S3_BUCKET_NAME=${S3_BUCKET_NAME:-$S3_BUCKET_NAME_STAGING}
- S3_LOCAL_DIR=build
- SENTRY_DSN_master=https://ebc2f8a6bc7b44ca8fd902fd4f16b3d7@sentry.io/1357122
- SENTRY_DSN_STAGING=https://c01014988b0a4f44bbefdf235623c456@sentry.io/1357982
- SENTRY_DSN_VAR=SENTRY_DSN_$TRAVIS_BRANCH
- SENTRY_DSN=${!SENTRY_DSN_VAR}
- SENTRY_DSN=${SENTRY_DSN:-$SENTRY_DSN_STAGING}
- SENTRY_ORG=scratch-foundation
- SENTRY_PROJECT_master=scratch-30-production
- SENTRY_PROJECT_STAGING=scratch-30-staging
- SENTRY_PROJECT_VAR=SENTRY_PROJECT_$TRAVIS_BRANCH
- SENTRY_PROJECT=${!SENTRY_PROJECT_VAR}
- SENTRY_PROJECT=${SENTRY_PROJECT:-$SENTRY_PROJECT_STAGING}
- SKIP_CLEANUP=true
- NODE_ENV=production
- WWW_VERSION=${TRAVIS_COMMIT:0:5}
addons:
chrome: stable
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
install:
- sudo -H pip install -r requirements.txt
- npm --production=false ci
jobs:
include:
- stage: test
- stage: update translations
script: npm run i18n:push
stages:
- name: test
if: type != cron
- name: update translations
if: branch == develop AND type == cron

144
package-lock.json generated
View file

@ -99,8 +99,8 @@
"regenerator-runtime": "0.13.9", "regenerator-runtime": "0.13.9",
"sass": "1.49.7", "sass": "1.49.7",
"sass-loader": "10.2.1", "sass-loader": "10.2.1",
"scratch-gui": "1.0.48", "scratch-gui": "1.1.8",
"scratch-l10n": "3.15.20221027032119", "scratch-l10n": "3.15.20221115032105",
"selenium-webdriver": "4.1.0", "selenium-webdriver": "4.1.0",
"slick-carousel": "1.6.0", "slick-carousel": "1.6.0",
"style-loader": "0.12.3", "style-loader": "0.12.3",
@ -23114,9 +23114,9 @@
} }
}, },
"node_modules/scratch-gui": { "node_modules/scratch-gui": {
"version": "1.0.48", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.0.48.tgz", "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.1.8.tgz",
"integrity": "sha512-cbmbocO59OYs0Wafc6TYVCUuK54HhjRpAKxlSyWHqGrojNvRBlMAbqlK9CGzQj7h+he/0ZfqCdLeGsjPtLPnqQ==", "integrity": "sha512-/P1yhCk418ioPvFR541UPc1BCHrh+Ieohp4PsdY/IKkyl65ZQn7YWElgwf+zyGu3gf4UCJe5713UKffGDouLxA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"arraybuffer-loader": "^1.0.6", "arraybuffer-loader": "^1.0.6",
@ -23168,13 +23168,13 @@
"redux-throttle": "0.1.1", "redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20200528195344", "scratch-audio": "0.1.0-prerelease.20200528195344",
"scratch-blocks": "0.1.0-prerelease.20221024060953", "scratch-blocks": "0.1.0-prerelease.20221024060953",
"scratch-l10n": "3.15.20221024032103", "scratch-l10n": "3.15.20221115032105",
"scratch-paint": "1.1.29", "scratch-paint": "1.1.31",
"scratch-render": "0.1.0-prerelease.20221024201900", "scratch-render": "0.1.0-prerelease.20221102163423",
"scratch-render-fonts": "1.0.0-prerelease.20221024190656", "scratch-render-fonts": "1.0.0-prerelease.20221102164332",
"scratch-storage": "2.0.2", "scratch-storage": "2.0.2",
"scratch-svg-renderer": "0.2.0-prerelease.20221024201850", "scratch-svg-renderer": "0.2.0-prerelease.20221102163324",
"scratch-vm": "1.2.52", "scratch-vm": "1.2.54",
"startaudiocontext": "1.2.1", "startaudiocontext": "1.2.1",
"style-loader": "^0.23.0", "style-loader": "^0.23.0",
"text-encoding": "0.7.0", "text-encoding": "0.7.0",
@ -23451,28 +23451,10 @@
"symbol-observable": "^1.0.3" "symbol-observable": "^1.0.3"
} }
}, },
"node_modules/scratch-gui/node_modules/scratch-l10n": {
"version": "3.15.20221024032103",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20221024032103.tgz",
"integrity": "sha512-Rntiu90azd27jaaRsKAeDgr96Qez8fl2yvJrEBMOK5fOX2AjiP9L3HKAolOA/vnhM5fvMbGFeymDbKaDb/x3Yg==",
"dev": true,
"dependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@transifex/api": "4.2.5",
"babel-plugin-react-intl": "^3.0.1",
"download": "^8.0.0",
"transifex": "1.6.6"
},
"bin": {
"build-i18n-src": "scripts/build-i18n-src.js",
"tx-push-src": "scripts/tx-push-src.js"
}
},
"node_modules/scratch-gui/node_modules/scratch-paint": { "node_modules/scratch-gui/node_modules/scratch-paint": {
"version": "1.1.29", "version": "1.1.31",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.29.tgz", "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.31.tgz",
"integrity": "sha512-IgJGnA3+WrLLDveLMYDl9Z3RZCPAeRDLDI7r3QRMZSdvpZW46/ddG+dO0YfYVQHekgAf9IHaevCKV/9PNOHxPw==", "integrity": "sha512-yfKgYJVsNmBHQoSh3bZNjcVQ78qAIgQeX820fe5LthuMMn7DE1syUwD56IPFJWhGrR0ykp8Fsf038bbxNuZZfw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@scratch/paper": "0.11.20200728195508", "@scratch/paper": "0.11.20200728195508",
@ -23505,9 +23487,9 @@
"dev": true "dev": true
}, },
"node_modules/scratch-gui/node_modules/scratch-svg-renderer": { "node_modules/scratch-gui/node_modules/scratch-svg-renderer": {
"version": "0.2.0-prerelease.20221024201850", "version": "0.2.0-prerelease.20221102163324",
"resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20221024201850.tgz", "resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20221102163324.tgz",
"integrity": "sha512-aeNC0axSAfk/A6ZOLx08aKPWyoq8ulYTexD4RgbJ4K2ksT4cXIUXzzbUWptj7iHnx3mdFXeFmIhqpc9ty5GVig==", "integrity": "sha512-wYFYq+SbPe/aUAbudjp3a7F36DCHn9fL5g+WhKTAgeatqTSd0aw8cGJXVLdAK0l7XecvajOQtouxsbZbLZ66zQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"base64-js": "1.2.1", "base64-js": "1.2.1",
@ -23568,9 +23550,9 @@
} }
}, },
"node_modules/scratch-l10n": { "node_modules/scratch-l10n": {
"version": "3.15.20221027032119", "version": "3.15.20221115032105",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20221027032119.tgz", "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20221115032105.tgz",
"integrity": "sha512-nVT2lkaaFccUJbrGZcnwouGxwNWUpeY2hRCCD2htBMs2SQEG23a5aXE6FcLU0SGq8R3o7rJ0RG1+AYCvxjWdsA==", "integrity": "sha512-bFkzvDCBv/pmxigG9dYB3x3KewJvF9M/XAtcFEL7KplFm6WUgOyKFkIbidz7dYY/P5StUj2tB8I3z0m2Qk+N1w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/cli": "^7.1.2", "@babel/cli": "^7.1.2",
@ -23609,9 +23591,9 @@
} }
}, },
"node_modules/scratch-render": { "node_modules/scratch-render": {
"version": "0.1.0-prerelease.20221024201900", "version": "0.1.0-prerelease.20221102163423",
"resolved": "https://registry.npmjs.org/scratch-render/-/scratch-render-0.1.0-prerelease.20221024201900.tgz", "resolved": "https://registry.npmjs.org/scratch-render/-/scratch-render-0.1.0-prerelease.20221102163423.tgz",
"integrity": "sha512-6dfu8J3x8rsm6RUMQ+Jq4nunJuCX/iCm6Me+NqFpHivx25OPWYF7frczJ7+UtoluBts3eSLfywOr1fQF6KaBNw==", "integrity": "sha512-1pCvVsBL+gtRzCnTFUXKHjZrVW9bIFIGKUbNs8A3x0T9VfZaSlgRYRrBlSgNdZQC/TT7K+YZsz9By8tyBPV8aA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"grapheme-breaker": "0.3.2", "grapheme-breaker": "0.3.2",
@ -23629,9 +23611,9 @@
} }
}, },
"node_modules/scratch-render-fonts": { "node_modules/scratch-render-fonts": {
"version": "1.0.0-prerelease.20221024190656", "version": "1.0.0-prerelease.20221102164332",
"resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20221024190656.tgz", "resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20221102164332.tgz",
"integrity": "sha512-ZN2K7wKh8sJrzTZ61AwTTMwrm2AB/jsiHLeF8M1n0A0SoRaBfB7iBYv6cwvW2ZN+pnUBClHAb7bT9/KRlExfFg==", "integrity": "sha512-22MbRDGUSArVEoHatg5rt7f/H0wWhMrcyN6HD0OQJeDqdlO3qSSX9/qvdzNJGYWwZkhrdJWcI5JGD1YuJfefmw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"base64-loader": "1.0.0" "base64-loader": "1.0.0"
@ -23767,9 +23749,9 @@
"dev": true "dev": true
}, },
"node_modules/scratch-vm": { "node_modules/scratch-vm": {
"version": "1.2.52", "version": "1.2.54",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.2.52.tgz", "resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.2.54.tgz",
"integrity": "sha512-EaR4txpZhL/QF95IyTRnQ0ef37tYIzTdRTe7lT4T9+RaPVVVv6bsUsC5l0XL1e/01KZpTiw2WVf+YE0OwrjfFg==", "integrity": "sha512-lg6Ay+JhqZ9hjL3o+vp9hQmksAURYQC6xcEgeIfbKWIyZGOndOA6VLTarJ+5uiGwphMb8SBlWpG2fBPHiAgKRg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@vernier/godirect": "1.5.0", "@vernier/godirect": "1.5.0",
@ -51177,9 +51159,9 @@
} }
}, },
"scratch-gui": { "scratch-gui": {
"version": "1.0.48", "version": "1.1.8",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.0.48.tgz", "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.1.8.tgz",
"integrity": "sha512-cbmbocO59OYs0Wafc6TYVCUuK54HhjRpAKxlSyWHqGrojNvRBlMAbqlK9CGzQj7h+he/0ZfqCdLeGsjPtLPnqQ==", "integrity": "sha512-/P1yhCk418ioPvFR541UPc1BCHrh+Ieohp4PsdY/IKkyl65ZQn7YWElgwf+zyGu3gf4UCJe5713UKffGDouLxA==",
"dev": true, "dev": true,
"requires": { "requires": {
"arraybuffer-loader": "^1.0.6", "arraybuffer-loader": "^1.0.6",
@ -51231,13 +51213,13 @@
"redux-throttle": "0.1.1", "redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20200528195344", "scratch-audio": "0.1.0-prerelease.20200528195344",
"scratch-blocks": "0.1.0-prerelease.20221024060953", "scratch-blocks": "0.1.0-prerelease.20221024060953",
"scratch-l10n": "3.15.20221024032103", "scratch-l10n": "3.15.20221115032105",
"scratch-paint": "1.1.29", "scratch-paint": "1.1.31",
"scratch-render": "0.1.0-prerelease.20221024201900", "scratch-render": "0.1.0-prerelease.20221102163423",
"scratch-render-fonts": "1.0.0-prerelease.20221024190656", "scratch-render-fonts": "1.0.0-prerelease.20221102164332",
"scratch-storage": "2.0.2", "scratch-storage": "2.0.2",
"scratch-svg-renderer": "0.2.0-prerelease.20221024201850", "scratch-svg-renderer": "0.2.0-prerelease.20221102163324",
"scratch-vm": "1.2.52", "scratch-vm": "1.2.54",
"startaudiocontext": "1.2.1", "startaudiocontext": "1.2.1",
"style-loader": "^0.23.0", "style-loader": "^0.23.0",
"text-encoding": "0.7.0", "text-encoding": "0.7.0",
@ -51460,24 +51442,10 @@
"symbol-observable": "^1.0.3" "symbol-observable": "^1.0.3"
} }
}, },
"scratch-l10n": {
"version": "3.15.20221024032103",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20221024032103.tgz",
"integrity": "sha512-Rntiu90azd27jaaRsKAeDgr96Qez8fl2yvJrEBMOK5fOX2AjiP9L3HKAolOA/vnhM5fvMbGFeymDbKaDb/x3Yg==",
"dev": true,
"requires": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@transifex/api": "4.2.5",
"babel-plugin-react-intl": "^3.0.1",
"download": "^8.0.0",
"transifex": "1.6.6"
}
},
"scratch-paint": { "scratch-paint": {
"version": "1.1.29", "version": "1.1.31",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.29.tgz", "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.31.tgz",
"integrity": "sha512-IgJGnA3+WrLLDveLMYDl9Z3RZCPAeRDLDI7r3QRMZSdvpZW46/ddG+dO0YfYVQHekgAf9IHaevCKV/9PNOHxPw==", "integrity": "sha512-yfKgYJVsNmBHQoSh3bZNjcVQ78qAIgQeX820fe5LthuMMn7DE1syUwD56IPFJWhGrR0ykp8Fsf038bbxNuZZfw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@scratch/paper": "0.11.20200728195508", "@scratch/paper": "0.11.20200728195508",
@ -51499,9 +51467,9 @@
} }
}, },
"scratch-svg-renderer": { "scratch-svg-renderer": {
"version": "0.2.0-prerelease.20221024201850", "version": "0.2.0-prerelease.20221102163324",
"resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20221024201850.tgz", "resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20221102163324.tgz",
"integrity": "sha512-aeNC0axSAfk/A6ZOLx08aKPWyoq8ulYTexD4RgbJ4K2ksT4cXIUXzzbUWptj7iHnx3mdFXeFmIhqpc9ty5GVig==", "integrity": "sha512-wYFYq+SbPe/aUAbudjp3a7F36DCHn9fL5g+WhKTAgeatqTSd0aw8cGJXVLdAK0l7XecvajOQtouxsbZbLZ66zQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"base64-js": "1.2.1", "base64-js": "1.2.1",
@ -51552,9 +51520,9 @@
} }
}, },
"scratch-l10n": { "scratch-l10n": {
"version": "3.15.20221027032119", "version": "3.15.20221115032105",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20221027032119.tgz", "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20221115032105.tgz",
"integrity": "sha512-nVT2lkaaFccUJbrGZcnwouGxwNWUpeY2hRCCD2htBMs2SQEG23a5aXE6FcLU0SGq8R3o7rJ0RG1+AYCvxjWdsA==", "integrity": "sha512-bFkzvDCBv/pmxigG9dYB3x3KewJvF9M/XAtcFEL7KplFm6WUgOyKFkIbidz7dYY/P5StUj2tB8I3z0m2Qk+N1w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/cli": "^7.1.2", "@babel/cli": "^7.1.2",
@ -51588,9 +51556,9 @@
} }
}, },
"scratch-render": { "scratch-render": {
"version": "0.1.0-prerelease.20221024201900", "version": "0.1.0-prerelease.20221102163423",
"resolved": "https://registry.npmjs.org/scratch-render/-/scratch-render-0.1.0-prerelease.20221024201900.tgz", "resolved": "https://registry.npmjs.org/scratch-render/-/scratch-render-0.1.0-prerelease.20221102163423.tgz",
"integrity": "sha512-6dfu8J3x8rsm6RUMQ+Jq4nunJuCX/iCm6Me+NqFpHivx25OPWYF7frczJ7+UtoluBts3eSLfywOr1fQF6KaBNw==", "integrity": "sha512-1pCvVsBL+gtRzCnTFUXKHjZrVW9bIFIGKUbNs8A3x0T9VfZaSlgRYRrBlSgNdZQC/TT7K+YZsz9By8tyBPV8aA==",
"dev": true, "dev": true,
"requires": { "requires": {
"grapheme-breaker": "0.3.2", "grapheme-breaker": "0.3.2",
@ -51642,9 +51610,9 @@
} }
}, },
"scratch-render-fonts": { "scratch-render-fonts": {
"version": "1.0.0-prerelease.20221024190656", "version": "1.0.0-prerelease.20221102164332",
"resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20221024190656.tgz", "resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20221102164332.tgz",
"integrity": "sha512-ZN2K7wKh8sJrzTZ61AwTTMwrm2AB/jsiHLeF8M1n0A0SoRaBfB7iBYv6cwvW2ZN+pnUBClHAb7bT9/KRlExfFg==", "integrity": "sha512-22MbRDGUSArVEoHatg5rt7f/H0wWhMrcyN6HD0OQJeDqdlO3qSSX9/qvdzNJGYWwZkhrdJWcI5JGD1YuJfefmw==",
"dev": true, "dev": true,
"requires": { "requires": {
"base64-loader": "1.0.0" "base64-loader": "1.0.0"
@ -51748,9 +51716,9 @@
"dev": true "dev": true
}, },
"scratch-vm": { "scratch-vm": {
"version": "1.2.52", "version": "1.2.54",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.2.52.tgz", "resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.2.54.tgz",
"integrity": "sha512-EaR4txpZhL/QF95IyTRnQ0ef37tYIzTdRTe7lT4T9+RaPVVVv6bsUsC5l0XL1e/01KZpTiw2WVf+YE0OwrjfFg==", "integrity": "sha512-lg6Ay+JhqZ9hjL3o+vp9hQmksAURYQC6xcEgeIfbKWIyZGOndOA6VLTarJ+5uiGwphMb8SBlWpG2fBPHiAgKRg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@vernier/godirect": "1.5.0", "@vernier/godirect": "1.5.0",

View file

@ -134,8 +134,8 @@
"regenerator-runtime": "0.13.9", "regenerator-runtime": "0.13.9",
"sass": "1.49.7", "sass": "1.49.7",
"sass-loader": "10.2.1", "sass-loader": "10.2.1",
"scratch-gui": "1.0.48", "scratch-gui": "1.1.8",
"scratch-l10n": "3.15.20221027032119", "scratch-l10n": "3.15.20221115032105",
"selenium-webdriver": "4.1.0", "selenium-webdriver": "4.1.0",
"slick-carousel": "1.6.0", "slick-carousel": "1.6.0",
"style-loader": "0.12.3", "style-loader": "0.12.3",

View file

@ -20,7 +20,8 @@ module.exports = {
const stage = project.targets[0]; const stage = project.targets[0];
return Object.values(stage.variables) return Object.values(stage.variables)
.some(variable => variable.length === 3); // 3 entries if cloud var .some(variable => variable.length === 3); // 3 entries if cloud var
} },
videoSensing: project => (project.extensions || []).includes('videoSensing')
}, },
2: { 2: {
extensions: () => [], // Showing extension chip not implemented for scratch2 projects extensions: () => [], // Showing extension chip not implemented for scratch2 projects
@ -30,6 +31,11 @@ module.exports = {
// Block traversing is complicated in scratch2 projects... // Block traversing is complicated in scratch2 projects...
// This check should work even if you have sprites named getUserName, etc. // This check should work even if you have sprites named getUserName, etc.
JSON.stringify(project).indexOf('["getUserName"]') !== -1, JSON.stringify(project).indexOf('["getUserName"]') !== -1,
cloudData: project => project.info.hasCloudData cloudData: project => project.info.hasCloudData,
videoSensing: project => {
const stringifiedProject = JSON.stringify(project);
return ['senseVideoMotion', 'setVideoState', 'setVideoTransparency', 'whenSensorGreaterThan']
.some(opcode => stringifiedProject.includes(`["${opcode}"`));
}
} }
}; };

View file

@ -47,5 +47,6 @@
"project.cloudDataLink": "See Data", "project.cloudDataLink": "See Data",
"project.usernameBlockAlert": "This project can detect who is using it, through the \"username\" block. To hide your identity, sign out before using the project.", "project.usernameBlockAlert": "This project can detect who is using it, through the \"username\" block. To hide your identity, sign out before using the project.",
"project.inappropriateUpdate": "Hmm...the bad word detector thinks there is a problem with your text. Please change it and remember to be respectful.", "project.inappropriateUpdate": "Hmm...the bad word detector thinks there is a problem with your text. Please change it and remember to be respectful.",
"project.mutedAddToStudio": "You will be able to add to studios again {inDuration}." "project.mutedAddToStudio": "You will be able to add to studios again {inDuration}.",
"project.cloudDataAndVideoAlert": "For privacy reasons, cloud variables have been disabled in this project because it contains video sensing blocks."
} }

View file

@ -125,6 +125,7 @@ const PreviewPresentation = ({
originalInfo, originalInfo,
parentInfo, parentInfo,
showCloudDataAlert, showCloudDataAlert,
showCloudDataAndVideoAlert,
showUsernameBlockAlert, showUsernameBlockAlert,
projectHost, projectHost,
projectId, projectId,
@ -335,16 +336,23 @@ const PreviewPresentation = ({
{fullscreen: isFullScreen} {fullscreen: isFullScreen}
)} )}
> >
<div className="project-info-alerts">
{showCloudDataAlert && ( {showCloudDataAlert && (
<FlexRow className="project-info-alert"> <FlexRow className="project-info-alert">
<FormattedMessage id="project.cloudDataAlert" /> <FormattedMessage id="project.cloudDataAlert" />
</FlexRow> </FlexRow>
)} )}
{showCloudDataAndVideoAlert && (
<FlexRow className="project-info-alert">
<FormattedMessage id="project.cloudDataAndVideoAlert" />
</FlexRow>
)}
{showUsernameBlockAlert && ( {showUsernameBlockAlert && (
<FlexRow className="project-info-alert"> <FlexRow className="project-info-alert">
<FormattedMessage id="project.usernameBlockAlert" /> <FormattedMessage id="project.usernameBlockAlert" />
</FlexRow> </FlexRow>
)} )}
</div>
<IntlGUI <IntlGUI
isPlayerOnly isPlayerOnly
assetHost={assetHost} assetHost={assetHost}
@ -785,6 +793,7 @@ PreviewPresentation.propTypes = {
reportOpen: PropTypes.bool, reportOpen: PropTypes.bool,
showAdminPanel: PropTypes.bool, showAdminPanel: PropTypes.bool,
showCloudDataAlert: PropTypes.bool, showCloudDataAlert: PropTypes.bool,
showCloudDataAndVideoAlert: PropTypes.bool,
showEmailConfirmationModal: PropTypes.bool, showEmailConfirmationModal: PropTypes.bool,
showEmailConfirmationBanner: PropTypes.bool, showEmailConfirmationBanner: PropTypes.bool,
showModInfo: PropTypes.bool, showModInfo: PropTypes.bool,

View file

@ -367,10 +367,17 @@ $stage-width: 480px;
z-index: 1; z-index: 1;
$alert-bg: rgba(255, 255, 255, .85); $alert-bg: rgba(255, 255, 255, .85);
.project-info-alert {
.project-info-alerts {
position: absolute; position: absolute;
z-index: 8; // Below navbar z-index: 8; // Below navbar
margin: 60px 15px; margin: 60px 15px 0;
display: flex;
flex-direction: column;
gap: 15px;
}
.project-info-alert {
border-radius: .25rem; border-radius: .25rem;
background: $alert-bg; background: $alert-bg;
padding: .75rem; padding: .75rem;

View file

@ -379,9 +379,10 @@ class Preview extends React.Component {
} }
if (showAlerts) { if (showAlerts) {
// Check for username block only if user is logged in // Check for username and video blocks only if user is logged in
if (this.props.isLoggedIn) { if (this.props.isLoggedIn) {
newState.showUsernameBlockAlert = helpers.usernameBlock(projectData[0]); newState.showUsernameBlockAlert = helpers.usernameBlock(projectData[0]);
newState.showCloudDataAndVideoAlert = hasCloudData && helpers.videoSensing(projectData[0]);
} else { // Check for cloud vars only if user is logged out } else { // Check for cloud vars only if user is logged out
newState.showCloudDataAlert = hasCloudData; newState.showCloudDataAlert = hasCloudData;
} }
@ -492,6 +493,7 @@ class Preview extends React.Component {
this.setState({ this.setState({
showUsernameBlockAlert: false, showUsernameBlockAlert: false,
showCloudDataAlert: false, showCloudDataAlert: false,
showCloudDataAndVideoAlert: false,
greenFlagRecorded: true greenFlagRecorded: true
}); });
} }
@ -607,7 +609,8 @@ class Preview extends React.Component {
handleSeeInside () { handleSeeInside () {
this.setState({ // Remove any project alerts so they don't show up later this.setState({ // Remove any project alerts so they don't show up later
showUsernameBlockAlert: false, showUsernameBlockAlert: false,
showCloudDataAlert: false showCloudDataAlert: false,
showCloudDataAndVideoAlert: false
}); });
this.props.setPlayer(false); this.props.setPlayer(false);
if (this.state.justRemixed || this.state.justShared) { if (this.state.justRemixed || this.state.justShared) {
@ -794,6 +797,7 @@ class Preview extends React.Component {
reportOpen={this.state.reportOpen} reportOpen={this.state.reportOpen}
showAdminPanel={this.props.isAdmin} showAdminPanel={this.props.isAdmin}
showCloudDataAlert={this.state.showCloudDataAlert} showCloudDataAlert={this.state.showCloudDataAlert}
showCloudDataAndVideoAlert={this.state.showCloudDataAndVideoAlert}
showModInfo={this.props.isAdmin} showModInfo={this.props.isAdmin}
showEmailConfirmationModal={this.state.showEmailConfirmationModal} showEmailConfirmationModal={this.state.showEmailConfirmationModal}
showEmailConfirmationBanner={this.props.showEmailConfirmationBanner} showEmailConfirmationBanner={this.props.showEmailConfirmationBanner}

View file

@ -0,0 +1,322 @@
/* eslint-disable no-use-before-define */
const projectInfo = require('../../../src/lib/project-info');
describe('unit test lib/project-info.js', () => {
test('videoSensing returns true for a version 3 project with video', () => {
const result = projectInfo[videoVersion3.projectVersion].videoSensing(videoVersion3);
expect(result).toEqual(true);
});
test('videoSensing returns false for a version 3 project with no video', () => {
const result = projectInfo[noVideoVersion3.projectVersion].videoSensing(noVideoVersion3);
expect(result).toEqual(false);
});
test('videoSensing returns true for a version 2 project with video', () => {
const result = projectInfo[videoVersion2.projectVersion].videoSensing(videoVersion2);
expect(result).toEqual(true);
});
});
const videoVersion3 = {
targets: [
{
isStage: true,
name: 'Stage',
variables: {
'`jEk@4|i[#Fk?(8x)AV.-my variable': [
'my variable',
'0'
]
},
lists: {},
broadcasts: {},
blocks: {
'FJz[,QI8`P^5;FEjdBhc': {
opcode: 'event_whenflagclicked',
next: 'f8q%j#X8sU#C+E1z|-oF',
parent: null,
inputs: {},
fields: {},
shadow: false,
topLevel: true,
x: 255,
y: 171
},
'f8q%j#X8sU#C+E1z|-oF': {
opcode: 'videoSensing_videoToggle',
next: null,
parent: 'FJz[,QI8`P^5;FEjdBhc',
inputs: {
VIDEO_STATE: [
1,
'a2$KXEUlr`=IW!MX8(M7'
]
},
fields: {},
shadow: false,
topLevel: false
},
'a2$KXEUlr`=IW!MX8(M7': {
opcode: 'videoSensing_menu_VIDEO_STATE',
next: null,
parent: 'f8q%j#X8sU#C+E1z|-oF',
inputs: {},
fields: {
VIDEO_STATE: [
'on',
null
]
},
shadow: true,
topLevel: false
}
},
comments: {},
currentCostume: 0,
costumes: [
{
name: 'backdrop1',
dataFormat: 'svg',
assetId: 'cd21514d0531fdffb22204e0ec5ed84a',
md5ext: 'cd21514d0531fdffb22204e0ec5ed84a.svg',
rotationCenterX: 240,
rotationCenterY: 180
}
],
sounds: [
{
name: 'pop',
assetId: '83a9787d4cb6f3b7632b4ddfebf74367',
dataFormat: 'wav',
format: '',
rate: 48000,
sampleCount: 1123,
md5ext: '83a9787d4cb6f3b7632b4ddfebf74367.wav'
}
],
volume: 100,
layerOrder: 0,
tempo: 60,
videoTransparency: 50,
videoState: 'on',
textToSpeechLanguage: null
}
],
monitors: [
{
id: '`jEk@4|i[#Fk?(8x)AV.-my variable',
mode: 'default',
opcode: 'data_variable',
params: {
VARIABLE: 'my variable'
},
spriteName: null,
value: '0',
width: 0,
height: 0,
x: 7,
y: 17,
visible: false,
sliderMin: 0,
sliderMax: 100,
isDiscrete: true
}
],
extensions: [
'videoSensing'
],
meta: {
semver: '3.0.0',
vm: '1.2.48',
// eslint-disable-next-line max-len
agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'
},
projectVersion: 3
};
const noVideoVersion3 = {
targets: [
{
isStage: true,
name: 'Stage',
variables: {
'`jEk@4|i[#Fk?(8x)AV.-my variable': [
'my variable',
'0'
]
},
lists: {},
broadcasts: {},
blocks: {
'FJz[,QI8`P^5;FEjdBhc': {
opcode: 'event_whenflagclicked',
next: '`CA90wtKfX0xa.mK80[|',
parent: null,
inputs: {},
fields: {},
shadow: false,
topLevel: true,
x: 255,
y: 171
},
'`CA90wtKfX0xa.mK80[|': {
opcode: 'data_setvariableto',
next: null,
parent: 'FJz[,QI8`P^5;FEjdBhc',
inputs: {
VALUE: [
1,
[
10,
'0'
]
]
},
fields: {
VARIABLE: [
'my variable',
'`jEk@4|i[#Fk?(8x)AV.-my variable'
]
},
shadow: false,
topLevel: false
}
},
comments: {},
currentCostume: 0,
costumes: [
{
name: 'backdrop1',
dataFormat: 'svg',
assetId: 'cd21514d0531fdffb22204e0ec5ed84a',
md5ext: 'cd21514d0531fdffb22204e0ec5ed84a.svg',
rotationCenterX: 240,
rotationCenterY: 180
}
],
sounds: [
{
name: 'pop',
assetId: '83a9787d4cb6f3b7632b4ddfebf74367',
dataFormat: 'wav',
format: '',
rate: 48000,
sampleCount: 1123,
md5ext: '83a9787d4cb6f3b7632b4ddfebf74367.wav'
}
],
volume: 100,
layerOrder: 0,
tempo: 60,
videoTransparency: 50,
videoState: 'on',
textToSpeechLanguage: null
}
],
monitors: [
{
id: '`jEk@4|i[#Fk?(8x)AV.-my variable',
mode: 'default',
opcode: 'data_variable',
params: {
VARIABLE: 'my variable'
},
spriteName: null,
value: '0',
width: 0,
height: 0,
x: 7,
y: 17,
visible: false,
sliderMin: 0,
sliderMax: 100,
isDiscrete: true
}
],
extensions: [],
meta: {
semver: '3.0.0',
vm: '1.2.48',
// eslint-disable-next-line max-len
agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36'
},
projectVersion: 3
};
const videoVersion2 = {
objName: 'Stage',
sounds: [{
soundName: 'pop',
soundID: 1,
md5: '83a9787d4cb6f3b7632b4ddfebf74367.wav',
sampleCount: 258,
rate: 11025,
format: ''
}],
costumes: [{
costumeName: 'backdrop1',
baseLayerID: 3,
baseLayerMD5: '739b5e2a2435f6e1ec2993791b423146.png',
bitmapResolution: 1,
rotationCenterX: 240,
rotationCenterY: 180
}],
currentCostumeIndex: 0,
penLayerMD5: '5c81a336fab8be57adc039a8a2b33ca9.png',
penLayerID: 0,
tempoBPM: 60,
videoAlpha: 0.5,
children: [{
objName: 'Sprite1',
scripts: [[62,
85,
[['whenGreenFlag'], ['doForever', [['say:', ['senseVideoMotion', 'motion', 'this sprite']]]]]],
[70, 216, [['setVideoState', 'on']]],
[66, 281, [['setVideoTransparency', 50]]]],
sounds: [{
soundName: 'meow',
soundID: 0,
md5: '83c36d806dc92327b9e7049a565c6bff.wav',
sampleCount: 18688,
rate: 22050,
format: ''
}],
costumes: [{
costumeName: 'costume1',
baseLayerID: 1,
baseLayerMD5: 'f9a1c175dbe2e5dee472858dd30d16bb.svg',
bitmapResolution: 1,
rotationCenterX: 47,
rotationCenterY: 55
},
{
costumeName: 'costume2',
baseLayerID: 2,
baseLayerMD5: '6e8bd9ae68fdb02b7e1e3df656a75635.svg',
bitmapResolution: 1,
rotationCenterX: 47,
rotationCenterY: 55
}],
currentCostumeIndex: 0,
scratchX: 0,
scratchY: 0,
scale: 1,
direction: 90,
rotationStyle: 'normal',
isDraggable: false,
indexInLibrary: 1,
visible: true,
spriteInfo: {
}
}],
info: {
userAgent: 'Scratch 2.0 Offline Editor',
flashVersion: 'WIN 33,1,1,743',
spriteCount: 1,
videoOn: false,
scriptCount: 1,
swfVersion: 'v461'
},
projectVersion: 2
};