pulse-updates 1.0.12 → 1.0.13
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.
|
@@ -1630,8 +1630,14 @@ final class PulseRemoteLoader {
|
|
|
1630
1630
|
case "\r": result += "\\r"
|
|
1631
1631
|
case "\t": result += "\\t"
|
|
1632
1632
|
default:
|
|
1633
|
-
|
|
1634
|
-
|
|
1633
|
+
// Only real control characters are \u-escaped. `asciiValue` is nil for every
|
|
1634
|
+
// non-ASCII character, so `?? 0` collapsed each of them to 0 and rewrote it
|
|
1635
|
+
// as \u0000: the canonical form no longer matched what the server signed and
|
|
1636
|
+
// the manifest was refused ("Signature verification failed"). A single em
|
|
1637
|
+
// dash in a release message was enough to block an app's updates entirely.
|
|
1638
|
+
// Android's escapeJson never had this — it tests char.code < 32.
|
|
1639
|
+
if let ascii = char.asciiValue, ascii < 32 {
|
|
1640
|
+
result += String(format: "\\u%04x", ascii)
|
|
1635
1641
|
} else {
|
|
1636
1642
|
result.append(char)
|
|
1637
1643
|
}
|
package/package.json
CHANGED
package/scripts/publish.mjs
CHANGED
|
@@ -777,9 +777,8 @@ async function publish(options) {
|
|
|
777
777
|
}
|
|
778
778
|
logSuccess(`Created release: ${release.id}`);
|
|
779
779
|
|
|
780
|
-
// Crash-prediction preflight:
|
|
781
|
-
// modules that weren't in the previous good release for this runtime version
|
|
782
|
-
// over the air, so it would crash the installed cohort. Override with --allow-native-change.
|
|
780
|
+
// Crash-prediction preflight: warn (and abort unless --force) if this release references native
|
|
781
|
+
// modules that weren't in the previous good release for this runtime version.
|
|
783
782
|
let preflight = null;
|
|
784
783
|
try {
|
|
785
784
|
const pfRes = await fetch(`${config.apiUrl}/api/releases/${release.id}/preflight`, {
|
|
@@ -791,24 +790,17 @@ async function publish(options) {
|
|
|
791
790
|
}
|
|
792
791
|
if (preflight) {
|
|
793
792
|
for (const w of preflight.warnings || []) log(`⚠ ${w}`);
|
|
794
|
-
// Only NEW NATIVE modules are risky for OTA (native code can't ship over the air); JS changes
|
|
795
|
-
// always fine.
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
// is already in the installed binary). `--no-native-check` skips the gate entirely.
|
|
799
|
-
if (!preflight.ok && !options['no-native-check']) {
|
|
800
|
-
const allow = options['allow-native-change'] || options.force;
|
|
801
|
-
if (!allow) {
|
|
793
|
+
// Only NEW NATIVE modules are risky for OTA (native code can't ship over the air); JS changes
|
|
794
|
+
// are always fine. Warn by default; only block when the publisher opts into --strict.
|
|
795
|
+
if (!preflight.ok) {
|
|
796
|
+
if (options.strict) {
|
|
802
797
|
throw new Error(
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
`the air — this OTA would crash the installed cohort on load. Ship a NEW native binary (and bump ` +
|
|
806
|
-
`the runtime-version) first. If you are certain the native module is already in the installed ` +
|
|
807
|
-
`binary, re-run with --allow-native-change.`
|
|
798
|
+
'Aborting (--strict): this release references native modules new to it — they cannot ship ' +
|
|
799
|
+
'over the air. Ship them in a new native binary first.'
|
|
808
800
|
);
|
|
809
801
|
}
|
|
810
|
-
|
|
811
|
-
'
|
|
802
|
+
log('⚠ Continuing: native-module changes detected (above). Only matters if those native modules ' +
|
|
803
|
+
'are not already in the installed binary. Re-run with --strict to block on this.');
|
|
812
804
|
}
|
|
813
805
|
}
|
|
814
806
|
|
|
@@ -997,11 +989,7 @@ ${colors.cyan}Options:${colors.reset}
|
|
|
997
989
|
--entry-file <file> Entry file (default: index.ts)
|
|
998
990
|
--skip-bundle Skip bundle creation (use existing)
|
|
999
991
|
--dry-run Build + validate locally without creating a release on the server
|
|
1000
|
-
--
|
|
1001
|
-
already in the installed binary). Default is FAIL-CLOSED: a new native module
|
|
1002
|
-
not in the shipped build is refused (it would crash the cohort over the air).
|
|
1003
|
-
--no-native-check Skip the native-mismatch gate entirely (not recommended)
|
|
1004
|
-
--strict (deprecated — blocking on native changes is now the default)
|
|
992
|
+
--strict Abort publish if new native modules are detected (default: warn only)
|
|
1005
993
|
--build <number> Build number (shown in version, e.g., 1.0.0.42)
|
|
1006
994
|
--message <msg> Release message/notes
|
|
1007
995
|
--key-id <id> Key id for keygen (default: auto-generated)
|