From d47db9822055b6987a266ef0e9dbb8b67189f3fc Mon Sep 17 00:00:00 2001 From: shumone Date: Thu, 3 Oct 2024 02:33:57 -0700 Subject: [PATCH 1/6] Update regex filter + unit tests (#852) Co-authored-by: Abinet Debele --- .../web/src/SplunkErrorInstrumentation.ts | 2 +- packages/web/test/index.ts | 1 + packages/web/test/stacktrace.test.ts | 223 ++++++++++++++++++ packages/web/test/utils.ts | 19 ++ 4 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 packages/web/test/stacktrace.test.ts diff --git a/packages/web/src/SplunkErrorInstrumentation.ts b/packages/web/src/SplunkErrorInstrumentation.ts index fc51a84a..d71d0616 100644 --- a/packages/web/src/SplunkErrorInstrumentation.ts +++ b/packages/web/src/SplunkErrorInstrumentation.ts @@ -40,7 +40,7 @@ function stringifyValue(value: unknown) { function parseErrorStack(stack: string): string { //get list of files in stack , find corresponding sourcemap id and add it to the source map id object const sourceMapIds = {}; - const urlPattern = /(https?:\/\/[^\s]+\/[^\s:]+|\/[^\s:]+)/g; + const urlPattern = /([\w]+:\/\/[^\s/]+\/[^\s?:#]+)/g; const urls = stack.match(urlPattern); if (urls) { urls.forEach(url => { diff --git a/packages/web/test/index.ts b/packages/web/test/index.ts index 9da7723e..d90bafe4 100644 --- a/packages/web/test/index.ts +++ b/packages/web/test/index.ts @@ -31,3 +31,4 @@ import './SplunkSpanAttributesProcessor.test'; import './SplunkOtelWeb.test'; import './synthetics.test'; import './socketio.test'; +import './stacktrace.test'; diff --git a/packages/web/test/stacktrace.test.ts b/packages/web/test/stacktrace.test.ts new file mode 100644 index 00000000..7dc6f9f1 --- /dev/null +++ b/packages/web/test/stacktrace.test.ts @@ -0,0 +1,223 @@ +/* +Copyright 2024 Splunk Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import * as assert from 'assert'; +import { beforeEach } from 'mocha'; +import { generateFilePaths, generateRandomStackTrace } from './utils'; + +const chromeStackTraceEval = `Error: Something went wrong + at eval (eval at (http://example.com/scripts/main.js:10:20), :1:1) + at Object.functionName (http://example.com/scripts/utils.js:15:25) + at http://example.com/scripts/app.js:20:30 + at new ConstructorName (http://example.com/scripts/controller.js:25:35) + at http://example.com/scripts/main.js:30:40`; +const chromeStackTraceEvalExpected = [ + 'http://example.com/scripts/main.js', + 'http://example.com/scripts/utils.js', + 'http://example.com/scripts/app.js', + 'http://example.com/scripts/controller.js', +]; + +const chromeStackTraceAnonymous = `TypeError: undefined is not a function + at http://example.com/js/anonymous.js:10:5 + at :15:10 + at Object.functionName (http://example.com/js/utils.js:20:15) + at new ConstructorName (http://example.com/js/app.js:25:20) + at :30:25`; +const chromeStackTraceAnonymousExpected = [ + 'http://example.com/js/anonymous.js', + 'http://example.com/js/utils.js', + 'http://example.com/js/app.js', +]; + +const geckoStackTraceEval = `Error: Something went wrong + @http://example.com/scripts/main.js:10:20 + @eval (eval at :1:1) + functionName@http://example.com/scripts/utils.js:15:25 + @http://example.com/scripts/app.js:20:30 + ConstructorName@http://example.com/scripts/controller.js:25:35 + @http://example.com/scripts/main.js:30:40`; +const geckoStackTraceEvalExpected = [ + 'http://example.com/scripts/main.js', + 'http://example.com/scripts/utils.js', + 'http://example.com/scripts/app.js', + 'http://example.com/scripts/controller.js', +]; + +const geckoStackTraceAnonymous = `TypeError: undefined is not a function + @http://example.com/js/anonymous.js:10:5 + @:15:10 + functionName@http://example.com/js/utils.js:20:15 + ConstructorName@http://example.com/js/app.js:25:20 + @:30:25`; +const geckoStackTraceAnonymousExpected = [ + 'http://example.com/js/anonymous.js', + 'http://example.com/js/utils.js', + 'http://example.com/js/app.js' +]; + +// Test 1: simple test w/ dupes +const stack1 = `Error + at http://localhost:8080/js/script1.js:10:15 + at http://localhost:8080/js/script2.js:20:25 + at http://localhost:8080/js/script1.js:30:35`; +const expected1 = ['http://localhost:8080/js/script1.js', 'http://localhost:8080/js/script2.js']; + +// Test 2: http and https +const stack2 = `Error + at https://example.com/js/app.js:50:10 + at http://localhost/js/util.js:100:50`; +const expected2 = ['https://example.com/js/app.js', 'http://localhost/js/util.js']; + +// Test 3: No full path URLs +const stack3 = `Error + at someFunction (file.js:10:15) + at anotherFunction (file.js:20:25)`; +const expected3 = []; + +// Test 4: Only one URL, with port +const stack4 = `Error + at http://localhost:3000/js/main.js:10:15`; +const expected4 = ['http://localhost:3000/js/main.js']; + +// Test 5: Duplicate URLs +const stack5 = `Error + at http://localhost:3000/js/main.js:10:15 + at http://localhost:3000/js/main.js:20:25 + at http://localhost:3000/js/utils.js:30:35`; +const expected5 = ['http://localhost:3000/js/main.js', 'http://localhost:3000/js/utils.js']; + +// Test 6: Urls with query strings and fragments +const stack6 = `Error + at http://example.com:8080/path/js/main.js?name=testname:10:15 + at http://example.com:8080/path/js/main2.js#fragmentHere:20:15 + at http://example.com:8080/path/js/main3.js?name=testname#fragmentHere:30:15`; +const expected6 = ['http://example.com:8080/path/js/main.js', 'http://example.com:8080/path/js/main2.js', 'http://example.com:8080/path/js/main3.js']; + +// Test 7: Urls with different protocols and blobs +const stack7 = `Error + at file://testing.com:8000/js/testFile.js:1:2 + at blob:https://example.com:1000/src/hello.js:2:3`; +const expected7 = ['file://testing.com:8000/js/testFile.js', 'https://example.com:1000/src/hello.js']; + +const regexFilter = /([\w]+:\/\/[^\s/]+\/[^\s?:#]+)/g; +describe('regexFilter', () => { + let urls = new Set(); + let match; + + beforeEach(() => { + urls = new Set(); + match = null; + }); + it('should test chrome eval stack traces', () => { + while ((match = regexFilter.exec(chromeStackTraceEval)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, chromeStackTraceEvalExpected); + }); + + it ('should test chrome anonymous stack traces', () => { + while ((match = regexFilter.exec(chromeStackTraceAnonymous)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, chromeStackTraceAnonymousExpected); + }); + + it ('should test gecko eval stack traces', () => { + while ((match = regexFilter.exec(geckoStackTraceEval)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, geckoStackTraceEvalExpected); + }); + + it ('should test gecko anonymous stack traces', () => { + while ((match = regexFilter.exec(geckoStackTraceAnonymous)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, geckoStackTraceAnonymousExpected); + }); + + it ('should test simple stack trace with dupes', () => { + while ((match = regexFilter.exec(stack1)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected1); + }); + + it ('should test http vs https stack traces', () => { + while ((match = regexFilter.exec(stack2)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected2); + }); + + it ('should test no full url path stack traces', () => { + while ((match = regexFilter.exec(stack3)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected3); + }); + + it ('should test url ports in stack traces', () => { + while ((match = regexFilter.exec(stack4)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected4); + }); + + it ('should test duplicate urls in stack traces', () => { + while ((match = regexFilter.exec(stack5)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected5); + }); + + it ('should test query strings/fragments in stack traces', () => { + while ((match = regexFilter.exec(stack6)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected6); + }); + + it ('should test blobs and diff protocols in stack traces', () => { + while ((match = regexFilter.exec(stack7)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr, expected7); + }); + + it ('should test long stack traces', () => { + const randomPaths = generateFilePaths(20, 20); + const randomStack = generateRandomStackTrace(randomPaths, 10000); + + while ((match = regexFilter.exec(randomStack)) !== null) { + urls.add(match[0]); + } + const urlArr = [...urls]; + assert.deepEqual(urlArr.sort(), randomPaths.sort()); + }); +}); \ No newline at end of file diff --git a/packages/web/test/utils.ts b/packages/web/test/utils.ts index 578bf0d8..540a3c19 100644 --- a/packages/web/test/utils.ts +++ b/packages/web/test/utils.ts @@ -99,3 +99,22 @@ export function initWithSyncPipeline(additionalOptions = {}): { export function deinit(force?: boolean): void { SplunkRum.deinit(force); } + +export function generateFilePaths(domainCount: number, pathCount: number): string[] { + const paths: string[] = []; + for (let i = 0; i < domainCount; i++) { + const domain = `http://domain${i}.com`; + for (let j = 0; j < pathCount; j++) { + paths.push(`${domain}/path${j}.js`); + } + } + return paths; +} + +export function generateRandomStackTrace(paths: string[], stackCount: number): string { + let stack = 'Error\n'; + for (let i = 0; i < stackCount; i++) { + stack += `at ${paths[Math.floor(Math.random() * paths.length)]}:${Math.floor(Math.random() * 1000)}:${Math.floor(Math.random() * 1000)}\n`; + } + return stack; +} From aecb2ea204b7872c092eb1d88d2f49a530d38dc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 20:05:52 +0300 Subject: [PATCH 2/6] Bump actions/checkout from 3.6.0 to 4.2.1 (#854) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/check-links.yml | 2 +- .github/workflows/ci-main.yml | 4 ++-- .github/workflows/ci.yml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 2465569c..307b88e1 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -9,7 +9,7 @@ jobs: linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.6.0 + - uses: actions/checkout@v4.2.1 - name: Link Checker uses: lycheeverse/lychee-action@v1.8.0 diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index bdc43daf..18328461 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -11,7 +11,7 @@ jobs: permissions: read-all steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.2.1 - uses: actions/setup-node@v4.0.3 with: node-version: '18' @@ -36,7 +36,7 @@ jobs: browser: [headlessChrome, headlessFirefox] steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.2.1 - uses: actions/setup-node@v4.0.3 with: node-version: '18' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7253f49..08d8e038 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: permissions: read-all steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.2.1 - uses: actions/setup-node@v4.0.3 with: node-version: '18' @@ -47,7 +47,7 @@ jobs: accessKey: ${{ secrets.SAUCE_ACCESS_KEY }} tunnelName: ${{ secrets.SAUCE_TUNNEL_ID }} - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.2.1 - uses: actions/setup-node@v4.0.3 with: node-version: '18' @@ -69,7 +69,7 @@ jobs: browser: [headlessChrome, headlessFirefox] steps: - name: Checkout - uses: actions/checkout@v3.6.0 + uses: actions/checkout@v4.2.1 - uses: actions/setup-node@v4.0.3 with: node-version: '18' From cd9e13ebddc814f6a37d70986d01fc39d86459d6 Mon Sep 17 00:00:00 2001 From: Max Virgil Date: Tue, 15 Oct 2024 21:35:30 -0700 Subject: [PATCH 3/6] add webpack plugin with code injection, plus unit test command Set skipLibCheck on tsconfig to unblock progress in short-term (unplugin .d.ts file causes issues due to compile-time dependencies on other plugins) --- package-lock.json | 521 +++++++++++++++++++--- packages/build-plugins/.mocharc.json | 5 + packages/build-plugins/.nycrc.json | 7 + packages/build-plugins/README.md | 15 + packages/build-plugins/package.json | 19 +- packages/build-plugins/src/index.ts | 37 +- packages/build-plugins/src/utils.ts | 45 ++ packages/build-plugins/test/utils.test.ts | 43 ++ packages/build-plugins/tsconfig.base.json | 3 +- 9 files changed, 634 insertions(+), 61 deletions(-) create mode 100644 packages/build-plugins/.mocharc.json create mode 100644 packages/build-plugins/.nycrc.json create mode 100644 packages/build-plugins/src/utils.ts create mode 100644 packages/build-plugins/test/utils.test.ts diff --git a/package-lock.json b/package-lock.json index facfb741..e8884db9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3317,7 +3317,6 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -3331,7 +3330,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -3340,7 +3338,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -3349,7 +3346,6 @@ "version": "0.3.6", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" @@ -3358,14 +3354,12 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" @@ -5375,8 +5369,7 @@ "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", @@ -5387,8 +5380,7 @@ "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/keyv": { "version": "3.1.4", @@ -5767,11 +5759,169 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/@webassemblyjs/ast": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", + "peer": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "peer": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "peer": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "peer": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "peer": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.12.1", + "@xtuc/long": "4.2.2" + } + }, "node_modules/@xstate/fsm": { "version": "1.6.5", "resolved": "https://registry.npmjs.org/@xstate/fsm/-/fsm-1.6.5.tgz", "integrity": "sha512-b5o1I6aLNeYlU/3CPlj/Z91ybk1gUsKT+5NAJI+2W4UjvS5KLG28K9v5UvNoFVjHV8PajVZ00RH3vnjyQO7ZAw==" }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "peer": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "peer": true + }, "node_modules/@zip.js/zip.js": { "version": "2.7.45", "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.45.tgz", @@ -5797,9 +5947,9 @@ } }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "bin": { "acorn": "bin/acorn" }, @@ -5865,7 +6015,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5877,6 +6026,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peer": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, "node_modules/amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -6541,7 +6699,6 @@ "version": "4.23.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", - "dev": true, "funding": [ { "type": "opencollective", @@ -6627,8 +6784,7 @@ "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, "node_modules/bufferutil": { "version": "4.0.8", @@ -6784,7 +6940,6 @@ "version": "1.0.30001636", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", - "dev": true, "funding": [ { "type": "opencollective", @@ -6955,6 +7110,15 @@ "node": ">=12.13.0" } }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "peer": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/chromedriver": { "version": "128.0.3", "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.3.tgz", @@ -7193,8 +7357,7 @@ "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "node_modules/commondir": { "version": "1.0.1", @@ -8261,8 +8424,7 @@ "node_modules/electron-to-chromium": { "version": "1.4.807", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.807.tgz", - "integrity": "sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A==", - "dev": true + "integrity": "sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A==" }, "node_modules/emoji-regex": { "version": "8.0.0", @@ -8340,6 +8502,19 @@ "node": ">= 0.6" } }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/enquirer": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", @@ -8502,6 +8677,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "peer": true + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -8595,7 +8776,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, "engines": { "node": ">=6" } @@ -8875,7 +9055,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -8887,7 +9066,6 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, "engines": { "node": ">=4.0" } @@ -8932,6 +9110,15 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "peer": true, + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/express": { "version": "4.19.2", "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", @@ -9027,8 +9214,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-fifo": { "version": "1.3.2", @@ -9067,8 +9253,7 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -9771,6 +9956,12 @@ "node": ">=10.13.0" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "peer": true + }, "node_modules/glob/node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", @@ -9874,8 +10065,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -9896,7 +10086,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -11147,6 +11336,35 @@ "node": "*" } }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "peer": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/jpeg-js": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", @@ -11300,14 +11518,12 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "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==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -11889,6 +12105,15 @@ "node": ">=4" } }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "peer": true, + "engines": { + "node": ">=6.11.5" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -12340,6 +12565,12 @@ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "peer": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -12393,7 +12624,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -12402,7 +12632,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -12695,6 +12924,12 @@ "node": ">= 0.6" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "peer": true + }, "node_modules/netmask": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", @@ -13237,8 +13472,7 @@ "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==" }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -14203,8 +14437,7 @@ "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -14475,7 +14708,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "engines": { "node": ">=6" } @@ -14626,7 +14858,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "dependencies": { "safe-buffer": "^5.1.0" } @@ -15155,7 +15386,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -15225,6 +15455,24 @@ "node": ">=v12.22.7" } }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/selenium-webdriver": { "version": "4.21.0", "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.21.0.tgz", @@ -15331,7 +15579,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -15611,7 +15858,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -15629,7 +15875,6 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -16058,6 +16303,15 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tar-fs": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", @@ -16236,7 +16490,6 @@ "version": "5.31.1", "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", - "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -16250,6 +16503,40 @@ "node": ">=10" } }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.10", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -16809,6 +17096,26 @@ "node": ">= 0.8" } }, + "node_modules/unplugin": { + "version": "1.14.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/unplugin/-/unplugin-1.14.1.tgz", + "integrity": "sha512-lBlHbfSFPToDYp9pjXlUEFVxYLaue9f9T1HC+4OHlmj+HnMDdz9oZY+erXfoCe/5V/7gKUSY2jpXPb9S7f0f/w==", + "dependencies": { + "acorn": "^8.12.1", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "webpack-sources": "^3" + }, + "peerDependenciesMeta": { + "webpack-sources": { + "optional": true + } + } + }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -16822,7 +17129,6 @@ "version": "1.0.16", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", - "dev": true, "funding": [ { "type": "opencollective", @@ -16870,7 +17176,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -16987,6 +17292,19 @@ "node": ">=18" } }, + "node_modules/watchpack": { + "version": "2.4.2", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "peer": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -17019,6 +17337,88 @@ "node": ">=12" } }, + "node_modules/webpack": { + "version": "5.95.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", + "peer": true, + "dependencies": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "peer": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==" + }, + "node_modules/webpack/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webpack/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/websocket": { "version": "1.0.35", "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.35.tgz", @@ -17527,8 +17927,21 @@ }, "packages/build-plugins": { "name": "@splunk/olly-web-build-plugins", - "version": "0.0.1", - "license": "Apache-2.0" + "version": "0.19.1", + "license": "Apache-2.0", + "dependencies": { + "unplugin": "^1.14.1" + }, + "devDependencies": { + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "chai": "^4.3.7", + "mocha": "^10.2.0", + "ts-node": "^10.9.1" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } }, "packages/session-recorder": { "name": "@splunk/otel-web-session-recorder", diff --git a/packages/build-plugins/.mocharc.json b/packages/build-plugins/.mocharc.json new file mode 100644 index 00000000..2bac0ac0 --- /dev/null +++ b/packages/build-plugins/.mocharc.json @@ -0,0 +1,5 @@ +{ + "extension": ["ts"], + "spec": "test/**/*.test.ts", + "require": "ts-node/register" +} diff --git a/packages/build-plugins/.nycrc.json b/packages/build-plugins/.nycrc.json new file mode 100644 index 00000000..a92203ed --- /dev/null +++ b/packages/build-plugins/.nycrc.json @@ -0,0 +1,7 @@ +{ + "check-coverage": true, + "branch": 80, + "lines": 80, + "functions": 80, + "statements": 80 +} diff --git a/packages/build-plugins/README.md b/packages/build-plugins/README.md index 9ef83fba..73178f4a 100644 --- a/packages/build-plugins/README.md +++ b/packages/build-plugins/README.md @@ -1,3 +1,18 @@ # Splunk Web Build Plugins > :construction: This project is currently **UNDER DEVELOPMENT**. + +## Usage + +```js +// webpack.config.js + +const { ollyWebWebpackPlugin } = require('@splunk/olly-web-build-plugins'); + +module.exports = { + /* ... */ + plugins: [ + ollyWebWebpackPlugin({ /* options */ }) + ] +} +``` diff --git a/packages/build-plugins/package.json b/packages/build-plugins/package.json index 142c4796..37d94273 100644 --- a/packages/build-plugins/package.json +++ b/packages/build-plugins/package.json @@ -6,7 +6,8 @@ "repository": "github:signalfx/splunk-otel-js-browser", "scripts": { "compile": "npm-run-all -s compile:*", - "compile:tsc": "tsc --build tsconfig.cjs.json tsconfig.esm.json" + "compile:tsc": "tsc --build tsconfig.cjs.json tsconfig.esm.json", + "test:unit:ci": "env TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=tsconfig.cjs.json nyc mocha" }, "author": "Splunk Observability Instrumentals Team ", "license": "Apache-2.0", @@ -26,8 +27,22 @@ "dist/esm/**/*.js.map", "dist/esm/**/*.d.ts" ], + "devDependencies": { + "@types/chai": "^4.3.5", + "@types/mocha": "^10.0.1", + "chai": "^4.3.7", + "mocha": "^10.2.0", + "nyc": "^15.1.0", + "ts-node": "^10.9.1" + }, "bugs": { "url": "https://github.com/signalfx/splunk-otel-js-browser/issues" }, - "homepage": "https://github.com/signalfx/splunk-otel-js-browser#readme" + "homepage": "https://github.com/signalfx/splunk-otel-js-browser#readme", + "dependencies": { + "unplugin": "^1.14.1" + }, + "peerDependencies": { + "webpack": "^4 || ^5" + } } diff --git a/packages/build-plugins/src/index.ts b/packages/build-plugins/src/index.ts index 54fd0d41..fd593629 100644 --- a/packages/build-plugins/src/index.ts +++ b/packages/build-plugins/src/index.ts @@ -14,8 +14,37 @@ See the License for the specific language governing permissions and limitations under the License. */ -export class OllyWebWebpackPlugin { - public apply(): void { - console.log('apply OllyWebWebpackPlugin'); - } +import { createUnplugin, UnpluginFactory } from 'unplugin'; + +import { BannerPlugin, WebpackPluginInstance } from 'webpack'; +import { computeSourceMapId, getCodeSnippet } from './utils'; + +export interface OllyWebPluginOptions { + // define your plugin options here } + +const unpluginFactory: UnpluginFactory = () => ({ + name: 'OllyWebPlugin', + webpack(compiler) { + compiler.hooks.thisCompilation.tap('OllyWebPlugin', () => { + const bannerPlugin = new BannerPlugin({ + banner: ({ chunk }) => { + if (!chunk.hash) { + return ''; + } + const sourceMapId = computeSourceMapId(chunk.hash); + return getCodeSnippet(sourceMapId); + }, + entryOnly: false, + footer: true, + include: /\.(js|mjs)$/, + raw: true, + }); + bannerPlugin.apply(compiler); + }); + } +}); + +const unplugin = createUnplugin(unpluginFactory); + +export const ollyWebWebpackPlugin: (options: OllyWebPluginOptions) => WebpackPluginInstance = unplugin.webpack; diff --git a/packages/build-plugins/src/utils.ts b/packages/build-plugins/src/utils.ts new file mode 100644 index 00000000..261c827b --- /dev/null +++ b/packages/build-plugins/src/utils.ts @@ -0,0 +1,45 @@ +/* +Copyright 2024 Splunk Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +import { createHash } from 'crypto'; + +/** + * Returns a standardized GUID value to use for a sourceMapId. + * + * @param content the source map file contents, or an already-computed hash of the source map (or its source files) + */ +export function computeSourceMapId(content: string): string { + const sha256 = createHash('sha256') + .update(content, 'utf-8') + .digest('hex'); + const guid = [ + sha256.slice(0, 8), + sha256.slice(8, 12), + sha256.slice(12, 16), + sha256.slice(16, 20), + sha256.slice(20, 32), + ].join('-'); + return guid; +} + +// eslint-disable-next-line quotes +const SNIPPET_TEMPLATE = `;if (typeof window === 'object') { window.sourceMapIds = window.sourceMapIds || {}; let s = ''; try { throw new Error(); } catch (e) { s = (e.stack.match(/https?:\\/\\/[^\\s]+?(?::\\d+)?(?=:[\\d]+:[\\d]+)/) || [])[0]; } if (s) {window.sourceMapIds[s] = '__SOURCE_MAP_ID_PLACEHOLDER__';}};\n`; + +export function getCodeSnippet(sourceMapId: string): string { + return SNIPPET_TEMPLATE.replace('__SOURCE_MAP_ID_PLACEHOLDER__', sourceMapId); +} + diff --git a/packages/build-plugins/test/utils.test.ts b/packages/build-plugins/test/utils.test.ts new file mode 100644 index 00000000..2a312251 --- /dev/null +++ b/packages/build-plugins/test/utils.test.ts @@ -0,0 +1,43 @@ +/* +Copyright 2024 Splunk Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import { expect } from 'chai'; +import { computeSourceMapId, getCodeSnippet } from '../src/utils'; + +describe('getCodeSnippet', function () { + it('does not throw error in a node environment', function () { + const code = getCodeSnippet('testid123'); + // eslint-disable-next-line no-eval + eval(code); + }); + + it('does not throw error when appended to code that does not end with semicolon or new line', function () { + const code = 'let x = 5' + getCodeSnippet('testid123'); + // eslint-disable-next-line no-eval + eval(code); + }); + +}); + +describe('computeSourceMapId', function () { + it('returns a consistent GUID result in base64', function () { + const id = computeSourceMapId('console.log("Hello world")'); + + expect(id).eq('d77ec5d8-4fb5-fbc8-1897-54b54e939bcd'); + expect(id).eq(computeSourceMapId('console.log("Hello world")')); + expect(id).not.eq(computeSourceMapId('console.log("a different snippet gets a different id");')); + }); +}); diff --git a/packages/build-plugins/tsconfig.base.json b/packages/build-plugins/tsconfig.base.json index d2726ed4..f11230ae 100644 --- a/packages/build-plugins/tsconfig.base.json +++ b/packages/build-plugins/tsconfig.base.json @@ -7,6 +7,7 @@ "noEmitOnError": true, "pretty": true, "resolveJsonModule": true, + "skipLibCheck": true, "target": "ES2017", "types": [ "node" @@ -19,4 +20,4 @@ "exclude": [ "node_modules" ] -} \ No newline at end of file +} From bf6b903c0d2e6596e71ba384547fd24feb3a8ff7 Mon Sep 17 00:00:00 2001 From: Max Virgil Date: Tue, 15 Oct 2024 21:41:47 -0700 Subject: [PATCH 4/6] update unit tests --- packages/build-plugins/test/utils.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/build-plugins/test/utils.test.ts b/packages/build-plugins/test/utils.test.ts index 2a312251..81e33ab3 100644 --- a/packages/build-plugins/test/utils.test.ts +++ b/packages/build-plugins/test/utils.test.ts @@ -18,6 +18,11 @@ import { expect } from 'chai'; import { computeSourceMapId, getCodeSnippet } from '../src/utils'; describe('getCodeSnippet', function () { + it('inserts the source map id into the snippet', function () { + const code = getCodeSnippet('testid123'); + expect(code).contains('window.sourceMapIds[s] = \'testid123\''); + }); + it('does not throw error in a node environment', function () { const code = getCodeSnippet('testid123'); // eslint-disable-next-line no-eval @@ -33,7 +38,7 @@ describe('getCodeSnippet', function () { }); describe('computeSourceMapId', function () { - it('returns a consistent GUID result in base64', function () { + it('returns a consistent id in GUID format', function () { const id = computeSourceMapId('console.log("Hello world")'); expect(id).eq('d77ec5d8-4fb5-fbc8-1897-54b54e939bcd'); From e902299794f1ea0fb472e03a2b203e51fc674f4d Mon Sep 17 00:00:00 2001 From: t2t2 Date: Wed, 16 Oct 2024 12:37:36 +0300 Subject: [PATCH 5/6] Repo maintance: Add missing config, update chromedriver (#866) --- .gitignore | 1 - .npmrc | 1 + package-lock.json | 8 ++++---- packages/web/karma.conf.js | 7 +++++++ packages/web/package.json | 4 ++-- 5 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .npmrc diff --git a/.gitignore b/.gitignore index 5c60c4c3..a1006cfb 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,3 @@ tests_output/ # contains secrets .env -.npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..7898332e --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +git-tag-version = false \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c13c56a0..419644ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6951,9 +6951,9 @@ } }, "node_modules/chromedriver": { - "version": "128.0.3", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-128.0.3.tgz", - "integrity": "sha512-Xn/bknOpGlY9tKinwS/hVWeNblSeZvbbJbF8XZ73X1jeWfAFPRXx3fMLdNNz8DqruDbx3cKEJ5wR3mnst6G3iw==", + "version": "129.0.4", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-129.0.4.tgz", + "integrity": "sha512-j5I55cQwodFJUaYa1tWUmj2ss9KcPRBWmUa5Qonq3X8kqv2ASPyTboFYb4YB/YLztkYTUUw2E43txXw0wYzT/A==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -17602,7 +17602,7 @@ "body-parser": "^1.20.2", "chai": "^4.3.7", "chrome-launcher": "^1.0.0", - "chromedriver": "^128.0.3", + "chromedriver": "^129.0.4", "codecov": "^3.8.2", "compression": "^1.7.4", "cors": "^2.8.5", diff --git a/packages/web/karma.conf.js b/packages/web/karma.conf.js index 1318cade..dab2572a 100644 --- a/packages/web/karma.conf.js +++ b/packages/web/karma.conf.js @@ -106,6 +106,13 @@ module.exports = async function (config) { // start these browsers browsers: [], + customLaunchers: { + ChromeHeadlessCI: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'] + } + }, + // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits singleRun: false, diff --git a/packages/web/package.json b/packages/web/package.json index 63d315b8..ee8cb8cf 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -10,7 +10,7 @@ "compile:browser": "rollup -c", "compile:tsc": "tsc --build tsconfig.cjs.json tsconfig.esm.json", "test:unit:watch": "karma start", - "test:unit:ci": "nyc karma start --single-run --no-auto-watch --browsers ChromeHeadless", + "test:unit:ci": "nyc karma start --single-run --no-auto-watch --browsers ChromeHeadlessCI", "test:unit:ci-node": "env TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=tsconfig.cjs.json nyc mocha", "test:integration:local": "npm-run-all -s compile test:integration:local:headlessChrome:_execute", "test:integration:local:firefox": "npm-run-all -s compile test:integration:local:firefox:_execute", @@ -80,7 +80,7 @@ "body-parser": "^1.20.2", "chai": "^4.3.7", "chrome-launcher": "^1.0.0", - "chromedriver": "^128.0.3", + "chromedriver": "^129.0.4", "codecov": "^3.8.2", "compression": "^1.7.4", "cors": "^2.8.5", From fc839eeef093ce31441e30ba49a4c238b0f0c537 Mon Sep 17 00:00:00 2001 From: Max Virgil Date: Wed, 16 Oct 2024 08:14:19 -0700 Subject: [PATCH 6/6] Regenerate package-lock.json to fix registry --- package-lock.json | 85 ++++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8884db9..30e2196f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5761,7 +5761,7 @@ }, "node_modules/@webassemblyjs/ast": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "peer": true, "dependencies": { @@ -5771,25 +5771,25 @@ }, "node_modules/@webassemblyjs/floating-point-hex-parser": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "peer": true, "dependencies": { @@ -5800,13 +5800,13 @@ }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "peer": true, "dependencies": { @@ -5818,7 +5818,7 @@ }, "node_modules/@webassemblyjs/ieee754": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "peer": true, "dependencies": { @@ -5827,7 +5827,7 @@ }, "node_modules/@webassemblyjs/leb128": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "peer": true, "dependencies": { @@ -5836,13 +5836,13 @@ }, "node_modules/@webassemblyjs/utf8": { "version": "1.11.6", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "peer": true, "dependencies": { @@ -5858,7 +5858,7 @@ }, "node_modules/@webassemblyjs/wasm-gen": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "peer": true, "dependencies": { @@ -5871,7 +5871,7 @@ }, "node_modules/@webassemblyjs/wasm-opt": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "peer": true, "dependencies": { @@ -5883,7 +5883,7 @@ }, "node_modules/@webassemblyjs/wasm-parser": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "peer": true, "dependencies": { @@ -5897,7 +5897,7 @@ }, "node_modules/@webassemblyjs/wast-printer": { "version": "1.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "peer": true, "dependencies": { @@ -5912,13 +5912,13 @@ }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", "peer": true }, "node_modules/@xtuc/long": { "version": "4.2.2", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/@xtuc/long/-/long-4.2.2.tgz", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "peer": true }, @@ -5947,9 +5947,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", "bin": { "acorn": "bin/acorn" }, @@ -6028,7 +6028,7 @@ }, "node_modules/ajv-keywords": { "version": "3.5.2", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "peer": true, "peerDependencies": { @@ -7112,7 +7112,7 @@ }, "node_modules/chrome-trace-event": { "version": "1.0.4", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "peer": true, "engines": { @@ -8504,7 +8504,7 @@ }, "node_modules/enhanced-resolve": { "version": "5.17.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "peer": true, "dependencies": { @@ -8679,7 +8679,7 @@ }, "node_modules/es-module-lexer": { "version": "1.5.4", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "peer": true }, @@ -9112,7 +9112,7 @@ }, "node_modules/events": { "version": "3.3.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/events/-/events-3.3.0.tgz", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "peer": true, "engines": { @@ -9958,7 +9958,7 @@ }, "node_modules/glob-to-regexp": { "version": "0.4.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "peer": true }, @@ -11338,7 +11338,7 @@ }, "node_modules/jest-worker": { "version": "27.5.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/jest-worker/-/jest-worker-27.5.1.tgz", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "peer": true, "dependencies": { @@ -11352,7 +11352,7 @@ }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/supports-color/-/supports-color-8.1.1.tgz", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "peer": true, "dependencies": { @@ -12107,7 +12107,7 @@ }, "node_modules/loader-runner": { "version": "4.3.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/loader-runner/-/loader-runner-4.3.0.tgz", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "peer": true, "engines": { @@ -12567,7 +12567,7 @@ }, "node_modules/merge-stream": { "version": "2.0.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "peer": true }, @@ -12926,7 +12926,7 @@ }, "node_modules/neo-async": { "version": "2.6.2", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/neo-async/-/neo-async-2.6.2.tgz", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "peer": true }, @@ -15457,7 +15457,7 @@ }, "node_modules/schema-utils": { "version": "3.3.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/schema-utils/-/schema-utils-3.3.0.tgz", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "peer": true, "dependencies": { @@ -16305,7 +16305,7 @@ }, "node_modules/tapable": { "version": "2.2.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/tapable/-/tapable-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "peer": true, "engines": { @@ -16505,7 +16505,7 @@ }, "node_modules/terser-webpack-plugin": { "version": "5.3.10", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "peer": true, "dependencies": { @@ -17098,7 +17098,7 @@ }, "node_modules/unplugin": { "version": "1.14.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/unplugin/-/unplugin-1.14.1.tgz", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.14.1.tgz", "integrity": "sha512-lBlHbfSFPToDYp9pjXlUEFVxYLaue9f9T1HC+4OHlmj+HnMDdz9oZY+erXfoCe/5V/7gKUSY2jpXPb9S7f0f/w==", "dependencies": { "acorn": "^8.12.1", @@ -17294,7 +17294,7 @@ }, "node_modules/watchpack": { "version": "2.4.2", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/watchpack/-/watchpack-2.4.2.tgz", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "peer": true, "dependencies": { @@ -17339,7 +17339,7 @@ }, "node_modules/webpack": { "version": "5.95.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/webpack/-/webpack-5.95.0.tgz", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", "peer": true, "dependencies": { @@ -17385,7 +17385,7 @@ }, "node_modules/webpack-sources": { "version": "3.2.3", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/webpack-sources/-/webpack-sources-3.2.3.tgz", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "peer": true, "engines": { @@ -17394,12 +17394,12 @@ }, "node_modules/webpack-virtual-modules": { "version": "0.6.2", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==" }, "node_modules/webpack/node_modules/eslint-scope": { "version": "5.1.1", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/eslint-scope/-/eslint-scope-5.1.1.tgz", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "peer": true, "dependencies": { @@ -17412,7 +17412,7 @@ }, "node_modules/webpack/node_modules/estraverse": { "version": "4.3.0", - "resolved": "https://repo.splunkdev.net:443/artifactory/api/npm/npm/estraverse/-/estraverse-4.3.0.tgz", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "peer": true, "engines": { @@ -17937,10 +17937,11 @@ "@types/mocha": "^10.0.1", "chai": "^4.3.7", "mocha": "^10.2.0", + "nyc": "^15.1.0", "ts-node": "^10.9.1" }, "peerDependencies": { - "webpack": "^5.0.0" + "webpack": "^4 || ^5" } }, "packages/session-recorder": {