From 8fb7696ca77db77bca2fc7f0cfee7321edefec4c Mon Sep 17 00:00:00 2001 From: Denes Sapi Date: Wed, 27 Mar 2024 14:49:20 +0100 Subject: [PATCH] chore: Rename the package to ci-trap-web --- Dockerfile | 4 ++-- README.md | 17 +++++++++-------- examples/es6/package-lock.json | 6 +++--- examples/es6/package.json | 4 ++-- examples/es6/src/trap-esm.js | 2 +- examples/sandbox/package-lock.json | 6 +++--- examples/sandbox/package.json | 4 ++-- examples/sandbox/src/index.js | 2 +- examples/vanilla/Dockerfile | 2 +- examples/vanilla/package-lock.json | 8 ++++---- examples/vanilla/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- sonar-project.properties | 4 ++-- 14 files changed, 34 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index a6f5128..8133e60 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,13 +5,13 @@ # # Use the following command to build the image: # -# $ docker build --ssh default --build-arg GIT_USER=build . -t ci-trap +# $ docker build --ssh default --build-arg GIT_USER=build . -t ci-trap-web # # Replace `build` with your Git user to be able to clone sources from Gerrit. # # Then run the built image with: # -# $ docker run --rm -p 8080:80 --name ci-trap ci-trap +# $ docker run --rm -p 8080:80 --name ci-trap-web ci-trap-web # # Your static asset server with `trap.min.js` and `gt.min.js` assets will be # available at https://docker-server:8080/. diff --git a/README.md b/README.md index 84d7ca5..3bddb11 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,19 @@ a website do the following in your ES6 or CommonJS compatible project: **1. Install:** ```shell -$ npm install ci-trap +$ npm install ci-trap-web ``` **2. Import `trap` client using ES6 module syntax:** ```javascript -import trap from 'ci-trap'; +import trap from 'ci-trap-web'; ``` **... or using CommonJS syntax:** ```javascript -const { trap } = require('ci-trap'); +const { trap } = require('ci-trap-web'); ``` **3. Set up data collection server and start collecting events:** @@ -84,7 +84,7 @@ The UI of the example is available at http://localhost:3000/. ## Configuration -You can configure `ci-trap` by specifying environment variables during build +You can configure `ci-trap-web` by specifying environment variables during build time. These environment variables act as configuration parameters. You can find the configuration parameters in `src/constants.js`. Each @@ -132,7 +132,8 @@ Node.js and its dependencies. 2. Build JavaScript asset files with the Docker environment provided: ``` - $ docker build --ssh default --build-arg GIT_USER=${GIT_USER} . -t ci-trap + $ docker build --ssh default --build-arg GIT_USER=${GIT_USER} . \ + -t ci-trap-web ``` Replace `${GIT_USER}` with your Gerrit/Git user. @@ -144,7 +145,7 @@ Node.js and its dependencies. - Start the container: ``` - $ docker run --rm -p 8080:80 --name ci-trap ci-trap + $ docker run --rm -p 8080:80 --name ci-trap-web ci-trap-web ``` - In a separate shell, use `curl` to fetch the asset: @@ -156,11 +157,11 @@ Node.js and its dependencies. - Or directly copy the file out of it: ``` - $ docker cp ci-trap:/opt/app/gt.min.js ./gt.min.js + $ docker cp ci-trap-web:/opt/app/gt.min.js ./gt.min.js ``` ## License -`ci-trap` is released under the [MIT license]. +`ci-trap-web` is released under the [MIT license]. [MIT license]: https://github.com/cursorinsight/ci-trap/blob/master/LICENSE diff --git a/examples/es6/package-lock.json b/examples/es6/package-lock.json index 196f6e6..35fbd26 100644 --- a/examples/es6/package-lock.json +++ b/examples/es6/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "ci-trap": "file:../../" + "ci-trap-web": "file:../../" }, "devDependencies": { "babel-loader": "^9.1.2", @@ -25,7 +25,7 @@ } }, "../..": { - "name": "ci-trap", + "name": "ci-trap-web", "version": "1.0.4", "license": "MIT", "dependencies": { @@ -10879,7 +10879,7 @@ "node": ">=6.0" } }, - "node_modules/ci-trap": { + "node_modules/ci-trap-web": { "resolved": "../..", "link": true }, diff --git a/examples/es6/package.json b/examples/es6/package.json index 990e316..8961f83 100644 --- a/examples/es6/package.json +++ b/examples/es6/package.json @@ -2,7 +2,7 @@ "name": "ci-trap-example-esm", "version": "1.0.0", "private": true, - "description": "ESM example for ci-trap", + "description": "ESM example for ci-trap-web", "scripts": { "serve": "webpack serve --config webpack.config.js --hot" }, @@ -13,7 +13,7 @@ }, "license": "MIT", "dependencies": { - "ci-trap": "file:../../" + "ci-trap-web": "file:../../" }, "devDependencies": { "babel-loader": "^9.1.2", diff --git a/examples/es6/src/trap-esm.js b/examples/es6/src/trap-esm.js index 9f91e2d..7561505 100644 --- a/examples/es6/src/trap-esm.js +++ b/examples/es6/src/trap-esm.js @@ -1,4 +1,4 @@ -import trap from 'ci-trap'; +import trap from 'ci-trap-web'; import './style.css'; // Mount Trap's event listener and disable touch events diff --git a/examples/sandbox/package-lock.json b/examples/sandbox/package-lock.json index 3874e6b..d8eead9 100644 --- a/examples/sandbox/package-lock.json +++ b/examples/sandbox/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "ci-trap": "file:../../" + "ci-trap-web": "file:../../" }, "devDependencies": { "babel-loader": "^9.1.2", @@ -25,7 +25,7 @@ } }, "../..": { - "name": "ci-trap", + "name": "ci-trap-web", "version": "1.0.4", "license": "MIT", "dependencies": { @@ -10879,7 +10879,7 @@ "node": ">=6.0" } }, - "node_modules/ci-trap": { + "node_modules/ci-trap-web": { "resolved": "../..", "link": true }, diff --git a/examples/sandbox/package.json b/examples/sandbox/package.json index 54509b1..6e69872 100644 --- a/examples/sandbox/package.json +++ b/examples/sandbox/package.json @@ -2,7 +2,7 @@ "name": "ci-trap-example-research", "version": "1.0.0", "private": true, - "description": "Research example for ci-trap", + "description": "Research example for ci-trap-web", "scripts": { "serve": "webpack serve --config webpack.config.js --hot" }, @@ -13,7 +13,7 @@ }, "license": "MIT", "dependencies": { - "ci-trap": "file:../../" + "ci-trap-web": "file:../../" }, "devDependencies": { "babel-loader": "^9.1.2", diff --git a/examples/sandbox/src/index.js b/examples/sandbox/src/index.js index 99e24b1..461ac7b 100644 --- a/examples/sandbox/src/index.js +++ b/examples/sandbox/src/index.js @@ -1,4 +1,4 @@ -import trap from 'ci-trap'; +import trap from 'ci-trap-web'; import './style.css'; // Mount Trap's event listener and disable touch events diff --git a/examples/vanilla/Dockerfile b/examples/vanilla/Dockerfile index 896c2e2..79c4fd8 100644 --- a/examples/vanilla/Dockerfile +++ b/examples/vanilla/Dockerfile @@ -18,7 +18,7 @@ # https://docker-server:8080/. # Source image name -ARG CI_TRAP_IMAGE_NAME=ci-trap +ARG CI_TRAP_IMAGE_NAME=ci-trap-web # Source image tag ARG CI_TRAP_IMAGE_TAG=latest diff --git a/examples/vanilla/package-lock.json b/examples/vanilla/package-lock.json index b2d99f5..fb76577 100644 --- a/examples/vanilla/package-lock.json +++ b/examples/vanilla/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "ci-trap": "file:../../" + "ci-trap-web": "file:../../" }, "devDependencies": { "babel-loader": "^9.1.2", @@ -23,7 +23,7 @@ } }, "../..": { - "name": "ci-trap", + "name": "ci-trap-web", "version": "1.0.4", "license": "MIT", "dependencies": { @@ -1361,7 +1361,7 @@ "node": ">=6.0" } }, - "node_modules/ci-trap": { + "node_modules/ci-trap-web": { "resolved": "../..", "link": true }, @@ -6187,7 +6187,7 @@ "dev": true, "peer": true }, - "ci-trap": { + "ci-trap-web": { "version": "file:../..", "requires": { "@babel/core": "^7.22.6", diff --git a/examples/vanilla/package.json b/examples/vanilla/package.json index 32ba850..1b239a4 100644 --- a/examples/vanilla/package.json +++ b/examples/vanilla/package.json @@ -13,7 +13,7 @@ }, "license": "MIT", "dependencies": { - "ci-trap": "file:../../" + "ci-trap-web": "file:../../" }, "devDependencies": { "babel-loader": "^9.1.2", diff --git a/package-lock.json b/package-lock.json index 1ae69d9..588cad1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "ci-trap", + "name": "ci-trap-web", "version": "1.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "ci-trap", + "name": "ci-trap-web", "version": "1.0.4", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index d2f3bff..e0a33d0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ci-trap", + "name": "ci-trap-web", "version": "1.0.4", "description": "Lightweight mouse and touch event tracker library for browsers.", "main": "dist/trap-umd.min.js", diff --git a/sonar-project.properties b/sonar-project.properties index fd4ef34..f064e6c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,10 +1,10 @@ # must be unique in a given SonarQube instance -sonar.projectKey=cursor-insight:ci-trap +sonar.projectKey=cursor-insight:ci-trap-web # --- optional properties --- # defaults to project key -sonar.projectName=ci-trap +sonar.projectName=ci-trap-web # defaults to 'not provided' #sonar.projectVersion=1.0