Skip to content

Commit b0eade6

Browse files
authored
Project Structure (#5)
1 parent 03b7c9c commit b0eade6

File tree

16 files changed

+5772
-0
lines changed

16 files changed

+5772
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v6
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Cache dependencies
13+
id: yarn-cache
14+
uses: actions/cache@v4
15+
with:
16+
path: |
17+
**/node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
23+
- name: Enable Yarn
24+
shell: bash
25+
run: corepack enable
26+
- name: Install dependencies
27+
if: steps.yarn-cache.outputs.cache-hit != 'true'
28+
run: yarn install --immutable
29+
shell: bash

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
pull_request:
7+
branches:
8+
- develop
9+
10+
jobs:
11+
12+
build-library:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
18+
- name: Setup
19+
uses: ./.github/actions/setup
20+
21+
- name: Build package
22+
run: yarn packCordova

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
32+
# Android/IJ
33+
#
34+
.classpath
35+
.cxx
36+
.gradle
37+
.idea
38+
.project
39+
.settings
40+
local.properties
41+
android.iml
42+
43+
# Cocoapods
44+
#
45+
Pods
46+
Podfile.lock
47+
48+
# node.js
49+
#
50+
node_modules/
51+
npm-debug.log
52+
yarn-debug.log
53+
yarn-error.log
54+
55+
# Yarn and monorepo
56+
.yarn
57+
yarn/*
58+
!.yarn/releases
59+
!.yarn/plugins
60+
!.yarn/patches
61+
!.yarn/sdks
62+
!.yarn/versions
63+
.pnp.*
64+
65+
# Synced shared native code
66+
packages/cordova/native_shared
67+
68+
# Cordova artifacts
69+
packages/lib-cordova/lib/
70+
packages/lib-cordova/native_shared
71+
72+
# lib artifacts
73+
*.tgz

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

.yarnrc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
nodeLinker: node-modules
2+
enableImmutableInstalls: false
3+
checksumBehavior: update
4+
nmHoistingLimits: workspaces
5+
6+

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "0.0.0",
3+
"private": true,
4+
"workspaces": [
5+
"testapp-cordova",
6+
"packages/*"
7+
],
8+
"scripts": {
9+
"dev": "rollup -c rollup.config.js -w",
10+
"packCordova": "cd packages/lib-cordova && yarn pack"
11+
},
12+
"devDependencies": {
13+
"rollup": "^4.52.3",
14+
"rollup-plugin-dts": "^6.2.3",
15+
"rollup-plugin-typescript2": "^0.36.0",
16+
"typescript": "^5.9.2"
17+
},
18+
"packageManager": "yarn@4.3.1+sha512.af78262d7d125afbfeed740602ace8c5e4405cd7f4735c08feb327286b2fdb2390fbca01589bfd1f50b1240548b74806767f5a063c94b67e431aabd0d86f7774"
19+
}

packages/lib-cordova/package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "cordova-digital-onboarding",
3+
"title": "Digital Onboarding Cordova Plugin",
4+
"version": "1.0.0",
5+
"description": "TODO",
6+
"main": "lib/index.js",
7+
"types": "lib/index.d.ts",
8+
"type": "commonjs",
9+
"files": [
10+
"README.md",
11+
"LICENSE",
12+
"lib/index.js",
13+
"lib/index.d.ts",
14+
"plugin.xml"
15+
],
16+
"scripts": {
17+
"prepack": "cd ../.. && rollup -c rollup.config.js && cp README.md LICENSE packages/lib-cordova/",
18+
"postpack": "rm README.md LICENSE"
19+
},
20+
"repository": {
21+
"type": "git",
22+
"url": "git+https://github.com/wultra/digital-onboarding-js.git"
23+
},
24+
"author": "Wultra <support@wultra.com> (https://wultra.com)",
25+
"license": "Apache-2.0",
26+
"homepage": "https://www.wultra.com/mobile-security-suite",
27+
"devDependencies": {
28+
"cordova": "^12.0.0",
29+
"cordova-powerauth-mobile-sdk": "^4.1.0",
30+
"cordova-powerauth-networking": "^1.0.0",
31+
"typescript": "^5.9.2"
32+
}
33+
}

packages/lib-cordova/plugin.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-digital-onboarding" version="1.0.0">
3+
<name>Digital Onboarding Cordova Plugin</name>
4+
<description>TODO</description>
5+
<license>Apache 2.0</license>
6+
<keywords>cordova,digital-onboarding</keywords>
7+
8+
<!-- JS MODULE -->
9+
<js-module name="WultraDigitalOnboarding" src="lib/index.js">
10+
<!-- We want to expose all public APIs globally (on the window object) -->
11+
<merges target="window" />
12+
</js-module>
13+
14+
<!-- ENGINES -->
15+
<engines>
16+
<engine name="cordova" version=">=12.0.0"/>
17+
<engine name="cordova-android" version=">=12.0.0" />
18+
<engine name="cordova-ios" version=">=7.0.0" />
19+
</engines>
20+
21+
<!-- DEPENDENCIES -->
22+
<dependency id="cordova-powerauth-networking" version="1.0.0" />
23+
24+
<!-- PLATFORMS -->
25+
<platform name="android" kotlin="1.9.22">
26+
</platform>
27+
<platform name="ios">
28+
</platform>
29+
</plugin>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { BaseTest } from '../../lib-shared/src/BaseTest';
2+
3+
export class CordovaTest extends BaseTest {
4+
// Cordova-specific test functionality goes here
5+
}

packages/lib-cordova/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
export * from './CordovaTest';

0 commit comments

Comments
 (0)