@nebula-rn/cli 0.0.1 → 0.1.0

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 (115) hide show
  1. package/README.md +65 -0
  2. package/dist/create.js +12 -3
  3. package/package.json +20 -7
  4. package/templates/host/.eslintrc.js +7 -0
  5. package/templates/host/App.tsx +118 -0
  6. package/templates/host/Gemfile +16 -0
  7. package/templates/host/__tests__/App.test.tsx +13 -0
  8. package/templates/host/android/app/build.gradle +55 -0
  9. package/templates/host/android/app/debug.keystore +0 -0
  10. package/templates/host/android/app/proguard-rules.pro +10 -0
  11. package/templates/host/android/app/src/main/AndroidManifest.xml +54 -0
  12. package/templates/host/android/app/src/main/java/com/SuperApp/MainActivity.kt +28 -0
  13. package/templates/host/android/app/src/main/java/com/SuperApp/MainApplication.kt +35 -0
  14. package/templates/host/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  15. package/templates/host/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  16. package/templates/host/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  17. package/templates/host/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  18. package/templates/host/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  19. package/templates/host/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  20. package/templates/host/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  21. package/templates/host/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  22. package/templates/host/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  23. package/templates/host/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  24. package/templates/host/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  25. package/templates/host/android/app/src/main/res/values/strings.xml +3 -0
  26. package/templates/host/android/app/src/main/res/values/styles.xml +16 -0
  27. package/templates/host/android/build.gradle +21 -0
  28. package/templates/host/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  29. package/templates/host/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  30. package/templates/host/android/gradle.properties +44 -0
  31. package/templates/host/android/gradlew +251 -0
  32. package/templates/host/android/gradlew.bat +99 -0
  33. package/templates/host/android/settings.gradle +6 -0
  34. package/templates/host/app.json +4 -0
  35. package/templates/host/babel.config.js +4 -0
  36. package/templates/host/index.js +9 -0
  37. package/templates/host/ios/.xcode.env +11 -0
  38. package/templates/host/ios/Podfile +38 -0
  39. package/templates/host/ios/SuperApp/AppDelegate.swift +95 -0
  40. package/templates/host/ios/SuperApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  41. package/templates/host/ios/SuperApp/Images.xcassets/Contents.json +6 -0
  42. package/templates/host/ios/SuperApp/Info.plist +76 -0
  43. package/templates/host/ios/SuperApp/LaunchScreen.storyboard +47 -0
  44. package/templates/host/ios/SuperApp/PrivacyInfo.xcprivacy +48 -0
  45. package/templates/host/ios/SuperApp/SceneDelegate.swift +47 -0
  46. package/templates/host/ios/SuperApp/SuperApp-Bridging-Header.h +18 -0
  47. package/templates/host/ios/SuperApp-Bridging-Header.h +21 -0
  48. package/templates/host/ios/SuperApp.xcodeproj/project.pbxproj +500 -0
  49. package/templates/host/ios/SuperApp.xcodeproj/xcshareddata/xcschemes/RNTest.xcscheme +88 -0
  50. package/templates/host/jest.config.js +3 -0
  51. package/templates/host/metro.config.js +49 -0
  52. package/templates/host/package.json +66 -0
  53. package/templates/host/tsconfig.json +8 -0
  54. package/templates/miniapp/.watchmanconfig +1 -0
  55. package/templates/miniapp/app.json +12 -0
  56. package/templates/miniapp/babel.config.js +3 -0
  57. package/templates/miniapp/package.json +34 -0
  58. package/templates/miniapp/src/pages/home/index.tsx +122 -0
  59. package/templates/miniapp/src/pages/home/page.config.ts +10 -0
  60. package/templates/miniapp/tsconfig.json +11 -0
  61. package/templates/runner/.eslintrc.js +7 -0
  62. package/templates/runner/App.tsx +515 -0
  63. package/templates/runner/Gemfile +16 -0
  64. package/templates/runner/__tests__/App.test.tsx +13 -0
  65. package/templates/runner/android/app/build.gradle +55 -0
  66. package/templates/runner/android/app/debug.keystore +0 -0
  67. package/templates/runner/android/app/proguard-rules.pro +10 -0
  68. package/templates/runner/android/app/src/main/AndroidManifest.xml +60 -0
  69. package/templates/runner/android/app/src/main/java/com/devrunner/MainActivity.kt +14 -0
  70. package/templates/runner/android/app/src/main/java/com/devrunner/MainApplication.kt +35 -0
  71. package/templates/runner/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  72. package/templates/runner/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  73. package/templates/runner/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  74. package/templates/runner/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  75. package/templates/runner/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  76. package/templates/runner/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  77. package/templates/runner/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  78. package/templates/runner/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  79. package/templates/runner/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  80. package/templates/runner/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  81. package/templates/runner/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  82. package/templates/runner/android/app/src/main/res/values/strings.xml +3 -0
  83. package/templates/runner/android/app/src/main/res/values/styles.xml +16 -0
  84. package/templates/runner/android/build.gradle +21 -0
  85. package/templates/runner/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  86. package/templates/runner/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  87. package/templates/runner/android/gradle.properties +44 -0
  88. package/templates/runner/android/gradlew +251 -0
  89. package/templates/runner/android/gradlew.bat +99 -0
  90. package/templates/runner/android/settings.gradle +6 -0
  91. package/templates/runner/app.json +4 -0
  92. package/templates/runner/babel.config.js +4 -0
  93. package/templates/runner/index.js +9 -0
  94. package/templates/runner/ios/.xcode.env +11 -0
  95. package/templates/runner/ios/DevRunner/AppDelegate.swift +53 -0
  96. package/templates/runner/ios/DevRunner/DevRunner-Bridging-Header.h +19 -0
  97. package/templates/runner/ios/DevRunner/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  98. package/templates/runner/ios/DevRunner/Images.xcassets/Contents.json +6 -0
  99. package/templates/runner/ios/DevRunner/Info.plist +51 -0
  100. package/templates/runner/ios/DevRunner/LaunchScreen.storyboard +47 -0
  101. package/templates/runner/ios/DevRunner/PrivacyInfo.xcprivacy +48 -0
  102. package/templates/runner/ios/DevRunner/SceneDelegate.swift +21 -0
  103. package/templates/runner/ios/DevRunner-Bridging-Header.h +22 -0
  104. package/templates/runner/ios/DevRunner.xcodeproj/project.pbxproj +500 -0
  105. package/templates/runner/ios/DevRunner.xcodeproj/xcshareddata/xcschemes/DevRunner.xcscheme +88 -0
  106. package/templates/runner/ios/Podfile +38 -0
  107. package/templates/runner/jest.config.js +3 -0
  108. package/templates/runner/metro.config.js +3 -0
  109. package/templates/runner/package.json +38 -0
  110. package/templates/runner/src/RunnerHomeScreen.tsx +499 -0
  111. package/templates/runner/src/assets/icon_close.png +0 -0
  112. package/templates/runner/src/assets/icon_pic.png +0 -0
  113. package/templates/runner/src/runnerTypes.ts +31 -0
  114. package/templates/runner/tsconfig.json +8 -0
  115. package/templates/versions.json +6 -0
@@ -0,0 +1,76 @@
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>CADisableMinimumFrameDurationOnPhone</key>
6
+ <true />
7
+ <key>CFBundleDevelopmentRegion</key>
8
+ <string>en</string>
9
+ <key>CFBundleDisplayName</key>
10
+ <string>__DISPLAY_NAME__</string>
11
+ <key>CFBundleExecutable</key>
12
+ <string>$(EXECUTABLE_NAME)</string>
13
+ <key>CFBundleIdentifier</key>
14
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
15
+ <key>CFBundleURLTypes</key>
16
+ <array>
17
+ <dict>
18
+ <key>CFBundleURLName</key>
19
+ <string>com.nebula.review.install</string>
20
+ <key>CFBundleURLSchemes</key>
21
+ <array>
22
+ <string>$(NEBULA_URL_SCHEME)</string>
23
+ </array>
24
+ </dict>
25
+ </array>
26
+ <key>CFBundleInfoDictionaryVersion</key>
27
+ <string>6.0</string>
28
+ <key>CFBundleName</key>
29
+ <string>$(PRODUCT_NAME)</string>
30
+ <key>CFBundlePackageType</key>
31
+ <string>APPL</string>
32
+ <key>CFBundleShortVersionString</key>
33
+ <string>$(MARKETING_VERSION)</string>
34
+ <key>CFBundleSignature</key>
35
+ <string>????</string>
36
+ <key>CFBundleVersion</key>
37
+ <string>$(CURRENT_PROJECT_VERSION)</string>
38
+ <key>UIApplicationSceneManifest</key>
39
+ <dict><key>UIApplicationSupportsMultipleScenes</key><false/><key>UISceneConfigurations</key><dict><key>UIWindowSceneSessionRoleApplication</key><array><dict><key>UISceneConfigurationName</key><string>Default Configuration</string><key>UISceneDelegateClassName</key><string>$(PRODUCT_MODULE_NAME).SceneDelegate</string></dict></array></dict></dict>
40
+ <key>LSRequiresIPhoneOS</key>
41
+ <true/>
42
+ <key>NSAppTransportSecurity</key>
43
+ <dict>
44
+ <key>NSAllowsArbitraryLoads</key>
45
+ <false/>
46
+ <key>NSAllowsLocalNetworking</key>
47
+ <true/>
48
+ </dict>
49
+ <key>NSLocationWhenInUseUsageDescription</key>
50
+ <string></string>
51
+ <key>RCTNewArchEnabled</key>
52
+ <true />
53
+ <key>NSCameraUsageDescription</key>
54
+ <string>$(PRODUCT_NAME) needs access to your Camera.</string>
55
+ <key>NSMicrophoneUsageDescription</key>
56
+ <string>$(PRODUCT_NAME) needs access to your Microphone.</string>
57
+ <key>NSPhotoLibraryUsageDescription</key>
58
+ <string>$(PRODUCT_NAME) needs access to your Photo Library so mini apps can choose media.</string>
59
+ <key>NSPhotoLibraryAddUsageDescription</key>
60
+ <string>$(PRODUCT_NAME) needs permission to save media created by mini apps.</string>
61
+ <key>UILaunchStoryboardName</key>
62
+ <string>LaunchScreen</string>
63
+ <key>UIRequiredDeviceCapabilities</key>
64
+ <array>
65
+ <string>arm64</string>
66
+ </array>
67
+ <key>UISupportedInterfaceOrientations</key>
68
+ <array>
69
+ <string>UIInterfaceOrientationPortrait</string>
70
+ <string>UIInterfaceOrientationLandscapeLeft</string>
71
+ <string>UIInterfaceOrientationLandscapeRight</string>
72
+ </array>
73
+ <key>UIViewControllerBasedStatusBarAppearance</key>
74
+ <false/>
75
+ </dict>
76
+ </plist>
@@ -0,0 +1,47 @@
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="SuperApp" 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>
@@ -0,0 +1,48 @@
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>NSPrivacyAccessedAPITypes</key>
6
+ <array>
7
+ <dict>
8
+ <key>NSPrivacyAccessedAPIType</key>
9
+ <string>NSPrivacyAccessedAPICategorySystemBootTime</string>
10
+ <key>NSPrivacyAccessedAPITypeReasons</key>
11
+ <array>
12
+ <string>35F9.1</string>
13
+ </array>
14
+ </dict>
15
+ <dict>
16
+ <key>NSPrivacyAccessedAPIType</key>
17
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
18
+ <key>NSPrivacyAccessedAPITypeReasons</key>
19
+ <array>
20
+ <string>CA92.1</string>
21
+ </array>
22
+ </dict>
23
+ <dict>
24
+ <key>NSPrivacyAccessedAPIType</key>
25
+ <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
26
+ <key>NSPrivacyAccessedAPITypeReasons</key>
27
+ <array>
28
+ <string>C617.1</string>
29
+ <string>0A2A.1</string>
30
+ <string>3B52.1</string>
31
+ </array>
32
+ </dict>
33
+ <dict>
34
+ <key>NSPrivacyAccessedAPIType</key>
35
+ <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
36
+ <key>NSPrivacyAccessedAPITypeReasons</key>
37
+ <array>
38
+ <string>85F4.1</string>
39
+ <string>E174.1</string>
40
+ </array>
41
+ </dict>
42
+ </array>
43
+ <key>NSPrivacyCollectedDataTypes</key>
44
+ <array/>
45
+ <key>NSPrivacyTracking</key>
46
+ <false/>
47
+ </dict>
48
+ </plist>
@@ -0,0 +1,47 @@
1
+ import UIKit
2
+ import NebulaHost
3
+
4
+ final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
5
+ var window: UIWindow?
6
+
7
+ func scene(
8
+ _ scene: UIScene,
9
+ willConnectTo session: UISceneSession,
10
+ options connectionOptions: UIScene.ConnectionOptions
11
+ ) {
12
+ guard let windowScene = scene as? UIWindowScene,
13
+ let navigationController = AppDelegate.sharedNavigationController else {
14
+ return
15
+ }
16
+
17
+ let window = UIWindow(windowScene: windowScene)
18
+ window.rootViewController = navigationController
19
+ self.window = window
20
+ window.makeKeyAndVisible()
21
+
22
+ for context in connectionOptions.urlContexts {
23
+ _ = NebulaHost.shared.handleIncomingURL(context.url, from: navigationController)
24
+ }
25
+ }
26
+
27
+ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
28
+ for context in URLContexts {
29
+ _ = NebulaHost.shared.handleIncomingURL(
30
+ context.url,
31
+ from: AppDelegate.sharedNavigationController
32
+ )
33
+ }
34
+ }
35
+
36
+ func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
37
+ guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
38
+ let url = userActivity.webpageURL else {
39
+ return
40
+ }
41
+
42
+ _ = NebulaHost.shared.handleIncomingURL(
43
+ url,
44
+ from: AppDelegate.sharedNavigationController
45
+ )
46
+ }
47
+ }
@@ -0,0 +1,18 @@
1
+ //
2
+ // SuperApp-Bridging-Header.h
3
+ // SuperApp - Nebula Mini-App Container
4
+ //
5
+ // Bridging header for Swift-ObjC++ interoperability
6
+ //
7
+
8
+ #ifndef SuperApp_Bridging_Header_h
9
+ #define SuperApp_Bridging_Header_h
10
+
11
+ // React Native Core
12
+ #import <React/RCTBridge.h>
13
+ #import <React/RCTBridgeModule.h>
14
+ #import <React/RCTRootView.h>
15
+ #import <React/RCTBundleURLProvider.h>
16
+ #import <React/RCTUtils.h>
17
+
18
+ #endif /* SuperApp_Bridging_Header_h */
@@ -0,0 +1,21 @@
1
+ //
2
+ // SuperApp-Bridging-Header.h
3
+ // SuperApp - Nebula Mini-App Container
4
+ //
5
+ // Bridging header for Swift-ObjC++ interoperability
6
+ //
7
+
8
+ #ifndef SuperApp_Bridging_Header_h
9
+ #define SuperApp_Bridging_Header_h
10
+
11
+ // React Native Core
12
+ #import <React/RCTBridge.h>
13
+ #import <React/RCTBridgeModule.h>
14
+ #import <React/RCTRootView.h>
15
+ #import <React/RCTBundleURLProvider.h>
16
+ #import <React/RCTUtils.h>
17
+
18
+ // Nebula Framework
19
+ #import "NebulaJSIGateway.h"
20
+
21
+ #endif /* SuperApp_Bridging_Header_h */