@orchestr-sh/orchestr 1.9.6 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/Console/Commands/DeployCommand.d.ts +16 -0
  2. package/dist/Console/Commands/DeployCommand.d.ts.map +1 -0
  3. package/dist/Console/Commands/DeployCommand.js +153 -0
  4. package/dist/Console/Commands/DeployCommand.js.map +1 -0
  5. package/dist/Console/Commands/DeployEnvCommand.d.ts +20 -0
  6. package/dist/Console/Commands/DeployEnvCommand.d.ts.map +1 -0
  7. package/dist/Console/Commands/DeployEnvCommand.js +160 -0
  8. package/dist/Console/Commands/DeployEnvCommand.js.map +1 -0
  9. package/dist/Console/Commands/DeployInitCommand.d.ts +19 -0
  10. package/dist/Console/Commands/DeployInitCommand.d.ts.map +1 -0
  11. package/dist/Console/Commands/DeployInitCommand.js +90 -0
  12. package/dist/Console/Commands/DeployInitCommand.js.map +1 -0
  13. package/dist/Console/Commands/DeployLoginCommand.d.ts +14 -0
  14. package/dist/Console/Commands/DeployLoginCommand.d.ts.map +1 -0
  15. package/dist/Console/Commands/DeployLoginCommand.js +54 -0
  16. package/dist/Console/Commands/DeployLoginCommand.js.map +1 -0
  17. package/dist/Console/Commands/DeployProvisionCommand.d.ts +15 -0
  18. package/dist/Console/Commands/DeployProvisionCommand.d.ts.map +1 -0
  19. package/dist/Console/Commands/DeployProvisionCommand.js +96 -0
  20. package/dist/Console/Commands/DeployProvisionCommand.js.map +1 -0
  21. package/dist/Console/Commands/DeployRollbackCommand.d.ts +13 -0
  22. package/dist/Console/Commands/DeployRollbackCommand.d.ts.map +1 -0
  23. package/dist/Console/Commands/DeployRollbackCommand.js +62 -0
  24. package/dist/Console/Commands/DeployRollbackCommand.js.map +1 -0
  25. package/dist/Console/Commands/DeployServerCommand.d.ts +18 -0
  26. package/dist/Console/Commands/DeployServerCommand.d.ts.map +1 -0
  27. package/dist/Console/Commands/DeployServerCommand.js +131 -0
  28. package/dist/Console/Commands/DeployServerCommand.js.map +1 -0
  29. package/dist/Console/Commands/DeployStatusCommand.d.ts +14 -0
  30. package/dist/Console/Commands/DeployStatusCommand.d.ts.map +1 -0
  31. package/dist/Console/Commands/DeployStatusCommand.js +72 -0
  32. package/dist/Console/Commands/DeployStatusCommand.js.map +1 -0
  33. package/dist/Console/orchestr.js +17 -0
  34. package/dist/Console/orchestr.js.map +1 -1
  35. package/dist/Deploy/CredentialStore.d.ts +31 -0
  36. package/dist/Deploy/CredentialStore.d.ts.map +1 -0
  37. package/dist/Deploy/CredentialStore.js +59 -0
  38. package/dist/Deploy/CredentialStore.js.map +1 -0
  39. package/dist/Deploy/Deployer.d.ts +32 -0
  40. package/dist/Deploy/Deployer.d.ts.map +1 -0
  41. package/dist/Deploy/Deployer.js +88 -0
  42. package/dist/Deploy/Deployer.js.map +1 -0
  43. package/dist/Deploy/ProjectConfig.d.ts +26 -0
  44. package/dist/Deploy/ProjectConfig.d.ts.map +1 -0
  45. package/dist/Deploy/ProjectConfig.js +47 -0
  46. package/dist/Deploy/ProjectConfig.js.map +1 -0
  47. package/dist/Deploy/Provisioner.d.ts +47 -0
  48. package/dist/Deploy/Provisioner.d.ts.map +1 -0
  49. package/dist/Deploy/Provisioner.js +119 -0
  50. package/dist/Deploy/Provisioner.js.map +1 -0
  51. package/dist/Deploy/SSHConnection.d.ts +38 -0
  52. package/dist/Deploy/SSHConnection.d.ts.map +1 -0
  53. package/dist/Deploy/SSHConnection.js +82 -0
  54. package/dist/Deploy/SSHConnection.js.map +1 -0
  55. package/dist/Deploy/SymphonyClient.d.ts +158 -0
  56. package/dist/Deploy/SymphonyClient.d.ts.map +1 -0
  57. package/dist/Deploy/SymphonyClient.js +117 -0
  58. package/dist/Deploy/SymphonyClient.js.map +1 -0
  59. package/dist/Deploy/TarBuilder.d.ts +18 -0
  60. package/dist/Deploy/TarBuilder.d.ts.map +1 -0
  61. package/dist/Deploy/TarBuilder.js +52 -0
  62. package/dist/Deploy/TarBuilder.js.map +1 -0
  63. package/dist/Deploy/prompt.d.ts +10 -0
  64. package/dist/Deploy/prompt.d.ts.map +1 -0
  65. package/dist/Deploy/prompt.js +43 -0
  66. package/dist/Deploy/prompt.js.map +1 -0
  67. package/dist/index.d.ts +22 -0
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +36 -2
  70. package/dist/index.js.map +1 -1
  71. package/package.json +1 -1
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ /**
3
+ * DeployProvisionCommand
4
+ *
5
+ * Provision a fresh Ubuntu server for Orchestr deployments.
6
+ * Signature: deploy:provision
7
+ * Options: --host=<ip> --user=<root-user> --port=<port> --key=<path>
8
+ * --domain=<domain> --email=<email> --name=<project-name>
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.DeployProvisionCommand = void 0;
12
+ const Command_1 = require("../../Console/Command");
13
+ const Provisioner_1 = require("../../Deploy/Provisioner");
14
+ const prompt_1 = require("../../Deploy/prompt");
15
+ class DeployProvisionCommand extends Command_1.Command {
16
+ signature = 'deploy:provision';
17
+ description = 'Provision a fresh Ubuntu server for Orchestr deployments';
18
+ async handle(_args, options) {
19
+ this.info('Symphony — Server Provisioner');
20
+ this.newLine();
21
+ this.warn('This command will install software on a remote server.');
22
+ this.warn('Ensure you have root/sudo SSH access before continuing.');
23
+ this.newLine();
24
+ // Gather required inputs
25
+ const host = options.host ?? (await (0, prompt_1.prompt)('Server IP or hostname: '));
26
+ if (!host.trim()) {
27
+ this.error('Host is required.');
28
+ process.exit(1);
29
+ }
30
+ const rootUserRaw = options.user ?? (await (0, prompt_1.prompt)('SSH user [root]: '));
31
+ const rootUser = rootUserRaw || 'root';
32
+ const portRaw = options.port ?? (await (0, prompt_1.prompt)('SSH port [22]: '));
33
+ const portStr = portRaw || '22';
34
+ const port = parseInt(portStr, 10) || 22;
35
+ const keyPath = options.key ?? undefined;
36
+ const domainRaw = options.domain ?? (await (0, prompt_1.prompt)('Domain name (optional, for SSL): '));
37
+ const domain = domainRaw || undefined;
38
+ const certEmailRaw = domain ? (options.email ?? (await (0, prompt_1.prompt)('Email for SSL certificate: '))) : undefined;
39
+ const certEmail = certEmailRaw || undefined;
40
+ const projectNameRaw = options.name ?? (await (0, prompt_1.prompt)('Project name [app]: '));
41
+ const projectName = projectNameRaw || 'app';
42
+ const provisioner = new Provisioner_1.Provisioner({
43
+ host: host.trim(),
44
+ port,
45
+ rootUser: rootUser.trim(),
46
+ keyPath: keyPath?.trim(),
47
+ domain: domain?.trim(),
48
+ email: certEmail?.trim(),
49
+ projectName: projectName.trim(),
50
+ });
51
+ // Test connectivity first
52
+ this.comment('Testing SSH connection...');
53
+ if (!provisioner.testConnection()) {
54
+ this.error('Cannot connect to server. Check host, port, and SSH key.');
55
+ process.exit(1);
56
+ }
57
+ this.info('Connection successful.');
58
+ this.newLine();
59
+ const confirm = await (0, prompt_1.prompt)('Proceed with provisioning? (y/N): ');
60
+ if (confirm.toLowerCase() !== 'y') {
61
+ this.comment('Provisioning cancelled.');
62
+ return;
63
+ }
64
+ this.newLine();
65
+ this.info('Provisioning server...');
66
+ this.newLine();
67
+ try {
68
+ await provisioner.provision((step) => {
69
+ this.comment(` ▶ ${step}`);
70
+ });
71
+ this.newLine();
72
+ this.info('Server provisioned successfully.');
73
+ this.newLine();
74
+ this.comment('What was installed:');
75
+ this.comment(' ✓ Node.js 22');
76
+ this.comment(' ✓ PM2 (process manager)');
77
+ this.comment(' ✓ Nginx (reverse proxy → port 3000)');
78
+ if (domain) {
79
+ this.comment(` ✓ SSL certificate for ${domain}`);
80
+ }
81
+ this.comment(' ✓ orchestr user + directory structure');
82
+ this.comment(' ✓ UFW firewall (22, 80, 443)');
83
+ this.newLine();
84
+ this.comment('Next steps:');
85
+ this.comment(` 1. Add an SSH key for the orchestr user`);
86
+ this.comment(` 2. orchestr deploy:server add --host=${host.trim()} --user=orchestr --name=${projectName.trim()}`);
87
+ this.comment(` 3. orchestr deploy`);
88
+ }
89
+ catch (error) {
90
+ this.error(`Provisioning failed: ${error.message}`);
91
+ process.exit(1);
92
+ }
93
+ }
94
+ }
95
+ exports.DeployProvisionCommand = DeployProvisionCommand;
96
+ //# sourceMappingURL=DeployProvisionCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployProvisionCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/DeployProvisionCommand.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,+CAA4D;AAC5D,sDAAmD;AACnD,4CAAyC;AAEzC,MAAa,sBAAuB,SAAQ,iBAAO;IACjD,SAAS,GAAG,kBAAkB,CAAC;IAC/B,WAAW,GAAG,0DAA0D,CAAC;IAEzE,KAAK,CAAC,MAAM,CAAC,KAAe,EAAE,OAAuB;QACnD,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;QACrE,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,yBAAyB;QACzB,MAAM,IAAI,GAAW,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,IAAA,eAAM,EAAC,yBAAyB,CAAC,CAAC,CAAC;QAC/E,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YACjB,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YAChC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAC,CAAC;QACxE,MAAM,QAAQ,GAAW,WAAW,IAAI,MAAM,CAAC;QAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,MAAM,IAAA,eAAM,EAAC,iBAAiB,C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Aa,CAAC,CAAC;YAC5B,IAAI,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC;YAC1D,IAAI,CAAC,OAAO,CACV,0CAA0C,IAAI,CAAC,IAAI,EAAE,2BAA2B,WAAW,CAAC,IAAI,EAAE,EAAE,CACrG,CAAC;YACF,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,CAAC,KAAK,CAAC,wBAAwB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AAzFD,wDAyFC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * DeployRollbackCommand
3
+ *
4
+ * Roll back the current project to its previous active deployment.
5
+ * Signature: deploy:rollback
6
+ */
7
+ import { Command, CommandOptions } from '../../Console/Command';
8
+ export declare class DeployRollbackCommand extends Command {
9
+ signature: string;
10
+ description: string;
11
+ handle(_args: string[], options: CommandOptions): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=DeployRollbackCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployRollbackCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/DeployRollbackCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAM5D,qBAAa,qBAAsB,SAAQ,OAAO;IAChD,SAAS,SAAqB;IAC9B,WAAW,SAAiD;IAEtD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CA6CtE"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /**
3
+ * DeployRollbackCommand
4
+ *
5
+ * Roll back the current project to its previous active deployment.
6
+ * Signature: deploy:rollback
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DeployRollbackCommand = void 0;
10
+ const Command_1 = require("../../Console/Command");
11
+ const CredentialStore_1 = require("../../Deploy/CredentialStore");
12
+ const ProjectConfig_1 = require("../../Deploy/ProjectConfig");
13
+ const SymphonyClient_1 = require("../../Deploy/SymphonyClient");
14
+ const prompt_1 = require("../../Deploy/prompt");
15
+ class DeployRollbackCommand extends Command_1.Command {
16
+ signature = 'deploy:rollback';
17
+ description = 'Roll back to the previous active deployment';
18
+ async handle(_args, options) {
19
+ const credentials = CredentialStore_1.CredentialStore.load();
20
+ if (!credentials) {
21
+ this.error('Not authenticated. Run `orchestr deploy:login` first.');
22
+ process.exit(1);
23
+ }
24
+ const config = ProjectConfig_1.ProjectConfig.load();
25
+ if (!config) {
26
+ this.error('No symphony.json found. Run `orchestr deploy:init` first.');
27
+ process.exit(1);
28
+ }
29
+ const client = new SymphonyClient_1.SymphonyClient(credentials.api, credentials.token);
30
+ // Confirm unless --force
31
+ if (!options.force) {
32
+ this.warn(`You are about to roll back project "${config.project}".`);
33
+ const confirm = await (0, prompt_1.prompt)('Are you sure? (y/N): ');
34
+ if (confirm.toLowerCase() !== 'y') {
35
+ this.comment('Rollback cancelled.');
36
+ return;
37
+ }
38
+ }
39
+ try {
40
+ this.comment('Initiating rollback...');
41
+ const result = await client.rollback(config.project);
42
+ this.newLine();
43
+ this.info('Rollback successful.');
44
+ this.comment(` Rolled back: ${result.rolled_back.uuid}`);
45
+ this.comment(` Restored: ${result.restored.uuid}`);
46
+ this.newLine();
47
+ this.warn('Note: The API record has been updated. If PM2 is running the old release,');
48
+ this.warn('you may need to SSH in and re-symlink the release manually, or redeploy.');
49
+ }
50
+ catch (error) {
51
+ if (error.status === 400) {
52
+ this.error(error.message);
53
+ }
54
+ else {
55
+ this.error(`Rollback failed: ${error.message}`);
56
+ }
57
+ process.exit(1);
58
+ }
59
+ }
60
+ }
61
+ exports.DeployRollbackCommand = DeployRollbackCommand;
62
+ //# sourceMappingURL=DeployRollbackCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployRollbackCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/DeployRollbackCommand.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+CAA4D;AAC5D,8DAA2D;AAC3D,0DAAuD;AACvD,4DAAyD;AACzD,4CAAyC;AAEzC,MAAa,qBAAsB,SAAQ,iBAAO;IAChD,SAAS,GAAG,iBAAiB,CAAC;IAC9B,WAAW,GAAG,6CAA6C,CAAC;IAE5D,KAAK,CAAC,MAAM,CAAC,KAAe,EAAE,OAAuB;QACnD,MAAM,WAAW,GAAG,iCAAe,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,IAAI,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,6BAAa,CAAC,IAAI,EAAE,CAAC;QACpC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,IAAI,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,+BAAc,CAAC,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;QAEtE,yBAAyB;QACzB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,uCAAuC,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC;YACrE,MAAM,OAAO,GAAG,MAAM,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAC;YACtD,IAAI,OAAO,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;gBAClC,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;gBACpC,OAAO;YACT,CAAC;QACH,CAAC;QAED,IAAI,CAAC;YACH,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;YACvC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAErD,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YAClC,IAAI,CAAC,OAAO,CAAC,kBAAkB,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1D,IAAI,CAAC,OAAO,CAAC,kBAAkB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YACvD,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,CAAC,2EAA2E,CAAC,CAAC;YACvF,IAAI,CAAC,IAAI,CAAC,0EAA0E,CAAC,CAAC;QACxF,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACzB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5B,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,KAAK,CAAC,oBAAoB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAClD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AAjDD,sDAiDC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * DeployServerCommand
3
+ *
4
+ * Manage servers for the current project.
5
+ * Signature: deploy:server <action>
6
+ * Actions: add, list, remove
7
+ * Options: --host=<host> --user=<user> --port=<port> --name=<name>
8
+ */
9
+ import { Command, CommandOptions } from '../../Console/Command';
10
+ export declare class DeployServerCommand extends Command {
11
+ signature: string;
12
+ description: string;
13
+ handle(args: string[], options: CommandOptions): Promise<void>;
14
+ private add;
15
+ private list;
16
+ private remove;
17
+ }
18
+ //# sourceMappingURL=DeployServerCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployServerCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/DeployServerCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAM5D,qBAAa,mBAAoB,SAAQ,OAAO;IAC9C,SAAS,SAA4B;IACrC,WAAW,SAAgE;IAErE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;YAmCtD,GAAG;YAoCH,IAAI;YA6BJ,MAAM;CAyBrB"}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ /**
3
+ * DeployServerCommand
4
+ *
5
+ * Manage servers for the current project.
6
+ * Signature: deploy:server <action>
7
+ * Actions: add, list, remove
8
+ * Options: --host=<host> --user=<user> --port=<port> --name=<name>
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.DeployServerCommand = void 0;
12
+ const Command_1 = require("../../Console/Command");
13
+ const CredentialStore_1 = require("../../Deploy/CredentialStore");
14
+ const ProjectConfig_1 = require("../../Deploy/ProjectConfig");
15
+ const SymphonyClient_1 = require("../../Deploy/SymphonyClient");
16
+ const prompt_1 = require("../../Deploy/prompt");
17
+ class DeployServerCommand extends Command_1.Command {
18
+ signature = 'deploy:server <action>';
19
+ description = 'Manage servers for the current project (add, list, remove)';
20
+ async handle(args, options) {
21
+ const action = args[0];
22
+ if (!action || !['add', 'list', 'remove'].includes(action)) {
23
+ this.error('Usage: orchestr deploy:server <add|list|remove>');
24
+ process.exit(1);
25
+ }
26
+ const credentials = CredentialStore_1.CredentialStore.load();
27
+ if (!credentials) {
28
+ this.error('Not authenticated. Run `orchestr deploy:login` first.');
29
+ process.exit(1);
30
+ }
31
+ const config = ProjectConfig_1.ProjectConfig.load();
32
+ if (!config) {
33
+ this.error('No symphony.json found. Run `orchestr deploy:init` first.');
34
+ process.exit(1);
35
+ }
36
+ const client = new SymphonyClient_1.SymphonyClient(credentials.api, credentials.token);
37
+ switch (action) {
38
+ case 'add':
39
+ await this.add(client, config.project, options);
40
+ break;
41
+ case 'list':
42
+ await this.list(client, config.project);
43
+ break;
44
+ case 'remove':
45
+ await this.remove(client, config.project, options);
46
+ break;
47
+ }
48
+ }
49
+ async add(client, slug, options) {
50
+ const name = options.name ?? (await (0, prompt_1.prompt)('Server name: '));
51
+ const host = options.host ?? (await (0, prompt_1.prompt)('Host (IP or hostname): '));
52
+ const sshUserRaw = options.user ?? (await (0, prompt_1.prompt)('SSH user [orchestr]: '));
53
+ const sshUser = sshUserRaw || 'orchestr';
54
+ const portRaw = options.port ?? (await (0, prompt_1.prompt)('SSH port [22]: '));
55
+ const portStr = portRaw || '22';
56
+ const port = parseInt(portStr, 10) || 22;
57
+ const deployPathRaw = options['deploy-path'] ?? (await (0, prompt_1.prompt)('Deploy path [/home/orchestr]: '));
58
+ const deployPath = deployPathRaw || '/home/orchestr';
59
+ if (!name.trim() || !host.trim()) {
60
+ this.error('Server name and host are required.');
61
+ process.exit(1);
62
+ }
63
+ try {
64
+ const result = await client.addServer(slug, {
65
+ name: name.trim(),
66
+ host: host.trim(),
67
+ port,
68
+ ssh_user: sshUser.trim(),
69
+ deploy_path: deployPath.trim(),
70
+ });
71
+ this.newLine();
72
+ this.info(`Server "${result.server.name}" added (ID: ${result.server.id})`);
73
+ this.comment(` Host: ${result.server.host}:${result.server.port}`);
74
+ this.comment(` User: ${result.server.ssh_user}`);
75
+ this.comment(` Path: ${result.server.deploy_path}`);
76
+ }
77
+ catch (error) {
78
+ this.error(`Failed to add server: ${error.message}`);
79
+ process.exit(1);
80
+ }
81
+ }
82
+ async list(client, slug) {
83
+ try {
84
+ const result = await client.listServers(slug);
85
+ if (result.servers.length === 0) {
86
+ this.comment('No servers configured. Use `orchestr deploy:server add` to add one.');
87
+ return;
88
+ }
89
+ this.info(`Servers for project: ${slug}`);
90
+ this.newLine();
91
+ const rows = result.servers.map((s) => [
92
+ s.id.toString(),
93
+ s.name,
94
+ `${s.host}:${s.port}`,
95
+ s.ssh_user,
96
+ s.deploy_path,
97
+ s.status ?? 'unknown',
98
+ s.last_deployed_at ? new Date(s.last_deployed_at).toLocaleString() : 'never',
99
+ ]);
100
+ this.table(['ID', 'Name', 'Host', 'User', 'Deploy Path', 'Status', 'Last Deployed'], rows);
101
+ }
102
+ catch (error) {
103
+ this.error(`Failed to list servers: ${error.message}`);
104
+ process.exit(1);
105
+ }
106
+ }
107
+ async remove(client, slug, options) {
108
+ const nameOrId = options.name ?? options.id ?? (await (0, prompt_1.prompt)('Server name or ID: '));
109
+ if (!nameOrId.trim()) {
110
+ this.error('Server name or ID is required.');
111
+ process.exit(1);
112
+ }
113
+ try {
114
+ // Fetch servers to resolve name → id
115
+ const result = await client.listServers(slug);
116
+ const server = result.servers.find((s) => s.name === nameOrId.trim() || s.id.toString() === nameOrId.trim());
117
+ if (!server) {
118
+ this.error(`Server "${nameOrId}" not found.`);
119
+ process.exit(1);
120
+ }
121
+ await client.deleteServer(slug, server.id);
122
+ this.info(`Server "${server.name}" removed.`);
123
+ }
124
+ catch (error) {
125
+ this.error(`Failed to remove server: ${error.message}`);
126
+ process.exit(1);
127
+ }
128
+ }
129
+ }
130
+ exports.DeployServerCommand = DeployServerCommand;
131
+ //# sourceMappingURL=DeployServerCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployServerCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/DeployServerCommand.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,+CAA4D;AAC5D,8DAA2D;AAC3D,0DAAuD;AACvD,4DAAyD;AACzD,4CAAyC;AAEzC,MAAa,mBAAoB,SAAQ,iBAAO;IAC9C,SAAS,GAAG,wBAAwB,CAAC;IACrC,WAAW,GAAG,4DAA4D,CAAC;IAE3E,KAAK,CAAC,MAAM,CAAC,IAAc,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AE,IAAI,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YAE7G,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,IAAI,CAAC,KAAK,CAAC,WAAW,QAAQ,cAAc,CAAC,CAAC;gBAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YAED,MAAM,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,IAAI,YAAY,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,CAAC,KAAK,CAAC,4BAA4B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AAjID,kDAiIC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * DeployStatusCommand
3
+ *
4
+ * List recent deployments for the current project.
5
+ * Signature: deploy:status
6
+ * Options: --limit=<n>
7
+ */
8
+ import { Command, CommandOptions } from '../../Console/Command';
9
+ export declare class DeployStatusCommand extends Command {
10
+ signature: string;
11
+ description: string;
12
+ handle(_args: string[], options: CommandOptions): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=DeployStatusCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployStatusCommand.d.ts","sourceRoot":"","sources":["../../../src/Console/Commands/DeployStatusCommand.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgB5D,qBAAa,mBAAoB,SAAQ,OAAO;IAC9C,SAAS,SAAmB;IAC5B,WAAW,SAAqD;IAE1D,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAiDtE"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /**
3
+ * DeployStatusCommand
4
+ *
5
+ * List recent deployments for the current project.
6
+ * Signature: deploy:status
7
+ * Options: --limit=<n>
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.DeployStatusCommand = void 0;
11
+ const Command_1 = require("../../Console/Command");
12
+ const CredentialStore_1 = require("../../Deploy/CredentialStore");
13
+ const ProjectConfig_1 = require("../../Deploy/ProjectConfig");
14
+ const SymphonyClient_1 = require("../../Deploy/SymphonyClient");
15
+ const STATUS_COLORS = {
16
+ active: '\x1b[32m', // green
17
+ failed: '\x1b[31m', // red
18
+ rolled_back: '\x1b[33m', // yellow
19
+ pending: '\x1b[90m', // grey
20
+ building: '\x1b[36m', // cyan
21
+ uploading: '\x1b[36m',
22
+ deploying: '\x1b[36m',
23
+ };
24
+ const RESET = '\x1b[0m';
25
+ class DeployStatusCommand extends Command_1.Command {
26
+ signature = 'deploy:status';
27
+ description = 'Show recent deployments for the current project';
28
+ async handle(_args, options) {
29
+ const credentials = CredentialStore_1.CredentialStore.load();
30
+ if (!credentials) {
31
+ this.error('Not authenticated. Run `orchestr deploy:login` first.');
32
+ process.exit(1);
33
+ }
34
+ const config = ProjectConfig_1.ProjectConfig.load();
35
+ if (!config) {
36
+ this.error('No symphony.json found. Run `orchestr deploy:init` first.');
37
+ process.exit(1);
38
+ }
39
+ const limit = parseInt(options.limit ?? '10', 10);
40
+ const client = new SymphonyClient_1.SymphonyClient(credentials.api, credentials.token);
41
+ try {
42
+ const result = await client.listDeployments(config.project, 1, limit);
43
+ const { deployments, pagination } = result;
44
+ if (deployments.length === 0) {
45
+ this.comment('No deployments yet.');
46
+ return;
47
+ }
48
+ this.info(`Deployments for project: ${config.project}`);
49
+ this.newLine();
50
+ // Header
51
+ this.line(` ${'UUID'.padEnd(10)} ${'Status'.padEnd(14)} ${'Date'.padEnd(22)} ${'Commit'.padEnd(10)} Message`);
52
+ this.line(` ${'-'.repeat(80)}`);
53
+ for (const d of deployments) {
54
+ const status = d.status ?? 'unknown';
55
+ const color = STATUS_COLORS[status] ?? '';
56
+ const coloredStatus = `${color}${status.padEnd(12)}${RESET}`;
57
+ const date = new Date(d.created_at).toLocaleString().padEnd(22);
58
+ const hash = (d.commit_hash ?? '-').padEnd(10);
59
+ const msg = d.commit_message ? d.commit_message.slice(0, 35) + (d.commit_message.length > 35 ? '…' : '') : '-';
60
+ this.line(` ${d.uuid.slice(0, 8).padEnd(10)} ${coloredStatus} ${date} ${hash} ${msg}`);
61
+ }
62
+ this.newLine();
63
+ this.comment(`Showing ${deployments.length} of ${pagination.total} deployments.`);
64
+ }
65
+ catch (error) {
66
+ this.error(`Failed to fetch deployments: ${error.message}`);
67
+ process.exit(1);
68
+ }
69
+ }
70
+ }
71
+ exports.DeployStatusCommand = DeployStatusCommand;
72
+ //# sourceMappingURL=DeployStatusCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeployStatusCommand.js","sourceRoot":"","sources":["../../../src/Console/Commands/DeployStatusCommand.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAA4D;AAC5D,8DAA2D;AAC3D,0DAAuD;AACvD,4DAAyD;AAEzD,MAAM,aAAa,GAA2B;IAC5C,MAAM,EAAE,UAAU,EAAE,QAAQ;IAC5B,MAAM,EAAE,UAAU,EAAE,MAAM;IAC1B,WAAW,EAAE,UAAU,EAAE,SAAS;IAClC,OAAO,EAAE,UAAU,EAAE,OAAO;IAC5B,QAAQ,EAAE,UAAU,EAAE,OAAO;IAC7B,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,UAAU;CACtB,CAAC;AACF,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,MAAa,mBAAoB,SAAQ,iBAAO;IAC9C,SAAS,GAAG,eAAe,CAAC;IAC5B,WAAW,GAAG,iDAAiD,CAAC;IAEhE,KAAK,CAAC,MAAM,CAAC,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CAAC;QACpF,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,IAAI,CAAC,KAAK,CAAC,gCAAgC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF;AArDD,kDAqDC"}
@@ -23,6 +23,14 @@ const MakeControllerCommand_1 = require("./Commands/MakeControllerCommand");
23
23
  const EventListCommand_1 = require("./Commands/EventListCommand");
24
24
  const EventCacheCommand_1 = require("./Commands/EventCacheCommand");
25
25
  const EventClearCommand_1 = require("./Commands/EventClearCommand");
26
+ const DeployLoginCommand_1 = require("./Commands/DeployLoginCommand");
27
+ const DeployInitCommand_1 = require("./Commands/DeployInitCommand");
28
+ const DeployServerCommand_1 = require("./Commands/DeployServerCommand");
29
+ const DeployCommand_1 = require("./Commands/DeployCommand");
30
+ const DeployStatusCommand_1 = require("./Commands/DeployStatusCommand");
31
+ const DeployEnvCommand_1 = require("./Commands/DeployEnvCommand");
32
+ const DeployRollbackCommand_1 = require("./Commands/DeployRollbackCommand");
33
+ const DeployProvisionCommand_1 = require("./Commands/DeployProvisionCommand");
26
34
  // Create application instance
27
35
  const app = new Application_1.Application();
28
36
  // Create console kernel
@@ -45,6 +53,15 @@ class OrchestrKernel extends ConsoleKernel_1.ConsoleKernel {
45
53
  new EventListCommand_1.EventListCommand(this.app),
46
54
  new EventCacheCommand_1.EventCacheCommand(this.app),
47
55
  new EventClearCommand_1.EventClearCommand(this.app),
56
+ // Deploy commands
57
+ new DeployLoginCommand_1.DeployLoginCommand(),
58
+ new DeployInitCommand_1.DeployInitCommand(),
59
+ new DeployServerCommand_1.DeployServerCommand(),
60
+ new DeployCommand_1.DeployCommand(),
61
+ new DeployStatusCommand_1.DeployStatusCommand(),
62
+ new DeployEnvCommand_1.DeployEnvCommand(),
63
+ new DeployRollbackCommand_1.DeployRollbackCommand(),
64
+ new DeployProvisionCommand_1.DeployProvisionCommand(),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I,yCAAmB,CAAC,IAAI,CAAC,GAAG,CAAC;YACjC,IAAI,2CAAoB,CAAC,IAAI,CAAC,GAAG,CAAC;YAClC,IAAI,2CAAoB,CAAC,IAAI,CAAC,GAAG,CAAC;YAClC,IAAI,yBAAW,CAAC,IAAI,CAAC,GAAG,CAAC;YACzB,IAAI,qCAAiB,CAAC,IAAI,CAAC,GAAG,CAAC;YAC/B,IAAI,mCAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;YAC9B,IAAI,yCAAmB,CAAC,IAAI,CAAC,GAAG,CAAC;YACjC,IAAI,6CAAqB,CAAC,IAAI,CAAC,GAAG,CAAC;YACnC,IAAI,mCAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;YAC9B,IAAI,qCAAiB,CAAC,IAAI,CAAC,GAAG,CAAC;YAC/B,IAAI,qCAAiB,CAAC,IAAI,CAAC,GAAG,CAAC;YAC/B,kBAAkB;YAClB,IAAI,uCAAkB,EAAE;YACxB,IAAI,qCAAiB,EAAE;YACvB,IAAI,yCAAmB,EAAE;YACzB,IAAI,6BAAa,EAAE;YACnB,IAAI,yCAAmB,EAAE;YACzB,IAAI,mCAAgB,EAAE;YACtB,IAAI,6CAAqB,EAAE;YAC3B,IAAI,+CAAsB,EAAE;SAC7B,CAAC,CAAC;IACL,CAAC;CACF;AAED,cAAc;AACd,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC3B,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * CredentialStore
3
+ *
4
+ * Manages ~/.orchestr/credentials (JSON, 0600 permissions)
5
+ */
6
+ export interface Credentials {
7
+ token: string;
8
+ email: string;
9
+ api: string;
10
+ }
11
+ export declare class CredentialStore {
12
+ private static readonly DIR;
13
+ private static readonly FILE;
14
+ /**
15
+ * Load credentials from disk. Returns null if not found.
16
+ */
17
+ static load(): Credentials | null;
18
+ /**
19
+ * Save credentials to disk with 0600 permissions.
20
+ */
21
+ static save(credentials: Credentials): void;
22
+ /**
23
+ * Remove credentials from disk.
24
+ */
25
+ static clear(): void;
26
+ /**
27
+ * Check if credentials are stored.
28
+ */
29
+ static exists(): boolean;
30
+ }
31
+ //# sourceMappingURL=CredentialStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialStore.d.ts","sourceRoot":"","sources":["../../src/Deploy/CredentialStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAgC;IAC3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAA4C;IAExE;;OAEG;IACH,MAAM,CAAC,IAAI,IAAI,WAAW,GAAG,IAAI;IAajC;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAW3C;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,IAAI;IAOpB;;OAEG;IACH,MAAM,CAAC,MAAM,IAAI,OAAO;CAGzB"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /**
3
+ * CredentialStore
4
+ *
5
+ * Manages ~/.orchestr/credentials (JSON, 0600 permissions)
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CredentialStore = void 0;
9
+ const fs_1 = require("fs");
10
+ const os_1 = require("os");
11
+ const path_1 = require("path");
12
+ class CredentialStore {
13
+ static DIR = (0, path_1.join)((0, os_1.homedir)(), '.orchestr');
14
+ static FILE = (0, path_1.join)(CredentialStore.DIR, 'credentials');
15
+ /**
16
+ * Load credentials from disk. Returns null if not found.
17
+ */
18
+ static load() {
19
+ if (!(0, fs_1.existsSync)(this.FILE)) {
20
+ return null;
21
+ }
22
+ try {
23
+ const raw = (0, fs_1.readFileSync)(this.FILE, 'utf-8');
24
+ return JSON.parse(raw);
25
+ }
26
+ catch {
27
+ return null;
28
+ }
29
+ }
30
+ /**
31
+ * Save credentials to disk with 0600 permissions.
32
+ */
33
+ static save(credentials) {
34
+ if (!(0, fs_1.existsSync)(this.DIR)) {
35
+ (0, fs_1.mkdirSync)(this.DIR, { recursive: true, mode: 0o700 });
36
+ }
37
+ (0, fs_1.writeFileSync)(this.FILE, JSON.stringify(credentials, null, 2), {
38
+ encoding: 'utf-8',
39
+ mode: 0o600,
40
+ });
41
+ }
42
+ /**
43
+ * Remove credentials from disk.
44
+ */
45
+ static clear() {
46
+ if ((0, fs_1.existsSync)(this.FILE)) {
47
+ const { unlinkSync } = require('fs');
48
+ unlinkSync(this.FILE);
49
+ }
50
+ }
51
+ /**
52
+ * Check if credentials are stored.
53
+ */
54
+ static exists() {
55
+ return (0, fs_1.existsSync)(this.FILE);
56
+ }
57
+ }
58
+ exports.CredentialStore = CredentialStore;
59
+ //# sourceMappingURL=CredentialStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CredentialStore.js","sourceRoot":"","sources":["../../src/Deploy/CredentialStore.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,2BAAwE;AACxE,2BAA6B;AAC7B,+BAA4B;AAQ5B,MAAa,eAAe;IAClB,MAAM,CAAU,GAAG,GAAG,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,WAAW,CAAC,CAAC;IACnD,MAAM,CAAU,IAAI,GAAG,IAAA,WAAI,EAAC,eAAe,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IAExE;;OAEG;IACH,MAAM,CAAC,IAAI;QACT,IAAI,CAAC,IAAA,eAAU,EAAC,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
+ */
7
+ import { SymphonyClient } from './SymphonyClient';
8
+ export interface ServerConfig {
9
+ id: number;
10
+ name: string;
11
+ host: string;
12
+ port: number;
13
+ ssh_user: string;
14
+ deploy_path: string;
15
+ }
16
+ export interface DeployOptions {
17
+ projectSlug: string;
18
+ tarPath: string;
19
+ timestamp: string;
20
+ deploymentUuid: string;
21
+ keyPath?: string;
22
+ migrate?: boolean;
23
+ }
24
+ export declare class Deployer {
25
+ private readonly client;
26
+ constructor(client: SymphonyClient);
27
+ /**
28
+ * Deploy to a single server. Returns log output.
29
+ */
30
+ deployToServer(server: ServerConfig, options: DeployOptions): Promise<string>;
31
+ }
32
+ //# sourceMappingURL=Deployer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Deployer.d.ts","sourceRoot":"","sources":["../../src/Deploy/Deployer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAEnD;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;CAyFpF"}