@protobase/schema 0.57.1 → 0.57.3

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.
@@ -28,7 +28,7 @@ import { Locale, isLocale, locales, pickLocale } from "./locale.js";
28
28
  import { humanize } from "./humanize.js";
29
29
  import { labelFieldOf, recordTitle, recordTitleField } from "./record-title.js";
30
30
  import { apiOriginMeta } from "./api-origin-meta.js";
31
- import { MobileReleaseAnswer, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile } from "./mobile-release-address.js";
31
+ import { MobileReleaseAnswer, ReleaseBinding, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile, releaseStatementContext, releaseStatementFile } from "./mobile-release-address.js";
32
32
  import { authBasePath } from "./auth-base-path.js";
33
33
  import { capacitorOrigin } from "./capacitor-origins.js";
34
34
  import { pushRecord, serviceWorkerFile } from "./push-record.js";
@@ -36,4 +36,4 @@ import { deviceIdParam, devicesPath } from "./devices-path.js";
36
36
  import { historyIdParam, historyIdPattern, historyPath } from "./history-path.js";
37
37
  import { listColumnNames } from "./list-columns.js";
38
38
  import { builtInFieldTypes } from "./built-in-field-types.js";
39
- 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, builtInFieldTypes, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, renderPrompt, searchTerms, serviceWorkerFile, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
39
+ export { type AddressCheck, type FormulaNode, type Locale, type MobileReleaseAnswer, type PluginHost, type PluginRequirement, type PropShapes, type RefShape, type ReleaseBinding, type SearchTerm, actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, builtInFieldTypes, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, releaseStatementContext, releaseStatementFile, renderPrompt, searchTerms, serviceWorkerFile, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
package/dist/internal.js CHANGED
@@ -28,7 +28,7 @@ import { isLocale, locales, pickLocale } from "./locale.js";
28
28
  import { humanize } from "./humanize.js";
29
29
  import { labelFieldOf, recordTitle, recordTitleField } from "./record-title.js";
30
30
  import { apiOriginMeta } from "./api-origin-meta.js";
31
- import { mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile } from "./mobile-release-address.js";
31
+ import { mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile, releaseStatementContext, releaseStatementFile } from "./mobile-release-address.js";
32
32
  import { authBasePath } from "./auth-base-path.js";
33
33
  import { capacitorOrigin } from "./capacitor-origins.js";
34
34
  import { pushRecord, serviceWorkerFile } from "./push-record.js";
@@ -36,4 +36,4 @@ import { deviceIdParam, devicesPath } from "./devices-path.js";
36
36
  import { historyIdParam, historyIdPattern, historyPath } from "./history-path.js";
37
37
  import { listColumnNames } from "./list-columns.js";
38
38
  import { builtInFieldTypes } from "./built-in-field-types.js";
39
- export { actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, builtInFieldTypes, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, renderPrompt, searchTerms, serviceWorkerFile, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
39
+ export { actionConditionError, actionInputErrors, addressErrors, addressPlaceholders, apiOriginMeta, appHrefError, applyAssistantEvent, authBasePath, boardErrors, bottomBarFor, builtInFieldTypes, capacitorOrigin, cardPhotoLimit, chartFields, checkEventFilter, checkedAccept, checkedProvider, datesErrors, decodeKey, defaultRecentLimit, deviceIdParam, devicesPath, displayFields, emptyAssistantState, encodeKey, fieldRefsIn, fillAddress, historyIdParam, historyIdPattern, historyPath, hrefField, hrefPlaceholders, humanize, inRange, isFieldRef, isGroupChart, isLocale, labelFieldOf, layoutItems, leavesApp, linkActionError, listColumnNames, locales, markFieldRefs, matchedSearchField, matchesSearch, mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, navRecentErrors, parseCapability, parseFormula, parseSize, parseTable, pickLocale, pluginProblem, promptError, promptFields, pruneByShape, pushRecord, readEventStream, recordTitle, recordTitleField, redactSecrets, releaseManifestFile, releaseStatementContext, releaseStatementFile, renderPrompt, searchTerms, serviceWorkerFile, shapes, shownInputs, statusTones, tableDisplay, termMatches, unmarkFieldRefs, updateSetErrors, updateValues, viewOfList, webhookResources };
@@ -15,6 +15,26 @@ export declare const mobileReleasesPath = "/api/mobile/releases";
15
15
  * file name `@capawesome/capacitor-live-update` reads in a release and in the app's own files.
16
16
  */
17
17
  export declare const releaseManifestFile = "capawesome-live-update-manifest.json";
18
+ /**
19
+ * A signed release's statement, `{ payload, signature }`: `payload` the lowercase hex of the JSON `ReleaseBinding`,
20
+ * and `signature` the lowercase hex of the SHA256withRSA of `releaseStatementContext` followed by those decoded bytes. It binds the
21
+ * manifest to the release's order, app, binary and shell, which the per-file signatures say nothing of.
22
+ */
23
+ export declare const releaseStatementFile = "protobase-release.json";
24
+ /** What a statement's signature covers ahead of its payload, so no signed file of the app reads as a statement. */
25
+ export declare const releaseStatementContext = "protobase-mobile-release\n";
26
+ /**
27
+ * What a statement binds a release to: its manifest's sha256 in hex, its `order` (compared element by element, a
28
+ * device takes only a release above its own), the app id and native fingerprint of the binaries it runs on, and the
29
+ * Protobase version of the server, whose shells it works with.
30
+ */
31
+ export type ReleaseBinding = {
32
+ manifest: string;
33
+ order: number[];
34
+ appId: string;
35
+ fingerprint: string;
36
+ shellVersion: string;
37
+ };
18
38
  /**
19
39
  * The base URL path of the release `bundleId`: the updater fetches `<base>?href=<file>` for its manifest and each file.
20
40
  * The id sits in the path because the iOS updater replaces the base URL's whole query when it adds `href`.
@@ -16,6 +16,14 @@ const mobileReleasesPath = "/api/mobile/releases";
16
16
  */
17
17
  const releaseManifestFile = "capawesome-live-update-manifest.json";
18
18
  /**
19
+ * A signed release's statement, `{ payload, signature }`: `payload` the lowercase hex of the JSON `ReleaseBinding`,
20
+ * and `signature` the lowercase hex of the SHA256withRSA of `releaseStatementContext` followed by those decoded bytes. It binds the
21
+ * manifest to the release's order, app, binary and shell, which the per-file signatures say nothing of.
22
+ */
23
+ const releaseStatementFile = "protobase-release.json";
24
+ /** What a statement's signature covers ahead of its payload, so no signed file of the app reads as a statement. */
25
+ const releaseStatementContext = "protobase-mobile-release\n";
26
+ /**
19
27
  * The base URL path of the release `bundleId`: the updater fetches `<base>?href=<file>` for its manifest and each file.
20
28
  * The id sits in the path because the iOS updater replaces the base URL's whole query when it adds `href`.
21
29
  */
@@ -26,4 +34,4 @@ const mobileReleaseQuery = ({ fingerprint, shellVersion }) => new URLSearchParam
26
34
  [mobileReleaseParams.shellVersion]: shellVersion
27
35
  }).toString();
28
36
  //#endregion
29
- export { mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile };
37
+ export { mobileReleaseBasePath, mobileReleaseParams, mobileReleasePath, mobileReleaseQuery, mobileReleasesPath, releaseManifestFile, releaseStatementContext, releaseStatementFile };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/schema",
3
- "version": "0.57.1",
3
+ "version": "0.57.3",
4
4
  "description": "Resource, field, view and access definitions for Protobase configs.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {