Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ export const createProject = async (
name: options.projectName,
dependencies: {
'@vulcan-sql/core': options.version,
'@vulcan-sql/build': options.version,
'@vulcan-sql/serve': options.version,
},
devDependencies: {
'@vulcan-sql/build': options.version,
},
},
null,
2
Expand Down
10 changes: 10 additions & 0 deletions packages/cli/src/schemas/init/profiles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Put your profiles here
# - name: pg
# type: pg
# allow: '*'
# connection:
# host: example.com
# user: vulcan
# password: secret
# database: vulcan
# port: 5432
2 changes: 1 addition & 1 deletion packages/cli/src/schemas/init/sqls/user.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
select *
from public.users
where id = "{{ context.params.id }}"
where id = {{ context.params.id }}
limit 1;
4 changes: 3 additions & 1 deletion packages/cli/src/schemas/init/sqls/user.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
url: /user/:id
urlPath: /user/:id
request:
- fieldName: id
fieldIn: path
description: user id
validators:
- uuid
- required
profiles:
- pg # replace this with your profile name
11 changes: 10 additions & 1 deletion packages/cli/src/schemas/init/vulcan.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: '{{ options.projectName }}'
description: A starter Vulcan project
version: 0.1.0-alpha.1
version: 0.2.0
template:
provider: LocalFile
# Path to .sql files
Expand All @@ -21,5 +21,14 @@ document-generator:
folderPath: .
types:
- RESTFUL
auth:
enabled: false
enforce-https:
enabled: false
response-format:
enabled: true
options:
default: json
formats:
- json
- csv