Skip to content

Commit 63dad0e

Browse files
pauljung14mprew97dependabot[bot]Brad Umbaugh
authored
[MOB-7613][MOB-7390] Fix iframe height setter and update vulnerable dependencies (#303)
* [MOB-7613] Remove extra height from iframe + refactor (#302) * [MOB-7613] Unset iframe body margin if one is not explicitly already set * [MOB-7613] Detect img tags alongside image url paths * [MOB-7613] Set iframe height on iframe load * [MOB-7613] Add jwt generator url to .env.example * [MOB-7613] Cleaup utils * [MOB-7613] Move caching methods to separate file * [MOB-7613] Update usages of cache * [MOB-7613] Clean up comments in cache.ts * [MOB-7613] Remove added return * [MOB-7613] Clean up iframe width/height setter * [MOB-7613] Add comment for consume variable * [MOB-7613] Add env convenience variable for react sample app * [MOB-7613] Suppress console.warn lint warnings * [MOB-7613] Clean up types and remove template literals * [MOB-7613] Fix tests * [MOB-7613] Fix tests * [MOB-7613] Put localhost url as fallback for jwt generator * [MOB-7390]: update deps (#246) * Bump postcss from 8.3.11 to 8.4.31 Bumps [postcss](https://github.com/postcss/postcss) from 8.3.11 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.3.11...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump word-wrap from 1.2.3 to 1.2.4 Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump semver from 5.7.1 to 5.7.2 Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](npm/node-semver@v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump tough-cookie from 4.0.0 to 4.1.3 Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](salesforce/tough-cookie@v4.0.0...v4.1.3) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump webpack from 5.74.0 to 5.76.0 Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.74.0...v5.76.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * Bump json5 from 1.0.1 to 1.0.2 in /example Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump json5 from 1.0.1 to 1.0.2 in /react-example Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump express from 4.17.1 to 4.18.2 in /react-example Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.17.1...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump express from 4.17.1 to 4.18.2 Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.17.1...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump express from 4.17.1 to 4.18.2 in /example Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.17.1...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump loader-utils from 1.4.0 to 1.4.2 in /react-example Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump loader-utils from 1.4.0 to 1.4.2 in /example Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * [MOB-7175]: add new filter method that leaves in JSON only messages (#238) * add new filter method that leaves in JSON only messages * Mentioning filterOnlyReadAndNeverTriggerMessages --------- Co-authored-by: mitch prewitt <[email protected]> Co-authored-by: Brad Umbaugh <[email protected]> * ver bump (#240) Co-authored-by: mitch prewitt <[email protected]> * Bump word-wrap from 1.2.3 to 1.2.4 in /react-example Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump word-wrap from 1.2.3 to 1.2.4 in /example Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump semver from 6.3.0 to 6.3.1 in /react-example Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md) - [Commits](npm/node-semver@v6.3.0...v6.3.1) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump semver from 6.3.0 to 6.3.1 in /example Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md) - [Commits](npm/node-semver@v6.3.0...v6.3.1) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump tough-cookie from 4.0.0 to 4.1.3 in /example Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](salesforce/tough-cookie@v4.0.0...v4.1.3) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump webpack from 5.63.0 to 5.76.0 in /react-example Bumps [webpack](https://github.com/webpack/webpack) from 5.63.0 to 5.76.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.63.0...v5.76.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * Bump webpack from 5.63.0 to 5.76.0 in /example Bumps [webpack](https://github.com/webpack/webpack) from 5.63.0 to 5.76.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.63.0...v5.76.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> * not sure where these commits came from * oops * update vulnerabilities --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mitch prewitt <[email protected]> Co-authored-by: Brad Umbaugh <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Mitch Prewitt <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mitch prewitt <[email protected]> Co-authored-by: Brad Umbaugh <[email protected]>
1 parent 52fed68 commit 63dad0e

20 files changed

+2472
-1772
lines changed

.env.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# called .env and add these values to it and change them appropriately.
33
# Remember to uncomment the variables!
44

5-
# Only set BASE_URL if developing locally, as it will take precedence over the production api urls
5+
# Only set BASE_URL if developing locally, as it will take precedence over the production api urls.
66
# BASE_URL="https://api.iterable.com/api"
77

8+
# Set this to false to prevent messages from being consumed to fetch the same message(s) when testing changes locally.
89
# ENABLE_INAPP_CONSUME=false
910

10-
# toggle this to true if you would need to hit our EU APIs
11+
# Toggle this to true if you would need to hit our EU APIs.
1112
# IS_EU_ITERABLE_SERVICE=false

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"prettier": "^2.2.1",
5151
"ts-jest": "^27.0.7",
5252
"typescript": "^4.6.4",
53-
"webpack": "^5.63.0",
53+
"webpack": "^5.76.0",
5454
"webpack-cli": "^4.9.1",
5555
"webpack-dev-server": "^4.7.3"
5656
},

example/yarn.lock

Lines changed: 264 additions & 225 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
"@typescript-eslint/eslint-plugin": "^5.38.1",
7070
"@typescript-eslint/parser": "^5.38.1",
7171
"@webpack-cli/serve": "^1.6.0",
72+
"babel-plugin-module-resolver": "^5.0.0",
7273
"axios-mock-adapter": "^1.22.0",
73-
"babel-plugin-module-resolver": "^3.2.0",
7474
"concurrently": "^6.3.0",
7575
"dotenv": "^10.0.0",
7676
"eslint": "^7.14.0",
@@ -103,4 +103,4 @@
103103
"eslint"
104104
]
105105
}
106-
}
106+
}

react-example/.env.example

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# To make requests from this example app make sure you first create an .env file
22
# and add the API key and JWT Secret to it like so (and uncomment the keys):
3-
43
# API_KEY=1234
5-
# JWT_SECRET=1234
4+
# JWT_SECRET=1234
5+
6+
# You can set the URL for the JWT generator here if needed
7+
# JWT_GENERATOR=http://localhost:5000/generate
8+
9+
# Convenience variable to automatically set the login email during testing.
10+

react-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"prettier": "^2.2.1",
5959
"ts-jest": "^27.0.7",
6060
"typescript": "^4.6.4",
61-
"webpack": "^5.63.0",
61+
"webpack": "^5.76.0",
6262
"webpack-cli": "^4.9.1",
6363
"webpack-dev-server": "^4.7.3"
6464
},

react-example/src/components/LoginForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface Props {
3333
}
3434

3535
export const LoginForm: FC<Props> = ({ setEmail, logout, refreshJwt }) => {
36-
const [email, updateEmail] = useState<string>('');
36+
const [email, updateEmail] = useState<string>(process.env.LOGIN_EMAIL || '');
3737

3838
const [isEditingUser, setEditingUser] = useState<boolean>(false);
3939

react-example/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const HomeLink = styled(Link)`
4343
({ email }) => {
4444
return axios
4545
.post(
46-
'http://localhost:5000/generate',
46+
process.env.JWT_GENERATOR || 'http://localhost:5000/generate',
4747
{
4848
exp_minutes: 2,
4949
email,

react-example/src/views/InApp.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components';
33
import _Button from 'src/components/Button';
44
import { EndpointWrapper, Heading, Response } from './Components.styled';
55
import { useUser } from 'src/context/Users';
6-
import { getInAppMessages } from '@iterable/web-sdk';
6+
import { DisplayOptions, getInAppMessages } from '@iterable/web-sdk';
77

88
const Button = styled(_Button)`
99
width: 100%;
@@ -35,7 +35,7 @@ const { request, pauseMessageStream, resumeMessageStream } = getInAppMessages(
3535
closeButton: {},
3636
displayInterval: 1000
3737
},
38-
{ display: 'immediate' }
38+
{ display: DisplayOptions.Immediate }
3939
);
4040

4141
export const InApp: FC<{}> = () => {
@@ -57,7 +57,7 @@ export const InApp: FC<{}> = () => {
5757

5858
return getInAppMessages(
5959
{ count: 20, packageName: 'my-website' },
60-
{ display: 'deferred' }
60+
{ display: DisplayOptions.Deferred }
6161
)
6262
.request()
6363
.then((response) => {

0 commit comments

Comments
 (0)