create-syncular-app 0.6.0 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-syncular-app",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Scaffold a new Syncular app: `create-syncular-app`",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -49,6 +49,6 @@
49
49
  "!dist/**/*.test.d.ts"
50
50
  ],
51
51
  "devDependencies": {
52
- "@syncular/typegen": "0.6.0"
52
+ "@syncular/typegen": "0.7.0"
53
53
  }
54
54
  }
@@ -1,8 +1,6 @@
1
1
  query listTodos(listId) {
2
- sql {
3
- select id, list_id, title, done, position, updated_at_ms
4
- from todos
5
- where @scope(todos.list_id = :listId)
6
- order by position, id
7
- }
2
+ select id, list_id, title, done, position, updated_at_ms
3
+ from todos
4
+ where todos.list_id = :listId
5
+ order by position, id;
8
6
  }
@@ -1,6 +1,6 @@
1
1
  // Generated by @syncular/typegen — DO NOT EDIT.
2
2
  // irVersion: 1
3
- // irHash: sha256:14904cd41e8ae90720d152cd47a944d2f01bf8572b97e32fa71cda8909cab768
3
+ // irHash: sha256:7c07edc88f5e6f4b6da196da47e08abe4c7cb304d257a429da6950024f02fa85
4
4
 
5
5
  export type SyqlRuntimeErrorCode =
6
6
  | 'SYQL_RUNTIME_MISSING_REQUIRED_INPUT'
@@ -8,7 +8,7 @@ export type SyqlRuntimeErrorCode =
8
8
  | 'SYQL_RUNTIME_INVALID_INPUT'
9
9
  | 'SYQL_RUNTIME_INVALID_GROUP'
10
10
  | 'SYQL_RUNTIME_INVALID_SORT'
11
- | 'SYQL_RUNTIME_INVALID_PAGE';
11
+ | 'SYQL_RUNTIME_INVALID_LIMIT';
12
12
 
13
13
  export class SyqlInputError extends Error {
14
14
  readonly name = 'SyqlInputError';
@@ -109,7 +109,7 @@ function listTodosValidate(raw?: ListTodosParams): ListTodosParams {
109
109
  export const listTodosTables = ['todos'] as const;
110
110
 
111
111
  const listTodosStatements: { sql: string; bind: (params: ListTodosParams) => QueryValue[] }[] = [
112
- { sql: 'select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where (todos.list_id = ?) order by position, id', bind: (params) => [params.listId] },
112
+ { sql: 'select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where todos.list_id = ? order by position, id', bind: (params) => [params.listId] },
113
113
  ];
114
114
  function listTodosSelect(raw: ListTodosParams): { sql: string; bind: QueryValue[] } {
115
115
  const params = listTodosValidate(raw);
@@ -128,9 +128,9 @@ export async function listTodos(client: QueryClient, params: ListTodosParams): P
128
128
 
129
129
  /** Revisioned reactive descriptor for `useQuery(listTodosQuery, params)`. */
130
130
  export const listTodosQuery: NamedQuery<ListTodosRow, ListTodosParams> = {
131
- id: 'sha256:14904cd41e8ae90720d152cd47a944d2f01bf8572b97e32fa71cda8909cab768/listTodos',
131
+ id: 'sha256:7c07edc88f5e6f4b6da196da47e08abe4c7cb304d257a429da6950024f02fa85/listTodos',
132
132
  hasParams: true,
133
- sql: 'select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where (todos.list_id = ?) order by position, id',
133
+ sql: 'select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where todos.list_id = ? order by position, id',
134
134
  sqlFor: (params: ListTodosParams) => listTodosSelect(params).sql,
135
135
  tables: listTodosTables,
136
136
  dependencies: (params) => [
@@ -21,7 +21,7 @@ tauri = { version = "2", features = [] }
21
21
  # The syncular plugin from crates.io. `native-transport` gives the core its
22
22
  # real HTTP + WebSocket transport (ureq + tungstenite) inside the host
23
23
  # process — the webview never talks to the sync server directly.
24
- tauri-plugin-syncular = { version = "0.5", features = ["native-transport"] }
24
+ tauri-plugin-syncular = { version = "0.7.0", features = ["native-transport"] }
25
25
 
26
26
  [features]
27
27
  default = []
@@ -4,9 +4,9 @@
4
4
  {
5
5
  "name": "listTodos",
6
6
  "file": "list-todos.syql",
7
- "sourceSql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos\n where (todos.list_id = :listId)\n order by position, id",
8
- "sql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos\n where (todos.list_id = :listId)\n order by position, id",
9
- "positionalSql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where (todos.list_id = ?) order by position, id",
7
+ "sourceSql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos\n where todos.list_id = :listId\n order by position, id",
8
+ "sql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos\n where todos.list_id = :listId\n order by position, id",
9
+ "positionalSql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where todos.list_id = ? order by position, id",
10
10
  "params": [
11
11
  {
12
12
  "name": "listId",
@@ -124,8 +124,8 @@
124
124
  "statements": [
125
125
  {
126
126
  "activationMask": 0,
127
- "sql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos\n where (todos.list_id = :listId)\n order by position, id",
128
- "positionalSql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where (todos.list_id = ?) order by position, id",
127
+ "sql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos\n where todos.list_id = :listId\n order by position, id",
128
+ "positionalSql": "select id, list_id AS listId, title, done, position, updated_at_ms AS updatedAtMs from todos where todos.list_id = ? order by position, id",
129
129
  "binds": [
130
130
  {
131
131
  "kind": "value",