@riebeckite/core 0.0.27 → 0.0.28

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.
@@ -11,6 +11,7 @@ type ContentBuildCoordinatorDependencies = {
11
11
  readonly getEntries: () => Promise<readonly ContentSourceEntry[]>;
12
12
  readonly readEntry: (entry: ContentSourceEntry) => Promise<string>;
13
13
  readonly observability: Observability;
14
+ readonly includeFileMetadata: boolean;
14
15
  };
15
16
  export declare class ContentBuildCoordinator {
16
17
  private readonly dependencies;
@@ -1,7 +1,7 @@
1
1
  import type { ContentManifestEntry } from "../types/content_manifest.js";
2
2
  import type { ContentSourceEntry } from "./content_source.js";
3
3
  import type { OutputDescriptor } from "./output_dependency.js";
4
- export declare const CONTENT_BUILD_STATE_VERSION = 16;
4
+ export declare const CONTENT_BUILD_STATE_VERSION = 19;
5
5
  /**
6
6
  * Build state lives under `<content directory>/.riebeckite`. That directory is
7
7
  * build-time state, not content, so content sources must exclude it from scans
@@ -36,11 +36,12 @@ export type ManifestHookCacheEntry = {
36
36
  readonly cacheable: boolean;
37
37
  readonly pipelineFingerprint: string | undefined;
38
38
  readonly inputFingerprint: string;
39
- readonly outputFingerprint: string;
40
- readonly snapshot: ManifestHookSnapshot;
39
+ readonly outputFingerprint?: string;
40
+ readonly snapshot?: ManifestHookSnapshot;
41
41
  };
42
42
  export type ManifestHookSnapshot = {
43
43
  readonly entries: readonly ContentManifestEntry[];
44
+ readonly order?: readonly string[];
44
45
  };
45
46
  export type PersistedExternalDependency = {
46
47
  readonly id: string;
@@ -7,4 +7,3 @@ export type ContentChangeSet = {
7
7
  };
8
8
  export declare function diffContentEntries(previous: ContentBuildState, current: readonly FingerprintedContentEntry[]): ContentChangeSet;
9
9
  export declare function allContentChanged(entries: readonly FingerprintedContentEntry[]): ContentChangeSet;
10
- export declare function hasContentChanges(changeSet: ContentChangeSet): boolean;
@@ -1,3 +1,3 @@
1
1
  import type { FingerprintedContentEntry } from "./content_build_state.js";
2
2
  import type { ContentSourceContent, ContentSourceEntry } from "./content_source.js";
3
- export declare function fingerprintContentEntries(entries: readonly ContentSourceEntry[], read: (entry: ContentSourceEntry) => Promise<ContentSourceContent>): Promise<readonly FingerprintedContentEntry[]>;
3
+ export declare function fingerprintContentEntries(entries: readonly ContentSourceEntry[], read: (entry: ContentSourceEntry) => Promise<ContentSourceContent>, includeMetadata?: boolean): Promise<readonly FingerprintedContentEntry[]>;
@@ -1,2 +1,3 @@
1
1
  import type { ContentLink } from "../types/content_manifest.js";
2
2
  export declare function extractContentLinks(markdown: string, contentIndex: Map<string, string>): ContentLink[];
3
+ export declare function extractMarkdownLinkUrls(markdown: string): string[];
@@ -27,7 +27,7 @@ export declare class ContentManager {
27
27
  private pipelineOptions;
28
28
  private source;
29
29
  private contentIndexBuilder;
30
- private manifestBuilder;
30
+ private manifestAssembler;
31
31
  private pluginRuntime;
32
32
  private contentIndex;
33
33
  private contentIndexAmbiguities;
@@ -78,8 +78,6 @@ export declare class ContentManager {
78
78
  inspect(): Promise<ContentInspection>;
79
79
  dispose(): Promise<void>;
80
80
  getContentLocations(): Promise<ReadonlyMap<string, ContentPublicLocation>>;
81
- private applyPublicView;
82
- private synchronizeManifestHtml;
83
81
  private publishStrategy;
84
82
  private reuseManifestEntry;
85
83
  private getPipelineFingerprint;
@@ -0,0 +1,14 @@
1
+ import type { ContentManifestEntry } from "../types/content_manifest.js";
2
+ import type { ContentBuildPlan } from "./content_build_plan.js";
3
+ type ReuseManifestEntryInput = {
4
+ readonly slug: string;
5
+ readonly plan: ContentBuildPlan;
6
+ readonly pipelineFingerprint: string | undefined;
7
+ readonly getContentCacheFingerprint: () => string | undefined;
8
+ };
9
+ type ReusedManifestEntry = {
10
+ readonly entry: ContentManifestEntry;
11
+ readonly contentCacheFingerprint: string;
12
+ };
13
+ export declare function reuseManifestEntry(input: ReuseManifestEntryInput): ReusedManifestEntry | null;
14
+ export {};
@@ -1,4 +1,5 @@
1
1
  export type ContentSourceMetadata = {
2
+ readonly createdAt?: number;
2
3
  readonly modifiedAt?: number;
3
4
  readonly size?: number;
4
5
  readonly etag?: string;
@@ -0,0 +1,13 @@
1
+ import type { ContentManifest, ContentManifestEntry } from "../types/content_manifest.js";
2
+ import type { PostContent } from "../types/post_content.js";
3
+ import type { PublishStrategy } from "../types/publish_strategy.js";
4
+ import { ManifestBuilder } from "./manifest_builder.js";
5
+ export declare class ManifestAssembler {
6
+ private readonly contentCache;
7
+ private readonly builder;
8
+ constructor(contentCache: Map<string, PostContent>);
9
+ createEntry(...args: Parameters<ManifestBuilder["createEntry"]>): ContentManifestEntry;
10
+ build(...args: Parameters<ManifestBuilder["build"]>): ContentManifest;
11
+ applyPublicView(manifest: ContentManifest, strategy: PublishStrategy, publishingBuildTime: Date): void;
12
+ synchronizeHtml(manifest: ContentManifest, preHookEntries: readonly ContentManifestEntry[]): void;
13
+ }
@@ -1,7 +1,8 @@
1
1
  import type { ContentManifest, ContentManifestEntry, ContentPublicLocation } from "../types/content_manifest.js";
2
2
  import type { PostContent } from "../types/post_content.js";
3
+ import type { ContentSourceMetadata } from "./content_source.js";
3
4
  import type { ResolvedPublishingState } from "./publishing.js";
4
5
  export declare class ManifestBuilder {
5
- createEntry(slug: string, markdown: string, processed: PostContent, contentIndex: Map<string, string>, location: ContentPublicLocation, publishing: ResolvedPublishingState): ContentManifestEntry;
6
+ createEntry(slug: string, markdown: string, processed: PostContent, contentIndex: Map<string, string>, location: ContentPublicLocation, publishing: ResolvedPublishingState, sourceMetadata?: ContentSourceMetadata): ContentManifestEntry;
6
7
  build(entries: ContentManifestEntry[], contentIndex: Map<string, string>, contentIndexAmbiguities?: ReadonlyMap<string, readonly string[]>): ContentManifest;
7
8
  }
@@ -1,7 +1,15 @@
1
- import type { ContentManifest } from "../types/content_manifest.js";
1
+ import type { ContentManifest, ContentManifestEntry } from "../types/content_manifest.js";
2
2
  import type { ManifestHookCacheEntry, ManifestHookSnapshot } from "./content_build_state.js";
3
3
  export declare function fingerprintManifestHookInput(manifest: ContentManifest): string;
4
- export declare function createManifestHookCacheEntry(pluginName: string, cacheable: boolean, pipelineFingerprint: string | undefined, inputFingerprint: string, manifest: ContentManifest): ManifestHookCacheEntry;
4
+ export declare function serializeManifestEntries(entries: readonly ContentManifestEntry[]): Map<string, string>;
5
+ export declare function createManifestHookCacheEntry(pluginName: string, cacheable: boolean, pipelineFingerprint: string | undefined, inputFingerprint: string, manifest: ContentManifest, beforeEntries: ReadonlyMap<string, string>, afterEntries: ReadonlyMap<string, string>): ManifestHookCacheEntry;
5
6
  export declare function fingerprintManifestHookSideEffects(manifest: ContentManifest): string;
6
- export declare function fingerprintManifestHookSnapshot(snapshot: ManifestHookSnapshot, manifest: ContentManifest): string;
7
+ export declare function fingerprintManifestHookSnapshot(manifest: ContentManifest): string;
8
+ export type ManifestHookRestorePoint = {
9
+ readonly entries: readonly ContentManifestEntry[];
10
+ readonly publicEntries: ContentManifest["publicEntries"];
11
+ readonly discoverableEntries: ContentManifest["discoverableEntries"];
12
+ };
13
+ export declare function captureManifestHookRestorePoint(manifest: ContentManifest): ManifestHookRestorePoint;
14
+ export declare function restoreManifestHookEntries(manifest: ContentManifest, point: ManifestHookRestorePoint): boolean;
7
15
  export declare function applyManifestHookSnapshot(manifest: ContentManifest, snapshot: ManifestHookSnapshot): boolean;
@@ -1,6 +1,7 @@
1
1
  import type { ContentManifest } from "../types/content_manifest.js";
2
2
  import type { ExternalDependencyFailure, ExternalDependencySnapshot } from "../types/external_dependency.js";
3
3
  import type { OutputDependency } from "../types/output_dependency.js";
4
+ import type { ContentOutputDependencyResolver } from "../types/plugin.js";
4
5
  import type { ContentBuildState } from "./content_build_state.js";
5
6
  import type { ContentChangeSet } from "./content_change_set.js";
6
7
  export type OutputKind = "content" | "redirect" | "plugin-page" | "generated";
@@ -29,9 +30,10 @@ export declare function determineOutputChanges(input: {
29
30
  readonly dependent: ReadonlySet<string>;
30
31
  };
31
32
  readonly pluginPageOutputs?: readonly OutputDescriptor[];
32
- readonly contentOutputDependencies?: readonly OutputDependency[];
33
+ readonly contentOutputDependencies?: readonly OutputDependency[] | ContentOutputDependencyResolver;
33
34
  readonly externalDependencies?: readonly ExternalDependencySnapshot[];
34
35
  readonly externalDependencyFailures?: readonly ExternalDependencyFailure[];
36
+ readonly contentFingerprints?: ReadonlyMap<string, string | undefined>;
35
37
  }): OutputChangeSet;
36
- export declare function buildOutputInventory(manifest: ContentManifest, pluginPageOutputs?: readonly OutputDescriptor[], contentOutputDependencies?: readonly OutputDependency[]): readonly OutputDescriptor[];
38
+ export declare function buildOutputInventory(manifest: ContentManifest, pluginPageOutputs?: readonly OutputDescriptor[], contentOutputDependencies?: readonly OutputDependency[] | ContentOutputDependencyResolver): readonly OutputDescriptor[];
37
39
  export declare function htmlOutputPath(pathname: string): string;
@@ -0,0 +1,2 @@
1
+ import type { MarkdownEmbedFragment } from "./types/plugin_pipeline.js";
2
+ export declare function selectEmbedMarkdownFragment(markdown: string, fragment: MarkdownEmbedFragment | null): string | null;
@@ -0,0 +1,8 @@
1
+ import type { Node } from "unist";
2
+ import type { MarkdownPipelineContext } from "./types/plugin_pipeline.js";
3
+ type LinkNormalizationContext = MarkdownPipelineContext & {
4
+ recordLinkResolution?: (id: string, value: string) => void;
5
+ };
6
+ export declare function normalizeMarkdownLinks(context: LinkNormalizationContext): (tree: Node) => void;
7
+ export declare function resolveLinkDependencyValue(id: string, contentIndex: ReadonlyMap<string, string>, lookupPermalink: (slug: string) => string | undefined, isRoutable: ((slug: string) => boolean) | undefined): string;
8
+ export {};
@@ -0,0 +1,42 @@
1
+ import type { ManifestHookCacheEntry } from "../content/content_build_state.js";
2
+ import type { ContentManifest } from "../types/content_manifest.js";
3
+ import type { RiebeckitePlugin } from "../types/plugin.js";
4
+ import type { PluginContextBase, PluginContextWithCache } from "./plugin_runtime_context.js";
5
+ export type ManifestHookMetrics = Readonly<{
6
+ manifestHooksExecuted: number;
7
+ manifestHooksReused: number;
8
+ manifestHookCacheHit: number;
9
+ manifestHookCacheMiss: number;
10
+ manifestHookDurationMs: number;
11
+ byPlugin: Readonly<Record<string, ManifestHookPluginMetrics>>;
12
+ }>;
13
+ export type ManifestHookPluginMetrics = Readonly<{
14
+ executed: number;
15
+ reused: number;
16
+ cacheHit: number;
17
+ cacheMiss: number;
18
+ durationMs: number;
19
+ reason: string;
20
+ }>;
21
+ type ManifestHookRunnerOptions = {
22
+ readonly plugins: () => readonly RiebeckitePlugin[];
23
+ readonly createContext: (contentIndex: Map<string, string>) => PluginContextBase;
24
+ readonly createPluginContext: <TContext extends PluginContextBase>(plugin: RiebeckitePlugin, context: TContext) => PluginContextWithCache<TContext>;
25
+ readonly generatedOutputCount: () => number;
26
+ readonly diagnosticCount: () => number;
27
+ };
28
+ export declare class ManifestHookRunner {
29
+ private readonly options;
30
+ private manifestHooksExecuted;
31
+ private manifestHookDurationMs;
32
+ private manifestHooksReused;
33
+ private manifestHookCache;
34
+ private manifestHookMetricsByPlugin;
35
+ constructor(options: ManifestHookRunnerOptions);
36
+ getMetrics(): ManifestHookMetrics;
37
+ getNoChangeFastPathBlockReason(previousCache: readonly ManifestHookCacheEntry[], pipelineFingerprint: string | undefined): string | undefined;
38
+ getCache(): readonly ManifestHookCacheEntry[];
39
+ runManifestCreated(manifest: ContentManifest, contentIndex: Map<string, string>, previousCache: readonly ManifestHookCacheEntry[], pipelineFingerprint: string | undefined): Promise<void>;
40
+ private recordManifestHookMetric;
41
+ }
42
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { OutputDescriptor } from "../content/output_dependency.js";
2
+ import type { ContentManifest, PluginPageRoute } from "../types/content_manifest.js";
3
+ import type { RiebeckitePlugin } from "../types/plugin.js";
4
+ import type { ResolvedPluginPage } from "../types/plugin_page.js";
5
+ import type { PluginContextBase, PluginContextWithCache } from "./plugin_runtime_context.js";
6
+ type PluginPageResolverOptions = {
7
+ readonly plugins: () => readonly RiebeckitePlugin[];
8
+ readonly createContext: (contentIndex: Map<string, string>) => PluginContextBase;
9
+ readonly createPluginContext: <TContext extends PluginContextBase>(plugin: RiebeckitePlugin, context: TContext) => PluginContextWithCache<TContext>;
10
+ };
11
+ export declare class PluginPageResolver {
12
+ private readonly options;
13
+ private pageDeclarations;
14
+ constructor(options: PluginPageResolverOptions);
15
+ resolvePage(pathname: string, manifest: ContentManifest, contentIndex: Map<string, string>): Promise<ResolvedPluginPage | null>;
16
+ getPagePaths(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<readonly string[]>;
17
+ getPageRoutes(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<readonly PluginPageRoute[]>;
18
+ getPageOutputs(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<readonly OutputDescriptor[]>;
19
+ private getPageDeclarations;
20
+ private resolvePageDeclarations;
21
+ }
22
+ export declare function collectPageTypeOwners(plugins: readonly RiebeckitePlugin[]): void;
23
+ export {};
@@ -5,54 +5,28 @@ import type { ContentLocationInput, ContentManifest, ContentManifestEntry, Conte
5
5
  import type { Diagnostic } from "../types/diagnostic.js";
6
6
  import type { ExternalDependencyFailure, ExternalDependencySnapshot } from "../types/external_dependency.js";
7
7
  import type { GeneratedOutput, GeneratedOutputContent } from "../types/generated_output.js";
8
- import type { OutputDependency } from "../types/output_dependency.js";
8
+ import type { ContentOutputDependencyResolver } from "../types/plugin.js";
9
9
  import { type PluginClientEntry } from "../types/plugin_asset.js";
10
10
  import type { ResolvedPluginPage } from "../types/plugin_page.js";
11
11
  import type { PostContent } from "../types/post_content.js";
12
- /**
13
- * Explicit build lifecycle stages. `idle` means no build lifecycle has been
14
- * requested yet; the remaining values name the stage currently executing.
15
- * Once `started` is reached the lifecycle never runs again.
16
- */
17
- export type PluginBuildStage = "idle" | "setup" | "buildStart" | "onConfigResolved" | "started";
18
- export type ManifestHookMetrics = Readonly<{
19
- manifestHooksExecuted: number;
20
- manifestHooksReused: number;
21
- manifestHookCacheHit: number;
22
- manifestHookCacheMiss: number;
23
- manifestHookDurationMs: number;
24
- byPlugin: Readonly<Record<string, ManifestHookPluginMetrics>>;
25
- }>;
26
- export type ManifestHookPluginMetrics = Readonly<{
27
- executed: number;
28
- reused: number;
29
- cacheHit: number;
30
- cacheMiss: number;
31
- durationMs: number;
32
- reason: string;
33
- }>;
12
+ import { type ManifestHookMetrics } from "./manifest_hooks.js";
13
+ export type { ManifestHookMetrics, ManifestHookPluginMetrics, } from "./manifest_hooks.js";
34
14
  export declare class PluginRuntime {
35
15
  private pipelineOptions;
36
16
  private buildLifecycle;
37
- private buildStage;
38
17
  private disposed;
39
18
  private diagnostics;
40
19
  private pluginCaches;
41
20
  private generatedOutputs;
42
21
  private isBuildTime;
43
22
  private resolvedPlugins;
44
- private pageDeclarations;
45
23
  private externalDependencies;
46
24
  private externalDependencyFailures;
47
25
  private externalDependenciesResolved;
48
- private manifestHooksExecuted;
49
- private manifestHookDurationMs;
50
- private manifestHooksReused;
51
- private manifestHookCache;
52
- private manifestHookMetricsByPlugin;
26
+ private readonly pageResolver;
27
+ private readonly manifestHooks;
53
28
  constructor(pipelineOptions?: PipelineOptions);
54
29
  getDiagnostics(): Diagnostic[];
55
- getBuildStage(): PluginBuildStage;
56
30
  getManifestHookMetrics(): ManifestHookMetrics;
57
31
  getNoChangeFastPathBlockReason(previousCache: readonly ManifestHookCacheEntry[], pipelineFingerprint: string | undefined): string | undefined;
58
32
  getManifestHookCache(): readonly ManifestHookCacheEntry[];
@@ -74,7 +48,6 @@ export declare class PluginRuntime {
74
48
  runPostHook(hookName: "onPostParsed" | "onPostProcessed", slug: string, markdown: string, content: PostContent, contentIndex: Map<string, string>): Promise<void>;
75
49
  runGraphHook(entries: ContentManifestEntry[], contentIndex: Map<string, string>): Promise<void>;
76
50
  runManifestCreated(manifest: ContentManifest, contentIndex: Map<string, string>, previousCache: readonly ManifestHookCacheEntry[], pipelineFingerprint: string | undefined): Promise<void>;
77
- private recordManifestHookMetric;
78
51
  runBuildEnd(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<void>;
79
52
  runGeneratedOutputPlans(manifest: ContentManifest): Promise<void>;
80
53
  enableBuildTime(): void;
@@ -98,9 +71,7 @@ export declare class PluginRuntime {
98
71
  getPagePaths(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<readonly string[]>;
99
72
  getPageRoutes(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<readonly PluginPageRoute[]>;
100
73
  getPageOutputs(manifest: ContentManifest, contentIndex: Map<string, string>): Promise<readonly OutputDescriptor[]>;
101
- private getPageDeclarations;
102
- private resolvePageDeclarations;
103
- getContentOutputDependencies(): readonly OutputDependency[];
74
+ getContentOutputDependencies(): ContentOutputDependencyResolver;
104
75
  collectDiagnostics(contentIndex: Map<string, string>): Promise<Diagnostic[]>;
105
76
  private runBuildLifecycle;
106
77
  private createContext;
@@ -0,0 +1,3 @@
1
+ import type { PluginContext } from "../types/plugin_context.js";
2
+ export type PluginContextBase = Omit<PluginContext, "cache" | "logger" | "tracer" | "output">;
3
+ export type PluginContextWithCache<TContext extends PluginContextBase> = TContext & Pick<PluginContext, "cache" | "logger" | "tracer" | "output">;
@@ -5,6 +5,11 @@ import type { GeneratedOutput } from "./generated_output.js";
5
5
  import type { PluginAsset, PluginClientEntry } from "./plugin_asset.js";
6
6
  import type { PluginHeadTag } from "./plugin_head.js";
7
7
  import type { PostFrontmatter } from "./post_content.js";
8
+ export type ContentFileMetadata = {
9
+ readonly size?: number;
10
+ readonly ctime?: Date;
11
+ readonly mtime?: Date;
12
+ };
8
13
  export type ContentLinkKind = "note" | "image" | "attachment" | "unresolved";
9
14
  export type ContentLink = {
10
15
  raw: string;
@@ -37,6 +42,7 @@ export type ContentManifestEntry = {
37
42
  permalink: string;
38
43
  publicLocation: ContentPublicLocation;
39
44
  title: string;
45
+ file?: ContentFileMetadata;
40
46
  aliases?: readonly string[];
41
47
  frontmatter: PostFrontmatter;
42
48
  publishing: ResolvedPublishingState;
@@ -10,12 +10,19 @@ export type OutputDependency = {
10
10
  } | {
11
11
  readonly type: "file";
12
12
  readonly path: string;
13
+ } | {
14
+ readonly type: "public-location";
15
+ readonly pathname: string;
13
16
  } | {
14
17
  readonly type: "projection";
15
18
  readonly projection: "navigation" | "recent-posts" | "taxonomy-tags" | "taxonomy-folders";
16
19
  } | {
17
20
  readonly type: "external";
18
21
  readonly id: string;
22
+ } | {
23
+ readonly type: "content-query";
24
+ readonly properties: readonly string[];
25
+ readonly unknown?: boolean;
19
26
  } | {
20
27
  readonly type: "global";
21
28
  } | {
@@ -1,5 +1,5 @@
1
1
  import type { PluginOptionsValidator } from "./config_validation.js";
2
- import type { ContentManifestEntry } from "./content_manifest.js";
2
+ import type { ContentManifest, ContentManifestEntry } from "./content_manifest.js";
3
3
  import type { Diagnostic } from "./diagnostic.js";
4
4
  import type { ExternalDependencyContext, ExternalDependencyResolution } from "./external_dependency.js";
5
5
  import type { GeneratedOutputContent } from "./generated_output.js";
@@ -32,6 +32,7 @@ export type RiebeckitePlugin<TOptions = unknown> = {
32
32
  */
33
33
  optional?: string[];
34
34
  cacheVersion?: string;
35
+ contentFileMetadata?: boolean;
35
36
  /**
36
37
  * Explicit contract for the persistent processed-content cache.
37
38
  *
@@ -90,9 +91,14 @@ export type RiebeckitePlugin<TOptions = unknown> = {
90
91
  extendContentGraph?(context: PluginGraphContext): void | Promise<void>;
91
92
  renderers?: PluginContentRenderer[];
92
93
  contentOutputDependencies?: readonly OutputDependency[];
94
+ resolveContentOutputDependencies?: ContentOutputDependencyResolver;
93
95
  /** Framework-independent page types contributed by this plugin. */
94
96
  pageTypes?: PluginPageType[];
95
97
  };
98
+ export type ContentOutputDependencyResolver = (context: {
99
+ readonly entry: ContentManifestEntry;
100
+ readonly manifest: ContentManifest;
101
+ }) => readonly OutputDependency[];
96
102
  export type PlannedGeneratedOutput = {
97
103
  readonly path: string;
98
104
  readonly content: GeneratedOutputContent;
@@ -0,0 +1 @@
1
+ export declare function mapConcurrent<T, U>(values: readonly T[], concurrency: number, map: (value: T) => Promise<U>): Promise<U[]>;
@@ -2,4 +2,5 @@ export type MarkdownFenceLine = {
2
2
  readonly value: string;
3
3
  readonly inFence: boolean;
4
4
  };
5
+ export declare function splitOnce(value: string, separator: string): [string, string?];
5
6
  export declare function scanMarkdownFenceLines(source: string): MarkdownFenceLine[];
@@ -1,2 +1,3 @@
1
+ export declare function escapeRegExp(value: string): string;
1
2
  export declare function stripHtml(html: string): string;
2
3
  export declare function calculateReadingTime(html: string): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/core",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "tsx": "^4.22.4",
52
- "@riebeckite/test": "0.0.27"
52
+ "@riebeckite/test": "0.0.28"
53
53
  },
54
54
  "repository": {
55
55
  "type": "git",