@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.
- package/package.json +6 -10
- package/src/{aws-credentials-client.ts → aws-credentials-client.js} +8 -9
- package/src/{caddy-client.ts → caddy-client.js} +13 -14
- package/src/{ci-rest-api.ts → ci-rest-api.js} +4 -5
- package/src/cli-commands/deploy-handler.js +32 -0
- package/src/cli-commands/{index.ts → index.js} +5 -5
- package/src/cli-commands/{start-handler.ts → start-handler.js} +5 -5
- package/src/cli-commands/{status-handler.ts → status-handler.js} +2 -2
- package/src/cli-commands/{stop-handler.ts → stop-handler.js} +1 -1
- package/src/{deployment-queue-client.ts → deployment-queue-client.js} +17 -18
- package/src/{docker-client.ts → docker-client.js} +18 -19
- package/src/index.js +3 -0
- package/src/{log/index.ts → log.js} +11 -11
- package/src/{index.cli.ts → platform-cli.js} +1 -1
- package/src/platform-client.js +95 -0
- package/src/platform-config.js +34 -0
- package/src/platform-template.js +63 -0
- package/src/types.js +65 -0
- package/bin/619.index.js +0 -452
- package/bin/619.index.js.map +0 -1
- package/bin/aws-credentials-client.d.ts +0 -4
- package/bin/caddy-client.d.ts +0 -13
- package/bin/ci-rest-api.d.ts +0 -4
- package/bin/cli-commands/deploy-handler.d.ts +0 -1
- package/bin/cli-commands/index.d.ts +0 -4
- package/bin/cli-commands/start-handler.d.ts +0 -1
- package/bin/cli-commands/status-handler.d.ts +0 -1
- package/bin/cli-commands/stop-handler.d.ts +0 -1
- package/bin/deployment-platform-client.d.ts +0 -11
- package/bin/deployment-queue-client.d.ts +0 -7
- package/bin/dist/aws-credentials-client.d.ts +0 -4
- package/bin/dist/caddy-client.d.ts +0 -13
- package/bin/dist/ci-rest-api.d.ts +0 -4
- package/bin/dist/cli-commands/deploy-handler.d.ts +0 -1
- package/bin/dist/cli-commands/index.d.ts +0 -4
- package/bin/dist/cli-commands/start-handler.d.ts +0 -1
- package/bin/dist/cli-commands/status-handler.d.ts +0 -1
- package/bin/dist/cli-commands/stop-handler.d.ts +0 -1
- package/bin/dist/deployment-platform-client.d.ts +0 -11
- package/bin/dist/deployment-queue-client.d.ts +0 -7
- package/bin/dist/docker-client.d.ts +0 -8
- package/bin/dist/index.cli.d.ts +0 -1
- package/bin/dist/index.d.ts +0 -2
- package/bin/dist/log/index.d.ts +0 -3
- package/bin/dist/types/index.d.ts +0 -65
- package/bin/docker-client.d.ts +0 -8
- package/bin/index.cli.d.ts +0 -1
- package/bin/index.d.ts +0 -2
- package/bin/index.js +0 -362
- package/bin/index.js.map +0 -1
- package/bin/licenses.txt +0 -23
- package/bin/log/index.d.ts +0 -3
- package/bin/package.json +0 -3
- package/bin/sourcemap-register.cjs +0 -1
- package/bin/types/index.d.ts +0 -65
- package/dist/619.index.js +0 -452
- package/dist/619.index.js.map +0 -1
- package/dist/aws-credentials-client.d.ts +0 -4
- package/dist/caddy-client.d.ts +0 -13
- package/dist/ci-rest-api.d.ts +0 -4
- package/dist/cli-commands/deploy-handler.d.ts +0 -1
- package/dist/cli-commands/index.d.ts +0 -4
- package/dist/cli-commands/start-handler.d.ts +0 -1
- package/dist/cli-commands/status-handler.d.ts +0 -1
- package/dist/cli-commands/stop-handler.d.ts +0 -1
- package/dist/deployment-platform-client.d.ts +0 -11
- package/dist/deployment-queue-client.d.ts +0 -7
- package/dist/dist/aws-credentials-client.d.ts +0 -4
- package/dist/dist/caddy-client.d.ts +0 -13
- package/dist/dist/ci-rest-api.d.ts +0 -4
- package/dist/dist/cli-commands/deploy-handler.d.ts +0 -1
- package/dist/dist/cli-commands/index.d.ts +0 -4
- package/dist/dist/cli-commands/start-handler.d.ts +0 -1
- package/dist/dist/cli-commands/status-handler.d.ts +0 -1
- package/dist/dist/cli-commands/stop-handler.d.ts +0 -1
- package/dist/dist/deployment-platform-client.d.ts +0 -11
- package/dist/dist/deployment-queue-client.d.ts +0 -7
- package/dist/dist/docker-client.d.ts +0 -8
- package/dist/dist/index.cli.d.ts +0 -2
- package/dist/dist/index.d.ts +0 -2
- package/dist/dist/log/index.d.ts +0 -3
- package/dist/dist/types/index.d.ts +0 -65
- package/dist/docker-client.d.ts +0 -8
- package/dist/index.cli.d.ts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -361
- package/dist/index.js.map +0 -1
- package/dist/licenses.txt +0 -23
- package/dist/log/index.d.ts +0 -3
- package/dist/package.json +0 -3
- package/dist/sourcemap-register.cjs +0 -1
- package/dist/types/index.d.ts +0 -65
- package/src/cli-commands/deploy-handler.ts +0 -32
- package/src/deployment-platform-client.ts +0 -141
- package/src/index.ts +0 -2
- package/src/types/index.ts +0 -65
- package/tsconfig.json +0 -11
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export declare const deployHandler: (cliArgs: any) => 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
|
-
}
|
package/bin/dist/index.cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/bin/dist/index.d.ts
DELETED
package/bin/dist/log/index.d.ts
DELETED
|
@@ -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
|
-
}
|
package/bin/docker-client.d.ts
DELETED
|
@@ -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
|
-
}
|
package/bin/index.cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/bin/index.d.ts
DELETED