Skip to content

Commit c0ff748

Browse files
committed
chore(release): 1.0.39
1 parent b8b21d1 commit c0ff748

26 files changed

+195
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.0.39](https://github.com/boilingdata/boilingdata-bdcli/compare/v1.0.38...v1.0.39) (2024-03-15)
6+
57
### [1.0.38](https://github.com/boilingdata/boilingdata-bdcli/compare/v1.0.37...v1.0.38) (2024-03-07)
68

79
### [1.0.37](https://github.com/boilingdata/boilingdata-bdcli/compare/v1.0.36...v1.0.37) (2024-03-07)

dist/cjs/VERSION.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export declare const VERSION = "1.0.38";
1+
export declare const VERSION = "1.0.39";

dist/cjs/VERSION.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
exports.VERSION = void 0;
4-
exports.VERSION = "1.0.38";
4+
exports.VERSION = "1.0.39";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
var desc = Object.getOwnPropertyDescriptor(m, k);
5+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6+
desc = { enumerable: true, get: function() { return m[k]; } };
7+
}
8+
Object.defineProperty(o, k2, desc);
9+
}) : (function(o, m, k, k2) {
10+
if (k2 === undefined) k2 = k;
11+
o[k2] = m[k];
12+
}));
13+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14+
Object.defineProperty(o, "default", { enumerable: true, value: v });
15+
}) : function(o, v) {
16+
o["default"] = v;
17+
});
18+
var __importStar = (this && this.__importStar) || function (mod) {
19+
if (mod && mod.__esModule) return mod;
20+
var result = {};
21+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22+
__setModuleDefault(result, mod);
23+
return result;
24+
};
25+
Object.defineProperty(exports, "__esModule", { value: true });
26+
const cmd = __importStar(require("commander"));
27+
const logger_util_js_1 = require("../../utils/logger_util.js");
28+
const spinner_util_js_1 = require("../../utils/spinner_util.js");
29+
const options_util_js_1 = require("../../utils/options_util.js");
30+
const auth_util_js_1 = require("../../utils/auth_util.js");
31+
const config_util_js_1 = require("../../utils/config_util.js");
32+
const sign_wss_url_js_1 = require("../../../integration/aws/sign-wss-url.js");
33+
const output_util_js_1 = require("../../utils/output_util.js");
34+
const logger = (0, logger_util_js_1.getLogger)("bdcli-api");
35+
logger.setLogLevel(logger_util_js_1.ELogLevel.WARN);
36+
async function wssurl(options, _command) {
37+
try {
38+
options = await (0, config_util_js_1.combineOptsWithSettings)(options, logger);
39+
(0, spinner_util_js_1.updateSpinnerText)("Authenticating");
40+
const { idToken: token, cached, region } = await (0, auth_util_js_1.getIdToken)(logger);
41+
(0, spinner_util_js_1.updateSpinnerText)(cached ? "Authenticating: cached" : "Authenticating: success");
42+
(0, spinner_util_js_1.spinnerSuccess)();
43+
(0, spinner_util_js_1.updateSpinnerText)("Getting signed WebSocket URL (ws://)");
44+
const signedUrl = await (0, sign_wss_url_js_1.getSignedWssUrl)(logger, token, region);
45+
(0, spinner_util_js_1.spinnerSuccess)();
46+
await (0, output_util_js_1.outputResults)(signedUrl, options.disableSpinner);
47+
}
48+
catch (err) {
49+
(0, spinner_util_js_1.spinnerError)(err?.message);
50+
}
51+
}
52+
const program = new cmd.Command("bdcli api wssurl").action(async (options, command) => await wssurl(options, command));
53+
(async () => {
54+
await (0, options_util_js_1.addGlobalOptions)(program, logger);
55+
await program.parseAsync(process.argv);
56+
})();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
const commander_1 = require("commander");
4+
const program = new commander_1.Command("bdcli api")
5+
.executableDir("api")
6+
.command("wssurl", "Get signed WebSocket (wss://) URL for connecting to Boiling Data");
7+
program.parse(process.argv);

dist/cjs/bdcli/utils/auth_util.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { ILogger } from "./logger_util.js";
2+
export declare const userPoolId = "eu-west-1_0GLV9KO1p";
3+
export declare const clientId = "6timr8knllr4frovfvq8r2o6oo";
24
export declare function authSpinnerWithConfigCheck(): Promise<boolean>;
35
export declare function validateTokenLifetime(lifetime: string, logger?: ILogger): Promise<void>;
46
export declare function getEmail(): Promise<string>;

dist/cjs/bdcli/utils/auth_util.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
2626
return (mod && mod.__esModule) ? mod : { "default": mod };
2727
};
2828
Object.defineProperty(exports, "__esModule", { value: true });
29-
exports.getIdToken = exports.setupMfa = exports.recoverPassword = exports.updatePassword = exports.registerToBoilingData = exports.confirmEmailToBoilingData = exports.getPw = exports.getEmail = exports.validateTokenLifetime = exports.authSpinnerWithConfigCheck = void 0;
29+
exports.getIdToken = exports.setupMfa = exports.recoverPassword = exports.updatePassword = exports.registerToBoilingData = exports.confirmEmailToBoilingData = exports.getPw = exports.getEmail = exports.validateTokenLifetime = exports.authSpinnerWithConfigCheck = exports.clientId = exports.userPoolId = void 0;
3030
const id = __importStar(require("amazon-cognito-identity-js"));
3131
const config_util_js_1 = require("./config_util.js");
3232
const boilingdata_api_js_1 = require("../../integration/boilingdata/boilingdata_api.js");
@@ -35,8 +35,8 @@ const prompts_1 = __importDefault(require("prompts"));
3535
const qrcode_1 = __importDefault(require("qrcode"));
3636
const spinner_util_js_1 = require("./spinner_util.js");
3737
const ms_1 = __importDefault(require("ms"));
38-
const userPoolId = "eu-west-1_0GLV9KO1p"; // eu-west-1 preview
39-
const clientId = "6timr8knllr4frovfvq8r2o6oo"; // eu-west-1 preview
38+
exports.userPoolId = "eu-west-1_0GLV9KO1p"; // eu-west-1 preview
39+
exports.clientId = "6timr8knllr4frovfvq8r2o6oo"; // eu-west-1 preview
4040
async function authSpinnerWithConfigCheck() {
4141
(0, spinner_util_js_1.updateSpinnerText)("Authenticating");
4242
if (!(await (0, config_util_js_1.hasValidConfig)())) {
@@ -150,7 +150,7 @@ async function registerToBoilingData(optsRegion, optsEnvironment, optsEmail, opt
150150
attributeList.push(new id.CognitoUserAttribute(dataEmail));
151151
// const dataPhoneNumber = { Name: "phone_number", Value: "+15555555555" };
152152
// attributeList.push(new id.CognitoUserAttribute(dataPhoneNumber));
153-
const userPool = new id.CognitoUserPool({ UserPoolId: userPoolId, ClientId: clientId });
153+
const userPool = new id.CognitoUserPool({ UserPoolId: exports.userPoolId, ClientId: exports.clientId });
154154
return new Promise((resolve, reject) => {
155155
userPool.signUp(email, password, attributeList, [], (err, result) => {
156156
if (err)
@@ -293,7 +293,7 @@ async function getIdToken(logger) {
293293
const { email: Username, password: Password, idToken, region } = creds;
294294
// check if idToken is still valid..
295295
if (idToken) {
296-
const verifier = aws_jwt_verify_1.CognitoJwtVerifier.create({ userPoolId, clientId, tokenUse: "id" });
296+
const verifier = aws_jwt_verify_1.CognitoJwtVerifier.create({ userPoolId: exports.userPoolId, clientId: exports.clientId, tokenUse: "id" });
297297
try {
298298
const idTokenPayload = await verifier.verify(idToken);
299299
logger?.debug({ idTokenPayload });

dist/cjs/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ program
3434
.command("account", "Setup and configure your BoilingData account")
3535
.command("aws", "Setup and configure your AWS account integration with BoilingData")
3636
.command("domain", "Admin setup and configuration for your domain (.e.g @boilingdata.com, @mycompany.com)")
37-
.command("sandbox", "Managa Boiling S3 Sandboxes with IaC templates");
37+
.command("sandbox", "Managa Boiling S3 Sandboxes with IaC templates")
38+
.command("api", "Get signed WSS URL etc.");
3839
program.parse(process.argv);

0 commit comments

Comments
 (0)