Skip to content

Commit a011714

Browse files
authored
Replace verification host with official OM Web SDK (fixes #20) (#21)
1 parent 43e70a8 commit a011714

File tree

133 files changed

+7085
-7061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+7085
-7061
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
# Download and cache dependencies
1717
- restore_cache:
1818
keys:
19-
- node14-dependencies-{{ checksum "yarn.lock" }}
19+
- node14-dependencies-v2-{{ checksum "yarn.lock" }}
2020
# Fallback to using the latest cache if no exact match is found
21-
- node14-dependencies-
21+
- node14-dependencies-v2-
2222

2323
- run:
2424
name: Set up apt
@@ -44,7 +44,7 @@ jobs:
4444
- save_cache:
4545
paths:
4646
- node_modules
47-
key: node14-dependencies-{{ checksum "yarn.lock" }}
47+
key: node14-dependencies-v2-{{ checksum "yarn.lock" }}
4848

4949
# Build
5050
- run:

.env.development

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
REACT_APP_VERSION=0a1b2c3
22
REACT_APP_BRANCH=master
3-
REACT_APP_BUILD_DATE=Jan 1, 2020, 0:00 AM GMT
3+
REACT_APP_BUILD_DATE=Jan 1, 2021, 0:00 AM GMT
4+
DISABLE_ESLINT_PLUGIN=true

.eslintrc

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"standard"
7+
],
8+
"parserOptions": {
9+
"ecmaFeatures": {
10+
"jsx": true
11+
}
12+
},
13+
"plugins": [
14+
"react",
15+
"simple-import-sort"
16+
],
17+
"settings": {
18+
"react": {
19+
"version": "detect"
20+
}
21+
},
22+
"rules": {
23+
"react/display-name": "off",
24+
"react/prop-types": "off",
25+
"simple-import-sort/imports": "error",
26+
"simple-import-sort/exports": "error"
27+
},
28+
"env": {
29+
"browser": true
30+
}
31+
}

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn run lint-staged

README.md

+10-30
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,20 @@ All state is maintained using [Redux](https://redux.js.org/). Side effects of
3434
state mutation are modeled using
3535
[redux-observable](https://redux-observable.js.org/).
3636

37-
The app can be broken down into two sub-apps, which each live in a subdirectory
38-
of [`src/`](src/). The largest of the two is called [_main_](src/main/) and
39-
contains just about the whole tester. The second sub-app,
40-
[_verification_](src/verification/), houses a host for OMID scripts, which gets
41-
loaded into an iframe for every verification script.
37+
There are subdirectories for the standard React-Redux model:
4238

43-
The apps talk to one another using the [`rpc` subpackage](src/common/rpc/) that
44-
is also part of this repository. This is a friendly interface to the browser's
45-
[`postMessage()` API](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).
46-
47-
The top-level app has a [single entry point](src/index.js) that routes between
48-
the two sub-apps based on the URL. This started out as a limitation of Create
49-
React App, which only allows us to produce a single bundle, but we actually
50-
prefer it now.
51-
52-
The _verification_ sub-app is a single React component that implements the
53-
OMID interface. It does not use Redux at all.
54-
55-
In the _main_ app, there are subdirectories for the standard React-Redux model:
56-
57-
- [`components/`](src/main/components/): React components (without Redux);
58-
- [`containers/`](src/main/containers/): React components connected to Redux's
39+
- [`components/`](src/components/): React components (without Redux);
40+
- [`containers/`](src/containers/): React components connected to Redux's
5941
store;
60-
- [`actions/`](src/main/actions/): Redux action definitions;
61-
- [`reducers/`](src/main/reducers/): Redux reducers;
62-
- [`epics/`](src/main/epics/): epics for redux-observable;
63-
- [`middleware/`](src/main/middleware/): Redux middleware.
42+
- [`actions/`](src/actions/): Redux action definitions;
43+
- [`reducers/`](src/reducers/): Redux reducers;
44+
- [`epics/`](src/epics/): epics for redux-observable;
45+
- [`middleware/`](src/middleware/): Redux middleware.
6446

6547
In addition to those, there are also:
6648

67-
- [`util/`](src/main/util/): various utility modules;
68-
- [`style/`](src/main/style): [Sass](https://sass-lang.com/) style sheets for
49+
- [`util/`](src/util/): various utility modules;
50+
- [`style/`](src/style): [Sass](https://sass-lang.com/) style sheets for
6951
the app.
7052

7153
More detailed documentation will be added at a later stage. For now, we suggest
@@ -81,8 +63,6 @@ During development, you can use:
8163
for Redux actions and redux-observable effects;
8264
- [Logger for Redux](https://github.com/evgenyrodionov/redux-logger)
8365
by setting `localStorage.reduxLogger` to `true`;
84-
- [debug](https://www.npmjs.com/package/debug)
85-
by setting `localStorage.debug` to `'rpc:*'`.
8666

8767
## To Do
8868

@@ -98,7 +78,7 @@ We welcome pull requests for bug fixes and new features.
9878

9979
## License
10080

101-
Copyright 2020 IAB Technology Laboratory, Inc.
81+
Copyright 2021 IAB Technology Laboratory, Inc.
10282

10383
Licensed under the Apache License, Version 2.0 (the "License");
10484
you may not use this file except in compliance with the License.

package.json

+38-43
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"license": "Apache-2.0",
99
"engines": {
1010
"node": ">=12",
11-
"yarn": ">=1.7.0"
11+
"yarn": ">=1.22.5"
1212
},
1313
"browserslist": [
1414
">0.2%",
@@ -21,65 +21,60 @@
2121
"clean": "rimraf build",
2222
"build": "yarn run clean && REACT_APP_BUILD_DATE=\"$( TZ=GMT date +'%b %_d, %Y, %_I:%M %p %Z' )\" react-scripts build",
2323
"buildwin": "yarn run clean && react-scripts build",
24-
"test": "standard \"src/**/*.js\"",
25-
"format": "prettier-standard \"src/**/*.js\" && standard --fix \"src/**/*.js\""
24+
"test": "eslint \"src/**/*.js\"",
25+
"format": "prettier-eslint --write \"$PWD/src/**/*.js\""
2626
},
2727
"dependencies": {
2828
"base16": "^1.0.0",
29-
"debug": "^4.1.1",
3029
"fecha": "^4.2.0",
31-
"file-saver": "^2.0.2",
30+
"file-saver": "^2.0.5",
3231
"font-awesome": "^4.7.0",
33-
"husky": "^4.2.5",
34-
"iab-vast-loader": "^2.2.0",
35-
"lint-staged": "^10.2.2",
36-
"lodash-es": "^4.17.11",
37-
"lower-case-first": "^2.0.1",
38-
"node-sass": "^4.12.0",
32+
"iab-vast-loader": "^2.5.1",
33+
"lodash-es": "^4.17.21",
34+
"lower-case-first": "^2.0.2",
3935
"p-defer": "^3.0.0",
40-
"p-timeout": "^3.1.0",
41-
"prettier-standard": "^16.3.0",
36+
"p-timeout": "^4.1.0",
4237
"prop-types": "^15.7.2",
43-
"qs": "^6.7.0",
44-
"react": "^16.8.6",
45-
"react-collapsible": "^2.6.0",
46-
"react-copy-to-clipboard": "^5.0.1",
47-
"react-dom": "^16.8.6",
38+
"qs": "^6.10.1",
39+
"react": "^17.0.2",
40+
"react-collapsible": "^2.8.3",
41+
"react-copy-to-clipboard": "^5.0.3",
42+
"react-dom": "^17.0.2",
4843
"react-fontawesome": "^1.6.1",
49-
"react-json-tree": "^0.11.2",
50-
"react-redux": "^7.1.0",
44+
"react-json-tree": "^0.15.0",
45+
"react-redux": "^7.2.3",
5146
"react-router-dom": "^5.0.1",
52-
"react-scripts": "3.4.1",
53-
"react-tabs": "^3.0.0",
54-
"react-textarea-autosize": "^7.1.0",
55-
"react-toggle": "^4.0.2",
47+
"react-tabs": "^3.2.1",
48+
"react-textarea-autosize": "^8.3.2",
49+
"react-toggle": "^4.1.2",
5650
"redux": "^4.0.1",
5751
"redux-actions": "^2.6.5",
58-
"redux-devtools-extension": "^2.13.8",
5952
"redux-logger": "^3.0.6",
6053
"redux-observable": "^1.1.0",
6154
"reset-css": "^5.0.1",
62-
"rimraf": "^3.0.2",
63-
"rxjs": "^6.5.2",
64-
"serialize-error": "^7.0.1",
65-
"standard": "^14.3.4",
66-
"upper-case-first": "^2.0.1",
67-
"url-search-params": "^1.1.0"
55+
"rxjs": "^6.6.7",
56+
"serialize-error": "^8.0.1",
57+
"upper-case-first": "^2.0.2"
58+
},
59+
"devDependencies": {
60+
"eslint": "^7.23.0",
61+
"eslint-config-standard": "^16.0.2",
62+
"eslint-plugin-import": "^2.22.1",
63+
"eslint-plugin-node": "^11.1.0",
64+
"eslint-plugin-promise": "^4.3.1",
65+
"eslint-plugin-react": "^7.23.1",
66+
"eslint-plugin-simple-import-sort": "^7.0.0",
67+
"husky": "^6.0.0",
68+
"lint-staged": "^10.5.4",
69+
"node-sass": "^5.0.0",
70+
"prettier-eslint-cli": "^5.0.1",
71+
"react-scripts": "^4.0.3",
72+
"redux-devtools-extension": "^2.13.9",
73+
"rimraf": "^3.0.2"
6874
},
6975
"lint-staged": {
7076
"src/**/*.js": [
71-
"prettier-standard",
72-
"standard --fix"
73-
]
74-
},
75-
"standard": {
76-
"globals": [
77-
"Blob"
77+
"prettier-eslint --write"
7878
]
79-
},
80-
"husky": {
81-
"hooks": {
82-
"pre-commit": "lint-staged"
83-
}
8479
}
8580
}

0 commit comments

Comments
 (0)