@simon-says-build/demo-player 0.13.1 → 0.13.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simon-says-build/demo-player",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "SimonSays mobile demo player: walks a preview's viewer through a job's change, inside the app. Renders nothing unless the bundle carries a demo.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/DemoHost.js CHANGED
@@ -13,13 +13,13 @@
13
13
  //
14
14
  // No JSX, so it needs nothing from the app's Babel setup beyond React Native's.
15
15
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16
- import { Linking, NativeModules, Pressable, ScrollView, StyleSheet, Text, TextInput, View, useWindowDimensions } from 'react-native';
16
+ import { Linking, NativeModules, Platform, Settings, Pressable, ScrollView, StyleSheet, Text, TextInput, View, useWindowDimensions } from 'react-native';
17
17
  import { pageName } from './page-name.js';
18
18
  import { OVERLAY_ID, cardBox, pinnedBox, setTuckedDemo, overlayAnnounced, tapInside, currentDemo, demoConfig, findTarget, handlerFor, introBody, introOf, onDemo, phoneSteps, playDemo, releaseOf, reviewChangesOf, scalePoint, rescueNote, screenCandidates, stepTitle, targetOfKey } from './core.js';
19
19
  import { demoApi, tourOf } from './api.js';
20
20
  import { signInFirst, openInApp } from './signin.js';
21
21
  import { runEvent, fillStep } from './events.js';
22
- import { nativeRuntime, buildGap, needLinks, openNeed, staleBody } from './build-gate.js';
22
+ import { nativeRuntime, buildGap, needLinks, openNeed, staleBody, skipBuildGate } from './build-gate.js';
23
23
 
24
24
  const h = React.createElement;
25
25
  const FIND_FOR_MS = 8000; // a step's element may appear after a navigation settles
@@ -94,7 +94,8 @@ function Player({ config, router, insets, onClose, children }) {
94
94
  // THE BUILD FIRST (0.12.0): a review made for another native build of
95
95
  // this dev app never starts here — the person is sent to install the
96
96
  // right one (build-gate.js). Nothing else runs: no sign-in, no steps.
97
- const gap = config.here ? null : buildGap(d, nativeRuntime(globalThis.expo?.modules, NativeModules));
97
+ const skip = config.here || (Platform.OS === 'ios' && skipBuildGate(Settings));
98
+ const gap = skip ? null : buildGap(d, nativeRuntime(globalThis.expo?.modules, NativeModules));
98
99
  if (gap) {
99
100
  const links = needLinks({ demo: d, gap, demoId: config.id, token: config.token });
100
101
  setStale({ gap, links, appName: d.projectName || d.appName || 'the app' });
package/src/build-gate.js CHANGED
@@ -25,6 +25,16 @@ export function nativeRuntime(mods = globalThis.expo?.modules, nativeModules = {
25
25
  return typeof u.runtimeVersion === 'string' && u.runtimeVersion && !u.runtimeVersion.startsWith('file:') ? u.runtimeVersion : null;
26
26
  }
27
27
 
28
+ // SSB'S OWN SIMULATOR SKIPS IT (0.13.2): a rehearsal and the review check run
29
+ // the app's simulator build (drivers/phone-review-sim.mjs), whose fingerprint
30
+ // is never the review's dev build, and the check stopped every rehearsal at
31
+ // "this review needs a newer build" — Connie Ho's ended "never opened"
32
+ // (demo xKkA8qPU7MS7p2yo5F7E, 2026-11-05 20:05 ET). The driver writes the app's
33
+ // iOS default `SSBSkipBuildGate` = YES; react-native's Settings reads it.
34
+ export function skipBuildGate(settings) {
35
+ try { return !!settings?.get?.('SSBSkipBuildGate'); } catch { return false; }
36
+ }
37
+
28
38
  /** What the review needs that this build is not: null = play it, else { need, have }. */
29
39
  export function buildGap(demo, have) {
30
40
  const need = demo?.platform === 'ios' && typeof demo?.preview?.fingerprint === 'string' ? demo.preview.fingerprint : null;
package/src/core.js CHANGED
@@ -10,7 +10,7 @@ import { bubbleBox } from './step-place.js';
10
10
  // What this player is, said when the app registers for "Ready to see"
11
11
  // (packages/ssb-overlay sends it; functions/in-app-notify.mjs clientOf). Kept
12
12
  // equal to package.json by test/core.test.mjs.
13
- export const PLAYER_VERSION = '0.13.1';
13
+ export const PLAYER_VERSION = '0.13.2';
14
14
 
15
15
  export const HOST = 5;
16
16
  export const TEXT = 6;