create-instant-app 0.22.108 → 0.22.109

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-instant-app",
3
- "version": "0.22.108",
3
+ "version": "0.22.109",
4
4
  "description": "Scaffold a new web/mobile app with InstantDB",
5
5
  "homepage": "https://github.com/instantdb/instant/tree/main/client/packages/create-instant-app",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "ora": "6.3.1",
36
36
  "slugify": "^1.6.6",
37
37
  "sort-package-json": "^2.10.0",
38
- "@instantdb/version": "0.22.108",
39
- "instant-cli": "0.22.108"
38
+ "instant-cli": "0.22.109",
39
+ "@instantdb/version": "0.22.109"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@anthropic-ai/sdk": "^0.60.0",
@@ -38,7 +38,7 @@ This outputs an app id and admin token. Store them in an env file.
38
38
  If you have an app id/admin token but no schema/perm files, pull them:
39
39
 
40
40
  ```bash
41
- npx instant-cli pull --app <APP_ID> --token <ADMIN_TOKEN> --yes
41
+ npx instant-cli pull --yes
42
42
  ```
43
43
 
44
44
  ## Schema changes
@@ -46,7 +46,7 @@ npx instant-cli pull --app <APP_ID> --token <ADMIN_TOKEN> --yes
46
46
  Edit `instant.schema.ts`, then push:
47
47
 
48
48
  ```bash
49
- npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --yes
49
+ npx instant-cli push schema --yes
50
50
  ```
51
51
 
52
52
  New fields = additions; missing fields = deletions.
@@ -54,7 +54,7 @@ New fields = additions; missing fields = deletions.
54
54
  To rename fields:
55
55
 
56
56
  ```bash
57
- npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --rename 'posts.author:posts.creator stores.owner:stores.manager' --yes
57
+ npx instant-cli push schema --rename 'posts.author:posts.creator stores.owner:stores.manager' --yes
58
58
  ```
59
59
 
60
60
  ## Permission changes
@@ -62,7 +62,7 @@ npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --rename 'pos
62
62
  Edit `instant.perms.ts`, then push:
63
63
 
64
64
  ```bash
65
- npx instant-cli push perms --app <APP_ID> --token <ADMIN_TOKEN> --yes
65
+ npx instant-cli push perms --yes
66
66
  ```
67
67
 
68
68
  # CRITICAL Query Guidelines
@@ -173,6 +173,13 @@ data.ref(someVar + '.members.id')
173
173
  - Can override `view` and `update`
174
174
  - Cannot override `create` or `delete`
175
175
 
176
+ ## $files Permissions
177
+
178
+ - Default permissions are all false. Override as needed to allow access.
179
+ - `data.ref` does not work for `$files` permissions.
180
+ - Use `data.path.startsWith(...)` or `data.path.endsWith(...)` to write
181
+ path-based rules.
182
+
176
183
  ## Field-level Permissions
177
184
 
178
185
  Restrict access to specific fields while keeping the entity public:
@@ -371,5 +378,5 @@ Fetch the URL for a topic to learn more about it.
371
378
 
372
379
  # Final Note
373
380
 
374
- Think before you answer. Make sure your code passes typechecks.
381
+ Think before you answer. Make sure your code passes typechecks `tsc --noEmit` and works as expected.
375
382
  Remember! AESTHETICS ARE VERY IMPORTANT. All apps should LOOK AMAZING and have GREAT FUNCTIONALITY!
@@ -44,7 +44,7 @@ This outputs an app id and admin token. Store them in an env file.
44
44
  If you have an app id/admin token but no schema/perm files, pull them:
45
45
 
46
46
  ```bash
47
- npx instant-cli pull --app <APP_ID> --token <ADMIN_TOKEN> --yes
47
+ npx instant-cli pull --yes
48
48
  ```
49
49
 
50
50
  ## Schema changes
@@ -52,7 +52,7 @@ npx instant-cli pull --app <APP_ID> --token <ADMIN_TOKEN> --yes
52
52
  Edit `instant.schema.ts`, then push:
53
53
 
54
54
  ```bash
55
- npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --yes
55
+ npx instant-cli push schema --yes
56
56
  ```
57
57
 
58
58
  New fields = additions; missing fields = deletions.
@@ -60,7 +60,7 @@ New fields = additions; missing fields = deletions.
60
60
  To rename fields:
61
61
 
62
62
  ```bash
63
- npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --rename 'posts.author:posts.creator stores.owner:stores.manager' --yes
63
+ npx instant-cli push schema --rename 'posts.author:posts.creator stores.owner:stores.manager' --yes
64
64
  ```
65
65
 
66
66
  ## Permission changes
@@ -68,7 +68,7 @@ npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --rename 'pos
68
68
  Edit `instant.perms.ts`, then push:
69
69
 
70
70
  ```bash
71
- npx instant-cli push perms --app <APP_ID> --token <ADMIN_TOKEN> --yes
71
+ npx instant-cli push perms --yes
72
72
  ```
73
73
 
74
74
  # CRITICAL Query Guidelines
@@ -179,6 +179,13 @@ data.ref(someVar + '.members.id')
179
179
  - Can override `view` and `update`
180
180
  - Cannot override `create` or `delete`
181
181
 
182
+ ## $files Permissions
183
+
184
+ - Default permissions are all false. Override as needed to allow access.
185
+ - `data.ref` does not work for `$files` permissions.
186
+ - Use `data.path.startsWith(...)` or `data.path.endsWith(...)` to write
187
+ path-based rules.
188
+
182
189
  ## Field-level Permissions
183
190
 
184
191
  Restrict access to specific fields while keeping the entity public:
@@ -377,5 +384,5 @@ Fetch the URL for a topic to learn more about it.
377
384
 
378
385
  # Final Note
379
386
 
380
- Think before you answer. Make sure your code passes typechecks.
387
+ Think before you answer. Make sure your code passes typechecks `tsc --noEmit` and works as expected.
381
388
  Remember! AESTHETICS ARE VERY IMPORTANT. All apps should LOOK AMAZING and have GREAT FUNCTIONALITY!
@@ -44,7 +44,7 @@ This outputs an app id and admin token. Store them in an env file.
44
44
  If you have an app id/admin token but no schema/perm files, pull them:
45
45
 
46
46
  ```bash
47
- npx instant-cli pull --app <APP_ID> --token <ADMIN_TOKEN> --yes
47
+ npx instant-cli pull --yes
48
48
  ```
49
49
 
50
50
  ## Schema changes
@@ -52,7 +52,7 @@ npx instant-cli pull --app <APP_ID> --token <ADMIN_TOKEN> --yes
52
52
  Edit `instant.schema.ts`, then push:
53
53
 
54
54
  ```bash
55
- npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --yes
55
+ npx instant-cli push schema --yes
56
56
  ```
57
57
 
58
58
  New fields = additions; missing fields = deletions.
@@ -60,7 +60,7 @@ New fields = additions; missing fields = deletions.
60
60
  To rename fields:
61
61
 
62
62
  ```bash
63
- npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --rename 'posts.author:posts.creator stores.owner:stores.manager' --yes
63
+ npx instant-cli push schema --rename 'posts.author:posts.creator stores.owner:stores.manager' --yes
64
64
  ```
65
65
 
66
66
  ## Permission changes
@@ -68,7 +68,7 @@ npx instant-cli push schema --app <APP_ID> --token <ADMIN_TOKEN> --rename 'pos
68
68
  Edit `instant.perms.ts`, then push:
69
69
 
70
70
  ```bash
71
- npx instant-cli push perms --app <APP_ID> --token <ADMIN_TOKEN> --yes
71
+ npx instant-cli push perms --yes
72
72
  ```
73
73
 
74
74
  # CRITICAL Query Guidelines
@@ -179,6 +179,13 @@ data.ref(someVar + '.members.id')
179
179
  - Can override `view` and `update`
180
180
  - Cannot override `create` or `delete`
181
181
 
182
+ ## $files Permissions
183
+
184
+ - Default permissions are all false. Override as needed to allow access.
185
+ - `data.ref` does not work for `$files` permissions.
186
+ - Use `data.path.startsWith(...)` or `data.path.endsWith(...)` to write
187
+ path-based rules.
188
+
182
189
  ## Field-level Permissions
183
190
 
184
191
  Restrict access to specific fields while keeping the entity public:
@@ -377,5 +384,5 @@ Fetch the URL for a topic to learn more about it.
377
384
 
378
385
  # Final Note
379
386
 
380
- Think before you answer. Make sure your code passes typechecks.
387
+ Think before you answer. Make sure your code passes typechecks `tsc --noEmit` and works as expected.
381
388
  Remember! AESTHETICS ARE VERY IMPORTANT. All apps should LOOK AMAZING and have GREAT FUNCTIONALITY!