You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e087ff8
Browse filesBrowse the repository at this point in the historyBrowse files
feat(doctor): report a Capacitor app that never imports the SDK (#120)
* feat(doctor): report a Capacitor app that never imports the SDK
The Capacitor SDK learns that the app rendered from its import, so an app that never imports it confirms no update and rolls every update back. doctor now has an import check on Capacitor: it fails with import_missing when no script or component file under src/ names @hotcodepush/capacitor-live-updates, and it is skipped when there is no src/. init never edits the app's code, so it ends with the import line to add when the import is missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(init): name the missing SDK import in a notice
Since #115 the advice after init's rows is a notice on stderr and the finish is a result, so the import step joins that advice as a notice before the build advice. The test asserts the diagnostics by content instead of a fixed slice of stdout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ Release-please keeps a release pull request open on `main`, and merging it tags
84
84
3. Nothing outside the module names the framework: a command asks the module, never a config file or a path of its own.
85
85
86
86
Capacitor's module reads `capacitor.config` as text and no native file, `webDir` when the upload runs, and a config with no `webDir` readable as a quoted string makes `--path` required, `missing_parameter` naming the reason; Cordova's reads `config.xml` through `fast-xml-parser` for the file-mode preference alone. The store build's identity comes from the build on every framework, never from a project file: the hook script passes the version and the build number it read from the processed `Info.plist` or the variant. React Native and Capacitor are wired the same way, `init` adding the phase and the Gradle line; Expo's config plugin and Cordova's plugin wire themselves.
87
+
Capacitor's `import` check looks for the SDK's package name, quoted, in the script and component files under `src/`, since the import tells the SDK the app rendered. `init` never edits the app's code: after its rows it names the import to add in a notice, `FrameworkWiring`'s `appImportStep`.
87
88
React Native's and Expo's have no build output to read and share React Native's release build in `frameworks/react-native-build.ts`: `packageReactNativeBundles` runs the module's bundler and Hermes' compiler per platform into the command's packaging directory, one bundle each, `collectEmbeddedFiles` takes `main.jsbundle` and `assets/` out of the app the Xcode phase points at, the native build passes the identity and `--resource-file-path` in.
88
89
The bundler is all the two differ in there: `react-native bundle` with the project's entry file for React Native, `expo export:embed`, which resolves the entry file itself, for Expo.
89
90
`--path` is the prepared bundle directory of the one platform `--platform` names, refused without the JavaScript under the name that platform's app loads.
0 commit comments