@tamer4lynx/tamer-dev-client 0.0.2 → 0.0.5
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/android/build.gradle.kts
CHANGED
|
@@ -15,6 +15,7 @@ import com.lynx.tasm.LynxViewBuilder
|
|
|
15
15
|
import {{PACKAGE_NAME}}.DevClientManager
|
|
16
16
|
import {{PACKAGE_NAME}}.generated.GeneratedLynxExtensions
|
|
17
17
|
import {{PACKAGE_NAME}}.generated.GeneratedActivityLifecycle
|
|
18
|
+
import com.nanofuxion.tamerdevclient.TamerRelogLogService
|
|
18
19
|
|
|
19
20
|
class ProjectActivity : AppCompatActivity() {
|
|
20
21
|
private var lynxView: LynxView? = null
|
|
@@ -31,6 +32,8 @@ class ProjectActivity : AppCompatActivity() {
|
|
|
31
32
|
GeneratedActivityLifecycle.onViewAttached(lynxView)
|
|
32
33
|
GeneratedLynxExtensions.onHostViewChanged(lynxView)
|
|
33
34
|
lynxView?.renderTemplateUrl("main.lynx.bundle", "")
|
|
35
|
+
TamerRelogLogService.init(this)
|
|
36
|
+
TamerRelogLogService.connect()
|
|
34
37
|
devClientManager = DevClientManager(this) { reloadProjectView() }
|
|
35
38
|
devClientManager?.connect()
|
|
36
39
|
GeneratedActivityLifecycle.onCreateDelayed(handler)
|
|
@@ -101,6 +104,7 @@ class ProjectActivity : AppCompatActivity() {
|
|
|
101
104
|
lynxView?.destroy()
|
|
102
105
|
lynxView = null
|
|
103
106
|
devClientManager?.disconnect()
|
|
107
|
+
TamerRelogLogService.disconnect()
|
|
104
108
|
super.onDestroy()
|
|
105
109
|
}
|
|
106
110
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import UIKit
|
|
2
2
|
import Lynx
|
|
3
|
+
import tamerdevclient
|
|
3
4
|
import tamerinsets
|
|
4
5
|
|
|
5
6
|
class ProjectViewController: UIViewController {
|
|
@@ -16,6 +17,7 @@ class ProjectViewController: UIViewController {
|
|
|
16
17
|
view.preservesSuperviewLayoutMargins = false
|
|
17
18
|
viewRespectsSystemMinimumLayoutMargins = false
|
|
18
19
|
setupLynxView()
|
|
20
|
+
TamerRelogLogService.connect()
|
|
19
21
|
devClientManager = DevClientManager(onReload: { [weak self] in
|
|
20
22
|
self?.reloadLynxView()
|
|
21
23
|
})
|
|
@@ -100,6 +102,7 @@ class ProjectViewController: UIViewController {
|
|
|
100
102
|
super.viewWillDisappear(animated)
|
|
101
103
|
if isBeingDismissed || isMovingFromParent {
|
|
102
104
|
devClientManager?.disconnect()
|
|
105
|
+
TamerRelogLogService.disconnect()
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
}
|
package/lynx.config.ts
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import { fileURLToPath } from 'url'
|
|
2
2
|
import path from 'path'
|
|
3
|
+
import fs from 'fs'
|
|
3
4
|
import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
|
|
4
5
|
import { pluginTamer } from '@tamer4lynx/tamer-plugin'
|
|
5
6
|
|
|
6
7
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
7
8
|
|
|
9
|
+
const monorepoAliases: Record<string, string> = {}
|
|
10
|
+
const candidates: [string, string][] = [
|
|
11
|
+
['@tamer4lynx/tamer-app-shell', '../tamer-app-shell/src/index.tsx'],
|
|
12
|
+
['@tamer4lynx/tamer-screen', '../tamer-screen/src/index.tsx'],
|
|
13
|
+
['@tamer4lynx/tamer-icons', '../tamer-icons/src/index.tsx'],
|
|
14
|
+
['@tamer4lynx/tamer-insets', '../tamer-insets/src/index.ts'],
|
|
15
|
+
]
|
|
16
|
+
for (const [pkg, rel] of candidates) {
|
|
17
|
+
const p = path.resolve(__dirname, rel)
|
|
18
|
+
if (fs.existsSync(p)) monorepoAliases[pkg] = p
|
|
19
|
+
}
|
|
20
|
+
|
|
8
21
|
export default {
|
|
9
22
|
source: {
|
|
10
23
|
entry: { 'dev-client': './src/index.tsx' },
|
|
11
|
-
alias:
|
|
12
|
-
'@tamer4lynx/tamer-app-shell': path.resolve(__dirname, '../tamer-app-shell/src/index.tsx'),
|
|
13
|
-
'@tamer4lynx/tamer-screen': path.resolve(__dirname, '../tamer-screen/src/index.tsx'),
|
|
14
|
-
'@tamer4lynx/tamer-icons': path.resolve(__dirname, '../tamer-icons/src/index.tsx'),
|
|
15
|
-
'@tamer4lynx/tamer-insets': path.resolve(__dirname, '../tamer-insets/src/index.ts'),
|
|
16
|
-
},
|
|
24
|
+
alias: monorepoAliases,
|
|
17
25
|
},
|
|
18
26
|
plugins: [pluginTamer(), pluginReactLynx()],
|
|
19
27
|
}
|
package/lynx.ext.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"platforms": {
|
|
3
|
+
"android": {
|
|
4
|
+
"packageName": "com.nanofuxion.tamerdevclient",
|
|
5
|
+
"moduleClassName": "com.nanofuxion.tamerdevclient.DevClientModule",
|
|
6
|
+
"sourceDir": "android",
|
|
7
|
+
"permissions": ["CAMERA", "ACCESS_NETWORK_STATE", "ACCESS_WIFI_STATE"]
|
|
8
|
+
},
|
|
9
|
+
"ios": {
|
|
10
|
+
"podspecPath": "ios/tamerdevclient",
|
|
11
|
+
"moduleClassName": "DevClientModule",
|
|
12
|
+
"iosPermissions": {
|
|
13
|
+
"NSCameraUsageDescription": "Used to scan QR codes for connecting to the dev server"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"hostTransforms": {
|
|
18
|
+
"android": {
|
|
19
|
+
"templateDir": "android/templates",
|
|
20
|
+
"manifestActivities": ["ProjectActivity", "PortraitCaptureActivity"],
|
|
21
|
+
"replaceTemplateProvider": true
|
|
22
|
+
},
|
|
23
|
+
"ios": {
|
|
24
|
+
"templateDir": "ios/templates",
|
|
25
|
+
"injectViewControllers": ["DevLauncherViewController", "ProjectViewController"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamer4lynx/tamer-dev-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"publishConfig": { "access": "public", "tag": "prerelease" },
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Native dev client module for Tamer4Lynx - QR scan, discovery, URL persistence, reload bridge, embedded dev launcher UI",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/tamer4lynx/tamer-dev-client.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/tamer4lynx/tamer-dev-client#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/tamer4lynx/tamer-dev-client/issues"
|
|
14
|
+
},
|
|
7
15
|
"main": "dist/dev-client.js",
|
|
8
16
|
"types": "dist/dev-client.d.ts",
|
|
9
17
|
"exports": {
|
|
@@ -14,7 +22,8 @@
|
|
|
14
22
|
}
|
|
15
23
|
},
|
|
16
24
|
"scripts": {
|
|
17
|
-
"build": "rspeedy build"
|
|
25
|
+
"build": "rspeedy build",
|
|
26
|
+
"prepare": "npm run build"
|
|
18
27
|
},
|
|
19
28
|
"dependencies": {
|
|
20
29
|
"@lynx-js/react": "^0.112.1",
|
|
@@ -35,5 +44,5 @@
|
|
|
35
44
|
},
|
|
36
45
|
"author": "Nanofuxion",
|
|
37
46
|
"license": "MIT",
|
|
38
|
-
"files": ["dist", "android/src", "android/build.gradle.kts", "android/templates", "ios", "lynx.config.ts"]
|
|
47
|
+
"files": ["dist", "android/src", "android/build.gradle.kts", "android/templates", "ios", "lynx.config.ts", "lynx.ext.json"]
|
|
39
48
|
}
|