dcl-ops-lib 6.1.2 → 6.3.0

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/acceptAlb.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeSecurityGroupAccessibleFromSharedAlb = void 0;
3
+ exports.makeSecurityGroupAccessibleFromSharedAlb = makeSecurityGroupAccessibleFromSharedAlb;
4
4
  const aws = require("@pulumi/aws");
5
5
  const utils_1 = require("./utils");
6
6
  const values_1 = require("./values");
@@ -16,6 +16,5 @@ function makeSecurityGroupAccessibleFromSharedAlb(securityGroup, ruleName = "")
16
16
  type: "ingress",
17
17
  }, { deleteBeforeReplace: true });
18
18
  }
19
- exports.makeSecurityGroupAccessibleFromSharedAlb = makeSecurityGroupAccessibleFromSharedAlb;
20
19
  exports.default = makeSecurityGroupAccessibleFromSharedAlb;
21
20
  //# sourceMappingURL=acceptAlb.js.map
package/acceptBastion.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.makeSecurityGroupAccessibleFromBastion = void 0;
12
+ exports.makeSecurityGroupAccessibleFromBastion = makeSecurityGroupAccessibleFromBastion;
13
13
  const aws = require("@pulumi/aws");
14
14
  const values_1 = require("./values");
15
15
  const withCache_1 = require("./withCache");
@@ -28,6 +28,5 @@ function makeSecurityGroupAccessibleFromBastion(securityGroup, ruleName = "") {
28
28
  protocol: "-1",
29
29
  }, { deleteBeforeReplace: true });
30
30
  }
31
- exports.makeSecurityGroupAccessibleFromBastion = makeSecurityGroupAccessibleFromBastion;
32
31
  exports.default = makeSecurityGroupAccessibleFromBastion;
33
32
  //# sourceMappingURL=acceptBastion.js.map
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.makeSecurityGroupAccessibleByCloudflare = exports.makeSecurityGroupAccessTheInternetV2 = void 0;
12
+ exports.makeSecurityGroupAccessTheInternetV2 = makeSecurityGroupAccessTheInternetV2;
13
+ exports.makeSecurityGroupAccessibleByCloudflare = makeSecurityGroupAccessibleByCloudflare;
13
14
  const aws = require("@pulumi/aws");
14
15
  const cloudflare = require("@pulumi/cloudflare");
15
16
  const utils_1 = require("./utils");
@@ -25,7 +26,6 @@ function makeSecurityGroupAccessTheInternetV2(securityGroup, ruleName = "") {
25
26
  type: "egress",
26
27
  }, { deleteBeforeReplace: true });
27
28
  }
28
- exports.makeSecurityGroupAccessTheInternetV2 = makeSecurityGroupAccessTheInternetV2;
29
29
  /** Enables ingress traffic from cloudflare CIDRs */
30
30
  function makeSecurityGroupAccessibleByCloudflare(securityGroup) {
31
31
  return __awaiter(this, void 0, void 0, function* () {
@@ -53,5 +53,4 @@ function makeSecurityGroupAccessibleByCloudflare(securityGroup) {
53
53
  }
54
54
  });
55
55
  }
56
- exports.makeSecurityGroupAccessibleByCloudflare = makeSecurityGroupAccessibleByCloudflare;
57
56
  //# sourceMappingURL=accessTheInternet.js.map
package/buildStatic.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildStatic = void 0;
3
+ exports.buildStatic = buildStatic;
4
4
  const aws = require("@pulumi/aws");
5
5
  const pulumi = require("@pulumi/pulumi");
6
6
  const certificate_1 = require("./certificate");
@@ -168,5 +168,4 @@ function buildStatic(staticSite) {
168
168
  targetDomainEndpoint,
169
169
  };
170
170
  }
171
- exports.buildStatic = buildStatic;
172
171
  //# sourceMappingURL=buildStatic.js.map
package/certificate.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCertificateFor = void 0;
3
+ exports.getCertificateFor = getCertificateFor;
4
4
  const getDomainAndSubdomain_1 = require("./getDomainAndSubdomain");
5
5
  const CERTIFICATE_ARNS = {
6
6
  // Development
@@ -38,5 +38,4 @@ function getCertificateFor(domain, arn) {
38
38
  }
39
39
  return result;
40
40
  }
41
- exports.getCertificateFor = getCertificateFor;
42
41
  //# sourceMappingURL=certificate.js.map
package/cloudflare.js CHANGED
@@ -9,7 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.setRecord = exports.deployWorker = exports.getAccountId = exports.getZoneId = void 0;
12
+ exports.getZoneId = getZoneId;
13
+ exports.getAccountId = getAccountId;
14
+ exports.deployWorker = deployWorker;
15
+ exports.setRecord = setRecord;
13
16
  const pulumi = require("@pulumi/pulumi");
14
17
  const cloudflare = require("@pulumi/cloudflare");
15
18
  const domain_1 = require("./domain");
@@ -22,7 +25,6 @@ function getZoneId() {
22
25
  return res.zones[0].id;
23
26
  });
24
27
  }
25
- exports.getZoneId = getZoneId;
26
28
  function getAccountId() {
27
29
  if (process.env.CLOUDFLARE_ACCOUNT_ID) {
28
30
  return process.env.CLOUDFLARE_ACCOUNT_ID;
@@ -31,7 +33,6 @@ function getAccountId() {
31
33
  throw new Error("CLOUDFLARE_ACCOUNT_ID not set");
32
34
  }
33
35
  }
34
- exports.getAccountId = getAccountId;
35
36
  function deployWorker(workerName, config) {
36
37
  return __awaiter(this, void 0, void 0, function* () {
37
38
  // get file contents
@@ -59,7 +60,6 @@ function deployWorker(workerName, config) {
59
60
  return ret;
60
61
  });
61
62
  }
62
- exports.deployWorker = deployWorker;
63
63
  function setRecord(config) {
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  if (!config.proxied && config.ttl < 120) {
@@ -77,5 +77,4 @@ function setRecord(config) {
77
77
  return record;
78
78
  });
79
79
  }
80
- exports.setRecord = setRecord;
81
80
  //# sourceMappingURL=cloudflare.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createBucketWithUser = void 0;
3
+ exports.createBucketWithUser = createBucketWithUser;
4
4
  const aws = require("@pulumi/aws");
5
5
  const pulumi = require("@pulumi/pulumi");
6
6
  function createBucketWithUser(name, bucketArgs) {
@@ -31,7 +31,6 @@ function createBucketWithUser(name, bucketArgs) {
31
31
  secretAccessKey: unprivilegedUserCreds.secret,
32
32
  };
33
33
  }
34
- exports.createBucketWithUser = createBucketWithUser;
35
34
  function publicReadWithUserWrite(userArn, bucketName) {
36
35
  return pulumi.interpolate `{
37
36
  "Version": "2012-10-17",
@@ -1,6 +1,7 @@
1
1
  import * as aws from "@pulumi/aws";
2
2
  import * as pulumi from "@pulumi/pulumi";
3
3
  import { ExtraExposedServiceOptions } from "./exposePublicService";
4
+ import { HealthCheck } from "@pulumi/aws/ecs";
4
5
  export declare const getDefaultLogs: (serviceName: string, logGroup: aws.cloudwatch.LogGroup) => aws.ecs.LogConfiguration;
5
6
  export declare function getClusterInstance(cluster: string | aws.ecs.Cluster | undefined): Promise<pulumi.Output<string> | string>;
6
7
  export type ALBMapping = {
@@ -21,6 +22,7 @@ export type FargateTaskOptions = {
21
22
  securityGroups?: (string | pulumi.Output<string>)[];
22
23
  cluster?: aws.ecs.Cluster | string;
23
24
  healthCheck?: Partial<aws.types.input.alb.TargetGroupHealthCheck>;
25
+ healthCheckContainer?: HealthCheck;
24
26
  desiredCount?: number;
25
27
  memoryReservation?: number;
26
28
  cpuReservation?: number;
@@ -9,7 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.createInternalService = exports.createFargateTask = exports.getFargateTaskRole = exports.getFargateExecutionRole = exports.getClusterInstance = exports.getDefaultLogs = void 0;
12
+ exports.getDefaultLogs = void 0;
13
+ exports.getClusterInstance = getClusterInstance;
14
+ exports.getFargateExecutionRole = getFargateExecutionRole;
15
+ exports.getFargateTaskRole = getFargateTaskRole;
16
+ exports.createFargateTask = createFargateTask;
17
+ exports.createInternalService = createInternalService;
13
18
  const aws = require("@pulumi/aws");
14
19
  const pulumi = require("@pulumi/pulumi");
15
20
  const acceptAlb_1 = require("./acceptAlb");
@@ -56,7 +61,6 @@ function getClusterInstance(cluster) {
56
61
  return cluster.arn;
57
62
  });
58
63
  }
59
- exports.getClusterInstance = getClusterInstance;
60
64
  function getFargateExecutionRole(name, policyArnNamedMap) {
61
65
  const assumeRolePolicy = aws.iam.assumeRolePolicyForPrincipal({
62
66
  Service: "ecs-tasks.amazonaws.com",
@@ -79,7 +83,6 @@ function getFargateExecutionRole(name, policyArnNamedMap) {
79
83
  });
80
84
  return { role, policies };
81
85
  }
82
- exports.getFargateExecutionRole = getFargateExecutionRole;
83
86
  function getFargateTaskRole(name, policyArnNamedMap) {
84
87
  const assumeRolePolicy = aws.iam.assumeRolePolicyForPrincipal({
85
88
  Service: "ecs-tasks.amazonaws.com",
@@ -97,7 +100,6 @@ function getFargateTaskRole(name, policyArnNamedMap) {
97
100
  });
98
101
  return { role, policies };
99
102
  }
100
- exports.getFargateTaskRole = getFargateTaskRole;
101
103
  /**
102
104
  *
103
105
  * @param serviceName A name for this service. For example, "builder-api"
@@ -112,7 +114,7 @@ exports.getFargateTaskRole = getFargateTaskRole;
112
114
  */
113
115
  function createFargateTask(serviceName, dockerImage, dockerListeningPort, environment, hostname, options) {
114
116
  return __awaiter(this, void 0, void 0, function* () {
115
- let { healthCheck, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, } = options;
117
+ let { healthCheck, healthCheckContainer, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, } = options;
116
118
  if (undefined === essential) {
117
119
  essential = true;
118
120
  }
@@ -220,6 +222,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
220
222
  essential,
221
223
  image: dockerImage,
222
224
  command,
225
+ healthCheck: healthCheckContainer,
223
226
  memoryReservation,
224
227
  cpu: cpuReservation,
225
228
  portMappings: extraPortMappings,
@@ -272,6 +275,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
272
275
  essential,
273
276
  image: dockerImage,
274
277
  command,
278
+ healthCheck: healthCheckContainer,
275
279
  memoryReservation,
276
280
  cpu: cpuReservation,
277
281
  dockerLabels,
@@ -287,10 +291,9 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
287
291
  return { endpoint: `https://${hostname}/`, service, exposed };
288
292
  });
289
293
  }
290
- exports.createFargateTask = createFargateTask;
291
294
  function createInternalService(config) {
292
- var _a, _b;
293
295
  return __awaiter(this, void 0, void 0, function* () {
296
+ var _a, _b;
294
297
  let { serviceName, cluster, securityGroups, ignoreServiceDiscovery, serviceDiscoveryPort, desiredCount, executionRole, taskRole, containerInfo, assignPublicIp, dependsOn, volumes, team, targetGroups, runtimePlatform } = config;
295
298
  if (!desiredCount)
296
299
  desiredCount = 1;
@@ -333,7 +336,7 @@ function createInternalService(config) {
333
336
  }, { dependsOn: [logGroup] });
334
337
  return new aws.ecs.Service((0, stack_1.getStackScopedName)(serviceName), {
335
338
  cluster: yield getClusterInstance(cluster),
336
- tags: { ServiceName: serviceName, StackId: (0, stack_1.getStackId)() },
339
+ tags: { ServiceName: serviceName, StackId: (0, stack_1.getStackId)(), Team: team },
337
340
  networkConfiguration: {
338
341
  subnets: yield (0, network_1.getPrivateSubnetIds)(),
339
342
  securityGroups: securityGroups,
@@ -354,5 +357,4 @@ function createInternalService(config) {
354
357
  }, Object.assign(Object.assign({}, extraOpts), { dependsOn }));
355
358
  });
356
359
  }
357
- exports.createInternalService = createInternalService;
358
360
  //# sourceMappingURL=createFargateTask.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createImageFromContext = void 0;
3
+ exports.createImageFromContext = createImageFromContext;
4
4
  const aws = require("@pulumi/aws");
5
5
  const docker = require("@pulumi/docker");
6
6
  const getImageRegistryAndCredentials_1 = require("./getImageRegistryAndCredentials");
@@ -20,5 +20,4 @@ function createImageFromContext(name, context, options, imageOpts) {
20
20
  image,
21
21
  };
22
22
  }
23
- exports.createImageFromContext = createImageFromContext;
24
23
  //# sourceMappingURL=createImageFromContext.js.map
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.exposePublicService = void 0;
12
+ exports.exposePublicService = exposePublicService;
13
13
  const aws = require("@pulumi/aws");
14
14
  const domain_1 = require("./domain");
15
15
  const alb_1 = require("./alb");
@@ -38,8 +38,8 @@ function isUnProxiedDomain(v) {
38
38
  * @param domain
39
39
  * @param port
40
40
  */
41
- function exposePublicService(name, domain, port, healthCheck = {}, vpcId, extraOptions, deregistrationDelay) {
42
- return __awaiter(this, void 0, void 0, function* () {
41
+ function exposePublicService(name_1, domain_2, port_1) {
42
+ return __awaiter(this, arguments, void 0, function* (name, domain, port, healthCheck = {}, vpcId, extraOptions, deregistrationDelay) {
43
43
  const { alb, listener } = yield (0, alb_1.getAlb)();
44
44
  const healthCheckValue = Object.assign({}, DEFAULT_HEALTHCHECK_VALUES, healthCheck);
45
45
  const isProxied = isProxiedDomain(extraOptions);
@@ -120,5 +120,4 @@ function exposePublicService(name, domain, port, healthCheck = {}, vpcId, extraO
120
120
  };
121
121
  });
122
122
  }
123
- exports.exposePublicService = exposePublicService;
124
123
  //# sourceMappingURL=exposePublicService.js.map
package/getAmi.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getAmi = void 0;
12
+ exports.getAmi = getAmi;
13
13
  const aws = require("@pulumi/aws");
14
14
  /**
15
15
  * @param amiId the ID of the AMI in the Amazon Marketplace
@@ -31,5 +31,4 @@ function getAmi(amiId, args) {
31
31
  return ami.id;
32
32
  });
33
33
  }
34
- exports.getAmi = getAmi;
35
34
  //# sourceMappingURL=getAmi.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDomainAndSubdomain = void 0;
3
+ exports.getDomainAndSubdomain = getDomainAndSubdomain;
4
4
  // Split a domain name into its subdomain and parent domain names.
5
5
  // e.g. "www.example.com" => "www", "example.com".
6
6
  function getDomainAndSubdomain(domain) {
@@ -18,5 +18,4 @@ function getDomainAndSubdomain(domain) {
18
18
  parentDomain: parts.slice(-2).join(".") + ".",
19
19
  };
20
20
  }
21
- exports.getDomainAndSubdomain = getDomainAndSubdomain;
22
21
  //# sourceMappingURL=getDomainAndSubdomain.js.map
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getImageRegistryAndCredentials = void 0;
12
+ exports.getImageRegistryAndCredentials = getImageRegistryAndCredentials;
13
13
  const aws = require("@pulumi/aws");
14
14
  function getImageRegistryAndCredentials(repo) {
15
15
  return repo.registryId.apply((registryId) => __awaiter(this, void 0, void 0, function* () {
@@ -29,5 +29,4 @@ function getImageRegistryAndCredentials(repo) {
29
29
  };
30
30
  }));
31
31
  }
32
- exports.getImageRegistryAndCredentials = getImageRegistryAndCredentials;
33
32
  //# sourceMappingURL=getImageRegistryAndCredentials.js.map
package/lambda.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.createGateway = void 0;
12
+ exports.createGateway = createGateway;
13
13
  const aws = require("@pulumi/aws");
14
14
  const apigateway = require("@pulumi/aws-apigateway");
15
15
  const pulumi = require("@pulumi/pulumi");
@@ -110,7 +110,6 @@ function createGateway(options, fn) {
110
110
  };
111
111
  });
112
112
  }
113
- exports.createGateway = createGateway;
114
113
  function configureApiGatewayDomain(fullyQualifiedDomainName, gateway) {
115
114
  return __awaiter(this, void 0, void 0, function* () {
116
115
  const domainParts = (0, getDomainAndSubdomain_1.getDomainAndSubdomain)(fullyQualifiedDomainName);
package/network.js CHANGED
@@ -1,17 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInternalSubnetIds = exports.getPrivateSubnetIds = exports.getPublicSubnetIds = void 0;
3
+ exports.getPublicSubnetIds = getPublicSubnetIds;
4
+ exports.getPrivateSubnetIds = getPrivateSubnetIds;
5
+ exports.getInternalSubnetIds = getInternalSubnetIds;
4
6
  const supra_1 = require("./supra");
5
7
  function getPublicSubnetIds() {
6
8
  return supra_1.supra.getOutputValue('vpcPublicSubnetIds');
7
9
  }
8
- exports.getPublicSubnetIds = getPublicSubnetIds;
9
10
  function getPrivateSubnetIds() {
10
11
  return supra_1.supra.getOutputValue('vpcPrivateSubnetIds');
11
12
  }
12
- exports.getPrivateSubnetIds = getPrivateSubnetIds;
13
13
  function getInternalSubnetIds() {
14
14
  return supra_1.supra.getOutputValue('vpcInternalSubnetIds');
15
15
  }
16
- exports.getInternalSubnetIds = getInternalSubnetIds;
17
16
  //# sourceMappingURL=network.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.1.2",
3
+ "version": "6.3.0",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"
package/prometheus.js CHANGED
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.makeSecurityGroupAccessibleByPrometheus = exports.prometheusSecurityGroupId = exports.prometheusStack = void 0;
12
+ exports.prometheusSecurityGroupId = exports.prometheusStack = void 0;
13
+ exports.makeSecurityGroupAccessibleByPrometheus = makeSecurityGroupAccessibleByPrometheus;
13
14
  const pulumi = require("@pulumi/pulumi");
14
15
  const aws = require("@pulumi/aws");
15
16
  const domain_1 = require("./domain");
@@ -33,5 +34,4 @@ function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, to
33
34
  securityGroupId: securityGroup.id,
34
35
  }, { deleteBeforeReplace: true });
35
36
  }
36
- exports.makeSecurityGroupAccessibleByPrometheus = makeSecurityGroupAccessibleByPrometheus;
37
37
  //# sourceMappingURL=prometheus.js.map
package/secrets.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.secretToSSM = void 0;
3
+ exports.secretToSSM = secretToSSM;
4
4
  const aws = require("@pulumi/aws");
5
5
  function secretToSSM(name, secureString) {
6
6
  return new aws.ssm.Parameter(name, {
@@ -8,5 +8,4 @@ function secretToSSM(name, secureString) {
8
8
  value: secureString,
9
9
  });
10
10
  }
11
- exports.secretToSSM = secretToSSM;
12
11
  //# sourceMappingURL=secrets.js.map
package/stack.js CHANGED
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTeam = exports.getStackScopedName = exports.getStackId = void 0;
3
+ exports.getStackId = getStackId;
4
+ exports.getStackScopedName = getStackScopedName;
5
+ exports.getTeam = getTeam;
4
6
  const pulumi = require("@pulumi/pulumi");
5
7
  const supraConfig = new pulumi.Config("supra");
6
8
  function getStackId() {
7
9
  return supraConfig.require("stack-id");
8
10
  }
9
- exports.getStackId = getStackId;
10
11
  function getStackScopedName(name) {
11
12
  const stackId = getStackId();
12
13
  if (stackId) {
@@ -14,9 +15,7 @@ function getStackScopedName(name) {
14
15
  }
15
16
  return name;
16
17
  }
17
- exports.getStackScopedName = getStackScopedName;
18
18
  function getTeam() {
19
19
  return supraConfig.require("team");
20
20
  }
21
- exports.getTeam = getTeam;
22
21
  //# sourceMappingURL=stack.js.map
package/supra.js CHANGED
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getInternalServiceDiscoveryNamespaceId = exports.getPublicBastionIp = exports.getDbPort = exports.getDbHost = exports.getDbHostAndPort = exports.supra = void 0;
3
+ exports.supra = void 0;
4
+ exports.getDbHostAndPort = getDbHostAndPort;
5
+ exports.getDbHost = getDbHost;
6
+ exports.getDbPort = getDbPort;
7
+ exports.getPublicBastionIp = getPublicBastionIp;
8
+ exports.getInternalServiceDiscoveryNamespaceId = getInternalServiceDiscoveryNamespaceId;
4
9
  const pulumi = require("@pulumi/pulumi");
5
10
  const domain_1 = require("./domain");
6
11
  exports.supra = new pulumi.StackReference(`supra-${domain_1.env}`, {
@@ -18,24 +23,19 @@ function getDbHostAndPort() {
18
23
  }
19
24
  });
20
25
  }
21
- exports.getDbHostAndPort = getDbHostAndPort;
22
26
  // returns "db.hostname.com" from "db.hostname.com:port" Output<string> for the supra shared database
23
27
  function getDbHost() {
24
28
  return exports.supra.requireOutput("db").apply((db) => db.endpoint.split(":")[0]);
25
29
  }
26
- exports.getDbHost = getDbHost;
27
30
  // returns "port" from "db.hostname.com:port" Output<string> for the supra shared database
28
31
  function getDbPort() {
29
32
  return exports.supra.requireOutput("db").apply((db) => parseInt(db.endpoint.split(":")[1] || DEFAULT_DB_PORT));
30
33
  }
31
- exports.getDbPort = getDbPort;
32
34
  // returns the public IP of the bastion
33
35
  function getPublicBastionIp() {
34
36
  return exports.supra.requireOutput("bastionValues").apply((bastionValues) => bastionValues.publicIp);
35
37
  }
36
- exports.getPublicBastionIp = getPublicBastionIp;
37
38
  function getInternalServiceDiscoveryNamespaceId() {
38
39
  return exports.supra.requireOutput("internalSdNamespace").apply(($) => $.id);
39
40
  }
40
- exports.getInternalServiceDiscoveryNamespaceId = getInternalServiceDiscoveryNamespaceId;
41
41
  //# sourceMappingURL=supra.js.map
package/utils.js CHANGED
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withRuleName = exports.sha256hash = void 0;
3
+ exports.sha256hash = sha256hash;
4
+ exports.withRuleName = withRuleName;
4
5
  const crypto = require("crypto");
5
6
  function sha256hash(s) {
6
7
  const shasum = crypto.createHash("sha256");
7
8
  shasum.update(s);
8
9
  return shasum.digest("hex").substring(0, 8);
9
10
  }
10
- exports.sha256hash = sha256hash;
11
11
  function withRuleName(name, ruleName) {
12
12
  if (ruleName === null || ruleName === void 0 ? void 0 : ruleName.length) {
13
13
  return `${ruleName}-${name}`;
14
14
  }
15
15
  return name;
16
16
  }
17
- exports.withRuleName = withRuleName;
18
17
  //# sourceMappingURL=utils.js.map
package/vpc.js CHANGED
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getVpc = exports.vpc = void 0;
12
+ exports.getVpc = void 0;
13
+ exports.vpc = vpc;
13
14
  const aws = require("@pulumi/aws");
14
15
  const supra_1 = require("./supra");
15
16
  let vpcReference;
@@ -23,6 +24,5 @@ function vpc() {
23
24
  return vpcReference;
24
25
  });
25
26
  }
26
- exports.vpc = vpc;
27
27
  exports.getVpc = vpc;
28
28
  //# sourceMappingURL=vpc.js.map
package/withCache.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = withCache;
3
4
  function withCache(handler) {
4
5
  const empty = Symbol('@empty');
5
6
  let cache = empty;
@@ -10,5 +11,4 @@ function withCache(handler) {
10
11
  return cache;
11
12
  };
12
13
  }
13
- exports.default = withCache;
14
14
  //# sourceMappingURL=withCache.js.map