@notion-headless-cms/core 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache/memory.d.mts +2 -2
- package/dist/cache/noop.d.mts +2 -2
- package/dist/{cache-Av7HRw_s.d.mts → cache-CmM7n5LX.d.mts} +2 -2
- package/dist/{content-BrwEY2_p.d.mts → content-BlD8UPas.d.mts} +3 -1
- package/dist/{hooks-DCSAQkST.d.mts → hooks-DKnjPzHO.d.mts} +2 -2
- package/dist/hooks.d.mts +1 -1
- package/dist/index.d.mts +3 -3
- package/package.json +5 -2
package/dist/cache/memory.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as StorageBinary, i as CachedItemList, r as CachedItem, t as BaseContentItem } from "../content-
|
|
2
|
-
import { l as InvalidateScope, n as DocumentCacheAdapter, r as ImageCacheAdapter } from "../cache-
|
|
1
|
+
import { a as StorageBinary, i as CachedItemList, r as CachedItem, t as BaseContentItem } from "../content-BlD8UPas.mjs";
|
|
2
|
+
import { l as InvalidateScope, n as DocumentCacheAdapter, r as ImageCacheAdapter } from "../cache-CmM7n5LX.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/cache/memory.d.ts
|
|
5
5
|
interface MemoryDocumentCacheOptions {
|
package/dist/cache/noop.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BaseContentItem } from "../content-
|
|
2
|
-
import { n as DocumentCacheAdapter, r as ImageCacheAdapter } from "../cache-
|
|
1
|
+
import { t as BaseContentItem } from "../content-BlD8UPas.mjs";
|
|
2
|
+
import { n as DocumentCacheAdapter, r as ImageCacheAdapter } from "../cache-CmM7n5LX.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/cache/noop.d.ts
|
|
5
5
|
/** 何もしないドキュメントキャッシュを返す(シングルトン)。 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as StorageBinary, i as CachedItemList, r as CachedItem, t as BaseContentItem } from "./content-
|
|
1
|
+
import { a as StorageBinary, i as CachedItemList, r as CachedItem, t as BaseContentItem } from "./content-BlD8UPas.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/content/blocks.d.ts
|
|
4
4
|
/**
|
|
@@ -202,4 +202,4 @@ type CacheConfig<T extends BaseContentItem = BaseContentItem> = "disabled" | {
|
|
|
202
202
|
};
|
|
203
203
|
//#endregion
|
|
204
204
|
export { CollectionConfig as a, InferCollectionItem as c, ContentBlock as d, ContentResult as f, CMSSchema as i, InvalidateScope as l, InlineNode as m, DocumentCacheAdapter as n, DataSource as o, ImageRef as p, ImageCacheAdapter as r, DataSourceFactory as s, CacheConfig as t, WebhookConfig as u };
|
|
205
|
-
//# sourceMappingURL=cache-
|
|
205
|
+
//# sourceMappingURL=cache-CmM7n5LX.d.mts.map
|
|
@@ -15,6 +15,8 @@ interface BaseContentItem {
|
|
|
15
15
|
id: string;
|
|
16
16
|
/** URL キー(必須)。 */
|
|
17
17
|
slug: string;
|
|
18
|
+
/** Notion ページ名(title 型プロパティのテキスト)。 */
|
|
19
|
+
title?: string | null;
|
|
18
20
|
/** 最終更新タイムスタンプ(変更検知に必須)。 */
|
|
19
21
|
updatedAt: string;
|
|
20
22
|
/** コンテンツのステータス。ステータスのない DB では省略可能。 */
|
|
@@ -50,4 +52,4 @@ interface CMSSchemaProperties {
|
|
|
50
52
|
}
|
|
51
53
|
//#endregion
|
|
52
54
|
export { StorageBinary as a, CachedItemList as i, CMSSchemaProperties as n, CachedItem as r, BaseContentItem as t };
|
|
53
|
-
//# sourceMappingURL=content-
|
|
55
|
+
//# sourceMappingURL=content-BlD8UPas.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as CachedItem, t as BaseContentItem } from "./content-
|
|
1
|
+
import { r as CachedItem, t as BaseContentItem } from "./content-BlD8UPas.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/types/hooks.d.ts
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
@@ -57,4 +57,4 @@ declare function mergeLoggers(plugins: Array<{
|
|
|
57
57
|
}>, directLogger?: Logger): Logger | undefined;
|
|
58
58
|
//#endregion
|
|
59
59
|
export { Logger as a, definePlugin as i, mergeLoggers as n, CMSHooks as o, CMSPlugin as r, MaybePromise as s, mergeHooks as t };
|
|
60
|
-
//# sourceMappingURL=hooks-
|
|
60
|
+
//# sourceMappingURL=hooks-DKnjPzHO.d.mts.map
|
package/dist/hooks.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mergeLoggers, t as mergeHooks } from "./hooks-
|
|
1
|
+
import { n as mergeLoggers, t as mergeHooks } from "./hooks-DKnjPzHO.mjs";
|
|
2
2
|
export { mergeHooks, mergeLoggers };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as StorageBinary, i as CachedItemList, n as CMSSchemaProperties, r as CachedItem, t as BaseContentItem } from "./content-
|
|
2
|
-
import { a as CollectionConfig, c as InferCollectionItem, d as ContentBlock, f as ContentResult, i as CMSSchema, l as InvalidateScope, m as InlineNode, n as DocumentCacheAdapter, o as DataSource, p as ImageRef, r as ImageCacheAdapter, s as DataSourceFactory, t as CacheConfig, u as WebhookConfig } from "./cache-
|
|
3
|
-
import { a as Logger, i as definePlugin, n as mergeLoggers, o as CMSHooks, r as CMSPlugin, s as MaybePromise, t as mergeHooks } from "./hooks-
|
|
1
|
+
import { a as StorageBinary, i as CachedItemList, n as CMSSchemaProperties, r as CachedItem, t as BaseContentItem } from "./content-BlD8UPas.mjs";
|
|
2
|
+
import { a as CollectionConfig, c as InferCollectionItem, d as ContentBlock, f as ContentResult, i as CMSSchema, l as InvalidateScope, m as InlineNode, n as DocumentCacheAdapter, o as DataSource, p as ImageRef, r as ImageCacheAdapter, s as DataSourceFactory, t as CacheConfig, u as WebhookConfig } from "./cache-CmM7n5LX.mjs";
|
|
3
|
+
import { a as Logger, i as definePlugin, n as mergeLoggers, o as CMSHooks, r as CMSPlugin, s as MaybePromise, t as mergeHooks } from "./hooks-DKnjPzHO.mjs";
|
|
4
4
|
import { MemoryDocumentCacheOptions, MemoryImageCacheOptions, memoryCache, memoryDocumentCache, memoryImageCache } from "./cache/memory.mjs";
|
|
5
5
|
import { noopDocumentCache, noopImageCache } from "./cache/noop.mjs";
|
|
6
6
|
import { CMSError, CMSErrorCode, CMSErrorContext, isCMSError, isCMSErrorInNamespace } from "./errors.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notion-headless-cms/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Core CMS engine for notion-headless-cms — fetch, transform, cache with stale-while-revalidate strategy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"notion",
|
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "tsdown src/index.ts src/errors.ts src/hooks.ts src/cache/memory.ts src/cache/noop.ts --format esm --dts --sourcemap --out-dir dist",
|
|
70
70
|
"typecheck": "tsc --noEmit",
|
|
71
|
-
"test": "vitest run"
|
|
71
|
+
"test": "vitest run",
|
|
72
|
+
"test:coverage": "vitest run --coverage --coverage.reporter=lcov --coverage.reporter=text",
|
|
73
|
+
"publint": "publint --strict",
|
|
74
|
+
"attw": "attw --pack . --profile esm-only"
|
|
72
75
|
}
|
|
73
76
|
}
|