@take-out/cli 0.4.3 → 0.4.5

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 (69) hide show
  1. package/dist/cjs/cli.cjs +53 -35
  2. package/dist/cjs/commands/changed.cjs +133 -95
  3. package/dist/cjs/commands/docs.cjs +276 -203
  4. package/dist/cjs/commands/env-setup.cjs +45 -33
  5. package/dist/cjs/commands/onboard.cjs +668 -224
  6. package/dist/cjs/commands/run-all.cjs +54 -45
  7. package/dist/cjs/commands/run.cjs +80 -65
  8. package/dist/cjs/commands/script.cjs +263 -187
  9. package/dist/cjs/commands/skills.cjs +174 -118
  10. package/dist/cjs/commands/sync.cjs +193 -93
  11. package/dist/cjs/constants/ascii.cjs +14 -12
  12. package/dist/cjs/index.cjs +12 -10
  13. package/dist/cjs/types.cjs +7 -5
  14. package/dist/cjs/utils/env-categories.cjs +53 -48
  15. package/dist/cjs/utils/env-setup.cjs +214 -106
  16. package/dist/cjs/utils/env.cjs +65 -44
  17. package/dist/cjs/utils/files.cjs +186 -113
  18. package/dist/cjs/utils/parallel-runner.cjs +125 -75
  19. package/dist/cjs/utils/ports.cjs +21 -21
  20. package/dist/cjs/utils/prerequisites.cjs +42 -34
  21. package/dist/cjs/utils/prompts.cjs +66 -41
  22. package/dist/cjs/utils/script-listing.cjs +130 -60
  23. package/dist/cjs/utils/script-utils.cjs +29 -19
  24. package/dist/cjs/utils/sync.cjs +67 -45
  25. package/dist/esm/cli.mjs +40 -24
  26. package/dist/esm/cli.mjs.map +1 -1
  27. package/dist/esm/commands/changed.mjs +104 -68
  28. package/dist/esm/commands/changed.mjs.map +1 -1
  29. package/dist/esm/commands/docs.mjs +245 -174
  30. package/dist/esm/commands/docs.mjs.map +1 -1
  31. package/dist/esm/commands/env-setup.mjs +18 -8
  32. package/dist/esm/commands/env-setup.mjs.map +1 -1
  33. package/dist/esm/commands/onboard.mjs +631 -189
  34. package/dist/esm/commands/onboard.mjs.map +1 -1
  35. package/dist/esm/commands/run-all.mjs +26 -19
  36. package/dist/esm/commands/run-all.mjs.map +1 -1
  37. package/dist/esm/commands/run.mjs +52 -39
  38. package/dist/esm/commands/run.mjs.map +1 -1
  39. package/dist/esm/commands/script.mjs +230 -156
  40. package/dist/esm/commands/script.mjs.map +1 -1
  41. package/dist/esm/commands/skills.mjs +143 -89
  42. package/dist/esm/commands/skills.mjs.map +1 -1
  43. package/dist/esm/commands/sync.mjs +160 -62
  44. package/dist/esm/commands/sync.mjs.map +1 -1
  45. package/dist/esm/constants/ascii.mjs +2 -2
  46. package/dist/esm/constants/ascii.mjs.map +1 -1
  47. package/dist/esm/utils/env-categories.mjs +29 -26
  48. package/dist/esm/utils/env-categories.mjs.map +1 -1
  49. package/dist/esm/utils/env-setup.mjs +184 -78
  50. package/dist/esm/utils/env-setup.mjs.map +1 -1
  51. package/dist/esm/utils/env.mjs +50 -31
  52. package/dist/esm/utils/env.mjs.map +1 -1
  53. package/dist/esm/utils/files.mjs +171 -100
  54. package/dist/esm/utils/files.mjs.map +1 -1
  55. package/dist/esm/utils/parallel-runner.mjs +111 -63
  56. package/dist/esm/utils/parallel-runner.mjs.map +1 -1
  57. package/dist/esm/utils/ports.mjs +9 -11
  58. package/dist/esm/utils/ports.mjs.map +1 -1
  59. package/dist/esm/utils/prerequisites.mjs +30 -24
  60. package/dist/esm/utils/prerequisites.mjs.map +1 -1
  61. package/dist/esm/utils/prompts.mjs +40 -17
  62. package/dist/esm/utils/prompts.mjs.map +1 -1
  63. package/dist/esm/utils/script-listing.mjs +101 -33
  64. package/dist/esm/utils/script-listing.mjs.map +1 -1
  65. package/dist/esm/utils/script-utils.mjs +14 -6
  66. package/dist/esm/utils/script-utils.mjs.map +1 -1
  67. package/dist/esm/utils/sync.mjs +38 -18
  68. package/dist/esm/utils/sync.mjs.map +1 -1
  69. package/package.json +5 -5
@@ -2,33 +2,35 @@ var __create = Object.create;
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
+ value: true
33
+ }), mod);
32
34
  var env_categories_exports = {};
33
35
  __export(env_categories_exports, {
34
36
  envCategories: () => envCategories,
@@ -44,22 +46,25 @@ const envCategories = [{
44
46
  id: "core",
45
47
  name: "Core Configuration",
46
48
  description: "Essential configuration for your production deployment",
47
- required: !0,
49
+ required: true,
48
50
  variables: [{
49
51
  key: "BETTER_AUTH_SECRET",
50
52
  label: "Authentication Secret",
51
53
  description: "Secret key for session encryption and JWT signing",
52
54
  instructions: `Generate a secure random key:
53
55
  ${import_picocolors.default.cyan("openssl rand -hex 32")}`,
54
- required: !0,
56
+ required: true,
55
57
  type: "secret",
56
- generator: () => require("node:crypto").randomBytes(32).toString("hex")
58
+ generator: () => {
59
+ const crypto = require("node:crypto");
60
+ return crypto.randomBytes(32).toString("hex");
61
+ }
57
62
  }, {
58
63
  key: "BETTER_AUTH_URL",
59
64
  label: "Authentication URL",
60
65
  description: "The public URL where your app will be hosted",
61
66
  instructions: "Enter your production domain (e.g., https://your-app.com)",
62
- required: !0,
67
+ required: true,
63
68
  type: "text",
64
69
  placeholder: "https://your-app.com"
65
70
  }, {
@@ -67,7 +72,7 @@ ${import_picocolors.default.cyan("openssl rand -hex 32")}`,
67
72
  label: "Server URL",
68
73
  description: "The URL for your main server",
69
74
  instructions: "Usually the same as your authentication URL",
70
- required: !0,
75
+ required: true,
71
76
  type: "text",
72
77
  placeholder: "https://your-app.com"
73
78
  }, {
@@ -75,7 +80,7 @@ ${import_picocolors.default.cyan("openssl rand -hex 32")}`,
75
80
  label: "Zero Sync Server Host",
76
81
  description: "Hostname for real-time sync server",
77
82
  instructions: "Just the hostname, e.g., zero.your-app.com (https:// assumed in production)",
78
- required: !0,
83
+ required: true,
79
84
  type: "text",
80
85
  placeholder: "zero.your-app.com"
81
86
  }]
@@ -83,7 +88,7 @@ ${import_picocolors.default.cyan("openssl rand -hex 32")}`,
83
88
  id: "database",
84
89
  name: "Database (PostgreSQL)",
85
90
  description: "Production database configuration - set by deployment platform (SST/uncloud)",
86
- required: !1,
91
+ required: false,
87
92
  variables: [
88
93
  // Note: ZERO_UPSTREAM_DB, ZERO_CVR_DB, and ZERO_CHANGE_DB are set dynamically
89
94
  // by the deployment platform (SST or uncloud) and should NOT be configured here
@@ -92,7 +97,7 @@ ${import_picocolors.default.cyan("openssl rand -hex 32")}`,
92
97
  id: "storage",
93
98
  name: "File Storage (S3/R2)",
94
99
  description: "Object storage for user uploads and media files",
95
- required: !1,
100
+ required: false,
96
101
  variables: [{
97
102
  key: "CLOUDFLARE_R2_ENDPOINT",
98
103
  label: "Storage Endpoint",
@@ -101,7 +106,7 @@ ${import_picocolors.default.cyan("openssl rand -hex 32")}`,
101
106
  ${import_picocolors.default.cyan("Cloudflare R2")}: https://[account-id].r2.cloudflarestorage.com
102
107
  ${import_picocolors.default.cyan("AWS S3")}: https://s3.[region].amazonaws.com
103
108
  ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digitaloceanspaces.com`,
104
- required: !1,
109
+ required: false,
105
110
  type: "text",
106
111
  placeholder: "https://account-id.r2.cloudflarestorage.com"
107
112
  }, {
@@ -109,21 +114,21 @@ ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digit
109
114
  label: "Storage Access Key",
110
115
  description: "Access key ID for your storage service",
111
116
  instructions: "Get this from your storage provider dashboard",
112
- required: !1,
117
+ required: false,
113
118
  type: "text"
114
119
  }, {
115
120
  key: "CLOUDFLARE_R2_SECRET_KEY",
116
121
  label: "Storage Secret Key",
117
122
  description: "Secret access key for your storage service",
118
123
  instructions: "Keep this secure - it provides full access to your storage",
119
- required: !1,
124
+ required: false,
120
125
  type: "secret"
121
126
  }, {
122
127
  key: "CLOUDFLARE_R2_PUBLIC_URL",
123
128
  label: "Public Storage URL",
124
129
  description: "Public URL for serving stored files",
125
130
  instructions: "Usually a CDN URL or custom domain pointing to your bucket",
126
- required: !1,
131
+ required: false,
127
132
  type: "text",
128
133
  placeholder: "https://cdn.your-app.com"
129
134
  }]
@@ -131,7 +136,7 @@ ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digit
131
136
  id: "apple",
132
137
  name: "Apple App Store",
133
138
  description: "Configuration for iOS app and push notifications",
134
- required: !1,
139
+ required: false,
135
140
  variables: [{
136
141
  key: "APNS_TEAM_ID",
137
142
  label: "Apple Team ID",
@@ -139,7 +144,7 @@ ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digit
139
144
  instructions: `Find in Apple Developer Portal:
140
145
  1. Go to ${import_picocolors.default.cyan("https://developer.apple.com/account")}
141
146
  2. Look for "Team ID" in Membership Details`,
142
- required: !1,
147
+ required: false,
143
148
  type: "text",
144
149
  placeholder: "XXXXXXXXXX"
145
150
  }, {
@@ -151,7 +156,7 @@ ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digit
151
156
  2. Keys \u2192 Create a Key
152
157
  3. Check "Apple Push Notifications service (APNs)"
153
158
  4. Download the .p8 file and note the Key ID`,
154
- required: !1,
159
+ required: false,
155
160
  type: "text",
156
161
  placeholder: "XXXXXXXXXX"
157
162
  }, {
@@ -159,7 +164,7 @@ ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digit
159
164
  label: "APNs Key Content",
160
165
  description: "Contents of your APNs .p8 key file",
161
166
  instructions: "Paste the entire contents of the .p8 file you downloaded",
162
- required: !1,
167
+ required: false,
163
168
  type: "multiline"
164
169
  }, {
165
170
  key: "APNS_ENDPOINT",
@@ -167,7 +172,7 @@ ${import_picocolors.default.cyan("DigitalOcean Spaces")}: https://[region].digit
167
172
  description: "Apple Push Notification service endpoint",
168
173
  instructions: `Production: ${import_picocolors.default.green("https://api.push.apple.com")}
169
174
  Sandbox: ${import_picocolors.default.yellow("https://api.sandbox.push.apple.com")}`,
170
- required: !1,
175
+ required: false,
171
176
  type: "text",
172
177
  default: "https://api.push.apple.com"
173
178
  }]
@@ -175,7 +180,7 @@ Sandbox: ${import_picocolors.default.yellow("https://api.sandbox.push.apple.com"
175
180
  id: "email",
176
181
  name: "Email Service",
177
182
  description: "Transactional email configuration",
178
- required: !1,
183
+ required: false,
179
184
  variables: [{
180
185
  key: "POSTMARK_SERVER_TOKEN",
181
186
  label: "Postmark Server Token",
@@ -187,14 +192,14 @@ Sandbox: ${import_picocolors.default.yellow("https://api.sandbox.push.apple.com"
187
192
  4. Copy your Server API Token
188
193
 
189
194
  ${import_picocolors.default.yellow("Note: Free tier includes 100 emails/month")}`,
190
- required: !1,
195
+ required: false,
191
196
  type: "text"
192
197
  }]
193
198
  }, {
194
199
  id: "github",
195
200
  name: "GitHub OAuth",
196
201
  description: "Enable GitHub sign-in for your app",
197
- required: !1,
202
+ required: false,
198
203
  variables: [{
199
204
  key: "ONECHAT_GITHUB_CLIENT_ID",
200
205
  label: "GitHub OAuth Client ID",
@@ -205,21 +210,21 @@ ${import_picocolors.default.yellow("Note: Free tier includes 100 emails/month")}
205
210
  3. Set Authorization callback URL:
206
211
  ${import_picocolors.default.green("https://your-app.com/api/auth/callback/github")}
207
212
  4. Copy the Client ID`,
208
- required: !1,
213
+ required: false,
209
214
  type: "text"
210
215
  }, {
211
216
  key: "ONECHAT_GITHUB_CLIENT_SECRET",
212
217
  label: "GitHub OAuth Client Secret",
213
218
  description: "Client secret for GitHub OAuth application",
214
219
  instructions: "Copy the Client Secret from your GitHub OAuth App settings",
215
- required: !1,
220
+ required: false,
216
221
  type: "secret"
217
222
  }]
218
223
  }, {
219
224
  id: "aws",
220
225
  name: "AWS Deployment",
221
226
  description: "AWS credentials for SST deployment",
222
- required: !1,
227
+ required: false,
223
228
  setupTime: "~30 minutes",
224
229
  variables: [{
225
230
  key: "AWS_ACCESS_KEY_ID",
@@ -235,21 +240,21 @@ Quick steps:
235
240
  2. Create IAM user with AdministratorAccess
236
241
  3. Generate access keys
237
242
  4. Copy Access Key ID`,
238
- required: !1,
243
+ required: false,
239
244
  type: "text"
240
245
  }, {
241
246
  key: "AWS_SECRET_ACCESS_KEY",
242
247
  label: "AWS Secret Access Key",
243
248
  description: "Secret key for AWS deployment",
244
249
  instructions: "Copy the Secret Access Key from IAM user creation",
245
- required: !1,
250
+ required: false,
246
251
  type: "secret"
247
252
  }, {
248
253
  key: "AWS_REGION",
249
254
  label: "AWS Region",
250
255
  description: "AWS region for deployment",
251
256
  instructions: "Choose a region close to your users (e.g., us-west-1, us-east-1, eu-west-1)",
252
- required: !1,
257
+ required: false,
253
258
  type: "text",
254
259
  default: "us-west-1",
255
260
  placeholder: "us-west-1"