@ossy/deployment-tools 0.0.40 → 0.0.42

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 (97) hide show
  1. package/package.json +6 -10
  2. package/src/{aws-credentials-client.ts → aws-credentials-client.js} +8 -9
  3. package/src/{caddy-client.ts → caddy-client.js} +13 -14
  4. package/src/{ci-rest-api.ts → ci-rest-api.js} +4 -5
  5. package/src/cli-commands/deploy-handler.js +32 -0
  6. package/src/cli-commands/{index.ts → index.js} +5 -5
  7. package/src/cli-commands/{start-handler.ts → start-handler.js} +5 -5
  8. package/src/cli-commands/{status-handler.ts → status-handler.js} +2 -2
  9. package/src/cli-commands/{stop-handler.ts → stop-handler.js} +1 -1
  10. package/src/{deployment-queue-client.ts → deployment-queue-client.js} +17 -18
  11. package/src/{docker-client.ts → docker-client.js} +18 -19
  12. package/src/index.js +3 -0
  13. package/src/{log/index.ts → log.js} +11 -11
  14. package/src/{index.cli.ts → platform-cli.js} +1 -1
  15. package/src/platform-client.js +95 -0
  16. package/src/platform-config.js +34 -0
  17. package/src/platform-template.js +63 -0
  18. package/src/types.js +65 -0
  19. package/bin/619.index.js +0 -452
  20. package/bin/619.index.js.map +0 -1
  21. package/bin/aws-credentials-client.d.ts +0 -4
  22. package/bin/caddy-client.d.ts +0 -13
  23. package/bin/ci-rest-api.d.ts +0 -4
  24. package/bin/cli-commands/deploy-handler.d.ts +0 -1
  25. package/bin/cli-commands/index.d.ts +0 -4
  26. package/bin/cli-commands/start-handler.d.ts +0 -1
  27. package/bin/cli-commands/status-handler.d.ts +0 -1
  28. package/bin/cli-commands/stop-handler.d.ts +0 -1
  29. package/bin/deployment-platform-client.d.ts +0 -11
  30. package/bin/deployment-queue-client.d.ts +0 -7
  31. package/bin/dist/aws-credentials-client.d.ts +0 -4
  32. package/bin/dist/caddy-client.d.ts +0 -13
  33. package/bin/dist/ci-rest-api.d.ts +0 -4
  34. package/bin/dist/cli-commands/deploy-handler.d.ts +0 -1
  35. package/bin/dist/cli-commands/index.d.ts +0 -4
  36. package/bin/dist/cli-commands/start-handler.d.ts +0 -1
  37. package/bin/dist/cli-commands/status-handler.d.ts +0 -1
  38. package/bin/dist/cli-commands/stop-handler.d.ts +0 -1
  39. package/bin/dist/deployment-platform-client.d.ts +0 -11
  40. package/bin/dist/deployment-queue-client.d.ts +0 -7
  41. package/bin/dist/docker-client.d.ts +0 -8
  42. package/bin/dist/index.cli.d.ts +0 -1
  43. package/bin/dist/index.d.ts +0 -2
  44. package/bin/dist/log/index.d.ts +0 -3
  45. package/bin/dist/types/index.d.ts +0 -65
  46. package/bin/docker-client.d.ts +0 -8
  47. package/bin/index.cli.d.ts +0 -1
  48. package/bin/index.d.ts +0 -2
  49. package/bin/index.js +0 -362
  50. package/bin/index.js.map +0 -1
  51. package/bin/licenses.txt +0 -23
  52. package/bin/log/index.d.ts +0 -3
  53. package/bin/package.json +0 -3
  54. package/bin/sourcemap-register.cjs +0 -1
  55. package/bin/types/index.d.ts +0 -65
  56. package/dist/619.index.js +0 -452
  57. package/dist/619.index.js.map +0 -1
  58. package/dist/aws-credentials-client.d.ts +0 -4
  59. package/dist/caddy-client.d.ts +0 -13
  60. package/dist/ci-rest-api.d.ts +0 -4
  61. package/dist/cli-commands/deploy-handler.d.ts +0 -1
  62. package/dist/cli-commands/index.d.ts +0 -4
  63. package/dist/cli-commands/start-handler.d.ts +0 -1
  64. package/dist/cli-commands/status-handler.d.ts +0 -1
  65. package/dist/cli-commands/stop-handler.d.ts +0 -1
  66. package/dist/deployment-platform-client.d.ts +0 -11
  67. package/dist/deployment-queue-client.d.ts +0 -7
  68. package/dist/dist/aws-credentials-client.d.ts +0 -4
  69. package/dist/dist/caddy-client.d.ts +0 -13
  70. package/dist/dist/ci-rest-api.d.ts +0 -4
  71. package/dist/dist/cli-commands/deploy-handler.d.ts +0 -1
  72. package/dist/dist/cli-commands/index.d.ts +0 -4
  73. package/dist/dist/cli-commands/start-handler.d.ts +0 -1
  74. package/dist/dist/cli-commands/status-handler.d.ts +0 -1
  75. package/dist/dist/cli-commands/stop-handler.d.ts +0 -1
  76. package/dist/dist/deployment-platform-client.d.ts +0 -11
  77. package/dist/dist/deployment-queue-client.d.ts +0 -7
  78. package/dist/dist/docker-client.d.ts +0 -8
  79. package/dist/dist/index.cli.d.ts +0 -2
  80. package/dist/dist/index.d.ts +0 -2
  81. package/dist/dist/log/index.d.ts +0 -3
  82. package/dist/dist/types/index.d.ts +0 -65
  83. package/dist/docker-client.d.ts +0 -8
  84. package/dist/index.cli.d.ts +0 -2
  85. package/dist/index.d.ts +0 -2
  86. package/dist/index.js +0 -361
  87. package/dist/index.js.map +0 -1
  88. package/dist/licenses.txt +0 -23
  89. package/dist/log/index.d.ts +0 -3
  90. package/dist/package.json +0 -3
  91. package/dist/sourcemap-register.cjs +0 -1
  92. package/dist/types/index.d.ts +0 -65
  93. package/src/cli-commands/deploy-handler.ts +0 -32
  94. package/src/deployment-platform-client.ts +0 -141
  95. package/src/index.ts +0 -2
  96. package/src/types/index.ts +0 -65
  97. package/tsconfig.json +0 -11
@@ -1,4 +0,0 @@
1
- import { DeploymentPlatform } from 'types';
2
- export declare class AwsCredentialsClient {
3
- static resolveAwsCredentials({ awsAccountId, awsRegion, awsRoleToAssume }: DeploymentPlatform): Promise<any>;
4
- }
@@ -1,13 +0,0 @@
1
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
2
- export declare const Matchers: {
3
- host: (host: any) => {
4
- host: any[];
5
- };
6
- path: (path: any) => {
7
- path: any[];
8
- };
9
- };
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>;
13
- }
@@ -1,4 +0,0 @@
1
- import { DeploymentPlatform } from 'types';
2
- export declare class CiRestApi {
3
- static start(deploymentPlatform: DeploymentPlatform): void;
4
- }
@@ -1 +0,0 @@
1
- export declare const deployHandler: (cliArgs: any) => void;
@@ -1,4 +0,0 @@
1
- export declare const runCliCommand: ({ name, args }: {
2
- name: any;
3
- args: any;
4
- }) => void;
@@ -1 +0,0 @@
1
- export declare const startHandler: (cliArgs: any) => void;
@@ -1 +0,0 @@
1
- export declare const statusHandler: () => void;
@@ -1 +0,0 @@
1
- export declare const stopHandler: () => void;
@@ -1,11 +0,0 @@
1
- import { DeploymentPlatform, SupportedEnvironments, DeploymentTemplate } from 'types';
2
- export declare class DeploymentPlatformClient {
3
- static start(pathToDeploymentPlatforms: string): void;
4
- static deploy(username: any, authentication: any, targetEnvironment: any, pathToDeploymentPlatforms: any, pathToOssyFile: any): Promise<void>;
5
- static getDeploymentTemplates(pathToOssyFile: string): Promise<DeploymentTemplate[]>;
6
- static getDeploymentPlatforms(pathToDeploymentPlatforms: string): Promise<DeploymentPlatform[]>;
7
- static getEnvironmentVariables(targetEnvironment: SupportedEnvironments, deploymentRequest: DeploymentTemplate): any;
8
- static resolveDeploymentPlatformValues(deploymentPlatform: DeploymentPlatform): DeploymentPlatform;
9
- static setDefaultDeploymentPlatformValues(deploymentPlatform: DeploymentPlatform): DeploymentPlatform;
10
- static setCalculatedDeploymentPlatformValues(deploymentPlatform: DeploymentPlatform): DeploymentPlatform;
11
- }
@@ -1,7 +0,0 @@
1
- import { SQSClient } from '@aws-sdk/client-sqs';
2
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
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>;
7
- }
@@ -1,4 +0,0 @@
1
- import { DeploymentPlatform } from 'types';
2
- export declare class AwsCredentialsClient {
3
- static resolveAwsCredentials({ awsAccountId, awsRegion, awsRoleToAssume }: DeploymentPlatform): Promise<any>;
4
- }
@@ -1,13 +0,0 @@
1
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
2
- export declare const Matchers: {
3
- host: (host: any) => {
4
- host: any[];
5
- };
6
- path: (path: any) => {
7
- path: any[];
8
- };
9
- };
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>;
13
- }
@@ -1,4 +0,0 @@
1
- import { DeploymentPlatform } from 'types';
2
- export declare class CiRestApi {
3
- static start(deploymentPlatform: DeploymentPlatform): void;
4
- }
@@ -1 +0,0 @@
1
- export declare const deployHandler: (cliArgs: any) => void;
@@ -1,4 +0,0 @@
1
- export declare const runCliCommand: ({ name, args }: {
2
- name: any;
3
- args: any;
4
- }) => void;
@@ -1 +0,0 @@
1
- export declare const startHandler: (cliArgs: any) => void;
@@ -1 +0,0 @@
1
- export declare const statusHandler: () => void;
@@ -1 +0,0 @@
1
- export declare const stopHandler: () => void;
@@ -1,11 +0,0 @@
1
- import { DeploymentPlatform, SupportedEnvironments, DeploymentTemplate } from 'types';
2
- export declare class DeploymentPlatformClient {
3
- static start(pathToDeploymentPlatforms: string): void;
4
- static deploy(username: any, authentication: any, targetEnvironment: any, pathToDeploymentPlatforms: any, pathToOssyFile: any): Promise<void>;
5
- static getDeploymentTemplates(pathToOssyFile: string): Promise<DeploymentTemplate[]>;
6
- static getDeploymentPlatforms(pathToDeploymentPlatforms: string): Promise<DeploymentPlatform[]>;
7
- static getEnvironmentVariables(targetEnvironment: SupportedEnvironments, deploymentRequest: DeploymentTemplate): any;
8
- static resolveDeploymentPlatformValues(deploymentPlatform: DeploymentPlatform): DeploymentPlatform;
9
- static setDefaultDeploymentPlatformValues(deploymentPlatform: DeploymentPlatform): DeploymentPlatform;
10
- static setCalculatedDeploymentPlatformValues(deploymentPlatform: DeploymentPlatform): DeploymentPlatform;
11
- }
@@ -1,7 +0,0 @@
1
- import { SQSClient } from '@aws-sdk/client-sqs';
2
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
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>;
7
- }
@@ -1,8 +0,0 @@
1
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
2
- export declare class DockerClient {
3
- static createDockerNetworkForContainerManagerServer(deploymentPlatform: DeploymentPlatform): void;
4
- static stopContainer(deploymentRequest: ContainerDeploymentRequest): string;
5
- static startContainer(deploymentPlatform: any, { image, containerPort, hostPort, registry, env }: ContainerDeploymentRequest): string;
6
- static resolveCredentials({ registry, username, authentication }: ContainerDeploymentRequest): string;
7
- static deploy(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest): Promise<void>;
8
- }
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,2 +0,0 @@
1
- export { DeploymentPlatformClient } from 'deployment-platform-client';
2
- export * from 'types';
@@ -1,3 +0,0 @@
1
- export declare const logInfo: (logInput: any) => void;
2
- export declare const logError: (logInput: any) => void;
3
- export declare const logDebug: (logInput: any) => void;
@@ -1,65 +0,0 @@
1
- export interface DeploymentPlatformTemplate {
2
- platformName: string;
3
- domain: string;
4
- supportedDeploymentTypes: SupportedDeploymentTypes[];
5
- supportedEnvironments: SupportedEnvironments[];
6
- awsRegion?: string;
7
- awsAccountId: string;
8
- awsKeyPairName?: string;
9
- awsRoleToAssume?: string;
10
- awsDeploymentSqsArn?: string;
11
- ciSubDomain?: string;
12
- ciInternalServerPort?: string | number;
13
- ciServerName?: string;
14
- ciDockerNetworkName?: string;
15
- }
16
- export interface DeploymentPlatform extends Required<Omit<DeploymentPlatformTemplate, 'awsRoleToAssume' | 'awsKeyPairName'>> {
17
- activeEnvironment: SupportedEnvironments;
18
- awsRoleToAssume?: string;
19
- awsKeyPairName?: string;
20
- }
21
- export declare enum SupportedRegions {
22
- North = "eu-north-1"
23
- }
24
- export declare enum SupportedEnvironments {
25
- LOCAL = "local",
26
- QA = "qa",
27
- TEST = "test",
28
- DEMO = "demo",
29
- PROD = "prod"
30
- }
31
- export declare enum SupportedDeploymentTypes {
32
- Container = "CONTAINER"
33
- }
34
- export interface DeploymentTemplate {
35
- type: SupportedDeploymentTypes;
36
- targetDeploymentPlatform: string;
37
- subdomain?: string;
38
- env?: {
39
- shared?: {
40
- [name: string]: string | number;
41
- };
42
- prod?: {
43
- [name: string]: string | number;
44
- };
45
- test?: {
46
- [name: string]: string | number;
47
- };
48
- qa?: {
49
- [name: string]: string | number;
50
- };
51
- };
52
- }
53
- export interface ContainerDeploymentTemplate extends DeploymentTemplate {
54
- type: SupportedDeploymentTypes.Container;
55
- dockerFile: string;
56
- dockerContext: string;
57
- image: string;
58
- hostPort: number;
59
- containerPort: number;
60
- registry: string;
61
- }
62
- export interface ContainerDeploymentRequest extends ContainerDeploymentTemplate {
63
- authentication?: string;
64
- username?: string;
65
- }
@@ -1,8 +0,0 @@
1
- import { DeploymentPlatform, ContainerDeploymentRequest } from 'types';
2
- export declare class DockerClient {
3
- static createDockerNetworkForContainerManagerServer(deploymentPlatform: DeploymentPlatform): void;
4
- static stopContainer(deploymentRequest: ContainerDeploymentRequest): string;
5
- static startContainer(deploymentPlatform: any, { image, containerPort, hostPort, registry, env }: ContainerDeploymentRequest): string;
6
- static resolveCredentials({ registry, username, authentication }: ContainerDeploymentRequest): string;
7
- static deploy(deploymentPlatform: DeploymentPlatform, deploymentRequest: ContainerDeploymentRequest): Promise<void>;
8
- }
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { DeploymentPlatformClient } from 'deployment-platform-client';
2
- export * from 'types';