@v7-cms/core 0.0.0-alpha.9
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/body-mode.d.ts +35 -0
- package/dist/body-mode.d.ts.map +1 -0
- package/dist/body-mode.js +116 -0
- package/dist/body-mode.js.map +1 -0
- package/dist/config-load.d.ts +106 -0
- package/dist/config-load.d.ts.map +1 -0
- package/dist/config-load.js +193 -0
- package/dist/config-load.js.map +1 -0
- package/dist/config.d.ts +148 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -0
- package/dist/fields-builtin.d.ts +21 -0
- package/dist/fields-builtin.d.ts.map +1 -0
- package/dist/fields-builtin.js +240 -0
- package/dist/fields-builtin.js.map +1 -0
- package/dist/fields.d.ts +84 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +10 -0
- package/dist/fields.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/serialize/entry.d.ts +64 -0
- package/dist/serialize/entry.d.ts.map +1 -0
- package/dist/serialize/entry.js +151 -0
- package/dist/serialize/entry.js.map +1 -0
- package/dist/serialize/index.d.ts +2 -0
- package/dist/serialize/index.d.ts.map +1 -0
- package/dist/serialize/index.js +2 -0
- package/dist/serialize/index.js.map +1 -0
- package/dist/storage/types.d.ts +97 -0
- package/dist/storage/types.d.ts.map +1 -0
- package/dist/storage/types.js +14 -0
- package/dist/storage/types.js.map +1 -0
- package/package.json +59 -0
- package/schema/config.json +171 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/serialize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,cAAc,GAEf,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storage backends all look like this, so the editor never branches on which one it is talking to.
|
|
3
|
+
*/
|
|
4
|
+
export interface RepoRef {
|
|
5
|
+
owner: string;
|
|
6
|
+
repo: string;
|
|
7
|
+
branch: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DirEntry {
|
|
10
|
+
name: string;
|
|
11
|
+
type: 'file' | 'dir';
|
|
12
|
+
/** GitHub's blob sha, used for optimistic concurrency on write. */
|
|
13
|
+
sha?: string;
|
|
14
|
+
size?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface FileContents {
|
|
17
|
+
text: string;
|
|
18
|
+
/** Present on backends that support conflict detection. */
|
|
19
|
+
sha?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WriteOptions {
|
|
22
|
+
message: string;
|
|
23
|
+
/** Last-read sha. A mismatch must raise `ConflictError` rather than overwrite. */
|
|
24
|
+
sha?: string;
|
|
25
|
+
branch?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface WriteResult {
|
|
28
|
+
sha?: string;
|
|
29
|
+
commit?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface MediaRef {
|
|
32
|
+
/** Path inside the repository, or a key in object storage. */
|
|
33
|
+
path: string;
|
|
34
|
+
/** URL the site can serve, e.g. `/images/uploads/foo.webp`. */
|
|
35
|
+
url: string;
|
|
36
|
+
width?: number;
|
|
37
|
+
height?: number;
|
|
38
|
+
size?: number;
|
|
39
|
+
name?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface MediaStore {
|
|
42
|
+
upload(file: {
|
|
43
|
+
data: Uint8Array;
|
|
44
|
+
name: string;
|
|
45
|
+
type: string;
|
|
46
|
+
}, options: {
|
|
47
|
+
folder: string;
|
|
48
|
+
filename?: string;
|
|
49
|
+
}): Promise<MediaRef>;
|
|
50
|
+
list(folder: string): Promise<MediaRef[]>;
|
|
51
|
+
remove(path: string): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
/** Raised when a write would clobber someone else's change. */
|
|
54
|
+
export declare class ConflictError extends Error {
|
|
55
|
+
constructor(message?: string);
|
|
56
|
+
}
|
|
57
|
+
export declare class NotFoundError extends Error {
|
|
58
|
+
constructor(path: string);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Who the backend is acting as, when it has a notion of that.
|
|
62
|
+
*
|
|
63
|
+
* Optional because it is not universal: a folder on disk has no account, and neither does the
|
|
64
|
+
* in-memory backend. The editor shows an account panel only when this is present, so a local author
|
|
65
|
+
* never sees a sign-out button that would do nothing.
|
|
66
|
+
*/
|
|
67
|
+
export interface AccountInfo {
|
|
68
|
+
/** Login name, when the backend can report one. */
|
|
69
|
+
login?: string;
|
|
70
|
+
/** Display name, if it differs from the login. */
|
|
71
|
+
name?: string;
|
|
72
|
+
/** Avatar URL, already absolute. */
|
|
73
|
+
avatar?: string;
|
|
74
|
+
/** How the session was obtained, so the panel can explain what signing out drops. */
|
|
75
|
+
via: 'oauth' | 'token';
|
|
76
|
+
/** Repository being edited, for a backend that is bound to one. */
|
|
77
|
+
repo?: RepoRef;
|
|
78
|
+
}
|
|
79
|
+
export interface StorageAdapter {
|
|
80
|
+
readonly kind: 'github' | 'fs-access' | 'proxy' | 'memory';
|
|
81
|
+
init(): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* The signed-in account, or undefined when the backend has none. Called once the backend is
|
|
84
|
+
* ready; a failure here must not stop the editor from opening.
|
|
85
|
+
*/
|
|
86
|
+
account?(): Promise<AccountInfo | undefined>;
|
|
87
|
+
listDir(path: string): Promise<DirEntry[]>;
|
|
88
|
+
readFile(path: string): Promise<FileContents>;
|
|
89
|
+
readBinary(path: string): Promise<Uint8Array>;
|
|
90
|
+
exists(path: string): Promise<boolean>;
|
|
91
|
+
writeFile(path: string, contents: string | Uint8Array, options: WriteOptions): Promise<WriteResult>;
|
|
92
|
+
deleteFile(path: string, options: WriteOptions): Promise<void>;
|
|
93
|
+
listBranches(): Promise<string[]>;
|
|
94
|
+
createBranch(name: string, from: string): Promise<void>;
|
|
95
|
+
media(): MediaStore;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Raised when a write would clobber someone else's change. */
|
|
2
|
+
export class ConflictError extends Error {
|
|
3
|
+
constructor(message = 'The file changed since it was read.') {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = 'ConflictError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export class NotFoundError extends Error {
|
|
9
|
+
constructor(path) {
|
|
10
|
+
super(`Not found: ${path}`);
|
|
11
|
+
this.name = 'NotFoundError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/storage/types.ts"],"names":[],"mappings":"AAuDA,+DAA+D;AAC/D,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAO,GAAG,qCAAqC;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,IAAY;QACtB,KAAK,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@v7-cms/core",
|
|
3
|
+
"version": "0.0.0-alpha.9",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"./serialize": {
|
|
11
|
+
"types": "./dist/serialize/index.d.ts",
|
|
12
|
+
"default": "./dist/serialize/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./storage": {
|
|
15
|
+
"types": "./dist/storage/types.d.ts",
|
|
16
|
+
"default": "./dist/storage/types.js"
|
|
17
|
+
},
|
|
18
|
+
"./schema/config.json": "./schema/config.json"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"check": "tsc --noEmit",
|
|
22
|
+
"schema": "node --experimental-strip-types scripts/emit-schema.mjs",
|
|
23
|
+
"build": "tsc -p tsconfig.build.json"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"yaml": "^2.8.1",
|
|
27
|
+
"zod": "^4.6.5"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"schema"
|
|
32
|
+
],
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"prettier": "3.9.9"
|
|
35
|
+
},
|
|
36
|
+
"description": "The engine behind v7-cms: config schema, field contract, byte-faithful frontmatter serialization. No DOM.",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/phishinqi/v7-cms.git",
|
|
41
|
+
"directory": "packages/core"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/phishinqi/v7-cms#readme",
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/phishinqi/v7-cms/issues"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"frontmatter",
|
|
49
|
+
"yaml",
|
|
50
|
+
"markdown",
|
|
51
|
+
"serialize",
|
|
52
|
+
"cms",
|
|
53
|
+
"byte-faithful"
|
|
54
|
+
],
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"registry": "https://registry.npmjs.org"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "v7-cms configuration",
|
|
4
|
+
"description": "The file passed to mount(). See docs/configuration.md for the prose version.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"backend": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": { "type": "string", "enum": ["github", "local"] },
|
|
11
|
+
"repo": { "type": "string", "pattern": "^[\\w.-]+\\/[\\w.-]+$" },
|
|
12
|
+
"branch": { "type": "string", "minLength": 1 },
|
|
13
|
+
"authBase": { "type": "string" },
|
|
14
|
+
"authEndpoint": { "type": "string" },
|
|
15
|
+
"local": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"kind": { "type": "string", "enum": ["fs-access", "proxy", "memory"] },
|
|
19
|
+
"url": { "type": "string" },
|
|
20
|
+
"files": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"propertyNames": { "type": "string" },
|
|
23
|
+
"additionalProperties": { "type": "string" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["kind"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": ["name"]
|
|
30
|
+
},
|
|
31
|
+
"media": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"provider": { "type": "string", "enum": ["repo", "s3"] },
|
|
35
|
+
"repoPath": { "type": "string" },
|
|
36
|
+
"publicPath": { "type": "string" },
|
|
37
|
+
"maxEdge": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 },
|
|
38
|
+
"exif": { "type": "boolean" },
|
|
39
|
+
"s3": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"endpoint": { "type": "string" },
|
|
43
|
+
"bucket": { "type": "string" },
|
|
44
|
+
"publicBase": { "type": "string" }
|
|
45
|
+
},
|
|
46
|
+
"required": ["endpoint", "bucket", "publicBase"]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": ["provider"]
|
|
50
|
+
},
|
|
51
|
+
"collections": {
|
|
52
|
+
"minItems": 1,
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"kind": { "type": "string", "const": "fields" },
|
|
60
|
+
"name": { "type": "string", "minLength": 1 },
|
|
61
|
+
"label": { "type": "string", "minLength": 1 },
|
|
62
|
+
"labelSingular": { "type": "string" },
|
|
63
|
+
"folder": { "type": "string", "minLength": 1 },
|
|
64
|
+
"extension": { "type": "string", "enum": ["md", "mdx", "json", "yaml"] },
|
|
65
|
+
"format": { "type": "string", "enum": ["frontmatter", "json"] },
|
|
66
|
+
"identifierField": { "type": "string" },
|
|
67
|
+
"contentField": { "type": "string" },
|
|
68
|
+
"nested": { "type": "boolean" },
|
|
69
|
+
"media": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"propertyNames": { "type": "string" },
|
|
72
|
+
"additionalProperties": {}
|
|
73
|
+
},
|
|
74
|
+
"create": { "type": "boolean" },
|
|
75
|
+
"fields": { "minItems": 1, "type": "array", "items": { "$ref": "#/$defs/__schema0" } }
|
|
76
|
+
},
|
|
77
|
+
"required": ["kind", "name", "label", "folder", "extension", "format", "fields"]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"kind": { "type": "string", "const": "file" },
|
|
83
|
+
"name": { "type": "string", "minLength": 1 },
|
|
84
|
+
"label": { "type": "string", "minLength": 1 },
|
|
85
|
+
"format": { "type": "string", "enum": ["yaml", "json"] },
|
|
86
|
+
"files": {
|
|
87
|
+
"minItems": 1,
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"properties": {
|
|
92
|
+
"name": { "type": "string", "minLength": 1 },
|
|
93
|
+
"label": { "type": "string", "minLength": 1 },
|
|
94
|
+
"file": { "type": "string", "minLength": 1 },
|
|
95
|
+
"fields": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } },
|
|
96
|
+
"inferSchema": { "type": "boolean" },
|
|
97
|
+
"fieldOverrides": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"propertyNames": { "type": "string" },
|
|
100
|
+
"additionalProperties": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"propertyNames": { "type": "string" },
|
|
103
|
+
"additionalProperties": {}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": ["name", "label", "file"]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": ["kind", "name", "label", "files"]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"locale": { "type": "string" },
|
|
117
|
+
"editorialWorkflow": { "type": "boolean" },
|
|
118
|
+
"preview": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"devServerURL": { "type": "string" },
|
|
122
|
+
"pathTemplate": { "type": "string" },
|
|
123
|
+
"editAttribute": { "type": "string" }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"plugins": { "type": "array", "items": {} }
|
|
127
|
+
},
|
|
128
|
+
"required": ["backend", "collections"],
|
|
129
|
+
"$defs": {
|
|
130
|
+
"__schema0": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"name": { "type": "string", "minLength": 1 },
|
|
134
|
+
"label": { "type": "string" },
|
|
135
|
+
"widget": { "type": "string", "minLength": 1 },
|
|
136
|
+
"required": { "type": "boolean" },
|
|
137
|
+
"hint": { "type": "string" },
|
|
138
|
+
"fields": { "type": "array", "items": { "$ref": "#/$defs/__schema0" } },
|
|
139
|
+
"field": { "$ref": "#/$defs/__schema0" },
|
|
140
|
+
"options": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"items": {
|
|
143
|
+
"anyOf": [
|
|
144
|
+
{ "type": "string" },
|
|
145
|
+
{
|
|
146
|
+
"type": "object",
|
|
147
|
+
"properties": { "label": { "type": "string" }, "value": { "type": "string" } },
|
|
148
|
+
"required": ["label", "value"]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"default": {},
|
|
154
|
+
"collapseEmpty": { "type": "boolean" },
|
|
155
|
+
"collection": { "type": "string" },
|
|
156
|
+
"valueField": { "type": "string" },
|
|
157
|
+
"displayFields": { "type": "array", "items": { "type": "string" } },
|
|
158
|
+
"format": { "type": "string" },
|
|
159
|
+
"pattern": {
|
|
160
|
+
"type": "array",
|
|
161
|
+
"prefixItems": [{ "type": "string" }, { "type": "string" }],
|
|
162
|
+
"items": false,
|
|
163
|
+
"minItems": 2,
|
|
164
|
+
"maxItems": 2
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": ["name", "widget"],
|
|
168
|
+
"additionalProperties": {}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|