cordova-plugin-unvired-universal-sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/aar/README.md +3 -0
- package/aar/Unvired_Kernel_Android.aar +0 -0
- package/aar/Unvired_Kernel_HTML5_Android.aar +0 -0
- package/package.json +69 -0
- package/plugin.xml +23 -0
- package/src/android/build.gradle +35 -0
- package/src/android/xml/provider_paths.xml +21 -0
- package/src/browser/UnviredPluginProxy.js +2430 -0
- package/src/browser/bootstrap.min.js +17 -0
- package/src/browser/codemirror.js +9755 -0
- package/src/browser/jquery-3.2.1.js +10253 -0
- package/src/browser/sql-wasm.wasm +0 -0
- package/src/browser/sql.js +203 -0
- package/src/browser/src_index_worker_js.unvired-db-worker.js +231 -0
- package/src/browser/unvired-db-worker.js +166 -0
- package/src/browser/vendors-node_modules_comlink_dist_esm_comlink_mjs.unvired-db-worker.js +22 -0
- package/src/ios/AttachmentPlugin.h +21 -0
- package/src/ios/AttachmentPlugin.m +180 -0
- package/src/ios/DataStructureHelper.h +28 -0
- package/src/ios/DataStructureHelper.m +188 -0
- package/src/ios/IOSAuthPlugin.h +14 -0
- package/src/ios/IOSAuthPlugin.m +13 -0
- package/src/ios/IOSDatabasePlugin.h +28 -0
- package/src/ios/IOSDatabasePlugin.m +253 -0
- package/src/ios/IOSFWSettingsPlugin.h +65 -0
- package/src/ios/IOSFWSettingsPlugin.m +363 -0
- package/src/ios/IOSLoggerPlugin.h +34 -0
- package/src/ios/IOSLoggerPlugin.m +198 -0
- package/src/ios/IOSLoginPlugin.h +29 -0
- package/src/ios/IOSLoginPlugin.m +480 -0
- package/src/ios/IOSProxyPlugin.h +21 -0
- package/src/ios/IOSProxyPlugin.m +172 -0
- package/src/ios/IOSSyncEnginePlugin.h +54 -0
- package/src/ios/IOSSyncEnginePlugin.m +847 -0
- package/src/ios/PluginConstants.h +195 -0
- package/src/ios/PluginHelper.h +29 -0
- package/src/ios/PluginHelper.m +74 -0
- package/src/ios/SyncHTML5Response.h +50 -0
- package/src/ios/SyncHTML5Response.m +68 -0
- package/www/applicationMeta/applicationMetadataParser.ts +285 -0
- package/www/applicationMeta/fieldConstants.ts +92 -0
- package/www/attachment/attachmentHelper.ts +326 -0
- package/www/attachment/attachmentQHelper.ts +158 -0
- package/www/attachment/attachmentService.ts +259 -0
- package/www/authenticationService.ts +746 -0
- package/www/bootstrap.min.js +17 -0
- package/www/codemirror.js +9755 -0
- package/www/database/appDatabaseManager.ts +54 -0
- package/www/database/databaseManager.ts +616 -0
- package/www/helper/dbCreateTablesManager.ts +354 -0
- package/www/helper/frameworkHelper.ts +127 -0
- package/www/helper/frameworkSettingsManager.ts +287 -0
- package/www/helper/getMessageTimerManager.ts +81 -0
- package/www/helper/httpConnection.ts +1051 -0
- package/www/helper/logger.ts +312 -0
- package/www/helper/notificationListnerHelper.ts +56 -0
- package/www/helper/passcodeGenerator.ts +61 -0
- package/www/helper/reconciler.ts +1062 -0
- package/www/helper/serverResponseHandler.ts +677 -0
- package/www/helper/serviceConstants.ts +254 -0
- package/www/helper/settingsHelper.ts +386 -0
- package/www/helper/status.ts +83 -0
- package/www/helper/syncInputDataManager.ts +205 -0
- package/www/helper/unviredAccount.ts +104 -0
- package/www/helper/unviredAccountManager.ts +120 -0
- package/www/helper/urlService.ts +43 -0
- package/www/helper/userSettingsManager.ts +172 -0
- package/www/helper/utils.ts +110 -0
- package/www/inbox/downloadMessageService.ts +270 -0
- package/www/inbox/inboxHelper.ts +132 -0
- package/www/inbox/inboxService.ts +223 -0
- package/www/jquery-3.2.1.js +10253 -0
- package/www/kernel.js +1380 -0
- package/www/outbox/outboxAttachmentManager.ts +152 -0
- package/www/outbox/outboxHelper.ts +67 -0
- package/www/outbox/outboxService.ts +519 -0
- package/www/sql-wasm.wasm +0 -0
- package/www/sql.js +209 -0
- package/www/subtract.ts +5 -0
- package/www/sum.ts +4 -0
- package/www/syncEngine.ts +687 -0
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# cordova-plugin-unvired-universal-sdk
|
|
2
|
+
This cordova plugin is published as a [npm package](https://www.npmjs.com/package/cordova-plugin-unvired-universal-sdk)
|
|
3
|
+
|
|
4
|
+
# Using this plugin
|
|
5
|
+
1. Uninstall the existing dependency plugins (if any)
|
|
6
|
+
```
|
|
7
|
+
$ cordova plugin rm cordova-plugin-device --force
|
|
8
|
+
$ cordova plugin rm cordova-plugin-file --force
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
2. Uninstall the previous version (if any) of the plugin
|
|
12
|
+
```
|
|
13
|
+
$ cordova plugin rm cordova-plugin-unvired-universal-sdk
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
3. Install this plugin
|
|
17
|
+
```
|
|
18
|
+
$ cordova plugin add cordova-plugin-unvired-universal-sdk
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
4. Verify the installation by checking the version number with package.json file or by listing the Cordova plugins installed for your project
|
|
22
|
+
```
|
|
23
|
+
$ cordova plugin ls // List Cordova plugins
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
5. Make sure that the following JS dependencies are updated in index.html file. These JS dependencies should have been copied to the respective locations when you install the plugin.
|
|
27
|
+
```
|
|
28
|
+
<script src="assets/js/codemirror.js"></script>
|
|
29
|
+
<script src="assets/js/sql.js"></script>
|
|
30
|
+
<script src="assets/js/jquery-3.2.1.js"></script>
|
|
31
|
+
<script src="assets/js/unvired-db-worker.js"></script>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
# Building this plugin
|
|
35
|
+
|
|
36
|
+
This contains source code for Unvired Cordova Plugin. In order to test this plugin locally, generate a debug version by building using build-debug.xml
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
$ ant -buildfile build-debug.xml
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This produces the output in a folder called cordova-plugin-unvired-universal-sdk.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Adding a new method.
|
|
46
|
+
|
|
47
|
+
Any new method should have the implementation in www/kernel.js file. Accordingly, all the native cores should have an implementation for this method.
|
|
48
|
+
|
|
49
|
+
# Exposing the new method to ionic apps.
|
|
50
|
+
|
|
51
|
+
This plugin is repackaged as ionic native plugin.
|
|
52
|
+
https://ionicframework.com/docs/native/unvired-cordova-sdk
|
|
53
|
+
|
|
54
|
+
The source code of the ionic native plugin is located here:
|
|
55
|
+
https://github.com/ionic-team/ionic-native/tree/master/src/%40ionic-native/plugins/unvired-cordova-sdk
|
|
56
|
+
|
|
57
|
+
The source contains a single file, index.ts which contains declarations of all the functions available in www/kernel.js file of this repo. To expose newly added methods in kernel.js, you will have to fork https://github.com/ionic-team/ionic-native repo to your GitHub repo, make changes and submit a pull request.
|
|
58
|
+
|
|
59
|
+
Once the Pull request is approved, the new method should be available publicly for all the users.
|
package/aar/README.md
ADDED
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cordova-plugin-unvired-universal-sdk",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Unvired Cordova Plugin",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "webpack -c webpack.config.js",
|
|
7
|
+
"dev": "webpack -c webpack.config.js --watch",
|
|
8
|
+
"test": "jest"
|
|
9
|
+
},
|
|
10
|
+
"cordova": {
|
|
11
|
+
"id": "cordova-plugin-unvired-universal-sdk",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"electron"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ecosystem:cordova",
|
|
18
|
+
"cordova-electron"
|
|
19
|
+
],
|
|
20
|
+
"author": "Unvired Inc.",
|
|
21
|
+
"license": "UNLICENSED",
|
|
22
|
+
"contributors": [
|
|
23
|
+
{
|
|
24
|
+
"name": "Venkadesh P",
|
|
25
|
+
"email": "venkadesh.p@unvired.com",
|
|
26
|
+
"url": "http://unvired.com"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Srinidhi Rao",
|
|
30
|
+
"email": "srinidhi.rao@unvired.com",
|
|
31
|
+
"url": "http://unvired.com"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "Srini Subramanian",
|
|
35
|
+
"email": "srini@unvired.com",
|
|
36
|
+
"url": "http://unvired.com"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Mallikarjuna G S",
|
|
40
|
+
"email": "mallikarjuna.gs@unvired.com",
|
|
41
|
+
"url": "http://unvired.com"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@babel/preset-env": "^7.24.4",
|
|
46
|
+
"@types/node": "^20.12.2",
|
|
47
|
+
"babel-loader": "^9.1.3",
|
|
48
|
+
"copy-webpack-plugin": "^12.0.2",
|
|
49
|
+
"generate-package-json-webpack-plugin": "^2.6.0",
|
|
50
|
+
"remove-files-webpack-plugin": "^1.5.0",
|
|
51
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
52
|
+
"ts-jest": "^29.1.2",
|
|
53
|
+
"ts-loader": "^9.5.1",
|
|
54
|
+
"typescript": "^5.4.3",
|
|
55
|
+
"webpack": "^5.91.0",
|
|
56
|
+
"webpack-cli": "^5.1.4",
|
|
57
|
+
"webpack-shell-plugin-next": "^2.3.1"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@babel/preset-typescript": "^7.24.1",
|
|
61
|
+
"child_process": "^1.0.2",
|
|
62
|
+
"crypto-js": "^4.2.0",
|
|
63
|
+
"hi-base32": "^0.5.1",
|
|
64
|
+
"os-browserify": "^0.3.0",
|
|
65
|
+
"require-fool-webpack": "^3.0.0",
|
|
66
|
+
"rxjs": "^7.8.1",
|
|
67
|
+
"uuid": "^9.0.1"
|
|
68
|
+
}
|
|
69
|
+
}
|
package/plugin.xml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
+
<plugin id="cordova-plugin-unvired-universal-sdk" version="1.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
<name>UnviredSDK</name>
|
|
4
|
+
<dependency id="cordova-plugin-device" version="^3.0.0" />
|
|
5
|
+
<dependency id="cordova-plugin-unvired-electron-db" version="0.0.14" />
|
|
6
|
+
<dependency id="cordova-plugin-file" url="https://github.com/srinidhirao/cordova-plugin-file.git"/>
|
|
7
|
+
|
|
8
|
+
<js-module name="UnviredSDK" src="www/kernel.js">
|
|
9
|
+
<clobbers target="window.ump" />
|
|
10
|
+
</js-module>
|
|
11
|
+
|
|
12
|
+
<platform name="electron">
|
|
13
|
+
</platform>
|
|
14
|
+
|
|
15
|
+
<platform name="browser">
|
|
16
|
+
</platform>
|
|
17
|
+
|
|
18
|
+
<platform name="android">
|
|
19
|
+
</platform>
|
|
20
|
+
|
|
21
|
+
<platform name="ios">
|
|
22
|
+
</platform>
|
|
23
|
+
</plugin>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
repositories {
|
|
2
|
+
// Required for build
|
|
3
|
+
jcenter()
|
|
4
|
+
flatDir {
|
|
5
|
+
dirs 'src/main/libs'
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
android {
|
|
10
|
+
packagingOptions {
|
|
11
|
+
exclude 'META-INF/NOTICE'
|
|
12
|
+
exclude 'META-INF/LICENSE'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
android {
|
|
17
|
+
compileSdkVersion 28
|
|
18
|
+
|
|
19
|
+
defaultConfig {
|
|
20
|
+
minSdkVersion 16
|
|
21
|
+
targetSdkVersion 28
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
|
|
26
|
+
lintOptions {
|
|
27
|
+
abortOnError false
|
|
28
|
+
}*/
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
dependencies {
|
|
33
|
+
|
|
34
|
+
implementation fileTree(dir: 'src/main/libs', include: ['*.aar'])
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!--
|
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
or more contributor license agreements. See the NOTICE file
|
|
5
|
+
distributed with this work for additional information
|
|
6
|
+
regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
to you under the Apache License, Version 2.0 (the
|
|
8
|
+
"License"); you may not use this file except in compliance
|
|
9
|
+
with the License. You may obtain a copy of the License at
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
Unless required by applicable law or agreed to in writing,
|
|
12
|
+
software distributed under the License is distributed on an
|
|
13
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
KIND, either express or implied. See the License for the
|
|
15
|
+
specific language governing permissions and limitations
|
|
16
|
+
under the License.
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
|
20
|
+
<external-path name="external_files" path="."/>
|
|
21
|
+
</paths>
|