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.
Files changed (82) hide show
  1. package/README.md +59 -0
  2. package/aar/README.md +3 -0
  3. package/aar/Unvired_Kernel_Android.aar +0 -0
  4. package/aar/Unvired_Kernel_HTML5_Android.aar +0 -0
  5. package/package.json +69 -0
  6. package/plugin.xml +23 -0
  7. package/src/android/build.gradle +35 -0
  8. package/src/android/xml/provider_paths.xml +21 -0
  9. package/src/browser/UnviredPluginProxy.js +2430 -0
  10. package/src/browser/bootstrap.min.js +17 -0
  11. package/src/browser/codemirror.js +9755 -0
  12. package/src/browser/jquery-3.2.1.js +10253 -0
  13. package/src/browser/sql-wasm.wasm +0 -0
  14. package/src/browser/sql.js +203 -0
  15. package/src/browser/src_index_worker_js.unvired-db-worker.js +231 -0
  16. package/src/browser/unvired-db-worker.js +166 -0
  17. package/src/browser/vendors-node_modules_comlink_dist_esm_comlink_mjs.unvired-db-worker.js +22 -0
  18. package/src/ios/AttachmentPlugin.h +21 -0
  19. package/src/ios/AttachmentPlugin.m +180 -0
  20. package/src/ios/DataStructureHelper.h +28 -0
  21. package/src/ios/DataStructureHelper.m +188 -0
  22. package/src/ios/IOSAuthPlugin.h +14 -0
  23. package/src/ios/IOSAuthPlugin.m +13 -0
  24. package/src/ios/IOSDatabasePlugin.h +28 -0
  25. package/src/ios/IOSDatabasePlugin.m +253 -0
  26. package/src/ios/IOSFWSettingsPlugin.h +65 -0
  27. package/src/ios/IOSFWSettingsPlugin.m +363 -0
  28. package/src/ios/IOSLoggerPlugin.h +34 -0
  29. package/src/ios/IOSLoggerPlugin.m +198 -0
  30. package/src/ios/IOSLoginPlugin.h +29 -0
  31. package/src/ios/IOSLoginPlugin.m +480 -0
  32. package/src/ios/IOSProxyPlugin.h +21 -0
  33. package/src/ios/IOSProxyPlugin.m +172 -0
  34. package/src/ios/IOSSyncEnginePlugin.h +54 -0
  35. package/src/ios/IOSSyncEnginePlugin.m +847 -0
  36. package/src/ios/PluginConstants.h +195 -0
  37. package/src/ios/PluginHelper.h +29 -0
  38. package/src/ios/PluginHelper.m +74 -0
  39. package/src/ios/SyncHTML5Response.h +50 -0
  40. package/src/ios/SyncHTML5Response.m +68 -0
  41. package/www/applicationMeta/applicationMetadataParser.ts +285 -0
  42. package/www/applicationMeta/fieldConstants.ts +92 -0
  43. package/www/attachment/attachmentHelper.ts +326 -0
  44. package/www/attachment/attachmentQHelper.ts +158 -0
  45. package/www/attachment/attachmentService.ts +259 -0
  46. package/www/authenticationService.ts +746 -0
  47. package/www/bootstrap.min.js +17 -0
  48. package/www/codemirror.js +9755 -0
  49. package/www/database/appDatabaseManager.ts +54 -0
  50. package/www/database/databaseManager.ts +616 -0
  51. package/www/helper/dbCreateTablesManager.ts +354 -0
  52. package/www/helper/frameworkHelper.ts +127 -0
  53. package/www/helper/frameworkSettingsManager.ts +287 -0
  54. package/www/helper/getMessageTimerManager.ts +81 -0
  55. package/www/helper/httpConnection.ts +1051 -0
  56. package/www/helper/logger.ts +312 -0
  57. package/www/helper/notificationListnerHelper.ts +56 -0
  58. package/www/helper/passcodeGenerator.ts +61 -0
  59. package/www/helper/reconciler.ts +1062 -0
  60. package/www/helper/serverResponseHandler.ts +677 -0
  61. package/www/helper/serviceConstants.ts +254 -0
  62. package/www/helper/settingsHelper.ts +386 -0
  63. package/www/helper/status.ts +83 -0
  64. package/www/helper/syncInputDataManager.ts +205 -0
  65. package/www/helper/unviredAccount.ts +104 -0
  66. package/www/helper/unviredAccountManager.ts +120 -0
  67. package/www/helper/urlService.ts +43 -0
  68. package/www/helper/userSettingsManager.ts +172 -0
  69. package/www/helper/utils.ts +110 -0
  70. package/www/inbox/downloadMessageService.ts +270 -0
  71. package/www/inbox/inboxHelper.ts +132 -0
  72. package/www/inbox/inboxService.ts +223 -0
  73. package/www/jquery-3.2.1.js +10253 -0
  74. package/www/kernel.js +1380 -0
  75. package/www/outbox/outboxAttachmentManager.ts +152 -0
  76. package/www/outbox/outboxHelper.ts +67 -0
  77. package/www/outbox/outboxService.ts +519 -0
  78. package/www/sql-wasm.wasm +0 -0
  79. package/www/sql.js +209 -0
  80. package/www/subtract.ts +5 -0
  81. package/www/sum.ts +4 -0
  82. 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
@@ -0,0 +1,3 @@
1
+ Update current framework version no. here
2
+
3
+ Current version : R-4.000.0207
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>