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
27
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.3.14 to 0.3.15

10

api/github.js

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

return axios_1.default.get(`${URL}/${tag ? `tags/${tag}` : 'latest'}`, {
headers: { ...getAxiosConfig_1.DEFAULT_USER_AGENT_HEADERS, ...GITHUB_AUTH_HEADERS },
headers: { ...(0, getAxiosConfig_1.getDefaultUserAgentHeader)(), ...GITHUB_AUTH_HEADERS },
});

@@ -29,3 +29,3 @@ }

responseType: 'arraybuffer',
headers: { ...getAxiosConfig_1.DEFAULT_USER_AGENT_HEADERS, ...GITHUB_AUTH_HEADERS },
headers: { ...(0, getAxiosConfig_1.getDefaultUserAgentHeader)(), ...GITHUB_AUTH_HEADERS },
});

@@ -37,3 +37,3 @@ }

return axios_1.default.get(`${GITHUB_RAW_CONTENT_API_PATH}/${repoPath}/${ref}/${filePath}`, {
headers: { ...getAxiosConfig_1.DEFAULT_USER_AGENT_HEADERS, ...GITHUB_AUTH_HEADERS },
headers: { ...(0, getAxiosConfig_1.getDefaultUserAgentHeader)(), ...GITHUB_AUTH_HEADERS },
});

@@ -45,3 +45,3 @@ }

return axios_1.default.get(downloadUrl, {
headers: { ...getAxiosConfig_1.DEFAULT_USER_AGENT_HEADERS, ...GITHUB_AUTH_HEADERS },
headers: { ...(0, getAxiosConfig_1.getDefaultUserAgentHeader)(), ...GITHUB_AUTH_HEADERS },
});

@@ -55,5 +55,5 @@ }

return axios_1.default.get(`${GITHUB_REPOS_API}/${repoPath}/contents/${path}${refQuery}`, {
headers: { ...getAxiosConfig_1.DEFAULT_USER_AGENT_HEADERS, ...GITHUB_AUTH_HEADERS },
headers: { ...(0, getAxiosConfig_1.getDefaultUserAgentHeader)(), ...GITHUB_AUTH_HEADERS },
});
}
exports.fetchRepoContents = fetchRepoContents;
import { AxiosConfigOptions } from '../types/Http';
import { AxiosRequestConfig } from 'axios';
export declare const DEFAULT_USER_AGENT_HEADERS: {
export declare const USER_AGENTS: {
[key: string]: string;
};
export declare function getDefaultUserAgentHeader(): {
'User-Agent': string;
};
export declare function getAxiosConfig(options: AxiosConfigOptions): AxiosRequestConfig;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAxiosConfig = exports.DEFAULT_USER_AGENT_HEADERS = void 0;
exports.getAxiosConfig = exports.getDefaultUserAgentHeader = exports.USER_AGENTS = void 0;
const package_json_1 = require("../package.json");
const config_1 = require("../config");
const urls_1 = require("../lib/urls");
exports.DEFAULT_USER_AGENT_HEADERS = {
'User-Agent': `HubSpot Local Dev Lib/${package_json_1.version}`,
exports.USER_AGENTS = {
'HubSpot Local Dev Lib': package_json_1.version,
};
function getDefaultUserAgentHeader() {
let userAgentString = '';
Object.keys(exports.USER_AGENTS).forEach((userAgentKey, i) => {
userAgentString += `${i > 0 ? ', ' : ''}${userAgentKey}/${exports.USER_AGENTS[userAgentKey]}`;
});
return {
'User-Agent': userAgentString,
};
}
exports.getDefaultUserAgentHeader = getDefaultUserAgentHeader;
const DEFAULT_TRANSITIONAL = {

@@ -19,3 +29,3 @@ clarifyTimeoutError: true,

headers: {
...exports.DEFAULT_USER_AGENT_HEADERS,
...getDefaultUserAgentHeader(),
...(headers || {}),

@@ -22,0 +32,0 @@ },

import { AxiosResponse } from 'axios';
import { HttpOptions } from '../types/Http';
export declare function addUserAgentHeader(key: string, value: string): void;
declare function getRequest<T>(accountId: number, options: HttpOptions): Promise<T>;

@@ -4,0 +5,0 @@ declare function postRequest<T>(accountId: number, options: HttpOptions): Promise<T>;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.addUserAgentHeader = void 0;
const path_1 = __importDefault(require("path"));

@@ -19,2 +20,6 @@ const fs_extra_1 = __importDefault(require("fs-extra"));

const i18nKey = 'http.index';
function addUserAgentHeader(key, value) {
getAxiosConfig_1.USER_AGENTS[key] = value;
}
exports.addUserAgentHeader = addUserAgentHeader;
async function withOauth(accountId, accountConfig, axiosConfig) {

@@ -21,0 +26,0 @@ const { headers } = axiosConfig;

@@ -383,3 +383,3 @@ {

"403ProjectMissingScope": "Couldn't run the project command because there are scopes missing in your production account. To update scopes, deactivate your current personal access key for {{ accountId }}, and generate a new one. Then run `hs auth` to update the CLI with the new key.",
"403ProjectGating": "The current target account {{ accountId }} does not have access to HubSpot projects. To opt in to the CRM Development Beta and use projects, visit https://app.hubspot.com/l/whats-new/betas?productUpdateId=13860216.",
"403ProjectGating": "The current target account {{ accountId }} does not have access to HubSpot projects. To opt in to the CRM Development Beta and use projects, visit https://app.hubspot.com/l/product-updates/in-beta?update=13899236.",
"500Generic": "The {{ messageDetail }} failed due to a server error. Please try again or visit https://help.hubspot.com/ to submit a ticket or contact HubSpot Support if the issue persists.",

@@ -386,0 +386,0 @@ "400Generic": "The {{ messageDetail }} failed due to a client error.",

@@ -383,3 +383,3 @@ {

"403ProjectMissingScope": "Couldn't run the project command because there are scopes missing in your production account. To update scopes, deactivate your current personal access key for {{ accountId }}, and generate a new one. Then run `hs auth` to update the CLI with the new key.",
"403ProjectGating": "The current target account {{ accountId }} does not have access to HubSpot projects. To opt in to the CRM Development Beta and use projects, visit https://app.hubspot.com/l/whats-new/betas?productUpdateId=13860216.",
"403ProjectGating": "The current target account {{ accountId }} does not have access to HubSpot projects. To opt in to the CRM Development Beta and use projects, visit https://app.hubspot.com/l/product-updates/in-beta?update=13899236.",
"500Generic": "The {{ messageDetail }} failed due to a server error. Please try again or visit https://help.hubspot.com/ to submit a ticket or contact HubSpot Support if the issue persists.",

@@ -386,0 +386,0 @@ "400Generic": "The {{ messageDetail }} failed due to a client error.",

{
"name": "@hubspot/local-dev-lib",
"version": "0.3.14",
"version": "0.3.15",
"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