Socket
Socket
Sign inDemoInstall

@aws-sdk/util-endpoints

Package Overview
Dependencies
Maintainers
5
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-endpoints - npm Package Compare versions

Comparing version 3.292.0 to 3.293.0

19

dist-cjs/lib/aws/partition.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.partition = void 0;
exports.getUserAgentPrefix = exports.useDefaultPartitionInfo = exports.setPartitionInfo = exports.partition = void 0;
const tslib_1 = require("tslib");
const partitions_json_1 = tslib_1.__importDefault(require("./partitions.json"));
const { partitions } = partitions_json_1.default;
const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws");
let selectedPartitionsInfo = partitions_json_1.default;
let selectedUserAgentPrefix = "";
const partition = (value) => {
const { partitions } = selectedPartitionsInfo;
for (const partition of partitions) {

@@ -28,2 +29,3 @@ const { regions, outputs } = partition;

}
const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws");
if (!DEFAULT_PARTITION) {

@@ -38,1 +40,12 @@ throw new Error("Provided region was not found in the partition array or regex," +

exports.partition = partition;
const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => {
selectedPartitionsInfo = partitionsInfo;
selectedUserAgentPrefix = userAgentPrefix;
};
exports.setPartitionInfo = setPartitionInfo;
const useDefaultPartitionInfo = () => {
(0, exports.setPartitionInfo)(partitions_json_1.default, "");
};
exports.useDefaultPartitionInfo = useDefaultPartitionInfo;
const getUserAgentPrefix = () => selectedUserAgentPrefix;
exports.getUserAgentPrefix = getUserAgentPrefix;
import partitionsInfo from "./partitions.json";
const { partitions } = partitionsInfo;
const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws");
let selectedPartitionsInfo = partitionsInfo;
let selectedUserAgentPrefix = "";
export const partition = (value) => {
const { partitions } = selectedPartitionsInfo;
for (const partition of partitions) {

@@ -24,2 +25,3 @@ const { regions, outputs } = partition;

}
const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws");
if (!DEFAULT_PARTITION) {

@@ -33,1 +35,9 @@ throw new Error("Provided region was not found in the partition array or regex," +

};
export const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => {
selectedPartitionsInfo = partitionsInfo;
selectedUserAgentPrefix = userAgentPrefix;
};
export const useDefaultPartitionInfo = () => {
setPartitionInfo(partitionsInfo, "");
};
export const getUserAgentPrefix = () => selectedUserAgentPrefix;
import { EndpointPartition } from "@aws-sdk/types";
export declare type PartitionsInfo = {
partitions: Array<{
id: string;
outputs: {
dnsSuffix: string;
dualStackDnsSuffix: string;
name: string;
supportsDualStack: boolean;
supportsFIPS: boolean;
};
regionRegex: string;
regions: Record<string, {
description?: string;
} | undefined>;
}>;
};
/**

@@ -9,1 +25,15 @@ * Evaluates a single string argument value as a region, and matches the

export declare const partition: (value: string) => EndpointPartition;
/**
* Set custom partitions.json data.
* @internal
*/
export declare const setPartitionInfo: (partitionsInfo: PartitionsInfo, userAgentPrefix?: string) => void;
/**
* Reset to the default partitions.json data.
* @internal
*/
export declare const useDefaultPartitionInfo: () => void;
/**
* @internal
*/
export declare const getUserAgentPrefix: () => string;
import { EndpointPartition } from "@aws-sdk/types";
export declare type PartitionsInfo = {
partitions: Array<{
id: string;
outputs: {
dnsSuffix: string;
dualStackDnsSuffix: string;
name: string;
supportsDualStack: boolean;
supportsFIPS: boolean;
};
regionRegex: string;
regions: Record<
string,
| {
description?: string;
}
| undefined
>;
}>;
};
export declare const partition: (value: string) => EndpointPartition;
export declare const setPartitionInfo: (
partitionsInfo: PartitionsInfo,
userAgentPrefix?: string
) => void;
export declare const useDefaultPartitionInfo: () => void;
export declare const getUserAgentPrefix: () => string;

2

package.json
{
"name": "@aws-sdk/util-endpoints",
"version": "3.292.0",
"version": "3.293.0",
"description": "Utilities to help with endpoint resolution",

@@ -5,0 +5,0 @@ "main": "./dist-cjs/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