@protobase/schema 0.40.9 → 0.41.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/dist/internal.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { layoutItems } from "./layout-items.js";
|
|
|
26
26
|
import { viewOfList } from "./named-list.js";
|
|
27
27
|
import { Locale, isLocale, locales, pickLocale } from "./locale.js";
|
|
28
28
|
import { apiOriginMeta } from "./api-origin-meta.js";
|
|
29
|
+
import { MobileReleaseAnswer, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile } from "./mobile-release-address.js";
|
|
29
30
|
import { authBasePath } from "./auth-base-path.js";
|
|
30
31
|
import { capacitorOrigin } from "./capacitor-origins.js";
|
|
31
|
-
export { type AddressCheck, type FormulaNode, type Locale, type PluginHost, type PluginRequirement, type PropShapes, type RefShape, type SearchTerm, actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, hrefField, hrefPlaceholders, inRange, isFieldRef, isGroupChart, isLocale, layoutItems, leavesApp, linkActionError, locales, markFieldRefs, matchedSearchField, matchesSearch, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, readEventStream, redactSecrets, renderPrompt, searchTerms, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
|
|
32
|
+
export { type AddressCheck, type FormulaNode, type Locale, type MobileReleaseAnswer, type PluginHost, type PluginRequirement, type PropShapes, type RefShape, type SearchTerm, actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, hrefField, hrefPlaceholders, inRange, isFieldRef, isGroupChart, isLocale, layoutItems, leavesApp, linkActionError, locales, markFieldRefs, matchedSearchField, matchesSearch, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, readEventStream, redactSecrets, releaseManifestFile, renderPrompt, searchTerms, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
|
package/dist/internal.js
CHANGED
|
@@ -26,6 +26,7 @@ import { applyAssistantEvent, emptyAssistantState } from "./assistant/apply-even
|
|
|
26
26
|
import { readEventStream } from "./assistant/event-stream.js";
|
|
27
27
|
import { isLocale, locales, pickLocale } from "./locale.js";
|
|
28
28
|
import { apiOriginMeta } from "./api-origin-meta.js";
|
|
29
|
+
import { mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile } from "./mobile-release-address.js";
|
|
29
30
|
import { authBasePath } from "./auth-base-path.js";
|
|
30
31
|
import { capacitorOrigin } from "./capacitor-origins.js";
|
|
31
|
-
export { actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, hrefField, hrefPlaceholders, inRange, isFieldRef, isGroupChart, isLocale, layoutItems, leavesApp, linkActionError, locales, markFieldRefs, matchedSearchField, matchesSearch, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, readEventStream, redactSecrets, renderPrompt, searchTerms, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
|
|
32
|
+
export { actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, hrefField, hrefPlaceholders, inRange, isFieldRef, isGroupChart, isLocale, layoutItems, leavesApp, linkActionError, locales, markFieldRefs, matchedSearchField, matchesSearch, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, readEventStream, redactSecrets, releaseManifestFile, renderPrompt, searchTerms, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/mobile-release-address.d.ts
|
|
2
|
+
/** The query parameters of the mobile release answer. Only `mobileReleaseQuery` writes them. */
|
|
3
|
+
export declare const mobileReleaseParams: {
|
|
4
|
+
/** The native fingerprint of the binary asking (`ProtobaseNative/<fingerprint>` in its user agent). */
|
|
5
|
+
readonly fingerprint: "fingerprint";
|
|
6
|
+
/** The Protobase version of the shell the device runs, which says whether the update is required. */
|
|
7
|
+
readonly shellVersion: "shell_version";
|
|
8
|
+
};
|
|
9
|
+
/** Where a device asks which release it should run: `GET` with the `mobileReleaseParams`. */
|
|
10
|
+
export declare const mobileReleasePath = "/api/mobile/release";
|
|
11
|
+
/** Where the releases' files are served, each release under its bundle id (see `mobileReleaseBasePath`). */
|
|
12
|
+
export declare const mobileReleasesPath = "/api/mobile/releases";
|
|
13
|
+
/**
|
|
14
|
+
* The updater's manifest, a JSON array of `{ href, checksum, sizeInBytes }` (checksum the file's sha256 in hex): the
|
|
15
|
+
* file name `@capawesome/capacitor-live-update` reads in a release and in the app's own files.
|
|
16
|
+
*/
|
|
17
|
+
export declare const releaseManifestFile = "capawesome-live-update-manifest.json";
|
|
18
|
+
/**
|
|
19
|
+
* The base URL path of the release `bundleId`: the updater fetches `<base>?href=<file>` for its manifest and each file.
|
|
20
|
+
* The id sits in the path because the iOS updater replaces the base URL's whole query when it adds `href`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const mobileReleaseBasePath: (bundleId: string) => string;
|
|
23
|
+
/** The query of the mobile release answer for a binary of `fingerprint` running a shell of `shellVersion`. */
|
|
24
|
+
export declare const mobileReleaseQuery: ({ fingerprint, shellVersion }: {
|
|
25
|
+
fingerprint: string;
|
|
26
|
+
shellVersion: string;
|
|
27
|
+
}) => string;
|
|
28
|
+
/**
|
|
29
|
+
* The mobile release answer: the release the device should run, `bundleId` and `url` (the absolute base URL) both
|
|
30
|
+
* null when none runs on its binary, and whether the update is required, since the shell it runs no longer works with
|
|
31
|
+
* the server's API.
|
|
32
|
+
*/
|
|
33
|
+
export type MobileReleaseAnswer = {
|
|
34
|
+
bundleId: string | null;
|
|
35
|
+
url: string | null;
|
|
36
|
+
required: boolean;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/mobile-release-address.ts
|
|
2
|
+
/** The query parameters of the mobile release answer. Only `mobileReleaseQuery` writes them. */
|
|
3
|
+
const mobileReleaseParams = {
|
|
4
|
+
/** The native fingerprint of the binary asking (`ProtobaseNative/<fingerprint>` in its user agent). */
|
|
5
|
+
fingerprint: "fingerprint",
|
|
6
|
+
/** The Protobase version of the shell the device runs, which says whether the update is required. */
|
|
7
|
+
shellVersion: "shell_version"
|
|
8
|
+
};
|
|
9
|
+
/** Where a device asks which release it should run: `GET` with the `mobileReleaseParams`. */
|
|
10
|
+
const mobileReleasePath = "/api/mobile/release";
|
|
11
|
+
/** Where the releases' files are served, each release under its bundle id (see `mobileReleaseBasePath`). */
|
|
12
|
+
const mobileReleasesPath = "/api/mobile/releases";
|
|
13
|
+
/**
|
|
14
|
+
* The updater's manifest, a JSON array of `{ href, checksum, sizeInBytes }` (checksum the file's sha256 in hex): the
|
|
15
|
+
* file name `@capawesome/capacitor-live-update` reads in a release and in the app's own files.
|
|
16
|
+
*/
|
|
17
|
+
const releaseManifestFile = "capawesome-live-update-manifest.json";
|
|
18
|
+
/**
|
|
19
|
+
* The base URL path of the release `bundleId`: the updater fetches `<base>?href=<file>` for its manifest and each file.
|
|
20
|
+
* The id sits in the path because the iOS updater replaces the base URL's whole query when it adds `href`.
|
|
21
|
+
*/
|
|
22
|
+
const mobileReleaseBasePath = (bundleId) => `${mobileReleasesPath}/${encodeURIComponent(bundleId)}`;
|
|
23
|
+
/** The query of the mobile release answer for a binary of `fingerprint` running a shell of `shellVersion`. */
|
|
24
|
+
const mobileReleaseQuery = ({ fingerprint, shellVersion }) => new URLSearchParams({
|
|
25
|
+
[mobileReleaseParams.fingerprint]: fingerprint,
|
|
26
|
+
[mobileReleaseParams.shellVersion]: shellVersion
|
|
27
|
+
}).toString();
|
|
28
|
+
//#endregion
|
|
29
|
+
export { mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile };
|