@relyio/sdk 0.15.0 → 0.16.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/CHANGELOG.md +53 -0
- package/dist/chunk-7BZW6XYJ.cjs +433 -0
- package/dist/chunk-CQHEG7QA.js +411 -0
- package/dist/{chunk-PCFTJLEP.js → chunk-DIZY6CKM.js} +2 -2
- package/dist/{chunk-X4KSS7PP.cjs → chunk-GHYB6IZK.cjs} +2 -2
- package/dist/{chunk-PXA5ONIU.js → chunk-NIUOPIIB.js} +384 -549
- package/dist/{chunk-3BHDGUNS.cjs → chunk-RLLZUFDB.cjs} +421 -582
- package/dist/client/index.cjs +4 -3
- package/dist/client/index.d.cts +3 -4
- package/dist/client/index.d.ts +3 -4
- package/dist/client/index.js +2 -1
- package/dist/{define-content-type-Ds5rCAYl.d.ts → define-content-type-CAWSlgn0.d.ts} +528 -79
- package/dist/{define-content-type-B2gQZkTy.d.cts → define-content-type-LkI0rS2W.d.cts} +528 -79
- package/dist/{define-schema-CxpIYFFR.d.ts → define-schema-Dxu3RoHV.d.ts} +1 -1
- package/dist/{define-schema-Cm_5y3ei.d.cts → define-schema-wlsJOrnY.d.cts} +1 -1
- package/dist/{index-DQ7eTUPQ.d.ts → index-BH8JksfG.d.ts} +447 -179
- package/dist/{index-Db3_tmYf.d.ts → index-CGtYxUuh.d.ts} +1 -1
- package/dist/{index-DY64WjZM.d.cts → index-CcHmRALk.d.cts} +1 -1
- package/dist/{index-F0UuHpRj.d.cts → index-D80MXUkf.d.cts} +447 -179
- package/dist/index.cjs +96 -71
- package/dist/index.d.cts +26 -16
- package/dist/index.d.ts +26 -16
- package/dist/index.js +4 -3
- package/dist/markdown/index.cjs +10 -2
- package/dist/markdown/index.d.cts +12 -3
- package/dist/markdown/index.d.ts +12 -3
- package/dist/markdown/index.js +10 -2
- package/dist/preview/index.cjs +29 -0
- package/dist/preview/index.d.cts +117 -0
- package/dist/preview/index.d.ts +117 -0
- package/dist/preview/index.js +4 -0
- package/dist/rich-text/index.d.cts +2 -2
- package/dist/rich-text/index.d.ts +2 -2
- package/dist/schema/index.cjs +33 -33
- package/dist/schema/index.d.cts +3 -3
- package/dist/schema/index.d.ts +3 -3
- package/dist/schema/index.js +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +9 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { defineAssetType, defineContentType, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, fields, fieldset } from './chunk-
|
|
2
|
-
import { LiveEdgeError, SDKError, serviceInstructedDelayMs,
|
|
3
|
-
export { AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, BaseValidationError, ChangesExpiredError, ConnectionError, ContentClient, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LIVE_SOCKET_OPEN_TIMEOUT_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, ServerError, ServiceIndeterminateError, SettingsClient, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, isAssetEntry, isMissingEntry, isPublishableKey, isResourceNotFound, matchRoute, validateFile, versionCheckOf } from './chunk-
|
|
1
|
+
export { defineAssetType, defineContentType, defineLocale, defineQuery, defineSchema, defineSettingsGroup, defineSingleton, fields, fieldset } from './chunk-DIZY6CKM.js';
|
|
2
|
+
import { LiveEdgeError, SDKError, serviceInstructedDelayMs, isAborted, sleep } from './chunk-NIUOPIIB.js';
|
|
3
|
+
export { AssetClient, AssetFileBuilder, AssetUploadBuilder, AuthorizationError, BaseValidationError, ChangesExpiredError, ConnectionError, ContentClient, DefaultRetryPolicy, ErrorMapper, FileUploadError, FileValidationError, HttpClient, InvalidApiKeyError, InvalidPayloadError, LIVE_KEEPALIVE_INTERVAL_MS, LIVE_SOCKET_OPEN_TIMEOUT_MS, LiveEdgeError, MethodNotAllowedError, MissingApiKeyError, NetworkError, PREVIEW_KEY_PREFIX, PUBLISHABLE_KEY_PREFIX, PayloadTooLargeError, PlanFeatureUnavailableError, RateLimitError, ReadOnlyKeyError, ResourceConflictError, ResourceExpiredError, ResourceNotFoundError, SDKError, ServerError, ServiceIndeterminateError, SettingsClient, SingletonClient, TimeoutError, TransactionRolledBackError, TypedRelyIOClient, UnknownContractError, UsageQuotaExceededError, ValidationError, createClient, createClient as default, isAssetEntry, isMissingEntry, isPreviewKey, isPublishableKey, isReplaySafe, isResourceNotFound, matchRoute, retryPolicyFor, validateFile, versionCheckOf } from './chunk-NIUOPIIB.js';
|
|
4
4
|
import './chunk-BBUB7C2Z.js';
|
|
5
|
+
import { VISITOR_ADMISSION_RETRY_AFTER_SECONDS } from './chunk-CQHEG7QA.js';
|
|
5
6
|
import './chunk-IY5LSKXU.js';
|
|
6
7
|
export { camelToSnake, createDeferred, debounce, deepClone, generateId, isBrowser, isNode, isPlainObject, isValidEmail, isValidUrl, mergeDeep, omit, pick, retry, sleep, snakeToCamel, throttle, toSafeString } from './chunk-H6IBQSMM.js';
|
|
7
8
|
export { RICH_TEXT_VOID_TAGS, entryHeadingAnchors, escapeHtml, formatKeyPath, isDeclaredRichTextNode, parseKeyPath, relyioField, renderRichText, richTextHeadingAnchors, richTextHeadingSlug, richTextToHtml, richTextToMarkdown, safeRichTextHref } from './chunk-5UMY6CS4.js';
|
package/dist/markdown/index.cjs
CHANGED
|
@@ -13190,7 +13190,11 @@ function richTextToRelyIOMarkdown(value) {
|
|
|
13190
13190
|
rule: "-",
|
|
13191
13191
|
listItemIndent: "one",
|
|
13192
13192
|
incrementListMarker: true,
|
|
13193
|
-
extensions: [
|
|
13193
|
+
extensions: [
|
|
13194
|
+
GFM,
|
|
13195
|
+
{ ...DIRECTIVES, unsafe: DIRECTIVES_UNSAFE_OUTSIDE_DESTINATIONS },
|
|
13196
|
+
{ unsafe: LITERAL_AUTOLINKS_IN_DIRECTIVE_LABELS }
|
|
13197
|
+
],
|
|
13194
13198
|
handlers: {
|
|
13195
13199
|
text: textHandler,
|
|
13196
13200
|
break: breakHandler,
|
|
@@ -13563,7 +13567,8 @@ var LITERAL_AUTOLINKS_IN_DIRECTIVE_LABELS = [
|
|
|
13563
13567
|
].map((pattern) => ({
|
|
13564
13568
|
...pattern,
|
|
13565
13569
|
inConstruct: "phrasing",
|
|
13566
|
-
|
|
13570
|
+
// A link's destination sits under phrasing too, and a URL there is not a literal autolink.
|
|
13571
|
+
notInConstruct: ["autolink", "destinationLiteral", "destinationRaw"]
|
|
13567
13572
|
}));
|
|
13568
13573
|
var GFM = gfmToMarkdown();
|
|
13569
13574
|
var writeInlineCode = GFM.extensions?.find((extension2) => extension2.handlers?.inlineCode)?.handlers?.inlineCode ?? handle.inlineCode;
|
|
@@ -13572,6 +13577,9 @@ var DIRECTIVES = directiveToMarkdown({
|
|
|
13572
13577
|
preferUnquoted: true,
|
|
13573
13578
|
preferShortcut: false
|
|
13574
13579
|
});
|
|
13580
|
+
var DIRECTIVES_UNSAFE_OUTSIDE_DESTINATIONS = (DIRECTIVES.unsafe ?? []).map(
|
|
13581
|
+
(pattern) => pattern.character === ":" && [pattern.inConstruct].flat().includes("phrasing") && pattern.notInConstruct === void 0 ? { ...pattern, notInConstruct: ["destinationLiteral", "destinationRaw"] } : pattern
|
|
13582
|
+
);
|
|
13575
13583
|
var writeContainer = DIRECTIVES.handlers?.containerDirective;
|
|
13576
13584
|
var containerHandler = /* @__PURE__ */ chunkMWMSFIWN_cjs.__name((node2, parent, state, info) => {
|
|
13577
13585
|
const written = writeContainer(node2, parent, state, info);
|
|
@@ -58,12 +58,21 @@ declare class RichTextMarkdownImportError extends Error {
|
|
|
58
58
|
/**
|
|
59
59
|
* Markdown as the rich-text tree, every node keyed.
|
|
60
60
|
*
|
|
61
|
+
* `V` is the value type of the field the tree goes to, named by where the result is assigned or
|
|
62
|
+
* passed — `create({ body: richTextFromMarkdown(md) })` — and is `MarkdownTree` where nothing names
|
|
63
|
+
* one. The parser reads no schema (see the package's `AGENTS.md`), so it cannot prove the Markdown
|
|
64
|
+
* holds only what that field declares: the type is the caller's claim and the write validates it,
|
|
65
|
+
* as for any tree. What the tree cannot hold at all is still refused.
|
|
66
|
+
*
|
|
61
67
|
* @throws {RichTextMarkdownImportError} when the Markdown holds anything the tree cannot, naming
|
|
62
68
|
* each — nothing is dropped.
|
|
63
69
|
*/
|
|
64
|
-
declare function richTextFromMarkdown(markdown: string, options?: RichTextMarkdownReadOptions):
|
|
65
|
-
/**
|
|
66
|
-
|
|
70
|
+
declare function richTextFromMarkdown<V extends MarkdownTree = MarkdownTree>(markdown: string, options?: RichTextMarkdownReadOptions): V;
|
|
71
|
+
/**
|
|
72
|
+
* Markdown as the rich-text tree, and what it could not place, each in the tree as its nearest
|
|
73
|
+
* reading. `V` is the field's value type, as for {@link richTextFromMarkdown}.
|
|
74
|
+
*/
|
|
75
|
+
declare function readRichTextMarkdown<V extends MarkdownTree = MarkdownTree>(markdown: string, options?: RichTextMarkdownReadOptions): RichTextMarkdownRead<V>;
|
|
67
76
|
/**
|
|
68
77
|
* Markdown holding exactly one `table` or `code` field's value (REL-1806): a table — GitHub's or
|
|
69
78
|
* `:::table` — or a code group, `:::codeGroup` or one fenced block, which is a group of one tab.
|
package/dist/markdown/index.d.ts
CHANGED
|
@@ -58,12 +58,21 @@ declare class RichTextMarkdownImportError extends Error {
|
|
|
58
58
|
/**
|
|
59
59
|
* Markdown as the rich-text tree, every node keyed.
|
|
60
60
|
*
|
|
61
|
+
* `V` is the value type of the field the tree goes to, named by where the result is assigned or
|
|
62
|
+
* passed — `create({ body: richTextFromMarkdown(md) })` — and is `MarkdownTree` where nothing names
|
|
63
|
+
* one. The parser reads no schema (see the package's `AGENTS.md`), so it cannot prove the Markdown
|
|
64
|
+
* holds only what that field declares: the type is the caller's claim and the write validates it,
|
|
65
|
+
* as for any tree. What the tree cannot hold at all is still refused.
|
|
66
|
+
*
|
|
61
67
|
* @throws {RichTextMarkdownImportError} when the Markdown holds anything the tree cannot, naming
|
|
62
68
|
* each — nothing is dropped.
|
|
63
69
|
*/
|
|
64
|
-
declare function richTextFromMarkdown(markdown: string, options?: RichTextMarkdownReadOptions):
|
|
65
|
-
/**
|
|
66
|
-
|
|
70
|
+
declare function richTextFromMarkdown<V extends MarkdownTree = MarkdownTree>(markdown: string, options?: RichTextMarkdownReadOptions): V;
|
|
71
|
+
/**
|
|
72
|
+
* Markdown as the rich-text tree, and what it could not place, each in the tree as its nearest
|
|
73
|
+
* reading. `V` is the field's value type, as for {@link richTextFromMarkdown}.
|
|
74
|
+
*/
|
|
75
|
+
declare function readRichTextMarkdown<V extends MarkdownTree = MarkdownTree>(markdown: string, options?: RichTextMarkdownReadOptions): RichTextMarkdownRead<V>;
|
|
67
76
|
/**
|
|
68
77
|
* Markdown holding exactly one `table` or `code` field's value (REL-1806): a table — GitHub's or
|
|
69
78
|
* `:::table` — or a code group, `:::codeGroup` or one fenced block, which is a group of one tab.
|
package/dist/markdown/index.js
CHANGED
|
@@ -13188,7 +13188,11 @@ function richTextToRelyIOMarkdown(value) {
|
|
|
13188
13188
|
rule: "-",
|
|
13189
13189
|
listItemIndent: "one",
|
|
13190
13190
|
incrementListMarker: true,
|
|
13191
|
-
extensions: [
|
|
13191
|
+
extensions: [
|
|
13192
|
+
GFM,
|
|
13193
|
+
{ ...DIRECTIVES, unsafe: DIRECTIVES_UNSAFE_OUTSIDE_DESTINATIONS },
|
|
13194
|
+
{ unsafe: LITERAL_AUTOLINKS_IN_DIRECTIVE_LABELS }
|
|
13195
|
+
],
|
|
13192
13196
|
handlers: {
|
|
13193
13197
|
text: textHandler,
|
|
13194
13198
|
break: breakHandler,
|
|
@@ -13561,7 +13565,8 @@ var LITERAL_AUTOLINKS_IN_DIRECTIVE_LABELS = [
|
|
|
13561
13565
|
].map((pattern) => ({
|
|
13562
13566
|
...pattern,
|
|
13563
13567
|
inConstruct: "phrasing",
|
|
13564
|
-
|
|
13568
|
+
// A link's destination sits under phrasing too, and a URL there is not a literal autolink.
|
|
13569
|
+
notInConstruct: ["autolink", "destinationLiteral", "destinationRaw"]
|
|
13565
13570
|
}));
|
|
13566
13571
|
var GFM = gfmToMarkdown();
|
|
13567
13572
|
var writeInlineCode = GFM.extensions?.find((extension2) => extension2.handlers?.inlineCode)?.handlers?.inlineCode ?? handle.inlineCode;
|
|
@@ -13570,6 +13575,9 @@ var DIRECTIVES = directiveToMarkdown({
|
|
|
13570
13575
|
preferUnquoted: true,
|
|
13571
13576
|
preferShortcut: false
|
|
13572
13577
|
});
|
|
13578
|
+
var DIRECTIVES_UNSAFE_OUTSIDE_DESTINATIONS = (DIRECTIVES.unsafe ?? []).map(
|
|
13579
|
+
(pattern) => pattern.character === ":" && [pattern.inConstruct].flat().includes("phrasing") && pattern.notInConstruct === void 0 ? { ...pattern, notInConstruct: ["destinationLiteral", "destinationRaw"] } : pattern
|
|
13580
|
+
);
|
|
13573
13581
|
var writeContainer = DIRECTIVES.handlers?.containerDirective;
|
|
13574
13582
|
var containerHandler = /* @__PURE__ */ __name((node2, parent, state, info) => {
|
|
13575
13583
|
const written = writeContainer(node2, parent, state, info);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7BZW6XYJ_cjs = require('../chunk-7BZW6XYJ.cjs');
|
|
4
|
+
require('../chunk-MWMSFIWN.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "PREVIEW_DATASET_PREFIX", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk7BZW6XYJ_cjs.PREVIEW_DATASET_PREFIX; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "UNKNOWN_PREVIEW_RECHECK_MS", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk7BZW6XYJ_cjs.UNKNOWN_PREVIEW_RECHECK_MS; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "previewAtBuild", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunk7BZW6XYJ_cjs.previewAtBuild; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "previewAtRequest", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunk7BZW6XYJ_cjs.previewAtRequest; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "previewDatasetSlug", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunk7BZW6XYJ_cjs.previewDatasetSlug; }
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.cjs.map
|
|
29
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pull request's preview dataset's name (`github-integration-spec.md` decisions 13 and 14).
|
|
3
|
+
*
|
|
4
|
+
* **`INV-GH-PREVIEW-SLUG-IS-DERIVED`.** {@link previewDatasetSlug} is the one function from a Git
|
|
5
|
+
* branch to the name of its preview dataset, stated once for both sides of the boundary:
|
|
6
|
+
*
|
|
7
|
+
* - `relyio ci preview` calls it on the CI token's head branch to name the preview it asks for;
|
|
8
|
+
* - `@relyio/sdk` inlines this root and re-exports it from `@relyio/sdk/preview`, where the client
|
|
9
|
+
* calls it to read that preview from a host's preview deployment, and `@relyio/next` with the
|
|
10
|
+
* branch it inlined at build (`INV-SS-CUSTOMER-FENCE`: this root is the chokepoint the SDK may
|
|
11
|
+
* import a first-party package through);
|
|
12
|
+
* - `manage` refuses a preview whose name is not this function of the token's head branch, so a pull
|
|
13
|
+
* request's job cannot claim a dataset name of its choosing — it checks with this function and
|
|
14
|
+
* never derives a slug another way.
|
|
15
|
+
*
|
|
16
|
+
* Pure, and Workers-safe, as the rest of this root.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The prefix every preview dataset's name carries, so a preview reads as one wherever it is listed.
|
|
20
|
+
* `manage` does not reserve it: a person may name a dataset `preview/…` too, and a pull request whose
|
|
21
|
+
* slug such a dataset holds gets no preview until it is renamed.
|
|
22
|
+
*/
|
|
23
|
+
declare const PREVIEW_DATASET_PREFIX = "preview/";
|
|
24
|
+
/**
|
|
25
|
+
* The name of the preview dataset for `branch`: `preview/<readable>-<hash>`.
|
|
26
|
+
*
|
|
27
|
+
* `<readable>` is the branch lowercased, every run of characters other than `a-z` and `0-9` made one
|
|
28
|
+
* `-`, trimmed of `-` and cut to forty characters; `<hash>` is the first eight hex digits of the
|
|
29
|
+
* SHA-256 of the whole branch, exactly as given. So two branches that read alike — differing only in
|
|
30
|
+
* case or punctuation, or past the fortieth character — still name two datasets, and a branch with
|
|
31
|
+
* nothing readable in it is `preview/<hash>`. A ref spelled `refs/heads/<branch>` is that branch.
|
|
32
|
+
*
|
|
33
|
+
* Every result is a dataset name by `isDatasetName` (`./dataset-name.ts`), and at most 57 characters long.
|
|
34
|
+
*
|
|
35
|
+
* @throws TypeError when `branch` names no branch — an empty string, or `refs/heads/` alone.
|
|
36
|
+
*/
|
|
37
|
+
declare function previewDatasetSlug(branch: string): string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* `@relyio/sdk/preview` — a pull request's preview dataset, found by the deployment built from it
|
|
41
|
+
* (`github-integration-spec.md` decisions 13 and 14).
|
|
42
|
+
*
|
|
43
|
+
* **`INV-GH-PREVIEW-SLUG-IS-DERIVED`.** `previewDatasetSlug` is the one function from a Git branch
|
|
44
|
+
* to the name of its preview dataset. It lives in `@relyio/api-contract`'s root, which this package
|
|
45
|
+
* inlines (`INV-SS-CUSTOMER-FENCE`), and is re-exported here unchanged: `relyio ci preview` calls it
|
|
46
|
+
* to name the preview it asks for; the client calls it to read that preview from a preview
|
|
47
|
+
* deployment; `@relyio/next` calls it with the branch it inlined at build; and `manage` refuses a
|
|
48
|
+
* preview whose name is not it of the CI token's head branch.
|
|
49
|
+
*
|
|
50
|
+
* **Where the branch comes from (amended 2026-10-20).** Only Vercel gives a running site its branch,
|
|
51
|
+
* and only when the project exposes system environment variables: Netlify's functions and Cloudflare's
|
|
52
|
+
* runtimes see none. So:
|
|
53
|
+
*
|
|
54
|
+
* - {@link previewAtRequest} is the client's own read, at construction in the running site: Vercel only.
|
|
55
|
+
* - {@link previewAtBuild} is a framework package's read while the site is built, whose answer it
|
|
56
|
+
* inlines into the site: Vercel and Netlify. Cloudflare Pages names the branch it builds but not
|
|
57
|
+
* whether that is the production branch, so a Pages build is `undecidable` — never guessed.
|
|
58
|
+
*
|
|
59
|
+
* Neither reads `NODE_ENV`. A host builds and runs a preview with `NODE_ENV=production`, the value that
|
|
60
|
+
* switches the `relyio dev` detection off, so the two detections share nothing.
|
|
61
|
+
*
|
|
62
|
+
* This module is pure: it reads the environment it is handed, never `process`.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* How long a running site believes the api's "no such preview" before it asks for the preview again
|
|
67
|
+
* (owner, 2026-10-22, REL-3652): about a minute. `relyio ci preview` can create the preview after the
|
|
68
|
+
* host's build has served its first read, and that instance must not read the configured dataset
|
|
69
|
+
* until it recycles. One value for the client and for `@relyio/next`, which each remember the answer.
|
|
70
|
+
*/
|
|
71
|
+
declare const UNKNOWN_PREVIEW_RECHECK_MS = 60000;
|
|
72
|
+
/** The hosts whose preview deployments this module recognises. */
|
|
73
|
+
type PreviewHost = 'vercel' | 'netlify' | 'cloudflare-pages';
|
|
74
|
+
/**
|
|
75
|
+
* What an environment says about whether it is a host's preview deployment.
|
|
76
|
+
*
|
|
77
|
+
* - `preview` — it is, of `branch`: read the preview dataset `previewDatasetSlug(branch)`.
|
|
78
|
+
* - `not-preview` — production, a branch deploy, local development, or no host this module knows.
|
|
79
|
+
* - `no-branch` — a preview, but the host gave no branch to name its dataset by: on Vercel at request
|
|
80
|
+
* time, a project that does not expose system environment variables.
|
|
81
|
+
* - `undecidable` — a Cloudflare Pages build, which says which branch it builds but not whether that
|
|
82
|
+
* branch is the production one (the spec's Unproven list).
|
|
83
|
+
*
|
|
84
|
+
* Only `preview` reads a preview; every other state reads what the client was configured with.
|
|
85
|
+
*/
|
|
86
|
+
type PreviewDetection = {
|
|
87
|
+
readonly state: 'preview';
|
|
88
|
+
readonly host: PreviewHost;
|
|
89
|
+
readonly branch: string;
|
|
90
|
+
} | {
|
|
91
|
+
readonly state: 'not-preview';
|
|
92
|
+
} | {
|
|
93
|
+
readonly state: 'no-branch';
|
|
94
|
+
readonly host: PreviewHost;
|
|
95
|
+
} | {
|
|
96
|
+
readonly state: 'undecidable';
|
|
97
|
+
readonly host: 'cloudflare-pages';
|
|
98
|
+
};
|
|
99
|
+
/** An environment as `process.env` holds one: names to values, any of them absent. */
|
|
100
|
+
type PreviewEnvironment = Readonly<Record<string, string | undefined>>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the running site is a preview deployment, from what a host gives a site at request time:
|
|
103
|
+
* `VERCEL_ENV === 'preview'`, with its branch in `VERCEL_GIT_COMMIT_REF`. Vercel's alone — Netlify's
|
|
104
|
+
* functions and Cloudflare's runtimes are given no branch.
|
|
105
|
+
*/
|
|
106
|
+
declare function previewAtRequest(env: PreviewEnvironment): PreviewDetection;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the site being built is a preview deployment, from what a host gives a build: Vercel's
|
|
109
|
+
* `VERCEL_ENV === 'preview'` and `VERCEL_GIT_COMMIT_REF`, Netlify's `CONTEXT === 'deploy-preview'` and
|
|
110
|
+
* `HEAD`. A Cloudflare Pages build (`CF_PAGES`) is `undecidable`.
|
|
111
|
+
*
|
|
112
|
+
* A framework package asks this while the site is built and inlines the branch into it, so a preview
|
|
113
|
+
* served by a host that gives the running site no branch still reads its preview.
|
|
114
|
+
*/
|
|
115
|
+
declare function previewAtBuild(env: PreviewEnvironment): PreviewDetection;
|
|
116
|
+
|
|
117
|
+
export { PREVIEW_DATASET_PREFIX, type PreviewDetection, type PreviewEnvironment, type PreviewHost, UNKNOWN_PREVIEW_RECHECK_MS, previewAtBuild, previewAtRequest, previewDatasetSlug };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pull request's preview dataset's name (`github-integration-spec.md` decisions 13 and 14).
|
|
3
|
+
*
|
|
4
|
+
* **`INV-GH-PREVIEW-SLUG-IS-DERIVED`.** {@link previewDatasetSlug} is the one function from a Git
|
|
5
|
+
* branch to the name of its preview dataset, stated once for both sides of the boundary:
|
|
6
|
+
*
|
|
7
|
+
* - `relyio ci preview` calls it on the CI token's head branch to name the preview it asks for;
|
|
8
|
+
* - `@relyio/sdk` inlines this root and re-exports it from `@relyio/sdk/preview`, where the client
|
|
9
|
+
* calls it to read that preview from a host's preview deployment, and `@relyio/next` with the
|
|
10
|
+
* branch it inlined at build (`INV-SS-CUSTOMER-FENCE`: this root is the chokepoint the SDK may
|
|
11
|
+
* import a first-party package through);
|
|
12
|
+
* - `manage` refuses a preview whose name is not this function of the token's head branch, so a pull
|
|
13
|
+
* request's job cannot claim a dataset name of its choosing — it checks with this function and
|
|
14
|
+
* never derives a slug another way.
|
|
15
|
+
*
|
|
16
|
+
* Pure, and Workers-safe, as the rest of this root.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* The prefix every preview dataset's name carries, so a preview reads as one wherever it is listed.
|
|
20
|
+
* `manage` does not reserve it: a person may name a dataset `preview/…` too, and a pull request whose
|
|
21
|
+
* slug such a dataset holds gets no preview until it is renamed.
|
|
22
|
+
*/
|
|
23
|
+
declare const PREVIEW_DATASET_PREFIX = "preview/";
|
|
24
|
+
/**
|
|
25
|
+
* The name of the preview dataset for `branch`: `preview/<readable>-<hash>`.
|
|
26
|
+
*
|
|
27
|
+
* `<readable>` is the branch lowercased, every run of characters other than `a-z` and `0-9` made one
|
|
28
|
+
* `-`, trimmed of `-` and cut to forty characters; `<hash>` is the first eight hex digits of the
|
|
29
|
+
* SHA-256 of the whole branch, exactly as given. So two branches that read alike — differing only in
|
|
30
|
+
* case or punctuation, or past the fortieth character — still name two datasets, and a branch with
|
|
31
|
+
* nothing readable in it is `preview/<hash>`. A ref spelled `refs/heads/<branch>` is that branch.
|
|
32
|
+
*
|
|
33
|
+
* Every result is a dataset name by `isDatasetName` (`./dataset-name.ts`), and at most 57 characters long.
|
|
34
|
+
*
|
|
35
|
+
* @throws TypeError when `branch` names no branch — an empty string, or `refs/heads/` alone.
|
|
36
|
+
*/
|
|
37
|
+
declare function previewDatasetSlug(branch: string): string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* `@relyio/sdk/preview` — a pull request's preview dataset, found by the deployment built from it
|
|
41
|
+
* (`github-integration-spec.md` decisions 13 and 14).
|
|
42
|
+
*
|
|
43
|
+
* **`INV-GH-PREVIEW-SLUG-IS-DERIVED`.** `previewDatasetSlug` is the one function from a Git branch
|
|
44
|
+
* to the name of its preview dataset. It lives in `@relyio/api-contract`'s root, which this package
|
|
45
|
+
* inlines (`INV-SS-CUSTOMER-FENCE`), and is re-exported here unchanged: `relyio ci preview` calls it
|
|
46
|
+
* to name the preview it asks for; the client calls it to read that preview from a preview
|
|
47
|
+
* deployment; `@relyio/next` calls it with the branch it inlined at build; and `manage` refuses a
|
|
48
|
+
* preview whose name is not it of the CI token's head branch.
|
|
49
|
+
*
|
|
50
|
+
* **Where the branch comes from (amended 2026-10-20).** Only Vercel gives a running site its branch,
|
|
51
|
+
* and only when the project exposes system environment variables: Netlify's functions and Cloudflare's
|
|
52
|
+
* runtimes see none. So:
|
|
53
|
+
*
|
|
54
|
+
* - {@link previewAtRequest} is the client's own read, at construction in the running site: Vercel only.
|
|
55
|
+
* - {@link previewAtBuild} is a framework package's read while the site is built, whose answer it
|
|
56
|
+
* inlines into the site: Vercel and Netlify. Cloudflare Pages names the branch it builds but not
|
|
57
|
+
* whether that is the production branch, so a Pages build is `undecidable` — never guessed.
|
|
58
|
+
*
|
|
59
|
+
* Neither reads `NODE_ENV`. A host builds and runs a preview with `NODE_ENV=production`, the value that
|
|
60
|
+
* switches the `relyio dev` detection off, so the two detections share nothing.
|
|
61
|
+
*
|
|
62
|
+
* This module is pure: it reads the environment it is handed, never `process`.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* How long a running site believes the api's "no such preview" before it asks for the preview again
|
|
67
|
+
* (owner, 2026-10-22, REL-3652): about a minute. `relyio ci preview` can create the preview after the
|
|
68
|
+
* host's build has served its first read, and that instance must not read the configured dataset
|
|
69
|
+
* until it recycles. One value for the client and for `@relyio/next`, which each remember the answer.
|
|
70
|
+
*/
|
|
71
|
+
declare const UNKNOWN_PREVIEW_RECHECK_MS = 60000;
|
|
72
|
+
/** The hosts whose preview deployments this module recognises. */
|
|
73
|
+
type PreviewHost = 'vercel' | 'netlify' | 'cloudflare-pages';
|
|
74
|
+
/**
|
|
75
|
+
* What an environment says about whether it is a host's preview deployment.
|
|
76
|
+
*
|
|
77
|
+
* - `preview` — it is, of `branch`: read the preview dataset `previewDatasetSlug(branch)`.
|
|
78
|
+
* - `not-preview` — production, a branch deploy, local development, or no host this module knows.
|
|
79
|
+
* - `no-branch` — a preview, but the host gave no branch to name its dataset by: on Vercel at request
|
|
80
|
+
* time, a project that does not expose system environment variables.
|
|
81
|
+
* - `undecidable` — a Cloudflare Pages build, which says which branch it builds but not whether that
|
|
82
|
+
* branch is the production one (the spec's Unproven list).
|
|
83
|
+
*
|
|
84
|
+
* Only `preview` reads a preview; every other state reads what the client was configured with.
|
|
85
|
+
*/
|
|
86
|
+
type PreviewDetection = {
|
|
87
|
+
readonly state: 'preview';
|
|
88
|
+
readonly host: PreviewHost;
|
|
89
|
+
readonly branch: string;
|
|
90
|
+
} | {
|
|
91
|
+
readonly state: 'not-preview';
|
|
92
|
+
} | {
|
|
93
|
+
readonly state: 'no-branch';
|
|
94
|
+
readonly host: PreviewHost;
|
|
95
|
+
} | {
|
|
96
|
+
readonly state: 'undecidable';
|
|
97
|
+
readonly host: 'cloudflare-pages';
|
|
98
|
+
};
|
|
99
|
+
/** An environment as `process.env` holds one: names to values, any of them absent. */
|
|
100
|
+
type PreviewEnvironment = Readonly<Record<string, string | undefined>>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the running site is a preview deployment, from what a host gives a site at request time:
|
|
103
|
+
* `VERCEL_ENV === 'preview'`, with its branch in `VERCEL_GIT_COMMIT_REF`. Vercel's alone — Netlify's
|
|
104
|
+
* functions and Cloudflare's runtimes are given no branch.
|
|
105
|
+
*/
|
|
106
|
+
declare function previewAtRequest(env: PreviewEnvironment): PreviewDetection;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the site being built is a preview deployment, from what a host gives a build: Vercel's
|
|
109
|
+
* `VERCEL_ENV === 'preview'` and `VERCEL_GIT_COMMIT_REF`, Netlify's `CONTEXT === 'deploy-preview'` and
|
|
110
|
+
* `HEAD`. A Cloudflare Pages build (`CF_PAGES`) is `undecidable`.
|
|
111
|
+
*
|
|
112
|
+
* A framework package asks this while the site is built and inlines the branch into it, so a preview
|
|
113
|
+
* served by a host that gives the running site no branch still reads its preview.
|
|
114
|
+
*/
|
|
115
|
+
declare function previewAtBuild(env: PreviewEnvironment): PreviewDetection;
|
|
116
|
+
|
|
117
|
+
export { PREVIEW_DATASET_PREFIX, type PreviewDetection, type PreviewEnvironment, type PreviewHost, UNKNOWN_PREVIEW_RECHECK_MS, previewAtBuild, previewAtRequest, previewDatasetSlug };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { n as RICH_TEXT_VOID_TAGS, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from '../index-
|
|
1
|
+
export { n as RICH_TEXT_VOID_TAGS, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from '../index-CcHmRALk.cjs';
|
|
2
2
|
import '../rich-text.d-BWc-5gX1.cjs';
|
|
3
|
-
import '../define-content-type-
|
|
3
|
+
import '../define-content-type-LkI0rS2W.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { n as RICH_TEXT_VOID_TAGS, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from '../index-
|
|
1
|
+
export { n as RICH_TEXT_VOID_TAGS, q as RichTextAnchorsOption, t as RichTextAttributes, u as RichTextBlocksOf, v as RichTextDeclaredOf, w as RichTextDeclaredWriters, x as RichTextEntryLinkOf, y as RichTextEntryLinkOption, j as RichTextHtmlDeclaredWriters, k as RichTextHtmlFieldOption, l as RichTextHtmlOptions, z as RichTextInlineOf, m as RichTextMarkdownOptions, A as RichTextNodeContext, B as RichTextRenderable, C as RichTextRenderableOf, D as RichTextReplaceableNode, E as RichTextTag, F as RichTextTarget, e as entryHeadingAnchors, g as escapeHtml, o as isDeclaredRichTextNode, p as renderRichText, d as richTextHeadingAnchors, f as richTextHeadingSlug, h as richTextToHtml, i as richTextToMarkdown, s as safeRichTextHref } from '../index-CGtYxUuh.js';
|
|
2
2
|
import '../rich-text.d-BWc-5gX1.js';
|
|
3
|
-
import '../define-content-type-
|
|
3
|
+
import '../define-content-type-CAWSlgn0.js';
|
package/dist/schema/index.cjs
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkGHYB6IZK_cjs = require('../chunk-GHYB6IZK.cjs');
|
|
4
4
|
require('../chunk-MWMSFIWN.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "BUILT_IN_ROLES", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkGHYB6IZK_cjs.BUILT_IN_ROLES; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "BUILT_IN_ROLE_ACTIONS", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkGHYB6IZK_cjs.BUILT_IN_ROLE_ACTIONS; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "ROLE_ACTIONS", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkGHYB6IZK_cjs.ROLE_ACTIONS; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "buildFallbackChain", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkGHYB6IZK_cjs.buildFallbackChain; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "defineAssetType", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkGHYB6IZK_cjs.defineAssetType; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "defineContentType", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkGHYB6IZK_cjs.defineContentType; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "defineContentTypeWorkflow", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkGHYB6IZK_cjs.defineContentTypeWorkflow; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "defineLocale", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkGHYB6IZK_cjs.defineLocale; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "defineQuery", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkGHYB6IZK_cjs.defineQuery; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "defineRole", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkGHYB6IZK_cjs.defineRole; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "defineSchema", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkGHYB6IZK_cjs.defineSchema; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "defineSettingsGroup", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkGHYB6IZK_cjs.defineSettingsGroup; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "defineSingleton", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkGHYB6IZK_cjs.defineSingleton; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "defineView", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkGHYB6IZK_cjs.defineView; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "defineWorkflow", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkGHYB6IZK_cjs.defineWorkflow; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "defineWorkflowStage", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkGHYB6IZK_cjs.defineWorkflowStage; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "fields", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkGHYB6IZK_cjs.fields; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "fieldset", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkGHYB6IZK_cjs.fieldset; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "findDefaultLocale", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkGHYB6IZK_cjs.findDefaultLocale; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "findWorkflowStage", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkGHYB6IZK_cjs.findWorkflowStage; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "getActiveLocales", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkGHYB6IZK_cjs.getActiveLocales; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "getBuiltInRoleActions", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkGHYB6IZK_cjs.getBuiltInRoleActions; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "getFirstWorkflowStage", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkGHYB6IZK_cjs.getFirstWorkflowStage; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "getLocaleCodes", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkGHYB6IZK_cjs.getLocaleCodes; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "getNextWorkflowStage", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkGHYB6IZK_cjs.getNextWorkflowStage; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "getWorkflowStageIds", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkGHYB6IZK_cjs.getWorkflowStageIds; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "isBuiltInRole", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkGHYB6IZK_cjs.isBuiltInRole; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "isFinalWorkflowStage", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkGHYB6IZK_cjs.isFinalWorkflowStage; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "isLocaleDefinition", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkGHYB6IZK_cjs.isLocaleDefinition; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "isRoleDefinition", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkGHYB6IZK_cjs.isRoleDefinition; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "isWorkflowDefinition", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkGHYB6IZK_cjs.isWorkflowDefinition; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "isWorkflowStageDefinition", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkGHYB6IZK_cjs.isWorkflowStageDefinition; }
|
|
135
135
|
});
|
|
136
136
|
//# sourceMappingURL=index.cjs.map
|
|
137
137
|
//# sourceMappingURL=index.cjs.map
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AggregateBlock, L as AnyQueryParameters, C as CachePolicy, x as CachePolicyObject, M as DeclaredParameters, n as FetchBlock, w as FilterDefinition, F as FullTextSearch, H as HavingOperator, I as IncludeDefinition, u as IncludeRelationship, z as IncludeSubQueries, y as IncludeSubQuery, J as InferQueryParams, G as InferQueryResponse, P as Parameterizable, E as QueryCardinality, Q as QueryConfig, l as QueryDefinition, B as QueryParameter, D as QueryParameterType, K as QueryParameterValue, r as QueryScalar, m as QueryType, R as RolesAsList, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, i as SchemaEntry, j as SchemaEntryOf, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, o as SearchBlock, v as SelectMapping, s as SortCondition, t as SortDirection, V as ViewsAsList, W as WhereCondition, q as WhereOperator, p as WhereValue, k as defineQuery, d as defineSchema } from '../define-schema-
|
|
2
|
-
import { A as AIConfig, a as AnyFieldDefinition, b as AnyKeyedField, c as AssetAIConfig, B as BaseFieldConfig, d as BooleanConfig, C as CodeConfig, D as DateConfig, e as DateTimeConfig, f as DecimalConfig, E as EmailConfig, g as EnumConfig, F as FieldAIConfig, h as FieldDefinition, i as FieldRule, j as FieldType, k as FieldUIConfig, I as IntegerConfig, J as JsonConfig, K as KeyedEnumConfig, l as KeyedField, m as KeyedFieldOptions, n as KeyedFields, o as KeyedFieldsOf, p as KeyedMembers, q as KeyedMembersOf, L as ListConfig, r as LocalizationConfig, s as Localized, t as LocalizedDetails, u as LongTextConfig, O as ObjectConfig, R as ReadOnlyRule, v as ReferenceConfig, w as RequirementRule, x as RichTextConfig, y as RichTextLinks, z as RuleCondition, G as RuleConditions, S as ShortTextConfig, H as SlugConfig, T as TableConfig, M as TagsConfig, U as UrlConfig, V as ValidationRule, N as VisibilityRule, W as WidgetOptions, P as boolean, Q as code, X as date, Y as dateTime, Z as decimal, _ as email, $ as enumField, a0 as integer, a1 as json, a2 as list, a3 as longText, a4 as object, a5 as reference, a6 as richText, a7 as shortText, a8 as slug, a9 as table, aa as tags, ab as url } from '../define-content-type-
|
|
3
|
-
export { b_ as AllScopeConfig, aH as AnyDeclaredFieldset, ak as AssetReading, b2 as AssetServedBlocks, a$ as AssetTypeDefinition, bo as BUILT_IN_ROLES, bq as BUILT_IN_ROLE_ACTIONS, ai as BlockOf, br as BuiltInRole, am as CheckInclude, al as CheckedIncludes, an as ContentReading, aL as ContentTypeDefinition, bX as ContentTypeScopeConfig, bQ as ContentTypeWorkflowConfig, bY as ContentTypesScopeConfig, af as DeclaredFields, aG as DeclaredFieldset, aM as EntryMetadata, bZ as EntryTypeScopeConfig, aJ as FieldMember, ac as FieldSchemaContext, ad as FieldValue, ae as FieldValues, bu as FieldVisibility, aF as Fieldset, b5 as FileKindConfig, bj as FileScanConfig, bi as FileUploadConfig, bb as ImageExifConfig, b7 as ImageFitMode, b3 as ImageKindConfig, b8 as ImageOutputFormat, ba as ImageSourceConfig, b6 as ImageTransform, b9 as ImageUploadConfig, ao as IncludablePaths, b1 as InferAssetEntry, b0 as InferAssetType, aN as InferContentType, ca as InferJsonSchema, aY as InferSettingsGroup, aT as InferSingleton, cb as JsonFieldValue, cc as JsonSchema, cd as JsonValue, ah as Keyed, a_ as KeyedAssetTypeConfig, aK as KeyedContentTypeConfig, aI as KeyedFieldsetConfig, bx as KeyedRoleConfig, by as KeyedRoleDefinition, bz as KeyedRoles, bA as KeyedRolesAsList, aV as KeyedSettingsGroupConfig, aQ as KeyedSingletonConfig, c6 as KeyedViewConfig, c7 as KeyedViewDefinition, c8 as KeyedViews, c9 as KeyedViewsAsList, bR as KeyedWorkflowConfig, bS as KeyedWorkflowStageConfig, bT as KeyedWorkflowStageDefinition, bU as KeyedWorkflowStages, aC as LocaleDefinition, aB as LocaleOptions, aO as LocalePublicationFields, bp as ROLE_ACTIONS, aq as ReadWith, ap as Reading, bt as ResourcePermission, bs as RoleAction, bv as RoleConfig, bw as RoleDefinition, aW as SettingsGroupDefinition, aX as SettingsGroupMetadata, ar as SettingsReading, aj as ShapeValue, aR as SingletonContentTypeDefinition, aS as SingletonMetadata, as as SingletonReading, aA as TextDirection, ag as UnresolvedEntry, at as UntypedReading, bc as VariantDefinition, bf as VideoCaptionsConfig, bg as VideoDownloadConfig, b4 as VideoKindConfig, be as VideoPosterConfig, bd as VideoUploadConfig, bh as VideoWatermarkConfig, c4 as ViewConfig, c5 as ViewDefinition, c3 as ViewFilter, c2 as ViewFilterCondition, b$ as ViewFilterOperator, c1 as ViewFilterRelativeDate, c0 as ViewFilterValue, bW as ViewScopeConfig, bM as WorkflowAutoAssign, bP as WorkflowDefinition, bL as WorkflowEscalation, bN as WorkflowStageConfig, bO as WorkflowStageDefinition, az as buildFallbackChain, aZ as defineAssetType, aD as defineContentType, bD as defineContentTypeWorkflow, au as defineLocale, bk as defineRole, aU as defineSettingsGroup, aP as defineSingleton, bV as defineView, bB as defineWorkflow, bC as defineWorkflowStage, aE as fieldset, ax as findDefaultLocale, bH as findWorkflowStage, ay as getActiveLocales, bn as getBuiltInRoleActions, bJ as getFirstWorkflowStage, aw as getLocaleCodes, bI as getNextWorkflowStage, bG as getWorkflowStageIds, bm as isBuiltInRole, bK as isFinalWorkflowStage, av as isLocaleDefinition, bl as isRoleDefinition, bE as isWorkflowDefinition, bF as isWorkflowStageDefinition } from '../define-content-type-
|
|
1
|
+
export { A as AggregateBlock, L as AnyQueryParameters, C as CachePolicy, x as CachePolicyObject, M as DeclaredParameters, n as FetchBlock, w as FilterDefinition, F as FullTextSearch, H as HavingOperator, I as IncludeDefinition, u as IncludeRelationship, z as IncludeSubQueries, y as IncludeSubQuery, J as InferQueryParams, G as InferQueryResponse, P as Parameterizable, E as QueryCardinality, Q as QueryConfig, l as QueryDefinition, B as QueryParameter, D as QueryParameterType, K as QueryParameterValue, r as QueryScalar, m as QueryType, R as RolesAsList, h as SchemaAssetTypeNames, S as SchemaConfig, b as SchemaContentTypeNames, a as SchemaDefinition, i as SchemaEntry, j as SchemaEntryOf, f as SchemaLocaleCodes, e as SchemaQueryNames, g as SchemaSettingsGroupNames, c as SchemaSingletonNames, o as SearchBlock, v as SelectMapping, s as SortCondition, t as SortDirection, V as ViewsAsList, W as WhereCondition, q as WhereOperator, p as WhereValue, k as defineQuery, d as defineSchema } from '../define-schema-wlsJOrnY.cjs';
|
|
2
|
+
import { A as AIConfig, a as AnyFieldDefinition, b as AnyKeyedField, c as AssetAIConfig, B as BaseFieldConfig, d as BooleanConfig, C as CodeConfig, D as DateConfig, e as DateTimeConfig, f as DecimalConfig, E as EmailConfig, g as EnumConfig, F as FieldAIConfig, h as FieldDefinition, i as FieldRule, j as FieldType, k as FieldUIConfig, I as IntegerConfig, J as JsonConfig, K as KeyedEnumConfig, l as KeyedField, m as KeyedFieldOptions, n as KeyedFields, o as KeyedFieldsOf, p as KeyedMembers, q as KeyedMembersOf, L as ListConfig, r as LocalizationConfig, s as Localized, t as LocalizedDetails, u as LongTextConfig, O as ObjectConfig, R as ReadOnlyRule, v as ReferenceConfig, w as RequirementRule, x as RichTextConfig, y as RichTextLinks, z as RuleCondition, G as RuleConditions, S as ShortTextConfig, H as SlugConfig, T as TableConfig, M as TagsConfig, U as UrlConfig, V as ValidationRule, N as VisibilityRule, W as WidgetOptions, P as boolean, Q as code, X as date, Y as dateTime, Z as decimal, _ as email, $ as enumField, a0 as integer, a1 as json, a2 as list, a3 as longText, a4 as object, a5 as reference, a6 as richText, a7 as shortText, a8 as slug, a9 as table, aa as tags, ab as url } from '../define-content-type-LkI0rS2W.cjs';
|
|
3
|
+
export { b_ as AllScopeConfig, aH as AnyDeclaredFieldset, ak as AssetReading, b2 as AssetServedBlocks, a$ as AssetTypeDefinition, bo as BUILT_IN_ROLES, bq as BUILT_IN_ROLE_ACTIONS, ai as BlockOf, br as BuiltInRole, am as CheckInclude, al as CheckedIncludes, an as ContentReading, aL as ContentTypeDefinition, bX as ContentTypeScopeConfig, bQ as ContentTypeWorkflowConfig, bY as ContentTypesScopeConfig, af as DeclaredFields, aG as DeclaredFieldset, aM as EntryMetadata, bZ as EntryTypeScopeConfig, aJ as FieldMember, ac as FieldSchemaContext, ad as FieldValue, ae as FieldValues, bu as FieldVisibility, aF as Fieldset, b5 as FileKindConfig, bj as FileScanConfig, bi as FileUploadConfig, bb as ImageExifConfig, b7 as ImageFitMode, b3 as ImageKindConfig, b8 as ImageOutputFormat, ba as ImageSourceConfig, b6 as ImageTransform, b9 as ImageUploadConfig, ao as IncludablePaths, b1 as InferAssetEntry, b0 as InferAssetType, aN as InferContentType, ca as InferJsonSchema, aY as InferSettingsGroup, aT as InferSingleton, cb as JsonFieldValue, cc as JsonSchema, cd as JsonValue, ah as Keyed, a_ as KeyedAssetTypeConfig, aK as KeyedContentTypeConfig, aI as KeyedFieldsetConfig, bx as KeyedRoleConfig, by as KeyedRoleDefinition, bz as KeyedRoles, bA as KeyedRolesAsList, aV as KeyedSettingsGroupConfig, aQ as KeyedSingletonConfig, c6 as KeyedViewConfig, c7 as KeyedViewDefinition, c8 as KeyedViews, c9 as KeyedViewsAsList, bR as KeyedWorkflowConfig, bS as KeyedWorkflowStageConfig, bT as KeyedWorkflowStageDefinition, bU as KeyedWorkflowStages, aC as LocaleDefinition, aB as LocaleOptions, aO as LocalePublicationFields, bp as ROLE_ACTIONS, aq as ReadWith, ap as Reading, bt as ResourcePermission, bs as RoleAction, bv as RoleConfig, bw as RoleDefinition, aW as SettingsGroupDefinition, aX as SettingsGroupMetadata, ar as SettingsReading, aj as ShapeValue, aR as SingletonContentTypeDefinition, aS as SingletonMetadata, as as SingletonReading, aA as TextDirection, ag as UnresolvedEntry, at as UntypedReading, bc as VariantDefinition, bf as VideoCaptionsConfig, bg as VideoDownloadConfig, b4 as VideoKindConfig, be as VideoPosterConfig, bd as VideoUploadConfig, bh as VideoWatermarkConfig, c4 as ViewConfig, c5 as ViewDefinition, c3 as ViewFilter, c2 as ViewFilterCondition, b$ as ViewFilterOperator, c1 as ViewFilterRelativeDate, c0 as ViewFilterValue, bW as ViewScopeConfig, bM as WorkflowAutoAssign, bP as WorkflowDefinition, bL as WorkflowEscalation, bN as WorkflowStageConfig, bO as WorkflowStageDefinition, az as buildFallbackChain, aZ as defineAssetType, aD as defineContentType, bD as defineContentTypeWorkflow, au as defineLocale, bk as defineRole, aU as defineSettingsGroup, aP as defineSingleton, bV as defineView, bB as defineWorkflow, bC as defineWorkflowStage, aE as fieldset, ax as findDefaultLocale, bH as findWorkflowStage, ay as getActiveLocales, bn as getBuiltInRoleActions, bJ as getFirstWorkflowStage, aw as getLocaleCodes, bI as getNextWorkflowStage, bG as getWorkflowStageIds, bm as isBuiltInRole, bK as isFinalWorkflowStage, av as isLocaleDefinition, bl as isRoleDefinition, bE as isWorkflowDefinition, bF as isWorkflowStageDefinition } from '../define-content-type-LkI0rS2W.cjs';
|
|
4
4
|
import '../rich-text.d-BWc-5gX1.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|