@cms0/cms0 0.2.20 → 0.2.22
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 +11 -0
- package/dist/cjs/custom-types/registry.cjs +6 -0
- package/dist/cjs/index.cjs +400 -65
- package/dist/cjs/libs/cli/config-loader.cjs +45 -4
- package/dist/cjs/libs/cli/publisher.cjs +24 -11
- package/dist/esm/custom-types/registry.js +6 -0
- package/dist/esm/index.js +401 -66
- package/dist/esm/libs/cli/config-loader.js +45 -4
- package/dist/esm/libs/cli/publisher.js +24 -11
- package/dist/types/custom-types/index.d.ts +2 -1
- package/dist/types/custom-types/index.d.ts.map +1 -1
- package/dist/types/custom-types/registry.d.ts.map +1 -1
- package/dist/types/index.d.ts +131 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/libs/cli/config-loader.d.ts.map +1 -1
- package/dist/types/libs/cli/publisher.d.ts.map +1 -1
- package/package.json +13 -9
- package/dist/cjs/index-old-1.cjs +0 -866
- package/dist/cjs/index-old.cjs +0 -1016
- package/dist/cjs/libs/cli/descriptor-builder.cjs +0 -273
- package/dist/cjs/utils/index.cjs +0 -2
- package/dist/esm/index-old-1.js +0 -862
- package/dist/esm/index-old.js +0 -1012
- package/dist/esm/libs/cli/descriptor-builder.js +0 -268
- package/dist/esm/utils/index.js +0 -1
- package/dist/types/index-old-1.d.ts +0 -175
- package/dist/types/index-old-1.d.ts.map +0 -1
- package/dist/types/index-old.d.ts +0 -151
- package/dist/types/index-old.d.ts.map +0 -1
- package/dist/types/libs/cli/descriptor-builder.d.ts +0 -5
- package/dist/types/libs/cli/descriptor-builder.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -2
- package/dist/types/utils/index.d.ts.map +0 -1
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
// Build a schema descriptor by inspecting user types with ts-morph.
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { Project, SyntaxKind, Node, } from "ts-morph";
|
|
5
|
-
import { findTsConfig } from "./config-loader.js";
|
|
6
|
-
function unwrapOptional(type) {
|
|
7
|
-
let optional = false;
|
|
8
|
-
let nullable = false;
|
|
9
|
-
if (type.isUnion()) {
|
|
10
|
-
const unionTypes = type.getUnionTypes();
|
|
11
|
-
const filtered = unionTypes.filter((t) => {
|
|
12
|
-
if (t.isNull()) {
|
|
13
|
-
nullable = true;
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
if (t.isUndefined()) {
|
|
17
|
-
optional = true;
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
return true;
|
|
21
|
-
});
|
|
22
|
-
if (filtered.length === 1) {
|
|
23
|
-
return { base: filtered[0], optional, nullable };
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return { base: type, optional, nullable };
|
|
27
|
-
}
|
|
28
|
-
function getDescriptorForType(type, modelMap, warnings, ctx, opts) {
|
|
29
|
-
const { base, optional, nullable } = unwrapOptional(type);
|
|
30
|
-
const isOptional = !!opts?.optional || optional;
|
|
31
|
-
const isNullable = !!opts?.nullable || nullable;
|
|
32
|
-
if (base.isString()) {
|
|
33
|
-
return {
|
|
34
|
-
kind: "primitive",
|
|
35
|
-
type: "string",
|
|
36
|
-
optional: isOptional,
|
|
37
|
-
nullable: isNullable,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (base.isNumber()) {
|
|
41
|
-
return {
|
|
42
|
-
kind: "primitive",
|
|
43
|
-
type: "number",
|
|
44
|
-
optional: isOptional,
|
|
45
|
-
nullable: isNullable,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
if (base.isBoolean()) {
|
|
49
|
-
return {
|
|
50
|
-
kind: "primitive",
|
|
51
|
-
type: "boolean",
|
|
52
|
-
optional: isOptional,
|
|
53
|
-
nullable: isNullable,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (base.isArray()) {
|
|
57
|
-
const elem = base.getArrayElementTypeOrThrow();
|
|
58
|
-
return {
|
|
59
|
-
kind: "array",
|
|
60
|
-
type: "array",
|
|
61
|
-
items: getDescriptorForType(elem, modelMap, warnings, `${ctx}[]`),
|
|
62
|
-
optional: isOptional,
|
|
63
|
-
nullable: isNullable,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const aliasSymbol = base.getAliasSymbol();
|
|
67
|
-
if (aliasSymbol) {
|
|
68
|
-
const name = aliasSymbol.getName();
|
|
69
|
-
if (modelMap[name]) {
|
|
70
|
-
return {
|
|
71
|
-
kind: "modelRef",
|
|
72
|
-
model: name,
|
|
73
|
-
optional: isOptional,
|
|
74
|
-
nullable: isNullable,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (base.isObject() && !base.isInterface()) {
|
|
79
|
-
const props = {};
|
|
80
|
-
for (const prop of base.getProperties()) {
|
|
81
|
-
const propDecl = prop.getDeclarations()[0];
|
|
82
|
-
const analyzed = unwrapOptional(propDecl.getType());
|
|
83
|
-
props[prop.getName()] = getDescriptorForType(analyzed.base, modelMap, warnings, `${ctx}.${prop.getName()}`, {
|
|
84
|
-
optional: prop.isOptional() || analyzed.optional,
|
|
85
|
-
nullable: analyzed.nullable,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
return {
|
|
89
|
-
kind: "object",
|
|
90
|
-
type: "object",
|
|
91
|
-
properties: props,
|
|
92
|
-
optional: isOptional,
|
|
93
|
-
nullable: isNullable,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
// unsupported or unknown type; fall back to string and record warning
|
|
97
|
-
warnings.add(`cms0: unsupported type at ${ctx}; falling back to string`);
|
|
98
|
-
return {
|
|
99
|
-
kind: "primitive",
|
|
100
|
-
type: "string",
|
|
101
|
-
optional: isOptional,
|
|
102
|
-
nullable: isNullable,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function collectModels(sourceFiles, modelMap, warnings) {
|
|
106
|
-
sourceFiles.forEach((sf) => {
|
|
107
|
-
sf.getTypeAliases().forEach((alias) => {
|
|
108
|
-
if (!alias.hasExportKeyword())
|
|
109
|
-
return;
|
|
110
|
-
const name = alias.getName();
|
|
111
|
-
const type = alias.getType();
|
|
112
|
-
if (type.isObject()) {
|
|
113
|
-
const props = {};
|
|
114
|
-
for (const prop of type.getProperties()) {
|
|
115
|
-
const decl = prop.getDeclarations()[0];
|
|
116
|
-
const propType = decl.getType();
|
|
117
|
-
props[prop.getName()] = getDescriptorForType(propType, modelMap, warnings, `model ${name}.${prop.getName()}`);
|
|
118
|
-
}
|
|
119
|
-
modelMap[name] = { kind: "model", properties: props };
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
function readCms0Options(invoc) {
|
|
125
|
-
const arg = invoc.getArguments()[0];
|
|
126
|
-
if (!arg || !Node.isObjectLiteralExpression(arg))
|
|
127
|
-
return {};
|
|
128
|
-
const options = {};
|
|
129
|
-
const localesProp = arg.getProperty("locales");
|
|
130
|
-
if (localesProp && Node.isPropertyAssignment(localesProp)) {
|
|
131
|
-
const init = localesProp.getInitializer();
|
|
132
|
-
if (init && Node.isArrayLiteralExpression(init)) {
|
|
133
|
-
const values = init
|
|
134
|
-
.getElements()
|
|
135
|
-
.map((el) => (Node.isStringLiteral(el) ? el.getLiteralValue() : null))
|
|
136
|
-
.filter((val) => Boolean(val));
|
|
137
|
-
if (values.length)
|
|
138
|
-
options.locales = values;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
const defaultProp = arg.getProperty("defaultLocale");
|
|
142
|
-
if (defaultProp && Node.isPropertyAssignment(defaultProp)) {
|
|
143
|
-
const init = defaultProp.getInitializer();
|
|
144
|
-
if (init && Node.isStringLiteral(init)) {
|
|
145
|
-
options.defaultLocale = init.getLiteralValue();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return options;
|
|
149
|
-
}
|
|
150
|
-
function findRootInvocation(sourceFiles) {
|
|
151
|
-
for (const sf of sourceFiles) {
|
|
152
|
-
const invoc = sf
|
|
153
|
-
?.getDescendantsOfKind(SyntaxKind.CallExpression)
|
|
154
|
-
.find((call) => call.getExpression().getText() === "cms0");
|
|
155
|
-
if (invoc) {
|
|
156
|
-
const typeArgs = invoc.getTypeArguments();
|
|
157
|
-
if (typeArgs.length > 0) {
|
|
158
|
-
return {
|
|
159
|
-
rootType: typeArgs[0].getType(),
|
|
160
|
-
...readCms0Options(invoc),
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return undefined;
|
|
166
|
-
}
|
|
167
|
-
function buildDescriptor(resolved) {
|
|
168
|
-
const tsconfig = resolved.tsconfigPath ?? findTsConfig(resolved.entryFile);
|
|
169
|
-
const project = tsconfig
|
|
170
|
-
? new Project({ tsConfigFilePath: tsconfig })
|
|
171
|
-
: new Project();
|
|
172
|
-
const warnings = new Set();
|
|
173
|
-
const entryDir = path.dirname(path.resolve(resolved.entryFile));
|
|
174
|
-
if (!project.getSourceFile(resolved.entryFile) &&
|
|
175
|
-
fs.existsSync(resolved.entryFile)) {
|
|
176
|
-
project.addSourceFileAtPath(resolved.entryFile);
|
|
177
|
-
}
|
|
178
|
-
const sourceFiles = project.getSourceFiles().filter((sf) => {
|
|
179
|
-
const filePath = path.resolve(sf.getFilePath());
|
|
180
|
-
const rel = path.relative(entryDir, filePath);
|
|
181
|
-
return rel && !rel.startsWith("..") && !path.isAbsolute(rel);
|
|
182
|
-
});
|
|
183
|
-
const modelMap = {};
|
|
184
|
-
collectModels(sourceFiles, modelMap, warnings);
|
|
185
|
-
const invocation = findRootInvocation(sourceFiles);
|
|
186
|
-
if (!invocation) {
|
|
187
|
-
throw new Error("Could not locate cms0<T>() invocation in project sources.");
|
|
188
|
-
}
|
|
189
|
-
const rootType = invocation.rootType;
|
|
190
|
-
const roots = {};
|
|
191
|
-
for (const prop of rootType.getProperties()) {
|
|
192
|
-
const name = prop.getName();
|
|
193
|
-
const decl = prop.getDeclarations()[0];
|
|
194
|
-
const analyzed = unwrapOptional(decl.getType());
|
|
195
|
-
const propType = analyzed.base;
|
|
196
|
-
const propOptional = prop.isOptional() || analyzed.optional;
|
|
197
|
-
const propNullable = analyzed.nullable;
|
|
198
|
-
if (propType.isArray()) {
|
|
199
|
-
const elem = propType.getArrayElementTypeOrThrow();
|
|
200
|
-
const itemDesc = getDescriptorForType(elem, modelMap, warnings, `root ${name}[]`);
|
|
201
|
-
roots[name] = {
|
|
202
|
-
type: "array",
|
|
203
|
-
items: itemDesc,
|
|
204
|
-
optional: propOptional,
|
|
205
|
-
nullable: propNullable,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
else if (propType.isObject() && !propType.isArray()) {
|
|
209
|
-
const objDesc = getDescriptorForType(propType, modelMap, warnings, `root ${name}`, {
|
|
210
|
-
optional: propOptional,
|
|
211
|
-
nullable: propNullable,
|
|
212
|
-
});
|
|
213
|
-
if (objDesc.kind === "object") {
|
|
214
|
-
roots[name] = {
|
|
215
|
-
type: "object",
|
|
216
|
-
properties: objDesc.properties,
|
|
217
|
-
optional: propOptional,
|
|
218
|
-
nullable: propNullable,
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
else if (objDesc.kind === "modelRef") {
|
|
222
|
-
roots[name] = {
|
|
223
|
-
type: "object",
|
|
224
|
-
properties: {},
|
|
225
|
-
optional: propOptional,
|
|
226
|
-
nullable: propNullable,
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
roots[name] = {
|
|
231
|
-
type: "object",
|
|
232
|
-
properties: {},
|
|
233
|
-
optional: propOptional,
|
|
234
|
-
nullable: propNullable,
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
roots[name] = {
|
|
240
|
-
type: "object",
|
|
241
|
-
properties: {
|
|
242
|
-
[name]: getDescriptorForType(propType, modelMap, warnings, `root ${name}.${name}`, {
|
|
243
|
-
optional: propOptional,
|
|
244
|
-
nullable: propNullable,
|
|
245
|
-
}),
|
|
246
|
-
},
|
|
247
|
-
optional: propOptional,
|
|
248
|
-
nullable: propNullable,
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (warnings.size) {
|
|
253
|
-
warnings.forEach((w) => console.warn(w));
|
|
254
|
-
}
|
|
255
|
-
const locales = invocation.locales;
|
|
256
|
-
const defaultLocale = invocation.defaultLocale;
|
|
257
|
-
return {
|
|
258
|
-
models: modelMap,
|
|
259
|
-
roots,
|
|
260
|
-
metadata: locales || defaultLocale
|
|
261
|
-
? {
|
|
262
|
-
locales,
|
|
263
|
-
defaultLocale,
|
|
264
|
-
}
|
|
265
|
-
: undefined,
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
export { buildDescriptor };
|
package/dist/esm/utils/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { Cms0APIConfig } from "@cms0/cms0/config";
|
|
2
|
-
import { schemaDescriptor } from "@cms0/cms0/schema-descriptors";
|
|
3
|
-
import { FullDescriptor } from "@cms0/shared";
|
|
4
|
-
import type { LocalizedRichText as CmsLocalizedRichText, LocalizedString as CmsLocalizedString, RichText as CmsRichText } from "./custom-types/index.js";
|
|
5
|
-
type QueryValue = string | number | boolean | null | undefined;
|
|
6
|
-
type QueryParam = QueryValue | QueryValue[];
|
|
7
|
-
export type CmsQuery = Record<string, QueryParam>;
|
|
8
|
-
export type CmsResponseMode = "normalized" | "envelope" | "raw";
|
|
9
|
-
export interface CmsAssetOptions {
|
|
10
|
-
baseUrl?: string;
|
|
11
|
-
uploadsPath?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface CmsAccessorOptions {
|
|
14
|
-
query?: CmsQuery;
|
|
15
|
-
response?: CmsResponseMode;
|
|
16
|
-
includeId?: boolean;
|
|
17
|
-
resolveModelRefs?: boolean;
|
|
18
|
-
locale?: string;
|
|
19
|
-
signal?: AbortSignal;
|
|
20
|
-
}
|
|
21
|
-
export type CmsCollectionEnvelope<T> = {
|
|
22
|
-
items: T[];
|
|
23
|
-
total: number;
|
|
24
|
-
};
|
|
25
|
-
type CmsAccessorBaseOptions = Omit<CmsAccessorOptions, "includeId">;
|
|
26
|
-
type IsLocalizedShape<T> = T extends {
|
|
27
|
-
defaultLocale: string;
|
|
28
|
-
locales: Record<string, any>;
|
|
29
|
-
} ? true : false;
|
|
30
|
-
type IsMapLikeObject<T> = string extends keyof T ? true : false;
|
|
31
|
-
type WithCollectionItemObjectIds<T> = T extends Array<infer Item> ? Array<Item extends object ? WithCollectionItemObjectIds<Item> & {
|
|
32
|
-
id: string;
|
|
33
|
-
} : Item> : T extends object ? {
|
|
34
|
-
[K in keyof T]: WithCollectionItemObjectIds<T[K]>;
|
|
35
|
-
} : T;
|
|
36
|
-
type WithAllObjectIds<T> = T extends Array<infer Item> ? Array<Item extends object ? WithAllObjectIds<Item> : {
|
|
37
|
-
id: string;
|
|
38
|
-
value: Item;
|
|
39
|
-
}> : T extends object ? IsLocalizedShape<T> extends true ? {
|
|
40
|
-
id: string;
|
|
41
|
-
} & {
|
|
42
|
-
[K in keyof T]: K extends "locales" ? T[K] : WithAllObjectIds<T[K]>;
|
|
43
|
-
} : IsMapLikeObject<T> extends true ? T : {
|
|
44
|
-
id: string;
|
|
45
|
-
} & {
|
|
46
|
-
[K in keyof T]: WithAllObjectIds<T[K]>;
|
|
47
|
-
} : T;
|
|
48
|
-
type DefaultAccessorResult<T, IncludeIdDefault extends boolean> = IncludeIdDefault extends true ? WithAllObjectIds<T> : WithCollectionItemObjectIds<T>;
|
|
49
|
-
export type CmsAccessor<T, IncludeIdDefault extends boolean = false> = {
|
|
50
|
-
(options: CmsAccessorBaseOptions & {
|
|
51
|
-
includeId: true;
|
|
52
|
-
}): Promise<WithAllObjectIds<T>>;
|
|
53
|
-
(options: CmsAccessorBaseOptions & {
|
|
54
|
-
includeId: false;
|
|
55
|
-
}): Promise<T>;
|
|
56
|
-
(options?: CmsAccessorBaseOptions & {
|
|
57
|
-
includeId?: undefined;
|
|
58
|
-
}): Promise<DefaultAccessorResult<T, IncludeIdDefault>>;
|
|
59
|
-
};
|
|
60
|
-
type DefaultModelByIdResult<T, IncludeIdDefault extends boolean> = IncludeIdDefault extends true ? WithAllObjectIds<T> | null : T | null;
|
|
61
|
-
type CmsModelByIdAccessor<T, IncludeIdDefault extends boolean = false> = {
|
|
62
|
-
(id: string, options: CmsAccessorBaseOptions & {
|
|
63
|
-
includeId: true;
|
|
64
|
-
}): Promise<WithAllObjectIds<T> | null>;
|
|
65
|
-
(id: string, options: CmsAccessorBaseOptions & {
|
|
66
|
-
includeId: false;
|
|
67
|
-
}): Promise<T | null>;
|
|
68
|
-
(id: string, options?: CmsAccessorBaseOptions & {
|
|
69
|
-
includeId?: undefined;
|
|
70
|
-
}): Promise<DefaultModelByIdResult<T, IncludeIdDefault>>;
|
|
71
|
-
};
|
|
72
|
-
export type CmsModelAccessor<T, IncludeIdDefault extends boolean = false> = CmsAccessor<T[], IncludeIdDefault> & {
|
|
73
|
-
byId: CmsModelByIdAccessor<T, IncludeIdDefault>;
|
|
74
|
-
};
|
|
75
|
-
export type CmsInstance<Roots, Models extends Record<string, any> = Record<string, never>, IncludeIdDefault extends boolean = false> = {
|
|
76
|
-
[K in keyof Roots]: CmsAccessor<Roots[K], IncludeIdDefault>;
|
|
77
|
-
} & {
|
|
78
|
-
models: {
|
|
79
|
-
[K in keyof Models]: CmsModelAccessor<Models[K], IncludeIdDefault>;
|
|
80
|
-
} & Record<string, CmsModelAccessor<any, IncludeIdDefault>>;
|
|
81
|
-
} & {
|
|
82
|
-
locales: string[];
|
|
83
|
-
defaultLocale?: string;
|
|
84
|
-
includeIdDefault: IncludeIdDefault;
|
|
85
|
-
} & Record<string, unknown>;
|
|
86
|
-
export interface Cms0Options {
|
|
87
|
-
apiConfig: Cms0APIConfig;
|
|
88
|
-
locales?: string[];
|
|
89
|
-
defaultLocale?: string;
|
|
90
|
-
assets?: CmsAssetOptions;
|
|
91
|
-
includeId?: boolean;
|
|
92
|
-
}
|
|
93
|
-
type PrimitiveValueFromDescriptor<TypeName extends string> = TypeName extends "string" ? string : TypeName extends "number" ? number : TypeName extends "boolean" ? boolean : any;
|
|
94
|
-
type CustomTypeValueFromDescriptor<TypeName extends string> = TypeName extends "RichText" ? CmsRichText : TypeName extends "LocalizedString" ? CmsLocalizedString : TypeName extends "LocalizedRichText" ? CmsLocalizedRichText : never;
|
|
95
|
-
type ApplyDescriptorFlags<Descriptor, Value> = Descriptor extends {
|
|
96
|
-
optional: true;
|
|
97
|
-
nullable: true;
|
|
98
|
-
} ? Value | null | undefined : Descriptor extends {
|
|
99
|
-
optional: true;
|
|
100
|
-
} ? Value | undefined : Descriptor extends {
|
|
101
|
-
nullable: true;
|
|
102
|
-
} ? Value | null : Value;
|
|
103
|
-
type InferDescriptorObject<Properties extends Record<string, any>, ModelMap extends Record<string, any>> = {
|
|
104
|
-
[Key in keyof Properties]: InferDescriptorField<Properties[Key], ModelMap>;
|
|
105
|
-
};
|
|
106
|
-
type InferDescriptorField<Descriptor, ModelMap extends Record<string, any>> = ApplyDescriptorFlags<Descriptor, Descriptor extends {
|
|
107
|
-
customType: infer CustomType extends string;
|
|
108
|
-
} ? CustomTypeValueFromDescriptor<CustomType> extends never ? Descriptor extends {
|
|
109
|
-
kind: "modelRef";
|
|
110
|
-
model: infer ModelName extends string;
|
|
111
|
-
} ? ModelName extends keyof ModelMap ? ModelMap[ModelName] : string : Descriptor extends {
|
|
112
|
-
kind: "primitive";
|
|
113
|
-
type: infer Primitive extends string;
|
|
114
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : Descriptor extends {
|
|
115
|
-
type: "array";
|
|
116
|
-
items: infer Items;
|
|
117
|
-
} ? Array<InferDescriptorField<Items, ModelMap>> : Descriptor extends {
|
|
118
|
-
type: "object";
|
|
119
|
-
properties: infer Properties extends Record<string, any>;
|
|
120
|
-
} ? InferDescriptorObject<Properties, ModelMap> : Descriptor extends {
|
|
121
|
-
type: infer Primitive extends string;
|
|
122
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : any : CustomTypeValueFromDescriptor<CustomType> : Descriptor extends {
|
|
123
|
-
kind: "modelRef";
|
|
124
|
-
model: infer ModelName extends string;
|
|
125
|
-
} ? ModelName extends keyof ModelMap ? ModelMap[ModelName] : string : Descriptor extends {
|
|
126
|
-
kind: "primitive";
|
|
127
|
-
type: infer Primitive extends string;
|
|
128
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : Descriptor extends {
|
|
129
|
-
type: "array";
|
|
130
|
-
items: infer Items;
|
|
131
|
-
} ? Array<InferDescriptorField<Items, ModelMap>> : Descriptor extends {
|
|
132
|
-
type: "object";
|
|
133
|
-
properties: infer Properties extends Record<string, any>;
|
|
134
|
-
} ? InferDescriptorObject<Properties, ModelMap> : Descriptor extends {
|
|
135
|
-
type: infer Primitive extends string;
|
|
136
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : any>;
|
|
137
|
-
type InferDescriptorModels<Models extends Record<string, any>> = {
|
|
138
|
-
[ModelName in keyof Models]: Models[ModelName] extends {
|
|
139
|
-
properties: infer Properties extends Record<string, any>;
|
|
140
|
-
} ? WithInferredAssetUrl<InferDescriptorObject<Properties, InferDescriptorModels<Models>>, Properties> : any;
|
|
141
|
-
};
|
|
142
|
-
type WithInferredAssetUrl<Shape, Properties extends Record<string, any>> = Properties extends {
|
|
143
|
-
filename: any;
|
|
144
|
-
extension: any;
|
|
145
|
-
mimeType: any;
|
|
146
|
-
size: any;
|
|
147
|
-
} ? Shape & {
|
|
148
|
-
url: string;
|
|
149
|
-
} : Shape;
|
|
150
|
-
type InferDescriptorRoots<Roots extends Record<string, any>, Models extends Record<string, any>> = {
|
|
151
|
-
[RootKey in keyof Roots]: InferDescriptorField<Roots[RootKey], Models>;
|
|
152
|
-
};
|
|
153
|
-
type GeneratedModels = InferDescriptorModels<typeof schemaDescriptor.models>;
|
|
154
|
-
type GeneratedRoots = InferDescriptorRoots<typeof schemaDescriptor.roots, GeneratedModels>;
|
|
155
|
-
export declare function createCmsClient<Roots, Models extends Record<string, any> = Record<string, never>>(descriptor: FullDescriptor, config: Cms0Options & {
|
|
156
|
-
includeId: true;
|
|
157
|
-
}): CmsInstance<Roots, Models, true>;
|
|
158
|
-
export declare function createCmsClient<Roots, Models extends Record<string, any> = Record<string, never>>(descriptor: FullDescriptor, config: Cms0Options & {
|
|
159
|
-
includeId?: false | undefined;
|
|
160
|
-
}): CmsInstance<Roots, Models, false>;
|
|
161
|
-
export declare function createCmsClient<Roots, Models extends Record<string, any> = Record<string, never>>(descriptor: FullDescriptor, config: Cms0Options): CmsInstance<Roots, Models, boolean>;
|
|
162
|
-
/**
|
|
163
|
-
* Initializes the CMS SDK for a given schema.
|
|
164
|
-
* @param config configuration including API base URL and API key.
|
|
165
|
-
* @returns typed accessors for root resources and model resources.
|
|
166
|
-
*/
|
|
167
|
-
export declare function cms0<Roots = GeneratedRoots, Models extends Record<string, any> = GeneratedModels>(config: Cms0Options & {
|
|
168
|
-
includeId: true;
|
|
169
|
-
}): CmsInstance<Roots, Models, true>;
|
|
170
|
-
export declare function cms0<Roots = GeneratedRoots, Models extends Record<string, any> = GeneratedModels>(config: Cms0Options & {
|
|
171
|
-
includeId?: false | undefined;
|
|
172
|
-
}): CmsInstance<Roots, Models, false>;
|
|
173
|
-
export declare function cms0<Roots = GeneratedRoots, Models extends Record<string, any> = GeneratedModels>(config: Cms0Options): CmsInstance<Roots, Models, boolean>;
|
|
174
|
-
export {};
|
|
175
|
-
//# sourceMappingURL=index-old-1.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-old-1.d.ts","sourceRoot":"","sources":["../../src/index-old-1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAA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AAS,CAAA;CAAE,GACtD,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACrC,wBAAgB,IAAI,CAClB,KAAK,GAAG,cAAc,EACtB,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EAEpD,MAAM,EAAE,WAAW,GAClB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { Cms0APIConfig } from "@cms0/cms0/config";
|
|
2
|
-
import { schemaDescriptor } from "@cms0/cms0/schema-descriptors";
|
|
3
|
-
import { FullDescriptor } from "@cms0/shared";
|
|
4
|
-
import type { LocalizedRichText as CmsLocalizedRichText, LocalizedString as CmsLocalizedString, RichText as CmsRichText } from "./custom-types/index.js";
|
|
5
|
-
type QueryValue = string | number | boolean | null | undefined;
|
|
6
|
-
type QueryParam = QueryValue | QueryValue[];
|
|
7
|
-
export type CmsQuery = Record<string, QueryParam>;
|
|
8
|
-
export type CmsResponseMode = "normalized" | "envelope" | "raw";
|
|
9
|
-
export interface CmsAssetOptions {
|
|
10
|
-
baseUrl?: string;
|
|
11
|
-
uploadsPath?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface CmsRequestOptions {
|
|
14
|
-
concurrency?: number;
|
|
15
|
-
retries?: number;
|
|
16
|
-
retryBaseMs?: number;
|
|
17
|
-
retryMaxMs?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface CmsAccessorOptions {
|
|
20
|
-
query?: CmsQuery;
|
|
21
|
-
response?: CmsResponseMode;
|
|
22
|
-
includeId?: boolean;
|
|
23
|
-
resolveModelRefs?: boolean;
|
|
24
|
-
locale?: string;
|
|
25
|
-
signal?: AbortSignal;
|
|
26
|
-
}
|
|
27
|
-
export type CmsCollectionEnvelope<T> = {
|
|
28
|
-
items: T[];
|
|
29
|
-
total: number;
|
|
30
|
-
};
|
|
31
|
-
type CmsAccessorBaseOptions = Omit<CmsAccessorOptions, "includeId">;
|
|
32
|
-
type WithCollectionItemObjectIds<T> = T extends Array<infer Item> ? Array<Item extends object ? WithCollectionItemObjectIds<Item> & {
|
|
33
|
-
id: string;
|
|
34
|
-
} : Item> : T extends object ? {
|
|
35
|
-
[K in keyof T]: WithCollectionItemObjectIds<T[K]>;
|
|
36
|
-
} : T;
|
|
37
|
-
type WithAllObjectIds<T> = T extends Array<infer Item> ? Array<WithAllObjectIds<Item>> : T extends object ? {
|
|
38
|
-
id: string;
|
|
39
|
-
} & {
|
|
40
|
-
[K in keyof T]: WithAllObjectIds<T[K]>;
|
|
41
|
-
} : T;
|
|
42
|
-
export type CmsAccessor<T> = {
|
|
43
|
-
(options: CmsAccessorBaseOptions & {
|
|
44
|
-
includeId: true;
|
|
45
|
-
}): Promise<WithAllObjectIds<T>>;
|
|
46
|
-
(options: CmsAccessorBaseOptions & {
|
|
47
|
-
includeId: false;
|
|
48
|
-
}): Promise<T>;
|
|
49
|
-
(options?: CmsAccessorBaseOptions & {
|
|
50
|
-
includeId?: undefined;
|
|
51
|
-
}): Promise<WithCollectionItemObjectIds<T>>;
|
|
52
|
-
};
|
|
53
|
-
type CmsModelByIdAccessor<T> = {
|
|
54
|
-
(id: string, options: CmsAccessorBaseOptions & {
|
|
55
|
-
includeId: true;
|
|
56
|
-
}): Promise<WithAllObjectIds<T> | null>;
|
|
57
|
-
(id: string, options: CmsAccessorBaseOptions & {
|
|
58
|
-
includeId: false;
|
|
59
|
-
}): Promise<T | null>;
|
|
60
|
-
(id: string, options?: CmsAccessorBaseOptions & {
|
|
61
|
-
includeId?: undefined;
|
|
62
|
-
}): Promise<T | null>;
|
|
63
|
-
};
|
|
64
|
-
export type CmsModelAccessor<T> = CmsAccessor<T[]> & {
|
|
65
|
-
byId: CmsModelByIdAccessor<T>;
|
|
66
|
-
};
|
|
67
|
-
export type CmsInstance<Roots, Models extends Record<string, any> = Record<string, never>> = {
|
|
68
|
-
[K in keyof Roots]: CmsAccessor<Roots[K]>;
|
|
69
|
-
} & {
|
|
70
|
-
models: {
|
|
71
|
-
[K in keyof Models]: CmsModelAccessor<Models[K]>;
|
|
72
|
-
} & Record<string, CmsModelAccessor<any>>;
|
|
73
|
-
} & Record<string, unknown>;
|
|
74
|
-
export interface Cms0Options {
|
|
75
|
-
apiConfig: Cms0APIConfig;
|
|
76
|
-
locales?: string[];
|
|
77
|
-
defaultLocale?: string;
|
|
78
|
-
assets?: CmsAssetOptions;
|
|
79
|
-
requests?: CmsRequestOptions;
|
|
80
|
-
}
|
|
81
|
-
type PrimitiveValueFromDescriptor<TypeName extends string> = TypeName extends "string" ? string : TypeName extends "number" ? number : TypeName extends "boolean" ? boolean : any;
|
|
82
|
-
type CustomTypeValueFromDescriptor<TypeName extends string> = TypeName extends "RichText" ? CmsRichText : TypeName extends "LocalizedString" ? CmsLocalizedString : TypeName extends "LocalizedRichText" ? CmsLocalizedRichText : never;
|
|
83
|
-
type ApplyDescriptorFlags<Descriptor, Value> = Descriptor extends {
|
|
84
|
-
optional: true;
|
|
85
|
-
nullable: true;
|
|
86
|
-
} ? Value | null | undefined : Descriptor extends {
|
|
87
|
-
optional: true;
|
|
88
|
-
} ? Value | undefined : Descriptor extends {
|
|
89
|
-
nullable: true;
|
|
90
|
-
} ? Value | null : Value;
|
|
91
|
-
type InferDescriptorObject<Properties extends Record<string, any>, ModelMap extends Record<string, any>> = {
|
|
92
|
-
[Key in keyof Properties]: InferDescriptorField<Properties[Key], ModelMap>;
|
|
93
|
-
};
|
|
94
|
-
type InferDescriptorField<Descriptor, ModelMap extends Record<string, any>> = ApplyDescriptorFlags<Descriptor, Descriptor extends {
|
|
95
|
-
customType: infer CustomType extends string;
|
|
96
|
-
} ? CustomTypeValueFromDescriptor<CustomType> extends never ? Descriptor extends {
|
|
97
|
-
kind: "modelRef";
|
|
98
|
-
model: infer ModelName extends string;
|
|
99
|
-
} ? ModelName extends keyof ModelMap ? ModelMap[ModelName] : string : Descriptor extends {
|
|
100
|
-
kind: "primitive";
|
|
101
|
-
type: infer Primitive extends string;
|
|
102
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : Descriptor extends {
|
|
103
|
-
type: "array";
|
|
104
|
-
items: infer Items;
|
|
105
|
-
} ? Array<InferDescriptorField<Items, ModelMap>> : Descriptor extends {
|
|
106
|
-
type: "object";
|
|
107
|
-
properties: infer Properties extends Record<string, any>;
|
|
108
|
-
} ? InferDescriptorObject<Properties, ModelMap> : Descriptor extends {
|
|
109
|
-
type: infer Primitive extends string;
|
|
110
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : any : CustomTypeValueFromDescriptor<CustomType> : Descriptor extends {
|
|
111
|
-
kind: "modelRef";
|
|
112
|
-
model: infer ModelName extends string;
|
|
113
|
-
} ? ModelName extends keyof ModelMap ? ModelMap[ModelName] : string : Descriptor extends {
|
|
114
|
-
kind: "primitive";
|
|
115
|
-
type: infer Primitive extends string;
|
|
116
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : Descriptor extends {
|
|
117
|
-
type: "array";
|
|
118
|
-
items: infer Items;
|
|
119
|
-
} ? Array<InferDescriptorField<Items, ModelMap>> : Descriptor extends {
|
|
120
|
-
type: "object";
|
|
121
|
-
properties: infer Properties extends Record<string, any>;
|
|
122
|
-
} ? InferDescriptorObject<Properties, ModelMap> : Descriptor extends {
|
|
123
|
-
type: infer Primitive extends string;
|
|
124
|
-
} ? PrimitiveValueFromDescriptor<Primitive> : any>;
|
|
125
|
-
type InferDescriptorModels<Models extends Record<string, any>> = {
|
|
126
|
-
[ModelName in keyof Models]: Models[ModelName] extends {
|
|
127
|
-
properties: infer Properties extends Record<string, any>;
|
|
128
|
-
} ? WithInferredAssetUrl<InferDescriptorObject<Properties, InferDescriptorModels<Models>>, Properties> : any;
|
|
129
|
-
};
|
|
130
|
-
type WithInferredAssetUrl<Shape, Properties extends Record<string, any>> = Properties extends {
|
|
131
|
-
filename: any;
|
|
132
|
-
extension: any;
|
|
133
|
-
mimeType: any;
|
|
134
|
-
size: any;
|
|
135
|
-
} ? Shape & {
|
|
136
|
-
url: string;
|
|
137
|
-
} : Shape;
|
|
138
|
-
type InferDescriptorRoots<Roots extends Record<string, any>, Models extends Record<string, any>> = {
|
|
139
|
-
[RootKey in keyof Roots]: InferDescriptorField<Roots[RootKey], Models>;
|
|
140
|
-
};
|
|
141
|
-
type GeneratedModels = InferDescriptorModels<typeof schemaDescriptor.models>;
|
|
142
|
-
type GeneratedRoots = InferDescriptorRoots<typeof schemaDescriptor.roots, GeneratedModels>;
|
|
143
|
-
export declare function createCmsClient<Roots, Models extends Record<string, any> = Record<string, never>>(descriptor: FullDescriptor, config: Cms0Options): CmsInstance<Roots, Models>;
|
|
144
|
-
/**
|
|
145
|
-
* Initializes the CMS SDK for a given schema.
|
|
146
|
-
* @param config configuration including API base URL and API key.
|
|
147
|
-
* @returns typed accessors for root resources and model resources.
|
|
148
|
-
*/
|
|
149
|
-
export declare function cms0<Roots = GeneratedRoots, Models extends Record<string, any> = GeneratedModels>(config: Cms0Options): CmsInstance<Roots, Models>;
|
|
150
|
-
export {};
|
|
151
|
-
//# sourceMappingURL=index-old.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-old.d.ts","sourceRoot":"","sources":["../../src/index-old.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAGL,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,iBAAiB,IAAI,oBAAoB,EACzC,eAAe,IAAI,kBAAkB,EACrC,QAAQ,IAAI,WAAW,EACxB,MAAM,yBAAyB,CAAC;AAEjC,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAC/D,KAAK,UAAU,GAAG,UAAU,GAAG,UAAU,EAAE,CAAC;AAC5C,MAA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AS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EACpD,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAKjD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-builder.d.ts","sourceRoot":"","sources":["../../../../src/libs/cli/descriptor-builder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAIL,cAAc,EACf,MAAM,cAAc,CAAC;AA8MtB,iBAAS,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CA8HjE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":""}
|