appwrite-ctl 1.0.0 → 1.0.2

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/dist/cli/index.js CHANGED
@@ -211,7 +211,7 @@ migrations
211
211
  }
212
212
  });
213
213
  migrations
214
- .command('docs')
214
+ .command('docs [version]')
215
215
  .description('Pull current state from Appwrite and generate schema documentation with ER diagrams')
216
216
  .action(async () => {
217
217
  try {
@@ -156,12 +156,27 @@ const buildBucketsDoc = (buckets) => {
156
156
  return '';
157
157
  const lines = [];
158
158
  lines.push('## Buckets');
159
- lines.push('');
160
- lines.push('| Name | ID | Max Size | Extensions | Compression | Encryption | Antivirus | Enabled |');
161
- lines.push('| --- | --- | --- | --- | --- | --- | --- | --- |');
162
159
  for (const b of buckets) {
163
160
  const extensions = b.allowedFileExtensions.length > 0 ? b.allowedFileExtensions.join(', ') : 'any';
164
- lines.push(`| ${b.name} | \`${b.$id}\` | ${formatFileSize(b.maximumFileSize)} | ${extensions} | ${b.compression} | ${b.encryption ? '✅' : '—'} | ${b.antivirus ? '✅' : '—'} | ${b.enabled ? '✅' : '—'} |`);
161
+ const status = b.enabled ? '🟢 Enabled' : '🔴 Disabled';
162
+ lines.push('');
163
+ lines.push(`### ${b.name} (\`${b.$id}\`)`);
164
+ lines.push('');
165
+ lines.push(`- **Status:** ${status}`);
166
+ lines.push('');
167
+ lines.push('| Max Size | Extensions | Compression | Encryption | Antivirus | File Security |');
168
+ lines.push('| --- | --- | --- | --- | --- | --- |');
169
+ lines.push(`| ${formatFileSize(b.maximumFileSize)} | ${extensions} | ${b.compression} | ${b.encryption ? '✅' : '—'} | ${b.antivirus ? '✅' : '—'} | ${b.fileSecurity ? 'Yes' : 'No'} |`);
170
+ if (b.$permissions.length > 0) {
171
+ lines.push('');
172
+ lines.push('**Permissions:**');
173
+ lines.push('');
174
+ lines.push('| Permission |');
175
+ lines.push('| --- |');
176
+ for (const perm of b.$permissions) {
177
+ lines.push(`| \`${perm}\` |`);
178
+ }
179
+ }
165
180
  }
166
181
  return lines.join('\n');
167
182
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appwrite-ctl",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Appwrite infrastructure as code and migration CLI tool.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "lint": "eslint . --fix",
19
19
  "format": "prettier . --write",
20
20
  "test": "echo \"Error: no test specified\" && exit 1",
21
- "prepare": "npm run build"
21
+ "release": "npm run build && npm publish --access public"
22
22
  },
23
23
  "files": [
24
24
  "dist"