@tamer4lynx/tamer-dev-client 0.0.1 → 0.0.3

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/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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamer4lynx/tamer-dev-client",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
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",
@@ -14,7 +14,8 @@
14
14
  }
15
15
  },
16
16
  "scripts": {
17
- "build": "rspeedy build"
17
+ "build": "rspeedy build",
18
+ "prepare": "npm run build"
18
19
  },
19
20
  "dependencies": {
20
21
  "@lynx-js/react": "^0.112.1",
@@ -35,5 +36,5 @@
35
36
  },
36
37
  "author": "Nanofuxion",
37
38
  "license": "MIT",
38
- "files": ["dist", "android/src", "android/build.gradle.kts", "android/templates", "ios", "lynx.config.ts"]
39
+ "files": ["dist", "android/src", "android/build.gradle.kts", "android/templates", "ios", "lynx.config.ts", "lynx.ext.json"]
39
40
  }