@scalebun/react-native 1.6.3 → 1.6.4

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/scalebun.js CHANGED
@@ -899,38 +899,43 @@ function delegateToOtaCli(argv) {
899
899
  }
900
900
 
901
901
  /**
902
- * Print the full command surface: the SDK-setup commands this package handles
903
- * directly, followed by the complete @scalebun/cli command tree.
902
+ * Print the full, guided command surface.
904
903
  *
905
- * The CLI tree is rendered by delegating to `@scalebun/cli --help` rather than a
906
- * hardcoded list, so it is a single source of truth and cannot drift. When the
907
- * CLI cannot be resolved (should not happen it is a dependency) we fall back to
908
- * a prose note instead of an error, since this is a help screen.
904
+ * Delegates to the bundled @scalebun/cli's own banner (invoked with no args),
905
+ * which renders the "publish your first OTA update" getting-started flow,
906
+ * project setup (doctor + init ios/android), and every OTA subcommand a single
907
+ * source of truth that cannot drift. `--help` on the CLI would only list
908
+ * top-level groups (so `ota generate-key-pair` etc. would stay hidden), which is
909
+ * exactly the discoverability gap this avoids. When the CLI cannot be resolved
910
+ * (should not happen — it is a dependency) we fall back to a static list.
909
911
  */
910
912
  function printFullHelp() {
913
+ const cliEntry = resolveOtaCli();
914
+ if (cliEntry) {
915
+ // No args → the CLI prints its banner + status + full guided command list.
916
+ const { spawnSync } = require('child_process');
917
+ const res = spawnSync(process.execPath, [cliEntry], { stdio: 'inherit' });
918
+ process.exit(res.status ?? 0);
919
+ }
920
+
921
+ // Fallback: CLI unresolvable — show at least the setup commands + how to fix.
911
922
  console.log('');
912
- console.log(paint('ScaleBun SDK CLI', C.bold));
923
+ console.log(paint('ScaleBun CLI', C.bold));
913
924
  console.log('');
914
- console.log(paint('SDK setup (bundled with @scalebun/react-native):', C.bold));
915
- console.log(' npx scalebun doctor Diagnose push-notification setup');
916
- console.log(' npx scalebun init ios Wire the iOS AppDelegate for Direct APNs + OTA');
917
- console.log(' npx scalebun init android Wire Android MainApplication for OTA bundle loading');
925
+ console.log(paint('Publish your first OTA update:', C.bold));
926
+ console.log(' 1. npx scalebun login Authenticate (paste a token)');
927
+ console.log(' 2. npx scalebun apps Find your --app-id');
928
+ console.log(' 3. npx scalebun init android | init ios Wire the native app for OTA, then rebuild');
929
+ console.log(' 4. npx scalebun ota publish --app-id <id> --hermes');
930
+ console.log('');
931
+ console.log(paint('Project setup:', C.bold));
932
+ console.log(' npx scalebun doctor Check the project is OTA-ready');
933
+ console.log(' npx scalebun init ios Wire the iOS AppDelegate for OTA + Direct APNs');
934
+ console.log(' npx scalebun init android Wire the Android MainApplication for OTA');
918
935
  console.log(paint(' add --check to verify (exit 1 if missing) or --dry-run to preview', C.dim));
919
936
  console.log('');
920
-
921
- const cliEntry = resolveOtaCli();
922
- if (!cliEntry) {
923
- console.log(paint('OTA & account commands:', C.bold));
924
- console.log(' Provided by @scalebun/cli (login, quickstart, apps, ota publish,');
925
- console.log(' releases, rollout…). It ships with this package but could not be');
926
- console.log(' resolved — run `npm install`, then `npx scalebun --help` again.');
927
- console.log('');
928
- return;
929
- }
930
-
931
- console.log(paint('OTA & account commands (from @scalebun/cli):', C.bold));
932
- const { spawnSync } = require('child_process');
933
- spawnSync(process.execPath, [cliEntry, '--help'], { stdio: 'inherit' });
937
+ console.log(paint('The OTA & account commands come from @scalebun/cli, which ships with this', C.dim));
938
+ console.log(paint('package but could not be resolved — run `npm install`, then retry.', C.dim));
934
939
  console.log('');
935
940
  }
936
941
 
@@ -489,7 +489,7 @@ var SDK_VERSION;
489
489
  var init_version = __esm({
490
490
  "lib/module/core/constants/version.js"() {
491
491
  "use strict";
492
- SDK_VERSION = "1.6.3";
492
+ SDK_VERSION = "1.6.4";
493
493
  }
494
494
  });
495
495
 
@@ -492,7 +492,7 @@ var SDK_VERSION;
492
492
  var init_version = __esm({
493
493
  "lib/module/core/constants/version.js"() {
494
494
  "use strict";
495
- SDK_VERSION = "1.6.3";
495
+ SDK_VERSION = "1.6.4";
496
496
  }
497
497
  });
498
498
 
@@ -9,5 +9,5 @@ exports.SDK_VERSION = void 0;
9
9
  * can attribute telemetry to the SDK build that produced it.
10
10
  * Keep in sync with package.json "version".
11
11
  */
12
- const SDK_VERSION = exports.SDK_VERSION = '1.6.3';
12
+ const SDK_VERSION = exports.SDK_VERSION = '1.6.4';
13
13
  //# sourceMappingURL=version.js.map
@@ -3,5 +3,5 @@
3
3
  * can attribute telemetry to the SDK build that produced it.
4
4
  * Keep in sync with package.json "version".
5
5
  */
6
- export const SDK_VERSION = '1.6.3';
6
+ export const SDK_VERSION = '1.6.4';
7
7
  //# sourceMappingURL=version.js.map
@@ -3,5 +3,5 @@
3
3
  * can attribute telemetry to the SDK build that produced it.
4
4
  * Keep in sync with package.json "version".
5
5
  */
6
- export declare const SDK_VERSION = "1.6.3";
6
+ export declare const SDK_VERSION = "1.6.4";
7
7
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalebun/react-native",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Production-grade React Native SDK for ScaleBun",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -105,7 +105,7 @@
105
105
  "@babel/runtime": "^7.25.0",
106
106
  "@jridgewell/sourcemap-codec": "1.5.5",
107
107
  "@jridgewell/trace-mapping": "0.3.31",
108
- "@scalebun/cli": "^1.6.3"
108
+ "@scalebun/cli": "^1.6.4"
109
109
  },
110
110
  "codegenConfig": {
111
111
  "name": "ScaleBunSpec",
@@ -3,4 +3,4 @@
3
3
  * can attribute telemetry to the SDK build that produced it.
4
4
  * Keep in sync with package.json "version".
5
5
  */
6
- export const SDK_VERSION = '1.6.3';
6
+ export const SDK_VERSION = '1.6.4';