Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-example-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20
- uses: actions/cache@v3
with:
path: node_modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20
- uses: actions/cache@v3
with:
path: node_modules
Expand Down
82 changes: 41 additions & 41 deletions .github/workflows/create-test-applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Create Test Applications
on:
push:
branches:
- master
- master
schedule:
- cron: "0 0 1 * *" # every month
- cron: "0 0 1 * *" # every month

jobs:
Build_Android:
Expand All @@ -19,47 +19,47 @@ jobs:
- 0.70.1

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20
cache: npm

- uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v3
with:
path: TestApplication
key: ${{ runner.os }}-test-app-node-${{ hashFiles('TestApplication/package-lock.json') }}
restore-keys: |
${{ runner.os }}-test-app-node-
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('TestApplication/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v3
with:
path: TestApplication
key: ${{ runner.os }}-test-app-node-${{ hashFiles('TestApplication/package-lock.json') }}
restore-keys: |
${{ runner.os }}-test-app-node-
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('TestApplication/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-

- run: npm install
- run: npm pack
- run: npm install
- run: npm pack

- name: Create React Native v${{ matrix.version }} application
run: bin/create-test-application ${{ matrix.version }}
env:
INTEGRATION_TEST_APP_NAME: TestApplication
INTEGRATION_TEST_NO_RUN_APP: 1
- name: Create React Native v${{ matrix.version }} application
run: bin/create-test-application ${{ matrix.version }}
env:
INTEGRATION_TEST_APP_NAME: TestApplication
INTEGRATION_TEST_NO_RUN_APP: 1

- name: Build Android APK
working-directory: TestApplication/android
run: ./gradlew assembleRelease
- name: Build Android APK
working-directory: TestApplication/android
run: ./gradlew assembleRelease

- name: Upload Android APK
uses: actions/upload-artifact@v3
with:
name: android-release-react-native-${{ matrix.version }}
path: TestApplication/android/app/build/outputs/apk/release/
retention-days: 7
- name: Upload Android APK
uses: actions/upload-artifact@v3
with:
name: android-release-react-native-${{ matrix.version }}
path: TestApplication/android/app/build/outputs/apk/release/
retention-days: 7
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20
- uses: actions/cache@v3
with:
path: node_modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit-example-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20

- name: Run npm audit (app)
run: npm audit --audit-level=high
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20

- name: Run npm audit
run: npm audit --audit-level=high
4 changes: 4 additions & 0 deletions .mx-sso-proxy-rc.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiKey: ""
apiHost: "https://int-api.mx.com"
clientId: ""
defaultUserGuid: ""
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [2.0.0]

### Changed

- Now using vite to build
- Using vite to populate the version instead of running a script
- Example app is now using the built files instead of pointing directly at src
- react-native-webview is now a peer dependency
- reduced the number of commands required to develop locally

### Fixed

- SDK version now stays up to date when running `npm run dev:dependences`

### Removed

- mx-widget-sdk-setup script
- mx/sdk/info post message

## [1.1.6]

### Fixed
Expand Down
4 changes: 0 additions & 4 deletions babel.config.js

This file was deleted.

18 changes: 0 additions & 18 deletions bin/generate-version-file.ts

This file was deleted.

26 changes: 12 additions & 14 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ cd react-native-widget-sdk
npm run example:install
```

4. Start the SSO proxy server:

```bash
# This command will continue to run until it is manually stopped.
npm run example:server
```
4. Configure the sso api proxy

The example application uses [`@mxenabled/sso-api-proxy`][sso_api_proxy] to
run a proxy server that talks to MX's Platform API. When the proxy server
Expand All @@ -45,15 +40,18 @@ settings in order to run. This configuration is then saved locally. See [this
page][sso_api_proxy_config] for more information on how to configure
`@mxenabled/sso-api-proxy`.

5. Finally, you can run the application on an iOS or Android simulator.
[sso_api_proxy]: https://www.npmjs.com/package/@mxenabled/sso-api-proxy "@mxenabled/sso-api-proxy"
[sso_api_proxy_config]: https://github.com/mxenabled/sso-api-proxy#configuration "Configuration"

```bash
# This command will continue to run until it is manually stopped.
npm run example:start
5. Start the development dependences

npm run example:ios # Run application in an iOS simulator
npm run example:android # Run application in an Android simulator
```bash
# This will start an sso proxy server and watch for changes to the SDK
npm run dev:dependencies
```

[sso_api_proxy]: https://www.npmjs.com/package/@mxenabled/sso-api-proxy "@mxenabled/sso-api-proxy"
[sso_api_proxy_config]: https://github.com/mxenabled/sso-api-proxy#configuration "Configuration"
6. Finally, you can run the application on an iOS or Android simulator.

```bash
npm run dev
```
2 changes: 1 addition & 1 deletion example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config")
const { resolve } = require("path")

const siblings = {
"@mxenabled/react-native-widget-sdk": resolve(__dirname, "..", "src"),
"@mxenabled/react-native-widget-sdk": resolve(__dirname, "..", "dist"),
"@mxenabled/widget-post-message-definitions": resolve(
__dirname,
"..",
Expand Down
Loading