File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ mkdir -p "$dest_dir"
10
10
# Copy the files from the source to the destination directory
11
11
cp " $src_dir /model-template.handlebars" " $dest_dir "
12
12
cp " $src_dir /index-template.handlebars" " $dest_dir "
13
+ cp " $src_dir /query-template.handlebars" " $dest_dir "
13
14
14
15
echo " Files copied successfully."
Original file line number Diff line number Diff line change 5
5
"main" : " dist/index.js" ,
6
6
"module" : " dist/index.js" ,
7
7
"bin" : {
8
- "sync-database-models" : " ./dist/generators/generate-models.js"
8
+ "sync-database-models" : " ./dist/generators/generate-models.js" ,
9
+ "sync-remote-queries" : " ./dist/generators/generate-queries.js"
9
10
},
10
11
"files" : [
11
12
" dist/*"
Original file line number Diff line number Diff line change 1
1
import { QueryType } from '../query-params'
2
2
import { Query , constructRawQuery } from '../query'
3
3
import { Connection } from './index'
4
- export const API_URL = 'https://app.outerbase.com'
4
+ export const API_URL = 'https://app.outerbase.com/api/v1 '
5
5
6
6
export class OuterbaseConnection implements Connection {
7
7
// The API key used for Outerbase authentication
@@ -63,7 +63,7 @@ export class OuterbaseConnection implements Connection {
63
63
if ( ! this . api_key ) throw new Error ( 'Outerbase API key is not set' )
64
64
if ( ! query ) throw new Error ( 'Query was not provided' )
65
65
66
- const response = await fetch ( `${ API_URL } /api/v1/ ezql/raw` , {
66
+ const response = await fetch ( `${ API_URL } /ezql/raw` , {
67
67
method : 'POST' ,
68
68
headers : {
69
69
'Content-Type' : 'application/json' ,
@@ -107,7 +107,7 @@ export class OuterbaseConnection implements Connection {
107
107
if ( ! queryId ) throw new Error ( 'Query ID is not set' )
108
108
109
109
const response = await fetch (
110
- `${ API_URL } /api/v1/ ezql/query/${ queryId } ` ,
110
+ `${ API_URL } /ezql/query/${ queryId } ` ,
111
111
{
112
112
method : 'POST' ,
113
113
headers : {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ async function main() {
49
49
const modelTemplate = compile ( modelTemplateSource )
50
50
const indexTemplate = compile ( indexTemplateSource )
51
51
52
- const response = await fetch ( `${ API_URL } /api/v1/ ezql/schema` , {
52
+ const response = await fetch ( `${ API_URL } /ezql/schema` , {
53
53
method : 'GET' ,
54
54
headers : {
55
55
'Content-Type' : 'application/json' ,
You can’t perform that action at this time.
0 commit comments