@take-out/docs 0.0.61 → 0.0.62

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/sync-prompt.md +58 -16
  3. package/zero.md +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@take-out/docs",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "description": "Documentation files for Takeout starter kit",
5
5
  "type": "module",
6
6
  "files": [
package/sync-prompt.md CHANGED
@@ -1,19 +1,27 @@
1
1
  ---
2
2
  name: takeout-sync-prompt
3
- description: Intelligent sync guide for updating forked Takeout with upstream changes while preserving customizations. sync, upstream sync, fork sync, merging upstream, git merge, tamagui/takeout2, upstream changes, update from takeout, takeout updates.
3
+ description:
4
+ Intelligent sync guide for updating forked Takeout with upstream changes while
5
+ preserving customizations. sync, upstream sync, fork sync, merging upstream,
6
+ git merge, tamagui/takeout2, upstream changes, update from takeout, takeout
7
+ updates.
4
8
  ---
5
9
 
6
10
  # Takeout Repository Sync Prompt
7
11
 
8
- You are helping sync a fork of the Takeout starter kit with the latest upstream changes.
12
+ You are helping sync a fork of the Takeout starter kit with the latest upstream
13
+ changes.
9
14
 
10
15
  ## Context
11
16
 
12
- This application was forked from Takeout, a full-stack starter kit for building production-ready apps. The upstream repository is at `git@github.com:tamagui/takeout2.git`.
17
+ This application was forked from Takeout, a full-stack starter kit for building
18
+ production-ready apps. The upstream repository is at
19
+ `git@github.com:tamagui/takeout2.git`.
13
20
 
14
21
  ## Your Task
15
22
 
16
- Intelligently sync the latest Takeout changes into this repository while preserving all user customizations.
23
+ Intelligently sync the latest Takeout changes into this repository while
24
+ preserving all user customizations.
17
25
 
18
26
  ## Process
19
27
 
@@ -28,17 +36,21 @@ cd /tmp/takeout-upstream
28
36
 
29
37
  ### 2. Identify Last Synced Commit
30
38
 
31
- Compare the current repository with the upstream to determine the last commit that was synced from Takeout. You can do this by:
39
+ Compare the current repository with the upstream to determine the last commit
40
+ that was synced from Takeout. You can do this by:
32
41
 
33
42
  - Checking git history for merge commits from upstream
34
43
  - Comparing file contents and commit messages
35
- - Looking for a `.takeout` marker file (if it exists) that contains the last synced commit SHA
44
+ - Looking for a `.takeout` marker file (if it exists) that contains the last
45
+ synced commit SHA
36
46
 
37
- Create or update a `.takeout` file in the project root with the current HEAD SHA after syncing.
47
+ Create or update a `.takeout` file in the project root with the current HEAD SHA
48
+ after syncing.
38
49
 
39
50
  ### 3. Analyze New Commits
40
51
 
41
- Starting from the last synced commit, go through each new commit in the upstream repository:
52
+ Starting from the last synced commit, go through each new commit in the upstream
53
+ repository:
42
54
 
43
55
  ```bash
44
56
  git log --oneline <last-synced-commit>..HEAD
@@ -65,16 +77,20 @@ For each commit:
65
77
  For each applicable change:
66
78
 
67
79
  **If the code still exists and hasn't been heavily customized:**
80
+
68
81
  - Apply the change directly, preserving user modifications where possible
69
82
  - Use three-way merge strategies when conflicts arise
70
83
 
71
84
  **If the code has been customized:**
85
+
72
86
  - Pause and ask the user:
73
87
  - Show them the upstream change
74
88
  - Show them their current code
75
- - Ask if they want to: (a) apply the change, (b) skip it, (c) manually merge it, or (d) see more details
89
+ - Ask if they want to: (a) apply the change, (b) skip it, (c) manually merge
90
+ it, or (d) see more details
76
91
 
77
92
  **If the code doesn't exist anymore:**
93
+
78
94
  - Skip the change (user likely removed this feature intentionally)
79
95
  - Optionally mention it in a summary at the end
80
96
 
@@ -87,36 +103,47 @@ Check if the user has ejected from the monorepo setup:
87
103
  ```
88
104
 
89
105
  **If ejected:**
106
+
90
107
  - DO NOT copy any changes from `./packages/*` directories
91
- - Instead, at the end of syncing, check the latest `@take-out/*` package versions in the upstream `package.json`
92
- - Run: `bun add @take-out/cli@^X.X.X @take-out/helpers@^X.X.X` (etc.) with the latest versions
108
+ - Instead, at the end of syncing, check the latest `@take-out/*` package
109
+ versions in the upstream `package.json`
110
+ - Run: `bun add @take-out/cli@^X.X.X @take-out/helpers@^X.X.X` (etc.) with the
111
+ latest versions
93
112
 
94
113
  **If NOT ejected:**
114
+
95
115
  - Sync changes to `./packages/*` normally
96
116
  - Preserve any local modifications to these packages
97
117
 
98
118
  ### 6. Handle Special Cases
99
119
 
100
120
  **Environment variables:**
121
+
101
122
  - Never overwrite `.env` or `.env.local`
102
123
  - For new variables in `.env.development`, notify the user but don't auto-add
103
124
 
104
125
  **Configuration files:**
105
- - `package.json`: Merge dependencies carefully, don't overwrite user's custom scripts/config
106
- - `tsconfig.json`, `.oxfmtrc.jsonc`, `.oxlintrc.json`: Merge carefully, preserving user customizations
126
+
127
+ - `package.json`: Merge dependencies carefully, don't overwrite user's custom
128
+ scripts/config
129
+ - `tsconfig.json`, `.oxfmtrc.jsonc`, `.oxlintrc.json`: Merge carefully,
130
+ preserving user customizations
107
131
  - `app.config.ts`: Never overwrite (contains user's app identity)
108
132
 
109
133
  **Database migrations:**
134
+
110
135
  - Always apply new migrations in `./migrations/*`
111
136
  - Never modify existing migrations
112
137
 
113
138
  **Generated files:**
139
+
114
140
  - Skip `src/data/generated/*` (these are auto-generated)
115
141
  - Skip `node_modules/`, `.vxrn/`, `dist/`, etc.
116
142
 
117
143
  ### 7. Pause for Decisions
118
144
 
119
145
  Stop and ask the user whenever:
146
+
120
147
  - A change conflicts with their customizations
121
148
  - A breaking change is detected
122
149
  - Multiple valid approaches exist for merging a change
@@ -124,6 +151,7 @@ Stop and ask the user whenever:
124
151
  - You're uncertain about the best approach
125
152
 
126
153
  When pausing, provide:
154
+
127
155
  - Clear explanation of the situation
128
156
  - The upstream change details
129
157
  - Their current code
@@ -144,6 +172,7 @@ After processing all commits:
144
172
  2. Update the `.takeout` marker file with the new HEAD SHA
145
173
 
146
174
  3. Run post-sync checks:
175
+
147
176
  ```bash
148
177
  bun install
149
178
  bun lint:fix
@@ -154,16 +183,19 @@ After processing all commits:
154
183
 
155
184
  ## Important Guidelines
156
185
 
157
- - **Preserve user intent**: When in doubt, preserve the user's changes over upstream changes
186
+ - **Preserve user intent**: When in doubt, preserve the user's changes over
187
+ upstream changes
158
188
  - **Be transparent**: Always explain what you're doing and why
159
189
  - **Ask questions**: Better to pause and ask than to make a wrong assumption
160
190
  - **Test incrementally**: After significant changes, suggest running tests
161
191
  - **Document decisions**: Keep track of choices made for future reference
162
- - **Respect customizations**: Recognize that users forked Takeout to make it their own
192
+ - **Respect customizations**: Recognize that users forked Takeout to make it
193
+ their own
163
194
 
164
195
  ## Example Decision Points
165
196
 
166
197
  **Example 1: Upstream updates a component the user has heavily customized**
198
+
167
199
  ```
168
200
  ⚠️ Decision needed: Upstream updated Button component
169
201
 
@@ -187,6 +219,7 @@ What would you like to do? [a/b/c/d]
187
219
  ```
188
220
 
189
221
  **Example 2: New dependency in upstream**
222
+
190
223
  ```
191
224
  ℹ️ Upstream added new dependency: @tamagui/animate-presence@1.0.0
192
225
 
@@ -203,6 +236,15 @@ What would you like to do? [a/b]
203
236
  ## Final Notes
204
237
 
205
238
  - This is an **intelligent sync**, not a blind merge
206
- - The goal is to **keep you up-to-date** while **respecting your customizations**
239
+ - The goal is to **keep you up-to-date** while **respecting your
240
+ customizations**
207
241
  - When uncertain, **always ask** before making changes
208
242
  - Keep a **detailed log** of all changes for review
243
+
244
+ ## What's meant to not sync
245
+
246
+ Note that apps have different schemas and use-cases, for things inside app/, for
247
+ src/data/ models and such, what you do want to sync is if there were sweeping
248
+ changes to how these things are structured fundamentally - but you don't want to
249
+ sync the actual specific models, or ./src/data/generated, or things like the
250
+ schema changes specific to an individual app.
package/zero.md CHANGED
@@ -10,7 +10,7 @@ queries are plain exported functions in `src/data/queries/` that use the global
10
10
 
11
11
  ```ts
12
12
  // src/data/queries/post.ts
13
- import { serverWhere, zql } from 'over-zero'
13
+ import { serverWhere, zql } from 'on-zero'
14
14
 
15
15
  const permission = serverWhere('post', () => true)
16
16
 
@@ -144,7 +144,7 @@ models in `src/data/models/` define schema, permissions, and mutations:
144
144
  ```ts
145
145
  // src/data/models/post.ts
146
146
  import { boolean, number, string, table } from '@rocicorp/zero'
147
- import { mutations, serverWhere } from 'over-zero'
147
+ import { mutations, serverWhere } from 'on-zero'
148
148
 
149
149
  export const schema = table('post')
150
150
  .columns({
@@ -379,6 +379,6 @@ bun tko zero generate
379
379
  ## resources
380
380
 
381
381
  - zero docs: https://zero.rocicorp.dev
382
- - over-zero: packages/over-zero/readme.md
382
+ - on-zero: packages/on-zero/readme.md
383
383
  - models: src/data/models/
384
384
  - queries: src/data/queries/