diff --git a/docker-compose.yml b/docker-compose.yml index 1aa0921..dc0cd50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,39 +1,44 @@ services: - prebid-client: + # javascript sdk integrations + javascript-sdk-client-side: build: context: . - dockerfile: web-integrations/prebid-integrations/client-side/Dockerfile + dockerfile: web-integrations/javascript-sdk/client-side/Dockerfile ports: - "3031:3031" - container_name: prebid-client-side + container_name: javascript-sdk-client-side env_file: - .env - - # Add more services here as needed - javascript-sdk-client-side: + + javascript-sdk-client-server: build: context: . - dockerfile: web-integrations/javascript-sdk/client-side/Dockerfile + dockerfile: web-integrations/javascript-sdk/client-server/Dockerfile ports: - "3032:3032" - container_name: javascript-sdk-client-side + container_name: javascript-sdk-client-server env_file: - .env - # google-secure-signals-client: - # build: - # context: . - # dockerfile: web-integrations/google-secure-signals/client-side/Dockerfile - # ports: - # - "3033:3033" - # container_name: google-secure-signals-client + # secure signals integrations + google-secure-signals-client-server: + build: + context: . + dockerfile: web-integrations/google-secure-signals/client-server/Dockerfile + ports: + - "3041:3041" + container_name: google-secure-signals-client-server + env_file: + - .env - javascript-sdk-client: + # prebid integrations + prebid-client: build: context: . - dockerfile: web-integrations/javascript-sdk/client-server/Dockerfile + dockerfile: web-integrations/prebid-integrations/client-side/Dockerfile ports: - "3051:3051" - container_name: javascript-sdk-client-server + container_name: prebid-client-side env_file: - .env + diff --git a/publisher/server_only/package-lock.json b/publisher/server_only/package-lock.json index 7e23d0a..47856f8 100644 --- a/publisher/server_only/package-lock.json +++ b/publisher/server_only/package-lock.json @@ -527,21 +527,21 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -704,9 +704,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -811,9 +811,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dependencies": { "jake": "^10.8.5" }, @@ -1500,9 +1500,9 @@ } }, "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dependencies": { "balanced-match": "^1.0.0" } @@ -1519,9 +1519,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -2390,13 +2390,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" @@ -2683,9 +2683,9 @@ } }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" diff --git a/publisher/server_only/version.json b/publisher/server_only/version.json deleted file mode 100644 index 6d49921..0000000 --- a/publisher/server_only/version.json +++ /dev/null @@ -1 +0,0 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "1.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/web-integrations/google-secure-signals/client-server/.gitignore b/web-integrations/google-secure-signals/client-server/.gitignore deleted file mode 100644 index 1dcef2d..0000000 --- a/web-integrations/google-secure-signals/client-server/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.env \ No newline at end of file diff --git a/web-integrations/google-secure-signals/client-server/.gitkeep b/web-integrations/google-secure-signals/client-server/.gitkeep deleted file mode 100644 index dcf2c80..0000000 --- a/web-integrations/google-secure-signals/client-server/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# Placeholder diff --git a/web-integrations/google-secure-signals/client-server/Dockerfile b/web-integrations/google-secure-signals/client-server/Dockerfile index 9d14559..5816609 100644 --- a/web-integrations/google-secure-signals/client-server/Dockerfile +++ b/web-integrations/google-secure-signals/client-server/Dockerfile @@ -1,10 +1,15 @@ -FROM node:20.11-alpine3.18 +FROM node:20.11.0-alpine3.18 + WORKDIR /usr/src/app -COPY . . + +# Copy package files first for better caching +COPY web-integrations/google-secure-signals/client-server/package*.json ./ RUN npm install -RUN apk add --no-cache gettext -RUN mv public/ads.js public/ads.js.template -CMD /bin/sh -c "envsubst < public/ads.js.template > public/ads.js && npm start" +# Copy application files +COPY web-integrations/google-secure-signals/client-server/server.js ./ +COPY web-integrations/google-secure-signals/client-server/public ./public/ +COPY web-integrations/google-secure-signals/client-server/views ./views/ -EXPOSE 3000 +EXPOSE 3041 +CMD ["npm", "start"] \ No newline at end of file diff --git a/web-integrations/google-secure-signals/client-server/README.md b/web-integrations/google-secure-signals/client-server/README.md index 9aec262..76bc20d 100644 --- a/web-integrations/google-secure-signals/client-server/README.md +++ b/web-integrations/google-secure-signals/client-server/README.md @@ -6,40 +6,53 @@ For an example application without using the UID2 SDK, see [Server-Side UID2 Int > NOTE: Although the server side of the example application is implemented in JavaScript using node.js, it is not a requirement. You can use any technology of your choice and refer to the example application for an illustration of the functionality that needs to be implemented. -## Build and Run the Example Application +## Running with Docker + +### Using Docker Compose (Recommended) + +From the base directory: + +```bash +# Start the service +docker-compose up -d google-secure-signals-client + +# View logs +docker-compose logs google-secure-signals-client + +# Stop the service +docker-compose down google-secure-signals-client +``` + +### Using Docker directly + +From the base directory: + +```bash +# Build the image +docker build -f web-integrations/google-secure-signals/client-server/Dockerfile -t google-secure-signals-client . + +# Run the container +docker run -p 3052:3052 --env-file .env google-secure-signals-client +``` ### Using the VS Code Debugger The easiest way to try the example is to do the following: 1. Open this repo in VS Code -1. Create a `.env` file in this folder and populate `UID2_API_KEY` and `UID2_CLIENT_SECRET`: +1. Create a `.env` file in the base directory and populate the required variables: ``` UID2_BASE_URL=http://localhost:8080 UID2_API_KEY= UID2_CLIENT_SECRET= AD_TAG_URL=https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/extrernal/adx-test-tag&tfcd=0&npa=0&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator= UID2_JS_SDK_URL=http://localhost:9091/uid2-sdk.js + PORT=3052 ``` 1. Click the Run and Debug tab or hit `Crtl+Shift+D` 1. Select `Launch Secure Signals (Chrome)` from the configuration dropdown 1. Click `Start Debugging` or hit F5 -### Running the Docker commands manually - -The other way to try the example is to use the following Docker Build command. First, open this folder in your terminal, then run the following: - -``` -docker build . -t uid2-secure-signals-standard -docker run -it --rm -p 3000:3000 ` - -e UID2_BASE_URL="https://operator-integ.uidapi.com" ` - -e UID2_API_KEY="" ` - -e UID2_CLIENT_SECRET="" ` - -e AD_TAG_URL="https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/extrernal/adx-test-tag&tfcd=0&npa=0&sz=640x480&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=" ` - -e UID2_JS_SDK_URL="" ` - uid2-secure-signals-standard -``` - The following table lists the environment variables that you must specify to start the application. | Parameter | Data Type | Description | @@ -56,7 +69,7 @@ Output similar to the following indicates that the example application is up and > uid2-publisher@1.0.0 start /usr/src/app > node server.js -Example app listening at http://localhost:3000 +Example app listening at http://localhost:3052 ``` If needed, to close the application, terminate the Docker container or use the `Ctrl+C` keyboard shortcut. @@ -67,7 +80,7 @@ The following table outlines and annotates the steps you can take to test and ex | Step | Description | Comments | | :--: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 1 | In your browser, navigate to the application main page at `http://localhost:3000`. | The displayed main ([index](views/index.html)) page of the example application provides a login form for the user to complete the UID2 login process.
IMPORTANT: A real-life application must also display a form for the user to consent to targeted advertising. | +| 1 | In your browser, navigate to the application main page at `http://localhost:3052`. | The displayed main ([index](views/index.html)) page of the example application provides a login form for the user to complete the UID2 login process.
IMPORTANT: A real-life application must also display a form for the user to consent to targeted advertising. | | 2 | In the text field at the bottom, enter the email address that you want to use for testing and click **Generate UID2**. Note: The button may be labeled different here as it is a testing environment; in a real production environment, labels may differ. | The click calls the Secure Signal [`clearAllCache()`](https://developers.google.com/publisher-tag/reference#googletag.secureSignals.SecureSignalProvidersArray_clearAllCache) function, to clear all cached signals from local storage, and then calls the `/login` endpoint ([server.js](server.js)). The login initiated on the server side then calls the [POST /token/generate](https://unifiedid.com/docs/endpoints/post-token-generate#decrypted-json-response-format) endpoint and processes the received response. | | | A confirmation message appears with the established UID2 identity information. | The displayed identity information is the `body` property of the [JSON response payload](https://unifiedid.com/docs/endpoints/post-token-generate#decrypted-json-response-format) from the `POST /token/generate` response. It has been passed to the `login` [view](views/login.html) for rendering client-side JavaScript. Next, the identity information is passed to the UID2 SDK [`init()`](https://unifiedid.com/docs/sdks/sdk-ref-javascript#initopts-object-void) function. If the identity is valid, the SDK stores it either in local storage or a first-party UID2 cookie (see [UID2 Storage Format](https://unifiedid.com/docs/sdks/sdk-ref-javascript#uid2-storage-format) for use on subsequent page loads. | | 3 | Click the **Back to the main page** link. | On the updated application main page, note the newly populated **UID2 Advertising Token** value and a video player. While the [page view](views/index.html) is loading, [GPT](https://developers.google.com/publisher-tag/reference#googletag) auto-loads the Secure Signal UID2 script which pushes the advertising token to GPT local storage, and the [IMA](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side) makes an ad request which transmits the encoded signal in the request. The [page view](views/index.html) calls the [init()](https://unifiedid.com/docs/sdks/sdk-ref-javascript#initopts-object-void) function again, but this time without passing an explicit identity. Instead, the identity is loaded from the first-party cookie. | diff --git a/web-integrations/google-secure-signals/client-server/package-lock.json b/web-integrations/google-secure-signals/client-server/package-lock.json index 2ecf542..9bcb951 100644 --- a/web-integrations/google-secure-signals/client-server/package-lock.json +++ b/web-integrations/google-secure-signals/client-server/package-lock.json @@ -10,6 +10,7 @@ "license": "BSD-2-Clause", "dependencies": { "axios": "^1.12.0", + "dotenv": "^17.2.3", "ejs": "^3.1.7", "express": "^4.21.2", "minimist": "^1.2.6" @@ -578,14 +579,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/async-generator-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-generator-function/-/async-generator-function-1.0.0.tgz", - "integrity": "sha512-+NAXNqgCrB95ya4Sr66i1CL2hqLVckAk7xwRYWdcm39/ELQ6YNn1aw5r0bdQtqNZgQpEWzc5yc/igXc7aL5SLA==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -603,7 +597,7 @@ "dependencies": { "possible-typed-array-names": "^1.0.0" }, - "license": "MIT" + "engines": { "node": ">= 0.4" }, "funding": { @@ -999,6 +993,17 @@ "node": ">=6.0.0" } }, + "node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -1888,26 +1893,24 @@ } }, "node_modules/generator-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.0.tgz", - "integrity": "sha512-xPypGGincdfyl/AiSGa7GjXLkvld9V7GjZlowup9SHIJnQnHLFiLODCd/DqKOp0PBagbHJ68r1KJI9Mut7m4sA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, "engines": { "node": ">= 0.4" } }, "node_modules/get-intrinsic": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.1.tgz", - "integrity": "sha512-fk1ZVEeOX9hVZ6QzoBNEC55+Ucqg4sTVwrVuigZhuRPESVFpMyXnd3sbXvPOwp7Y9riVyANiqhEuRF0G1aVSeQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dependencies": { - "async-function": "^1.0.0", - "async-generator-function": "^1.0.0", "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "generator-function": "^2.0.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", @@ -2397,14 +2400,14 @@ } }, "node_modules/is-generator-function": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.1.tgz", - "integrity": "sha512-Gn8BWUdrTzf9XUJAvqIYP7QnSC3mKs8QjQdGdJ7HmBemzZo14wj/OVmmAwgxDX/7WhFEjboybL4VhXGIQYPlOA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "dependencies": { - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "generator-function": "^2.0.0", - "get-proto": "^1.0.0", + "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" }, @@ -3392,9 +3395,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -3989,9 +3992,9 @@ } }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "peer": true, "bin": { @@ -4176,17 +4179,3 @@ } } } - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", - "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", - "form-data": "^4.0.0", - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", - "hasown": "^2.0.2", diff --git a/web-integrations/google-secure-signals/client-server/package.json b/web-integrations/google-secure-signals/client-server/package.json index ed5edaa..b8ae96f 100644 --- a/web-integrations/google-secure-signals/client-server/package.json +++ b/web-integrations/google-secure-signals/client-server/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "axios": "^1.12.0", + "dotenv": "^17.2.3", "ejs": "^3.1.7", "express": "^4.21.2", "minimist": "^1.2.6" diff --git a/web-integrations/google-secure-signals/client-server/server.js b/web-integrations/google-secure-signals/client-server/server.js index 7557395..2ab7788 100644 --- a/web-integrations/google-secure-signals/client-server/server.js +++ b/web-integrations/google-secure-signals/client-server/server.js @@ -1,10 +1,13 @@ +// Load environment variables from .env file (for local development) +require('dotenv').config({ path: '../../../.env' }); + const axios = require('axios'); const ejs = require('ejs'); const express = require('express'); const crypto = require('crypto'); const app = express(); -const port = process.env.PORT || 3000; +const port = process.env.PORT || 3041; const uid2BaseUrl = process.env.UID2_BASE_URL; const uid2ApiKey = process.env.UID2_API_KEY; diff --git a/web-integrations/google-secure-signals/client-server/version.json b/web-integrations/google-secure-signals/client-server/version.json deleted file mode 100644 index 0068365..0000000 --- a/web-integrations/google-secure-signals/client-server/version.json +++ /dev/null @@ -1 +0,0 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "1.0.13", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/web-integrations/google-secure-signals/client-side/version.json b/web-integrations/google-secure-signals/client-side/version.json deleted file mode 100644 index 8f66da4..0000000 --- a/web-integrations/google-secure-signals/client-side/version.json +++ /dev/null @@ -1 +0,0 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "2.3", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/web-integrations/google-secure-signals/react-client-side/version.json b/web-integrations/google-secure-signals/react-client-side/version.json deleted file mode 100644 index 7f1b962..0000000 --- a/web-integrations/google-secure-signals/react-client-side/version.json +++ /dev/null @@ -1 +0,0 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "4.1", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/web-integrations/google-secure-signals/server-side/package-lock.json b/web-integrations/google-secure-signals/server-side/package-lock.json index b75e681..7286b77 100644 --- a/web-integrations/google-secure-signals/server-side/package-lock.json +++ b/web-integrations/google-secure-signals/server-side/package-lock.json @@ -650,14 +650,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/async-generator-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-generator-function/-/async-generator-function-1.0.0.tgz", - "integrity": "sha512-+NAXNqgCrB95ya4Sr66i1CL2hqLVckAk7xwRYWdcm39/ELQ6YNn1aw5r0bdQtqNZgQpEWzc5yc/igXc7aL5SLA==", + "dev": true, "engines": { "node": ">= 0.4" } @@ -675,7 +668,7 @@ "dependencies": { "possible-typed-array-names": "^1.0.0" }, - "license": "MIT" + "engines": { "node": ">= 0.4" }, "funding": { @@ -1980,26 +1973,24 @@ } }, "node_modules/generator-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.0.tgz", - "integrity": "sha512-xPypGGincdfyl/AiSGa7GjXLkvld9V7GjZlowup9SHIJnQnHLFiLODCd/DqKOp0PBagbHJ68r1KJI9Mut7m4sA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, "engines": { "node": ">= 0.4" } }, "node_modules/get-intrinsic": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.1.tgz", - "integrity": "sha512-fk1ZVEeOX9hVZ6QzoBNEC55+Ucqg4sTVwrVuigZhuRPESVFpMyXnd3sbXvPOwp7Y9riVyANiqhEuRF0G1aVSeQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dependencies": { - "async-function": "^1.0.0", - "async-generator-function": "^1.0.0", "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "generator-function": "^2.0.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", @@ -2489,14 +2480,14 @@ } }, "node_modules/is-generator-function": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.1.tgz", - "integrity": "sha512-Gn8BWUdrTzf9XUJAvqIYP7QnSC3mKs8QjQdGdJ7HmBemzZo14wj/OVmmAwgxDX/7WhFEjboybL4VhXGIQYPlOA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", "dev": true, "dependencies": { - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "generator-function": "^2.0.0", - "get-proto": "^1.0.0", + "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" }, @@ -3515,9 +3506,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4112,9 +4103,9 @@ } }, "node_modules/typescript": { - "version": "5.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", - "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "peer": true, "bin": { @@ -4299,17 +4290,3 @@ } } } - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz", - "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==", - "form-data": "^4.0.0", - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", - "hasown": "^2.0.2", diff --git a/web-integrations/google-secure-signals/server-side/version.json b/web-integrations/google-secure-signals/server-side/version.json deleted file mode 100644 index 4a6b289..0000000 --- a/web-integrations/google-secure-signals/server-side/version.json +++ /dev/null @@ -1 +0,0 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "1.7", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/web-integrations/javascript-sdk/client-server/Dockerfile b/web-integrations/javascript-sdk/client-server/Dockerfile index c82df35..95da0ca 100644 --- a/web-integrations/javascript-sdk/client-server/Dockerfile +++ b/web-integrations/javascript-sdk/client-server/Dockerfile @@ -1,9 +1,5 @@ FROM node:20.11.0-alpine3.18 -# Copy entrypoint script -COPY web-integrations/javascript-sdk/client-server/entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - WORKDIR /usr/src/app # Copy package files first for better caching @@ -15,5 +11,5 @@ COPY web-integrations/javascript-sdk/client-server/server.js ./ COPY web-integrations/javascript-sdk/client-server/public ./public/ COPY web-integrations/javascript-sdk/client-server/views ./views/ -EXPOSE 3051 -ENTRYPOINT ["/entrypoint.sh"] +EXPOSE 3032 +CMD ["npm", "start"] diff --git a/web-integrations/javascript-sdk/client-server/entrypoint.sh b/web-integrations/javascript-sdk/client-server/entrypoint.sh deleted file mode 100644 index 0da8838..0000000 --- a/web-integrations/javascript-sdk/client-server/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Start the Node.js application -exec npm start diff --git a/web-integrations/javascript-sdk/client-server/server.js b/web-integrations/javascript-sdk/client-server/server.js index 2e036d1..5548597 100644 --- a/web-integrations/javascript-sdk/client-server/server.js +++ b/web-integrations/javascript-sdk/client-server/server.js @@ -1,5 +1,5 @@ // Load environment variables from .env file (for local development) -require('dotenv').config({path: '../../../.env'}); +require('dotenv').config({ path: '../../../.env' }); const axios = require('axios'); const ejs = require('ejs'); @@ -7,7 +7,7 @@ const express = require('express'); const crypto = require('crypto'); const app = express(); -const port = process.env.PORT || 3051; +const port = process.env.PORT || 3032; const uid2BaseUrl = process.env.UID2_BASE_URL; const uid2ApiKey = process.env.UID2_API_KEY; diff --git a/web-integrations/javascript-sdk/client-server/version.json b/web-integrations/javascript-sdk/client-server/version.json deleted file mode 100644 index 6d49921..0000000 --- a/web-integrations/javascript-sdk/client-server/version.json +++ /dev/null @@ -1 +0,0 @@ -{ "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "version": "1.0", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$" ], "cloudBuild": { "setVersionVariables": true, "buildNumber": { "enabled": true, "includeCommitId": { "when": "always" } } } } diff --git a/web-integrations/javascript-sdk/client-side/default.conf b/web-integrations/javascript-sdk/client-side/default.conf index 325cf37..4f7cebc 100644 --- a/web-integrations/javascript-sdk/client-side/default.conf +++ b/web-integrations/javascript-sdk/client-side/default.conf @@ -1,5 +1,5 @@ server { - listen 3032; + listen 3031; location / { root /usr/share/nginx/html; diff --git a/web-integrations/prebid-integrations/client-side/default.conf b/web-integrations/prebid-integrations/client-side/default.conf index 4f7cebc..67efd14 100644 --- a/web-integrations/prebid-integrations/client-side/default.conf +++ b/web-integrations/prebid-integrations/client-side/default.conf @@ -1,5 +1,5 @@ server { - listen 3031; + listen 3051; location / { root /usr/share/nginx/html;