@orchestr-sh/orchestr 1.11.0 → 1.11.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/CHANGELOG.md +20 -0
- package/CODE_OF_CONDUCT.md +43 -0
- package/CONTRIBUTING.md +274 -0
- package/dist/Cache/CacheManager.cjs +1 -1
- package/dist/Cache/CacheManager.mjs +1 -1
- package/dist/Cache/CacheManager.mjs.map +1 -1
- package/dist/Cache/Events/CacheFlushed.cjs +1 -1
- package/dist/Cache/Events/CacheFlushed.mjs +1 -1
- package/dist/Cache/Events/CacheFlushed.mjs.map +1 -1
- package/dist/Cache/Events/CacheHit.cjs +1 -1
- package/dist/Cache/Events/CacheHit.mjs +1 -1
- package/dist/Cache/Events/CacheHit.mjs.map +1 -1
- package/dist/Cache/Events/CacheMissed.cjs +1 -1
- package/dist/Cache/Events/CacheMissed.mjs +1 -1
- package/dist/Cache/Events/CacheMissed.mjs.map +1 -1
- package/dist/Cache/Events/KeyForgotten.cjs +1 -1
- package/dist/Cache/Events/KeyForgotten.mjs +1 -1
- package/dist/Cache/Events/KeyForgotten.mjs.map +1 -1
- package/dist/Cache/Events/KeyWritten.cjs +1 -1
- package/dist/Cache/Events/KeyWritten.mjs +1 -1
- package/dist/Cache/Events/KeyWritten.mjs.map +1 -1
- package/dist/Cache/Locks/CacheLock.cjs +1 -1
- package/dist/Cache/Locks/CacheLock.mjs +1 -1
- package/dist/Cache/Locks/CacheLock.mjs.map +1 -1
- package/dist/Cache/Locks/Lock.cjs +1 -1
- package/dist/Cache/Locks/Lock.mjs +1 -1
- package/dist/Cache/Locks/Lock.mjs.map +1 -1
- package/dist/Cache/Repository.cjs +1 -1
- package/dist/Cache/Repository.mjs +1 -1
- package/dist/Cache/Repository.mjs.map +1 -1
- package/dist/Cache/Stores/ArrayStore.cjs +1 -1
- package/dist/Cache/Stores/ArrayStore.mjs +1 -1
- package/dist/Cache/Stores/ArrayStore.mjs.map +1 -1
- package/dist/Cache/Stores/DatabaseStore.cjs +1 -1
- package/dist/Cache/Stores/DatabaseStore.mjs +1 -1
- package/dist/Cache/Stores/DatabaseStore.mjs.map +1 -1
- package/dist/Cache/Stores/FileStore.cjs +1 -1
- package/dist/Cache/Stores/FileStore.mjs +1 -1
- package/dist/Cache/Stores/FileStore.mjs.map +1 -1
- package/dist/Cache/Tags/TagSet.cjs +1 -1
- package/dist/Cache/Tags/TagSet.mjs +1 -1
- package/dist/Cache/Tags/TagSet.mjs.map +1 -1
- package/dist/Cache/Tags/TaggedCache.cjs +1 -1
- package/dist/Cache/Tags/TaggedCache.mjs +1 -1
- package/dist/Cache/Tags/TaggedCache.mjs.map +1 -1
- package/dist/Console/Commands/CacheClearCommand.cjs +1 -1
- package/dist/Console/Commands/CacheClearCommand.mjs +1 -1
- package/dist/Console/Commands/CacheClearCommand.mjs.map +1 -1
- package/dist/Console/Commands/CacheForgetCommand.cjs +1 -1
- package/dist/Console/Commands/CacheForgetCommand.mjs +1 -1
- package/dist/Console/Commands/CacheForgetCommand.mjs.map +1 -1
- package/dist/Console/Commands/CacheTableCommand.cjs +1 -1
- package/dist/Console/Commands/CacheTableCommand.mjs +1 -1
- package/dist/Console/Commands/CacheTableCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployEnvCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployInitCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployProvisionCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployRollbackCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployServerCommand.mjs.map +1 -1
- package/dist/Console/Commands/DeployStatusCommand.mjs.map +1 -1
- package/dist/Console/Commands/EventCacheCommand.cjs +1 -1
- package/dist/Console/Commands/EventCacheCommand.mjs +1 -1
- package/dist/Console/Commands/EventCacheCommand.mjs.map +1 -1
- package/dist/Console/Commands/EventClearCommand.cjs +1 -1
- package/dist/Console/Commands/EventClearCommand.mjs +1 -1
- package/dist/Console/Commands/EventClearCommand.mjs.map +1 -1
- package/dist/Console/Commands/EventListCommand.cjs +1 -1
- package/dist/Console/Commands/EventListCommand.mjs +1 -1
- package/dist/Console/Commands/EventListCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeControllerCommand.cjs +1 -1
- package/dist/Console/Commands/MakeControllerCommand.mjs +1 -1
- package/dist/Console/Commands/MakeControllerCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeEventCommand.cjs +1 -1
- package/dist/Console/Commands/MakeEventCommand.mjs +1 -1
- package/dist/Console/Commands/MakeEventCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeJobCommand.cjs +1 -1
- package/dist/Console/Commands/MakeJobCommand.mjs +1 -1
- package/dist/Console/Commands/MakeJobCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeListenerCommand.cjs +1 -1
- package/dist/Console/Commands/MakeListenerCommand.mjs +1 -1
- package/dist/Console/Commands/MakeListenerCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeMigrationCommand.cjs +1 -1
- package/dist/Console/Commands/MakeMigrationCommand.mjs +1 -1
- package/dist/Console/Commands/MakeMigrationCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeSeederCommand.cjs +1 -1
- package/dist/Console/Commands/MakeSeederCommand.mjs +1 -1
- package/dist/Console/Commands/MakeSeederCommand.mjs.map +1 -1
- package/dist/Console/Commands/MakeViewCommand.cjs +1 -1
- package/dist/Console/Commands/MakeViewCommand.mjs +1 -1
- package/dist/Console/Commands/MakeViewCommand.mjs.map +1 -1
- package/dist/Console/Commands/MigrateCommand.cjs +1 -1
- package/dist/Console/Commands/MigrateCommand.mjs +1 -1
- package/dist/Console/Commands/MigrateCommand.mjs.map +1 -1
- package/dist/Console/Commands/MigrateFreshCommand.cjs +1 -1
- package/dist/Console/Commands/MigrateFreshCommand.mjs +1 -1
- package/dist/Console/Commands/MigrateFreshCommand.mjs.map +1 -1
- package/dist/Console/Commands/MigrateRefreshCommand.cjs +1 -1
- package/dist/Console/Commands/MigrateRefreshCommand.mjs +1 -1
- package/dist/Console/Commands/MigrateRefreshCommand.mjs.map +1 -1
- package/dist/Console/Commands/MigrateResetCommand.cjs +1 -1
- package/dist/Console/Commands/MigrateResetCommand.mjs +1 -1
- package/dist/Console/Commands/MigrateResetCommand.mjs.map +1 -1
- package/dist/Console/Commands/MigrateRollbackCommand.cjs +1 -1
- package/dist/Console/Commands/MigrateRollbackCommand.mjs +1 -1
- package/dist/Console/Commands/MigrateRollbackCommand.mjs.map +1 -1
- package/dist/Console/Commands/MigrateStatusCommand.cjs +1 -1
- package/dist/Console/Commands/MigrateStatusCommand.mjs +1 -1
- package/dist/Console/Commands/MigrateStatusCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueBatchesTableCommand.cjs +1 -1
- package/dist/Console/Commands/QueueBatchesTableCommand.mjs +1 -1
- package/dist/Console/Commands/QueueBatchesTableCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueClearCommand.cjs +1 -1
- package/dist/Console/Commands/QueueClearCommand.mjs +1 -1
- package/dist/Console/Commands/QueueClearCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueFailedCommand.cjs +1 -1
- package/dist/Console/Commands/QueueFailedCommand.mjs +1 -1
- package/dist/Console/Commands/QueueFailedCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueFailedTableCommand.cjs +1 -1
- package/dist/Console/Commands/QueueFailedTableCommand.mjs +1 -1
- package/dist/Console/Commands/QueueFailedTableCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueFlushCommand.cjs +1 -1
- package/dist/Console/Commands/QueueFlushCommand.mjs +1 -1
- package/dist/Console/Commands/QueueFlushCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueForgetCommand.cjs +1 -1
- package/dist/Console/Commands/QueueForgetCommand.mjs +1 -1
- package/dist/Console/Commands/QueueForgetCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueMonitorCommand.cjs +1 -1
- package/dist/Console/Commands/QueueMonitorCommand.mjs +1 -1
- package/dist/Console/Commands/QueueMonitorCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueuePruneBatchesCommand.cjs +1 -1
- package/dist/Console/Commands/QueuePruneBatchesCommand.mjs +1 -1
- package/dist/Console/Commands/QueuePruneBatchesCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueuePruneFailedCommand.cjs +1 -1
- package/dist/Console/Commands/QueuePruneFailedCommand.mjs +1 -1
- package/dist/Console/Commands/QueuePruneFailedCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueRestartCommand.cjs +1 -1
- package/dist/Console/Commands/QueueRestartCommand.mjs +1 -1
- package/dist/Console/Commands/QueueRestartCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueRetryCommand.cjs +1 -1
- package/dist/Console/Commands/QueueRetryCommand.mjs +1 -1
- package/dist/Console/Commands/QueueRetryCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueTableCommand.cjs +1 -1
- package/dist/Console/Commands/QueueTableCommand.mjs +1 -1
- package/dist/Console/Commands/QueueTableCommand.mjs.map +1 -1
- package/dist/Console/Commands/QueueWorkCommand.cjs +1 -1
- package/dist/Console/Commands/QueueWorkCommand.mjs +1 -1
- package/dist/Console/Commands/QueueWorkCommand.mjs.map +1 -1
- package/dist/Console/Commands/SeedCommand.cjs +1 -1
- package/dist/Console/Commands/SeedCommand.mjs +1 -1
- package/dist/Console/Commands/SeedCommand.mjs.map +1 -1
- package/dist/Console/ConsoleKernel.cjs +1 -1
- package/dist/Console/ConsoleKernel.mjs +1 -1
- package/dist/Console/ConsoleKernel.mjs.map +1 -1
- package/dist/Console/orchestr.cjs +2 -0
- package/dist/Console/orchestr.d.cts +1 -0
- package/dist/Console/orchestr.d.mts +1 -0
- package/dist/Console/orchestr.mjs +3 -0
- package/dist/Console/orchestr.mjs.map +1 -0
- package/dist/Container/Container.mjs.map +1 -1
- package/dist/Database/Adapters/DrizzleAdapter.cjs +1 -1
- package/dist/Database/Adapters/DrizzleAdapter.mjs +1 -1
- package/dist/Database/Adapters/DrizzleAdapter.mjs.map +1 -1
- package/dist/Database/Connection.cjs +1 -1
- package/dist/Database/Connection.mjs +1 -1
- package/dist/Database/Connection.mjs.map +1 -1
- package/dist/Database/DatabaseManager.cjs +1 -1
- package/dist/Database/DatabaseManager.mjs +1 -1
- package/dist/Database/DatabaseManager.mjs.map +1 -1
- package/dist/Database/Ensemble/Ensemble.mjs.map +1 -1
- package/dist/Database/Ensemble/EnsembleBuilder.mjs.map +1 -1
- package/dist/Database/Ensemble/EnsembleCollection.cjs +1 -1
- package/dist/Database/Ensemble/EnsembleCollection.mjs +1 -1
- package/dist/Database/Ensemble/EnsembleCollection.mjs.map +1 -1
- package/dist/Database/Ensemble/Relations/BelongsTo.mjs.map +1 -1
- package/dist/Database/Ensemble/Relations/BelongsToMany.cjs +1 -1
- package/dist/Database/Ensemble/Relations/BelongsToMany.mjs +1 -1
- package/dist/Database/Ensemble/Relations/BelongsToMany.mjs.map +1 -1
- package/dist/Database/Ensemble/Relations/HasMany.mjs.map +1 -1
- package/dist/Database/Ensemble/Relations/MorphTo.mjs.map +1 -1
- package/dist/Database/Ensemble/Relations/MorphToMany.mjs.map +1 -1
- package/dist/Database/Migrations/Blueprint.cjs +1 -1
- package/dist/Database/Migrations/Blueprint.mjs +1 -1
- package/dist/Database/Migrations/Blueprint.mjs.map +1 -1
- package/dist/Database/Migrations/MigrationCreator.cjs +1 -1
- package/dist/Database/Migrations/MigrationCreator.mjs +1 -1
- package/dist/Database/Migrations/MigrationCreator.mjs.map +1 -1
- package/dist/Database/Migrations/MigrationRepository.cjs +1 -1
- package/dist/Database/Migrations/MigrationRepository.mjs +1 -1
- package/dist/Database/Migrations/MigrationRepository.mjs.map +1 -1
- package/dist/Database/Migrations/Migrator.cjs +1 -1
- package/dist/Database/Migrations/Migrator.mjs +1 -1
- package/dist/Database/Migrations/Migrator.mjs.map +1 -1
- package/dist/Database/Migrations/SchemaBuilder.cjs +1 -1
- package/dist/Database/Migrations/SchemaBuilder.mjs +1 -1
- package/dist/Database/Migrations/SchemaBuilder.mjs.map +1 -1
- package/dist/Database/Query/Builder.cjs +1 -1
- package/dist/Database/Query/Builder.mjs +1 -1
- package/dist/Database/Query/Builder.mjs.map +1 -1
- package/dist/Database/Query/Expression.cjs +1 -1
- package/dist/Database/Query/Expression.mjs +1 -1
- package/dist/Database/Query/Expression.mjs.map +1 -1
- package/dist/Database/Seeders/SeederRunner.cjs +1 -1
- package/dist/Database/Seeders/SeederRunner.mjs +1 -1
- package/dist/Database/Seeders/SeederRunner.mjs.map +1 -1
- package/dist/Deploy/Deployer.cjs +1 -1
- package/dist/Deploy/Deployer.mjs +1 -1
- package/dist/Deploy/Deployer.mjs.map +1 -1
- package/dist/Deploy/ProjectConfig.mjs.map +1 -1
- package/dist/Deploy/Provisioner.cjs +1 -1
- package/dist/Deploy/Provisioner.mjs +1 -1
- package/dist/Deploy/Provisioner.mjs.map +1 -1
- package/dist/Deploy/SSHConnection.mjs.map +1 -1
- package/dist/Deploy/SymphonyClient.cjs +1 -1
- package/dist/Deploy/SymphonyClient.mjs +1 -1
- package/dist/Deploy/SymphonyClient.mjs.map +1 -1
- package/dist/Deploy/TarBuilder.mjs.map +1 -1
- package/dist/Deploy/prompt.mjs.map +1 -1
- package/dist/Events/Dispatcher.cjs +1 -1
- package/dist/Events/Dispatcher.d.cts +1 -1
- package/dist/Events/Dispatcher.d.mts +1 -1
- package/dist/Events/Dispatcher.mjs +1 -1
- package/dist/Events/Dispatcher.mjs.map +1 -1
- package/dist/Events/EventServiceProvider.cjs +1 -1
- package/dist/Events/EventServiceProvider.d.cts +1 -1
- package/dist/Events/EventServiceProvider.d.mts +1 -1
- package/dist/Events/EventServiceProvider.mjs.map +1 -1
- package/dist/Events/index.cjs +1 -0
- package/dist/Events/index.d.cts +7 -0
- package/dist/Events/index.d.mts +7 -0
- package/dist/Events/index.mjs +1 -0
- package/dist/Facades/Bus.mjs.map +1 -1
- package/dist/Facades/Cache.mjs.map +1 -1
- package/dist/Facades/Config.mjs.map +1 -1
- package/dist/Facades/DB.mjs.map +1 -1
- package/dist/Facades/Event.d.cts +1 -1
- package/dist/Facades/Event.d.mts +1 -1
- package/dist/Facades/Event.mjs.map +1 -1
- package/dist/Facades/Queue.mjs.map +1 -1
- package/dist/Facades/Route.d.cts +1 -1
- package/dist/Facades/Route.d.mts +1 -1
- package/dist/Facades/Route.mjs.map +1 -1
- package/dist/Facades/View.mjs.map +1 -1
- package/dist/Facades/index.cjs +1 -0
- package/dist/Facades/index.d.cts +9 -0
- package/dist/Facades/index.d.mts +9 -0
- package/dist/Facades/index.mjs +1 -0
- package/dist/Foundation/Application.mjs.map +1 -1
- package/dist/Foundation/Config/ConfigServiceProvider.d.cts +1 -1
- package/dist/Foundation/Config/ConfigServiceProvider.d.mts +1 -1
- package/dist/Foundation/Http/FormRequest.d.cts +1 -1
- package/dist/Foundation/Http/FormRequest.d.mts +1 -1
- package/dist/Foundation/Http/FormRequest.mjs.map +1 -1
- package/dist/Foundation/Http/Rules/AnyOfRule.mjs.map +1 -1
- package/dist/Foundation/Http/Rules/ImageFileRule.mjs.map +1 -1
- package/dist/Foundation/Http/Validator.mjs.map +1 -1
- package/dist/Queue/Batching/Batch.cjs +1 -1
- package/dist/Queue/Batching/Batch.mjs +1 -1
- package/dist/Queue/Batching/Batch.mjs.map +1 -1
- package/dist/Queue/Batching/PendingBatch.cjs +1 -1
- package/dist/Queue/Batching/PendingBatch.mjs +1 -1
- package/dist/Queue/Batching/PendingBatch.mjs.map +1 -1
- package/dist/Queue/Concerns/Dispatchable.mjs.map +1 -1
- package/dist/Queue/Drivers/DatabaseDriver.cjs +1 -1
- package/dist/Queue/Drivers/DatabaseDriver.mjs +1 -1
- package/dist/Queue/Drivers/DatabaseDriver.mjs.map +1 -1
- package/dist/Queue/Drivers/NullDriver.cjs +1 -1
- package/dist/Queue/Drivers/NullDriver.mjs +1 -1
- package/dist/Queue/Drivers/NullDriver.mjs.map +1 -1
- package/dist/Queue/Drivers/SyncDriver.cjs +1 -1
- package/dist/Queue/Drivers/SyncDriver.mjs +1 -1
- package/dist/Queue/Drivers/SyncDriver.mjs.map +1 -1
- package/dist/Queue/Events/JobExceptionOccurred.cjs +1 -1
- package/dist/Queue/Events/JobExceptionOccurred.mjs +1 -1
- package/dist/Queue/Events/JobExceptionOccurred.mjs.map +1 -1
- package/dist/Queue/Events/JobFailed.cjs +1 -1
- package/dist/Queue/Events/JobFailed.mjs +1 -1
- package/dist/Queue/Events/JobFailed.mjs.map +1 -1
- package/dist/Queue/Events/JobProcessed.cjs +1 -1
- package/dist/Queue/Events/JobProcessed.mjs +1 -1
- package/dist/Queue/Events/JobProcessed.mjs.map +1 -1
- package/dist/Queue/Events/JobProcessing.cjs +1 -1
- package/dist/Queue/Events/JobProcessing.mjs +1 -1
- package/dist/Queue/Events/JobProcessing.mjs.map +1 -1
- package/dist/Queue/Events/JobQueued.cjs +1 -1
- package/dist/Queue/Events/JobQueued.mjs +1 -1
- package/dist/Queue/Events/JobQueued.mjs.map +1 -1
- package/dist/Queue/Events/JobRetryRequested.cjs +1 -1
- package/dist/Queue/Events/JobRetryRequested.mjs +1 -1
- package/dist/Queue/Events/JobRetryRequested.mjs.map +1 -1
- package/dist/Queue/Events/WorkerStopping.cjs +1 -1
- package/dist/Queue/Events/WorkerStopping.mjs +1 -1
- package/dist/Queue/Events/WorkerStopping.mjs.map +1 -1
- package/dist/Queue/Failed/DatabaseFailedJobProvider.cjs +1 -1
- package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs +1 -1
- package/dist/Queue/Failed/DatabaseFailedJobProvider.mjs.map +1 -1
- package/dist/Queue/Middleware/RateLimited.cjs +1 -1
- package/dist/Queue/Middleware/RateLimited.mjs +1 -1
- package/dist/Queue/Middleware/RateLimited.mjs.map +1 -1
- package/dist/Queue/Middleware/ThrottlesExceptions.cjs +1 -1
- package/dist/Queue/Middleware/ThrottlesExceptions.mjs +1 -1
- package/dist/Queue/Middleware/ThrottlesExceptions.mjs.map +1 -1
- package/dist/Queue/Middleware/WithoutOverlapping.cjs +1 -1
- package/dist/Queue/Middleware/WithoutOverlapping.mjs +1 -1
- package/dist/Queue/Middleware/WithoutOverlapping.mjs.map +1 -1
- package/dist/Queue/PendingChain.cjs +1 -1
- package/dist/Queue/PendingChain.mjs +1 -1
- package/dist/Queue/PendingChain.mjs.map +1 -1
- package/dist/Queue/PendingDispatch.cjs +1 -1
- package/dist/Queue/PendingDispatch.mjs +1 -1
- package/dist/Queue/PendingDispatch.mjs.map +1 -1
- package/dist/Queue/QueueManager.cjs +1 -1
- package/dist/Queue/QueueManager.mjs +1 -1
- package/dist/Queue/QueueManager.mjs.map +1 -1
- package/dist/Queue/QueueServiceProvider.mjs.map +1 -1
- package/dist/Queue/Workers/Worker.cjs +1 -1
- package/dist/Queue/Workers/Worker.mjs +1 -1
- package/dist/Queue/Workers/Worker.mjs.map +1 -1
- package/dist/Routing/Request.mjs.map +1 -1
- package/dist/Routing/Response.mjs.map +1 -1
- package/dist/Routing/Route.d.cts +1 -1
- package/dist/Routing/Route.d.mts +1 -1
- package/dist/Routing/Router.d.cts +1 -1
- package/dist/Routing/Router.d.mts +1 -1
- package/dist/Support/EventDiscovery.cjs +1 -1
- package/dist/Support/EventDiscovery.mjs +1 -1
- package/dist/Support/EventDiscovery.mjs.map +1 -1
- package/dist/Support/Testing/Fakes/EventFake.cjs +1 -1
- package/dist/Support/Testing/Fakes/EventFake.d.cts +1 -1
- package/dist/Support/Testing/Fakes/EventFake.d.mts +1 -1
- package/dist/Support/Testing/Fakes/EventFake.mjs +1 -1
- package/dist/Support/Testing/Fakes/EventFake.mjs.map +1 -1
- package/dist/Support/helpers.mjs.map +1 -1
- package/dist/View/Engines/TemplateEngine.mjs.map +1 -1
- package/dist/index.d.cts +19 -19
- package/dist/index.d.mts +19 -19
- package/docs/events-typescript-usage.md +126 -0
- package/docs/future-improvements.md +49 -0
- package/docs/validation.md +201 -0
- package/package.json +65 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployServerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/DeployServerCommand.ts"],"sourcesContent":["/**\n * DeployServerCommand\n *\n * Manage servers for the current project.\n * Signature: deploy:server <action>\n * Actions: add, list, remove\n * Options: --host=<host> --user=<user> --port=<port> --name=<name>\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { CredentialStore } from '@/Deploy/CredentialStore';\nimport { ProjectConfig } from '@/Deploy/ProjectConfig';\nimport { prompt } from '@/Deploy/prompt';\nimport { SymphonyClient } from '@/Deploy/SymphonyClient';\n\nexport class DeployServerCommand extends Command {\n signature = 'deploy:server <action>';\n description = 'Manage servers for the current project (add, list, remove)';\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const action = args[0];\n\n if (!action || !['add', 'list', 'remove'].includes(action)) {\n this.error('Usage: orchestr deploy:server <add|list|remove>');\n process.exit(1);\n }\n\n const credentials = CredentialStore.load();\n if (!credentials) {\n this.error('Not authenticated. Run `orchestr deploy:login` first.');\n process.exit(1);\n }\n\n const config = ProjectConfig.load();\n if (!config) {\n this.error('No symphony.json found. Run `orchestr deploy:init` first.');\n process.exit(1);\n }\n\n const client = new SymphonyClient(credentials.api, credentials.token);\n\n switch (action) {\n case 'add':\n await this.add(client, config.project, options);\n break;\n case 'list':\n await this.list(client, config.project);\n break;\n case 'remove':\n await this.remove(client, config.project, options);\n break;\n }\n }\n\n private async add(client: SymphonyClient, slug: string, options: CommandOptions): Promise<void> {\n const name: string = options.name ?? (await prompt('Server name: '));\n const host: string = options.host ?? (await prompt('Host (IP or hostname): '));\n const sshUserRaw = options.user ?? (await prompt('SSH user [orchestr]: '));\n const sshUser: string = sshUserRaw || 'orchestr';\n const portRaw = options.port ?? (await prompt('SSH port [22]: '));\n const portStr: string = portRaw || '22';\n const port = parseInt(portStr, 10) || 22;\n const deployPathRaw = options['deploy-path'] ?? (await prompt('Deploy path [/home/orchestr]: '));\n const deployPath: string = deployPathRaw || '/home/orchestr';\n\n if (!name.trim() || !host.trim()) {\n this.error('Server name and host are required.');\n process.exit(1);\n }\n\n try {\n const result = await client.addServer(slug, {\n name: name.trim(),\n host: host.trim(),\n port,\n ssh_user: sshUser.trim(),\n deploy_path: deployPath.trim(),\n });\n\n this.newLine();\n this.info(`Server \"${result.server.name}\" added (ID: ${result.server.id})`);\n this.comment(` Host: ${result.server.host}:${result.server.port}`);\n this.comment(` User: ${result.server.ssh_user}`);\n this.comment(` Path: ${result.server.deploy_path}`);\n } catch (error: any) {\n this.error(`Failed to add server: ${error.message}`);\n process.exit(1);\n }\n }\n\n private async list(client: SymphonyClient, slug: string): Promise<void> {\n try {\n const result = await client.listServers(slug);\n\n if (result.servers.length === 0) {\n this.comment('No servers configured. Use `orchestr deploy:server add` to add one.');\n return;\n }\n\n this.info(`Servers for project: ${slug}`);\n this.newLine();\n\n const rows = result.servers.map((s) => [\n s.id.toString(),\n s.name,\n `${s.host}:${s.port}`,\n s.ssh_user,\n s.deploy_path,\n s.status ?? 'unknown',\n s.last_deployed_at ? new Date(s.last_deployed_at).toLocaleString() : 'never',\n ]);\n\n this.table(['ID', 'Name', 'Host', 'User', 'Deploy Path', 'Status', 'Last Deployed'], rows);\n } catch (error: any) {\n this.error(`Failed to list servers: ${error.message}`);\n process.exit(1);\n }\n }\n\n private async remove(client: SymphonyClient, slug: string, options: CommandOptions): Promise<void> {\n const nameOrId: string = options.name ?? options.id ?? (await prompt('Server name or ID: '));\n\n if (!nameOrId.trim()) {\n this.error('Server name or ID is required.');\n process.exit(1);\n }\n\n try {\n // Fetch servers to resolve name → id\n const result = await client.listServers(slug);\n const server = result.servers.find((s) => s.name === nameOrId.trim() || s.id.toString() === nameOrId.trim());\n\n if (!server) {\n this.error(`Server \"${nameOrId}\" not found.`);\n process.exit(1);\n }\n\n await client.deleteServer(slug, server.id);\n this.info(`Server \"${server.name}\" removed.`);\n } catch (error: any) {\n this.error(`Failed to remove server: ${error.message}`);\n process.exit(1);\n }\n }\n}\n"],"mappings":"6RAeA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,yBACZ,YAAc,6DAEd,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAS,EAAK,IAEhB,CAAC,GAAU,CAAC,CAAC,MAAO,OAAQ,SAAS,CAAC,SAAS,EAAO,IACxD,KAAK,MAAM,kDAAkD,CAC7D,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAc,EAAgB,MAAM,CACrC,IACH,KAAK,MAAM,wDAAwD,CACnE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAS,EAAc,MAAM,CAC9B,IACH,KAAK,MAAM,4DAA4D,CACvE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAS,IAAI,EAAe,EAAY,IAAK,EAAY,MAAM,CAErE,OAAQ,EAAR,CACE,IAAK,MACH,MAAM,KAAK,IAAI,EAAQ,EAAO,QAAS,EAAQ,CAC/C,MACF,IAAK,OACH,MAAM,KAAK,KAAK,EAAQ,EAAO,QAAQ,CACvC,MACF,IAAK,SACH,MAAM,KAAK,OAAO,EAAQ,EAAO,QAAS,EAAQ,CAClD,OAIN,MAAc,IAAI,EAAwB,EAAc,EAAwC,CAC9F,IAAM,EAAe,EAAQ,MAAS,MAAM,EAAO,gBAAgB,CAC7D,EAAe,EAAQ,MAAS,MAAM,EAAO,0BAA0B,CAEvE,GADa,EAAQ,MAAS,MAAM,EAAO,wBAAwB,GACnC,WAEhC,GADU,EAAQ,MAAS,MAAM,EAAO,kBAAkB,GAC7B,KAC7B,EAAO,SAAS,EAAS,GAAG,EAAI,GAEhC,GADgB,EAAQ,gBAAmB,MAAM,EAAO,iCAAiC,GACnD,kBAExC,CAAC,EAAK,MAAM,EAAI,CAAC,EAAK,MAAM,IAC9B,KAAK,MAAM,qCAAqC,CAChD,QAAQ,KAAK,EAAE,EAGjB,GAAI,CACF,IAAM,EAAS,MAAM,EAAO,UAAU,EAAM,CAC1C,KAAM,EAAK,MAAM,CACjB,KAAM,EAAK,MAAM,CACjB,OACA,SAAU,EAAQ,MAAM,CACxB,YAAa,EAAW,MAAM,CAC/B,CAAC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,WAAW,EAAO,OAAO,KAAK,eAAe,EAAO,OAAO,GAAG,GAAG,CAC3E,KAAK,QAAQ,WAAW,EAAO,OAAO,KAAK,GAAG,EAAO,OAAO,OAAO,CACnE,KAAK,QAAQ,WAAW,EAAO,OAAO,WAAW,CACjD,KAAK,QAAQ,WAAW,EAAO,OAAO,cAAc,OAC7C,EAAY,CACnB,KAAK,MAAM,yBAAyB,EAAM,UAAU,CACpD,QAAQ,KAAK,EAAE,EAInB,MAAc,KAAK,EAAwB,EAA6B,CACtE,GAAI,CACF,IAAM,EAAS,MAAM,EAAO,YAAY,EAAK,CAE7C,GAAI,EAAO,QAAQ,SAAW,EAAG,CAC/B,KAAK,QAAQ,sEAAsE,CACnF,OAGF,KAAK,KAAK,wBAAwB,IAAO,CACzC,KAAK,SAAS,CAEd,IAAM,EAAO,EAAO,QAAQ,IAAK,GAAM,CACrC,EAAE,GAAG,UAAU,CACf,EAAE,KACF,GAAG,EAAE,KAAK,GAAG,EAAE,OACf,EAAE,SACF,EAAE,YACF,EAAE,QAAU,UACZ,EAAE,iBAAmB,IAAI,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAG,QACtE,CAAC,CAEF,KAAK,MAAM,CAAC,KAAM,OAAQ,OAAQ,OAAQ,cAAe,SAAU,gBAAgB,CAAE,EAAK,OACnF,EAAY,CACnB,KAAK,MAAM,2BAA2B,EAAM,UAAU,CACtD,QAAQ,KAAK,EAAE,EAInB,MAAc,OAAO,EAAwB,EAAc,EAAwC,CACjG,IAAM,EAAmB,EAAQ,MAAQ,EAAQ,IAAO,MAAM,EAAO,sBAAsB,CAEtF,EAAS,MAAM,GAClB,KAAK,MAAM,iCAAiC,CAC5C,QAAQ,KAAK,EAAE,EAGjB,GAAI,CAGF,IAAM,
|
|
1
|
+
{"version":3,"file":"DeployServerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/DeployServerCommand.ts"],"sourcesContent":["/**\n * DeployServerCommand\n *\n * Manage servers for the current project.\n * Signature: deploy:server <action>\n * Actions: add, list, remove\n * Options: --host=<host> --user=<user> --port=<port> --name=<name>\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { CredentialStore } from '@/Deploy/CredentialStore';\nimport { ProjectConfig } from '@/Deploy/ProjectConfig';\nimport { prompt } from '@/Deploy/prompt';\nimport { SymphonyClient } from '@/Deploy/SymphonyClient';\n\nexport class DeployServerCommand extends Command {\n signature = 'deploy:server <action>';\n description = 'Manage servers for the current project (add, list, remove)';\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const action = args[0];\n\n if (!action || !['add', 'list', 'remove'].includes(action)) {\n this.error('Usage: orchestr deploy:server <add|list|remove>');\n process.exit(1);\n }\n\n const credentials = CredentialStore.load();\n if (!credentials) {\n this.error('Not authenticated. Run `orchestr deploy:login` first.');\n process.exit(1);\n }\n\n const config = ProjectConfig.load();\n if (!config) {\n this.error('No symphony.json found. Run `orchestr deploy:init` first.');\n process.exit(1);\n }\n\n const client = new SymphonyClient(credentials.api, credentials.token);\n\n switch (action) {\n case 'add':\n await this.add(client, config.project, options);\n break;\n case 'list':\n await this.list(client, config.project);\n break;\n case 'remove':\n await this.remove(client, config.project, options);\n break;\n }\n }\n\n private async add(client: SymphonyClient, slug: string, options: CommandOptions): Promise<void> {\n const name: string = options.name ?? (await prompt('Server name: '));\n const host: string = options.host ?? (await prompt('Host (IP or hostname): '));\n const sshUserRaw = options.user ?? (await prompt('SSH user [orchestr]: '));\n const sshUser: string = sshUserRaw || 'orchestr';\n const portRaw = options.port ?? (await prompt('SSH port [22]: '));\n const portStr: string = portRaw || '22';\n const port = parseInt(portStr, 10) || 22;\n const deployPathRaw = options['deploy-path'] ?? (await prompt('Deploy path [/home/orchestr]: '));\n const deployPath: string = deployPathRaw || '/home/orchestr';\n\n if (!name.trim() || !host.trim()) {\n this.error('Server name and host are required.');\n process.exit(1);\n }\n\n try {\n const result = await client.addServer(slug, {\n name: name.trim(),\n host: host.trim(),\n port,\n ssh_user: sshUser.trim(),\n deploy_path: deployPath.trim(),\n });\n\n this.newLine();\n this.info(`Server \"${result.server.name}\" added (ID: ${result.server.id})`);\n this.comment(` Host: ${result.server.host}:${result.server.port}`);\n this.comment(` User: ${result.server.ssh_user}`);\n this.comment(` Path: ${result.server.deploy_path}`);\n } catch (error: any) {\n this.error(`Failed to add server: ${error.message}`);\n process.exit(1);\n }\n }\n\n private async list(client: SymphonyClient, slug: string): Promise<void> {\n try {\n const result = await client.listServers(slug);\n\n if (result.servers.length === 0) {\n this.comment('No servers configured. Use `orchestr deploy:server add` to add one.');\n return;\n }\n\n this.info(`Servers for project: ${slug}`);\n this.newLine();\n\n const rows = result.servers.map((s) => [\n s.id.toString(),\n s.name,\n `${s.host}:${s.port}`,\n s.ssh_user,\n s.deploy_path,\n s.status ?? 'unknown',\n s.last_deployed_at ? new Date(s.last_deployed_at).toLocaleString() : 'never',\n ]);\n\n this.table(['ID', 'Name', 'Host', 'User', 'Deploy Path', 'Status', 'Last Deployed'], rows);\n } catch (error: any) {\n this.error(`Failed to list servers: ${error.message}`);\n process.exit(1);\n }\n }\n\n private async remove(client: SymphonyClient, slug: string, options: CommandOptions): Promise<void> {\n const nameOrId: string = options.name ?? options.id ?? (await prompt('Server name or ID: '));\n\n if (!nameOrId.trim()) {\n this.error('Server name or ID is required.');\n process.exit(1);\n }\n\n try {\n // Fetch servers to resolve name → id\n const result = await client.listServers(slug);\n const server = result.servers.find((s) => s.name === nameOrId.trim() || s.id.toString() === nameOrId.trim());\n\n if (!server) {\n this.error(`Server \"${nameOrId}\" not found.`);\n process.exit(1);\n }\n\n await client.deleteServer(slug, server.id);\n this.info(`Server \"${server.name}\" removed.`);\n } catch (error: any) {\n this.error(`Failed to remove server: ${error.message}`);\n process.exit(1);\n }\n }\n}\n"],"mappings":"6RAeA,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,yBACZ,YAAc,6DAEd,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAS,EAAK,IAEhB,CAAC,GAAU,CAAC,CAAC,MAAO,OAAQ,SAAS,CAAC,SAAS,EAAO,IACxD,KAAK,MAAM,kDAAkD,CAC7D,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAc,EAAgB,MAAM,CACrC,IACH,KAAK,MAAM,wDAAwD,CACnE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAS,EAAc,MAAM,CAC9B,IACH,KAAK,MAAM,4DAA4D,CACvE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAS,IAAI,EAAe,EAAY,IAAK,EAAY,MAAM,CAErE,OAAQ,EAAR,CACE,IAAK,MACH,MAAM,KAAK,IAAI,EAAQ,EAAO,QAAS,EAAQ,CAC/C,MACF,IAAK,OACH,MAAM,KAAK,KAAK,EAAQ,EAAO,QAAQ,CACvC,MACF,IAAK,SACH,MAAM,KAAK,OAAO,EAAQ,EAAO,QAAS,EAAQ,CAClD,OAIN,MAAc,IAAI,EAAwB,EAAc,EAAwC,CAC9F,IAAM,EAAe,EAAQ,MAAS,MAAM,EAAO,gBAAgB,CAC7D,EAAe,EAAQ,MAAS,MAAM,EAAO,0BAA0B,CAEvE,GADa,EAAQ,MAAS,MAAM,EAAO,wBAAwB,GACnC,WAEhC,GADU,EAAQ,MAAS,MAAM,EAAO,kBAAkB,GAC7B,KAC7B,EAAO,SAAS,EAAS,GAAG,EAAI,GAEhC,GADgB,EAAQ,gBAAmB,MAAM,EAAO,iCAAiC,GACnD,kBAExC,CAAC,EAAK,MAAM,EAAI,CAAC,EAAK,MAAM,IAC9B,KAAK,MAAM,qCAAqC,CAChD,QAAQ,KAAK,EAAE,EAGjB,GAAI,CACF,IAAM,EAAS,MAAM,EAAO,UAAU,EAAM,CAC1C,KAAM,EAAK,MAAM,CACjB,KAAM,EAAK,MAAM,CACjB,OACA,SAAU,EAAQ,MAAM,CACxB,YAAa,EAAW,MAAM,CAC/B,CAAC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,WAAW,EAAO,OAAO,KAAK,eAAe,EAAO,OAAO,GAAG,GAAG,CAC3E,KAAK,QAAQ,WAAW,EAAO,OAAO,KAAK,GAAG,EAAO,OAAO,OAAO,CACnE,KAAK,QAAQ,WAAW,EAAO,OAAO,WAAW,CACjD,KAAK,QAAQ,WAAW,EAAO,OAAO,cAAc,OAC7C,EAAY,CACnB,KAAK,MAAM,yBAAyB,EAAM,UAAU,CACpD,QAAQ,KAAK,EAAE,EAInB,MAAc,KAAK,EAAwB,EAA6B,CACtE,GAAI,CACF,IAAM,EAAS,MAAM,EAAO,YAAY,EAAK,CAE7C,GAAI,EAAO,QAAQ,SAAW,EAAG,CAC/B,KAAK,QAAQ,sEAAsE,CACnF,OAGF,KAAK,KAAK,wBAAwB,IAAO,CACzC,KAAK,SAAS,CAEd,IAAM,EAAO,EAAO,QAAQ,IAAK,GAAM,CACrC,EAAE,GAAG,UAAU,CACf,EAAE,KACF,GAAG,EAAE,KAAK,GAAG,EAAE,OACf,EAAE,SACF,EAAE,YACF,EAAE,QAAU,UACZ,EAAE,iBAAmB,IAAI,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAG,QACtE,CAAC,CAEF,KAAK,MAAM,CAAC,KAAM,OAAQ,OAAQ,OAAQ,cAAe,SAAU,gBAAgB,CAAE,EAAK,OACnF,EAAY,CACnB,KAAK,MAAM,2BAA2B,EAAM,UAAU,CACtD,QAAQ,KAAK,EAAE,EAInB,MAAc,OAAO,EAAwB,EAAc,EAAwC,CACjG,IAAM,EAAmB,EAAQ,MAAQ,EAAQ,IAAO,MAAM,EAAO,sBAAsB,CAEtF,EAAS,MAAM,GAClB,KAAK,MAAM,iCAAiC,CAC5C,QAAQ,KAAK,EAAE,EAGjB,GAAI,CAGF,IAAM,GAAS,MADM,EAAO,YAAY,EAAK,EACvB,QAAQ,KAAM,GAAM,EAAE,OAAS,EAAS,MAAM,EAAI,EAAE,GAAG,UAAU,GAAK,EAAS,MAAM,CAAC,CAEvG,IACH,KAAK,MAAM,WAAW,EAAS,cAAc,CAC7C,QAAQ,KAAK,EAAE,EAGjB,MAAM,EAAO,aAAa,EAAM,EAAO,GAAG,CAC1C,KAAK,KAAK,WAAW,EAAO,KAAK,YAAY,OACtC,EAAY,CACnB,KAAK,MAAM,4BAA4B,EAAM,UAAU,CACvD,QAAQ,KAAK,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployStatusCommand.mjs","names":[],"sources":["../../../src/Console/Commands/DeployStatusCommand.ts"],"sourcesContent":["/**\n * DeployStatusCommand\n *\n * List recent deployments for the current project.\n * Signature: deploy:status\n * Options: --limit=<n>\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { CredentialStore } from '@/Deploy/CredentialStore';\nimport { ProjectConfig } from '@/Deploy/ProjectConfig';\nimport { SymphonyClient } from '@/Deploy/SymphonyClient';\n\nconst STATUS_COLORS: Record<string, string> = {\n active: '\\x1b[32m', // green\n failed: '\\x1b[31m', // red\n rolled_back: '\\x1b[33m', // yellow\n pending: '\\x1b[90m', // grey\n building: '\\x1b[36m', // cyan\n uploading: '\\x1b[36m',\n deploying: '\\x1b[36m',\n};\nconst RESET = '\\x1b[0m';\n\nexport class DeployStatusCommand extends Command {\n signature = 'deploy:status';\n description = 'Show recent deployments for the current project';\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const credentials = CredentialStore.load();\n if (!credentials) {\n this.error('Not authenticated. Run `orchestr deploy:login` first.');\n process.exit(1);\n }\n\n const config = ProjectConfig.load();\n if (!config) {\n this.error('No symphony.json found. Run `orchestr deploy:init` first.');\n process.exit(1);\n }\n\n const limit = parseInt(options.limit ?? '10', 10);\n const client = new SymphonyClient(credentials.api, credentials.token);\n\n try {\n const result = await client.listDeployments(config.project, 1, limit);\n const { deployments, pagination } = result;\n\n if (deployments.length === 0) {\n this.comment('No deployments yet.');\n return;\n }\n\n this.info(`Deployments for project: ${config.project}`);\n this.newLine();\n\n // Header\n this.line(` ${'UUID'.padEnd(10)} ${'Status'.padEnd(14)} ${'Date'.padEnd(22)} ${'Commit'.padEnd(10)} Message`);\n this.line(` ${'-'.repeat(80)}`);\n\n for (const d of deployments) {\n const status = d.status ?? 'unknown';\n const color = STATUS_COLORS[status] ?? '';\n const coloredStatus = `${color}${status.padEnd(12)}${RESET}`;\n const date = new Date(d.created_at).toLocaleString().padEnd(22);\n const hash = (d.commit_hash ?? '-').padEnd(10);\n const msg = d.commit_message ? d.commit_message.slice(0, 35) + (d.commit_message.length > 35 ? '…' : '') : '-';\n this.line(` ${d.uuid.slice(0, 8).padEnd(10)} ${coloredStatus} ${date} ${hash} ${msg}`);\n }\n\n this.newLine();\n this.comment(`Showing ${deployments.length} of ${pagination.total} deployments.`);\n } catch (error: any) {\n this.error(`Failed to fetch deployments: ${error.message}`);\n process.exit(1);\n }\n }\n}\n"],"mappings":"4OAaA,MAAM,EAAwC,CAC5C,OAAQ,WACR,OAAQ,WACR,YAAa,WACb,QAAS,WACT,SAAU,WACV,UAAW,WACX,UAAW,WACZ,CAGD,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,gBACZ,YAAc,kDAEd,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAc,EAAgB,MAAM,CACrC,IACH,KAAK,MAAM,wDAAwD,CACnE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAS,EAAc,MAAM,CAC9B,IACH,KAAK,MAAM,4DAA4D,CACvE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAQ,SAAS,EAAQ,OAAS,KAAM,GAAG,CAC3C,EAAS,IAAI,EAAe,EAAY,IAAK,EAAY,MAAM,CAErE,GAAI,CAEF,GAAM,CAAE,cAAa,
|
|
1
|
+
{"version":3,"file":"DeployStatusCommand.mjs","names":[],"sources":["../../../src/Console/Commands/DeployStatusCommand.ts"],"sourcesContent":["/**\n * DeployStatusCommand\n *\n * List recent deployments for the current project.\n * Signature: deploy:status\n * Options: --limit=<n>\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { CredentialStore } from '@/Deploy/CredentialStore';\nimport { ProjectConfig } from '@/Deploy/ProjectConfig';\nimport { SymphonyClient } from '@/Deploy/SymphonyClient';\n\nconst STATUS_COLORS: Record<string, string> = {\n active: '\\x1b[32m', // green\n failed: '\\x1b[31m', // red\n rolled_back: '\\x1b[33m', // yellow\n pending: '\\x1b[90m', // grey\n building: '\\x1b[36m', // cyan\n uploading: '\\x1b[36m',\n deploying: '\\x1b[36m',\n};\nconst RESET = '\\x1b[0m';\n\nexport class DeployStatusCommand extends Command {\n signature = 'deploy:status';\n description = 'Show recent deployments for the current project';\n\n async handle(_args: string[], options: CommandOptions): Promise<void> {\n const credentials = CredentialStore.load();\n if (!credentials) {\n this.error('Not authenticated. Run `orchestr deploy:login` first.');\n process.exit(1);\n }\n\n const config = ProjectConfig.load();\n if (!config) {\n this.error('No symphony.json found. Run `orchestr deploy:init` first.');\n process.exit(1);\n }\n\n const limit = parseInt(options.limit ?? '10', 10);\n const client = new SymphonyClient(credentials.api, credentials.token);\n\n try {\n const result = await client.listDeployments(config.project, 1, limit);\n const { deployments, pagination } = result;\n\n if (deployments.length === 0) {\n this.comment('No deployments yet.');\n return;\n }\n\n this.info(`Deployments for project: ${config.project}`);\n this.newLine();\n\n // Header\n this.line(` ${'UUID'.padEnd(10)} ${'Status'.padEnd(14)} ${'Date'.padEnd(22)} ${'Commit'.padEnd(10)} Message`);\n this.line(` ${'-'.repeat(80)}`);\n\n for (const d of deployments) {\n const status = d.status ?? 'unknown';\n const color = STATUS_COLORS[status] ?? '';\n const coloredStatus = `${color}${status.padEnd(12)}${RESET}`;\n const date = new Date(d.created_at).toLocaleString().padEnd(22);\n const hash = (d.commit_hash ?? '-').padEnd(10);\n const msg = d.commit_message ? d.commit_message.slice(0, 35) + (d.commit_message.length > 35 ? '…' : '') : '-';\n this.line(` ${d.uuid.slice(0, 8).padEnd(10)} ${coloredStatus} ${date} ${hash} ${msg}`);\n }\n\n this.newLine();\n this.comment(`Showing ${deployments.length} of ${pagination.total} deployments.`);\n } catch (error: any) {\n this.error(`Failed to fetch deployments: ${error.message}`);\n process.exit(1);\n }\n }\n}\n"],"mappings":"4OAaA,MAAM,EAAwC,CAC5C,OAAQ,WACR,OAAQ,WACR,YAAa,WACb,QAAS,WACT,SAAU,WACV,UAAW,WACX,UAAW,WACZ,CAGD,IAAa,EAAb,cAAyC,CAAQ,CAC/C,UAAY,gBACZ,YAAc,kDAEd,MAAM,OAAO,EAAiB,EAAwC,CACpE,IAAM,EAAc,EAAgB,MAAM,CACrC,IACH,KAAK,MAAM,wDAAwD,CACnE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAS,EAAc,MAAM,CAC9B,IACH,KAAK,MAAM,4DAA4D,CACvE,QAAQ,KAAK,EAAE,EAGjB,IAAM,EAAQ,SAAS,EAAQ,OAAS,KAAM,GAAG,CAC3C,EAAS,IAAI,EAAe,EAAY,IAAK,EAAY,MAAM,CAErE,GAAI,CAEF,GAAM,CAAE,cAAa,cAAe,MADf,EAAO,gBAAgB,EAAO,QAAS,EAAG,EAAM,CAGrE,GAAI,EAAY,SAAW,EAAG,CAC5B,KAAK,QAAQ,sBAAsB,CACnC,OAGF,KAAK,KAAK,4BAA4B,EAAO,UAAU,CACvD,KAAK,SAAS,CAGd,KAAK,KAAK,KAAK,OAAO,OAAO,GAAG,CAAC,GAAG,SAAS,OAAO,GAAG,CAAC,GAAG,OAAO,OAAO,GAAG,CAAC,GAAG,SAAS,OAAO,GAAG,CAAC,UAAU,CAC9G,KAAK,KAAK,KAAK,IAAI,OAAO,GAAG,GAAG,CAEhC,IAAK,IAAM,KAAK,EAAa,CAC3B,IAAM,EAAS,EAAE,QAAU,UAErB,EAAgB,GADR,EAAc,IAAW,KACN,EAAO,OAAO,GAAG,OAC5C,EAAO,IAAI,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,OAAO,GAAG,CACzD,GAAQ,EAAE,aAAe,KAAK,OAAO,GAAG,CACxC,EAAM,EAAE,eAAiB,EAAE,eAAe,MAAM,EAAG,GAAG,EAAI,EAAE,eAAe,OAAS,GAAK,IAAM,IAAM,IAC3G,KAAK,KAAK,KAAK,EAAE,KAAK,MAAM,EAAG,EAAE,CAAC,OAAO,GAAG,CAAC,GAAG,EAAc,GAAG,EAAK,GAAG,EAAK,GAAG,IAAM,CAGzF,KAAK,SAAS,CACd,KAAK,QAAQ,WAAW,EAAY,OAAO,MAAM,EAAW,MAAM,eAAe,OAC1E,EAAY,CACnB,KAAK,MAAM,gCAAgC,EAAM,UAAU,CAC3D,QAAQ,KAAK,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`event:cache`;description=`Discover and cache the application's events and listeners`;constructor(e){super(),this.app=e}async handle(){this.info(`Discovering events and listeners...`);try{let{EventDiscovery:e}=await Promise.resolve().then(()=>require(`../../Support/EventDiscovery.cjs`)),t=new e(this.app),i=this.app.getEventDiscoveryPaths();this.comment(`Scanning directories:`),i.forEach(e=>this.comment(` - ${e}`)),this.newLine();let a=await t.discover(i);if(a.size===0){this.warn(`No events discovered.`);return}let o=Array.from(a.entries()),s=this.app.storagePath(`framework/events.json`);await n.mkdir(r.dirname(s),{recursive:!0}),await n.writeFile(s,JSON.stringify(o,null,2)),this.info(`Events cached successfully!`),this.newLine(),this.comment(`Cached ${a.size} events to: ${s}`);let c=0;for(let[,e]of a)c+=e.length;this.comment(`Total listeners: ${c}`)}catch(e){if(e.code===`MODULE_NOT_FOUND`&&e.message?.includes(`EventDiscovery`))this.error(`EventDiscovery module not found.`),this.comment(`The EventDiscovery system (Task 6) must be implemented first.`),this.comment(`This command will work once EventDiscovery is available.`);else throw this.error(`Failed to cache events: ${e.message}`),e}}};exports.EventCacheCommand=i;
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`event:cache`;description=`Discover and cache the application's events and listeners`;constructor(e){super(),this.app=e}async handle(){this.info(`Discovering events and listeners...`);try{let{EventDiscovery:e}=await Promise.resolve().then(()=>require(`../../Support/EventDiscovery.cjs`)),t=new e(this.app),i=this.app.getEventDiscoveryPaths();this.comment(`Scanning directories:`),i.forEach(e=>this.comment(` - ${e}`)),this.newLine();let a=await t.discover(i);if(a.size===0){this.warn(`No events discovered.`);return}let o=Array.from(a.entries()),s=this.app.storagePath(`framework/events.json`);await n.mkdir(r.dirname(s),{recursive:!0}),await n.writeFile(s,JSON.stringify(o,null,2)),this.info(`Events cached successfully!`),this.newLine(),this.comment(`Cached ${a.size} events to: ${s}`);let c=0;for(let[,e]of a)c+=e.length;this.comment(`Total listeners: ${c}`)}catch(e){if(e.code===`MODULE_NOT_FOUND`&&e.message?.includes(`EventDiscovery`))this.error(`EventDiscovery module not found.`),this.comment(`The EventDiscovery system (Task 6) must be implemented first.`),this.comment(`This command will work once EventDiscovery is available.`);else throw this.error(`Failed to cache events: ${e.message}`),e}}};exports.EventCacheCommand=i;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`event:cache`;description=`Discover and cache the application's events and listeners`;constructor(e){super(),this.app=e}async handle(){this.info(`Discovering events and listeners...`);try{let{EventDiscovery:e}=await import(`../../Support/EventDiscovery.mjs`),r=new e(this.app),i=this.app.getEventDiscoveryPaths();this.comment(`Scanning directories:`),i.forEach(e=>this.comment(` - ${e}`)),this.newLine();let a=await r.discover(i);if(a.size===0){this.warn(`No events discovered.`);return}let o=Array.from(a.entries()),s=this.app.storagePath(`framework/events.json`);await t.mkdir(n.dirname(s),{recursive:!0}),await t.writeFile(s,JSON.stringify(o,null,2)),this.info(`Events cached successfully!`),this.newLine(),this.comment(`Cached ${a.size} events to: ${s}`);let c=0;for(let[,e]of a)c+=e.length;this.comment(`Total listeners: ${c}`)}catch(e){if(e.code===`MODULE_NOT_FOUND`&&e.message?.includes(`EventDiscovery`))this.error(`EventDiscovery module not found.`),this.comment(`The EventDiscovery system (Task 6) must be implemented first.`),this.comment(`This command will work once EventDiscovery is available.`);else throw this.error(`Failed to cache events: ${e.message}`),e}}};export{r as EventCacheCommand};
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`event:cache`;description=`Discover and cache the application's events and listeners`;constructor(e){super(),this.app=e}async handle(){this.info(`Discovering events and listeners...`);try{let{EventDiscovery:e}=await import(`../../Support/EventDiscovery.mjs`),r=new e(this.app),i=this.app.getEventDiscoveryPaths();this.comment(`Scanning directories:`),i.forEach(e=>this.comment(` - ${e}`)),this.newLine();let a=await r.discover(i);if(a.size===0){this.warn(`No events discovered.`);return}let o=Array.from(a.entries()),s=this.app.storagePath(`framework/events.json`);await t.mkdir(n.dirname(s),{recursive:!0}),await t.writeFile(s,JSON.stringify(o,null,2)),this.info(`Events cached successfully!`),this.newLine(),this.comment(`Cached ${a.size} events to: ${s}`);let c=0;for(let[,e]of a)c+=e.length;this.comment(`Total listeners: ${c}`)}catch(e){if(e.code===`MODULE_NOT_FOUND`&&e.message?.includes(`EventDiscovery`))this.error(`EventDiscovery module not found.`),this.comment(`The EventDiscovery system (Task 6) must be implemented first.`),this.comment(`This command will work once EventDiscovery is available.`);else throw this.error(`Failed to cache events: ${e.message}`),e}}};export{r as EventCacheCommand};
|
|
2
2
|
//# sourceMappingURL=EventCacheCommand.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventCacheCommand.mjs","names":[],"sources":["../../../src/Console/Commands/EventCacheCommand.ts"],"sourcesContent":["/**\n * EventCacheCommand\n *\n * Discover and cache the application's events and listeners following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class EventCacheCommand extends Command {\n signature = 'event:cache';\n description = \"Discover and cache the application's events and listeners\";\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(): Promise<void> {\n this.info('Discovering events and listeners...');\n\n try {\n // Try to dynamically import EventDiscovery (Task 6 dependency)\n const { EventDiscovery } = await import('@/Support/EventDiscovery');\n\n const discovery = new EventDiscovery(this.app);\n const directories = this.app.getEventDiscoveryPaths();\n\n this.comment(`Scanning directories:`);\n directories.forEach((dir) => this.comment(` - ${dir}`));\n this.newLine();\n\n const listeners = await discovery.discover(directories);\n\n if (listeners.size === 0) {\n this.warn('No events discovered.');\n return;\n }\n\n // Convert Map to array for JSON serialization\n const listenersArray = Array.from(listeners.entries());\n\n // Create cache directory\n const cachePath = this.app.storagePath('framework/events.json');\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n\n // Write cache file\n await fs.writeFile(cachePath, JSON.stringify(listenersArray, null, 2));\n\n this.info(`Events cached successfully!`);\n this.newLine();\n this.comment(`Cached ${listeners.size} events to: ${cachePath}`);\n\n // Show summary\n let totalListeners = 0;\n for (const [, listenerList] of listeners) {\n totalListeners += listenerList.length;\n }\n\n this.comment(`Total listeners: ${totalListeners}`);\n } catch (error: any) {\n if (error.code === 'MODULE_NOT_FOUND' && error.message?.includes('EventDiscovery')) {\n this.error('EventDiscovery module not found.');\n this.comment('The EventDiscovery system (Task 6) must be implemented first.');\n this.comment('This command will work once EventDiscovery is available.');\n } else {\n this.error(`Failed to cache events: ${error.message}`);\n throw error;\n }\n }\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAuC,CAAQ,
|
|
1
|
+
{"version":3,"file":"EventCacheCommand.mjs","names":[],"sources":["../../../src/Console/Commands/EventCacheCommand.ts"],"sourcesContent":["/**\n * EventCacheCommand\n *\n * Discover and cache the application's events and listeners following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class EventCacheCommand extends Command {\n signature = 'event:cache';\n description = \"Discover and cache the application's events and listeners\";\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(): Promise<void> {\n this.info('Discovering events and listeners...');\n\n try {\n // Try to dynamically import EventDiscovery (Task 6 dependency)\n const { EventDiscovery } = await import('@/Support/EventDiscovery');\n\n const discovery = new EventDiscovery(this.app);\n const directories = this.app.getEventDiscoveryPaths();\n\n this.comment(`Scanning directories:`);\n directories.forEach((dir) => this.comment(` - ${dir}`));\n this.newLine();\n\n const listeners = await discovery.discover(directories);\n\n if (listeners.size === 0) {\n this.warn('No events discovered.');\n return;\n }\n\n // Convert Map to array for JSON serialization\n const listenersArray = Array.from(listeners.entries());\n\n // Create cache directory\n const cachePath = this.app.storagePath('framework/events.json');\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n\n // Write cache file\n await fs.writeFile(cachePath, JSON.stringify(listenersArray, null, 2));\n\n this.info(`Events cached successfully!`);\n this.newLine();\n this.comment(`Cached ${listeners.size} events to: ${cachePath}`);\n\n // Show summary\n let totalListeners = 0;\n for (const [, listenerList] of listeners) {\n totalListeners += listenerList.length;\n }\n\n this.comment(`Total listeners: ${totalListeners}`);\n } catch (error: any) {\n if (error.code === 'MODULE_NOT_FOUND' && error.message?.includes('EventDiscovery')) {\n this.error('EventDiscovery module not found.');\n this.comment('The EventDiscovery system (Task 6) must be implemented first.');\n this.comment('This command will work once EventDiscovery is available.');\n } else {\n this.error(`Failed to cache events: ${error.message}`);\n throw error;\n }\n }\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,cACZ,YAAc,4DAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,QAAwB,CAC5B,KAAK,KAAK,sCAAsC,CAEhD,GAAI,CAEF,GAAM,CAAE,kBAAmB,MAAM,OAAO,oCAElC,EAAY,IAAI,EAAe,KAAK,IAAI,CACxC,EAAc,KAAK,IAAI,wBAAwB,CAErD,KAAK,QAAQ,wBAAwB,CACrC,EAAY,QAAS,GAAQ,KAAK,QAAQ,OAAO,IAAM,CAAC,CACxD,KAAK,SAAS,CAEd,IAAM,EAAY,MAAM,EAAU,SAAS,EAAY,CAEvD,GAAI,EAAU,OAAS,EAAG,CACxB,KAAK,KAAK,wBAAwB,CAClC,OAIF,IAAM,EAAiB,MAAM,KAAK,EAAU,SAAS,CAAC,CAGhD,EAAY,KAAK,IAAI,YAAY,wBAAwB,CAC/D,MAAM,EAAG,MAAM,EAAK,QAAQ,EAAU,CAAE,CAAE,UAAW,GAAM,CAAC,CAG5D,MAAM,EAAG,UAAU,EAAW,KAAK,UAAU,EAAgB,KAAM,EAAE,CAAC,CAEtE,KAAK,KAAK,8BAA8B,CACxC,KAAK,SAAS,CACd,KAAK,QAAQ,UAAU,EAAU,KAAK,cAAc,IAAY,CAGhE,IAAI,EAAiB,EACrB,IAAK,GAAM,EAAG,KAAiB,EAC7B,GAAkB,EAAa,OAGjC,KAAK,QAAQ,oBAAoB,IAAiB,OAC3C,EAAY,CACnB,GAAI,EAAM,OAAS,oBAAsB,EAAM,SAAS,SAAS,iBAAiB,CAChF,KAAK,MAAM,mCAAmC,CAC9C,KAAK,QAAQ,gEAAgE,CAC7E,KAAK,QAAQ,2DAA2D,MAGxE,MADA,KAAK,MAAM,2BAA2B,EAAM,UAAU,CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);var r=class extends t.Command{signature=`event:clear`;description=`Clear all cached events and listeners`;constructor(e){super(),this.app=e}async handle(){let e=this.app.storagePath(`framework/events.json`);try{await n.access(e),await n.unlink(e),this.info(`Cached events cleared successfully.`)}catch(e){if(e.code===`ENOENT`)this.comment(`No cached events found.`);else throw this.error(`Failed to clear cached events: ${e.message}`),e}}};exports.EventClearCommand=r;
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);var r=class extends t.Command{app;signature=`event:clear`;description=`Clear all cached events and listeners`;constructor(e){super(),this.app=e}async handle(){let e=this.app.storagePath(`framework/events.json`);try{await n.access(e),await n.unlink(e),this.info(`Cached events cleared successfully.`)}catch(e){if(e.code===`ENOENT`)this.comment(`No cached events found.`);else throw this.error(`Failed to clear cached events: ${e.message}`),e}}};exports.EventClearCommand=r;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";var n=class extends e{signature=`event:clear`;description=`Clear all cached events and listeners`;constructor(e){super(),this.app=e}async handle(){let e=this.app.storagePath(`framework/events.json`);try{await t.access(e),await t.unlink(e),this.info(`Cached events cleared successfully.`)}catch(e){if(e.code===`ENOENT`)this.comment(`No cached events found.`);else throw this.error(`Failed to clear cached events: ${e.message}`),e}}};export{n as EventClearCommand};
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";var n=class extends e{app;signature=`event:clear`;description=`Clear all cached events and listeners`;constructor(e){super(),this.app=e}async handle(){let e=this.app.storagePath(`framework/events.json`);try{await t.access(e),await t.unlink(e),this.info(`Cached events cleared successfully.`)}catch(e){if(e.code===`ENOENT`)this.comment(`No cached events found.`);else throw this.error(`Failed to clear cached events: ${e.message}`),e}}};export{n as EventClearCommand};
|
|
2
2
|
//# sourceMappingURL=EventClearCommand.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventClearCommand.mjs","names":[],"sources":["../../../src/Console/Commands/EventClearCommand.ts"],"sourcesContent":["/**\n * EventClearCommand\n *\n * Clear all cached events and listeners following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport { Command } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class EventClearCommand extends Command {\n signature = 'event:clear';\n description = 'Clear all cached events and listeners';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(): Promise<void> {\n const cachePath = this.app.storagePath('framework/events.json');\n\n try {\n await fs.access(cachePath);\n await fs.unlink(cachePath);\n this.info('Cached events cleared successfully.');\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n this.comment('No cached events found.');\n } else {\n this.error(`Failed to clear cached events: ${error.message}`);\n throw error;\n }\n }\n }\n}\n"],"mappings":"uEAUA,IAAa,EAAb,cAAuC,CAAQ,
|
|
1
|
+
{"version":3,"file":"EventClearCommand.mjs","names":[],"sources":["../../../src/Console/Commands/EventClearCommand.ts"],"sourcesContent":["/**\n * EventClearCommand\n *\n * Clear all cached events and listeners following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport { Command } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class EventClearCommand extends Command {\n signature = 'event:clear';\n description = 'Clear all cached events and listeners';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(): Promise<void> {\n const cachePath = this.app.storagePath('framework/events.json');\n\n try {\n await fs.access(cachePath);\n await fs.unlink(cachePath);\n this.info('Cached events cleared successfully.');\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n this.comment('No cached events found.');\n } else {\n this.error(`Failed to clear cached events: ${error.message}`);\n throw error;\n }\n }\n }\n}\n"],"mappings":"uEAUA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,cACZ,YAAc,wCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,QAAwB,CAC5B,IAAM,EAAY,KAAK,IAAI,YAAY,wBAAwB,CAE/D,GAAI,CACF,MAAM,EAAG,OAAO,EAAU,CAC1B,MAAM,EAAG,OAAO,EAAU,CAC1B,KAAK,KAAK,sCAAsC,OACzC,EAAY,CACnB,GAAI,EAAM,OAAS,SACjB,KAAK,QAAQ,0BAA0B,MAGvC,MADA,KAAK,MAAM,kCAAkC,EAAM,UAAU,CACvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{signature=`event:list [--event=]`;description=`List the application's events and listeners`;constructor(e){super(),this.app=e}async handle(e,t){try{let e=this.app.make(`events`).getRawListeners();if(e.size===0){this.comment(`No events have been registered.`);return}let n=t.event,r=[];for(let[t,i]of e)n&&!t.includes(n)||(i.length===0?r.push([t,`No listeners`]):i.forEach((e,n)=>{r.push([n===0?t:``,this.formatListener(e)])}),r.length>0&&r[r.length-1][0]!==``&&r.push([``,``]));if(r.length>0&&r[r.length-1][0]===``&&r.pop(),r.length===0){this.comment(`No events found matching: ${n}`);return}this.newLine(),this.info(`Registered Events and Listeners:`),this.newLine();let i=Math.max(...r.map(e=>e[0].length),5),a=Math.max(...r.map(e=>e[1].length),9);this.line(`${`Event`.padEnd(i+2)} ${`Listeners`.padEnd(a)}`),this.line(`-`.repeat(i+a+3));for(let[e,t]of r)e===``&&t===``?this.line(``):this.line(`${e.padEnd(i+2)} ${t}`);this.newLine(),this.comment(`Total events: ${e.size}`)}catch(e){if(e.message?.includes(`events`))this.error(`Event dispatcher not registered.`),this.comment(`Make sure the EventServiceProvider is registered in your application.`);else throw e}}formatListener(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<Closure>`:typeof e==`object`&&e.constructor?e.constructor.name:`<Unknown>`}};exports.EventListCommand=t;
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../Command.cjs`);var t=class extends e.Command{app;signature=`event:list [--event=]`;description=`List the application's events and listeners`;constructor(e){super(),this.app=e}async handle(e,t){try{let e=this.app.make(`events`).getRawListeners();if(e.size===0){this.comment(`No events have been registered.`);return}let n=t.event,r=[];for(let[t,i]of e)n&&!t.includes(n)||(i.length===0?r.push([t,`No listeners`]):i.forEach((e,n)=>{r.push([n===0?t:``,this.formatListener(e)])}),r.length>0&&r[r.length-1][0]!==``&&r.push([``,``]));if(r.length>0&&r[r.length-1][0]===``&&r.pop(),r.length===0){this.comment(`No events found matching: ${n}`);return}this.newLine(),this.info(`Registered Events and Listeners:`),this.newLine();let i=Math.max(...r.map(e=>e[0].length),5),a=Math.max(...r.map(e=>e[1].length),9);this.line(`${`Event`.padEnd(i+2)} ${`Listeners`.padEnd(a)}`),this.line(`-`.repeat(i+a+3));for(let[e,t]of r)e===``&&t===``?this.line(``):this.line(`${e.padEnd(i+2)} ${t}`);this.newLine(),this.comment(`Total events: ${e.size}`)}catch(e){if(e.message?.includes(`events`))this.error(`Event dispatcher not registered.`),this.comment(`Make sure the EventServiceProvider is registered in your application.`);else throw e}}formatListener(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<Closure>`:typeof e==`object`&&e.constructor?e.constructor.name:`<Unknown>`}};exports.EventListCommand=t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";var t=class extends e{signature=`event:list [--event=]`;description=`List the application's events and listeners`;constructor(e){super(),this.app=e}async handle(e,t){try{let e=this.app.make(`events`).getRawListeners();if(e.size===0){this.comment(`No events have been registered.`);return}let n=t.event,r=[];for(let[t,i]of e)n&&!t.includes(n)||(i.length===0?r.push([t,`No listeners`]):i.forEach((e,n)=>{r.push([n===0?t:``,this.formatListener(e)])}),r.length>0&&r[r.length-1][0]!==``&&r.push([``,``]));if(r.length>0&&r[r.length-1][0]===``&&r.pop(),r.length===0){this.comment(`No events found matching: ${n}`);return}this.newLine(),this.info(`Registered Events and Listeners:`),this.newLine();let i=Math.max(...r.map(e=>e[0].length),5),a=Math.max(...r.map(e=>e[1].length),9);this.line(`${`Event`.padEnd(i+2)} ${`Listeners`.padEnd(a)}`),this.line(`-`.repeat(i+a+3));for(let[e,t]of r)e===``&&t===``?this.line(``):this.line(`${e.padEnd(i+2)} ${t}`);this.newLine(),this.comment(`Total events: ${e.size}`)}catch(e){if(e.message?.includes(`events`))this.error(`Event dispatcher not registered.`),this.comment(`Make sure the EventServiceProvider is registered in your application.`);else throw e}}formatListener(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<Closure>`:typeof e==`object`&&e.constructor?e.constructor.name:`<Unknown>`}};export{t as EventListCommand};
|
|
1
|
+
import{Command as e}from"../Command.mjs";var t=class extends e{app;signature=`event:list [--event=]`;description=`List the application's events and listeners`;constructor(e){super(),this.app=e}async handle(e,t){try{let e=this.app.make(`events`).getRawListeners();if(e.size===0){this.comment(`No events have been registered.`);return}let n=t.event,r=[];for(let[t,i]of e)n&&!t.includes(n)||(i.length===0?r.push([t,`No listeners`]):i.forEach((e,n)=>{r.push([n===0?t:``,this.formatListener(e)])}),r.length>0&&r[r.length-1][0]!==``&&r.push([``,``]));if(r.length>0&&r[r.length-1][0]===``&&r.pop(),r.length===0){this.comment(`No events found matching: ${n}`);return}this.newLine(),this.info(`Registered Events and Listeners:`),this.newLine();let i=Math.max(...r.map(e=>e[0].length),5),a=Math.max(...r.map(e=>e[1].length),9);this.line(`${`Event`.padEnd(i+2)} ${`Listeners`.padEnd(a)}`),this.line(`-`.repeat(i+a+3));for(let[e,t]of r)e===``&&t===``?this.line(``):this.line(`${e.padEnd(i+2)} ${t}`);this.newLine(),this.comment(`Total events: ${e.size}`)}catch(e){if(e.message?.includes(`events`))this.error(`Event dispatcher not registered.`),this.comment(`Make sure the EventServiceProvider is registered in your application.`);else throw e}}formatListener(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<Closure>`:typeof e==`object`&&e.constructor?e.constructor.name:`<Unknown>`}};export{t as EventListCommand};
|
|
2
2
|
//# sourceMappingURL=EventListCommand.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventListCommand.mjs","names":[],"sources":["../../../src/Console/Commands/EventListCommand.ts"],"sourcesContent":["/**\n * EventListCommand\n *\n * List all registered events and their listeners following Laravel's Artisan pattern\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class EventListCommand extends Command {\n signature = 'event:list [--event=]';\n description = \"List the application's events and listeners\";\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n try {\n // Try to get the dispatcher - will fail gracefully if not available yet\n const dispatcher = this.app.make<any>('events');\n const listeners = dispatcher.getRawListeners();\n\n if (listeners.size === 0) {\n this.comment('No events have been registered.');\n return;\n }\n\n const filter = options.event as string | undefined;\n\n const rows: string[][] = [];\n\n for (const [event, listenerList] of listeners) {\n // Filter if event option provided\n if (filter && !event.includes(filter)) {\n continue;\n }\n\n if (listenerList.length === 0) {\n rows.push([event, 'No listeners']);\n } else {\n listenerList.forEach((listener: any, index: number) => {\n rows.push([index === 0 ? event : '', this.formatListener(listener)]);\n });\n }\n\n // Add separator between events\n if (rows.length > 0 && rows[rows.length - 1][0] !== '') {\n rows.push(['', '']);\n }\n }\n\n // Remove trailing separator\n if (rows.length > 0 && rows[rows.length - 1][0] === '') {\n rows.pop();\n }\n\n if (rows.length === 0) {\n this.comment(`No events found matching: ${filter}`);\n return;\n }\n\n this.newLine();\n this.info('Registered Events and Listeners:');\n this.newLine();\n\n // Display results in a formatted table\n const maxEventLength = Math.max(...rows.map((row) => row[0].length), 'Event'.length);\n const maxListenerLength = Math.max(...rows.map((row) => row[1].length), 'Listeners'.length);\n\n // Header\n this.line(`${'Event'.padEnd(maxEventLength + 2)} ${'Listeners'.padEnd(maxListenerLength)}`);\n this.line('-'.repeat(maxEventLength + maxListenerLength + 3));\n\n // Rows\n for (const [event, listener] of rows) {\n if (event === '' && listener === '') {\n this.line('');\n } else {\n this.line(`${event.padEnd(maxEventLength + 2)} ${listener}`);\n }\n }\n\n this.newLine();\n this.comment(`Total events: ${listeners.size}`);\n } catch (error: any) {\n if (error.message?.includes('events')) {\n this.error('Event dispatcher not registered.');\n this.comment('Make sure the EventServiceProvider is registered in your application.');\n } else {\n throw error;\n }\n }\n }\n\n /**\n * Format a listener for display\n */\n protected formatListener(listener: any): string {\n if (typeof listener === 'string') {\n return listener;\n }\n\n if (typeof listener === 'function') {\n return listener.name || '<Closure>';\n }\n\n if (typeof listener === 'object' && listener.constructor) {\n return listener.constructor.name;\n }\n\n return '<Unknown>';\n }\n}\n"],"mappings":"yCASA,IAAa,EAAb,cAAsC,CAAQ,
|
|
1
|
+
{"version":3,"file":"EventListCommand.mjs","names":[],"sources":["../../../src/Console/Commands/EventListCommand.ts"],"sourcesContent":["/**\n * EventListCommand\n *\n * List all registered events and their listeners following Laravel's Artisan pattern\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class EventListCommand extends Command {\n signature = 'event:list [--event=]';\n description = \"List the application's events and listeners\";\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n try {\n // Try to get the dispatcher - will fail gracefully if not available yet\n const dispatcher = this.app.make<any>('events');\n const listeners = dispatcher.getRawListeners();\n\n if (listeners.size === 0) {\n this.comment('No events have been registered.');\n return;\n }\n\n const filter = options.event as string | undefined;\n\n const rows: string[][] = [];\n\n for (const [event, listenerList] of listeners) {\n // Filter if event option provided\n if (filter && !event.includes(filter)) {\n continue;\n }\n\n if (listenerList.length === 0) {\n rows.push([event, 'No listeners']);\n } else {\n listenerList.forEach((listener: any, index: number) => {\n rows.push([index === 0 ? event : '', this.formatListener(listener)]);\n });\n }\n\n // Add separator between events\n if (rows.length > 0 && rows[rows.length - 1][0] !== '') {\n rows.push(['', '']);\n }\n }\n\n // Remove trailing separator\n if (rows.length > 0 && rows[rows.length - 1][0] === '') {\n rows.pop();\n }\n\n if (rows.length === 0) {\n this.comment(`No events found matching: ${filter}`);\n return;\n }\n\n this.newLine();\n this.info('Registered Events and Listeners:');\n this.newLine();\n\n // Display results in a formatted table\n const maxEventLength = Math.max(...rows.map((row) => row[0].length), 'Event'.length);\n const maxListenerLength = Math.max(...rows.map((row) => row[1].length), 'Listeners'.length);\n\n // Header\n this.line(`${'Event'.padEnd(maxEventLength + 2)} ${'Listeners'.padEnd(maxListenerLength)}`);\n this.line('-'.repeat(maxEventLength + maxListenerLength + 3));\n\n // Rows\n for (const [event, listener] of rows) {\n if (event === '' && listener === '') {\n this.line('');\n } else {\n this.line(`${event.padEnd(maxEventLength + 2)} ${listener}`);\n }\n }\n\n this.newLine();\n this.comment(`Total events: ${listeners.size}`);\n } catch (error: any) {\n if (error.message?.includes('events')) {\n this.error('Event dispatcher not registered.');\n this.comment('Make sure the EventServiceProvider is registered in your application.');\n } else {\n throw error;\n }\n }\n }\n\n /**\n * Format a listener for display\n */\n protected formatListener(listener: any): string {\n if (typeof listener === 'string') {\n return listener;\n }\n\n if (typeof listener === 'function') {\n return listener.name || '<Closure>';\n }\n\n if (typeof listener === 'object' && listener.constructor) {\n return listener.constructor.name;\n }\n\n return '<Unknown>';\n }\n}\n"],"mappings":"yCASA,IAAa,EAAb,cAAsC,CAAQ,CAItB,IAHtB,UAAY,wBACZ,YAAc,8CAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,GAAI,CAGF,IAAM,EADa,KAAK,IAAI,KAAU,SACV,CAAC,iBAAiB,CAE9C,GAAI,EAAU,OAAS,EAAG,CACxB,KAAK,QAAQ,kCAAkC,CAC/C,OAGF,IAAM,EAAS,EAAQ,MAEjB,EAAmB,EAAE,CAE3B,IAAK,GAAM,CAAC,EAAO,KAAiB,EAE9B,GAAU,CAAC,EAAM,SAAS,EAAO,GAIjC,EAAa,SAAW,EAC1B,EAAK,KAAK,CAAC,EAAO,eAAe,CAAC,CAElC,EAAa,SAAS,EAAe,IAAkB,CACrD,EAAK,KAAK,CAAC,IAAU,EAAI,EAAQ,GAAI,KAAK,eAAe,EAAS,CAAC,CAAC,EACpE,CAIA,EAAK,OAAS,GAAK,EAAK,EAAK,OAAS,GAAG,KAAO,IAClD,EAAK,KAAK,CAAC,GAAI,GAAG,CAAC,EASvB,GAJI,EAAK,OAAS,GAAK,EAAK,EAAK,OAAS,GAAG,KAAO,IAClD,EAAK,KAAK,CAGR,EAAK,SAAW,EAAG,CACrB,KAAK,QAAQ,6BAA6B,IAAS,CACnD,OAGF,KAAK,SAAS,CACd,KAAK,KAAK,mCAAmC,CAC7C,KAAK,SAAS,CAGd,IAAM,EAAiB,KAAK,IAAI,GAAG,EAAK,IAAK,GAAQ,EAAI,GAAG,OAAO,CAAE,EAAe,CAC9E,EAAoB,KAAK,IAAI,GAAG,EAAK,IAAK,GAAQ,EAAI,GAAG,OAAO,CAAE,EAAmB,CAG3F,KAAK,KAAK,GAAG,QAAQ,OAAO,EAAiB,EAAE,CAAC,GAAG,YAAY,OAAO,EAAkB,GAAG,CAC3F,KAAK,KAAK,IAAI,OAAO,EAAiB,EAAoB,EAAE,CAAC,CAG7D,IAAK,GAAM,CAAC,EAAO,KAAa,EAC1B,IAAU,IAAM,IAAa,GAC/B,KAAK,KAAK,GAAG,CAEb,KAAK,KAAK,GAAG,EAAM,OAAO,EAAiB,EAAE,CAAC,GAAG,IAAW,CAIhE,KAAK,SAAS,CACd,KAAK,QAAQ,iBAAiB,EAAU,OAAO,OACxC,EAAY,CACnB,GAAI,EAAM,SAAS,SAAS,SAAS,CACnC,KAAK,MAAM,mCAAmC,CAC9C,KAAK,QAAQ,wEAAwE,MAErF,MAAM,GAQZ,eAAyB,EAAuB,CAa9C,OAZI,OAAO,GAAa,SACf,EAGL,OAAO,GAAa,WACf,EAAS,MAAQ,YAGtB,OAAO,GAAa,UAAY,EAAS,YACpC,EAAS,YAAY,KAGvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:controller <name>`;description=`Create a new controller class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Controller name is required.`),this.line(`Usage: make:controller <name>`);return}let a=this.getPath(t),o=r.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Controller already exists: ${o}`);return}await n.mkdir(a,{recursive:!0}),await this.ensureBaseController(a);let s=this.getStub().replace(/\{\{className\}\}/g,i);await n.writeFile(o,s),this.info(`Controller created successfully: ${o}`),this.newLine(),this.comment(`Use it in your routes or register in your HTTP layer.`)}getPath(e){return e.path||this.app.path(`Http/Controllers`)}async ensureBaseController(e){let t=r.join(e,`Controller.ts`);await this.fileExists(t)||(await n.writeFile(t,this.getBaseControllerStub()),this.info(`Base controller created: ${t}`))}getBaseControllerStub(){return`/**
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:controller <name>`;description=`Create a new controller class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Controller name is required.`),this.line(`Usage: make:controller <name>`);return}let a=this.getPath(t),o=r.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Controller already exists: ${o}`);return}await n.mkdir(a,{recursive:!0}),await this.ensureBaseController(a);let s=this.getStub().replace(/\{\{className\}\}/g,i);await n.writeFile(o,s),this.info(`Controller created successfully: ${o}`),this.newLine(),this.comment(`Use it in your routes or register in your HTTP layer.`)}getPath(e){return e.path||this.app.path(`Http/Controllers`)}async ensureBaseController(e){let t=r.join(e,`Controller.ts`);await this.fileExists(t)||(await n.writeFile(t,this.getBaseControllerStub()),this.info(`Base controller created: ${t}`))}getBaseControllerStub(){return`/**
|
|
2
2
|
* Base Controller
|
|
3
3
|
*
|
|
4
4
|
* All application controllers should extend this class.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`make:controller <name>`;description=`Create a new controller class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Controller name is required.`),this.line(`Usage: make:controller <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Controller already exists: ${o}`);return}await t.mkdir(a,{recursive:!0}),await this.ensureBaseController(a);let s=this.getStub().replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Controller created successfully: ${o}`),this.newLine(),this.comment(`Use it in your routes or register in your HTTP layer.`)}getPath(e){return e.path||this.app.path(`Http/Controllers`)}async ensureBaseController(e){let r=n.join(e,`Controller.ts`);await this.fileExists(r)||(await t.writeFile(r,this.getBaseControllerStub()),this.info(`Base controller created: ${r}`))}getBaseControllerStub(){return`/**
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`make:controller <name>`;description=`Create a new controller class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Controller name is required.`),this.line(`Usage: make:controller <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Controller already exists: ${o}`);return}await t.mkdir(a,{recursive:!0}),await this.ensureBaseController(a);let s=this.getStub().replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Controller created successfully: ${o}`),this.newLine(),this.comment(`Use it in your routes or register in your HTTP layer.`)}getPath(e){return e.path||this.app.path(`Http/Controllers`)}async ensureBaseController(e){let r=n.join(e,`Controller.ts`);await this.fileExists(r)||(await t.writeFile(r,this.getBaseControllerStub()),this.info(`Base controller created: ${r}`))}getBaseControllerStub(){return`/**
|
|
2
2
|
* Base Controller
|
|
3
3
|
*
|
|
4
4
|
* All application controllers should extend this class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeControllerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeControllerCommand.ts"],"sourcesContent":["/**\n * MakeControllerCommand\n *\n * Create a new controller class following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Application } from '../../Foundation/Application';\nimport { Command, CommandOptions } from '../Command';\n\nexport class MakeControllerCommand extends Command {\n signature = 'make:controller <name>';\n description = 'Create a new controller class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Controller name is required.');\n this.line('Usage: make:controller <name>');\n return;\n }\n\n const controllersPath = this.getPath(options);\n const filePath = path.join(controllersPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Controller already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(controllersPath, { recursive: true });\n\n // Ensure base Controller exists at app/Http/Controllers/Controller.ts\n await this.ensureBaseController(controllersPath);\n\n // Generate file content\n const content = this.getStub().replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Controller created successfully: ${filePath}`);\n this.newLine();\n this.comment('Use it in your routes or register in your HTTP layer.');\n }\n\n /**\n * Get the destination path for the controller class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Http/Controllers');\n }\n\n /**\n * Ensure the base Controller exists at app/Http/Controllers/Controller.ts\n */\n protected async ensureBaseController(controllersPath: string): Promise<void> {\n const basePath = path.join(controllersPath, 'Controller.ts');\n if (await this.fileExists(basePath)) {\n return;\n }\n await fs.writeFile(basePath, this.getBaseControllerStub());\n this.info(`Base controller created: ${basePath}`);\n }\n\n /**\n * Stub for the base Controller at app/Http/Controllers/Controller.ts\n */\n protected getBaseControllerStub(): string {\n return `/**\n * Base Controller\n *\n * All application controllers should extend this class.\n */\n\nimport { Controller as BaseController } from '@orchestr-sh/orchestr';\n\nexport class Controller extends BaseController {\n //\n}\n`;\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the controller class\n */\n protected getStub(): string {\n return `/**\n * {{className}} Controller\n *\n * Handle HTTP requests for...\n */\n\nimport { Controller } from './Controller';\n\nexport class {{className}} extends Controller {\n // Add your controller methods here\n // Example: index(), store(), show(), update(), destroy()\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAA2C,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeControllerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeControllerCommand.ts"],"sourcesContent":["/**\n * MakeControllerCommand\n *\n * Create a new controller class following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Application } from '../../Foundation/Application';\nimport { Command, CommandOptions } from '../Command';\n\nexport class MakeControllerCommand extends Command {\n signature = 'make:controller <name>';\n description = 'Create a new controller class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Controller name is required.');\n this.line('Usage: make:controller <name>');\n return;\n }\n\n const controllersPath = this.getPath(options);\n const filePath = path.join(controllersPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Controller already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(controllersPath, { recursive: true });\n\n // Ensure base Controller exists at app/Http/Controllers/Controller.ts\n await this.ensureBaseController(controllersPath);\n\n // Generate file content\n const content = this.getStub().replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Controller created successfully: ${filePath}`);\n this.newLine();\n this.comment('Use it in your routes or register in your HTTP layer.');\n }\n\n /**\n * Get the destination path for the controller class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Http/Controllers');\n }\n\n /**\n * Ensure the base Controller exists at app/Http/Controllers/Controller.ts\n */\n protected async ensureBaseController(controllersPath: string): Promise<void> {\n const basePath = path.join(controllersPath, 'Controller.ts');\n if (await this.fileExists(basePath)) {\n return;\n }\n await fs.writeFile(basePath, this.getBaseControllerStub());\n this.info(`Base controller created: ${basePath}`);\n }\n\n /**\n * Stub for the base Controller at app/Http/Controllers/Controller.ts\n */\n protected getBaseControllerStub(): string {\n return `/**\n * Base Controller\n *\n * All application controllers should extend this class.\n */\n\nimport { Controller as BaseController } from '@orchestr-sh/orchestr';\n\nexport class Controller extends BaseController {\n //\n}\n`;\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the controller class\n */\n protected getStub(): string {\n return `/**\n * {{className}} Controller\n *\n * Handle HTTP requests for...\n */\n\nimport { Controller } from './Controller';\n\nexport class {{className}} extends Controller {\n // Add your controller methods here\n // Example: index(), store(), show(), update(), destroy()\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAA2C,CAAQ,CAI3B,IAHtB,UAAY,yBACZ,YAAc,gCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,+BAA+B,CAC1C,KAAK,KAAK,gCAAgC,CAC1C,OAGF,IAAM,EAAkB,KAAK,QAAQ,EAAQ,CACvC,EAAW,EAAK,KAAK,EAAiB,GAAG,EAAK,KAAK,CAGzD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,8BAA8B,IAAW,CACpD,OAIF,MAAM,EAAG,MAAM,EAAiB,CAAE,UAAW,GAAM,CAAC,CAGpD,MAAM,KAAK,qBAAqB,EAAgB,CAGhD,IAAM,EAAU,KAAK,SAAS,CAAC,QAAQ,qBAAsB,EAAK,CAGlE,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,oCAAoC,IAAW,CACzD,KAAK,SAAS,CACd,KAAK,QAAQ,wDAAwD,CAMvE,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,mBAAmB,CAMtE,MAAgB,qBAAqB,EAAwC,CAC3E,IAAM,EAAW,EAAK,KAAK,EAAiB,gBAAgB,CACxD,MAAM,KAAK,WAAW,EAAS,GAGnC,MAAM,EAAG,UAAU,EAAU,KAAK,uBAAuB,CAAC,CAC1D,KAAK,KAAK,4BAA4B,IAAW,EAMnD,uBAA0C,CACxC,MAAO;;;;;;;;;;;EAiBT,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAOX,SAA4B,CAC1B,MAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:event <name>`;description=`Create a new event class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Event name is required.`),this.line(`Usage: make:event <name>`);return}let a=this.getPath(t),o=r.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Event already exists: ${o}`);return}await n.mkdir(a,{recursive:!0});let s=this.getStub().replace(/\{\{className\}\}/g,i);await n.writeFile(o,s),this.info(`Event created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add properties to the event constructor`),this.comment(`2. Create a listener with: make:listener <name> --event=${i}`)}getPath(e){return e.path||this.app.path(`Events`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(){return`/**
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:event <name>`;description=`Create a new event class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Event name is required.`),this.line(`Usage: make:event <name>`);return}let a=this.getPath(t),o=r.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Event already exists: ${o}`);return}await n.mkdir(a,{recursive:!0});let s=this.getStub().replace(/\{\{className\}\}/g,i);await n.writeFile(o,s),this.info(`Event created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add properties to the event constructor`),this.comment(`2. Create a listener with: make:listener <name> --event=${i}`)}getPath(e){return e.path||this.app.path(`Events`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(){return`/**
|
|
2
2
|
* {{className}} Event
|
|
3
3
|
*
|
|
4
4
|
* This event is dispatched when...
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`make:event <name>`;description=`Create a new event class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Event name is required.`),this.line(`Usage: make:event <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Event already exists: ${o}`);return}await t.mkdir(a,{recursive:!0});let s=this.getStub().replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Event created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add properties to the event constructor`),this.comment(`2. Create a listener with: make:listener <name> --event=${i}`)}getPath(e){return e.path||this.app.path(`Events`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(){return`/**
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`make:event <name>`;description=`Create a new event class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Event name is required.`),this.line(`Usage: make:event <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Event already exists: ${o}`);return}await t.mkdir(a,{recursive:!0});let s=this.getStub().replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Event created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add properties to the event constructor`),this.comment(`2. Create a listener with: make:listener <name> --event=${i}`)}getPath(e){return e.path||this.app.path(`Events`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(){return`/**
|
|
2
2
|
* {{className}} Event
|
|
3
3
|
*
|
|
4
4
|
* This event is dispatched when...
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeEventCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeEventCommand.ts"],"sourcesContent":["/**\n * MakeEventCommand\n *\n * Create a new event class following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeEventCommand extends Command {\n signature = 'make:event <name>';\n description = 'Create a new event class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Event name is required.');\n this.line('Usage: make:event <name>');\n return;\n }\n\n const eventsPath = this.getPath(options);\n const filePath = path.join(eventsPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Event already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(eventsPath, { recursive: true });\n\n // Generate file content\n const content = this.getStub().replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Event created successfully: ${filePath}`);\n this.newLine();\n this.comment('Next steps:');\n this.comment('1. Add properties to the event constructor');\n this.comment(`2. Create a listener with: make:listener <name> --event=${name}`);\n }\n\n /**\n * Get the destination path for the event class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Events');\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the event class\n */\n protected getStub(): string {\n return `/**\n * {{className}} Event\n *\n * This event is dispatched when...\n */\nexport class {{className}} {\n constructor(\n // Add your event properties here\n // Example: public readonly user: User\n ) {}\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAsC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeEventCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeEventCommand.ts"],"sourcesContent":["/**\n * MakeEventCommand\n *\n * Create a new event class following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeEventCommand extends Command {\n signature = 'make:event <name>';\n description = 'Create a new event class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Event name is required.');\n this.line('Usage: make:event <name>');\n return;\n }\n\n const eventsPath = this.getPath(options);\n const filePath = path.join(eventsPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Event already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(eventsPath, { recursive: true });\n\n // Generate file content\n const content = this.getStub().replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Event created successfully: ${filePath}`);\n this.newLine();\n this.comment('Next steps:');\n this.comment('1. Add properties to the event constructor');\n this.comment(`2. Create a listener with: make:listener <name> --event=${name}`);\n }\n\n /**\n * Get the destination path for the event class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Events');\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the event class\n */\n protected getStub(): string {\n return `/**\n * {{className}} Event\n *\n * This event is dispatched when...\n */\nexport class {{className}} {\n constructor(\n // Add your event properties here\n // Example: public readonly user: User\n ) {}\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAsC,CAAQ,CAItB,IAHtB,UAAY,oBACZ,YAAc,2BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,0BAA0B,CACrC,KAAK,KAAK,2BAA2B,CACrC,OAGF,IAAM,EAAa,KAAK,QAAQ,EAAQ,CAClC,EAAW,EAAK,KAAK,EAAY,GAAG,EAAK,KAAK,CAGpD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,yBAAyB,IAAW,CAC/C,OAIF,MAAM,EAAG,MAAM,EAAY,CAAE,UAAW,GAAM,CAAC,CAG/C,IAAM,EAAU,KAAK,SAAS,CAAC,QAAQ,qBAAsB,EAAK,CAGlE,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,+BAA+B,IAAW,CACpD,KAAK,SAAS,CACd,KAAK,QAAQ,cAAc,CAC3B,KAAK,QAAQ,6CAA6C,CAC1D,KAAK,QAAQ,2DAA2D,IAAO,CAMjF,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,SAAS,CAM5D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAOX,SAA4B,CAC1B,MAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:job <name>`;description=`Create a new job class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Job name is required.`),this.line(`Usage: make:job <name>`);return}let a=this.getPath(t),o=r.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Job already exists: ${o}`);return}await n.mkdir(a,{recursive:!0});let s=(t.sync===!0||t.sync===`true`?this.getSyncStub():this.getStub()).replace(/\{\{className\}\}/g,i);await n.writeFile(o,s),this.info(`Job created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add your job logic to the handle() method`),this.comment(`2. Dispatch the job:`),this.comment(` await ${i}.dispatch();`)}getPath(e){return e.path||this.app.path(`Jobs`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(){return`import { Job } from '@orchestr-sh/orchestr';
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:job <name>`;description=`Create a new job class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Job name is required.`),this.line(`Usage: make:job <name>`);return}let a=this.getPath(t),o=r.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Job already exists: ${o}`);return}await n.mkdir(a,{recursive:!0});let s=(t.sync===!0||t.sync===`true`?this.getSyncStub():this.getStub()).replace(/\{\{className\}\}/g,i);await n.writeFile(o,s),this.info(`Job created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add your job logic to the handle() method`),this.comment(`2. Dispatch the job:`),this.comment(` await ${i}.dispatch();`)}getPath(e){return e.path||this.app.path(`Jobs`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(){return`import { Job } from '@orchestr-sh/orchestr';
|
|
2
2
|
|
|
3
3
|
export class {{className}} extends Job {
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`make:job <name>`;description=`Create a new job class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Job name is required.`),this.line(`Usage: make:job <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Job already exists: ${o}`);return}await t.mkdir(a,{recursive:!0});let s=(r.sync===!0||r.sync===`true`?this.getSyncStub():this.getStub()).replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Job created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add your job logic to the handle() method`),this.comment(`2. Dispatch the job:`),this.comment(` await ${i}.dispatch();`)}getPath(e){return e.path||this.app.path(`Jobs`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(){return`import { Job } from '@orchestr-sh/orchestr';
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`make:job <name>`;description=`Create a new job class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Job name is required.`),this.line(`Usage: make:job <name>`);return}let a=this.getPath(r),o=n.join(a,`${i}.ts`);if(await this.fileExists(o)){this.error(`Job already exists: ${o}`);return}await t.mkdir(a,{recursive:!0});let s=(r.sync===!0||r.sync===`true`?this.getSyncStub():this.getStub()).replace(/\{\{className\}\}/g,i);await t.writeFile(o,s),this.info(`Job created successfully: ${o}`),this.newLine(),this.comment(`Next steps:`),this.comment(`1. Add your job logic to the handle() method`),this.comment(`2. Dispatch the job:`),this.comment(` await ${i}.dispatch();`)}getPath(e){return e.path||this.app.path(`Jobs`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(){return`import { Job } from '@orchestr-sh/orchestr';
|
|
2
2
|
|
|
3
3
|
export class {{className}} extends Job {
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeJobCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeJobCommand.ts"],"sourcesContent":["/**\n * MakeJobCommand\n *\n * Create a new job class.\n * Mirrors Laravel's `php artisan make:job`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeJobCommand extends Command {\n signature = 'make:job <name>';\n description = 'Create a new job class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Job name is required.');\n this.line('Usage: make:job <name>');\n return;\n }\n\n const jobsPath = this.getPath(options);\n const filePath = path.join(jobsPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Job already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(jobsPath, { recursive: true });\n\n // Determine if sync or queued\n const sync = options.sync === true || options.sync === 'true';\n\n // Generate file content\n const content = (sync ? this.getSyncStub() : this.getStub()).replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Job created successfully: ${filePath}`);\n this.newLine();\n this.comment('Next steps:');\n this.comment('1. Add your job logic to the handle() method');\n this.comment('2. Dispatch the job:');\n this.comment(` await ${name}.dispatch();`);\n }\n\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Jobs');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * The number of times the job may be attempted.\n */\n public tries = 3;\n\n /**\n * The number of seconds the job can run before timing out.\n */\n public timeout = 60;\n\n /**\n * The number of seconds to wait before retrying the job.\n * Can use an array for progressive backoff: [10, 30, 60]\n */\n public backoff = 10;\n\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n\n /**\n * Handle a job failure.\n */\n async failed(error: Error): Promise<void> {\n console.error(\\`[\\${this.displayName()}] Failed:\\`, error.message);\n }\n}\n`;\n }\n\n protected getSyncStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAoC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeJobCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeJobCommand.ts"],"sourcesContent":["/**\n * MakeJobCommand\n *\n * Create a new job class.\n * Mirrors Laravel's `php artisan make:job`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeJobCommand extends Command {\n signature = 'make:job <name>';\n description = 'Create a new job class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Job name is required.');\n this.line('Usage: make:job <name>');\n return;\n }\n\n const jobsPath = this.getPath(options);\n const filePath = path.join(jobsPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Job already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(jobsPath, { recursive: true });\n\n // Determine if sync or queued\n const sync = options.sync === true || options.sync === 'true';\n\n // Generate file content\n const content = (sync ? this.getSyncStub() : this.getStub()).replace(/\\{\\{className\\}\\}/g, name);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Job created successfully: ${filePath}`);\n this.newLine();\n this.comment('Next steps:');\n this.comment('1. Add your job logic to the handle() method');\n this.comment('2. Dispatch the job:');\n this.comment(` await ${name}.dispatch();`);\n }\n\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Jobs');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * The number of times the job may be attempted.\n */\n public tries = 3;\n\n /**\n * The number of seconds the job can run before timing out.\n */\n public timeout = 60;\n\n /**\n * The number of seconds to wait before retrying the job.\n * Can use an array for progressive backoff: [10, 30, 60]\n */\n public backoff = 10;\n\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n\n /**\n * Handle a job failure.\n */\n async failed(error: Error): Promise<void> {\n console.error(\\`[\\${this.displayName()}] Failed:\\`, error.message);\n }\n}\n`;\n }\n\n protected getSyncStub(): string {\n return `import { Job } from '@orchestr-sh/orchestr';\n\nexport class {{className}} extends Job {\n /**\n * Create a new job instance.\n */\n constructor(\n // Add your job data here\n ) {\n super();\n }\n\n /**\n * Execute the job.\n */\n async handle(): Promise<void> {\n //\n }\n}\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAoC,CAAQ,CAIpB,IAHtB,UAAY,kBACZ,YAAc,yBAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,wBAAwB,CACnC,KAAK,KAAK,yBAAyB,CACnC,OAGF,IAAM,EAAW,KAAK,QAAQ,EAAQ,CAChC,EAAW,EAAK,KAAK,EAAU,GAAG,EAAK,KAAK,CAGlD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,uBAAuB,IAAW,CAC7C,OAIF,MAAM,EAAG,MAAM,EAAU,CAAE,UAAW,GAAM,CAAC,CAM7C,IAAM,GAHO,EAAQ,OAAS,IAAQ,EAAQ,OAAS,OAG/B,KAAK,aAAa,CAAG,KAAK,SAAS,EAAE,QAAQ,qBAAsB,EAAK,CAGhG,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,6BAA6B,IAAW,CAClD,KAAK,SAAS,CACd,KAAK,QAAQ,cAAc,CAC3B,KAAK,QAAQ,+CAA+C,CAC5D,KAAK,QAAQ,uBAAuB,CACpC,KAAK,QAAQ,YAAY,EAAK,cAAc,CAG9C,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,OAAO,CAG1D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAIX,SAA4B,CAC1B,MAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CT,aAAgC,CAC9B,MAAO"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=t.event,o=t.queued===!0,s=this.getPath(t),c=r.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await n.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await n.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=t.event,o=t.queued===!0,s=this.getPath(t),c=r.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await n.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await n.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* {{className}} Listener
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=r.event,o=r.queued===!0,s=this.getPath(r),c=n.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await t.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await t.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`make:listener <name> [--event=] [--queued]`;description=`Create a new event listener class`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`Listener name is required.`),this.line(`Usage: make:listener <name> [--event=EventName] [--queued]`);return}let a=r.event,o=r.queued===!0,s=this.getPath(r),c=n.join(s,`${i}.ts`);if(await this.fileExists(c)){this.error(`Listener already exists: ${c}`);return}await t.mkdir(s,{recursive:!0});let l=this.getStub(o,a).replace(/\{\{className\}\}/g,i).replace(/\{\{eventClass\}\}/g,a||`Event`);await t.writeFile(c,l),this.info(`Listener created successfully: ${c}`),a?(this.newLine(),this.comment(`Don't forget to register this listener in your EventServiceProvider:`),this.comment(` protected listen = {`),this.comment(` ${a}: '${i}',`),this.comment(` }`)):(this.newLine(),this.comment(`Remember to specify the event type in the handle method.`))}getPath(e){return e.path||this.app.path(`Listeners`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e,t){return e?`import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${t?`\nimport { ${t} } from '../Events/${t}';`:``}
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* {{className}} Listener
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeListenerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeListenerCommand.ts"],"sourcesContent":["/**\n * MakeListenerCommand\n *\n * Create a new event listener class following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeListenerCommand extends Command {\n signature = 'make:listener <name> [--event=] [--queued]';\n description = 'Create a new event listener class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Listener name is required.');\n this.line('Usage: make:listener <name> [--event=EventName] [--queued]');\n return;\n }\n\n const event = options.event as string | undefined;\n const queued = options.queued === true;\n\n const listenersPath = this.getPath(options);\n const filePath = path.join(listenersPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Listener already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(listenersPath, { recursive: true });\n\n // Generate file content\n const content = this.getStub(queued, event)\n .replace(/\\{\\{className\\}\\}/g, name)\n .replace(/\\{\\{eventClass\\}\\}/g, event || 'Event');\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Listener created successfully: ${filePath}`);\n\n if (event) {\n this.newLine();\n this.comment(\"Don't forget to register this listener in your EventServiceProvider:\");\n this.comment(` protected listen = {`);\n this.comment(` ${event}: '${name}',`);\n this.comment(` }`);\n } else {\n this.newLine();\n this.comment('Remember to specify the event type in the handle method.');\n }\n }\n\n /**\n * Get the destination path for the listener class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Listeners');\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the listener class\n */\n protected getStub(queued: boolean, event?: string): string {\n if (queued) {\n return `import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${event ? `\\nimport { ${event} } from '../Events/${event}';` : ''}\n\n/**\n * {{className}} Listener\n *\n * This listener will be queued automatically\n */\nexport class {{className}} implements ShouldQueue {\n // Queue configuration\n public connection = 'default';\n public queue = 'listeners';\n public tries = 3;\n\n /**\n * Handle the event\n */\n async handle(event: {{eventClass}}): Promise<void> {\n // Handle the event\n }\n\n /**\n * Handle a job failure\n */\n async failed(event: {{eventClass}}, error: Error): Promise<void> {\n // Handle the failure\n }\n}\n`;\n }\n\n return `${event ? `import { ${event} } from '../Events/${event}';\\n\\n` : ''}/**\n * {{className}} Listener\n */\nexport class {{className}} {\n /**\n * Handle the event\n */\n handle(event: {{eventClass}}): void {\n // Handle the event\n }\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAyC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeListenerCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeListenerCommand.ts"],"sourcesContent":["/**\n * MakeListenerCommand\n *\n * Create a new event listener class following Laravel's Artisan pattern\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeListenerCommand extends Command {\n signature = 'make:listener <name> [--event=] [--queued]';\n description = 'Create a new event listener class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Listener name is required.');\n this.line('Usage: make:listener <name> [--event=EventName] [--queued]');\n return;\n }\n\n const event = options.event as string | undefined;\n const queued = options.queued === true;\n\n const listenersPath = this.getPath(options);\n const filePath = path.join(listenersPath, `${name}.ts`);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`Listener already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(listenersPath, { recursive: true });\n\n // Generate file content\n const content = this.getStub(queued, event)\n .replace(/\\{\\{className\\}\\}/g, name)\n .replace(/\\{\\{eventClass\\}\\}/g, event || 'Event');\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`Listener created successfully: ${filePath}`);\n\n if (event) {\n this.newLine();\n this.comment(\"Don't forget to register this listener in your EventServiceProvider:\");\n this.comment(` protected listen = {`);\n this.comment(` ${event}: '${name}',`);\n this.comment(` }`);\n } else {\n this.newLine();\n this.comment('Remember to specify the event type in the handle method.');\n }\n }\n\n /**\n * Get the destination path for the listener class\n */\n protected getPath(options: CommandOptions): string {\n return (options.path as string) || this.app.path('Listeners');\n }\n\n /**\n * Check if a file exists\n */\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Get the stub template for the listener class\n */\n protected getStub(queued: boolean, event?: string): string {\n if (queued) {\n return `import { ShouldQueue } from '../../Listeners/Contracts/ShouldQueue';${event ? `\\nimport { ${event} } from '../Events/${event}';` : ''}\n\n/**\n * {{className}} Listener\n *\n * This listener will be queued automatically\n */\nexport class {{className}} implements ShouldQueue {\n // Queue configuration\n public connection = 'default';\n public queue = 'listeners';\n public tries = 3;\n\n /**\n * Handle the event\n */\n async handle(event: {{eventClass}}): Promise<void> {\n // Handle the event\n }\n\n /**\n * Handle a job failure\n */\n async failed(event: {{eventClass}}, error: Error): Promise<void> {\n // Handle the failure\n }\n}\n`;\n }\n\n return `${event ? `import { ${event} } from '../Events/${event}';\\n\\n` : ''}/**\n * {{className}} Listener\n */\nexport class {{className}} {\n /**\n * Handle the event\n */\n handle(event: {{eventClass}}): void {\n // Handle the event\n }\n}\n`;\n }\n}\n"],"mappings":"8FAWA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,6CACZ,YAAc,oCAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,6BAA6B,CACxC,KAAK,KAAK,6DAA6D,CACvE,OAGF,IAAM,EAAQ,EAAQ,MAChB,EAAS,EAAQ,SAAW,GAE5B,EAAgB,KAAK,QAAQ,EAAQ,CACrC,EAAW,EAAK,KAAK,EAAe,GAAG,EAAK,KAAK,CAGvD,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,4BAA4B,IAAW,CAClD,OAIF,MAAM,EAAG,MAAM,EAAe,CAAE,UAAW,GAAM,CAAC,CAGlD,IAAM,EAAU,KAAK,QAAQ,EAAQ,EAAM,CACxC,QAAQ,qBAAsB,EAAK,CACnC,QAAQ,sBAAuB,GAAS,QAAQ,CAGnD,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,kCAAkC,IAAW,CAEnD,GACF,KAAK,SAAS,CACd,KAAK,QAAQ,uEAAuE,CACpF,KAAK,QAAQ,yBAAyB,CACtC,KAAK,QAAQ,OAAO,EAAM,KAAK,EAAK,IAAI,CACxC,KAAK,QAAQ,MAAM,GAEnB,KAAK,SAAS,CACd,KAAK,QAAQ,2DAA2D,EAO5E,QAAkB,EAAiC,CACjD,OAAQ,EAAQ,MAAmB,KAAK,IAAI,KAAK,YAAY,CAM/D,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAOX,QAAkB,EAAiB,EAAwB,CAgCzD,OA/BI,EACK,uEAAuE,EAAQ,cAAc,EAAM,qBAAqB,EAAM,IAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BzI,GAAG,EAAQ,YAAY,EAAM,qBAAqB,EAAM,QAAU,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/MigrationCreator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e.MigrationCreator;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};exports.MakeMigrationCommand=n;
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/MigrationCreator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e.MigrationCreator;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};exports.MakeMigrationCommand=n;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MigrationCreator as e}from"../../Database/Migrations/MigrationCreator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};export{n as MakeMigrationCommand};
|
|
1
|
+
import{MigrationCreator as e}from"../../Database/Migrations/MigrationCreator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`make:migration <name>`;description=`Create a new migration file`;constructor(e){super(),this.app=e}async handle(t,n){let r=t[0];if(!r){this.error(`Migration name is required.`),this.line(`Usage: make:migration <name>`);return}let i=n.path||this.app.databasePath(`migrations`),a=n.table,o=n.create===!0,s=new e;try{let e=await s.create(r,i,a,o);this.info(`Migration created successfully: ${e}`)}catch(e){throw this.error(`Failed to create migration: ${e.message}`),e}}};export{n as MakeMigrationCommand};
|
|
2
2
|
//# sourceMappingURL=MakeMigrationCommand.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeMigrationCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeMigrationCommand.ts"],"sourcesContent":["/**\n * MakeMigrationCommand\n *\n * Create a new migration file\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { MigrationCreator } from '@/Database/Migrations/MigrationCreator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeMigrationCommand extends Command {\n signature = 'make:migration <name>';\n description = 'Create a new migration file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Migration name is required.');\n this.line('Usage: make:migration <name>');\n return;\n }\n\n const migrationPath = (options.path as string) || this.app.databasePath('migrations');\n const table = options.table as string | undefined;\n const create = options.create === true;\n\n const creator = new MigrationCreator();\n\n try {\n const filePath = await creator.create(name, migrationPath, table, create);\n\n this.info(`Migration created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create migration: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2HAUA,IAAa,EAAb,cAA0C,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeMigrationCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeMigrationCommand.ts"],"sourcesContent":["/**\n * MakeMigrationCommand\n *\n * Create a new migration file\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { MigrationCreator } from '@/Database/Migrations/MigrationCreator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeMigrationCommand extends Command {\n signature = 'make:migration <name>';\n description = 'Create a new migration file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Migration name is required.');\n this.line('Usage: make:migration <name>');\n return;\n }\n\n const migrationPath = (options.path as string) || this.app.databasePath('migrations');\n const table = options.table as string | undefined;\n const create = options.create === true;\n\n const creator = new MigrationCreator();\n\n try {\n const filePath = await creator.create(name, migrationPath, table, create);\n\n this.info(`Migration created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create migration: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2HAUA,IAAa,EAAb,cAA0C,CAAQ,CAI1B,IAHtB,UAAY,wBACZ,YAAc,8BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,8BAA8B,CACzC,KAAK,KAAK,+BAA+B,CACzC,OAGF,IAAM,EAAiB,EAAQ,MAAmB,KAAK,IAAI,aAAa,aAAa,CAC/E,EAAQ,EAAQ,MAChB,EAAS,EAAQ,SAAW,GAE5B,EAAU,IAAI,EAEpB,GAAI,CACF,IAAM,EAAW,MAAM,EAAQ,OAAO,EAAM,EAAe,EAAO,EAAO,CAEzE,KAAK,KAAK,mCAAmC,IAAW,OACjD,EAAO,CAEd,MADA,KAAK,MAAM,+BAAgC,EAAgB,UAAU,CAC/D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`path`);n=e.__toESM(n);let r=require(`fs`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,t){r.existsSync(t)||r.mkdirSync(t,{recursive:!0});let i=`${e}.ts`,a=n.join(t,i);if(r.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return r.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`path`);n=e.__toESM(n,1);let r=require(`fs`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,t){r.existsSync(t)||r.mkdirSync(t,{recursive:!0});let i=`${e}.ts`,a=n.join(t,i);if(r.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return r.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
|
|
2
2
|
|
|
3
3
|
export default class ${e} extends Seeder {
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"path";import*as n from"fs";var r=class extends e{signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,r){n.existsSync(r)||n.mkdirSync(r,{recursive:!0});let i=`${e}.ts`,a=t.join(r,i);if(n.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return n.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"path";import*as n from"fs";var r=class extends e{app;signature=`make:seeder <name>`;description=`Create a new seeder class`;constructor(e){super(),this.app=e}async handle(e,t){let n=e[0];if(!n){this.error(`Seeder name is required.`),this.line(`Usage: make:seeder <name>`);return}let r=t.path||`./database/seeders`;try{let e=await this.createSeeder(n,r);this.info(`Seeder created successfully: ${e}`)}catch(e){throw this.error(`Failed to create seeder: ${e.message}`),e}}async createSeeder(e,r){n.existsSync(r)||n.mkdirSync(r,{recursive:!0});let i=`${e}.ts`,a=t.join(r,i);if(n.existsSync(a))throw Error(`Seeder already exists: ${a}`);let o=this.getStub(e);return n.writeFileSync(a,o),a}getStub(e){return`import { Seeder } from '@orchestr-sh/orchestr';
|
|
2
2
|
|
|
3
3
|
export default class ${e} extends Seeder {
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeSeederCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeSeederCommand.ts"],"sourcesContent":["/**\n * MakeSeederCommand\n *\n * Create a new seeder class\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeSeederCommand extends Command {\n signature = 'make:seeder <name>';\n description = 'Create a new seeder class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Seeder name is required.');\n this.line('Usage: make:seeder <name>');\n return;\n }\n\n const seederPath = options.path || './database/seeders';\n\n try {\n const filePath = await this.createSeeder(name, seederPath);\n\n this.info(`Seeder created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create seeder: ${(error as Error).message}`);\n throw error;\n }\n }\n\n /**\n * Create a new seeder file\n */\n protected async createSeeder(name: string, seederPath: string): Promise<string> {\n // Ensure directory exists\n if (!fs.existsSync(seederPath)) {\n fs.mkdirSync(seederPath, { recursive: true });\n }\n\n const fileName = `${name}.ts`;\n const filePath = path.join(seederPath, fileName);\n\n if (fs.existsSync(filePath)) {\n throw new Error(`Seeder already exists: ${filePath}`);\n }\n\n const stub = this.getStub(name);\n fs.writeFileSync(filePath, stub);\n\n return filePath;\n }\n\n /**\n * Get the seeder stub\n */\n protected getStub(name: string): string {\n return `import { Seeder } from '@orchestr-sh/orchestr';\n\nexport default class ${name} extends Seeder {\n /**\n * Run the database seeds\n */\n async run(): Promise<void> {\n // Example: Insert data into database\n // await this.connection?.table('users').insert({\n // name: 'John Doe',\n // email: 'john@example.com',\n // });\n }\n}\n`;\n }\n}\n"],"mappings":"qFAWA,IAAa,EAAb,cAAuC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeSeederCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeSeederCommand.ts"],"sourcesContent":["/**\n * MakeSeederCommand\n *\n * Create a new seeder class\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeSeederCommand extends Command {\n signature = 'make:seeder <name>';\n description = 'Create a new seeder class';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('Seeder name is required.');\n this.line('Usage: make:seeder <name>');\n return;\n }\n\n const seederPath = options.path || './database/seeders';\n\n try {\n const filePath = await this.createSeeder(name, seederPath);\n\n this.info(`Seeder created successfully: ${filePath}`);\n } catch (error) {\n this.error(`Failed to create seeder: ${(error as Error).message}`);\n throw error;\n }\n }\n\n /**\n * Create a new seeder file\n */\n protected async createSeeder(name: string, seederPath: string): Promise<string> {\n // Ensure directory exists\n if (!fs.existsSync(seederPath)) {\n fs.mkdirSync(seederPath, { recursive: true });\n }\n\n const fileName = `${name}.ts`;\n const filePath = path.join(seederPath, fileName);\n\n if (fs.existsSync(filePath)) {\n throw new Error(`Seeder already exists: ${filePath}`);\n }\n\n const stub = this.getStub(name);\n fs.writeFileSync(filePath, stub);\n\n return filePath;\n }\n\n /**\n * Get the seeder stub\n */\n protected getStub(name: string): string {\n return `import { Seeder } from '@orchestr-sh/orchestr';\n\nexport default class ${name} extends Seeder {\n /**\n * Run the database seeds\n */\n async run(): Promise<void> {\n // Example: Insert data into database\n // await this.connection?.table('users').insert({\n // name: 'John Doe',\n // email: 'john@example.com',\n // });\n }\n}\n`;\n }\n}\n"],"mappings":"qFAWA,IAAa,EAAb,cAAuC,CAAQ,CAIvB,IAHtB,UAAY,qBACZ,YAAc,4BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,2BAA2B,CACtC,KAAK,KAAK,4BAA4B,CACtC,OAGF,IAAM,EAAa,EAAQ,MAAQ,qBAEnC,GAAI,CACF,IAAM,EAAW,MAAM,KAAK,aAAa,EAAM,EAAW,CAE1D,KAAK,KAAK,gCAAgC,IAAW,OAC9C,EAAO,CAEd,MADA,KAAK,MAAM,4BAA6B,EAAgB,UAAU,CAC5D,GAOV,MAAgB,aAAa,EAAc,EAAqC,CAEzE,EAAG,WAAW,EAAW,EAC5B,EAAG,UAAU,EAAY,CAAE,UAAW,GAAM,CAAC,CAG/C,IAAM,EAAW,GAAG,EAAK,KACnB,EAAW,EAAK,KAAK,EAAY,EAAS,CAEhD,GAAI,EAAG,WAAW,EAAS,CACzB,MAAU,MAAM,0BAA0B,IAAW,CAGvD,IAAM,EAAO,KAAK,QAAQ,EAAK,CAG/B,OAFA,EAAG,cAAc,EAAU,EAAK,CAEzB,EAMT,QAAkB,EAAsB,CACtC,MAAO;;uBAEY,EAAK"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n);let r=require(`path`);r=e.__toESM(r);var i=class extends t.Command{signature=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(t),o=i.replace(/\./g,`/`)+(t.ext||`.html`),s=r.join(a,o),c=r.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await n.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await n.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return r.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
|
|
1
|
+
const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../Command.cjs`);let n=require(`fs/promises`);n=e.__toESM(n,1);let r=require(`path`);r=e.__toESM(r,1);var i=class extends t.Command{app;signature=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,t){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(t),o=i.replace(/\./g,`/`)+(t.ext||`.html`),s=r.join(a,o),c=r.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await n.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await n.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return r.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await n.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{signature=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(r),o=i.replace(/\./g,`/`)+(r.ext||`.html`),s=n.join(a,o),c=n.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await t.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await t.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return n.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
|
|
1
|
+
import{Command as e}from"../Command.mjs";import*as t from"fs/promises";import*as n from"path";var r=class extends e{app;signature=`make:view <name>`;description=`Create a new view file`;constructor(e){super(),this.app=e}async handle(e,r){let i=e[0];if(!i){this.error(`View name is required.`),this.line(`Usage: make:view <name>`);return}let a=this.getViewsPath(r),o=i.replace(/\./g,`/`)+(r.ext||`.html`),s=n.join(a,o),c=n.dirname(s);if(await this.fileExists(s)){this.error(`View already exists: ${s}`);return}await t.mkdir(c,{recursive:!0});let l=i.split(`.`).pop().replace(/-/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),u=this.getStub(l);await t.writeFile(s,u),this.info(`View created successfully: ${s}`),this.newLine(),this.comment(`Render it in a route:`),this.comment(` return view('${i}', { title: '${l}' });`)}getViewsPath(e){if(e.path)return e.path;try{let e=this.app.make(`view`).getPaths?.()??[];if(e.length>0)return e[0]}catch{}return n.join(this.app.getBasePath(),`resources`,`views`)}async fileExists(e){try{return await t.access(e),!0}catch{return!1}}getStub(e){return`<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MakeViewCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeViewCommand.ts"],"sourcesContent":["/**\n * MakeViewCommand\n *\n * Create a new view file.\n * Mirrors Laravel's `php artisan make:view`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeViewCommand extends Command {\n signature = 'make:view <name>';\n description = 'Create a new view file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('View name is required.');\n this.line('Usage: make:view <name>');\n return;\n }\n\n const viewsPath = this.getViewsPath(options);\n\n // Convert dot-notation to directory path: 'layouts.app' -> 'layouts/app'\n const relativePath = name.replace(/\\./g, '/');\n const ext = (options.ext as string) || '.html';\n const fileName = relativePath + ext;\n const filePath = path.join(viewsPath, fileName);\n const dirPath = path.dirname(filePath);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`View already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(dirPath, { recursive: true });\n\n // Determine the view name for the title\n const viewTitle = name\n .split('.')\n .pop()!\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n\n // Generate file content\n const content = this.getStub(viewTitle);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`View created successfully: ${filePath}`);\n this.newLine();\n this.comment('Render it in a route:');\n this.comment(` return view('${name}', { title: '${viewTitle}' });`);\n }\n\n protected getViewsPath(options: CommandOptions): string {\n if (options.path) {\n return options.path as string;\n }\n\n // Resolve from ViewFactory if available\n try {\n const factory = this.app.make('view') as any;\n const paths: string[] = factory.getPaths?.() ?? [];\n if (paths.length > 0) {\n return paths[0];\n }\n } catch {\n // ViewFactory not registered yet\n }\n\n return path.join(this.app.getBasePath(), 'resources', 'views');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(title: string): string {\n return `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>{{ title }}</title>\n</head>\n<body>\n <h1>{{ title }}</h1>\n</body>\n</html>\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAqC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MakeViewCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MakeViewCommand.ts"],"sourcesContent":["/**\n * MakeViewCommand\n *\n * Create a new view file.\n * Mirrors Laravel's `php artisan make:view`.\n */\n\nimport * as fs from 'fs/promises';\nimport * as path from 'path';\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Application } from '@/Foundation/Application';\n\nexport class MakeViewCommand extends Command {\n signature = 'make:view <name>';\n description = 'Create a new view file';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const name = args[0];\n\n if (!name) {\n this.error('View name is required.');\n this.line('Usage: make:view <name>');\n return;\n }\n\n const viewsPath = this.getViewsPath(options);\n\n // Convert dot-notation to directory path: 'layouts.app' -> 'layouts/app'\n const relativePath = name.replace(/\\./g, '/');\n const ext = (options.ext as string) || '.html';\n const fileName = relativePath + ext;\n const filePath = path.join(viewsPath, fileName);\n const dirPath = path.dirname(filePath);\n\n // Check if file already exists\n if (await this.fileExists(filePath)) {\n this.error(`View already exists: ${filePath}`);\n return;\n }\n\n // Create directory if it doesn't exist\n await fs.mkdir(dirPath, { recursive: true });\n\n // Determine the view name for the title\n const viewTitle = name\n .split('.')\n .pop()!\n .replace(/-/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n\n // Generate file content\n const content = this.getStub(viewTitle);\n\n // Write file\n await fs.writeFile(filePath, content);\n\n this.info(`View created successfully: ${filePath}`);\n this.newLine();\n this.comment('Render it in a route:');\n this.comment(` return view('${name}', { title: '${viewTitle}' });`);\n }\n\n protected getViewsPath(options: CommandOptions): string {\n if (options.path) {\n return options.path as string;\n }\n\n // Resolve from ViewFactory if available\n try {\n const factory = this.app.make('view') as any;\n const paths: string[] = factory.getPaths?.() ?? [];\n if (paths.length > 0) {\n return paths[0];\n }\n } catch {\n // ViewFactory not registered yet\n }\n\n return path.join(this.app.getBasePath(), 'resources', 'views');\n }\n\n protected async fileExists(filePath: string): Promise<boolean> {\n try {\n await fs.access(filePath);\n return true;\n } catch {\n return false;\n }\n }\n\n protected getStub(title: string): string {\n return `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>{{ title }}</title>\n</head>\n<body>\n <h1>{{ title }}</h1>\n</body>\n</html>\n`;\n }\n}\n"],"mappings":"8FAYA,IAAa,EAAb,cAAqC,CAAQ,CAIrB,IAHtB,UAAY,mBACZ,YAAc,yBAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CACnE,IAAM,EAAO,EAAK,GAElB,GAAI,CAAC,EAAM,CACT,KAAK,MAAM,yBAAyB,CACpC,KAAK,KAAK,0BAA0B,CACpC,OAGF,IAAM,EAAY,KAAK,aAAa,EAAQ,CAKtC,EAFe,EAAK,QAAQ,MAAO,IAEZ,EADhB,EAAQ,KAAkB,SAEjC,EAAW,EAAK,KAAK,EAAW,EAAS,CACzC,EAAU,EAAK,QAAQ,EAAS,CAGtC,GAAI,MAAM,KAAK,WAAW,EAAS,CAAE,CACnC,KAAK,MAAM,wBAAwB,IAAW,CAC9C,OAIF,MAAM,EAAG,MAAM,EAAS,CAAE,UAAW,GAAM,CAAC,CAG5C,IAAM,EAAY,EACf,MAAM,IAAI,CACV,KAAK,CACL,QAAQ,KAAM,IAAI,CAClB,QAAQ,QAAU,GAAM,EAAE,aAAa,CAAC,CAGrC,EAAU,KAAK,QAAQ,EAAU,CAGvC,MAAM,EAAG,UAAU,EAAU,EAAQ,CAErC,KAAK,KAAK,8BAA8B,IAAW,CACnD,KAAK,SAAS,CACd,KAAK,QAAQ,wBAAwB,CACrC,KAAK,QAAQ,kBAAkB,EAAK,eAAe,EAAU,OAAO,CAGtE,aAAuB,EAAiC,CACtD,GAAI,EAAQ,KACV,OAAO,EAAQ,KAIjB,GAAI,CAEF,IAAM,EADU,KAAK,IAAI,KAAK,OACC,CAAC,YAAY,EAAI,EAAE,CAClD,GAAI,EAAM,OAAS,EACjB,OAAO,EAAM,QAET,EAIR,OAAO,EAAK,KAAK,KAAK,IAAI,aAAa,CAAE,YAAa,QAAQ,CAGhE,MAAgB,WAAW,EAAoC,CAC7D,GAAI,CAEF,OADA,MAAM,EAAG,OAAO,EAAS,CAClB,QACD,CACN,MAAO,IAIX,QAAkB,EAAuB,CACvC,MAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`migrate`;description=`Run the database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};exports.MigrateCommand=n;
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`migrate`;description=`Run the database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};exports.MigrateCommand=n;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{signature=`migrate`;description=`Run the database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};export{n as MigrateCommand};
|
|
1
|
+
import{Migrator as e}from"../../Database/Migrations/Migrator.mjs";import{Command as t}from"../Command.mjs";var n=class extends t{app;signature=`migrate`;description=`Run the database migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e(r,Array.isArray(i)?i:[i]);this.info(`Running migrations...`),this.newLine();try{let e=await a.run({pretend:n.pretend===!0});if(e.length===0){this.comment(`Nothing to migrate.`);return}e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine(),this.info(`Migration completed successfully.`)}catch(e){throw this.error(`Migration failed: ${e.message}`),e}}};export{n as MigrateCommand};
|
|
2
2
|
//# sourceMappingURL=MigrateCommand.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrateCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateCommand.ts"],"sourcesContent":["/**\n * MigrateCommand\n *\n * Run the database migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateCommand extends Command {\n signature = 'migrate';\n description = 'Run the database migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Running migrations...');\n this.newLine();\n\n try {\n const ran = await migrator.run({\n pretend: options.pretend === true,\n });\n\n if (ran.length === 0) {\n this.comment('Nothing to migrate.');\n return;\n }\n\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n\n this.newLine();\n this.info(`Migration completed successfully.`);\n } catch (error) {\n this.error(`Migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAAoC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MigrateCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateCommand.ts"],"sourcesContent":["/**\n * MigrateCommand\n *\n * Run the database migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateCommand extends Command {\n signature = 'migrate';\n description = 'Run the database migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const migrator = new Migrator(connection, paths);\n\n this.info('Running migrations...');\n this.newLine();\n\n try {\n const ran = await migrator.run({\n pretend: options.pretend === true,\n });\n\n if (ran.length === 0) {\n this.comment('Nothing to migrate.');\n return;\n }\n\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n\n this.newLine();\n this.info(`Migration completed successfully.`);\n } catch (error) {\n this.error(`Migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"2GAUA,IAAa,EAAb,cAAoC,CAAQ,CAIpB,IAHtB,UAAY,UACZ,YAAc,8BAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KACJ,CAAC,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CAGnE,EAAW,IAAI,EAAS,EAFhB,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE5B,CAEhD,KAAK,KAAK,wBAAwB,CAClC,KAAK,SAAS,CAEd,GAAI,CACF,IAAM,EAAM,MAAM,EAAS,IAAI,CAC7B,QAAS,EAAQ,UAAY,GAC9B,CAAC,CAEF,GAAI,EAAI,SAAW,EAAG,CACpB,KAAK,QAAQ,sBAAsB,CACnC,OAGF,EAAI,QAAS,GAAc,CACzB,KAAK,KAAK,aAAa,IAAY,EACnC,CAEF,KAAK,SAAS,CACd,KAAK,KAAK,oCAAoC,OACvC,EAAO,CAEd,MADA,KAAK,MAAM,qBAAsB,EAAgB,UAAU,CACrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/SchemaBuilder.cjs`),t=require(`../../Database/Migrations/Migrator.cjs`),n=require(`../Command.cjs`);var r=class extends n.Command{signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e.SchemaBuilder(i);let s=new t.Migrator(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};exports.MigrateFreshCommand=r;
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/SchemaBuilder.cjs`),t=require(`../../Database/Migrations/Migrator.cjs`),n=require(`../Command.cjs`);var r=class extends n.Command{app;signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e.SchemaBuilder(i);let s=new t.Migrator(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};exports.MigrateFreshCommand=r;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SchemaBuilder as e}from"../../Database/Migrations/SchemaBuilder.mjs";import{Migrator as t}from"../../Database/Migrations/Migrator.mjs";import{Command as n}from"../Command.mjs";var r=class extends n{signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e(i);let s=new t(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};export{r as MigrateFreshCommand};
|
|
1
|
+
import{SchemaBuilder as e}from"../../Database/Migrations/SchemaBuilder.mjs";import{Migrator as t}from"../../Database/Migrations/Migrator.mjs";import{Command as n}from"../Command.mjs";var r=class extends n{app;signature=`migrate:fresh`;description=`Drop all tables and re-run all migrations`;constructor(e){super(),this.app=e}async handle(n,r){let i=this.app.make(`db`).connection(),a=r.path||this.app.databasePath(`migrations`),o=Array.isArray(a)?a:[a];new e(i);let s=new t(i,o);this.warn(`This command will drop all tables. Are you sure you want to continue?`),this.newLine();try{this.info(`Dropping all tables...`),await s.dropAllTables(),this.newLine(),this.info(`Running migrations...`),this.newLine();let e=await s.run();e.length>0&&(e.forEach(e=>{this.info(`Migrated: ${e}`)}),this.newLine()),this.info(`Database fresh completed successfully.`)}catch(e){throw this.error(`Fresh migration failed: ${e.message}`),e}}};export{r as MigrateFreshCommand};
|
|
2
2
|
//# sourceMappingURL=MigrateFreshCommand.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MigrateFreshCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateFreshCommand.ts"],"sourcesContent":["/**\n * MigrateFreshCommand\n *\n * Drop all tables and re-run all migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { SchemaBuilder } from '@/Database/Migrations/SchemaBuilder';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateFreshCommand extends Command {\n signature = 'migrate:fresh';\n description = 'Drop all tables and re-run all migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const schema = new SchemaBuilder(connection);\n const migrator = new Migrator(connection, paths);\n\n this.warn('This command will drop all tables. Are you sure you want to continue?');\n this.newLine();\n\n try {\n // Drop all tables (including the migrations tracking table itself)\n this.info('Dropping all tables...');\n await migrator.dropAllTables();\n this.newLine();\n\n // Re-run all migrations\n this.info('Running migrations...');\n this.newLine();\n\n const ran = await migrator.run();\n\n if (ran.length > 0) {\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n this.newLine();\n }\n\n this.info(`Database fresh completed successfully.`);\n } catch (error) {\n this.error(`Fresh migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"uLAWA,IAAa,EAAb,cAAyC,CAAQ,
|
|
1
|
+
{"version":3,"file":"MigrateFreshCommand.mjs","names":[],"sources":["../../../src/Console/Commands/MigrateFreshCommand.ts"],"sourcesContent":["/**\n * MigrateFreshCommand\n *\n * Drop all tables and re-run all migrations\n */\n\nimport { Command, CommandOptions } from '@/Console/Command';\nimport { Migrator } from '@/Database/Migrations/Migrator';\nimport { SchemaBuilder } from '@/Database/Migrations/SchemaBuilder';\nimport { Application } from '@/Foundation/Application';\n\nexport class MigrateFreshCommand extends Command {\n signature = 'migrate:fresh';\n description = 'Drop all tables and re-run all migrations';\n\n constructor(protected app: Application) {\n super();\n }\n\n async handle(args: string[], options: CommandOptions): Promise<void> {\n const db = this.app.make('db') as any;\n const connection = db.connection();\n const migrationPath = options.path || this.app.databasePath('migrations');\n const paths = Array.isArray(migrationPath) ? migrationPath : [migrationPath];\n\n const schema = new SchemaBuilder(connection);\n const migrator = new Migrator(connection, paths);\n\n this.warn('This command will drop all tables. Are you sure you want to continue?');\n this.newLine();\n\n try {\n // Drop all tables (including the migrations tracking table itself)\n this.info('Dropping all tables...');\n await migrator.dropAllTables();\n this.newLine();\n\n // Re-run all migrations\n this.info('Running migrations...');\n this.newLine();\n\n const ran = await migrator.run();\n\n if (ran.length > 0) {\n ran.forEach((migration) => {\n this.info(`Migrated: ${migration}`);\n });\n this.newLine();\n }\n\n this.info(`Database fresh completed successfully.`);\n } catch (error) {\n this.error(`Fresh migration failed: ${(error as Error).message}`);\n throw error;\n }\n }\n}\n"],"mappings":"uLAWA,IAAa,EAAb,cAAyC,CAAQ,CAIzB,IAHtB,UAAY,gBACZ,YAAc,4CAEd,YAAY,EAA4B,CACtC,OAAO,CADa,KAAA,IAAA,EAItB,MAAM,OAAO,EAAgB,EAAwC,CAEnE,IAAM,EADK,KAAK,IAAI,KAAK,KACJ,CAAC,YAAY,CAC5B,EAAgB,EAAQ,MAAQ,KAAK,IAAI,aAAa,aAAa,CACnE,EAAQ,MAAM,QAAQ,EAAc,CAAG,EAAgB,CAAC,EAAc,CAE7D,IAAI,EAAc,EAAW,CAC5C,IAAM,EAAW,IAAI,EAAS,EAAY,EAAM,CAEhD,KAAK,KAAK,wEAAwE,CAClF,KAAK,SAAS,CAEd,GAAI,CAEF,KAAK,KAAK,yBAAyB,CACnC,MAAM,EAAS,eAAe,CAC9B,KAAK,SAAS,CAGd,KAAK,KAAK,wBAAwB,CAClC,KAAK,SAAS,CAEd,IAAM,EAAM,MAAM,EAAS,KAAK,CAE5B,EAAI,OAAS,IACf,EAAI,QAAS,GAAc,CACzB,KAAK,KAAK,aAAa,IAAY,EACnC,CACF,KAAK,SAAS,EAGhB,KAAK,KAAK,yCAAyC,OAC5C,EAAO,CAEd,MADA,KAAK,MAAM,2BAA4B,EAAgB,UAAU,CAC3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{signature=`migrate:refresh`;description=`Reset and re-run all migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Refreshing database...`),this.newLine();try{let e=await a.refresh();e.rolledBack.length>0&&(this.comment(`Rolled back:`),e.rolledBack.forEach(e=>{this.info(` ${e}`)}),this.newLine()),e.ran.length>0&&(this.comment(`Migrated:`),e.ran.forEach(e=>{this.info(` ${e}`)}),this.newLine()),this.info(`Database refresh completed successfully.`)}catch(e){throw this.error(`Refresh failed: ${e.message}`),e}}};exports.MigrateRefreshCommand=n;
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../Database/Migrations/Migrator.cjs`),t=require(`../Command.cjs`);var n=class extends t.Command{app;signature=`migrate:refresh`;description=`Reset and re-run all migrations`;constructor(e){super(),this.app=e}async handle(t,n){let r=this.app.make(`db`).connection(),i=n.path||this.app.databasePath(`migrations`),a=new e.Migrator(r,Array.isArray(i)?i:[i]);this.info(`Refreshing database...`),this.newLine();try{let e=await a.refresh();e.rolledBack.length>0&&(this.comment(`Rolled back:`),e.rolledBack.forEach(e=>{this.info(` ${e}`)}),this.newLine()),e.ran.length>0&&(this.comment(`Migrated:`),e.ran.forEach(e=>{this.info(` ${e}`)}),this.newLine()),this.info(`Database refresh completed successfully.`)}catch(e){throw this.error(`Refresh failed: ${e.message}`),e}}};exports.MigrateRefreshCommand=n;
|