4.4.0 • Published 5 days ago
@verdant-web/cli v4.4.0
verdant code generator CLI
Generate a client from schema
Beginning with a schema file like this:
const todoCollection = collection({
name: 'todo',
primaryKey: 'id',
fields: {
id: { type: 'string', indexed: true, unique: true },
content: {
type: 'string',
indexed: false,
unique: false,
},
done: {
type: 'boolean',
},
tags: {
type: 'array',
items: {
type: 'string',
},
},
category: {
type: 'string',
},
attachments: {
type: 'array',
items: {
type: 'object',
properties: {
name: {
type: 'string',
},
},
},
},
},
synthetics: {
example: {
type: 'string',
compute: (doc) => doc.content,
unique: false,
},
},
compounds: {
tagsSortedByDone: {
of: ['tags', 'done'],
},
categorySortedByDone: {
of: ['category', 'done'],
},
},
});
export default schema({
version: 1,
collections: {
todo: todoCollection,
},
});
Point the CLI to the location of your schema file and give it an output directory path to create the client module in.
4.4.0
5 days ago
4.3.2
2 months ago
4.3.1
2 months ago
4.3.0
3 months ago
4.2.4
3 months ago
4.2.3
3 months ago
4.2.2
3 months ago
4.2.1
4 months ago
4.2.0
4 months ago
4.2.0-next.0
4 months ago
3.0.0
6 months ago
4.0.5
6 months ago
2.2.1
7 months ago
2.1.2
9 months ago
4.0.4
6 months ago
2.2.0
8 months ago
2.1.1
10 months ago
4.1.0
6 months ago
4.0.1
6 months ago
4.0.0
6 months ago
4.0.3
6 months ago
4.0.2
6 months ago
2.0.3
12 months ago
2.0.2
12 months ago
2.1.0
11 months ago
2.0.1
1 year ago
2.0.0
1 year ago