@smithy/util-middleware
Advanced tools
+6
-15
@@ -1,15 +0,6 @@ | ||
| 'use strict'; | ||
| var types = require('@smithy/types'); | ||
| const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); | ||
| const normalizeProvider = (input) => { | ||
| if (typeof input === "function") | ||
| return input; | ||
| const promisified = Promise.resolve(input); | ||
| return () => promisified; | ||
| }; | ||
| exports.getSmithyContext = getSmithyContext; | ||
| exports.normalizeProvider = normalizeProvider; | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.normalizeProvider = exports.getSmithyContext = void 0; | ||
| var client_1 = require("@smithy/core/client"); | ||
| Object.defineProperty(exports, "getSmithyContext", { enumerable: true, get: function () { return client_1.getSmithyContext; } }); | ||
| Object.defineProperty(exports, "normalizeProvider", { enumerable: true, get: function () { return client_1.normalizeProvider; } }); |
+1
-2
@@ -1,2 +0,1 @@ | ||
| export * from "./getSmithyContext"; | ||
| export * from "./normalizeProvider"; | ||
| export { getSmithyContext, normalizeProvider } from "@smithy/core/client"; |
@@ -1,8 +0,2 @@ | ||
| /** | ||
| * @internal | ||
| */ | ||
| export * from "./getSmithyContext"; | ||
| /** | ||
| * @internal | ||
| */ | ||
| export * from "./normalizeProvider"; | ||
| /** @deprecated Use @smithy/core/client instead. */ | ||
| export { getSmithyContext, normalizeProvider } from "@smithy/core/client"; |
+5
-26
| { | ||
| "name": "@smithy/util-middleware", | ||
| "version": "4.2.14", | ||
| "version": "4.3.0", | ||
| "description": "Shared utilities for to be used in middleware packages.", | ||
@@ -8,12 +8,5 @@ "main": "./dist-cjs/index.js", | ||
| "scripts": { | ||
| "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'", | ||
| "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline util-middleware", | ||
| "build:types": "yarn g:tsc -p tsconfig.types.json", | ||
| "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4", | ||
| "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", | ||
| "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"", | ||
| "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"", | ||
| "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz", | ||
| "test": "yarn g:vitest run", | ||
| "test:watch": "yarn g:vitest watch" | ||
| "build": "yarn g:tsc -p tsconfig.cjs.json && yarn g:tsc -p tsconfig.es.json && yarn g:tsc -p tsconfig.types.json", | ||
| "clean": "rm -rf dist-cjs dist-es dist-types", | ||
| "stage-release": "rm -rf .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz" | ||
| }, | ||
@@ -31,12 +24,5 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@smithy/types": "^4.14.1", | ||
| "@smithy/core": "^3.24.0", | ||
| "tslib": "^2.6.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^18.11.9", | ||
| "concurrently": "7.0.0", | ||
| "downlevel-dts": "0.10.1", | ||
| "premove": "4.0.0", | ||
| "typedoc": "0.23.23" | ||
| }, | ||
| "types": "./dist-types/index.d.ts", | ||
@@ -46,9 +32,2 @@ "engines": { | ||
| }, | ||
| "typesVersions": { | ||
| "<4.5": { | ||
| "types/*": [ | ||
| "types/ts3.4/*" | ||
| ] | ||
| } | ||
| }, | ||
| "files": [ | ||
@@ -55,0 +34,0 @@ "dist-*/**" |
| import { SMITHY_CONTEXT_KEY } from "@smithy/types"; | ||
| export const getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {}); |
| export const normalizeProvider = (input) => { | ||
| if (typeof input === "function") | ||
| return input; | ||
| const promisified = Promise.resolve(input); | ||
| return () => promisified; | ||
| }; |
| import type { HandlerExecutionContext } from "@smithy/types"; | ||
| /** | ||
| * @internal | ||
| */ | ||
| export declare const getSmithyContext: (context: HandlerExecutionContext) => Record<string, unknown>; |
| import type { Provider } from "@smithy/types"; | ||
| /** | ||
| * @internal | ||
| * | ||
| * @returns a provider function for the input value if it isn't already one. | ||
| */ | ||
| export declare const normalizeProvider: <T>(input: T | Provider<T>) => Provider<T>; |
-17
| # @smithy/util-middleware | ||
| [](https://www.npmjs.com/package/@smithy/util-middleware) | ||
| [](https://www.npmjs.com/package/@smithy/util-middleware) | ||
| ### :warning: Internal API :warning: | ||
| > This is an internal package. | ||
| > That means this is used as a dependency for other, public packages, but | ||
| > should not be taken directly as a dependency in your application's `package.json`. | ||
| > If you are updating the version of this package, for example to bring in a | ||
| > bug-fix, you should do so by updating your application lockfile with | ||
| > e.g. `npm up @scope/package` or equivalent command in another | ||
| > package manager, rather than taking a direct dependency. | ||
| --- |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
0
-100%13312
-15.07%5
-50%9
-78.05%1
Infinity%0
-100%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed