@mdsnai/sdk 0.2.2 → 0.3.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.
- package/README.md +40 -76
- package/dist/core/errors.d.ts +14 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +13 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/index.d.ts +16 -4
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +69 -13
- package/dist/core/index.js.map +1 -0
- package/dist/core/markdown-body.d.ts +3 -0
- package/dist/core/markdown-body.d.ts.map +1 -0
- package/dist/core/markdown-body.js +65 -0
- package/dist/core/markdown-body.js.map +1 -0
- package/dist/core/markdown-renderer.d.ts +5 -0
- package/dist/core/markdown-renderer.d.ts.map +1 -0
- package/dist/core/markdown-renderer.js +75 -0
- package/dist/core/markdown-renderer.js.map +1 -0
- package/dist/core/negotiate.d.ts +3 -0
- package/dist/core/negotiate.d.ts.map +1 -0
- package/dist/core/negotiate.js +63 -0
- package/dist/core/negotiate.js.map +1 -0
- package/dist/core/parse/anchors.d.ts +2 -0
- package/dist/core/parse/anchors.d.ts.map +1 -0
- package/dist/core/parse/anchors.js +26 -0
- package/dist/core/parse/anchors.js.map +1 -0
- package/dist/core/parse/block-parser.d.ts +3 -0
- package/dist/core/parse/block-parser.d.ts.map +1 -0
- package/dist/core/parse/block-parser.js +116 -0
- package/dist/core/parse/block-parser.js.map +1 -0
- package/dist/core/parse/executable-block.d.ts +6 -0
- package/dist/core/parse/executable-block.d.ts.map +1 -0
- package/dist/core/parse/executable-block.js +48 -0
- package/dist/core/parse/executable-block.js.map +1 -0
- package/dist/core/parse/frontmatter.d.ts +7 -0
- package/dist/core/parse/frontmatter.d.ts.map +1 -0
- package/dist/core/parse/frontmatter.js +45 -0
- package/dist/core/parse/frontmatter.js.map +1 -0
- package/dist/core/serialize.d.ts +4 -0
- package/dist/core/serialize.d.ts.map +1 -0
- package/dist/core/serialize.js +123 -0
- package/dist/core/serialize.js.map +1 -0
- package/dist/core/types.d.ts +66 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/validate.d.ts +3 -0
- package/dist/core/validate.d.ts.map +1 -0
- package/dist/core/validate.js +91 -0
- package/dist/core/validate.js.map +1 -0
- package/dist/elements/components/mdsn-action.d.ts +6 -0
- package/dist/elements/components/mdsn-action.d.ts.map +1 -0
- package/dist/elements/components/mdsn-action.js +34 -0
- package/dist/elements/components/mdsn-action.js.map +1 -0
- package/dist/elements/components/mdsn-block.d.ts +9 -0
- package/dist/elements/components/mdsn-block.d.ts.map +1 -0
- package/dist/elements/components/mdsn-block.js +36 -0
- package/dist/elements/components/mdsn-block.js.map +1 -0
- package/dist/elements/components/mdsn-error.d.ts +9 -0
- package/dist/elements/components/mdsn-error.d.ts.map +1 -0
- package/dist/elements/components/mdsn-error.js +36 -0
- package/dist/elements/components/mdsn-error.js.map +1 -0
- package/dist/elements/components/mdsn-field.d.ts +6 -0
- package/dist/elements/components/mdsn-field.d.ts.map +1 -0
- package/dist/elements/components/mdsn-field.js +35 -0
- package/dist/elements/components/mdsn-field.js.map +1 -0
- package/dist/elements/components/mdsn-form.d.ts +6 -0
- package/dist/elements/components/mdsn-form.d.ts.map +1 -0
- package/dist/elements/components/mdsn-form.js +22 -0
- package/dist/elements/components/mdsn-form.js.map +1 -0
- package/dist/elements/components/mdsn-page.d.ts +9 -0
- package/dist/elements/components/mdsn-page.d.ts.map +1 -0
- package/dist/elements/components/mdsn-page.js +46 -0
- package/dist/elements/components/mdsn-page.js.map +1 -0
- package/dist/elements/index.d.ts +3 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/index.js +3 -0
- package/dist/elements/index.js.map +1 -0
- package/dist/elements/mount.d.ts +11 -0
- package/dist/elements/mount.d.ts.map +1 -0
- package/dist/elements/mount.js +245 -0
- package/dist/elements/mount.js.map +1 -0
- package/dist/elements/register.d.ts +2 -0
- package/dist/elements/register.d.ts.map +1 -0
- package/dist/elements/register.js +27 -0
- package/dist/elements/register.js.map +1 -0
- package/dist/elements/theme.d.ts +2 -0
- package/dist/elements/theme.d.ts.map +1 -0
- package/dist/elements/theme.js +13 -0
- package/dist/elements/theme.js.map +1 -0
- package/dist/index.d.ts +4 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -35
- package/dist/index.js.map +1 -0
- package/dist/server/hosted-app.d.ts +35 -0
- package/dist/server/hosted-app.d.ts.map +1 -0
- package/dist/server/hosted-app.js +105 -0
- package/dist/server/hosted-app.js.map +1 -0
- package/dist/server/html-render.d.ts +13 -0
- package/dist/server/html-render.d.ts.map +1 -0
- package/dist/server/html-render.js +316 -0
- package/dist/server/html-render.js.map +1 -0
- package/dist/server/index.d.ts +8 -15
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +6 -32
- package/dist/server/index.js.map +1 -0
- package/dist/server/node.d.ts +23 -0
- package/dist/server/node.d.ts.map +1 -0
- package/dist/server/node.js +200 -0
- package/dist/server/node.js.map +1 -0
- package/dist/server/result.d.ts +15 -0
- package/dist/server/result.d.ts.map +1 -0
- package/dist/server/result.js +64 -0
- package/dist/server/result.js.map +1 -0
- package/dist/server/router.d.ts +12 -0
- package/dist/server/router.d.ts.map +1 -0
- package/dist/server/router.js +24 -0
- package/dist/server/router.js.map +1 -0
- package/dist/server/runtime.d.ts +15 -0
- package/dist/server/runtime.d.ts.map +1 -0
- package/dist/server/runtime.js +245 -0
- package/dist/server/runtime.js.map +1 -0
- package/dist/server/session.d.ts +5 -40
- package/dist/server/session.d.ts.map +1 -0
- package/dist/server/session.js +11 -213
- package/dist/server/session.js.map +1 -0
- package/dist/server/types.d.ts +62 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/types.js +2 -0
- package/dist/server/types.js.map +1 -0
- package/dist/web/headless.d.ts +22 -92
- package/dist/web/headless.d.ts.map +1 -0
- package/dist/web/headless.js +311 -337
- package/dist/web/headless.js.map +1 -0
- package/dist/web/index.d.ts +2 -11
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +2 -23
- package/dist/web/index.js.map +1 -0
- package/package.json +19 -43
- package/LICENSE +0 -21
- package/dist/cli/args.d.ts +0 -8
- package/dist/cli/args.js +0 -63
- package/dist/cli/commands/build.d.ts +0 -5
- package/dist/cli/commands/build.js +0 -19
- package/dist/cli/commands/create.d.ts +0 -2
- package/dist/cli/commands/create.js +0 -39
- package/dist/cli/commands/dev.d.ts +0 -10
- package/dist/cli/commands/dev.js +0 -13
- package/dist/cli/commands/start.d.ts +0 -9
- package/dist/cli/commands/start.js +0 -13
- package/dist/cli/entry.d.ts +0 -2
- package/dist/cli/entry.js +0 -8
- package/dist/cli/index.d.ts +0 -9
- package/dist/cli/index.js +0 -58
- package/dist/core/document/frontmatter.d.ts +0 -5
- package/dist/core/document/frontmatter.js +0 -41
- package/dist/core/document/markdown.d.ts +0 -5
- package/dist/core/document/markdown.js +0 -81
- package/dist/core/document/page-definition.d.ts +0 -2
- package/dist/core/document/page-definition.js +0 -23
- package/dist/core/model/block.d.ts +0 -26
- package/dist/core/model/block.js +0 -8
- package/dist/core/model/document.d.ts +0 -11
- package/dist/core/model/document.js +0 -2
- package/dist/core/model/fragment.d.ts +0 -4
- package/dist/core/model/fragment.js +0 -2
- package/dist/core/model/index.d.ts +0 -4
- package/dist/core/model/index.js +0 -2
- package/dist/core/model/input.d.ts +0 -10
- package/dist/core/model/input.js +0 -2
- package/dist/core/protocol/mdsn.d.ts +0 -4
- package/dist/core/protocol/mdsn.js +0 -66
- package/dist/core/protocol/statements.d.ts +0 -7
- package/dist/core/protocol/statements.js +0 -115
- package/dist/core/protocol/validation.d.ts +0 -3
- package/dist/core/protocol/validation.js +0 -70
- package/dist/core/utils/html.d.ts +0 -6
- package/dist/core/utils/html.js +0 -28
- package/dist/core/utils/index.d.ts +0 -2
- package/dist/core/utils/index.js +0 -12
- package/dist/core/utils/logger.d.ts +0 -12
- package/dist/core/utils/logger.js +0 -45
- package/dist/framework/create-framework-app.d.ts +0 -13
- package/dist/framework/create-framework-app.js +0 -12
- package/dist/framework/hosted-app.d.ts +0 -34
- package/dist/framework/hosted-app.js +0 -223
- package/dist/framework/index.d.ts +0 -6
- package/dist/framework/index.js +0 -9
- package/dist/framework/site-app.d.ts +0 -13
- package/dist/framework/site-app.js +0 -147
- package/dist/server/action-context.d.ts +0 -11
- package/dist/server/action-context.js +0 -26
- package/dist/server/action-host.d.ts +0 -2
- package/dist/server/action-host.js +0 -10
- package/dist/server/action-inputs.d.ts +0 -3
- package/dist/server/action-inputs.js +0 -178
- package/dist/server/action-runtime.d.ts +0 -8
- package/dist/server/action-runtime.js +0 -62
- package/dist/server/action.d.ts +0 -33
- package/dist/server/action.js +0 -101
- package/dist/server/build.d.ts +0 -10
- package/dist/server/build.js +0 -170
- package/dist/server/config.d.ts +0 -56
- package/dist/server/config.js +0 -42
- package/dist/server/dev.d.ts +0 -48
- package/dist/server/dev.js +0 -90
- package/dist/server/error-fragments.d.ts +0 -46
- package/dist/server/error-fragments.js +0 -77
- package/dist/server/init.d.ts +0 -1
- package/dist/server/init.js +0 -176
- package/dist/server/layout.d.ts +0 -17
- package/dist/server/layout.js +0 -40
- package/dist/server/markdown.d.ts +0 -49
- package/dist/server/markdown.js +0 -77
- package/dist/server/module-loader.d.ts +0 -4
- package/dist/server/module-loader.js +0 -71
- package/dist/server/negotiate.d.ts +0 -3
- package/dist/server/negotiate.js +0 -61
- package/dist/server/page-host.d.ts +0 -21
- package/dist/server/page-host.js +0 -66
- package/dist/server/page-links.d.ts +0 -10
- package/dist/server/page-links.js +0 -80
- package/dist/server/route-matcher.d.ts +0 -6
- package/dist/server/route-matcher.js +0 -73
- package/dist/server/routes.d.ts +0 -6
- package/dist/server/routes.js +0 -73
- package/dist/server/server.d.ts +0 -28
- package/dist/server/server.js +0 -161
- package/dist/server/site.d.ts +0 -11
- package/dist/server/site.js +0 -59
- package/dist/server/targets.d.ts +0 -7
- package/dist/server/targets.js +0 -21
- package/dist/web/block-runtime.d.ts +0 -2
- package/dist/web/block-runtime.js +0 -25
- package/dist/web/fragment-render.d.ts +0 -8
- package/dist/web/fragment-render.js +0 -58
- package/dist/web/i18n.d.ts +0 -29
- package/dist/web/i18n.js +0 -65
- package/dist/web/navigation.d.ts +0 -3
- package/dist/web/navigation.js +0 -32
- package/dist/web/page-bootstrap.d.ts +0 -6
- package/dist/web/page-bootstrap.js +0 -28
- package/dist/web/page-client-runtime.d.ts +0 -4
- package/dist/web/page-client-runtime.js +0 -7
- package/dist/web/page-client-script.d.ts +0 -1
- package/dist/web/page-client-script.js +0 -579
- package/dist/web/page-html.d.ts +0 -8
- package/dist/web/page-html.js +0 -42
- package/dist/web/page-render.d.ts +0 -20
- package/dist/web/page-render.js +0 -84
- package/dist/web/public-client-runtime.d.ts +0 -1
- package/dist/web/public-client-runtime.js +0 -5
- package/dist/web/public-render.d.ts +0 -12
- package/dist/web/public-render.js +0 -18
- package/dist/web/target-path.d.ts +0 -1
- package/dist/web/target-path.js +0 -35
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.summarizeActionInputs = summarizeActionInputs;
|
|
7
|
-
exports.createActionFilesSignature = createActionFilesSignature;
|
|
8
|
-
exports.loadActionRegistry = loadActionRegistry;
|
|
9
|
-
exports.createActionContext = createActionContext;
|
|
10
|
-
const node_fs_1 = require("node:fs");
|
|
11
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
-
const action_1 = require("./action");
|
|
13
|
-
const action_context_1 = require("./action-context");
|
|
14
|
-
const module_loader_1 = require("./module-loader");
|
|
15
|
-
function toPosixRelativePath(baseDir, filePath) {
|
|
16
|
-
return node_path_1.default.relative(baseDir, filePath).split(node_path_1.default.sep).join("/");
|
|
17
|
-
}
|
|
18
|
-
function summarizeActionInputs(inputs) {
|
|
19
|
-
try {
|
|
20
|
-
const serialized = JSON.stringify(inputs);
|
|
21
|
-
if (!serialized) {
|
|
22
|
-
return "{}";
|
|
23
|
-
}
|
|
24
|
-
return serialized.length > 240 ? `${serialized.slice(0, 237)}...` : serialized;
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return "[unserializable inputs]";
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function createActionFilesSignature(actionFiles, actionsDir) {
|
|
31
|
-
return actionFiles.map((filePath) => {
|
|
32
|
-
const relativePath = toPosixRelativePath(actionsDir, filePath);
|
|
33
|
-
try {
|
|
34
|
-
const stats = (0, node_fs_1.statSync)(filePath);
|
|
35
|
-
return `${relativePath}:${stats.mtimeMs}`;
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
if (error.code === "ENOENT") {
|
|
39
|
-
return `${relativePath}:missing`;
|
|
40
|
-
}
|
|
41
|
-
throw error;
|
|
42
|
-
}
|
|
43
|
-
}).join("|");
|
|
44
|
-
}
|
|
45
|
-
async function loadActionRegistry(actionFiles, actionsDir, options = {}) {
|
|
46
|
-
const entries = [];
|
|
47
|
-
for (const filePath of actionFiles) {
|
|
48
|
-
const actionModule = await (0, module_loader_1.importModuleFromFile)(filePath, { fresh: options.fresh });
|
|
49
|
-
const actionEntries = (0, action_1.resolveActionModuleEntries)(actionModule, filePath);
|
|
50
|
-
const relativePath = toPosixRelativePath(actionsDir, filePath);
|
|
51
|
-
for (const entry of actionEntries) {
|
|
52
|
-
entries.push({
|
|
53
|
-
id: (0, action_1.actionExportNameToActionId)(relativePath, "", entry.exportName),
|
|
54
|
-
action: entry.action,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return (0, action_1.createActionRegistry)(entries);
|
|
59
|
-
}
|
|
60
|
-
function createActionContext(req, siteTitle, siteBaseUrl) {
|
|
61
|
-
return (0, action_context_1.createActionContextFromRequest)(req, { siteTitle, siteBaseUrl });
|
|
62
|
-
}
|
package/dist/server/action.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export type ActionContext = {
|
|
2
|
-
inputs: Record<string, unknown>;
|
|
3
|
-
params: Record<string, string>;
|
|
4
|
-
query: URLSearchParams;
|
|
5
|
-
pathname: string;
|
|
6
|
-
request: unknown;
|
|
7
|
-
cookies: unknown;
|
|
8
|
-
env: Record<string, string | undefined>;
|
|
9
|
-
site: {
|
|
10
|
-
title?: string;
|
|
11
|
-
baseUrl?: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type ActionReturnValue = string;
|
|
15
|
-
export type ActionDefinition = {
|
|
16
|
-
name?: string;
|
|
17
|
-
auth?: boolean;
|
|
18
|
-
run: (ctx: ActionContext) => Promise<ActionReturnValue> | ActionReturnValue;
|
|
19
|
-
};
|
|
20
|
-
export type ActionDefinitionMap = Record<string, ActionDefinition>;
|
|
21
|
-
export type RegisteredAction = {
|
|
22
|
-
id: string;
|
|
23
|
-
action: ActionDefinition;
|
|
24
|
-
exportName?: string;
|
|
25
|
-
};
|
|
26
|
-
export type ActionRegistry = Map<string, ActionDefinition>;
|
|
27
|
-
export declare function defineAction(action: ActionDefinition): ActionDefinition;
|
|
28
|
-
export declare function defineActions(actions: ActionDefinitionMap): ActionDefinitionMap;
|
|
29
|
-
export declare function actionFilePathToActionId(filePath: string, actionsDir: string): string;
|
|
30
|
-
export declare function actionExportNameToActionId(filePath: string, actionsDir: string, exportName?: string): string;
|
|
31
|
-
export declare function resolveActionModuleEntries(actionModule: Record<string, unknown>, filePath: string): RegisteredAction[];
|
|
32
|
-
export declare function createActionRegistry(entries: RegisteredAction[]): ActionRegistry;
|
|
33
|
-
export declare function resolveActionById(registry: ActionRegistry, id: string): ActionDefinition | undefined;
|
package/dist/server/action.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.defineAction = defineAction;
|
|
7
|
-
exports.defineActions = defineActions;
|
|
8
|
-
exports.actionFilePathToActionId = actionFilePathToActionId;
|
|
9
|
-
exports.actionExportNameToActionId = actionExportNameToActionId;
|
|
10
|
-
exports.resolveActionModuleEntries = resolveActionModuleEntries;
|
|
11
|
-
exports.createActionRegistry = createActionRegistry;
|
|
12
|
-
exports.resolveActionById = resolveActionById;
|
|
13
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
14
|
-
function defineAction(action) {
|
|
15
|
-
return action;
|
|
16
|
-
}
|
|
17
|
-
function defineActions(actions) {
|
|
18
|
-
return actions;
|
|
19
|
-
}
|
|
20
|
-
function actionFilePathToActionId(filePath, actionsDir) {
|
|
21
|
-
const normalizedPath = filePath.split(node_path_1.default.sep).join("/");
|
|
22
|
-
const normalizedActionsDir = actionsDir.split(node_path_1.default.sep).join("/");
|
|
23
|
-
const prefix = normalizedActionsDir.endsWith("/") ? normalizedActionsDir : `${normalizedActionsDir}/`;
|
|
24
|
-
const withoutPrefix = normalizedPath.startsWith(prefix) ? normalizedPath.slice(prefix.length) : normalizedPath;
|
|
25
|
-
return withoutPrefix.replace(/\.[^.]+$/, "");
|
|
26
|
-
}
|
|
27
|
-
function normalizeMultiActionBaseId(actionId) {
|
|
28
|
-
if (actionId === "actions") {
|
|
29
|
-
return "";
|
|
30
|
-
}
|
|
31
|
-
if (actionId.endsWith("/actions")) {
|
|
32
|
-
return actionId.slice(0, -"/actions".length);
|
|
33
|
-
}
|
|
34
|
-
return actionId;
|
|
35
|
-
}
|
|
36
|
-
function actionExportNameToActionId(filePath, actionsDir, exportName) {
|
|
37
|
-
const fileActionId = actionFilePathToActionId(filePath, actionsDir);
|
|
38
|
-
if (!exportName) {
|
|
39
|
-
return fileActionId;
|
|
40
|
-
}
|
|
41
|
-
const baseId = normalizeMultiActionBaseId(fileActionId);
|
|
42
|
-
return baseId ? `${baseId}/${exportName}` : exportName;
|
|
43
|
-
}
|
|
44
|
-
function isActionDefinition(value) {
|
|
45
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
const obj = value;
|
|
49
|
-
return typeof obj.run === "function";
|
|
50
|
-
}
|
|
51
|
-
function actionDefinitionEntriesFromMap(candidate) {
|
|
52
|
-
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
const entries = Object.entries(candidate)
|
|
56
|
-
.filter(([key]) => !["default", "action", "actions", "__esModule"].includes(key));
|
|
57
|
-
if (entries.length === 0 || !entries.every(([, value]) => isActionDefinition(value))) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
return entries.map(([exportName, action]) => ({
|
|
61
|
-
id: exportName,
|
|
62
|
-
exportName,
|
|
63
|
-
action: action,
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
function resolveActionModuleEntries(actionModule, filePath) {
|
|
67
|
-
const singleCandidates = [
|
|
68
|
-
actionModule.default,
|
|
69
|
-
actionModule.action,
|
|
70
|
-
actionModule,
|
|
71
|
-
];
|
|
72
|
-
for (const candidate of singleCandidates) {
|
|
73
|
-
if (isActionDefinition(candidate)) {
|
|
74
|
-
return [{ id: "", action: candidate }];
|
|
75
|
-
}
|
|
76
|
-
if (candidate
|
|
77
|
-
&& typeof candidate === "object"
|
|
78
|
-
&& isActionDefinition(candidate.action)) {
|
|
79
|
-
return [{ id: "", action: candidate.action }];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const mapCandidates = [
|
|
83
|
-
actionModule.default?.actions,
|
|
84
|
-
actionModule.actions,
|
|
85
|
-
actionModule.default,
|
|
86
|
-
actionModule,
|
|
87
|
-
];
|
|
88
|
-
for (const candidate of mapCandidates) {
|
|
89
|
-
const entries = actionDefinitionEntriesFromMap(candidate);
|
|
90
|
-
if (entries) {
|
|
91
|
-
return entries;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
throw new Error(`Expected action module at ${filePath} to export defineAction() or defineActions() results`);
|
|
95
|
-
}
|
|
96
|
-
function createActionRegistry(entries) {
|
|
97
|
-
return new Map(entries.map((entry) => [entry.id, entry.action]));
|
|
98
|
-
}
|
|
99
|
-
function resolveActionById(registry, id) {
|
|
100
|
-
return registry.get(id);
|
|
101
|
-
}
|
package/dist/server/build.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type MdsnConfig } from "./config";
|
|
2
|
-
export type BuildOutput = {
|
|
3
|
-
outDir: string;
|
|
4
|
-
pagesManifestPath: string;
|
|
5
|
-
actionsManifestPath: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function buildFrameworkSite(options: {
|
|
8
|
-
rootDir: string;
|
|
9
|
-
config?: MdsnConfig;
|
|
10
|
-
}): Promise<BuildOutput>;
|
package/dist/server/build.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buildFrameworkSite = buildFrameworkSite;
|
|
7
|
-
const node_fs_1 = require("node:fs");
|
|
8
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
const action_1 = require("./action");
|
|
10
|
-
const config_1 = require("./config");
|
|
11
|
-
const page_definition_1 = require("../core/document/page-definition");
|
|
12
|
-
const block_1 = require("../core/model/block");
|
|
13
|
-
const routes_1 = require("./routes");
|
|
14
|
-
const site_1 = require("./site");
|
|
15
|
-
function copyDirectoryContents(sourceDir, destinationDir) {
|
|
16
|
-
const entries = (0, node_fs_1.readdirSync)(sourceDir, { withFileTypes: true });
|
|
17
|
-
(0, node_fs_1.mkdirSync)(destinationDir, { recursive: true });
|
|
18
|
-
for (const entry of entries) {
|
|
19
|
-
const sourcePath = node_path_1.default.join(sourceDir, entry.name);
|
|
20
|
-
const destinationPath = node_path_1.default.join(destinationDir, entry.name);
|
|
21
|
-
if (entry.isDirectory()) {
|
|
22
|
-
copyDirectoryContents(sourcePath, destinationPath);
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
if (entry.isFile()) {
|
|
26
|
-
(0, node_fs_1.mkdirSync)(node_path_1.default.dirname(destinationPath), { recursive: true });
|
|
27
|
-
(0, node_fs_1.copyFileSync)(sourcePath, destinationPath);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
async function buildFrameworkSite(options) {
|
|
32
|
-
const resolvedConfig = (0, config_1.resolveConfig)(options.config ?? {});
|
|
33
|
-
const site = (0, site_1.resolveSitePaths)(options.rootDir, options.config ?? {});
|
|
34
|
-
const outDir = node_path_1.default.join(options.rootDir, "dist");
|
|
35
|
-
const manifestDir = node_path_1.default.join(outDir, "manifest");
|
|
36
|
-
const pagesOutDir = node_path_1.default.join(outDir, resolvedConfig.dirs.pages);
|
|
37
|
-
const serverOutDir = node_path_1.default.join(outDir, resolvedConfig.dirs.server);
|
|
38
|
-
const publicOutDir = node_path_1.default.join(outDir, resolvedConfig.dirs.public);
|
|
39
|
-
const layoutsOutDir = node_path_1.default.join(outDir, resolvedConfig.dirs.layouts);
|
|
40
|
-
const pageFiles = (0, site_1.findPageFiles)(site.pagesDir);
|
|
41
|
-
const actionFiles = (0, site_1.findActionFiles)(site.serverDir);
|
|
42
|
-
(0, node_fs_1.rmSync)(outDir, { recursive: true, force: true });
|
|
43
|
-
(0, node_fs_1.mkdirSync)(manifestDir, { recursive: true });
|
|
44
|
-
const actionFilesById = new Map(actionFiles.map((filePath) => {
|
|
45
|
-
const relativeToServerDir = node_path_1.default.relative(site.serverDir, filePath).split(node_path_1.default.sep).join("/");
|
|
46
|
-
return [(0, action_1.actionFilePathToActionId)(relativeToServerDir, ""), relativeToServerDir];
|
|
47
|
-
}));
|
|
48
|
-
const pagesManifest = pageFiles.map((filePath) => {
|
|
49
|
-
const relativeToPagesDir = node_path_1.default.relative(site.pagesDir, filePath).split(node_path_1.default.sep).join("/");
|
|
50
|
-
return {
|
|
51
|
-
file: relativeToPagesDir,
|
|
52
|
-
routePath: (0, routes_1.pagePathToRoutePath)(`${resolvedConfig.dirs.pages}/${relativeToPagesDir}`, resolvedConfig.dirs.pages),
|
|
53
|
-
};
|
|
54
|
-
}).sort((left, right) => left.routePath.localeCompare(right.routePath));
|
|
55
|
-
const actionsManifest = new Map();
|
|
56
|
-
function normalizeDeclaredActionId(target) {
|
|
57
|
-
const trimmed = String(target).trim();
|
|
58
|
-
if (!trimmed || /^https?:\/\//i.test(trimmed) || trimmed.toLowerCase().endsWith(".md")) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
return trimmed.replace(/^\/+/u, "");
|
|
62
|
-
}
|
|
63
|
-
function addManifestEntry(entry) {
|
|
64
|
-
actionsManifest.set(entry.id, entry);
|
|
65
|
-
}
|
|
66
|
-
function resolveActionsFileEntry(actionId) {
|
|
67
|
-
const directFile = actionFilesById.get(actionId);
|
|
68
|
-
if (directFile) {
|
|
69
|
-
return { id: actionId, file: directFile };
|
|
70
|
-
}
|
|
71
|
-
const segments = actionId.split("/").filter(Boolean);
|
|
72
|
-
const exportName = segments.pop();
|
|
73
|
-
if (!exportName) {
|
|
74
|
-
return null;
|
|
75
|
-
}
|
|
76
|
-
const actionsFileId = segments.length > 0 ? `${segments.join("/")}/actions` : "actions";
|
|
77
|
-
const actionsFile = actionFilesById.get(actionsFileId);
|
|
78
|
-
if (!actionsFile) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
id: actionId,
|
|
83
|
-
file: actionsFile,
|
|
84
|
-
exportName,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
for (const filePath of pageFiles) {
|
|
88
|
-
const pageSource = (0, node_fs_1.readFileSync)(filePath, "utf8");
|
|
89
|
-
let page;
|
|
90
|
-
try {
|
|
91
|
-
page = (0, page_definition_1.parsePageDefinition)(pageSource);
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
for (const block of page.blocks) {
|
|
97
|
-
for (const operation of [...block.reads, ...block.writes]) {
|
|
98
|
-
if ("accept" in operation && (!operation.name || (0, block_1.isStreamAccept)(operation.accept))) {
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
const actionId = normalizeDeclaredActionId(operation.target);
|
|
102
|
-
if (!actionId) {
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
const entry = resolveActionsFileEntry(actionId);
|
|
106
|
-
if (entry) {
|
|
107
|
-
addManifestEntry(entry);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
for (const [actionId, relativeToServerDir] of actionFilesById.entries()) {
|
|
113
|
-
if (actionId === "actions" || actionId.endsWith("/actions")) {
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
if (!actionsManifest.has(actionId)) {
|
|
117
|
-
addManifestEntry({ id: actionId, file: relativeToServerDir });
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
const pagesManifestPath = node_path_1.default.join(manifestDir, "pages.json");
|
|
121
|
-
const actionsManifestPath = node_path_1.default.join(manifestDir, "actions.json");
|
|
122
|
-
(0, node_fs_1.writeFileSync)(pagesManifestPath, JSON.stringify(pagesManifest, null, 2) + "\n", "utf8");
|
|
123
|
-
(0, node_fs_1.writeFileSync)(actionsManifestPath, JSON.stringify(Array.from(actionsManifest.values()).sort((left, right) => left.id.localeCompare(right.id)), null, 2) + "\n", "utf8");
|
|
124
|
-
(0, node_fs_1.writeFileSync)(node_path_1.default.join(outDir, "mdsn.config.json"), JSON.stringify(resolvedConfig, null, 2) + "\n", "utf8");
|
|
125
|
-
try {
|
|
126
|
-
if ((0, node_fs_1.statSync)(site.pagesDir).isDirectory()) {
|
|
127
|
-
copyDirectoryContents(site.pagesDir, pagesOutDir);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
catch (error) {
|
|
131
|
-
if (error.code !== "ENOENT") {
|
|
132
|
-
throw error;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
try {
|
|
136
|
-
if ((0, node_fs_1.statSync)(site.serverDir).isDirectory()) {
|
|
137
|
-
copyDirectoryContents(site.serverDir, serverOutDir);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
catch (error) {
|
|
141
|
-
if (error.code !== "ENOENT") {
|
|
142
|
-
throw error;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
try {
|
|
146
|
-
if ((0, node_fs_1.statSync)(site.publicDir).isDirectory()) {
|
|
147
|
-
copyDirectoryContents(site.publicDir, publicOutDir);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
catch (error) {
|
|
151
|
-
if (error.code !== "ENOENT") {
|
|
152
|
-
throw error;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
try {
|
|
156
|
-
if ((0, node_fs_1.statSync)(site.layoutsDir).isDirectory()) {
|
|
157
|
-
copyDirectoryContents(site.layoutsDir, layoutsOutDir);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
catch (error) {
|
|
161
|
-
if (error.code !== "ENOENT") {
|
|
162
|
-
throw error;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return {
|
|
166
|
-
outDir,
|
|
167
|
-
pagesManifestPath,
|
|
168
|
-
actionsManifestPath,
|
|
169
|
-
};
|
|
170
|
-
}
|
package/dist/server/config.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export type MdsnConfig = {
|
|
2
|
-
site?: {
|
|
3
|
-
title?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
baseUrl?: string;
|
|
6
|
-
};
|
|
7
|
-
server?: {
|
|
8
|
-
port?: number;
|
|
9
|
-
};
|
|
10
|
-
dirs?: {
|
|
11
|
-
pages?: string;
|
|
12
|
-
server?: string;
|
|
13
|
-
public?: string;
|
|
14
|
-
layouts?: string;
|
|
15
|
-
};
|
|
16
|
-
markdown?: {
|
|
17
|
-
linkify?: boolean;
|
|
18
|
-
typographer?: boolean;
|
|
19
|
-
};
|
|
20
|
-
dev?: {
|
|
21
|
-
openBrowser?: boolean;
|
|
22
|
-
};
|
|
23
|
-
i18n?: {
|
|
24
|
-
defaultLocale?: string;
|
|
25
|
-
locales?: string[];
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type ResolvedMdsnConfig = {
|
|
29
|
-
site: {
|
|
30
|
-
title?: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
baseUrl?: string;
|
|
33
|
-
};
|
|
34
|
-
server: {
|
|
35
|
-
port: number;
|
|
36
|
-
};
|
|
37
|
-
dirs: {
|
|
38
|
-
pages: string;
|
|
39
|
-
server: string;
|
|
40
|
-
public: string;
|
|
41
|
-
layouts: string;
|
|
42
|
-
};
|
|
43
|
-
markdown: {
|
|
44
|
-
linkify: boolean;
|
|
45
|
-
typographer: boolean;
|
|
46
|
-
};
|
|
47
|
-
dev: {
|
|
48
|
-
openBrowser: boolean;
|
|
49
|
-
};
|
|
50
|
-
i18n: {
|
|
51
|
-
defaultLocale: string;
|
|
52
|
-
locales: string[];
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export declare function defineConfig(config: MdsnConfig): MdsnConfig;
|
|
56
|
-
export declare function resolveConfig(config: MdsnConfig): ResolvedMdsnConfig;
|
package/dist/server/config.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defineConfig = defineConfig;
|
|
4
|
-
exports.resolveConfig = resolveConfig;
|
|
5
|
-
function defineConfig(config) {
|
|
6
|
-
return config;
|
|
7
|
-
}
|
|
8
|
-
function resolveConfig(config) {
|
|
9
|
-
const locales = (config.i18n?.locales ?? ["en"]).filter((item) => item.trim().length > 0);
|
|
10
|
-
const defaultLocale = config.i18n?.defaultLocale ?? locales[0] ?? "en";
|
|
11
|
-
const normalizedLocales = locales.length > 0 ? locales : [defaultLocale];
|
|
12
|
-
if (!normalizedLocales.includes(defaultLocale)) {
|
|
13
|
-
normalizedLocales.unshift(defaultLocale);
|
|
14
|
-
}
|
|
15
|
-
return {
|
|
16
|
-
site: {
|
|
17
|
-
title: config.site?.title,
|
|
18
|
-
description: config.site?.description,
|
|
19
|
-
baseUrl: config.site?.baseUrl,
|
|
20
|
-
},
|
|
21
|
-
server: {
|
|
22
|
-
port: config.server?.port ?? 3000,
|
|
23
|
-
},
|
|
24
|
-
dirs: {
|
|
25
|
-
pages: config.dirs?.pages ?? "pages",
|
|
26
|
-
server: config.dirs?.server ?? "server",
|
|
27
|
-
public: config.dirs?.public ?? "public",
|
|
28
|
-
layouts: config.dirs?.layouts ?? "layouts",
|
|
29
|
-
},
|
|
30
|
-
markdown: {
|
|
31
|
-
linkify: config.markdown?.linkify ?? true,
|
|
32
|
-
typographer: config.markdown?.typographer ?? false,
|
|
33
|
-
},
|
|
34
|
-
dev: {
|
|
35
|
-
openBrowser: config.dev?.openBrowser ?? true,
|
|
36
|
-
},
|
|
37
|
-
i18n: {
|
|
38
|
-
defaultLocale,
|
|
39
|
-
locales: normalizedLocales,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
}
|
package/dist/server/dev.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export type DevChange = {
|
|
2
|
-
version: number;
|
|
3
|
-
path: string;
|
|
4
|
-
changedAt: number;
|
|
5
|
-
};
|
|
6
|
-
export type DevParseError = {
|
|
7
|
-
path: string;
|
|
8
|
-
message: string;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
};
|
|
11
|
-
export type DevActionError = {
|
|
12
|
-
actionId: string;
|
|
13
|
-
message: string;
|
|
14
|
-
timestamp: number;
|
|
15
|
-
};
|
|
16
|
-
export type DevActionRun = {
|
|
17
|
-
actionId: string;
|
|
18
|
-
pathname: string;
|
|
19
|
-
inputSummary: string;
|
|
20
|
-
status: "ok" | "failure" | "error";
|
|
21
|
-
timestamp: number;
|
|
22
|
-
};
|
|
23
|
-
export type DevEvent = {
|
|
24
|
-
type: "file-change";
|
|
25
|
-
version: number;
|
|
26
|
-
path: string;
|
|
27
|
-
timestamp: number;
|
|
28
|
-
} | ({
|
|
29
|
-
type: "parse-error";
|
|
30
|
-
} & DevParseError) | ({
|
|
31
|
-
type: "action-error";
|
|
32
|
-
} & DevActionError) | ({
|
|
33
|
-
type: "action-run";
|
|
34
|
-
} & DevActionRun);
|
|
35
|
-
export type DevState = {
|
|
36
|
-
getVersion: () => number;
|
|
37
|
-
getLastChangedAt: () => number | null;
|
|
38
|
-
getRecentChanges: () => DevChange[];
|
|
39
|
-
getRecentActionRuns: () => DevActionRun[];
|
|
40
|
-
getRecentEvents: () => DevEvent[];
|
|
41
|
-
getLatestParseError: () => DevParseError | null;
|
|
42
|
-
getLatestActionError: () => DevActionError | null;
|
|
43
|
-
recordActionRun: (run: DevActionRun) => void;
|
|
44
|
-
setLatestParseError: (error: DevParseError | null) => void;
|
|
45
|
-
setLatestActionError: (error: DevActionError | null) => void;
|
|
46
|
-
bumpVersion: (changedPath?: string) => number;
|
|
47
|
-
};
|
|
48
|
-
export declare function createDevState(): DevState;
|
package/dist/server/dev.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDevState = createDevState;
|
|
4
|
-
function createDevState() {
|
|
5
|
-
let version = 0;
|
|
6
|
-
let lastChangedAt = null;
|
|
7
|
-
const recentChanges = [];
|
|
8
|
-
const recentActionRuns = [];
|
|
9
|
-
const recentEvents = [];
|
|
10
|
-
let latestParseError = null;
|
|
11
|
-
let latestActionError = null;
|
|
12
|
-
function recordEvent(event) {
|
|
13
|
-
recentEvents.unshift(event);
|
|
14
|
-
if (recentEvents.length > 20) {
|
|
15
|
-
recentEvents.length = 20;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return {
|
|
19
|
-
getVersion() {
|
|
20
|
-
return version;
|
|
21
|
-
},
|
|
22
|
-
getLastChangedAt() {
|
|
23
|
-
return lastChangedAt;
|
|
24
|
-
},
|
|
25
|
-
getRecentChanges() {
|
|
26
|
-
return [...recentChanges];
|
|
27
|
-
},
|
|
28
|
-
getRecentActionRuns() {
|
|
29
|
-
return [...recentActionRuns];
|
|
30
|
-
},
|
|
31
|
-
getRecentEvents() {
|
|
32
|
-
return [...recentEvents];
|
|
33
|
-
},
|
|
34
|
-
getLatestParseError() {
|
|
35
|
-
return latestParseError;
|
|
36
|
-
},
|
|
37
|
-
getLatestActionError() {
|
|
38
|
-
return latestActionError;
|
|
39
|
-
},
|
|
40
|
-
recordActionRun(run) {
|
|
41
|
-
recentActionRuns.unshift(run);
|
|
42
|
-
if (recentActionRuns.length > 10) {
|
|
43
|
-
recentActionRuns.length = 10;
|
|
44
|
-
}
|
|
45
|
-
recordEvent({
|
|
46
|
-
type: "action-run",
|
|
47
|
-
...run,
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
setLatestParseError(error) {
|
|
51
|
-
latestParseError = error;
|
|
52
|
-
if (error) {
|
|
53
|
-
recordEvent({
|
|
54
|
-
type: "parse-error",
|
|
55
|
-
...error,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
setLatestActionError(error) {
|
|
60
|
-
latestActionError = error;
|
|
61
|
-
if (error) {
|
|
62
|
-
recordEvent({
|
|
63
|
-
type: "action-error",
|
|
64
|
-
...error,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
bumpVersion(changedPath) {
|
|
69
|
-
version += 1;
|
|
70
|
-
lastChangedAt = Date.now();
|
|
71
|
-
if (changedPath) {
|
|
72
|
-
recentChanges.unshift({
|
|
73
|
-
version,
|
|
74
|
-
path: changedPath,
|
|
75
|
-
changedAt: lastChangedAt,
|
|
76
|
-
});
|
|
77
|
-
if (recentChanges.length > 10) {
|
|
78
|
-
recentChanges.length = 10;
|
|
79
|
-
}
|
|
80
|
-
recordEvent({
|
|
81
|
-
type: "file-change",
|
|
82
|
-
version,
|
|
83
|
-
path: changedPath,
|
|
84
|
-
timestamp: lastChangedAt,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
return version;
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type SerializableBlock } from "./markdown";
|
|
2
|
-
export interface RenderErrorFragmentOptions {
|
|
3
|
-
preface?: string[];
|
|
4
|
-
heading?: string;
|
|
5
|
-
message: string;
|
|
6
|
-
nextStep?: string;
|
|
7
|
-
details?: string[];
|
|
8
|
-
block?: SerializableBlock;
|
|
9
|
-
}
|
|
10
|
-
export declare function renderErrorFragment(options: RenderErrorFragmentOptions): string;
|
|
11
|
-
export interface RenderActionNotAvailableFragmentOptions {
|
|
12
|
-
heading?: string;
|
|
13
|
-
message?: string;
|
|
14
|
-
nextStep?: string;
|
|
15
|
-
block?: SerializableBlock;
|
|
16
|
-
}
|
|
17
|
-
export declare function renderActionNotAvailableFragment(options?: RenderActionNotAvailableFragmentOptions): string;
|
|
18
|
-
export interface RenderUnsupportedContentTypeFragmentOptions {
|
|
19
|
-
heading?: string;
|
|
20
|
-
message?: string;
|
|
21
|
-
nextStep?: string;
|
|
22
|
-
block?: SerializableBlock;
|
|
23
|
-
}
|
|
24
|
-
export declare function renderUnsupportedContentTypeFragment(options?: RenderUnsupportedContentTypeFragmentOptions): string;
|
|
25
|
-
export interface RenderInternalErrorFragmentOptions {
|
|
26
|
-
heading?: string;
|
|
27
|
-
message?: string;
|
|
28
|
-
nextStep?: string;
|
|
29
|
-
error?: unknown;
|
|
30
|
-
block?: SerializableBlock;
|
|
31
|
-
}
|
|
32
|
-
export declare function renderInternalErrorFragment(options?: RenderInternalErrorFragmentOptions): string;
|
|
33
|
-
export interface RenderAuthRequiredFragmentOptions {
|
|
34
|
-
heading?: string;
|
|
35
|
-
message?: string;
|
|
36
|
-
nextStep?: string;
|
|
37
|
-
blockName?: string;
|
|
38
|
-
emailInputName?: string;
|
|
39
|
-
passwordInputName?: string;
|
|
40
|
-
loginActionName?: string;
|
|
41
|
-
loginTarget?: string;
|
|
42
|
-
registerActionName?: string;
|
|
43
|
-
registerTarget?: string;
|
|
44
|
-
includeRegisterAction?: boolean;
|
|
45
|
-
}
|
|
46
|
-
export declare function renderAuthRequiredFragment(options?: RenderAuthRequiredFragmentOptions): string;
|