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

@hubspot/local-dev-lib

Package Overview
Dependencies
Maintainers
28
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hubspot/local-dev-lib - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

1

api/localDevAuth.d.ts

@@ -13,2 +13,3 @@ import { Environment } from '../types/Config';

encodedOAuthRefreshToken: string;
hubName: string;
};

@@ -15,0 +16,0 @@ export declare function fetchAccessToken(personalAccessKey: string, env?: Environment, portalId?: number): Promise<AccessTokenResponse>;

3

lib/personalAccessKey.d.ts

@@ -9,6 +9,7 @@ import { CLIAccount } from '../types/Accounts';

encodedOAuthRefreshToken: string;
hubName: string;
};
export declare function getAccessToken(personalAccessKey: string, env?: Environment, accountId?: number): Promise<AccessToken>;
export declare function accessTokenForPersonalAccessKey(accountId: number): Promise<string | undefined>;
export declare const updateConfigWithPersonalAccessKey: (personalAccessKey: string, env?: Environment, name?: string, makeDefault?: boolean) => Promise<CLIAccount | null>;
export declare function updateConfigWithAccessToken(token: AccessToken, personalAccessKey: string, env?: Environment, name?: string, makeDefault?: boolean): Promise<CLIAccount | null>;
export {};

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.updateConfigWithPersonalAccessKey = exports.accessTokenForPersonalAccessKey = exports.getAccessToken = void 0;
exports.updateConfigWithAccessToken = exports.accessTokenForPersonalAccessKey = exports.getAccessToken = void 0;
const moment_1 = __importDefault(require("moment"));

@@ -40,2 +40,3 @@ const environments_1 = require("../constants/environments");

encodedOAuthRefreshToken: response.encodedOAuthRefreshToken,
hubName: response.hubName,
};

@@ -95,13 +96,5 @@ }

exports.accessTokenForPersonalAccessKey = accessTokenForPersonalAccessKey;
// Adds an account to the config using authType: personalAccessKey
const updateConfigWithPersonalAccessKey = async (personalAccessKey, env, name, makeDefault = false) => {
async function updateConfigWithAccessToken(token, personalAccessKey, env, name, makeDefault = false) {
const { portalId, accessToken, expiresAt } = token;
const accountEnv = env || (0, config_1.getEnv)(name);
let token;
try {
token = await getAccessToken(personalAccessKey, accountEnv);
}
catch (err) {
(0, standardErrors_1.throwError)(err);
}
const { portalId, accessToken, expiresAt } = token;
let hubInfo;

@@ -138,3 +131,3 @@ try {

return updatedConfig;
};
exports.updateConfigWithPersonalAccessKey = updateConfigWithPersonalAccessKey;
}
exports.updateConfigWithAccessToken = updateConfigWithAccessToken;
export declare function commaSeparatedValues(arr: Array<string>, conjunction?: null | string, ifempty?: string): string;
export declare function toKebabCase(str: string): string;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.commaSeparatedValues = void 0;
exports.toKebabCase = exports.commaSeparatedValues = void 0;
function commaSeparatedValues(arr, conjunction = 'and', ifempty = '') {

@@ -17,1 +17,9 @@ const l = arr.length;

exports.commaSeparatedValues = commaSeparatedValues;
function toKebabCase(str) {
return (str
.replace(/[.,/#!$%^&*;:{}=\-_'"`~()]/g, '')
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g) || [])
.join('-')
.toLowerCase();
}
exports.toKebabCase = toKebabCase;
{
"name": "@hubspot/local-dev-lib",
"version": "0.2.0",
"version": "0.2.1",
"description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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