@tamer4lynx/cli 0.0.1 → 0.0.2

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 (3) hide show
  1. package/README.md +10 -0
  2. package/dist/index.js +20 -6
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -243,6 +243,16 @@ Extensions are discovered via **lynx.ext.json** (RFC standard) or **tamer.json**
243
243
 
244
244
  ---
245
245
 
246
+ ## Limitations
247
+
248
+ - **tamer-transports** — Fetch, WebSocket, and EventSource polyfills are not fully tested. Report issues on GitHub.
249
+ - **t4l add** — Does not yet track installed versions for compatibility (Expo-style). Planned for a future release.
250
+ - **tamer-router** — Designed for @lynx-js/react (Stack, Tabs, react-router). Other bindings (VueLynx, miso-lynx) can use native modules and tooling but not the router.
251
+ - **Host dependencies** — Networking (fetch), font loading, and native modules depend on the Lynx host implementation.
252
+ - **iOS development** — Requires macOS and Xcode for building and running.
253
+
254
+ ---
255
+
246
256
  ## Roadmap
247
257
 
248
258
  * [x] Fix iOS linking
package/dist/index.js CHANGED
@@ -1,12 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // src/suppress-punycode-warning.ts
4
+ process.on("warning", (w) => {
5
+ if (w.name === "DeprecationWarning" && /punycode/i.test(w.message)) return;
6
+ console.warn(w.toString());
7
+ });
8
+
3
9
  // index.ts
4
10
  import fs25 from "fs";
5
11
  import path25 from "path";
6
12
  import { program } from "commander";
7
13
 
8
14
  // package.json
9
- var version = "0.0.1";
15
+ var version = "0.0.2";
10
16
 
11
17
  // src/android/create.ts
12
18
  import fs3 from "fs";
@@ -5143,7 +5149,8 @@ import path18 from "path";
5143
5149
  import readline from "readline";
5144
5150
  var rl = readline.createInterface({
5145
5151
  input: process.stdin,
5146
- output: process.stdout
5152
+ output: process.stdout,
5153
+ terminal: false
5147
5154
  });
5148
5155
  function ask(question) {
5149
5156
  return new Promise((resolve) => {
@@ -5151,7 +5158,6 @@ function ask(question) {
5151
5158
  });
5152
5159
  }
5153
5160
  async function init() {
5154
- process.removeAllListeners("warning");
5155
5161
  console.log("Tamer4Lynx Init: Let's set up your tamer.config.json\n");
5156
5162
  const androidAppName = await ask("Android app name: ");
5157
5163
  const androidPackageName = await ask("Android package name (e.g. com.example.app): ");
@@ -5202,7 +5208,7 @@ var init_default = init;
5202
5208
  import fs19 from "fs";
5203
5209
  import path19 from "path";
5204
5210
  import readline2 from "readline";
5205
- var rl2 = readline2.createInterface({ input: process.stdin, output: process.stdout });
5211
+ var rl2 = readline2.createInterface({ input: process.stdin, output: process.stdout, terminal: false });
5206
5212
  function ask2(question) {
5207
5213
  return new Promise((resolve) => rl2.question(question, (answer) => resolve(answer.trim())));
5208
5214
  }
@@ -5462,11 +5468,19 @@ async function startDevServer(opts) {
5462
5468
  const distDir = path21.dirname(lynxBundlePath);
5463
5469
  const port = config.devServer?.port ?? config.devServer?.httpPort ?? DEFAULT_PORT;
5464
5470
  let buildProcess = null;
5471
+ function detectPackageManager2(cwd) {
5472
+ const dir = path21.resolve(cwd);
5473
+ if (fs21.existsSync(path21.join(dir, "pnpm-lock.yaml"))) return { cmd: "pnpm", args: ["run", "build"] };
5474
+ if (fs21.existsSync(path21.join(dir, "bun.lockb")) || fs21.existsSync(path21.join(dir, "bun.lock"))) return { cmd: "bun", args: ["run", "build"] };
5475
+ return { cmd: "npm", args: ["run", "build"] };
5476
+ }
5465
5477
  function runBuild() {
5466
5478
  return new Promise((resolve, reject) => {
5467
- buildProcess = spawn("npm", ["run", "build"], {
5479
+ const { cmd, args } = detectPackageManager2(lynxProjectDir);
5480
+ buildProcess = spawn(cmd, args, {
5468
5481
  cwd: lynxProjectDir,
5469
- stdio: "pipe"
5482
+ stdio: "pipe",
5483
+ shell: process.platform === "win32"
5470
5484
  });
5471
5485
  let stderr = "";
5472
5486
  buildProcess.stderr?.on("data", (d) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamer4lynx/cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "description": "A CLI tool for managing LynxJS native modules.",
@@ -59,6 +59,7 @@
59
59
  "android:build": "node dist/index.js android build",
60
60
  "android:build:install": "node dist/index.js android build --install",
61
61
  "docs:ci": "npm ci --ignore-scripts && npm run build --workspace=docs",
62
+ "prepare": "node -e \"const fs=require('fs');if(!fs.existsSync('dist/index.js'))require('child_process').execSync('npm run build',{stdio:'inherit'})\"",
62
63
  "prepublishOnly": "npm run build",
63
64
  "publish:all": "node scripts/publish-all.mjs"
64
65
  },