hypertune
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "hypertune", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Hypertune SDK", | ||
@@ -5,0 +5,0 @@ "exports": "./build/src/index.js", |
@@ -289,7 +289,7 @@ "use strict"; | ||
businessToken = this.businessToken; | ||
graphqlUrl = "https://".concat(!(0, isProd_1.default)() | ||
? constants_1.devBackendHost | ||
graphqlUrl = "".concat(!(0, isProd_1.default)() | ||
? constants_1.devBackendBaseUrl | ||
: isBrowser_1.default | ||
? constants_1.proxyBackendHost | ||
: constants_1.prodBackendHost).concat(constants_1.backendGraphqlEndpoint); | ||
? constants_1.proxyBackendBaseUrl | ||
: constants_1.prodBackendBaseUrl).concat(constants_1.backendGraphqlEndpoint); | ||
this.debug("[Hypertune] Logs endpoint: ".concat(graphqlUrl)); | ||
@@ -296,0 +296,0 @@ client = new graphql_request_1.GraphQLClient(graphqlUrl, { |
@@ -133,3 +133,3 @@ "use strict"; | ||
case 0: | ||
url = "".concat((0, isProd_1.default)() ? "https://".concat(constants_1.prodEdgeHost) : "http://".concat(constants_1.devEdgeHost), "/").concat(requestType, "/").concat(projectId); | ||
url = "".concat((0, isProd_1.default)() ? constants_1.prodEdgeBaseUrl : constants_1.devEdgeBaseUrl, "/").concat(requestType, "/").concat(projectId); | ||
fetch = (0, getFetchFunction_1.default)(); | ||
@@ -136,0 +136,0 @@ return [4 /*yield*/, fetch(url, { |
@@ -1,7 +0,7 @@ | ||
export declare const devBackendHost = "localhost:5003"; | ||
export declare const prodBackendHost = "hypertune.nw.r.appspot.com"; | ||
export declare const proxyBackendHost = "gcp.fasthorse.workers.dev"; | ||
export declare const devBackendBaseUrl = "http://localhost:5000"; | ||
export declare const prodBackendBaseUrl = "https://hypertune.nw.r.appspot.com"; | ||
export declare const proxyBackendBaseUrl = "https://gcp.fasthorse.workers.dev"; | ||
export declare const backendGraphqlEndpoint = "/graphql"; | ||
export declare const devEdgeHost = "localhost:7676"; | ||
export declare const prodEdgeHost = "hypertune.edgecompute.app"; | ||
export declare const devEdgeBaseUrl = "http://localhost:7676"; | ||
export declare const prodEdgeBaseUrl = "https://hypertune.edgecompute.app"; | ||
export declare const configFileName = "hypertune.json"; | ||
@@ -8,0 +8,0 @@ export declare const businessTokenEnvironmentVariableNameSuffix = "HYPERTUNE_TOKEN"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.defaultArmKey = exports.numHashBuckets = exports.fieldPathSeparator = exports.isPartialObjectKey = exports.graphqlTypeNameKey = exports.businessTokenEnvironmentVariableNameSuffix = exports.configFileName = exports.prodEdgeHost = exports.devEdgeHost = exports.backendGraphqlEndpoint = exports.proxyBackendHost = exports.prodBackendHost = exports.devBackendHost = void 0; | ||
exports.devBackendHost = "localhost:5003"; | ||
exports.prodBackendHost = "hypertune.nw.r.appspot.com"; | ||
exports.proxyBackendHost = "gcp.fasthorse.workers.dev"; | ||
exports.defaultArmKey = exports.numHashBuckets = exports.fieldPathSeparator = exports.isPartialObjectKey = exports.graphqlTypeNameKey = exports.businessTokenEnvironmentVariableNameSuffix = exports.configFileName = exports.prodEdgeBaseUrl = exports.devEdgeBaseUrl = exports.backendGraphqlEndpoint = exports.proxyBackendBaseUrl = exports.prodBackendBaseUrl = exports.devBackendBaseUrl = void 0; | ||
exports.devBackendBaseUrl = "http://localhost:5000"; | ||
exports.prodBackendBaseUrl = "https://hypertune.nw.r.appspot.com"; | ||
exports.proxyBackendBaseUrl = "https://gcp.fasthorse.workers.dev"; | ||
exports.backendGraphqlEndpoint = "/graphql"; | ||
exports.devEdgeHost = "localhost:7676"; | ||
exports.prodEdgeHost = "hypertune.edgecompute.app"; | ||
exports.devEdgeBaseUrl = "http://localhost:7676"; | ||
exports.prodEdgeBaseUrl = "https://hypertune.edgecompute.app"; | ||
exports.configFileName = "hypertune.json"; | ||
@@ -11,0 +11,0 @@ exports.businessTokenEnvironmentVariableNameSuffix = "HYPERTUNE_TOKEN"; |
{ | ||
"name": "hypertune", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Hypertune SDK", | ||
@@ -56,2 +56,2 @@ "exports": "./build/src/index.js", | ||
} | ||
} | ||
} |
@@ -14,5 +14,5 @@ import { GraphQLClient } from "graphql-request"; | ||
backendGraphqlEndpoint, | ||
devBackendHost, | ||
prodBackendHost, | ||
proxyBackendHost, | ||
devBackendBaseUrl, | ||
prodBackendBaseUrl, | ||
proxyBackendBaseUrl, | ||
} from "./shared/constants"; | ||
@@ -354,8 +354,8 @@ import hash from "./shared/hash"; | ||
// of blocklists | ||
const graphqlUrl = `https://${ | ||
const graphqlUrl = `${ | ||
!isProd() | ||
? devBackendHost | ||
? devBackendBaseUrl | ||
: isBrowser | ||
? proxyBackendHost | ||
: prodBackendHost | ||
? proxyBackendBaseUrl | ||
: prodBackendBaseUrl | ||
}${backendGraphqlEndpoint}`; | ||
@@ -362,0 +362,0 @@ this.debug(`[Hypertune] Logs endpoint: ${graphqlUrl}`); |
import getFetchFunction from "./getFetchFunction"; | ||
import isProd from "./isProd"; | ||
import packageJson from "../../package.json"; | ||
import { devEdgeHost, prodEdgeHost } from "./shared/constants"; | ||
import { devEdgeBaseUrl, prodEdgeBaseUrl } from "./shared/constants"; | ||
import { | ||
@@ -114,3 +114,3 @@ CodegenRequestBody, | ||
const url = `${ | ||
isProd() ? `https://${prodEdgeHost}` : `http://${devEdgeHost}` | ||
isProd() ? prodEdgeBaseUrl : devEdgeBaseUrl | ||
}/${requestType}/${projectId}`; | ||
@@ -117,0 +117,0 @@ |
@@ -1,8 +0,8 @@ | ||
export const devBackendHost = "localhost:5003"; | ||
export const prodBackendHost = "hypertune.nw.r.appspot.com"; | ||
export const proxyBackendHost = "gcp.fasthorse.workers.dev"; | ||
export const devBackendBaseUrl = "http://localhost:5000"; | ||
export const prodBackendBaseUrl = "https://hypertune.nw.r.appspot.com"; | ||
export const proxyBackendBaseUrl = "https://gcp.fasthorse.workers.dev"; | ||
export const backendGraphqlEndpoint = "/graphql"; | ||
export const devEdgeHost = "localhost:7676"; | ||
export const prodEdgeHost = "hypertune.edgecompute.app"; | ||
export const devEdgeBaseUrl = "http://localhost:7676"; | ||
export const prodEdgeBaseUrl = "https://hypertune.edgecompute.app"; | ||
@@ -9,0 +9,0 @@ export const configFileName = "hypertune.json"; |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
732035
2