@ossy/deployment-tools 0.0.36 → 0.0.38

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 (43) hide show
  1. package/bin/619.index.js +452 -0
  2. package/bin/619.index.js.map +1 -0
  3. package/bin/aws-credentials-client.d.ts +4 -0
  4. package/bin/caddy-client.d.ts +13 -0
  5. package/bin/ci-rest-api.d.ts +4 -0
  6. package/bin/cli-commands/deploy-handler.d.ts +1 -0
  7. package/bin/cli-commands/index.d.ts +4 -0
  8. package/bin/cli-commands/start-handler.d.ts +1 -0
  9. package/bin/cli-commands/status-handler.d.ts +1 -0
  10. package/bin/cli-commands/stop-handler.d.ts +1 -0
  11. package/bin/deployment-platform-client.d.ts +11 -0
  12. package/bin/deployment-queue-client.d.ts +7 -0
  13. package/bin/docker-client.d.ts +8 -0
  14. package/bin/index.cli.d.ts +1 -0
  15. package/bin/index.d.ts +2 -0
  16. package/bin/index.js +362 -0
  17. package/bin/index.js.map +1 -0
  18. package/bin/licenses.txt +23 -0
  19. package/bin/log/index.d.ts +3 -0
  20. package/bin/package.json +3 -0
  21. package/bin/sourcemap-register.cjs +1 -0
  22. package/bin/types/index.d.ts +65 -0
  23. package/dist/aws-credentials-client.d.ts +4 -0
  24. package/dist/caddy-client.d.ts +13 -0
  25. package/dist/ci-rest-api.d.ts +4 -0
  26. package/dist/cli-commands/deploy-handler.d.ts +1 -0
  27. package/dist/cli-commands/index.d.ts +4 -0
  28. package/dist/cli-commands/start-handler.d.ts +1 -0
  29. package/dist/cli-commands/status-handler.d.ts +1 -0
  30. package/dist/cli-commands/stop-handler.d.ts +1 -0
  31. package/dist/deployment-platform-client.d.ts +11 -0
  32. package/dist/deployment-queue-client.d.ts +7 -0
  33. package/dist/docker-client.d.ts +8 -0
  34. package/dist/index.cli.d.ts +2 -0
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.js +62 -47942
  37. package/dist/index.js.map +1 -1
  38. package/dist/log/index.d.ts +3 -0
  39. package/dist/types/index.d.ts +65 -0
  40. package/package.json +7 -5
  41. package/src/index.cli.ts +7 -0
  42. package/src/index.ts +2 -7
  43. package/tsconfig.json +2 -1
@@ -0,0 +1,3 @@
1
+ export declare const logInfo: (logInput: any) => void;
2
+ export declare const logError: (logInput: any) => void;
3
+ export declare const logDebug: (logInput: any) => void;
@@ -0,0 +1,65 @@
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/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "@ossy/deployment-tools",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "Collection of scripts and tools to aid deployment of containers and static files",
5
- "main": "dist/index.js",
6
5
  "type": "module",
6
+ "types": "dist/index.d.ts" ,
7
+ "main": "dist/index.js",
7
8
  "scripts": {
8
9
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "npx --yes @vercel/ncc build src/index.ts --source-map --out dist --license licenses.txt",
10
- "build:esbuild": "npx --yes esbuild src/index.ts --platform=node --bundle --outfile=dist/index.js"
10
+ "build": "npm run build:public-exports && npm run build:cli",
11
+ "build:public-exports": "npx --yes @vercel/ncc build src/index.ts --source-map --out dist --license licenses.txt --minify",
12
+ "build:cli": "npx --yes @vercel/ncc build src/index.cli.ts --source-map --out bin --license licenses.txt --minify"
11
13
  },
12
14
  "author": "Ossy",
13
15
  "license": "ISC",
14
- "bin": "dist/index.js",
16
+ "bin": "bin/index.js",
15
17
  "dependencies": {
16
18
  "@actions/core": "^1.10.0",
17
19
  "@aws-sdk/client-sqs": "^3.186.0",
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { runCliCommand } from './cli-commands/index'
3
+
4
+ //eslint-disable-next-line no-unused-vars
5
+ const [_, __, command, ...restArgs] = process.argv
6
+
7
+ runCliCommand({ name: command, args: restArgs })
package/src/index.ts CHANGED
@@ -1,7 +1,2 @@
1
- #!/usr/bin/env node
2
- import { runCliCommand } from './cli-commands/index'
3
-
4
- //eslint-disable-next-line no-unused-vars
5
- const [_, __, command, ...restArgs] = process.argv
6
-
7
- runCliCommand({ name: command, args: restArgs })
1
+ export { DeploymentPlatformClient } from 'deployment-platform-client'
2
+ export * from 'types'
package/tsconfig.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "module": "ESNext",
5
5
  "moduleResolution": "nodenext",
6
6
  "baseUrl": "src",
7
- "lib": ["es2021"]
7
+ "lib": ["es2021"],
8
+ "declaration": true
8
9
  }
9
10
  }