@sigx/lynx-dev-client 0.1.0 → 0.1.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Andreas Ekdahl
3
+ Copyright (c) 2025-2026 Andreas Ekdahl
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @sigx/lynx-dev-client
2
+
3
+ Dev-only client for sigx-lynx apps: resource fetchers, template provider, devtool integration, error overlay, perf HUD, QR scanner, and the on-device dev menu. Ships as a debug-only auto-linked module — release builds drop it entirely.
4
+
5
+ Install it as a `devDependency`; `@sigx/lynx-cli`'s autolinker picks it up from `node_modules` even when it's not listed under `modules` in `sigx.lynx.config.ts`.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add -D @sigx/lynx-dev-client
11
+ ```
12
+
13
+ The lynx project templates already include this; manual install is only needed for projects that pre-date the template change.
14
+
15
+ ## What it does
16
+
17
+ - **Resource fetchers** — `DevGenericResourceFetcher` / `DevTemplateResourceFetcher` (iOS and Android) load Lynx templates from the dev server over HTTP so HMR works.
18
+ - **Template provider** — `DevTemplateProvider`, consumed by your `App.swift` / `MainActivity.kt` under `#if DEBUG`, points the LynxEnv at the dev server URL.
19
+ - **Dev menu** — on-device QR scanner, settings sheet, and per-app dev shortcuts. Triggered by the shake gesture (`ShakeDetector`) on iOS and the equivalent on Android.
20
+ - **Devtool wiring** — registers the Lynx devtool / logbox services so the Chrome inspector and on-device error overlays light up.
21
+
22
+ ## How it ends up in the app
23
+
24
+ `sigx prebuild` calls into `@sigx/lynx-cli`'s `copyDevClientSources{Ios,Android}`, which copies the Swift/Kotlin sources from this package into your native project and registers them. The generated `App.swift` template references `SigxDevClient.registerServices()` / `enableDevMode()` / `DevTemplateProvider()` under `#if DEBUG`.
25
+
26
+ ## Permissions
27
+
28
+ The QR scanner requires camera access. The package's `sigx-module.json` declares this — autolinker adds `NSCameraUsageDescription` to `Info.plist` and `android.permission.CAMERA` to `AndroidManifest.xml`. Strip these from release builds by depending on this package only under `devDependencies`.
29
+
30
+ ## Versioning
31
+
32
+ The version is exported as `DEV_CLIENT_VERSION` so `@sigx/lynx-cli` can warn if the dev client drifts from the CLI version it was bundled with.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sigx/lynx-dev-client",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Dev client for sigx-lynx — resource fetchers, template provider, and devtool integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,13 +16,35 @@
16
16
  "files": [
17
17
  "dist",
18
18
  "android",
19
- "ios"
19
+ "ios",
20
+ "sigx-module.json"
20
21
  ],
21
22
  "devDependencies": {
22
- "typescript": "^5.9.3"
23
+ "typescript": "^6.0.3"
23
24
  },
24
25
  "author": "Andreas Ekdahl",
25
26
  "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/signalxjs/lynx.git",
30
+ "directory": "packages/lynx-dev-client"
31
+ },
32
+ "homepage": "https://github.com/signalxjs/lynx/tree/main/packages/lynx-dev-client",
33
+ "bugs": {
34
+ "url": "https://github.com/signalxjs/lynx/issues"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "keywords": [
40
+ "signalx",
41
+ "sigx",
42
+ "lynx",
43
+ "mobile",
44
+ "ios",
45
+ "android",
46
+ "dev-client"
47
+ ],
26
48
  "scripts": {
27
49
  "build": "tsc",
28
50
  "dev": "tsc --watch"
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "DevClient",
3
+ "package": "@sigx/lynx-dev-client",
4
+ "description": "Dev client with resource fetchers, template provider, and devtool integration",
5
+ "type": "dev-client",
6
+ "platforms": ["android", "ios"],
7
+ "android": {
8
+ "initClass": "com.sigx.devclient.SigxDevClient",
9
+ "sourceDir": "android/src/main/kotlin",
10
+ "debugOnly": true,
11
+ "dependencies": [
12
+ "org.lynxsdk.lynx:lynx-devtool:3.6.0",
13
+ "org.lynxsdk.lynx:lynx-service-devtool:3.6.0",
14
+ "androidx.compose.material3:material3",
15
+ "androidx.compose.material:material-icons-extended",
16
+ "androidx.compose.ui:ui",
17
+ "androidx.activity:activity-compose",
18
+ "androidx.lifecycle:lifecycle-runtime-compose:2.8.7",
19
+ "androidx.camera:camera-core:1.4.1",
20
+ "androidx.camera:camera-camera2:1.4.1",
21
+ "androidx.camera:camera-lifecycle:1.4.1",
22
+ "androidx.camera:camera-view:1.4.1",
23
+ "androidx.camera:camera-mlkit-vision:1.4.1",
24
+ "com.google.mlkit:barcode-scanning:17.3.0"
25
+ ],
26
+ "permissions": [
27
+ "android.permission.CAMERA"
28
+ ]
29
+ },
30
+ "ios": {
31
+ "initClass": "SigxDevClient",
32
+ "sourceDir": "ios/Sources/SigxDevClient",
33
+ "debugOnly": true,
34
+ "usageDescriptions": {
35
+ "NSCameraUsageDescription": "Used to scan QR codes from the dev server."
36
+ }
37
+ }
38
+ }