4.8.2 • Published 10 months ago
@verdant-web/cli v4.8.2
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.8.2
10 months ago
4.8.1
10 months ago
4.8.0
10 months ago
4.7.3
10 months ago
4.7.2
1 year ago
4.7.1
1 year ago
4.7.1-alpha.0
1 year ago
4.7.0
1 year ago
4.6.2-next.0
1 year ago
4.5.0-next.0
1 year ago
4.5.0
1 year ago
4.4.1
2 years ago
4.6.1
1 year ago
4.6.0
1 year ago
4.4.0
2 years ago
4.3.2
2 years ago
4.3.1
2 years ago
4.3.0
2 years ago
4.2.4
2 years ago
4.2.3
2 years ago
4.2.2
2 years ago
4.2.1
2 years ago
4.2.0
2 years ago
4.2.0-next.0
2 years ago
3.0.0
2 years ago
4.0.5
2 years ago
2.2.1
2 years ago
2.1.2
2 years ago
4.0.4
2 years ago
2.2.0
2 years ago
2.1.1
2 years ago
4.1.0
2 years ago
4.0.1
2 years ago
4.0.0
2 years ago
4.0.3
2 years ago
4.0.2
2 years ago
2.0.3
3 years ago
2.0.2
3 years ago
2.1.0
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago