@pylonsync/create-pylon 0.3.170 → 0.3.172
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/bin/create-pylon.js +1 -1
- package/package.json +1 -1
- package/templates/_root/README.md +1 -1
- package/templates/backend/barebones/apps/api/functions/createWidget.ts +4 -0
- package/templates/backend/barebones/apps/api/functions/listWidgets.ts +1 -0
- package/templates/backend/todo/apps/api/functions/addTodo.ts +4 -0
- package/templates/backend/todo/apps/api/functions/deleteTodo.ts +1 -0
- package/templates/backend/todo/apps/api/functions/editTodo.ts +1 -0
- package/templates/backend/todo/apps/api/functions/listTodos.ts +1 -0
- package/templates/backend/todo/apps/api/functions/reorderTodo.ts +1 -0
- package/templates/backend/todo/apps/api/functions/toggleTodo.ts +1 -0
- package/templates/expo/barebones/apps/expo/package.json +10 -10
- package/templates/expo/chat/apps/expo/package.json +10 -10
- package/templates/expo/consumer/apps/expo/package.json +10 -10
- package/templates/expo/todo/apps/expo/package.json +10 -10
package/bin/create-pylon.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pylonsync/create-pylon",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.172",
|
|
4
4
|
"description": "Scaffold a new Pylon app — realtime backend + web/mobile/expo frontends in one command. Run via `npm create @pylonsync/pylon@latest`.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -6,6 +6,10 @@ import { mutation, v } from "@pylonsync/functions";
|
|
|
6
6
|
* follow-up read.
|
|
7
7
|
*/
|
|
8
8
|
export default mutation({
|
|
9
|
+
// `public` matches the wide-open Widget policy in schema.ts so this
|
|
10
|
+
// demo works without sign-in. When you wire auth, switch to "user"
|
|
11
|
+
// (the framework default) and add a session flow.
|
|
12
|
+
auth: "public",
|
|
9
13
|
args: { name: v.string() },
|
|
10
14
|
async handler(ctx, args: { name: string }) {
|
|
11
15
|
const trimmed = args.name.trim();
|
|
@@ -6,6 +6,10 @@ import { mutation, v } from "@pylonsync/functions";
|
|
|
6
6
|
* room for inserts-between without needing global renumber.
|
|
7
7
|
*/
|
|
8
8
|
export default mutation({
|
|
9
|
+
// `public` matches the wide-open Todo policy in schema.ts so this
|
|
10
|
+
// demo works without sign-in. When you wire auth, switch to "user"
|
|
11
|
+
// (the framework default) and add a session flow.
|
|
12
|
+
auth: "public",
|
|
9
13
|
args: { title: v.string() },
|
|
10
14
|
async handler(ctx, args: { title: string }) {
|
|
11
15
|
const existing = await ctx.db.query("Todo", {});
|
|
@@ -5,6 +5,7 @@ import { mutation, v } from "@pylonsync/functions";
|
|
|
5
5
|
* the client can show a "todo removed" toast or animate it out.
|
|
6
6
|
*/
|
|
7
7
|
export default mutation({
|
|
8
|
+
auth: "public",
|
|
8
9
|
args: { id: v.id("Todo") },
|
|
9
10
|
async handler(ctx, args: { id: string }) {
|
|
10
11
|
const snapshot = await ctx.db.get("Todo", args.id);
|
|
@@ -4,6 +4,7 @@ import { mutation, v } from "@pylonsync/functions";
|
|
|
4
4
|
* Rename a Todo. Trims whitespace; rejects empty titles.
|
|
5
5
|
*/
|
|
6
6
|
export default mutation({
|
|
7
|
+
auth: "public",
|
|
7
8
|
args: { id: v.id("Todo"), title: v.string() },
|
|
8
9
|
async handler(ctx, args: { id: string; title: string }) {
|
|
9
10
|
const trimmed = args.title.trim();
|
|
@@ -6,6 +6,7 @@ import { mutation, v } from "@pylonsync/functions";
|
|
|
6
6
|
* between any two rows before precision matters.
|
|
7
7
|
*/
|
|
8
8
|
export default mutation({
|
|
9
|
+
auth: "public",
|
|
9
10
|
args: { id: v.id("Todo"), position: v.number() },
|
|
10
11
|
async handler(ctx, args: { id: string; position: number }) {
|
|
11
12
|
await ctx.db.update("Todo", args.id, { position: args.position });
|
|
@@ -5,6 +5,7 @@ import { mutation, v } from "@pylonsync/functions";
|
|
|
5
5
|
* `ctx.db.update` which is only on writable ctx variants.
|
|
6
6
|
*/
|
|
7
7
|
export default mutation({
|
|
8
|
+
auth: "public",
|
|
8
9
|
args: { id: v.id("Todo"), done: v.bool() },
|
|
9
10
|
async handler(ctx, args: { id: string; done: boolean }) {
|
|
10
11
|
await ctx.db.update("Todo", args.id, { done: args.done });
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"@pylonsync/react": "^__PYLON_VERSION__",
|
|
16
16
|
"@pylonsync/react-native": "^__PYLON_VERSION__",
|
|
17
17
|
"@pylonsync/sync": "^__PYLON_VERSION__",
|
|
18
|
-
"@react-native-async-storage/async-storage": "1.
|
|
19
|
-
"@react-native-community/netinfo": "
|
|
20
|
-
"expo": "~
|
|
21
|
-
"expo-status-bar": "~
|
|
22
|
-
"react": "19.
|
|
23
|
-
"react-dom": "19.
|
|
24
|
-
"react-native": "0.
|
|
18
|
+
"@react-native-async-storage/async-storage": "~3.1.0",
|
|
19
|
+
"@react-native-community/netinfo": "~12.0.0",
|
|
20
|
+
"expo": "~56.0.0",
|
|
21
|
+
"expo-status-bar": "~56.0.0",
|
|
22
|
+
"react": "19.2.0",
|
|
23
|
+
"react-dom": "19.2.0",
|
|
24
|
+
"react-native": "0.85.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.
|
|
28
|
-
"@types/react": "
|
|
29
|
-
"typescript": "
|
|
27
|
+
"@babel/core": "^7.25.0",
|
|
28
|
+
"@types/react": "~19.2.0",
|
|
29
|
+
"typescript": "~5.9.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"@pylonsync/react": "^__PYLON_VERSION__",
|
|
16
16
|
"@pylonsync/react-native": "^__PYLON_VERSION__",
|
|
17
17
|
"@pylonsync/sync": "^__PYLON_VERSION__",
|
|
18
|
-
"@react-native-async-storage/async-storage": "1.
|
|
19
|
-
"@react-native-community/netinfo": "
|
|
20
|
-
"expo": "~
|
|
21
|
-
"expo-status-bar": "~
|
|
22
|
-
"react": "19.
|
|
23
|
-
"react-dom": "19.
|
|
24
|
-
"react-native": "0.
|
|
18
|
+
"@react-native-async-storage/async-storage": "~3.1.0",
|
|
19
|
+
"@react-native-community/netinfo": "~12.0.0",
|
|
20
|
+
"expo": "~56.0.0",
|
|
21
|
+
"expo-status-bar": "~56.0.0",
|
|
22
|
+
"react": "19.2.0",
|
|
23
|
+
"react-dom": "19.2.0",
|
|
24
|
+
"react-native": "0.85.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.
|
|
28
|
-
"@types/react": "
|
|
29
|
-
"typescript": "
|
|
27
|
+
"@babel/core": "^7.25.0",
|
|
28
|
+
"@types/react": "~19.2.0",
|
|
29
|
+
"typescript": "~5.9.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"@pylonsync/react": "^__PYLON_VERSION__",
|
|
16
16
|
"@pylonsync/react-native": "^__PYLON_VERSION__",
|
|
17
17
|
"@pylonsync/sync": "^__PYLON_VERSION__",
|
|
18
|
-
"@react-native-async-storage/async-storage": "1.
|
|
19
|
-
"@react-native-community/netinfo": "
|
|
20
|
-
"expo": "~
|
|
21
|
-
"expo-status-bar": "~
|
|
22
|
-
"react": "19.
|
|
23
|
-
"react-dom": "19.
|
|
24
|
-
"react-native": "0.
|
|
18
|
+
"@react-native-async-storage/async-storage": "~3.1.0",
|
|
19
|
+
"@react-native-community/netinfo": "~12.0.0",
|
|
20
|
+
"expo": "~56.0.0",
|
|
21
|
+
"expo-status-bar": "~56.0.0",
|
|
22
|
+
"react": "19.2.0",
|
|
23
|
+
"react-dom": "19.2.0",
|
|
24
|
+
"react-native": "0.85.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.
|
|
28
|
-
"@types/react": "
|
|
29
|
-
"typescript": "
|
|
27
|
+
"@babel/core": "^7.25.0",
|
|
28
|
+
"@types/react": "~19.2.0",
|
|
29
|
+
"typescript": "~5.9.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"@pylonsync/react": "^__PYLON_VERSION__",
|
|
16
16
|
"@pylonsync/react-native": "^__PYLON_VERSION__",
|
|
17
17
|
"@pylonsync/sync": "^__PYLON_VERSION__",
|
|
18
|
-
"@react-native-async-storage/async-storage": "1.
|
|
19
|
-
"@react-native-community/netinfo": "
|
|
20
|
-
"expo": "~
|
|
21
|
-
"expo-status-bar": "~
|
|
22
|
-
"react": "19.
|
|
23
|
-
"react-dom": "19.
|
|
24
|
-
"react-native": "0.
|
|
18
|
+
"@react-native-async-storage/async-storage": "~3.1.0",
|
|
19
|
+
"@react-native-community/netinfo": "~12.0.0",
|
|
20
|
+
"expo": "~56.0.0",
|
|
21
|
+
"expo-status-bar": "~56.0.0",
|
|
22
|
+
"react": "19.2.0",
|
|
23
|
+
"react-dom": "19.2.0",
|
|
24
|
+
"react-native": "0.85.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@babel/core": "^7.
|
|
28
|
-
"@types/react": "
|
|
29
|
-
"typescript": "
|
|
27
|
+
"@babel/core": "^7.25.0",
|
|
28
|
+
"@types/react": "~19.2.0",
|
|
29
|
+
"typescript": "~5.9.0"
|
|
30
30
|
}
|
|
31
31
|
}
|