dcl-ops-lib 8.3.0 → 8.3.2

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 = makeSecurityGroupAccessibleFromSharedAlb;
3
+ exports.makeSecurityGroupAccessibleFromSharedAlb = void 0;
4
4
  const aws = require("@pulumi/aws");
5
5
  const utils_1 = require("./utils");
6
6
  const values_1 = require("./values");
@@ -16,5 +16,6 @@ function makeSecurityGroupAccessibleFromSharedAlb(securityGroup, ruleName = "")
16
16
  type: "ingress",
17
17
  }, { deleteBeforeReplace: true });
18
18
  }
19
+ exports.makeSecurityGroupAccessibleFromSharedAlb = makeSecurityGroupAccessibleFromSharedAlb;
19
20
  exports.default = makeSecurityGroupAccessibleFromSharedAlb;
20
21
  //# 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 = makeSecurityGroupAccessibleFromBastion;
12
+ exports.makeSecurityGroupAccessibleFromBastion = void 0;
13
13
  const aws = require("@pulumi/aws");
14
14
  const values_1 = require("./values");
15
15
  const withCache_1 = require("./withCache");
@@ -28,5 +28,6 @@ function makeSecurityGroupAccessibleFromBastion(securityGroup, ruleName = "") {
28
28
  protocol: "-1",
29
29
  }, { deleteBeforeReplace: true });
30
30
  }
31
+ exports.makeSecurityGroupAccessibleFromBastion = makeSecurityGroupAccessibleFromBastion;
31
32
  exports.default = makeSecurityGroupAccessibleFromBastion;
32
33
  //# sourceMappingURL=acceptBastion.js.map
@@ -9,8 +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.makeSecurityGroupAccessTheInternetV2 = makeSecurityGroupAccessTheInternetV2;
13
- exports.makeSecurityGroupAccessibleByCloudflare = makeSecurityGroupAccessibleByCloudflare;
12
+ exports.makeSecurityGroupAccessibleByCloudflare = exports.makeSecurityGroupAccessTheInternetV2 = void 0;
14
13
  const aws = require("@pulumi/aws");
15
14
  const cloudflare = require("@pulumi/cloudflare");
16
15
  const utils_1 = require("./utils");
@@ -26,6 +25,7 @@ function makeSecurityGroupAccessTheInternetV2(securityGroup, ruleName = "") {
26
25
  type: "egress",
27
26
  }, { deleteBeforeReplace: true });
28
27
  }
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,4 +53,5 @@ function makeSecurityGroupAccessibleByCloudflare(securityGroup) {
53
53
  }
54
54
  });
55
55
  }
56
+ exports.makeSecurityGroupAccessibleByCloudflare = makeSecurityGroupAccessibleByCloudflare;
56
57
  //# 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 = buildStatic;
3
+ exports.buildStatic = void 0;
4
4
  const aws = require("@pulumi/aws");
5
5
  const pulumi = require("@pulumi/pulumi");
6
6
  const certificate_1 = require("./certificate");
@@ -176,4 +176,5 @@ function buildStatic(staticSite) {
176
176
  targetDomainEndpoint,
177
177
  };
178
178
  }
179
+ exports.buildStatic = buildStatic;
179
180
  //# 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 = getCertificateFor;
3
+ exports.getCertificateFor = void 0;
4
4
  const getDomainAndSubdomain_1 = require("./getDomainAndSubdomain");
5
5
  const CERTIFICATE_ARNS = {
6
6
  // Development
@@ -38,4 +38,5 @@ function getCertificateFor(domain, arn) {
38
38
  }
39
39
  return result;
40
40
  }
41
+ exports.getCertificateFor = getCertificateFor;
41
42
  //# sourceMappingURL=certificate.js.map
package/cloudflare.js CHANGED
@@ -9,10 +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.getZoneId = getZoneId;
13
- exports.getAccountId = getAccountId;
14
- exports.deployWorker = deployWorker;
15
- exports.setRecord = setRecord;
12
+ exports.setRecord = exports.deployWorker = exports.getAccountId = exports.getZoneId = void 0;
16
13
  const pulumi = require("@pulumi/pulumi");
17
14
  const cloudflare = require("@pulumi/cloudflare");
18
15
  const domain_1 = require("./domain");
@@ -25,6 +22,7 @@ function getZoneId() {
25
22
  return res.zones[0].id;
26
23
  });
27
24
  }
25
+ exports.getZoneId = getZoneId;
28
26
  function getAccountId() {
29
27
  if (process.env.CLOUDFLARE_ACCOUNT_ID) {
30
28
  return process.env.CLOUDFLARE_ACCOUNT_ID;
@@ -33,6 +31,7 @@ function getAccountId() {
33
31
  throw new Error("CLOUDFLARE_ACCOUNT_ID not set");
34
32
  }
35
33
  }
34
+ exports.getAccountId = getAccountId;
36
35
  function deployWorker(workerName, config) {
37
36
  return __awaiter(this, void 0, void 0, function* () {
38
37
  // get file contents
@@ -60,6 +59,7 @@ function deployWorker(workerName, config) {
60
59
  return ret;
61
60
  });
62
61
  }
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,4 +77,5 @@ function setRecord(config) {
77
77
  return record;
78
78
  });
79
79
  }
80
+ exports.setRecord = setRecord;
80
81
  //# sourceMappingURL=cloudflare.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createBucketWithUser = createBucketWithUser;
3
+ exports.createBucketWithUser = void 0;
4
4
  const aws = require("@pulumi/aws");
5
5
  const pulumi = require("@pulumi/pulumi");
6
6
  function createBucketWithUser(name, bucketArgs) {
@@ -31,6 +31,7 @@ function createBucketWithUser(name, bucketArgs) {
31
31
  secretAccessKey: unprivilegedUserCreds.secret,
32
32
  };
33
33
  }
34
+ exports.createBucketWithUser = createBucketWithUser;
34
35
  function publicReadWithUserWrite(userArn, bucketName) {
35
36
  return pulumi.interpolate `{
36
37
  "Version": "2012-10-17",
@@ -35,6 +35,7 @@ export type FargateTaskOptions = {
35
35
  essential?: boolean;
36
36
  command?: string[];
37
37
  extraExposedServiceOptions?: ExtraExposedServiceOptions;
38
+ forceNewDeployment?: boolean;
38
39
  extraPortMappings?: aws.ecs.PortMapping[];
39
40
  extraALBMappings?: ALBMapping[];
40
41
  executionRolePolicies?: Record<string, pulumi.Input<string> | aws.iam.Policy>;
@@ -74,7 +75,7 @@ export type FargateTaskOptions = {
74
75
  * Rate expressions - "rate(value unit)"
75
76
  * Cron expressions - "cron(fields)"
76
77
  * @type {string}
77
- */
78
+ */
78
79
  schedule: string;
79
80
  }[];
80
81
  };
@@ -123,6 +124,7 @@ export type InternalServiceOptions = {
123
124
  taskRole?: aws.iam.Role;
124
125
  containerInfo: aws.ecs.ContainerDefinition;
125
126
  assignPublicIp?: boolean;
127
+ forceNewDeployment?: boolean;
126
128
  dependsOn?: pulumi.Resource[];
127
129
  volumes?: pulumi.Input<aws.types.input.ecs.TaskDefinitionVolume[]>;
128
130
  team: string;
@@ -9,12 +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.getDefaultLogs = void 0;
13
- exports.getClusterInstance = getClusterInstance;
14
- exports.getFargateExecutionRole = getFargateExecutionRole;
15
- exports.getFargateTaskRole = getFargateTaskRole;
16
- exports.createFargateTask = createFargateTask;
17
- exports.createInternalService = createInternalService;
12
+ exports.createInternalService = exports.createFargateTask = exports.getFargateTaskRole = exports.getFargateExecutionRole = exports.getClusterInstance = exports.getDefaultLogs = void 0;
18
13
  const aws = require("@pulumi/aws");
19
14
  const pulumi = require("@pulumi/pulumi");
20
15
  const acceptAlb_1 = require("./acceptAlb");
@@ -61,6 +56,7 @@ function getClusterInstance(cluster) {
61
56
  return cluster.arn;
62
57
  });
63
58
  }
59
+ exports.getClusterInstance = getClusterInstance;
64
60
  function getFargateExecutionRole(name, policyArnNamedMap) {
65
61
  const assumeRolePolicy = aws.iam.assumeRolePolicyForPrincipal({
66
62
  Service: "ecs-tasks.amazonaws.com",
@@ -83,6 +79,7 @@ function getFargateExecutionRole(name, policyArnNamedMap) {
83
79
  });
84
80
  return { role, policies };
85
81
  }
82
+ exports.getFargateExecutionRole = getFargateExecutionRole;
86
83
  function getFargateTaskRole(name, policyArnNamedMap) {
87
84
  const assumeRolePolicy = aws.iam.assumeRolePolicyForPrincipal({
88
85
  Service: "ecs-tasks.amazonaws.com",
@@ -100,6 +97,7 @@ function getFargateTaskRole(name, policyArnNamedMap) {
100
97
  });
101
98
  return { role, policies };
102
99
  }
100
+ exports.getFargateTaskRole = getFargateTaskRole;
103
101
  /**
104
102
  *
105
103
  * @param serviceName A name for this service. For example, "builder-api"
@@ -115,7 +113,7 @@ function getFargateTaskRole(name, policyArnNamedMap) {
115
113
  */
116
114
  function createFargateTask(serviceName, dockerImage, dockerListeningPort, environment, hostname, options) {
117
115
  return __awaiter(this, void 0, void 0, function* () {
118
- let { healthCheck, healthCheckContainer, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, ephemeralStorageInGB, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, appAutoscaling, } = options;
116
+ let { healthCheck, healthCheckContainer, essential, dontExpose, securityGroups, cluster, memoryReservation, command, version, ephemeralStorageInGB, desiredCount, cpuReservation, extraPortMappings, extraALBMappings, executionRolePolicies, taskRolePolicies, ignoreServiceDiscovery, secrets, metrics, forceNewDeployment, dontAssignPublicIp, dependsOn, volumes, deregistrationDelay, mountPoints, repositoryCredentials, team, appAutoscaling, } = options;
119
117
  if (undefined === essential) {
120
118
  essential = true;
121
119
  }
@@ -217,6 +215,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
217
215
  taskRole,
218
216
  assignPublicIp: !dontAssignPublicIp,
219
217
  serviceDiscoveryPort,
218
+ forceNewDeployment,
220
219
  ignoreServiceDiscovery,
221
220
  securityGroups: [taskSecurityGroup.id, ...securityGroups],
222
221
  containerInfo: {
@@ -272,6 +271,7 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
272
271
  ephemeralStorageInGB,
273
272
  executionRole,
274
273
  taskRole,
274
+ forceNewDeployment,
275
275
  assignPublicIp: !dontAssignPublicIp,
276
276
  ignoreServiceDiscovery,
277
277
  securityGroups: [taskSecurityGroup.id, ...securityGroups],
@@ -301,10 +301,11 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
301
301
  return { endpoint: `https://${hostname}/`, service, exposed };
302
302
  });
303
303
  }
304
+ exports.createFargateTask = createFargateTask;
304
305
  function createInternalService(config) {
306
+ var _a, _b;
305
307
  return __awaiter(this, void 0, void 0, function* () {
306
- var _a, _b;
307
- let { serviceName, cluster, securityGroups, ignoreServiceDiscovery, serviceDiscoveryPort, desiredCount, executionRole, taskRole, containerInfo, assignPublicIp, dependsOn, volumes, team, targetGroups, runtimePlatform, ephemeralStorageInGB, appAutoscaling, } = config;
308
+ let { serviceName, cluster, securityGroups, ignoreServiceDiscovery, serviceDiscoveryPort, desiredCount, executionRole, taskRole, containerInfo, assignPublicIp, dependsOn, volumes, team, targetGroups, runtimePlatform, ephemeralStorageInGB, appAutoscaling, forceNewDeployment, } = config;
308
309
  if (!desiredCount && desiredCount !== 0)
309
310
  desiredCount = 1;
310
311
  assignPublicIp = !!assignPublicIp;
@@ -362,6 +363,7 @@ function createInternalService(config) {
362
363
  desiredCount,
363
364
  launchType: "FARGATE",
364
365
  enableEcsManagedTags: true,
366
+ forceNewDeployment,
365
367
  waitForSteadyState: false,
366
368
  taskDefinition: taskDefinition.arn,
367
369
  loadBalancers: [
@@ -378,9 +380,11 @@ function createInternalService(config) {
378
380
  return service;
379
381
  });
380
382
  }
383
+ exports.createInternalService = createInternalService;
381
384
  function setAutoscaling(service, serviceName, config) {
382
385
  var _a;
383
- if ((!config.appAutoscaling.policy && !config.appAutoscaling.scheduleAction) || (config.appAutoscaling.policy && config.appAutoscaling.scheduleAction)) {
386
+ if ((!config.appAutoscaling.policy && !config.appAutoscaling.scheduleAction) ||
387
+ (config.appAutoscaling.policy && config.appAutoscaling.scheduleAction)) {
384
388
  throw new Error("Invalid autoscaling configuration. You must provide either a policy OR a scheduleAction.");
385
389
  }
386
390
  const ecsTarget = new aws.appautoscaling.Target(`ecs-target-${(0, stack_1.getStackScopedName)(serviceName)}`, {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createImageFromContext = createImageFromContext;
3
+ exports.createImageFromContext = void 0;
4
4
  const aws = require("@pulumi/aws");
5
5
  const docker = require("@pulumi/docker");
6
6
  const getImageRegistryAndCredentials_1 = require("./getImageRegistryAndCredentials");
@@ -20,4 +20,5 @@ function createImageFromContext(name, context, options, imageOpts) {
20
20
  image,
21
21
  };
22
22
  }
23
+ exports.createImageFromContext = createImageFromContext;
23
24
  //# 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 = exposePublicService;
12
+ exports.exposePublicService = void 0;
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_1, domain_2, port_1) {
42
- return __awaiter(this, arguments, void 0, function* (name, domain, port, healthCheck = {}, vpcId, extraOptions, deregistrationDelay) {
41
+ function exposePublicService(name, domain, port, healthCheck = {}, vpcId, extraOptions, deregistrationDelay) {
42
+ return __awaiter(this, void 0, void 0, function* () {
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,4 +120,5 @@ function exposePublicService(name_1, domain_2, port_1) {
120
120
  };
121
121
  });
122
122
  }
123
+ exports.exposePublicService = exposePublicService;
123
124
  //# 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 = getAmi;
12
+ exports.getAmi = void 0;
13
13
  const aws = require("@pulumi/aws");
14
14
  /**
15
15
  * @param amiId the ID of the AMI in the Amazon Marketplace
@@ -32,4 +32,5 @@ function getAmi(amiId, args) {
32
32
  return ami.id;
33
33
  });
34
34
  }
35
+ exports.getAmi = getAmi;
35
36
  //# sourceMappingURL=getAmi.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDomainAndSubdomain = getDomainAndSubdomain;
3
+ exports.getDomainAndSubdomain = void 0;
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,4 +18,5 @@ function getDomainAndSubdomain(domain) {
18
18
  parentDomain: parts.slice(-2).join(".") + ".",
19
19
  };
20
20
  }
21
+ exports.getDomainAndSubdomain = getDomainAndSubdomain;
21
22
  //# 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 = getImageRegistryAndCredentials;
12
+ exports.getImageRegistryAndCredentials = void 0;
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,4 +29,5 @@ function getImageRegistryAndCredentials(repo) {
29
29
  };
30
30
  }));
31
31
  }
32
+ exports.getImageRegistryAndCredentials = getImageRegistryAndCredentials;
32
33
  //# 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 = createGateway;
12
+ exports.createGateway = void 0;
13
13
  const aws = require("@pulumi/aws");
14
14
  const apigateway = require("@pulumi/aws-apigateway");
15
15
  const pulumi = require("@pulumi/pulumi");
@@ -110,6 +110,7 @@ function createGateway(options, fn) {
110
110
  };
111
111
  });
112
112
  }
113
+ exports.createGateway = createGateway;
113
114
  function configureApiGatewayDomain(fullyQualifiedDomainName, gateway) {
114
115
  return __awaiter(this, void 0, void 0, function* () {
115
116
  const domainParts = (0, getDomainAndSubdomain_1.getDomainAndSubdomain)(fullyQualifiedDomainName);
package/network.js CHANGED
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPublicSubnetIds = getPublicSubnetIds;
4
- exports.getPrivateSubnetIds = getPrivateSubnetIds;
5
- exports.getInternalSubnetIds = getInternalSubnetIds;
3
+ exports.getInternalSubnetIds = exports.getPrivateSubnetIds = exports.getPublicSubnetIds = void 0;
6
4
  const supra_1 = require("./supra");
7
5
  function getPublicSubnetIds() {
8
6
  return supra_1.supra.getOutputValue('vpcPublicSubnetIds');
9
7
  }
8
+ exports.getPublicSubnetIds = getPublicSubnetIds;
10
9
  function getPrivateSubnetIds() {
11
10
  return supra_1.supra.getOutputValue('vpcPrivateSubnetIds');
12
11
  }
12
+ exports.getPrivateSubnetIds = getPrivateSubnetIds;
13
13
  function getInternalSubnetIds() {
14
14
  return supra_1.supra.getOutputValue('vpcInternalSubnetIds');
15
15
  }
16
+ exports.getInternalSubnetIds = getInternalSubnetIds;
16
17
  //# sourceMappingURL=network.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "8.3.0",
3
+ "version": "8.3.2",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"
@@ -22,9 +22,9 @@
22
22
  "devDependencies": {
23
23
  "@semantic-release/gitlab-config": "^13.0.0",
24
24
  "@types/mime": "^3.0.4",
25
- "@types/node": "^20.9.3",
25
+ "@types/node": "20.9.3",
26
26
  "semantic-release": "^22.0.8",
27
- "typescript": "^5.3.2"
27
+ "typescript": "5.3.2"
28
28
  },
29
29
  "dependencies": {
30
30
  "@pulumi/aws": "6.9.0",
package/prometheus.js CHANGED
@@ -9,8 +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.prometheusSecurityGroupId = exports.prometheusStack = void 0;
13
- exports.makeSecurityGroupAccessibleByPrometheus = makeSecurityGroupAccessibleByPrometheus;
12
+ exports.makeSecurityGroupAccessibleByPrometheus = exports.prometheusSecurityGroupId = exports.prometheusStack = void 0;
14
13
  const pulumi = require("@pulumi/pulumi");
15
14
  const aws = require("@pulumi/aws");
16
15
  const domain_1 = require("./domain");
@@ -34,4 +33,5 @@ function makeSecurityGroupAccessibleByPrometheus(securityGroup, fromPort = 0, to
34
33
  securityGroupId: securityGroup.id,
35
34
  }, { deleteBeforeReplace: true });
36
35
  }
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 = secretToSSM;
3
+ exports.secretToSSM = void 0;
4
4
  const aws = require("@pulumi/aws");
5
5
  function secretToSSM(name, secureString) {
6
6
  return new aws.ssm.Parameter(name, {
@@ -8,4 +8,5 @@ function secretToSSM(name, secureString) {
8
8
  value: secureString,
9
9
  });
10
10
  }
11
+ exports.secretToSSM = secretToSSM;
11
12
  //# sourceMappingURL=secrets.js.map
package/stack.js CHANGED
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStackId = getStackId;
4
- exports.getStackScopedName = getStackScopedName;
5
- exports.getTeam = getTeam;
3
+ exports.getTeam = exports.getStackScopedName = exports.getStackId = void 0;
6
4
  const pulumi = require("@pulumi/pulumi");
7
5
  const supraConfig = new pulumi.Config("supra");
8
6
  function getStackId() {
9
7
  return supraConfig.require("stack-id");
10
8
  }
9
+ exports.getStackId = getStackId;
11
10
  function getStackScopedName(name) {
12
11
  const stackId = getStackId();
13
12
  if (stackId) {
@@ -15,7 +14,9 @@ function getStackScopedName(name) {
15
14
  }
16
15
  return name;
17
16
  }
17
+ exports.getStackScopedName = getStackScopedName;
18
18
  function getTeam() {
19
19
  return supraConfig.require("team");
20
20
  }
21
+ exports.getTeam = getTeam;
21
22
  //# sourceMappingURL=stack.js.map
package/supra.js CHANGED
@@ -1,13 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supra = void 0;
4
- exports.getDbHostAndPort = getDbHostAndPort;
5
- exports.getReaderDbHostAndPort = getReaderDbHostAndPort;
6
- exports.getDbHost = getDbHost;
7
- exports.getReaderDbHost = getReaderDbHost;
8
- exports.getDbPort = getDbPort;
9
- exports.getPublicBastionIp = getPublicBastionIp;
10
- exports.getInternalServiceDiscoveryNamespaceId = getInternalServiceDiscoveryNamespaceId;
3
+ exports.getInternalServiceDiscoveryNamespaceId = exports.getPublicBastionIp = exports.getDbPort = exports.getReaderDbHost = exports.getDbHost = exports.getReaderDbHostAndPort = exports.getDbHostAndPort = exports.supra = void 0;
11
4
  const pulumi = require("@pulumi/pulumi");
12
5
  const domain_1 = require("./domain");
13
6
  exports.supra = new pulumi.StackReference(`supra-${domain_1.env}`, {
@@ -25,6 +18,7 @@ function getDbHostAndPort() {
25
18
  }
26
19
  });
27
20
  }
21
+ exports.getDbHostAndPort = getDbHostAndPort;
28
22
  // returns a "db.hostname.com:port" Output<string> for the supra shared database - reader endpoint
29
23
  function getReaderDbHostAndPort() {
30
24
  return exports.supra.requireOutput("db").apply((db) => {
@@ -36,23 +30,29 @@ function getReaderDbHostAndPort() {
36
30
  }
37
31
  });
38
32
  }
33
+ exports.getReaderDbHostAndPort = getReaderDbHostAndPort;
39
34
  // returns "db.hostname.com" from "db.hostname.com:port" Output<string> for the supra shared database
40
35
  function getDbHost() {
41
36
  return exports.supra.requireOutput("db").apply((db) => db.endpoint.split(":")[0]);
42
37
  }
38
+ exports.getDbHost = getDbHost;
43
39
  // returns "db.hostname.com" from "db.hostname.com:port" Output<string> for the supra shared database - reader endpoint
44
40
  function getReaderDbHost() {
45
41
  return exports.supra.requireOutput("db").apply((db) => db.dbReaderEndpoint.split(":")[0]);
46
42
  }
43
+ exports.getReaderDbHost = getReaderDbHost;
47
44
  // returns "port" from "db.hostname.com:port" Output<string> for the supra shared database
48
45
  function getDbPort() {
49
46
  return exports.supra.requireOutput("db").apply((db) => parseInt(db.endpoint.split(":")[1] || DEFAULT_DB_PORT));
50
47
  }
48
+ exports.getDbPort = getDbPort;
51
49
  // returns the public IP of the bastion
52
50
  function getPublicBastionIp() {
53
51
  return exports.supra.requireOutput("bastionValues").apply((bastionValues) => bastionValues.publicIp);
54
52
  }
53
+ exports.getPublicBastionIp = getPublicBastionIp;
55
54
  function getInternalServiceDiscoveryNamespaceId() {
56
55
  return exports.supra.requireOutput("internalSdNamespace").apply(($) => $.id);
57
56
  }
57
+ exports.getInternalServiceDiscoveryNamespaceId = getInternalServiceDiscoveryNamespaceId;
58
58
  //# sourceMappingURL=supra.js.map
package/utils.js CHANGED
@@ -1,17 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sha256hash = sha256hash;
4
- exports.withRuleName = withRuleName;
3
+ exports.withRuleName = exports.sha256hash = void 0;
5
4
  const crypto = require("crypto");
6
5
  function sha256hash(s) {
7
6
  const shasum = crypto.createHash("sha256");
8
7
  shasum.update(s);
9
8
  return shasum.digest("hex").substring(0, 8);
10
9
  }
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;
17
18
  //# sourceMappingURL=utils.js.map
package/vpc.js CHANGED
@@ -9,8 +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.getVpc = void 0;
13
- exports.vpc = vpc;
12
+ exports.getVpc = exports.vpc = void 0;
14
13
  const aws = require("@pulumi/aws");
15
14
  const supra_1 = require("./supra");
16
15
  let vpcReference;
@@ -24,5 +23,6 @@ function vpc() {
24
23
  return vpcReference;
25
24
  });
26
25
  }
26
+ exports.vpc = vpc;
27
27
  exports.getVpc = vpc;
28
28
  //# sourceMappingURL=vpc.js.map
package/withCache.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = withCache;
4
3
  function withCache(handler) {
5
4
  const empty = Symbol('@empty');
6
5
  let cache = empty;
@@ -11,4 +10,5 @@ function withCache(handler) {
11
10
  return cache;
12
11
  };
13
12
  }
13
+ exports.default = withCache;
14
14
  //# sourceMappingURL=withCache.js.map