This repository has been archived by the owner on Jan 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added circleci yaml * CCI badge * dot files * Codecov repo * Codecov badge * Contexts * Contexts * Testing release on my branch. * Testing release on my branch. * Release 1.0.7 * Testing release on my branch. * Testing release on my branch. * Release 1.0.8 * Releases only on master. * Modules added. * Transfer branch releases, so i can test the deploy * Hoping this will speed up the tests. * Release 1.0.9 * README with contributing & other docs. * Fixing the code highlights * Header fix * Fixing config options. * Reverting the release process to master only. * Fixed wording. * More docs. Co-authored-by: LiveIntent Berlin Machine User <[email protected]>
- Loading branch information
1 parent
988f9dd
commit 2d47a24
Showing
17 changed files
with
5,572 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# https://github.com/browserslist/browserslist#readme | ||
IE 9 | ||
safari 7 | ||
chrome 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
version: 2.1 | ||
|
||
references: | ||
restore_cache: &restore_cache | ||
restore_cache: | ||
key: dependency-cache-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }} | ||
|
||
save_cache: &save_cache | ||
save_cache: | ||
key: dependency-cache-{{ checksum "package-lock.json" }}-{{ checksum "package.json" }} | ||
paths: | ||
- ./node_modules | ||
|
||
npm_install: &npm_install | ||
run: | ||
name: Npm install | ||
command: npm install | ||
|
||
host_setup: &host_setup | ||
run: | ||
name: Setup host entries for TLD tests | ||
command: | | ||
echo "127.0.0.1 bln.test.liveintent.com" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 test.liveintent.com" | sudo tee -a /etc/hosts | ||
echo "127.0.0.1 me.idex.com" | sudo tee -a /etc/hosts | ||
install_node: &install_node | ||
run: | ||
name: Install node v10.16.3 | ||
command: | | ||
set +e | ||
export NVM_DIR="/opt/circleci/.nvm" | ||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
nvm install v10.16.3 | ||
nvm alias default v10.16.3 | ||
# Each step uses the same `$BASH_ENV`, so need to modify it | ||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV | ||
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV | ||
configure_git: &configure_git | ||
run: | ||
name: Configure Git | ||
command: | | ||
git config user.name "${CIRCLE_USERNAME}" | ||
git config user.email "[email protected]" | ||
git branch -u origin/${CIRCLE_BRANCH} ${CIRCLE_BRANCH} | ||
set_ssh_key: &set_ssh_key | ||
add_ssh_keys: | ||
fingerprints: | ||
- "17:a6:0f:32:c6:9e:b1:9e:cc:12:e6:d8:2d:9e:57:3e" | ||
|
||
reset_package_lock: &reset_package_lock | ||
run: | ||
name: Reset package-lock.json | ||
command: git checkout -- package-lock.json | ||
|
||
jobs: | ||
simple_test: | ||
parallelism: 1 | ||
machine: | ||
docker_layer_caching: true | ||
steps: | ||
- checkout | ||
- *restore_cache | ||
- *host_setup | ||
- *install_node | ||
- *npm_install | ||
- *save_cache | ||
- run: | ||
name: Run unit tests | ||
command: npm run test:unit | ||
- run: | ||
name: Run chrome tests in docker | ||
command: npm run test:it:docker:chrome | ||
- store_test_results: | ||
path: test-results | ||
- store_artifacts: | ||
path: ./test-results | ||
destination: test-results | ||
- run: | ||
name: Code coverage | ||
command: npm run coverage | ||
|
||
browserstack: | ||
parallelism: 1 | ||
machine: | ||
docker_layer_caching: true | ||
steps: | ||
- checkout | ||
- *restore_cache | ||
- *host_setup | ||
- *install_node | ||
- *npm_install | ||
- run: | ||
name: Run browserstack tests | ||
command: npm run test:it:browserstack | ||
- store_test_results: | ||
path: test-results | ||
- store_artifacts: | ||
path: ./test-results | ||
destination: test-results | ||
|
||
release: | ||
parallelism: 1 | ||
machine: | ||
docker_layer_caching: true | ||
parameters: | ||
increment: | ||
description: "Increment of release. Allowed values `patch`, `minor`, `major`" | ||
default: "patch" | ||
type: string | ||
steps: | ||
- checkout | ||
- *install_node | ||
- *npm_install | ||
- *configure_git | ||
- *set_ssh_key | ||
- *reset_package_lock | ||
- run: | ||
name: Authenticate with registry | ||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
- run: | ||
name: release | ||
command: npm run release:ci:<< parameters.increment >> | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- simple_test | ||
|
||
- browserstack?: | ||
type: approval | ||
requires: | ||
- simple_test | ||
|
||
- browserstack: | ||
context: org-global | ||
requires: | ||
- browserstack? | ||
|
||
- release?: | ||
context: live-connect-publisher | ||
type: approval | ||
requires: | ||
- browserstack | ||
filters: | ||
branches: | ||
only: master | ||
|
||
- release: | ||
context: live-connect-publisher | ||
requires: | ||
- release? | ||
|
||
|
||
- release_minor?: | ||
context: live-connect-publisher | ||
type: approval | ||
requires: | ||
- browserstack | ||
filters: | ||
branches: | ||
only: master | ||
|
||
- release: | ||
context: live-connect-publisher | ||
name: release_minor | ||
increment: "minor" | ||
requires: | ||
- release_minor? | ||
|
||
- release_major?: | ||
context: live-connect-publisher | ||
type: approval | ||
requires: | ||
- browserstack | ||
filters: | ||
branches: | ||
only: master | ||
|
||
- release: | ||
context: live-connect-publisher | ||
name: release_major | ||
increment: "major" | ||
requires: | ||
- release_major? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
'browser': true, | ||
'commonjs': true, | ||
'es6': true, | ||
'node': true | ||
}, | ||
extends: [ | ||
'standard', | ||
], | ||
globals: { | ||
}, | ||
rules: { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
esm/** linguist-generated=true | ||
cjs/** linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.DS_Store | ||
dist | ||
node_modules | ||
test-results | ||
local.log | ||
.nyc_output | ||
*.cid | ||
coverage.lcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"git": { | ||
"tagName": "v${version}" | ||
}, | ||
"github": { | ||
"release": true | ||
}, | ||
"npm": { | ||
"publish": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Query parameters in use: | ||
|
||
|
||
### `aid` | ||
- contains the `appId` | ||
### `se` | ||
- contains the b64 url encoded string of the JSON that was sent via `liveConnect.push` function | ||
### `duid` | ||
- contains the LiveConnect managed first party identifier, in the `${apexDomainHash}--${ULID}`, or `${iframeDomainHash}-${websiteUrlDomainHash}--${ULID}` format | ||
### `lduid` | ||
- contains the legacy LiveConnect first party identifier | ||
### `pfpi` | ||
- contains the value of the provided first party identifier (e.g the cookie found for key = `config.providedIdentifierName`) | ||
### `fpn` | ||
- contains the name passed as the key of the provided first party identifier, specifically the value of the `config.providedIdentifierName` | ||
### `tna` | ||
- contains the `config.trackerName` | ||
### `pu` | ||
- the url on which the event happened, which is populated by the `page` enricher | ||
### `ae` | ||
- contains a b64 encoded string of the JSON received on handled exceptions | ||
### `scre` | ||
- if one of the identifiersToResolve contains plain emails, we don't want to send that over the wire, so those are hashed and passed under the `scre` param | ||
### `li_duid` | ||
- contains a comma separated list of decision ids extracted from the url and decision storage | ||
### `e` | ||
- similarly to `scre`, some information that is pushed to LiveConnect might contain clear text emails. Those are then hashed and sent under this field | ||
### `wpn` | ||
- `config.wrapperName` value | ||
### `ext_` parameters | ||
- `config.identifiersToResolve` are considered as external, so for each identifier specified and found in any storage level, an additional `ext_` key value pair will be added. | ||
### `us_privacy` | ||
- the value of the `config.usPrivacyString` config parameter. | ||
### `dtstmp` | ||
- the UTC timestamp when the pixel was sent | ||
|
||
## Example of a request to a default collectorUrl: | ||
`https://rp.liadm.com/p?tna=v1.0.16&aid=a-00co&lduid=a-00co--bda8cda1-9000-4632-8c64-06e04fa8d113&duid=df9f30ab37f2--01dwcepmbbbqm0hvj4wytvyss4&pu=https%3A%2F%2Fwww.example.com%2F&se=eyJldmVudCI6InZpZXdIb21lUGFnZSJ9&dtstmp=1577968744235` | ||
|
Oops, something went wrong.