@modelform/react-native 0.11.0 → 0.12.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/README.md +2 -1
- package/dist/{chunk-KJR3ZKG4.js → chunk-G67L7TFK.js} +63 -42
- package/dist/{chunk-AJEPW5KG.mjs → chunk-YUSXYDXG.mjs} +62 -41
- package/dist/core/index.js +4 -2
- package/dist/core/index.mjs +3 -1
- package/dist/core/manifest.d.ts +20 -1
- package/dist/index.js +157 -155
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
- package/schema/app.schema.json +3 -2
package/dist/core/manifest.d.ts
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import type { Dashboard } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* The newest config format this build can show. A manifest's `version` is the oldest format that
|
|
4
|
+
* can show it, so an app older than the config says to update rather than show it wrong.
|
|
5
|
+
*
|
|
6
|
+
* When a change means older apps would show a config wrong (a new panel or screen type, an
|
|
7
|
+
* option whose absence changes what's recorded), bump this and add a FORMAT_CHANGES entry that
|
|
8
|
+
* spots configs using it. Configs that don't use it keep working in older apps.
|
|
9
|
+
*/
|
|
2
10
|
export declare const MANIFEST_VERSION = 1;
|
|
11
|
+
/** The version a config should declare: the newest format change it uses, or 1. Editors set it when saving. */
|
|
12
|
+
export declare function requiredManifestVersion(bundle: ConfigBundle): number;
|
|
3
13
|
/** The root of an app config: navigation, plus the documents it shows. Annotations here feed schema/app.schema.json. */
|
|
4
14
|
export interface AppManifest {
|
|
5
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The oldest config format that can show this config: 1 unless it uses something newer (see
|
|
17
|
+
* MANIFEST_VERSION). An app that reads only older formats asks to be updated instead.
|
|
18
|
+
* @minimum 1
|
|
19
|
+
* @asType integer
|
|
20
|
+
*/
|
|
6
21
|
version: number;
|
|
7
22
|
/**
|
|
8
23
|
* The app's name.
|
|
@@ -66,6 +81,8 @@ export interface ConfigBundle {
|
|
|
66
81
|
}
|
|
67
82
|
export interface ConfigIssue {
|
|
68
83
|
severity: 'error' | 'warning';
|
|
84
|
+
/** Set on the error for a config newer than this build can show, so an app can ask to be updated. */
|
|
85
|
+
code?: 'newer-version';
|
|
69
86
|
/** Where in the config, e.g. `app.json: tabs[1].screen.dashboard` or `forms/daily.json: panels[3]`. */
|
|
70
87
|
path: string;
|
|
71
88
|
message: string;
|
|
@@ -196,6 +213,8 @@ export interface ConfigState {
|
|
|
196
213
|
error?: string;
|
|
197
214
|
/** True when the last fetch failed because the config couldn't be fetched at all, not because it has errors. */
|
|
198
215
|
unreachable?: boolean;
|
|
216
|
+
/** True when the last fetch got a config newer than this app can show: the app should ask to be updated. */
|
|
217
|
+
needsUpdate?: boolean;
|
|
199
218
|
/** From the last fetch, good or bad. */
|
|
200
219
|
issues: ConfigIssue[];
|
|
201
220
|
}
|