@calo-design/cli 0.14.0 → 0.15.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.
package/bin/cli.js CHANGED
@@ -45,7 +45,16 @@ const PEERS = [
45
45
  // prototype (see mirror-push.js mirrorChromeSource). The shell binary provides
46
46
  // the native module (from build 8); prototypes ship JS only, and on older
47
47
  // binaries the SDK falls back to JS-only transport.
48
- "@sentry/react-native"
48
+ "@sentry/react-native",
49
+ // Maps, voice notes and file/photo attachments (shell binary ships the native side
50
+ // from build 12). These were missing here, so a prototype that needed one hit
51
+ // "unable to resolve" and the natural fix — installing it into ~/.designchef/runtime
52
+ // by hand — produced a bundle whose native half didn't exist on the phone. That
53
+ // shipped caly-full: it opened to an expo-router error naming none of them.
54
+ "react-native-maps",
55
+ "expo-audio",
56
+ "expo-image-picker",
57
+ "expo-document-picker"
49
58
  ];
50
59
  // Install via explicit HTTPS git URLs. Auth is a short-lived GitHub token the Calo
51
60
  // broker mints after `calo-design login` — injected into git for the install
@@ -40,7 +40,8 @@ const SHELL_MODULES = new Set([
40
40
  "expo", "expo-asset", "expo-camera", "expo-clipboard", "expo-constants", "expo-device",
41
41
  "expo-font", "expo-glass-effect", "expo-image", "expo-linking", "expo-router",
42
42
  "expo-splash-screen", "expo-status-bar", "expo-symbols", "expo-system-ui", "expo-updates",
43
- "expo-video", "expo-web-browser", "phosphor-react-native", "react", "react-dom",
43
+ "expo-video", "expo-web-browser", "expo-audio", "expo-document-picker", "expo-image-picker",
44
+ "expo-file-system", "react-native-maps", "phosphor-react-native", "react", "react-dom",
44
45
  "react-native", "react-native-gesture-handler", "react-native-qrcode-svg",
45
46
  "react-native-reanimated", "react-native-safe-area-context", "react-native-screens",
46
47
  "react-native-svg", "react-native-web", "react-native-worklets",
@@ -172,10 +173,27 @@ function validateDeps(pkg) {
172
173
  }
173
174
  const runtimeDeps = new Set(Object.keys(JSON.parse(fs.readFileSync(runtimePkgPath, "utf8")).dependencies || {}));
174
175
  const extras = Object.keys(pkg.dependencies || {}).filter((d) => !d.startsWith("@calo/") && !runtimeDeps.has(d));
175
- if (extras.length) {
176
- warn(`these deps aren't in the shared runtime, so the Mirror binary can't provide them:\n ${extras.join(", ")}`);
177
- warn("the prototype may crash on load in Mirror. Keep prototypes to the shared-runtime deps, or ask for a runtime bump.");
176
+ if (!extras.length) return;
177
+
178
+ // A dep the runtime lacks normally can't even bundle but "unable to resolve X" is
179
+ // reasonably fixed by installing X into ~/.designchef/runtime by hand, and then the
180
+ // push succeeds and the PHONE has no native side for it. That is how caly-full went
181
+ // out: expo-audio, expo-image-picker, expo-document-picker and react-native-maps were
182
+ // all declared here, all absent from the runtime, and the prototype died on open with
183
+ // an expo-router error naming none of them. So: anything the shell binary can't serve
184
+ // is a hard stop, not a warning nobody reads.
185
+ const unusable = extras.filter((d) => !SHELL_MODULES.has(d));
186
+ if (unusable.length) {
187
+ throw new Error(
188
+ `these dependencies aren't in the shared runtime AND aren't in the Mirror shell binary:\n` +
189
+ ` ${unusable.join(", ")}\n` +
190
+ ` Even if the bundle builds (e.g. they were installed into the runtime by hand), the phone\n` +
191
+ ` has no native code for them: the import throws on open and the prototype shows an\n` +
192
+ ` unrelated expo-router error. Drop them, or ask for a runtime + shell bump that carries them.`
193
+ );
178
194
  }
195
+ warn(`these deps aren't in the shared runtime, so the bundle can only build if they're installed there:\n ${extras.join(", ")}`);
196
+ warn("the Mirror binary does carry their native side — but keep prototypes to the shared-runtime deps where you can.");
179
197
  }
180
198
 
181
199
  function writeJSON(p, obj) {
@@ -333,7 +351,7 @@ function isNativePackage(name) {
333
351
  try {
334
352
  return fs.readdirSync(dir).some((f) => f.endsWith(".podspec"));
335
353
  } catch {
336
- return false; // not installed in the runtime — validateDeps already covered that
354
+ return false; // not in the runtime — validateDeps owns that case
337
355
  }
338
356
  }
339
357
 
@@ -1095,4 +1113,4 @@ async function cmdPush(args) {
1095
1113
  }
1096
1114
  }
1097
1115
 
1098
- module.exports = { cmdPush, _stageSkipDirs: STAGE_SKIP_DIRS, _s3Put: s3Put, _upsertRegistry: upsertRegistry, _publicBase: PUBLIC_BASE, _extractEasGroup: extractEasGroup, _versionBranchOf: versionBranchOf, _stagedImports: stagedImports, _preflightNativeModules: preflightNativeModules, _shellModules: SHELL_MODULES };
1116
+ module.exports = { cmdPush, _validateDeps: validateDeps, _stageSkipDirs: STAGE_SKIP_DIRS, _s3Put: s3Put, _upsertRegistry: upsertRegistry, _publicBase: PUBLIC_BASE, _extractEasGroup: extractEasGroup, _versionBranchOf: versionBranchOf, _stagedImports: stagedImports, _preflightNativeModules: preflightNativeModules, _shellModules: SHELL_MODULES };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calo-design/cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "One-line setup for Calo design tooling: logs in with your Calo email and installs the calo-design skill + design-system packages. No GitHub account needed.",
5
5
  "bin": {
6
6
  "calo-design": "bin/cli.js"