dcl-ops-lib 6.0.14 → 6.0.16

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.
@@ -298,8 +298,7 @@ function createInternalService(config) {
298
298
  { type: "SRV", ttl: 10 },
299
299
  ],
300
300
  namespaceId: (0, supra_1.getInternalServiceDiscoveryNamespaceId)(),
301
- },
302
- forceDestroy: true
301
+ }
303
302
  });
304
303
  serviceRegistries = {
305
304
  port: serviceDiscoveryPort,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.0.14",
3
+ "version": "6.0.16",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"
package/supra.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  export declare const supra: pulumi.StackReference;
3
- export declare function getDbHostAndPort(): pulumi.Output<any>;
4
- export declare function getDbHost(): pulumi.Output<any>;
5
- export declare function getDbPort(): pulumi.OutputInstance<number>;
3
+ export declare function getDbHostAndPort(): Promise<any>;
4
+ export declare function getDbHost(): Promise<any>;
5
+ export declare function getDbPort(): Promise<number>;
6
6
  export declare function getPublicBastionIp(): pulumi.Output<any>;
7
7
  export declare function getInternalServiceDiscoveryNamespaceId(): pulumi.Output<any>;
package/supra.js CHANGED
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.getInternalServiceDiscoveryNamespaceId = exports.getPublicBastionIp = exports.getDbPort = exports.getDbHost = exports.getDbHostAndPort = exports.supra = void 0;
4
13
  const pulumi = require("@pulumi/pulumi");
@@ -9,7 +18,8 @@ exports.supra = new pulumi.StackReference(`supra-${domain_1.env}`, {
9
18
  const DEFAULT_DB_PORT = 5432;
10
19
  // returns a "db.hostname.com:port" Output<string> for the supra shared database
11
20
  function getDbHostAndPort() {
12
- return exports.supra.requireOutput("db").apply((db) => {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const db = yield exports.supra.requireOutputValue("db");
13
23
  if (db.endpoint.includes(":")) {
14
24
  return db.endpoint;
15
25
  }
@@ -21,12 +31,18 @@ function getDbHostAndPort() {
21
31
  exports.getDbHostAndPort = getDbHostAndPort;
22
32
  // returns "db.hostname.com" from "db.hostname.com:port" Output<string> for the supra shared database
23
33
  function getDbHost() {
24
- return exports.supra.requireOutput("db").apply((db) => db.endpoint.split(":")[0]);
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ const db = yield exports.supra.requireOutputValue("db");
36
+ return db.endpoint.split(":")[0];
37
+ });
25
38
  }
26
39
  exports.getDbHost = getDbHost;
27
40
  // returns "port" from "db.hostname.com:port" Output<string> for the supra shared database
28
41
  function getDbPort() {
29
- return exports.supra.requireOutput("db").apply((db) => parseInt(db.endpoint.split(":")[1] || DEFAULT_DB_PORT));
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const db = yield exports.supra.requireOutputValue("db");
44
+ return parseInt(db.endpoint.split(":")[1] || DEFAULT_DB_PORT);
45
+ });
30
46
  }
31
47
  exports.getDbPort = getDbPort;
32
48
  // returns the public IP of the bastion