Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flex-dev-utils

Package Overview
Dependencies
Maintainers
1
Versions
330
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-dev-utils - npm Package Compare versions

Comparing version 4.2.0-alpha.0 to 4.2.2-alpha.0

6

dist/credentials.d.ts

@@ -9,2 +9,6 @@ export interface AuthConfig {

}
interface KeytarCredential {
account: string;
password: string;
}
/**

@@ -30,3 +34,3 @@ * Fetches the API Key/Secret and stores them in keychain.

*/
export declare const _getService: () => Promise<Credential[]>;
export declare const _getService: () => Promise<KeytarCredential[]>;
/**

@@ -33,0 +37,0 @@ * Saves the credential

26

dist/credentials.js

@@ -51,2 +51,3 @@ "use strict";

catch (e) {
/* istanbul ignore next */
if (!process.env.CI) {

@@ -147,3 +148,3 @@ index_1.logger.debug('Failed to require keytar', e);

credentials = _a.sent();
promises = credentials.map(function (cred) { return exports._getKeytar().deletePassword(SERVICE_NAME, cred.username); });
promises = credentials.map(function (cred) { return exports._getKeytar().deletePassword(SERVICE_NAME, cred.account); });
return [4 /*yield*/, Promise.all(promises)];

@@ -163,17 +164,22 @@ case 2:

exports._findCredential = function (accountSid) { return __awaiter(_this, void 0, void 0, function () {
var credentials, match, accounts, selectedAccount;
var convertCredential, credentials, match, accounts, selectedAccount;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, exports._getService()];
case 0:
convertCredential = function (credential) { return ({
username: credential.account,
password: credential.password,
}); };
return [4 /*yield*/, exports._getService()];
case 1:
credentials = _a.sent();
if (accountSid) {
match = credentials.find(function (cred) { return cred.username === accountSid; });
match = credentials.find(function (cred) { return cred.account === accountSid; });
if (match) {
return [2 /*return*/, match];
return [2 /*return*/, convertCredential(match)];
}
}
accounts = credentials
.map(function (cred) { return cred.username; })
.filter(function (acc) { return acc.substr(0, 2).toLowerCase() === 'ac' && acc.length === 34; });
.map(function (cred) { return cred.account; })
.filter(function (acc) { return acc.length === 34 && (acc.substr(0, 2) === 'AC' || acc.substr(0, 2) === 'SK'); });
if (credentials.length === 0) {

@@ -183,3 +189,3 @@ return [2 /*return*/, null];

if (credentials.length === 1) {
return [2 /*return*/, credentials[0]];
return [2 /*return*/, convertCredential(credentials[0])];
}

@@ -191,3 +197,3 @@ if (accounts.length === 0) {

if (accounts.length === 1) {
return [2 /*return*/, credentials.find(function (cred) { return cred.username === accounts[0]; })];
return [2 /*return*/, convertCredential(credentials.find(function (cred) { return cred.account === accounts[0]; }))];
}

@@ -197,3 +203,3 @@ return [4 /*yield*/, inquirer_1.choose(chooseAccount, accounts)];

selectedAccount = _a.sent();
return [2 /*return*/, credentials.find(function (cred) { return cred.username === selectedAccount; })];
return [2 /*return*/, convertCredential(credentials.find(function (cred) { return cred.account === selectedAccount; }))];
}

@@ -200,0 +206,0 @@ });

@@ -25,3 +25,5 @@ "use strict";

function FlexPluginError(msg) {
var _this = _super.call(this, msg) || this;
var _this =
/* istanbul ignore next */
_super.call(this, msg) || this;
_this.print = function () {

@@ -28,0 +30,0 @@ logger_1.default.error(_this.message);

@@ -20,3 +20,5 @@ "use strict";

function UserActionError(reason, message) {
var _this = _super.call(this, message || reason) || this;
var _this =
/* istanbul ignore next */
_super.call(this, message || reason) || this;
_this.reason = reason;

@@ -23,0 +25,0 @@ Object.setPrototypeOf(_this, UserActionError.prototype);

{
"name": "flex-dev-utils",
"version": "4.2.0-alpha.0",
"version": "4.2.2-alpha.0",
"description": "Common development utility for creating a Flex plugin",

@@ -43,5 +43,4 @@ "keywords": [

"execa": "^2.1.0",
"flex-plugins-utils-exception": "^0.4.1",
"flex-plugins-utils-logger": "^0.3.1",
"globby": "^11.0.0",
"flex-plugins-utils-exception": "^0.7.0",
"flex-plugins-utils-logger": "^0.7.1",
"inquirer": "7.0.0",

@@ -75,3 +74,3 @@ "lodash": "^4.17.15",

},
"gitHead": "cd221fc8c416b909cf87defbc6de66607786ffbe"
"gitHead": "a2eed0746459d11b0b0e22ae18c594894ca0f6e1"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc