diff --git a/package-lock.json b/package-lock.json index 07212da0e..67b137fb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,8 +101,8 @@ "regenerator-runtime": "0.13.9", "sass": "1.49.7", "sass-loader": "10.2.1", - "scratch-gui": "1.8.107", - "scratch-l10n": "3.15.20230605032207", + "scratch-gui": "1.9.10", + "scratch-l10n": "3.15.20230620032154", "selenium-webdriver": "4.1.0", "slick-carousel": "1.6.0", "style-loader": "0.12.3", @@ -2001,6 +2001,15 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.2.tgz", "integrity": "sha512-gojym4tX0FWeV2gsW4Xmzo5wxGjXGm550oVUII7f7G5o4BV6c7DBdiG1RRQd+y1bvqRyYtPfMK85UM95vsapqQ==" }, + "node_modules/@types/node-hid": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/node-hid/-/node-hid-1.3.1.tgz", + "integrity": "sha512-VPxuGDCoDxOUKrTZPSok7IEmiK4cVLfj8Csu09FtG5uF+eqf1HETERHXQkO02Rk6j6YiiHxp0/DA9R4llvhEzQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -2030,6 +2039,21 @@ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", "dev": true }, + "node_modules/@types/usb": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/usb/-/usb-1.5.4.tgz", + "integrity": "sha512-NOUza/8yuswu6RoECQyPHEjA34qpDaeONQ72fm+bCnnN2DJjDePAY+NsmV17H88oIlq4JlJ2mD5Kh5d6R2MwTQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/w3c-web-usb": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.6.tgz", + "integrity": "sha512-cSjhgrr8g4KbPnnijAr/KJDNKa/bBa+ixYkywFRvrhvi9n1WEl7yYbtRyzE6jqNQiSxxJxoAW3STaOQwJHndaw==", + "dev": true + }, "node_modules/@types/yauzl": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz", @@ -4007,6 +4031,12 @@ "babylon": "bin/babylon.js" } }, + "node_modules/balance-text": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/balance-text/-/balance-text-3.3.1.tgz", + "integrity": "sha512-tpnHvo1w0rJ5rbu+jZKf7NLKKg6XZ6eAwREP/9jEDJ+ZTBi6jQFqn/UGARL3/oqD8SgQbyTwBXBjhKDdTgoPRw==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -7265,6 +7295,20 @@ "integrity": "sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==", "dev": true }, + "node_modules/dapjs": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/dapjs/-/dapjs-2.3.0.tgz", + "integrity": "sha512-quanzq7+2xnqgGqqYgARz9o3iBcZ3Ir5r5mTA7WPsjrp9ilEqqCToSFGTL+8HuGP35dUIL7O+yMBloYHhHgZDA==", + "dev": true, + "dependencies": { + "@types/node-hid": "^1.2.0", + "@types/usb": "^1.5.1", + "@types/w3c-web-usb": "^1.0.4" + }, + "engines": { + "node": ">=8.14.0" + } + }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -23493,13 +23537,15 @@ } }, "node_modules/scratch-gui": { - "version": "1.8.107", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.8.107.tgz", - "integrity": "sha512-0cL52bALjfj2Wl4kSvw4zQRnrL3rilIAgzX9Py1z+29RG7KPm3w5eDwMJFofUKs8/Z+YoCVBzzJyIwT2WACoyQ==", + "version": "1.9.10", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.9.10.tgz", + "integrity": "sha512-6ukavYVw6Ok1OaVgvWNpWcn+Y0Vq71j9YNPOHH0Avv35vsLiv/a84uBGsioyvSMPUfhGnS1RDdhcFNA1v6qPBw==", "dev": true, "dependencies": { + "@microbit/microbit-universal-hex": "0.2.2", "arraybuffer-loader": "^1.0.6", "autoprefixer": "^9.0.1", + "balance-text": "3.3.1", "base64-loader": "1.0.0", "bowser": "1.9.4", "cat-blocks": "npm:scratch-blocks@0.1.0-prerelease.20220318143026", @@ -23508,6 +23554,7 @@ "copy-webpack-plugin": "6.4.1", "core-js": "2.5.7", "css-loader": "^1.0.0", + "dapjs": "2.3.0", "es6-object-assign": "1.1.0", "file-loader": "2.0.0", "get-float-time-domain-data": "0.1.0", @@ -23548,8 +23595,8 @@ "redux-throttle": "0.1.1", "scratch-audio": "0.1.0-prerelease.20221123180128", "scratch-blocks": "0.1.0-prerelease.20230527085947", - "scratch-l10n": "3.15.20230605032207", - "scratch-paint": "1.1.68", + "scratch-l10n": "3.15.20230620032154", + "scratch-paint": "1.1.72", "scratch-render": "0.1.0-prerelease.20230318150639", "scratch-render-fonts": "1.0.0-prerelease.20221102164332", "scratch-storage": "2.2.1", @@ -23567,6 +23614,20 @@ "react-dom": "^16.0.0" } }, + "node_modules/scratch-gui/node_modules/@microbit/microbit-universal-hex": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@microbit/microbit-universal-hex/-/microbit-universal-hex-0.2.2.tgz", + "integrity": "sha512-qyFt8ATgxAyPkNz9Yado4HXEeCctwP/8L1/v2hFLeVUqw/HFqVqV4piJbqRMmyOefMcQ9OyVPhLXjtbKn9063Q==", + "dev": true, + "engines": { + "node": ">=8.5", + "npm": ">=6.0", + "yarn": "^1.0" + }, + "peerDependencies": { + "tslib": ">=1.11.1" + } + }, "node_modules/scratch-gui/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -23881,9 +23942,9 @@ } }, "node_modules/scratch-gui/node_modules/scratch-paint": { - "version": "1.1.68", - "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.68.tgz", - "integrity": "sha512-YEoVRuoM+942JbcP5+llN+/0RG8kTvcRvfEk1bOMP/q7ZcHN2vQeuBz9sb28BPL3rf5LcMbndJ8rCte31JM8SQ==", + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.72.tgz", + "integrity": "sha512-NvycAxd3Wwvc7VNJzgFYPIn/Fny+WVXsNttfR64ix8/llhLUJ0tAA472ThiNFlu899wjVeJg39uJ2ix0WubCfw==", "dev": true, "dependencies": { "@scratch/paper": "0.11.20200728195508", @@ -23949,6 +24010,13 @@ "node": ">=4" } }, + "node_modules/scratch-gui/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true, + "peer": true + }, "node_modules/scratch-gui/node_modules/xhr": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", @@ -23962,9 +24030,9 @@ } }, "node_modules/scratch-l10n": { - "version": "3.15.20230605032207", - "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230605032207.tgz", - "integrity": "sha512-/rfJpI0csg2a3F6Brnd7QIZxGAlLB165nsm0TwYBNwHFCg0BjjcehzPkumXKOeyc7U2e7GldGcMDb+8C8cPICQ==", + "version": "3.15.20230620032154", + "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230620032154.tgz", + "integrity": "sha512-fltlTjo19BO9EL7wCvZci3aFZzU5pt3GKESZ+HHJp7FuaW+gDGowYYVdKDi+rpi4x2hD6BsxXBEC7t3e4qYF8g==", "dev": true, "dependencies": { "@babel/cli": "^7.1.2", @@ -33835,6 +33903,15 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.2.tgz", "integrity": "sha512-gojym4tX0FWeV2gsW4Xmzo5wxGjXGm550oVUII7f7G5o4BV6c7DBdiG1RRQd+y1bvqRyYtPfMK85UM95vsapqQ==" }, + "@types/node-hid": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@types/node-hid/-/node-hid-1.3.1.tgz", + "integrity": "sha512-VPxuGDCoDxOUKrTZPSok7IEmiK4cVLfj8Csu09FtG5uF+eqf1HETERHXQkO02Rk6j6YiiHxp0/DA9R4llvhEzQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -33864,6 +33941,21 @@ "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", "dev": true }, + "@types/usb": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/usb/-/usb-1.5.4.tgz", + "integrity": "sha512-NOUza/8yuswu6RoECQyPHEjA34qpDaeONQ72fm+bCnnN2DJjDePAY+NsmV17H88oIlq4JlJ2mD5Kh5d6R2MwTQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/w3c-web-usb": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.6.tgz", + "integrity": "sha512-cSjhgrr8g4KbPnnijAr/KJDNKa/bBa+ixYkywFRvrhvi9n1WEl7yYbtRyzE6jqNQiSxxJxoAW3STaOQwJHndaw==", + "dev": true + }, "@types/yauzl": { "version": "2.9.2", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz", @@ -35672,6 +35764,12 @@ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", "dev": true }, + "balance-text": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/balance-text/-/balance-text-3.3.1.tgz", + "integrity": "sha512-tpnHvo1w0rJ5rbu+jZKf7NLKKg6XZ6eAwREP/9jEDJ+ZTBi6jQFqn/UGARL3/oqD8SgQbyTwBXBjhKDdTgoPRw==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -38397,6 +38495,17 @@ "integrity": "sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==", "dev": true }, + "dapjs": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/dapjs/-/dapjs-2.3.0.tgz", + "integrity": "sha512-quanzq7+2xnqgGqqYgARz9o3iBcZ3Ir5r5mTA7WPsjrp9ilEqqCToSFGTL+8HuGP35dUIL7O+yMBloYHhHgZDA==", + "dev": true, + "requires": { + "@types/node-hid": "^1.2.0", + "@types/usb": "^1.5.1", + "@types/w3c-web-usb": "^1.0.4" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -51973,13 +52082,15 @@ } }, "scratch-gui": { - "version": "1.8.107", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.8.107.tgz", - "integrity": "sha512-0cL52bALjfj2Wl4kSvw4zQRnrL3rilIAgzX9Py1z+29RG7KPm3w5eDwMJFofUKs8/Z+YoCVBzzJyIwT2WACoyQ==", + "version": "1.9.10", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.9.10.tgz", + "integrity": "sha512-6ukavYVw6Ok1OaVgvWNpWcn+Y0Vq71j9YNPOHH0Avv35vsLiv/a84uBGsioyvSMPUfhGnS1RDdhcFNA1v6qPBw==", "dev": true, "requires": { + "@microbit/microbit-universal-hex": "0.2.2", "arraybuffer-loader": "^1.0.6", "autoprefixer": "^9.0.1", + "balance-text": "3.3.1", "base64-loader": "1.0.0", "bowser": "1.9.4", "cat-blocks": "npm:scratch-blocks@0.1.0-prerelease.20220318143026", @@ -51988,6 +52099,7 @@ "copy-webpack-plugin": "6.4.1", "core-js": "2.5.7", "css-loader": "^1.0.0", + "dapjs": "2.3.0", "es6-object-assign": "1.1.0", "file-loader": "2.0.0", "get-float-time-domain-data": "0.1.0", @@ -52028,8 +52140,8 @@ "redux-throttle": "0.1.1", "scratch-audio": "0.1.0-prerelease.20221123180128", "scratch-blocks": "0.1.0-prerelease.20230527085947", - "scratch-l10n": "3.15.20230605032207", - "scratch-paint": "1.1.68", + "scratch-l10n": "3.15.20230620032154", + "scratch-paint": "1.1.72", "scratch-render": "0.1.0-prerelease.20230318150639", "scratch-render-fonts": "1.0.0-prerelease.20221102164332", "scratch-storage": "2.2.1", @@ -52043,6 +52155,13 @@ "xhr": "2.5.0" }, "dependencies": { + "@microbit/microbit-universal-hex": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@microbit/microbit-universal-hex/-/microbit-universal-hex-0.2.2.tgz", + "integrity": "sha512-qyFt8ATgxAyPkNz9Yado4HXEeCctwP/8L1/v2hFLeVUqw/HFqVqV4piJbqRMmyOefMcQ9OyVPhLXjtbKn9063Q==", + "dev": true, + "requires": {} + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -52299,9 +52418,9 @@ } }, "scratch-paint": { - "version": "1.1.68", - "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.68.tgz", - "integrity": "sha512-YEoVRuoM+942JbcP5+llN+/0RG8kTvcRvfEk1bOMP/q7ZcHN2vQeuBz9sb28BPL3rf5LcMbndJ8rCte31JM8SQ==", + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.72.tgz", + "integrity": "sha512-NvycAxd3Wwvc7VNJzgFYPIn/Fny+WVXsNttfR64ix8/llhLUJ0tAA472ThiNFlu899wjVeJg39uJ2ix0WubCfw==", "dev": true, "requires": { "@scratch/paper": "0.11.20200728195508", @@ -52347,6 +52466,13 @@ "has-flag": "^3.0.0" } }, + "tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true, + "peer": true + }, "xhr": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", @@ -52362,9 +52488,9 @@ } }, "scratch-l10n": { - "version": "3.15.20230605032207", - "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230605032207.tgz", - "integrity": "sha512-/rfJpI0csg2a3F6Brnd7QIZxGAlLB165nsm0TwYBNwHFCg0BjjcehzPkumXKOeyc7U2e7GldGcMDb+8C8cPICQ==", + "version": "3.15.20230620032154", + "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230620032154.tgz", + "integrity": "sha512-fltlTjo19BO9EL7wCvZci3aFZzU5pt3GKESZ+HHJp7FuaW+gDGowYYVdKDi+rpi4x2hD6BsxXBEC7t3e4qYF8g==", "dev": true, "requires": { "@babel/cli": "^7.1.2", diff --git a/package.json b/package.json index f38775030..72bde6f65 100644 --- a/package.json +++ b/package.json @@ -136,8 +136,8 @@ "regenerator-runtime": "0.13.9", "sass": "1.49.7", "sass-loader": "10.2.1", - "scratch-gui": "1.8.107", - "scratch-l10n": "3.15.20230605032207", + "scratch-gui": "1.9.10", + "scratch-l10n": "3.15.20230620032154", "selenium-webdriver": "4.1.0", "slick-carousel": "1.6.0", "style-loader": "0.12.3", diff --git a/src/template-config.js b/src/template-config.js index 13cf2ed0e..c74763530 100644 --- a/src/template-config.js +++ b/src/template-config.js @@ -28,6 +28,23 @@ module.exports = { og_image_height: 860, // Analytics & Monitoring + // ---------------------- + + // GA4 Measurement ID + // Looks like 'G-XXXXXXXX' + ga4_id: process.env.GA4_ID || '', + + // Universal Analytics Property ID + // Looks like 'UA-99999999-9' ga_tracker: process.env.GA_TRACKER || '', - gtm_id: process.env.GTM_ID || '' + + // Google Tag Manager ID + // Looks like 'GTM-XXXXXXX' + gtm_id: process.env.GTM_ID || '', + + // Google Tag Manager env & auth info for alterative GTM environments + // Looks like '>m_auth=0123456789abcdefghijklm>m_preview=env-00>m_cookies_win=x' + // Taken from the middle of: GTM -> Admin -> Environments -> (environment) -> Get Snippet + // Blank for production + gtm_env_auth: process.env.GTM_ENV_AUTH || '' }; diff --git a/src/template.ejs b/src/template.ejs index cfafbc05f..5c4e2d411 100644 --- a/src/template.ejs +++ b/src/template.ejs @@ -8,8 +8,9 @@ + 'https://www.googletagmanager.com/gtm.js?id='+i+dl+'<%= htmlWebpackPlugin.options.gtm_env_auth %>'; + f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','<%- htmlWebpackPlugin.options.gtm_id %>'); + <% } %> @@ -67,7 +68,7 @@ <% if (htmlWebpackPlugin.options.gtm_id) { %> - + <% } %>