appwrite-utils-cli 1.9.7 → 1.12.0

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 (376) hide show
  1. package/README.md +1004 -1004
  2. package/dist/adapters/index.d.ts +7 -8
  3. package/dist/adapters/index.js +7 -9
  4. package/dist/backups/operations/bucketBackup.js +2 -2
  5. package/dist/backups/operations/collectionBackup.d.ts +1 -1
  6. package/dist/backups/operations/collectionBackup.js +3 -3
  7. package/dist/backups/operations/comprehensiveBackup.d.ts +1 -1
  8. package/dist/backups/operations/comprehensiveBackup.js +2 -2
  9. package/dist/backups/tracking/centralizedTracking.d.ts +1 -1
  10. package/dist/backups/tracking/centralizedTracking.js +2 -2
  11. package/dist/cli/commands/configCommands.js +51 -7
  12. package/dist/cli/commands/databaseCommands.js +156 -104
  13. package/dist/cli/commands/functionCommands.js +3 -3
  14. package/dist/cli/commands/importFileCommands.d.ts +7 -0
  15. package/dist/cli/commands/importFileCommands.js +674 -0
  16. package/dist/cli/commands/schemaCommands.js +3 -3
  17. package/dist/cli/commands/storageCommands.js +2 -3
  18. package/dist/cli/commands/transferCommands.js +3 -5
  19. package/dist/collections/{attributes.d.ts → columns.d.ts} +1 -1
  20. package/dist/collections/{attributes.js → columns.js} +15 -9
  21. package/dist/collections/indexes.js +1 -3
  22. package/dist/collections/methods.d.ts +1 -1
  23. package/dist/collections/methods.js +38 -20
  24. package/dist/collections/tableOperations.d.ts +1 -0
  25. package/dist/collections/tableOperations.js +30 -11
  26. package/dist/collections/transferOperations.d.ts +1 -1
  27. package/dist/collections/transferOperations.js +3 -4
  28. package/dist/collections/wipeOperations.d.ts +4 -3
  29. package/dist/collections/wipeOperations.js +112 -39
  30. package/dist/databases/methods.js +2 -2
  31. package/dist/databases/setup.js +2 -2
  32. package/dist/examples/yamlTerminologyExample.js +2 -2
  33. package/dist/functions/deployments.d.ts +1 -1
  34. package/dist/functions/deployments.js +6 -6
  35. package/dist/functions/fnConfigDiscovery.js +2 -2
  36. package/dist/functions/methods.js +2 -2
  37. package/dist/functions/templates/count-docs-in-collection/README.md +53 -53
  38. package/dist/functions/templates/count-docs-in-collection/src/main.ts +159 -159
  39. package/dist/functions/templates/count-docs-in-collection/src/request.ts +8 -8
  40. package/dist/functions/templates/hono-typescript/README.md +285 -285
  41. package/dist/functions/templates/hono-typescript/src/adapters/request.ts +73 -73
  42. package/dist/functions/templates/hono-typescript/src/adapters/response.ts +105 -105
  43. package/dist/functions/templates/hono-typescript/src/app.ts +179 -179
  44. package/dist/functions/templates/hono-typescript/src/context.ts +102 -102
  45. package/{src/functions/templates/hono-typescript/src/index.ts → dist/functions/templates/hono-typescript/src/main.ts} +53 -53
  46. package/dist/functions/templates/hono-typescript/src/middleware/appwrite.ts +118 -118
  47. package/dist/functions/templates/typescript-node/README.md +31 -31
  48. package/dist/functions/templates/typescript-node/src/context.ts +102 -102
  49. package/dist/functions/templates/typescript-node/src/{index.ts → main.ts} +29 -29
  50. package/dist/functions/templates/uv/README.md +30 -30
  51. package/dist/functions/templates/uv/pyproject.toml +29 -29
  52. package/dist/functions/templates/uv/src/context.py +124 -124
  53. package/dist/functions/templates/uv/src/{index.py → main.py} +45 -45
  54. package/dist/init.js +1 -1
  55. package/dist/interactiveCLI.d.ts +6 -1
  56. package/dist/interactiveCLI.js +79 -25
  57. package/dist/main.js +125 -180
  58. package/dist/migrations/afterImportActions.js +2 -3
  59. package/dist/migrations/appwriteToX.d.ts +1 -1
  60. package/dist/migrations/appwriteToX.js +10 -8
  61. package/dist/migrations/comprehensiveTransfer.js +3 -5
  62. package/dist/migrations/dataLoader.d.ts +4 -2
  63. package/dist/migrations/dataLoader.js +42 -20
  64. package/dist/migrations/importController.d.ts +2 -0
  65. package/dist/migrations/importController.js +39 -24
  66. package/dist/migrations/importDataActions.js +3 -3
  67. package/dist/migrations/relationships.js +1 -2
  68. package/dist/migrations/services/DataTransformationService.js +2 -2
  69. package/dist/migrations/services/FileHandlerService.js +1 -1
  70. package/dist/migrations/services/ImportOrchestrator.d.ts +2 -0
  71. package/dist/migrations/services/ImportOrchestrator.js +15 -7
  72. package/dist/migrations/services/RateLimitManager.js +1 -1
  73. package/dist/migrations/services/RelationshipResolver.js +1 -1
  74. package/dist/migrations/services/UserMappingService.js +1 -1
  75. package/dist/migrations/services/ValidationService.js +1 -1
  76. package/dist/migrations/transfer.d.ts +8 -4
  77. package/dist/migrations/transfer.js +108 -55
  78. package/dist/migrations/yaml/YamlImportConfigLoader.js +52 -52
  79. package/dist/migrations/yaml/YamlImportIntegration.js +2 -2
  80. package/dist/migrations/yaml/generateImportSchemas.js +174 -174
  81. package/dist/setupCommands.d.ts +1 -1
  82. package/dist/setupCommands.js +5 -6
  83. package/dist/setupController.js +1 -1
  84. package/dist/shared/backupTracking.d.ts +1 -1
  85. package/dist/shared/backupTracking.js +2 -2
  86. package/dist/shared/confirmationDialogs.js +1 -1
  87. package/dist/shared/migrationHelpers.d.ts +1 -1
  88. package/dist/shared/migrationHelpers.js +4 -4
  89. package/dist/shared/operationQueue.d.ts +1 -1
  90. package/dist/shared/operationQueue.js +3 -4
  91. package/dist/shared/operationsTable.d.ts +1 -1
  92. package/dist/shared/operationsTable.js +35 -34
  93. package/dist/shared/operationsTableSchema.d.ts +3 -3
  94. package/dist/shared/operationsTableSchema.js +2 -2
  95. package/dist/shared/progressManager.js +1 -1
  96. package/dist/shared/selectionDialogs.d.ts +6 -0
  97. package/dist/shared/selectionDialogs.js +56 -12
  98. package/dist/storage/methods.d.ts +12 -0
  99. package/dist/storage/methods.js +92 -89
  100. package/dist/storage/schemas.d.ts +2 -2
  101. package/dist/tables/indexManager.d.ts +1 -1
  102. package/dist/tables/indexManager.js +2 -2
  103. package/dist/types.d.ts +2 -2
  104. package/dist/types.js +1 -1
  105. package/dist/users/methods.js +2 -3
  106. package/dist/utils/configMigration.js +1 -1
  107. package/dist/utils/index.d.ts +1 -1
  108. package/dist/utils/index.js +1 -1
  109. package/dist/utils/loadConfigs.d.ts +2 -2
  110. package/dist/utils/loadConfigs.js +6 -7
  111. package/dist/utils/setupFiles.js +139 -141
  112. package/dist/utilsController.d.ts +16 -9
  113. package/dist/utilsController.js +93 -68
  114. package/package.json +9 -3
  115. package/.appwrite/.yaml_schemas/appwrite-config.schema.json +0 -380
  116. package/.appwrite/.yaml_schemas/collection.schema.json +0 -255
  117. package/.appwrite/collections/Categories.yaml +0 -182
  118. package/.appwrite/collections/ExampleCollection.yaml +0 -36
  119. package/.appwrite/collections/Posts.yaml +0 -227
  120. package/.appwrite/collections/Users.yaml +0 -149
  121. package/.appwrite/config.yaml +0 -109
  122. package/.appwrite/import/README.md +0 -148
  123. package/.appwrite/import/categories-import.yaml +0 -129
  124. package/.appwrite/import/posts-import.yaml +0 -208
  125. package/.appwrite/import/users-import.yaml +0 -130
  126. package/.appwrite/importData/categories.json +0 -194
  127. package/.appwrite/importData/posts.json +0 -270
  128. package/.appwrite/importData/users.json +0 -220
  129. package/.appwrite/schemas/categories.json +0 -128
  130. package/.appwrite/schemas/exampleCollection.json +0 -52
  131. package/.appwrite/schemas/posts.json +0 -173
  132. package/.appwrite/schemas/users.json +0 -125
  133. package/CHANGELOG.md +0 -35
  134. package/CONFIG_TODO.md +0 -1189
  135. package/SELECTION_DIALOGS.md +0 -146
  136. package/SERVICE_IMPLEMENTATION_REPORT.md +0 -462
  137. package/dist/adapters/AdapterFactory.d.ts +0 -94
  138. package/dist/adapters/AdapterFactory.js +0 -420
  139. package/dist/adapters/DatabaseAdapter.d.ts +0 -243
  140. package/dist/adapters/DatabaseAdapter.js +0 -50
  141. package/dist/adapters/LegacyAdapter.d.ts +0 -50
  142. package/dist/adapters/LegacyAdapter.js +0 -615
  143. package/dist/adapters/TablesDBAdapter.d.ts +0 -45
  144. package/dist/adapters/TablesDBAdapter.js +0 -611
  145. package/dist/config/ConfigManager.d.ts +0 -450
  146. package/dist/config/ConfigManager.js +0 -650
  147. package/dist/config/configMigration.d.ts +0 -87
  148. package/dist/config/configMigration.js +0 -390
  149. package/dist/config/configValidation.d.ts +0 -66
  150. package/dist/config/configValidation.js +0 -358
  151. package/dist/config/index.d.ts +0 -8
  152. package/dist/config/index.js +0 -7
  153. package/dist/config/services/ConfigDiscoveryService.d.ts +0 -122
  154. package/dist/config/services/ConfigDiscoveryService.js +0 -322
  155. package/dist/config/services/ConfigLoaderService.d.ts +0 -129
  156. package/dist/config/services/ConfigLoaderService.js +0 -535
  157. package/dist/config/services/ConfigMergeService.d.ts +0 -208
  158. package/dist/config/services/ConfigMergeService.js +0 -308
  159. package/dist/config/services/ConfigValidationService.d.ts +0 -214
  160. package/dist/config/services/ConfigValidationService.js +0 -310
  161. package/dist/config/services/SessionAuthService.d.ts +0 -225
  162. package/dist/config/services/SessionAuthService.js +0 -456
  163. package/dist/config/services/__tests__/ConfigMergeService.test.d.ts +0 -1
  164. package/dist/config/services/__tests__/ConfigMergeService.test.js +0 -271
  165. package/dist/config/services/index.d.ts +0 -13
  166. package/dist/config/services/index.js +0 -10
  167. package/dist/config/yamlConfig.d.ts +0 -722
  168. package/dist/config/yamlConfig.js +0 -702
  169. package/dist/functions/pathResolution.d.ts +0 -37
  170. package/dist/functions/pathResolution.js +0 -185
  171. package/dist/functions/templates/count-docs-in-collection/package.json +0 -25
  172. package/dist/functions/templates/count-docs-in-collection/tsconfig.json +0 -28
  173. package/dist/functions/templates/hono-typescript/package.json +0 -26
  174. package/dist/functions/templates/hono-typescript/src/index.ts +0 -54
  175. package/dist/functions/templates/hono-typescript/tsconfig.json +0 -20
  176. package/dist/functions/templates/typescript-node/package.json +0 -25
  177. package/dist/functions/templates/typescript-node/tsconfig.json +0 -28
  178. package/dist/shared/attributeMapper.d.ts +0 -20
  179. package/dist/shared/attributeMapper.js +0 -203
  180. package/dist/shared/errorUtils.d.ts +0 -54
  181. package/dist/shared/errorUtils.js +0 -95
  182. package/dist/shared/functionManager.d.ts +0 -48
  183. package/dist/shared/functionManager.js +0 -348
  184. package/dist/shared/jsonSchemaGenerator.d.ts +0 -50
  185. package/dist/shared/jsonSchemaGenerator.js +0 -290
  186. package/dist/shared/logging.d.ts +0 -61
  187. package/dist/shared/logging.js +0 -116
  188. package/dist/shared/messageFormatter.d.ts +0 -39
  189. package/dist/shared/messageFormatter.js +0 -162
  190. package/dist/shared/pydanticModelGenerator.d.ts +0 -17
  191. package/dist/shared/pydanticModelGenerator.js +0 -615
  192. package/dist/shared/schemaGenerator.d.ts +0 -40
  193. package/dist/shared/schemaGenerator.js +0 -556
  194. package/dist/utils/ClientFactory.d.ts +0 -87
  195. package/dist/utils/ClientFactory.js +0 -212
  196. package/dist/utils/configDiscovery.d.ts +0 -78
  197. package/dist/utils/configDiscovery.js +0 -472
  198. package/dist/utils/constantsGenerator.d.ts +0 -31
  199. package/dist/utils/constantsGenerator.js +0 -321
  200. package/dist/utils/dataConverters.d.ts +0 -46
  201. package/dist/utils/dataConverters.js +0 -139
  202. package/dist/utils/directoryUtils.d.ts +0 -22
  203. package/dist/utils/directoryUtils.js +0 -59
  204. package/dist/utils/getClientFromConfig.d.ts +0 -39
  205. package/dist/utils/getClientFromConfig.js +0 -199
  206. package/dist/utils/helperFunctions.d.ts +0 -63
  207. package/dist/utils/helperFunctions.js +0 -156
  208. package/dist/utils/pathResolvers.d.ts +0 -53
  209. package/dist/utils/pathResolvers.js +0 -72
  210. package/dist/utils/projectConfig.d.ts +0 -122
  211. package/dist/utils/projectConfig.js +0 -206
  212. package/dist/utils/retryFailedPromises.d.ts +0 -2
  213. package/dist/utils/retryFailedPromises.js +0 -23
  214. package/dist/utils/sessionAuth.d.ts +0 -48
  215. package/dist/utils/sessionAuth.js +0 -164
  216. package/dist/utils/typeGuards.d.ts +0 -35
  217. package/dist/utils/typeGuards.js +0 -57
  218. package/dist/utils/validationRules.d.ts +0 -43
  219. package/dist/utils/validationRules.js +0 -42
  220. package/dist/utils/versionDetection.d.ts +0 -58
  221. package/dist/utils/versionDetection.js +0 -251
  222. package/dist/utils/yamlConverter.d.ts +0 -100
  223. package/dist/utils/yamlConverter.js +0 -428
  224. package/dist/utils/yamlLoader.d.ts +0 -70
  225. package/dist/utils/yamlLoader.js +0 -267
  226. package/scripts/copy-templates.ts +0 -23
  227. package/src/adapters/AdapterFactory.ts +0 -529
  228. package/src/adapters/DatabaseAdapter.ts +0 -319
  229. package/src/adapters/LegacyAdapter.ts +0 -844
  230. package/src/adapters/TablesDBAdapter.ts +0 -823
  231. package/src/adapters/index.ts +0 -37
  232. package/src/backups/operations/bucketBackup.ts +0 -277
  233. package/src/backups/operations/collectionBackup.ts +0 -310
  234. package/src/backups/operations/comprehensiveBackup.ts +0 -342
  235. package/src/backups/schemas/bucketManifest.ts +0 -78
  236. package/src/backups/schemas/comprehensiveManifest.ts +0 -76
  237. package/src/backups/tracking/centralizedTracking.ts +0 -352
  238. package/src/cli/commands/configCommands.ts +0 -201
  239. package/src/cli/commands/databaseCommands.ts +0 -879
  240. package/src/cli/commands/functionCommands.ts +0 -418
  241. package/src/cli/commands/schemaCommands.ts +0 -200
  242. package/src/cli/commands/storageCommands.ts +0 -152
  243. package/src/cli/commands/transferCommands.ts +0 -457
  244. package/src/collections/attributes.ts +0 -2020
  245. package/src/collections/attributes.ts.backup +0 -1555
  246. package/src/collections/indexes.ts +0 -352
  247. package/src/collections/methods.ts +0 -700
  248. package/src/collections/tableOperations.ts +0 -521
  249. package/src/collections/transferOperations.ts +0 -590
  250. package/src/collections/wipeOperations.ts +0 -346
  251. package/src/config/ConfigManager.ts +0 -849
  252. package/src/config/README.md +0 -274
  253. package/src/config/configMigration.ts +0 -575
  254. package/src/config/configValidation.ts +0 -445
  255. package/src/config/index.ts +0 -10
  256. package/src/config/services/ConfigDiscoveryService.ts +0 -410
  257. package/src/config/services/ConfigLoaderService.ts +0 -732
  258. package/src/config/services/ConfigMergeService.ts +0 -388
  259. package/src/config/services/ConfigValidationService.ts +0 -394
  260. package/src/config/services/SessionAuthService.ts +0 -565
  261. package/src/config/services/__tests__/ConfigMergeService.test.ts +0 -351
  262. package/src/config/services/index.ts +0 -29
  263. package/src/config/yamlConfig.ts +0 -761
  264. package/src/databases/methods.ts +0 -49
  265. package/src/databases/setup.ts +0 -77
  266. package/src/examples/yamlTerminologyExample.ts +0 -346
  267. package/src/functions/deployments.ts +0 -220
  268. package/src/functions/fnConfigDiscovery.ts +0 -103
  269. package/src/functions/methods.ts +0 -284
  270. package/src/functions/pathResolution.ts +0 -227
  271. package/src/functions/templates/count-docs-in-collection/README.md +0 -54
  272. package/src/functions/templates/count-docs-in-collection/package.json +0 -25
  273. package/src/functions/templates/count-docs-in-collection/src/main.ts +0 -159
  274. package/src/functions/templates/count-docs-in-collection/src/request.ts +0 -9
  275. package/src/functions/templates/count-docs-in-collection/tsconfig.json +0 -28
  276. package/src/functions/templates/hono-typescript/README.md +0 -286
  277. package/src/functions/templates/hono-typescript/package.json +0 -26
  278. package/src/functions/templates/hono-typescript/src/adapters/request.ts +0 -74
  279. package/src/functions/templates/hono-typescript/src/adapters/response.ts +0 -106
  280. package/src/functions/templates/hono-typescript/src/app.ts +0 -180
  281. package/src/functions/templates/hono-typescript/src/context.ts +0 -103
  282. package/src/functions/templates/hono-typescript/src/middleware/appwrite.ts +0 -119
  283. package/src/functions/templates/hono-typescript/tsconfig.json +0 -20
  284. package/src/functions/templates/typescript-node/README.md +0 -32
  285. package/src/functions/templates/typescript-node/package.json +0 -25
  286. package/src/functions/templates/typescript-node/src/context.ts +0 -103
  287. package/src/functions/templates/typescript-node/src/index.ts +0 -29
  288. package/src/functions/templates/typescript-node/tsconfig.json +0 -28
  289. package/src/functions/templates/uv/README.md +0 -31
  290. package/src/functions/templates/uv/pyproject.toml +0 -30
  291. package/src/functions/templates/uv/src/__init__.py +0 -0
  292. package/src/functions/templates/uv/src/context.py +0 -125
  293. package/src/functions/templates/uv/src/index.py +0 -46
  294. package/src/init.ts +0 -62
  295. package/src/interactiveCLI.ts +0 -1136
  296. package/src/main.ts +0 -1670
  297. package/src/migrations/afterImportActions.ts +0 -580
  298. package/src/migrations/appwriteToX.ts +0 -664
  299. package/src/migrations/comprehensiveTransfer.ts +0 -2285
  300. package/src/migrations/dataLoader.ts +0 -1702
  301. package/src/migrations/importController.ts +0 -428
  302. package/src/migrations/importDataActions.ts +0 -315
  303. package/src/migrations/relationships.ts +0 -334
  304. package/src/migrations/services/DataTransformationService.ts +0 -196
  305. package/src/migrations/services/FileHandlerService.ts +0 -311
  306. package/src/migrations/services/ImportOrchestrator.ts +0 -666
  307. package/src/migrations/services/RateLimitManager.ts +0 -363
  308. package/src/migrations/services/RelationshipResolver.ts +0 -461
  309. package/src/migrations/services/UserMappingService.ts +0 -345
  310. package/src/migrations/services/ValidationService.ts +0 -349
  311. package/src/migrations/transfer.ts +0 -1068
  312. package/src/migrations/yaml/YamlImportConfigLoader.ts +0 -439
  313. package/src/migrations/yaml/YamlImportIntegration.ts +0 -446
  314. package/src/migrations/yaml/generateImportSchemas.ts +0 -1354
  315. package/src/schemas/authUser.ts +0 -23
  316. package/src/setup.ts +0 -8
  317. package/src/setupCommands.ts +0 -603
  318. package/src/setupController.ts +0 -43
  319. package/src/shared/attributeMapper.ts +0 -229
  320. package/src/shared/backupMetadataSchema.ts +0 -93
  321. package/src/shared/backupTracking.ts +0 -211
  322. package/src/shared/confirmationDialogs.ts +0 -327
  323. package/src/shared/errorUtils.ts +0 -110
  324. package/src/shared/functionManager.ts +0 -537
  325. package/src/shared/jsonSchemaGenerator.ts +0 -383
  326. package/src/shared/logging.ts +0 -149
  327. package/src/shared/messageFormatter.ts +0 -208
  328. package/src/shared/migrationHelpers.ts +0 -232
  329. package/src/shared/operationLogger.ts +0 -20
  330. package/src/shared/operationQueue.ts +0 -377
  331. package/src/shared/operationsTable.ts +0 -338
  332. package/src/shared/operationsTableSchema.ts +0 -60
  333. package/src/shared/progressManager.ts +0 -278
  334. package/src/shared/pydanticModelGenerator.ts +0 -618
  335. package/src/shared/relationshipExtractor.ts +0 -214
  336. package/src/shared/schemaGenerator.ts +0 -644
  337. package/src/shared/selectionDialogs.ts +0 -749
  338. package/src/storage/backupCompression.ts +0 -88
  339. package/src/storage/methods.ts +0 -698
  340. package/src/storage/schemas.ts +0 -205
  341. package/src/tables/indexManager.ts +0 -409
  342. package/src/types/node-appwrite-tablesdb.d.ts +0 -44
  343. package/src/types.ts +0 -9
  344. package/src/users/methods.ts +0 -359
  345. package/src/utils/ClientFactory.ts +0 -240
  346. package/src/utils/configDiscovery.ts +0 -557
  347. package/src/utils/configMigration.ts +0 -348
  348. package/src/utils/constantsGenerator.ts +0 -369
  349. package/src/utils/dataConverters.ts +0 -159
  350. package/src/utils/directoryUtils.ts +0 -61
  351. package/src/utils/getClientFromConfig.ts +0 -257
  352. package/src/utils/helperFunctions.ts +0 -228
  353. package/src/utils/index.ts +0 -2
  354. package/src/utils/loadConfigs.ts +0 -449
  355. package/src/utils/pathResolvers.ts +0 -81
  356. package/src/utils/projectConfig.ts +0 -340
  357. package/src/utils/retryFailedPromises.ts +0 -29
  358. package/src/utils/sessionAuth.ts +0 -230
  359. package/src/utils/setupFiles.ts +0 -1238
  360. package/src/utils/typeGuards.ts +0 -65
  361. package/src/utils/validationRules.ts +0 -88
  362. package/src/utils/versionDetection.ts +0 -292
  363. package/src/utils/yamlConverter.ts +0 -542
  364. package/src/utils/yamlLoader.ts +0 -371
  365. package/src/utilsController.ts +0 -1213
  366. package/tests/README.md +0 -497
  367. package/tests/adapters/AdapterFactory.test.ts +0 -277
  368. package/tests/integration/syncOperations.test.ts +0 -463
  369. package/tests/jest.config.js +0 -25
  370. package/tests/migration/configMigration.test.ts +0 -546
  371. package/tests/setup.ts +0 -62
  372. package/tests/testUtils.ts +0 -340
  373. package/tests/utils/loadConfigs.test.ts +0 -350
  374. package/tests/validation/configValidation.test.ts +0 -412
  375. package/tmp-sync-test/.appwrite/collections/TestCollection.yaml +0 -7
  376. package/tsconfig.json +0 -44
@@ -1,152 +0,0 @@
1
- import inquirer from "inquirer";
2
- import chalk from "chalk";
3
- import { Storage, Permission, Role, Compression, type Models } from "node-appwrite";
4
- import type { InteractiveCLI } from "../../interactiveCLI.js";
5
- import { MessageFormatter } from "../../shared/messageFormatter.js";
6
- import { listBuckets, createBucket as createBucketApi, deleteBucket as deleteBucketApi } from "../../storage/methods.js";
7
- import { writeYamlConfig } from "../../config/yamlConfig.js";
8
- import { ConfigManager } from "../../config/ConfigManager.js";
9
-
10
- export const storageCommands = {
11
- async createBucket(cli: InteractiveCLI): Promise<void> {
12
- const storage: Storage = (cli as any).controller!.storage!;
13
- if (!storage) {
14
- MessageFormatter.error("Storage client not initialized", undefined, { prefix: "Buckets" });
15
- return;
16
- }
17
-
18
- const answers = await inquirer.prompt([
19
- { type: 'input', name: 'name', message: 'Bucket name:', validate: (v:string)=> v?.trim()?.length>0 || 'Required' },
20
- { type: 'input', name: 'id', message: 'Bucket ID (optional):' },
21
- { type: 'confirm', name: 'publicRead', message: 'Public read access?', default: false },
22
- { type: 'confirm', name: 'fileSecurity', message: 'Enable file-level security?', default: false },
23
- { type: 'confirm', name: 'enabled', message: 'Enable bucket?', default: true },
24
- { type: 'number', name: 'maximumFileSize', message: 'Max file size (bytes, optional):', default: undefined },
25
- { type: 'input', name: 'allowedFileExtensions', message: 'Allowed extensions (comma separated, optional):', default: '' },
26
- { type: 'list', name: 'compression', message: 'Compression:', choices: ['none','gzip','zstd'], default: 'none' },
27
- { type: 'confirm', name: 'encryption', message: 'Enable encryption?', default: false },
28
- { type: 'confirm', name: 'antivirus', message: 'Enable antivirus?', default: false },
29
- ]);
30
-
31
- const permissions: string[] = [];
32
- if (answers.publicRead) permissions.push(Permission.read(Role.any()));
33
-
34
- const bucketInput: Omit<Models.Bucket, "$id" | "$createdAt" | "$updatedAt"> = {
35
- name: answers.name,
36
- $permissions: permissions,
37
- fileSecurity: !!answers.fileSecurity,
38
- enabled: !!answers.enabled,
39
- maximumFileSize: answers.maximumFileSize || undefined,
40
- allowedFileExtensions: String(answers.allowedFileExtensions || '')
41
- .split(',')
42
- .map((s) => s.trim())
43
- .filter(Boolean),
44
- compression: answers.compression as Compression,
45
- encryption: !!answers.encryption,
46
- antivirus: !!answers.antivirus,
47
- } as any;
48
-
49
- try {
50
- const created = await createBucketApi(storage, bucketInput, answers.id || undefined);
51
- MessageFormatter.success(`Bucket '${answers.name}' created`, { prefix: 'Buckets' });
52
-
53
- // Update in-memory config and persist to YAML as a global bucket entry
54
- const controller = (cli as any).controller!;
55
- controller.config.buckets = controller.config.buckets || [];
56
- controller.config.buckets.push({
57
- $id: (created as any).$id || answers.id || bucketInput.name,
58
- name: bucketInput.name,
59
- permissions: [],
60
- fileSecurity: bucketInput.fileSecurity,
61
- enabled: bucketInput.enabled,
62
- maximumFileSize: bucketInput.maximumFileSize,
63
- allowedFileExtensions: bucketInput.allowedFileExtensions,
64
- compression: bucketInput.compression,
65
- encryption: bucketInput.encryption,
66
- antivirus: bucketInput.antivirus,
67
- });
68
-
69
- const cfgMgr = ConfigManager.getInstance();
70
- const cfgPath = cfgMgr.getConfigPath();
71
- if (cfgPath && /\.ya?ml$/i.test(cfgPath)) {
72
- await writeYamlConfig(cfgPath, controller.config);
73
- MessageFormatter.info(`Added bucket to config.yaml`, { prefix: 'Buckets' });
74
- } else {
75
- MessageFormatter.warning(`Config is not YAML; updated in-memory only. Please update your TypeScript config manually.`, { prefix: 'Buckets' });
76
- }
77
- } catch (e) {
78
- MessageFormatter.error('Failed to create bucket', e instanceof Error ? e : new Error(String(e)), { prefix: 'Buckets' });
79
- }
80
- },
81
-
82
- async deleteBuckets(cli: InteractiveCLI): Promise<void> {
83
- const storage: Storage = (cli as any).controller!.storage!;
84
- if (!storage) {
85
- MessageFormatter.error("Storage client not initialized", undefined, { prefix: "Buckets" });
86
- return;
87
- }
88
-
89
- try {
90
- const res = await listBuckets(storage);
91
- const buckets: Models.Bucket[] = res.buckets || [];
92
- if (buckets.length === 0) {
93
- MessageFormatter.info('No buckets found', { prefix: 'Buckets' });
94
- return;
95
- }
96
-
97
- const { toDelete } = await inquirer.prompt([
98
- {
99
- type: 'checkbox',
100
- name: 'toDelete',
101
- message: chalk.red('Select buckets to delete:'),
102
- choices: buckets.map((b) => ({ name: `${b.name} (${b.$id})`, value: b.$id })),
103
- pageSize: 10,
104
- }
105
- ]);
106
-
107
- if (!toDelete || toDelete.length === 0) {
108
- MessageFormatter.info('No buckets selected', { prefix: 'Buckets' });
109
- return;
110
- }
111
-
112
- const { confirm } = await inquirer.prompt([
113
- { type: 'confirm', name: 'confirm', message: `Delete ${toDelete.length} bucket(s)?`, default: false }
114
- ]);
115
- if (!confirm) return;
116
-
117
- const controller = (cli as any).controller!;
118
- for (const id of toDelete) {
119
- try {
120
- await deleteBucketApi(storage, id);
121
- MessageFormatter.success(`Deleted bucket ${id}`, { prefix: 'Buckets' });
122
-
123
- // Remove from in-memory config (global buckets)
124
- if (Array.isArray(controller.config.buckets)) {
125
- controller.config.buckets = controller.config.buckets.filter((b: any) => b.$id !== id);
126
- }
127
- // Clear database-linked bucket references if matching
128
- if (Array.isArray(controller.config.databases)) {
129
- controller.config.databases = controller.config.databases.map((db: any) => ({
130
- ...db,
131
- bucket: db.bucket && db.bucket.$id === id ? undefined : db.bucket,
132
- }));
133
- }
134
- } catch (e) {
135
- MessageFormatter.error(`Failed to delete bucket ${id}`, e instanceof Error ? e : new Error(String(e)), { prefix: 'Buckets' });
136
- }
137
- }
138
-
139
- // Persist YAML changes
140
- const cfgMgr = ConfigManager.getInstance();
141
- const cfgPath = cfgMgr.getConfigPath();
142
- if (cfgPath && /\.ya?ml$/i.test(cfgPath)) {
143
- await writeYamlConfig(cfgPath, controller.config);
144
- MessageFormatter.info(`Updated config.yaml after deletion`, { prefix: 'Buckets' });
145
- } else {
146
- MessageFormatter.warning(`Config is not YAML; updated in-memory only. Please update your TypeScript config manually.`, { prefix: 'Buckets' });
147
- }
148
- } catch (e) {
149
- MessageFormatter.error('Failed to list buckets', e instanceof Error ? e : new Error(String(e)), { prefix: 'Buckets' });
150
- }
151
- }
152
- };
@@ -1,457 +0,0 @@
1
- import inquirer from "inquirer";
2
- import { Databases, Storage } from "node-appwrite";
3
- import { MessageFormatter } from "../../shared/messageFormatter.js";
4
- import { fetchAllDatabases } from "../../databases/methods.js";
5
- import { listBuckets } from "../../storage/methods.js";
6
- import { getClient } from "../../utils/getClientFromConfig.js";
7
- import { ComprehensiveTransfer, type ComprehensiveTransferOptions } from "../../migrations/comprehensiveTransfer.js";
8
- import type { TransferOptions } from "../../migrations/transfer.js";
9
- import type { InteractiveCLI } from "../../interactiveCLI.js";
10
-
11
- export const transferCommands = {
12
- async transferData(cli: InteractiveCLI): Promise<void> {
13
- if (!(cli as any).controller!.database) {
14
- throw new Error(
15
- "Database is not initialized, is the config file correct & created?"
16
- );
17
- }
18
-
19
- const { isRemote } = await inquirer.prompt([
20
- {
21
- type: "confirm",
22
- name: "isRemote",
23
- message: "Is this a remote transfer?",
24
- default: false,
25
- },
26
- ]);
27
-
28
- let sourceClient = (cli as any).controller!.database;
29
- let targetClient: Databases;
30
- let sourceDatabases: any[];
31
- let targetDatabases: any[];
32
- let remoteOptions:
33
- | {
34
- transferEndpoint: string;
35
- transferProject: string;
36
- transferKey: string;
37
- }
38
- | undefined;
39
-
40
- if (isRemote) {
41
- remoteOptions = await inquirer.prompt([
42
- {
43
- type: "input",
44
- name: "transferEndpoint",
45
- message: "Enter the remote endpoint:",
46
- },
47
- {
48
- type: "input",
49
- name: "transferProject",
50
- message: "Enter the remote project ID:",
51
- },
52
- {
53
- type: "input",
54
- name: "transferKey",
55
- message: "Enter the remote API key:",
56
- },
57
- ]);
58
-
59
- const remoteClient = getClient(
60
- remoteOptions!.transferEndpoint,
61
- remoteOptions!.transferProject,
62
- remoteOptions!.transferKey
63
- );
64
- targetClient = new Databases(remoteClient);
65
-
66
- sourceDatabases = await fetchAllDatabases(sourceClient);
67
- targetDatabases = await fetchAllDatabases(targetClient);
68
- } else {
69
- targetClient = sourceClient;
70
- const allDatabases = await fetchAllDatabases(sourceClient);
71
- sourceDatabases = targetDatabases = allDatabases;
72
- }
73
-
74
- const fromDbs = await (cli as any).selectDatabases(
75
- sourceDatabases,
76
- "Select the source database:",
77
- false
78
- );
79
- const fromDb = fromDbs[0];
80
- if (!fromDb) {
81
- throw new Error("No source database selected");
82
- }
83
- const availableDbs = targetDatabases.filter((db: any) => db.$id !== fromDb.$id);
84
- const targetDbs = await (cli as any).selectDatabases(
85
- availableDbs,
86
- "Select the target database:",
87
- false
88
- );
89
- const targetDb = targetDbs[0];
90
- if (!targetDb) {
91
- throw new Error("No target database selected");
92
- }
93
-
94
- const selectedCollections = await (cli as any).selectCollectionsAndTables(
95
- fromDb,
96
- sourceClient,
97
- "Select collections/tables to transfer:",
98
- true,
99
- false // don't prefer local for transfers
100
- );
101
-
102
- const { transferStorage } = await inquirer.prompt([
103
- {
104
- type: "confirm",
105
- name: "transferStorage",
106
- message: "Do you want to transfer storage as well?",
107
- default: false,
108
- },
109
- ]);
110
-
111
- let sourceBucket, targetBucket;
112
-
113
- if (transferStorage) {
114
- const sourceStorage = new Storage((cli as any).controller!.appwriteServer!);
115
- const targetStorage = isRemote
116
- ? new Storage(
117
- getClient(
118
- remoteOptions!.transferEndpoint,
119
- remoteOptions!.transferProject,
120
- remoteOptions!.transferKey
121
- )
122
- )
123
- : sourceStorage;
124
-
125
- const sourceBuckets = await listBuckets(sourceStorage);
126
- const targetBuckets = isRemote
127
- ? await listBuckets(targetStorage)
128
- : sourceBuckets;
129
-
130
- const sourceBucketPicked = await (cli as any).selectBuckets(
131
- sourceBuckets.buckets,
132
- "Select the source bucket:",
133
- false
134
- );
135
- const targetBucketPicked = await (cli as any).selectBuckets(
136
- targetBuckets.buckets,
137
- "Select the target bucket:",
138
- false
139
- );
140
- sourceBucket = sourceBucketPicked[0];
141
- targetBucket = targetBucketPicked[0];
142
- }
143
-
144
- let transferOptions: TransferOptions = {
145
- fromDb,
146
- targetDb,
147
- isRemote,
148
- collections:
149
- selectedCollections.length > 0
150
- ? selectedCollections.map((c: any) => c.$id)
151
- : undefined,
152
- sourceBucket,
153
- targetBucket,
154
- };
155
-
156
- if (isRemote && remoteOptions) {
157
- transferOptions = {
158
- ...transferOptions,
159
- ...remoteOptions,
160
- };
161
- }
162
-
163
- MessageFormatter.progress("Transferring data...", { prefix: "Transfer" });
164
- await (cli as any).controller!.transferData(transferOptions);
165
- MessageFormatter.success("Data transfer completed", { prefix: "Transfer" });
166
- },
167
-
168
- async comprehensiveTransfer(cli: InteractiveCLI): Promise<void> {
169
- MessageFormatter.info("Starting comprehensive transfer configuration...", { prefix: "Transfer" });
170
-
171
- try {
172
- // Initialize controller to optionally load config if available (supports both YAML and TypeScript configs)
173
- await (cli as any).initControllerIfNeeded();
174
-
175
- // Extract session for potential transfer operations
176
- const sessionConfig = (cli as any).extractSessionFromController();
177
-
178
- // Check if user has an appwrite config for easier setup
179
- const hasAppwriteConfig = (cli as any).controller?.config?.appwriteEndpoint &&
180
- (cli as any).controller?.config?.appwriteProject &&
181
- (cli as any).controller?.config?.appwriteKey;
182
-
183
- let sourceConfig: any;
184
- let targetConfig: any;
185
-
186
- if (hasAppwriteConfig) {
187
- // Offer to use existing config for source
188
- const { useConfigForSource } = await inquirer.prompt([
189
- {
190
- type: "confirm",
191
- name: "useConfigForSource",
192
- message: "Use your current appwriteConfig as the source?",
193
- default: true,
194
- },
195
- ]);
196
-
197
- if (useConfigForSource) {
198
- sourceConfig = {
199
- sourceEndpoint: (cli as any).controller!.config!.appwriteEndpoint,
200
- sourceProject: (cli as any).controller!.config!.appwriteProject,
201
- sourceKey: (cli as any).controller!.config!.appwriteKey,
202
- };
203
- // Preserve session for source if available
204
- if (sessionConfig?.sessionCookie) {
205
- sourceConfig.sessionCookie = sessionConfig.sessionCookie;
206
- sourceConfig.sessionMetadata = sessionConfig.sessionMetadata;
207
- }
208
- MessageFormatter.info(`Using config source: ${sourceConfig.sourceEndpoint}`, { prefix: "Transfer" });
209
- } else {
210
- // Get source configuration manually
211
- sourceConfig = await inquirer.prompt([
212
- {
213
- type: "input",
214
- name: "sourceEndpoint",
215
- message: "Enter the source Appwrite endpoint:",
216
- validate: (input) => input.trim() !== "" || "Endpoint cannot be empty",
217
- },
218
- {
219
- type: "input",
220
- name: "sourceProject",
221
- message: "Enter the source project ID:",
222
- validate: (input) => input.trim() !== "" || "Project ID cannot be empty",
223
- },
224
- {
225
- type: "password",
226
- name: "sourceKey",
227
- message: "Enter the source API key:",
228
- validate: (input) => input.trim() !== "" || "API key cannot be empty",
229
- },
230
- ]);
231
- }
232
-
233
- // Offer to use existing config for target
234
- const { useConfigForTarget } = await inquirer.prompt([
235
- {
236
- type: "confirm",
237
- name: "useConfigForTarget",
238
- message: "Use your current appwriteConfig as the target?",
239
- default: false,
240
- },
241
- ]);
242
-
243
- if (useConfigForTarget) {
244
- targetConfig = {
245
- targetEndpoint: (cli as any).controller!.config!.appwriteEndpoint,
246
- targetProject: (cli as any).controller!.config!.appwriteProject,
247
- targetKey: (cli as any).controller!.config!.appwriteKey,
248
- };
249
- // Preserve session for target if available
250
- if (sessionConfig?.sessionCookie) {
251
- targetConfig.sessionCookie = sessionConfig.sessionCookie;
252
- targetConfig.sessionMetadata = sessionConfig.sessionMetadata;
253
- }
254
- MessageFormatter.info(`Using config target: ${targetConfig.targetEndpoint}`, { prefix: "Transfer" });
255
- } else {
256
- // Get target configuration manually
257
- targetConfig = await inquirer.prompt([
258
- {
259
- type: "input",
260
- name: "targetEndpoint",
261
- message: "Enter the target Appwrite endpoint:",
262
- validate: (input) => input.trim() !== "" || "Endpoint cannot be empty",
263
- },
264
- {
265
- type: "input",
266
- name: "targetProject",
267
- message: "Enter the target project ID:",
268
- validate: (input) => input.trim() !== "" || "Project ID cannot be empty",
269
- },
270
- {
271
- type: "password",
272
- name: "targetKey",
273
- message: "Enter the target API key:",
274
- validate: (input) => input.trim() !== "" || "API key cannot be empty",
275
- },
276
- ]);
277
- }
278
- } else {
279
- // No appwrite config found, get both configurations manually
280
- MessageFormatter.info("No appwriteConfig found, please enter source and target configurations manually", { prefix: "Transfer" });
281
-
282
- // Get source configuration
283
- sourceConfig = await inquirer.prompt([
284
- {
285
- type: "input",
286
- name: "sourceEndpoint",
287
- message: "Enter the source Appwrite endpoint:",
288
- validate: (input) => input.trim() !== "" || "Endpoint cannot be empty",
289
- },
290
- {
291
- type: "input",
292
- name: "sourceProject",
293
- message: "Enter the source project ID:",
294
- validate: (input) => input.trim() !== "" || "Project ID cannot be empty",
295
- },
296
- {
297
- type: "password",
298
- name: "sourceKey",
299
- message: "Enter the source API key:",
300
- validate: (input) => input.trim() !== "" || "API key cannot be empty",
301
- },
302
- ]);
303
-
304
- // Get target configuration
305
- targetConfig = await inquirer.prompt([
306
- {
307
- type: "input",
308
- name: "targetEndpoint",
309
- message: "Enter the target Appwrite endpoint:",
310
- validate: (input) => input.trim() !== "" || "Endpoint cannot be empty",
311
- },
312
- {
313
- type: "input",
314
- name: "targetProject",
315
- message: "Enter the target project ID:",
316
- validate: (input) => input.trim() !== "" || "Project ID cannot be empty",
317
- },
318
- {
319
- type: "password",
320
- name: "targetKey",
321
- message: "Enter the target API key:",
322
- validate: (input) => input.trim() !== "" || "API key cannot be empty",
323
- },
324
- ]);
325
- }
326
-
327
- // Get transfer options
328
- const transferOptions = await inquirer.prompt([
329
- {
330
- type: "checkbox",
331
- name: "transferTypes",
332
- message: "Select what to transfer:",
333
- choices: [
334
- { name: "👥 Users", value: "users", checked: true },
335
- { name: "👥 Teams", value: "teams", checked: true },
336
- { name: "🗄️ Databases", value: "databases", checked: true },
337
- { name: "📦 Storage Buckets", value: "buckets", checked: true },
338
- { name: "⚡ Functions", value: "functions", checked: true },
339
- ],
340
- validate: (input) => input.length > 0 || "Select at least one transfer type",
341
- },
342
- {
343
- type: "list",
344
- name: "concurrencyLimit",
345
- message: "Select concurrency limit:",
346
- choices: [
347
- { name: "5 (Conservative) - Users: 2, Files: 1", value: 5 },
348
- { name: "10 (Balanced) - Users: 5, Files: 2", value: 10 },
349
- { name: "15 - Users: 7, Files: 3", value: 15 },
350
- { name: "20 - Users: 10, Files: 5", value: 20 },
351
- { name: "25 - Users: 12, Files: 6", value: 25 },
352
- { name: "30 - Users: 15, Files: 7", value: 30 },
353
- { name: "35 - Users: 17, Files: 8", value: 35 },
354
- { name: "40 - Users: 20, Files: 10", value: 40 },
355
- { name: "45 - Users: 22, Files: 11", value: 45 },
356
- { name: "50 - Users: 25, Files: 12", value: 50 },
357
- { name: "55 - Users: 27, Files: 13", value: 55 },
358
- { name: "60 - Users: 30, Files: 15", value: 60 },
359
- { name: "65 - Users: 32, Files: 16", value: 65 },
360
- { name: "70 - Users: 35, Files: 17", value: 70 },
361
- { name: "75 - Users: 37, Files: 18", value: 75 },
362
- { name: "80 - Users: 40, Files: 20", value: 80 },
363
- { name: "85 - Users: 42, Files: 21", value: 85 },
364
- { name: "90 - Users: 45, Files: 22", value: 90 },
365
- { name: "95 - Users: 47, Files: 23", value: 95 },
366
- { name: "100 (Aggressive) - Users: 50, Files: 25", value: 100 },
367
- ],
368
- default: 10,
369
- },
370
- {
371
- type: "confirm",
372
- name: "dryRun",
373
- message: "Run in dry-run mode (no actual changes)?",
374
- default: false,
375
- },
376
- ]);
377
-
378
- // Confirmation
379
- const { confirmed } = await inquirer.prompt([
380
- {
381
- type: "confirm",
382
- name: "confirmed",
383
- message: `Are you sure you want to ${transferOptions.dryRun ? "dry-run" : "perform"} comprehensive transfer from ${sourceConfig.sourceEndpoint} to ${targetConfig.targetEndpoint}?`,
384
- default: false,
385
- },
386
- ]);
387
-
388
- if (!confirmed) {
389
- MessageFormatter.info("Transfer cancelled by user", { prefix: "Transfer" });
390
- return;
391
- }
392
-
393
- // Password preservation information
394
- if (transferOptions.transferTypes.includes("users") && !transferOptions.dryRun) {
395
- MessageFormatter.info("User Password Transfer Information:", { prefix: "Transfer" });
396
- MessageFormatter.info("✅ Users with hashed passwords (Argon2, Bcrypt, Scrypt, MD5, SHA, PHPass) will preserve their passwords", { prefix: "Transfer" });
397
- MessageFormatter.info("⚠️ Users without hash information will receive temporary passwords and need to reset", { prefix: "Transfer" });
398
- MessageFormatter.info("🔒 All user data (preferences, labels, verification status) will be preserved", { prefix: "Transfer" });
399
-
400
- const { continueWithUsers } = await inquirer.prompt([
401
- {
402
- type: "confirm",
403
- name: "continueWithUsers",
404
- message: "Continue with user transfer?",
405
- default: true,
406
- },
407
- ]);
408
-
409
- if (!continueWithUsers) {
410
- // Remove users from transfer types
411
- transferOptions.transferTypes = transferOptions.transferTypes.filter((type: string) => type !== "users");
412
- if (transferOptions.transferTypes.length === 0) {
413
- MessageFormatter.info("No transfer types selected, cancelling", { prefix: "Transfer" });
414
- return;
415
- }
416
- }
417
- }
418
-
419
- // Execute comprehensive transfer
420
- const comprehensiveTransferOptions: ComprehensiveTransferOptions = {
421
- sourceEndpoint: sourceConfig.sourceEndpoint,
422
- sourceProject: sourceConfig.sourceProject,
423
- sourceKey: sourceConfig.sourceKey,
424
- targetEndpoint: targetConfig.targetEndpoint,
425
- targetProject: targetConfig.targetProject,
426
- targetKey: targetConfig.targetKey,
427
- transferUsers: transferOptions.transferTypes.includes("users"),
428
- transferTeams: transferOptions.transferTypes.includes("teams"),
429
- transferDatabases: transferOptions.transferTypes.includes("databases"),
430
- transferBuckets: transferOptions.transferTypes.includes("buckets"),
431
- transferFunctions: transferOptions.transferTypes.includes("functions"),
432
- concurrencyLimit: transferOptions.concurrencyLimit,
433
- dryRun: transferOptions.dryRun,
434
- };
435
-
436
- const transfer = new ComprehensiveTransfer(comprehensiveTransferOptions);
437
- const results = await transfer.execute();
438
-
439
- // Display results
440
- if (transferOptions.dryRun) {
441
- MessageFormatter.success("Dry run completed successfully!", { prefix: "Transfer" });
442
- } else {
443
- MessageFormatter.success("Comprehensive transfer completed!", { prefix: "Transfer" });
444
- if (transferOptions.transferTypes.includes("users") && results.users.transferred > 0) {
445
- MessageFormatter.info("Users with preserved password hashes can log in with their original passwords", { prefix: "Transfer" });
446
- MessageFormatter.info("Users with temporary passwords will need to reset their passwords", { prefix: "Transfer" });
447
- }
448
- if (transferOptions.transferTypes.includes("teams") && results.teams.transferred > 0) {
449
- MessageFormatter.info("Team memberships have been transferred and may require user acceptance of invitations", { prefix: "Transfer" });
450
- }
451
- }
452
-
453
- } catch (error) {
454
- MessageFormatter.error("Comprehensive transfer failed", error instanceof Error ? error : new Error(String(error)), { prefix: "Transfer" });
455
- }
456
- }
457
- };