Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardsph committed Jul 23, 2024
0 parents commit c47b03a
Show file tree
Hide file tree
Showing 159 changed files with 30,594 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/** @type {Detox.DetoxConfig} */
const dotenv = require('dotenv');
dotenv.config();
module.exports = {
testRunner: {
args: {
'$0': 'jest',
config: 'e2e/jest.config.ts'
},
jest: {
setupTimeout: 120000
}
},
apps: {
'ios.release': {
type: 'ios.app',
binaryPath: process.env.IOS_BINARY_PATH,
build: 'xcodebuild -workspace ios/inruptwalletfrontend.xcworkspace -scheme inruptwalletfrontend -configuration Release -sdk iphonesimulator -derivedDataPath ios/build'
},
'android.release': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk',
testBinaryPath: 'android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk',
build: 'cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..'
},
'android.debug': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
testBinaryPath: 'android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk',
build: 'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..'
}
},
devices: {
simulator: {
type: 'ios.simulator',
device: {
type: process.env.TEST_IOS_SIM
}
},
attached: {
type: 'android.attached',
device: {
adbName: '.*'
}
},
emulator: {
type: 'android.emulator',
device: {
avdName: process.env.TEST_ANDROID_EMU
}
}
},
configurations: {
'ios.sim.release': {
device: 'simulator',
app: 'ios.release'
},
'android.att.release': {
device: 'attached',
app: 'android.release'
},
'android.emu.release': {
device: 'emulator',
app: 'android.release'
},
'android.emu.debug': {
device: 'emulator',
app: 'android.debug'
}
},
custom: {
defaultTestTimeout: 5000
}
};
7 changes: 7 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
EXPO_PUBLIC_LOGIN_URL=https://datawallet.dev.inrupt.com/oauth2/authorization/wallet-app
EXPO_PUBLIC_WALLET_API=https://datawallet.dev.inrupt.com
TEST_ACCOUNT_USERNAME=
TEST_ACCOUNT_PASSWORD=
IOS_BINARY_PATH=
TEST_IOS_SIM=
TEST_ANDROID_EMU=
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.eslintrc.js
metro.config.js
56 changes: 56 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// Copyright Inrupt Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
// Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

module.exports = {
extends: ["expo", "@inrupt/eslint-config-lib"],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: "./tsconfig.eslint.json",
},
ignorePatterns: [
"expo-env.d.ts", // Exclude expo-env.d.ts from ESLint checks
],
rules: {
"no-undef": "off", // TypeScript handles this
"no-use-before-define": "off", // Disable the base rule
"@typescript-eslint/no-use-before-define": [
"error",
{ functions: false, variables: false, classes: true, typedefs: true },
],
"no-shadow": "off", // Disable the base rule
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
ignoreRestSiblings: true,
caughtErrors: "none",
argsIgnorePattern: "^_",
},
],
"import/prefer-default-export": "off",
"no-console": "off",
},
};
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file controls which users are required reviewers for given segments of the repository

* @inrupt/engineering @inrupt/inrupt-professional-services
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

16 changes: 16 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Audit

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
audit:
uses: inrupt/typescript-sdk-tools/.github/workflows/reusable-audit.yml@v3
secrets:
WEBHOOK_E2E_FAILURE: "REQUIRED BUT ONLY USED FOR SCHEDULED RUNS"
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Wallet Frontend Application CI

on:
pull_request: {}
push:
branches: [ main ]

env:
CI: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: inrupt/typescript-sdk-tools/.github/workflows/reusable-lint.yml@v3

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
node-version: [ "20.x" ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci

sonarqube:
name: run sonarqube
if: ${{ github.actor != 'dependabot[bot]' }}
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarQube Scan
uses: kitabisa/[email protected]
with:
host: ${{ secrets.SONARQUBE_HOST }}
login: ${{ secrets.SONARQUBE_DEV_INRUPT_COM_GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
node_modules/
.expo/
dist/
/build/
ios
android/app/debug
android/app/profile
android/app/release
artifacts/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
.idea
android/.gradle
# macOS
.DS_Store
.env.local

# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli

.env
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
23 changes: 23 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"embeddedLanguageFormatting": "auto",
"vueIndentScriptAndStyle": false,
"parser": "typescript"
}
Loading

0 comments on commit c47b03a

Please sign in to comment.