diff --git a/.env b/.env index 62cf2ad666..b162247399 100644 --- a/.env +++ b/.env @@ -46,3 +46,4 @@ TERMS_OF_SERVICE_URL='' TWITTER_HASHTAG='' TWITTER_URL='' USER_INFO_COOKIE_NAME='' +OPTIMIZELY_FULL_STACK_SDK_KEY='' diff --git a/.env.development b/.env.development index 542850725b..34e014efb0 100644 --- a/.env.development +++ b/.env.development @@ -48,3 +48,4 @@ USER_INFO_COOKIE_NAME='edx-user-info' SESSION_COOKIE_DOMAIN='localhost' CHAT_RESPONSE_URL='http://localhost:18000/api/learning_assistant/v1/course_id' PRIVACY_POLICY_URL='http://localhost:18000/privacy' +OPTIMIZELY_FULL_STACK_SDK_KEY='' diff --git a/package-lock.json b/package-lock.json index 2758b07ea5..1c59cd8454 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@edx/brand": "npm:@edx/brand-openedx@1.2.0", "@edx/frontend-component-footer": "12.1.2", "@edx/frontend-component-header": "4.4.4", - "@edx/frontend-lib-learning-assistant": "^1.13.0", + "@edx/frontend-lib-learning-assistant": "^1.14.0", "@edx/frontend-lib-special-exams": "2.20.1", "@edx/frontend-platform": "4.6.0", "@edx/paragon": "20.46.0", @@ -3563,9 +3563,9 @@ } }, "node_modules/@edx/frontend-lib-learning-assistant": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/@edx/frontend-lib-learning-assistant/-/frontend-lib-learning-assistant-1.13.0.tgz", - "integrity": "sha512-RnLsHGbQu7UGL1OG6LiGOp3wkosLXl6yVz711lwOtZx4TfMGoe+u5xKZSLkdZQoPnqCtolAdTCuSNsXJPJrnbw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@edx/frontend-lib-learning-assistant/-/frontend-lib-learning-assistant-1.14.0.tgz", + "integrity": "sha512-IJMNtcrfVx/vqIbcBcuvXox+cK1g47uef2SF99bqEI9ewQzIw/XjPPundYzk6M8pYU+VTNqp78PBiQuPt2sSmQ==", "dependencies": { "@edx/brand": "npm:@edx/brand-openedx@1.2.0", "@fortawesome/fontawesome-svg-core": "1.2.36", @@ -3573,9 +3573,11 @@ "@fortawesome/free-regular-svg-icons": "5.15.4", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "0.2.0", + "@optimizely/react-sdk": "^2.9.2", "core-js": "3.31.1", "prop-types": "15.8.1", - "react-markdown": "^8.0.5" + "react-markdown": "^8.0.5", + "uuid": "9.0.0" }, "peerDependencies": { "@edx/frontend-platform": "^4.3.0 || ^5.0.0", @@ -3587,8 +3589,7 @@ "react-router": "5.2.1 || ^6.0.0", "react-router-dom": "5.3.0 || ^6.0.0", "redux": "4.1.2", - "regenerator-runtime": "0.13.11", - "uuid": "9.0.0" + "regenerator-runtime": "0.13.11" } }, "node_modules/@edx/frontend-lib-learning-assistant/node_modules/@fortawesome/fontawesome-common-types": { @@ -5561,6 +5562,135 @@ "node": ">= 8" } }, + "node_modules/@optimizely/js-sdk-logging": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@optimizely/js-sdk-logging/-/js-sdk-logging-0.3.1.tgz", + "integrity": "sha512-K71Jf283FP0E4oXehcXTTM3gvgHZHr7FUrIsw//0mdJlotHJT4Nss4hE0CWPbBxO7LJAtwNnO+VIA/YOcO4vHg==", + "dependencies": { + "@optimizely/js-sdk-utils": "^0.4.0" + } + }, + "node_modules/@optimizely/js-sdk-utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@optimizely/js-sdk-utils/-/js-sdk-utils-0.4.0.tgz", + "integrity": "sha512-QG2oytnITW+VKTJK+l0RxjaS5VrA6W+AZMzpeg4LCB4Rn4BEKtF+EcW/5S1fBDLAviGq/0TLpkjM3DlFkJ9/Gw==", + "dependencies": { + "uuid": "^3.3.2" + } + }, + "node_modules/@optimizely/js-sdk-utils/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/@optimizely/optimizely-sdk": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@optimizely/optimizely-sdk/-/optimizely-sdk-4.9.4.tgz", + "integrity": "sha512-aYxndR6RahnLdX7SQR1YO2dklfNjbCGUUvRaYJZ50LIsDqhkAu426vxHwYO+V+QJxqipypPG5SVdG1m32AgDvw==", + "dependencies": { + "@optimizely/js-sdk-datafile-manager": "^0.9.5", + "@optimizely/js-sdk-event-processor": "^0.9.2", + "@optimizely/js-sdk-logging": "^0.3.1", + "json-schema": "^0.4.0", + "murmurhash": "0.0.2", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@optimizely/optimizely-sdk/node_modules/@optimizely/js-sdk-datafile-manager": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@optimizely/js-sdk-datafile-manager/-/js-sdk-datafile-manager-0.9.5.tgz", + "integrity": "sha512-O4ujr1nBBAQBtx8YoKNpzzaEZgsE+aU4dxubT17ePqv/YVUWE+JOY21tSRrqZy/BlbbyzL+ElT8hrGB5ZzVoIQ==", + "dependencies": { + "@optimizely/js-sdk-logging": "^0.3.1", + "@optimizely/js-sdk-utils": "^0.4.0", + "decompress-response": "^4.2.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "^1.2.0" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + } + } + }, + "node_modules/@optimizely/optimizely-sdk/node_modules/@optimizely/js-sdk-event-processor": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/@optimizely/js-sdk-event-processor/-/js-sdk-event-processor-0.9.5.tgz", + "integrity": "sha512-g5zqAjJuexxgbNvn7dacFkQXQxH3+OtjELfmSswvhxP9EHkyNR0ZdQF/kBxFxr335F2/RRPvAJ9tQBPkwaBg8g==", + "dependencies": { + "@optimizely/js-sdk-logging": "^0.3.1", + "@optimizely/js-sdk-utils": "^0.4.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": "^1.2.0", + "@react-native-community/netinfo": "5.9.4" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + }, + "@react-native-community/netinfo": { + "optional": true + } + } + }, + "node_modules/@optimizely/optimizely-sdk/node_modules/decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "dependencies": { + "mimic-response": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@optimizely/optimizely-sdk/node_modules/mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@optimizely/optimizely-sdk/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/@optimizely/react-sdk": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@optimizely/react-sdk/-/react-sdk-2.9.2.tgz", + "integrity": "sha512-//OozC59dr5Lsss2H9Jnyb35FMTF8Z+CMFi89kVs1U1Fy1sKOXK7Web1hw18DBZctwKfbb8Sl+Yw7Pgmo3P2fA==", + "dependencies": { + "@optimizely/js-sdk-logging": "^0.3.1", + "@optimizely/optimizely-sdk": "^4.9.1", + "hoist-non-react-statics": "^3.3.0", + "prop-types": "^15.6.2", + "utility-types": "^2.1.0 || ^3.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, "node_modules/@pact-foundation/pact": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/@pact-foundation/pact/-/pact-11.0.2.tgz", @@ -16655,6 +16785,11 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -17883,6 +18018,14 @@ "multicast-dns": "cli.js" } }, + "node_modules/murmurhash": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/murmurhash/-/murmurhash-0.0.2.tgz", + "integrity": "sha512-LKlwdZKWzvCQpMszb2HO5leJ7P9T4m5XuDKku8bM0uElrzqK9cn0+iozwQS8jO4SNjrp4w7olalgd8WgsIjhWA==", + "engines": { + "node": "*" + } + }, "node_modules/mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -24227,6 +24370,14 @@ "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==" }, + "node_modules/utility-types": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", + "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", + "engines": { + "node": ">= 4" + } + }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", diff --git a/package.json b/package.json index c0eeb3021a..2b58b25e10 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@edx/brand": "npm:@edx/brand-openedx@1.2.0", "@edx/frontend-component-footer": "12.1.2", "@edx/frontend-component-header": "4.4.4", - "@edx/frontend-lib-learning-assistant": "^1.13.0", + "@edx/frontend-lib-learning-assistant": "^1.14.0", "@edx/frontend-lib-special-exams": "2.20.1", "@edx/frontend-platform": "4.6.0", "@edx/paragon": "20.46.0",