react-native-mosquito-transport 0.0.48 → 0.0.49

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 (96) hide show
  1. package/CONTRIBUTING.md +37 -19
  2. package/MosquitoTransport.podspec +20 -0
  3. package/android/build.gradle +32 -42
  4. package/android/src/main/AndroidManifest.xml +1 -3
  5. package/android/src/main/java/com/mosquitotransport/MosquitoTransportModule.kt +101 -0
  6. package/android/src/main/java/com/mosquitotransport/MosquitoTransportPackage.kt +31 -0
  7. package/android/src/main/java/com/mosquitotransport/utils/FileUploader.kt +106 -0
  8. package/android/src/main/java/com/mosquitotransport/utils/UploadCallback.kt +7 -0
  9. package/ios/MosquitoTransport-Bridging-Header.h +1 -0
  10. package/ios/MosquitoTransport.h +6 -0
  11. package/ios/MosquitoTransport.mm +81 -0
  12. package/ios/{Mosquitodb.swift → MosquitoTransport.swift} +39 -42
  13. package/package.json +10 -2
  14. package/src/NativeMosquitoTransport.js +24 -0
  15. package/src/helpers/fs_manager.js +1 -1
  16. package/src/helpers/utils.js +2 -4
  17. package/src/helpers/variables.js +2 -1
  18. package/src/index.d.ts +1 -1
  19. package/src/index.js +15 -10
  20. package/src/products/auth/accessor.js +118 -94
  21. package/src/products/auth/index.js +7 -6
  22. package/src/products/database/index.js +1 -0
  23. package/src/products/storage/index.js +9 -23
  24. package/.jshintignore +0 -4
  25. package/.jshintrc +0 -16
  26. package/TODO +0 -35
  27. package/android/gradle.properties +0 -5
  28. package/android/src/main/java/com/mosquitodb/MosquitodbModule.java +0 -82
  29. package/android/src/main/java/com/mosquitodb/MosquitodbPackage.java +0 -28
  30. package/android/src/main/java/com/mosquitodb/utils/FileUploader.java +0 -101
  31. package/android/src/main/java/com/mosquitodb/utils/UploadCallback.java +0 -7
  32. package/example/.bundle/config +0 -2
  33. package/example/.node-version +0 -1
  34. package/example/.watchmanconfig +0 -1
  35. package/example/Gemfile +0 -6
  36. package/example/android/app/build.gradle +0 -170
  37. package/example/android/app/debug.keystore +0 -0
  38. package/example/android/app/proguard-rules.pro +0 -10
  39. package/example/android/app/src/debug/AndroidManifest.xml +0 -13
  40. package/example/android/app/src/debug/java/com/mosquitodbexample/ReactNativeFlipper.java +0 -75
  41. package/example/android/app/src/main/AndroidManifest.xml +0 -25
  42. package/example/android/app/src/main/java/com/mosquitodbexample/MainActivity.java +0 -35
  43. package/example/android/app/src/main/java/com/mosquitodbexample/MainApplication.java +0 -62
  44. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  45. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  46. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  47. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  48. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  49. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  50. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  51. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  52. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  53. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  54. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  55. package/example/android/app/src/main/res/values/strings.xml +0 -3
  56. package/example/android/app/src/main/res/values/styles.xml +0 -9
  57. package/example/android/app/src/release/java/com/mosquitodbexample/ReactNativeFlipper.java +0 -20
  58. package/example/android/build.gradle +0 -21
  59. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  60. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  61. package/example/android/gradle.properties +0 -44
  62. package/example/android/gradlew +0 -234
  63. package/example/android/gradlew.bat +0 -89
  64. package/example/android/settings.gradle +0 -4
  65. package/example/app.json +0 -4
  66. package/example/babel.config.js +0 -17
  67. package/example/index.js +0 -5
  68. package/example/ios/.xcode.env +0 -11
  69. package/example/ios/File.swift +0 -6
  70. package/example/ios/MosquitodbExample/AppDelegate.h +0 -6
  71. package/example/ios/MosquitodbExample/AppDelegate.mm +0 -36
  72. package/example/ios/MosquitodbExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  73. package/example/ios/MosquitodbExample/Images.xcassets/Contents.json +0 -6
  74. package/example/ios/MosquitodbExample/Info.plist +0 -55
  75. package/example/ios/MosquitodbExample/LaunchScreen.storyboard +0 -47
  76. package/example/ios/MosquitodbExample/main.m +0 -10
  77. package/example/ios/MosquitodbExample-Bridging-Header.h +0 -3
  78. package/example/ios/MosquitodbExample.xcodeproj/project.pbxproj +0 -703
  79. package/example/ios/MosquitodbExample.xcodeproj/xcshareddata/xcschemes/MosquitodbExample.xcscheme +0 -88
  80. package/example/ios/MosquitodbExample.xcworkspace/contents.xcworkspacedata +0 -10
  81. package/example/ios/MosquitodbExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  82. package/example/ios/MosquitodbExample.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +0 -8
  83. package/example/ios/MosquitodbExample.xcworkspace/xcuserdata/anthony.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  84. package/example/ios/MosquitodbExample.xcworkspace/xcuserdata/anthony.xcuserdatad/WorkspaceSettings.xcsettings +0 -14
  85. package/example/ios/MosquitodbExampleTests/Info.plist +0 -24
  86. package/example/ios/MosquitodbExampleTests/MosquitodbExampleTests.m +0 -66
  87. package/example/ios/Podfile +0 -60
  88. package/example/metro.config.js +0 -40
  89. package/example/package.json +0 -22
  90. package/example/react-native.config.js +0 -10
  91. package/example/src/App.tsx +0 -31
  92. package/ios/Mosquitodb-Bridging-Header.h +0 -2
  93. package/ios/Mosquitodb.m +0 -22
  94. package/ios/Mosquitodb.xcodeproj/project.pbxproj +0 -283
  95. package/ios/Mosquitodb.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  96. package/react-native-mosquitodb.podspec +0 -35
@@ -1,89 +0,0 @@
1
- @rem
2
- @rem Copyright 2015 the original author or authors.
3
- @rem
4
- @rem Licensed under the Apache License, Version 2.0 (the "License");
5
- @rem you may not use this file except in compliance with the License.
6
- @rem You may obtain a copy of the License at
7
- @rem
8
- @rem https://www.apache.org/licenses/LICENSE-2.0
9
- @rem
10
- @rem Unless required by applicable law or agreed to in writing, software
11
- @rem distributed under the License is distributed on an "AS IS" BASIS,
12
- @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- @rem See the License for the specific language governing permissions and
14
- @rem limitations under the License.
15
- @rem
16
-
17
- @if "%DEBUG%" == "" @echo off
18
- @rem ##########################################################################
19
- @rem
20
- @rem Gradle startup script for Windows
21
- @rem
22
- @rem ##########################################################################
23
-
24
- @rem Set local scope for the variables with windows NT shell
25
- if "%OS%"=="Windows_NT" setlocal
26
-
27
- set DIRNAME=%~dp0
28
- if "%DIRNAME%" == "" set DIRNAME=.
29
- set APP_BASE_NAME=%~n0
30
- set APP_HOME=%DIRNAME%
31
-
32
- @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
- for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
-
35
- @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
- set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
-
38
- @rem Find java.exe
39
- if defined JAVA_HOME goto findJavaFromJavaHome
40
-
41
- set JAVA_EXE=java.exe
42
- %JAVA_EXE% -version >NUL 2>&1
43
- if "%ERRORLEVEL%" == "0" goto execute
44
-
45
- echo.
46
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
- echo.
48
- echo Please set the JAVA_HOME variable in your environment to match the
49
- echo location of your Java installation.
50
-
51
- goto fail
52
-
53
- :findJavaFromJavaHome
54
- set JAVA_HOME=%JAVA_HOME:"=%
55
- set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
-
57
- if exist "%JAVA_EXE%" goto execute
58
-
59
- echo.
60
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
- echo.
62
- echo Please set the JAVA_HOME variable in your environment to match the
63
- echo location of your Java installation.
64
-
65
- goto fail
66
-
67
- :execute
68
- @rem Setup the command line
69
-
70
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
-
72
-
73
- @rem Execute Gradle
74
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
-
76
- :end
77
- @rem End local scope for the variables with windows NT shell
78
- if "%ERRORLEVEL%"=="0" goto mainEnd
79
-
80
- :fail
81
- rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
- rem the _cmd.exe /c_ return code!
83
- if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
- exit /b 1
85
-
86
- :mainEnd
87
- if "%OS%"=="Windows_NT" endlocal
88
-
89
- :omega
@@ -1,4 +0,0 @@
1
- rootProject.name = 'MosquitodbExample'
2
- apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3
- include ':app'
4
- includeBuild('../node_modules/react-native-gradle-plugin')
package/example/app.json DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "name": "MosquitodbExample",
3
- "displayName": "MosquitodbExample"
4
- }
@@ -1,17 +0,0 @@
1
- const path = require('path');
2
- const pak = require('../package.json');
3
-
4
- module.exports = {
5
- presets: ['module:metro-react-native-babel-preset'],
6
- plugins: [
7
- [
8
- 'module-resolver',
9
- {
10
- extensions: ['.tsx', '.ts', '.js', '.json'],
11
- alias: {
12
- [pak.name]: path.join(__dirname, '..', pak.source),
13
- },
14
- },
15
- ],
16
- ],
17
- };
package/example/index.js DELETED
@@ -1,5 +0,0 @@
1
- import { AppRegistry } from 'react-native';
2
- import App from './src/App';
3
- import { name as appName } from './app.json';
4
-
5
- AppRegistry.registerComponent(appName, () => App);
@@ -1,11 +0,0 @@
1
- # This `.xcode.env` file is versioned and is used to source the environment
2
- # used when running script phases inside Xcode.
3
- # To customize your local environment, you can create an `.xcode.env.local`
4
- # file that is not versioned.
5
-
6
- # NODE_BINARY variable contains the PATH to the node executable.
7
- #
8
- # Customize the NODE_BINARY variable here.
9
- # For example, to use nvm with brew, add the following line
10
- # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
- export NODE_BINARY=$(command -v node)
@@ -1,6 +0,0 @@
1
- //
2
- // File.swift
3
- // MosquitodbExample
4
- //
5
-
6
- import Foundation
@@ -1,6 +0,0 @@
1
- #import <RCTAppDelegate.h>
2
- #import <UIKit/UIKit.h>
3
-
4
- @interface AppDelegate : RCTAppDelegate
5
-
6
- @end
@@ -1,36 +0,0 @@
1
- #import "AppDelegate.h"
2
-
3
- #import <React/RCTBundleURLProvider.h>
4
-
5
- @implementation AppDelegate
6
-
7
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8
- {
9
- self.moduleName = @"MosquitodbExample";
10
- // You can add your custom initial props in the dictionary below.
11
- // They will be passed down to the ViewController used by React Native.
12
- self.initialProps = @{};
13
-
14
- return [super application:application didFinishLaunchingWithOptions:launchOptions];
15
- }
16
-
17
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18
- {
19
- #if DEBUG
20
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
21
- #else
22
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23
- #endif
24
- }
25
-
26
- /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
27
- ///
28
- /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
29
- /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
30
- /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
31
- - (BOOL)concurrentRootEnabled
32
- {
33
- return true;
34
- }
35
-
36
- @end
@@ -1,53 +0,0 @@
1
- {
2
- "images" : [
3
- {
4
- "idiom" : "iphone",
5
- "scale" : "2x",
6
- "size" : "20x20"
7
- },
8
- {
9
- "idiom" : "iphone",
10
- "scale" : "3x",
11
- "size" : "20x20"
12
- },
13
- {
14
- "idiom" : "iphone",
15
- "scale" : "2x",
16
- "size" : "29x29"
17
- },
18
- {
19
- "idiom" : "iphone",
20
- "scale" : "3x",
21
- "size" : "29x29"
22
- },
23
- {
24
- "idiom" : "iphone",
25
- "scale" : "2x",
26
- "size" : "40x40"
27
- },
28
- {
29
- "idiom" : "iphone",
30
- "scale" : "3x",
31
- "size" : "40x40"
32
- },
33
- {
34
- "idiom" : "iphone",
35
- "scale" : "2x",
36
- "size" : "60x60"
37
- },
38
- {
39
- "idiom" : "iphone",
40
- "scale" : "3x",
41
- "size" : "60x60"
42
- },
43
- {
44
- "idiom" : "ios-marketing",
45
- "scale" : "1x",
46
- "size" : "1024x1024"
47
- }
48
- ],
49
- "info" : {
50
- "author" : "xcode",
51
- "version" : 1
52
- }
53
- }
@@ -1,6 +0,0 @@
1
- {
2
- "info" : {
3
- "version" : 1,
4
- "author" : "xcode"
5
- }
6
- }
@@ -1,55 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CFBundleDevelopmentRegion</key>
6
- <string>en</string>
7
- <key>CFBundleDisplayName</key>
8
- <string>MosquitodbExample</string>
9
- <key>CFBundleExecutable</key>
10
- <string>$(EXECUTABLE_NAME)</string>
11
- <key>CFBundleIdentifier</key>
12
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
- <key>CFBundleInfoDictionaryVersion</key>
14
- <string>6.0</string>
15
- <key>CFBundleName</key>
16
- <string>$(PRODUCT_NAME)</string>
17
- <key>CFBundlePackageType</key>
18
- <string>APPL</string>
19
- <key>CFBundleShortVersionString</key>
20
- <string>$(MARKETING_VERSION)</string>
21
- <key>CFBundleSignature</key>
22
- <string>????</string>
23
- <key>CFBundleVersion</key>
24
- <string>$(CURRENT_PROJECT_VERSION)</string>
25
- <key>LSRequiresIPhoneOS</key>
26
- <true/>
27
- <key>NSAppTransportSecurity</key>
28
- <dict>
29
- <key>NSExceptionDomains</key>
30
- <dict>
31
- <key>localhost</key>
32
- <dict>
33
- <key>NSExceptionAllowsInsecureHTTPLoads</key>
34
- <true/>
35
- </dict>
36
- </dict>
37
- </dict>
38
- <key>NSLocationWhenInUseUsageDescription</key>
39
- <string></string>
40
- <key>UILaunchStoryboardName</key>
41
- <string>LaunchScreen</string>
42
- <key>UIRequiredDeviceCapabilities</key>
43
- <array>
44
- <string>armv7</string>
45
- </array>
46
- <key>UISupportedInterfaceOrientations</key>
47
- <array>
48
- <string>UIInterfaceOrientationPortrait</string>
49
- <string>UIInterfaceOrientationLandscapeLeft</string>
50
- <string>UIInterfaceOrientationLandscapeRight</string>
51
- </array>
52
- <key>UIViewControllerBasedStatusBarAppearance</key>
53
- <false/>
54
- </dict>
55
- </plist>
@@ -1,47 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
- <device id="retina4_7" orientation="portrait" appearance="light"/>
4
- <dependencies>
5
- <deployment identifier="iOS"/>
6
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7
- <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9
- </dependencies>
10
- <scenes>
11
- <!--View Controller-->
12
- <scene sceneID="EHf-IW-A2E">
13
- <objects>
14
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
15
- <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
16
- <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
17
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18
- <subviews>
19
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MosquitodbExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
20
- <rect key="frame" x="0.0" y="202" width="375" height="43"/>
21
- <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
22
- <nil key="highlightedColor"/>
23
- </label>
24
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="MN2-I3-ftu">
25
- <rect key="frame" x="0.0" y="626" width="375" height="21"/>
26
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
27
- <nil key="highlightedColor"/>
28
- </label>
29
- </subviews>
30
- <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
31
- <constraints>
32
- <constraint firstItem="Bcu-3y-fUS" firstAttribute="bottom" secondItem="MN2-I3-ftu" secondAttribute="bottom" constant="20" id="OZV-Vh-mqD"/>
33
- <constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
34
- <constraint firstItem="MN2-I3-ftu" firstAttribute="centerX" secondItem="Bcu-3y-fUS" secondAttribute="centerX" id="akx-eg-2ui"/>
35
- <constraint firstItem="MN2-I3-ftu" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" id="i1E-0Y-4RG"/>
36
- <constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
37
- <constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" symbolic="YES" id="x7j-FC-K8j"/>
38
- </constraints>
39
- <viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
40
- </view>
41
- </viewController>
42
- <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
43
- </objects>
44
- <point key="canvasLocation" x="52.173913043478265" y="375"/>
45
- </scene>
46
- </scenes>
47
- </document>
@@ -1,10 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
-
3
- #import "AppDelegate.h"
4
-
5
- int main(int argc, char *argv[])
6
- {
7
- @autoreleasepool {
8
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9
- }
10
- }
@@ -1,3 +0,0 @@
1
- //
2
- // Use this file to import your target's public headers that you would like to expose to Swift.
3
- //