@ossy/deployment-tools 0.0.39 → 0.0.41

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 (78) hide show
  1. package/bin/aws-credentials-client.d.ts +2 -2
  2. package/bin/caddy-client.d.ts +3 -3
  3. package/bin/ci-rest-api.d.ts +2 -2
  4. package/bin/deployment-queue-client.d.ts +4 -4
  5. package/bin/docker-client.d.ts +4 -4
  6. package/bin/index.d.ts +3 -1
  7. package/bin/index.js +4 -4
  8. package/bin/index.js.map +1 -1
  9. package/bin/{dist/index.cli.d.ts → platform-cli.d.ts} +0 -0
  10. package/bin/platform-client.d.ts +13 -0
  11. package/bin/platform-config.d.ts +4 -0
  12. package/bin/platform-template.d.ts +5 -0
  13. package/bin/types/index.d.ts +2 -2
  14. package/{dist/dist/types/index.d.ts → bin/types.d.ts} +2 -2
  15. package/dist/aws-credentials-client.d.ts +2 -2
  16. package/dist/caddy-client.d.ts +3 -3
  17. package/dist/ci-rest-api.d.ts +2 -2
  18. package/dist/deployment-queue-client.d.ts +4 -4
  19. package/dist/docker-client.d.ts +4 -4
  20. package/dist/index.d.ts +3 -1
  21. package/dist/index.js +4 -4
  22. package/dist/index.js.map +1 -1
  23. package/dist/{dist/index.cli.d.ts → platform-cli.d.ts} +0 -0
  24. package/dist/platform-client.d.ts +13 -0
  25. package/dist/platform-config.d.ts +4 -0
  26. package/dist/platform-template.d.ts +5 -0
  27. package/dist/types/index.d.ts +2 -2
  28. package/{bin/dist/types/index.d.ts → dist/types.d.ts} +2 -2
  29. package/package.json +2 -2
  30. package/src/aws-credentials-client.ts +2 -2
  31. package/src/caddy-client.ts +10 -10
  32. package/src/ci-rest-api.ts +4 -4
  33. package/src/cli-commands/deploy-handler.ts +10 -10
  34. package/src/cli-commands/index.ts +1 -1
  35. package/src/cli-commands/start-handler.ts +4 -4
  36. package/src/cli-commands/status-handler.ts +2 -2
  37. package/src/cli-commands/stop-handler.ts +1 -1
  38. package/src/deployment-queue-client.ts +15 -15
  39. package/src/docker-client.ts +7 -7
  40. package/src/index.d.ts +2 -0
  41. package/src/index.ts +3 -1
  42. package/src/{index.cli.ts → platform-cli.ts} +0 -0
  43. package/src/platform-client.ts +102 -0
  44. package/src/platform-config.ts +36 -0
  45. package/src/platform-template.ts +31 -0
  46. package/src/{types/index.ts → types.ts} +2 -2
  47. package/tsconfig.json +1 -2
  48. package/bin/deployment-platform-client.d.ts +0 -11
  49. package/bin/dist/aws-credentials-client.d.ts +0 -4
  50. package/bin/dist/caddy-client.d.ts +0 -13
  51. package/bin/dist/ci-rest-api.d.ts +0 -4
  52. package/bin/dist/cli-commands/deploy-handler.d.ts +0 -1
  53. package/bin/dist/cli-commands/index.d.ts +0 -4
  54. package/bin/dist/cli-commands/start-handler.d.ts +0 -1
  55. package/bin/dist/cli-commands/status-handler.d.ts +0 -1
  56. package/bin/dist/cli-commands/stop-handler.d.ts +0 -1
  57. package/bin/dist/deployment-platform-client.d.ts +0 -11
  58. package/bin/dist/deployment-queue-client.d.ts +0 -7
  59. package/bin/dist/docker-client.d.ts +0 -8
  60. package/bin/dist/index.d.ts +0 -2
  61. package/bin/dist/log/index.d.ts +0 -3
  62. package/bin/index.cli.d.ts +0 -1
  63. package/dist/deployment-platform-client.d.ts +0 -11
  64. package/dist/dist/aws-credentials-client.d.ts +0 -4
  65. package/dist/dist/caddy-client.d.ts +0 -13
  66. package/dist/dist/ci-rest-api.d.ts +0 -4
  67. package/dist/dist/cli-commands/deploy-handler.d.ts +0 -1
  68. package/dist/dist/cli-commands/index.d.ts +0 -4
  69. package/dist/dist/cli-commands/start-handler.d.ts +0 -1
  70. package/dist/dist/cli-commands/status-handler.d.ts +0 -1
  71. package/dist/dist/cli-commands/stop-handler.d.ts +0 -1
  72. package/dist/dist/deployment-platform-client.d.ts +0 -11
  73. package/dist/dist/deployment-queue-client.d.ts +0 -7
  74. package/dist/dist/docker-client.d.ts +0 -8
  75. package/dist/dist/index.d.ts +0 -2
  76. package/dist/dist/log/index.d.ts +0 -3
  77. package/dist/index.cli.d.ts +0 -2
  78. package/src/deployment-platform-client.ts +0 -141
File without changes
@@ -0,0 +1,13 @@
1
+ import { SupportedEnvironments, DeploymentTemplate } from 'types';
2
+ export declare class PlatformClient {
3
+ static start(platformTemplatesFilePath: string): void;
4
+ static deploy({ username, authentication, targetEnvironment, pathToPlatformTemplates, pathToOssyFile }: {
5
+ username: any;
6
+ authentication: any;
7
+ targetEnvironment: any;
8
+ pathToPlatformTemplates: any;
9
+ pathToOssyFile: any;
10
+ }): Promise<void>;
11
+ static getDeploymentTemplates(pathToOssyFile: string): Promise<DeploymentTemplate[]>;
12
+ static getEnvironmentVariables(targetEnvironment: SupportedEnvironments, deploymentRequest: DeploymentTemplate): any;
13
+ }
@@ -0,0 +1,4 @@
1
+ import { PlatformConfig, PlatformTemplate } from 'types';
2
+ export declare class PlatformConfigService {
3
+ static from(template: PlatformTemplate): PlatformConfig;
4
+ }
@@ -0,0 +1,5 @@
1
+ import { PlatformTemplate } from 'types';
2
+ export declare class PlatformTemplateService {
3
+ static readFromFile(path: string): Promise<PlatformTemplate[]>;
4
+ static fakeValidateTemplate(obj: any): PlatformTemplate;
5
+ }
@@ -1,4 +1,4 @@
1
- export interface DeploymentPlatformTemplate {
1
+ export interface PlatformTemplate {
2
2
  platformName: string;
3
3
  domain: string;
4
4
  supportedDeploymentTypes: SupportedDeploymentTypes[];
@@ -13,7 +13,7 @@ export interface DeploymentPlatformTemplate {
13
13
  ciServerName?: string;
14
14
  ciDockerNetworkName?: string;
15
15
  }
16
- export interface DeploymentPlatform extends Required<Omit<DeploymentPlatformTemplate, 'awsRoleToAssume' | 'awsKeyPairName'>> {
16
+ export interface PlatformConfig extends Required<Omit<PlatformTemplate, 'awsRoleToAssume' | 'awsKeyPairName'>> {
17
17
  activeEnvironment: SupportedEnvironments;
18
18
  awsRoleToAssume?: string;
19
19
  awsKeyPairName?: string;
@@ -1,4 +1,4 @@
1
- export interface DeploymentPlatformTemplate {
1
+ export interface PlatformTemplate {
2
2
  platformName: string;
3
3
  domain: string;
4
4
  supportedDeploymentTypes: SupportedDeploymentTypes[];
@@ -13,7 +13,7 @@ export interface DeploymentPlatformTemplate {
13
13
  ciServerName?: string;
14
14
  ciDockerNetworkName?: string;
15
15
  }
16
- export interface DeploymentPlatform extends Required<Omit<DeploymentPlatformTemplate, 'awsRoleToAssume' | 'awsKeyPairName'>> {
16
+ export interface PlatformConfig extends Required<Omit<PlatformTemplate, 'awsRoleToAssume' | 'awsKeyPairName'>> {
17
17
  activeEnvironment: SupportedEnvironments;
18
18
  awsRoleToAssume?: string;
19
19
  awsKeyPairName?: string;
@@ -1,4 +1,4 @@
1
- import { DeploymentPlatform } from 'types';
1
+ import { PlatformConfig } from 'types';
2
2
  export declare class AwsCredentialsClient {
3
- static resolveAwsCredentials({ awsAccountId, awsRegion, awsRoleToAssume }: DeploymentPlatform): Promise<any>;
3
+ static resolveAwsCredentials({ awsAccountId, awsRegion, awsRoleToAssume }: PlatformConfig): Promise<any>;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
1
+ import { PlatformConfig, ContainerDeploymentRequest } from 'types';
2
2
  export declare const Matchers: {
3
3
  host: (host: any) => {
4
4
  host: any[];
@@ -8,6 +8,6 @@ export declare const Matchers: {
8
8
  };
9
9
  };
10
10
  export declare class CaddyClient {
11
- static deploy(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest): Promise<void | import("node-fetch").Response>;
12
- static applyDefaultServerConfig(deploymentPlatform: DeploymentPlatform): Promise<void | import("node-fetch").Response>;
11
+ static deploy(platformConfig: PlatformConfig, deploymentRequest: ContainerDeploymentRequest): Promise<void | import("node-fetch").Response>;
12
+ static applyDefaultServerConfig(platformConfig: PlatformConfig): Promise<void | import("node-fetch").Response>;
13
13
  }
@@ -1,4 +1,4 @@
1
- import { DeploymentPlatform } from 'types';
1
+ import { PlatformConfig } from 'types';
2
2
  export declare class CiRestApi {
3
- static start(deploymentPlatform: DeploymentPlatform): void;
3
+ static start(platformConfig: PlatformConfig): void;
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import { SQSClient } from '@aws-sdk/client-sqs';
2
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
2
+ import { PlatformConfig, ContainerDeploymentRequest } from 'types';
3
3
  export declare class DeploymentQueueClient {
4
- static sendDeploymentRequest(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest): Promise<void>;
5
- static pollForDeploymentRequests(deploymentPlatform: DeploymentPlatform, handleDeploymentRequest: (deploymentRequest: ContainerDeploymentRequest) => Promise<void>): void;
6
- static createAwsSqsClient(deploymentPlatform: DeploymentPlatform): Promise<SQSClient>;
4
+ static sendDeploymentRequest(platformConfig: PlatformConfig, deploymentRequest: ContainerDeploymentRequest): Promise<void>;
5
+ static pollForDeploymentRequests(platformConfig: PlatformConfig, handleDeploymentRequest: (deploymentRequest: ContainerDeploymentRequest) => Promise<void>): void;
6
+ static createAwsSqsClient(platformConfig: PlatformConfig): Promise<SQSClient>;
7
7
  }
@@ -1,8 +1,8 @@
1
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
1
+ import { PlatformConfig, ContainerDeploymentRequest } from 'types';
2
2
  export declare class DockerClient {
3
- static createDockerNetworkForContainerManagerServer(deploymentPlatform: DeploymentPlatform): void;
3
+ static createDockerNetworkForContainerManagerServer(platformConfig: PlatformConfig): void;
4
4
  static stopContainer(deploymentRequest: ContainerDeploymentRequest): string;
5
- static startContainer(deploymentPlatform: any, { image, containerPort, hostPort, registry, env }: ContainerDeploymentRequest): string;
5
+ static startContainer(platformConfig: PlatformConfig, { image, containerPort, hostPort, registry, env }: ContainerDeploymentRequest): string;
6
6
  static resolveCredentials({ registry, username, authentication }: ContainerDeploymentRequest): string;
7
- static deploy(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest): Promise<void>;
7
+ static deploy(platformConfig: PlatformConfig, deploymentRequest: ContainerDeploymentRequest): Promise<void>;
8
8
  }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
- export { DeploymentPlatformClient } from 'deployment-platform-client';
2
1
  export * from 'types';
2
+ export { PlatformClient } from 'platform-client';
3
+ export { PlatformTemplateService } from 'platform-template';
4
+ export { PlatformConfigService } from 'platform-config';