piral-fetch
Advanced tools
Comparing version 1.6.0-beta.7240 to 1.6.0-beta.7243
@@ -1,3 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; | ||
//# sourceMappingURL=config.js.map |
@@ -1,5 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createFetchApi = void 0; | ||
const fetch_1 = require("./fetch"); | ||
import { httpFetch } from './fetch'; | ||
/** | ||
@@ -9,3 +6,3 @@ * Creates new Pilet API extensions for fetch. | ||
*/ | ||
function createFetchApi(config = {}) { | ||
export function createFetchApi(config = {}) { | ||
return (context) => { | ||
@@ -42,3 +39,3 @@ return { | ||
}) | ||
.then((options) => (0, fetch_1.httpFetch)(config, path, options)); | ||
.then((options) => httpFetch(config, path, options)); | ||
}, | ||
@@ -48,3 +45,2 @@ }; | ||
} | ||
exports.createFetchApi = createFetchApi; | ||
//# sourceMappingURL=create.js.map |
@@ -1,8 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.httpFetch = void 0; | ||
const headerAccept = 'accept'; | ||
const headerContentType = 'content-type'; | ||
const mimeApplicationJson = 'application/json'; | ||
function httpFetch(config, path, options = {}) { | ||
export function httpFetch(config, path, options = {}) { | ||
// fetcher makes the actual HTTP request. | ||
@@ -60,3 +57,2 @@ // It is used as the last step in the upcoming middleware chain and does *not* call/require next | ||
} | ||
exports.httpFetch = httpFetch; | ||
//# sourceMappingURL=fetch.js.map |
@@ -1,8 +0,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./config"), exports); | ||
tslib_1.__exportStar(require("./create"), exports); | ||
tslib_1.__exportStar(require("./fetch"), exports); | ||
tslib_1.__exportStar(require("./types"), exports); | ||
export * from './config'; | ||
export * from './create'; | ||
export * from './fetch'; | ||
export * from './types'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
export {}; | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "piral-fetch", | ||
"version": "1.6.0-beta.7240", | ||
"version": "1.6.0-beta.7243", | ||
"description": "Plugin for standardizing fetch in Piral.", | ||
@@ -20,20 +20,8 @@ "keywords": [ | ||
"license": "MIT", | ||
"module": "esm/index.js", | ||
"module": "lib/index.js", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./esm/index.js", | ||
"require": "./lib/index.js" | ||
}, | ||
"./esm/*": { | ||
"import": "./esm/*" | ||
}, | ||
"./lib/*": { | ||
"require": "./lib/*" | ||
}, | ||
"./_/*": { | ||
"import": "./esm/*.js", | ||
"require": "./lib/*.js" | ||
}, | ||
".": "./lib/index.js", | ||
"./lib/*": "./lib/*", | ||
"./package.json": "./package.json" | ||
@@ -43,3 +31,2 @@ }, | ||
"files": [ | ||
"esm", | ||
"lib", | ||
@@ -58,6 +45,5 @@ "src", | ||
"cleanup": "rimraf esm lib piral-fetch.min.js", | ||
"build": "yarn build:bundle && yarn build:commonjs && yarn build:esnext", | ||
"build": "yarn build:bundle && yarn build:esnext", | ||
"build:bundle": "esbuild src/index.ts --outfile=piral-fetch.min.js --bundle --external:piral-core --minify --global-name=piralFetch", | ||
"build:commonjs": "tsc --project tsconfig.json --outDir lib --module commonjs", | ||
"build:esnext": "tsc --project tsconfig.json --outDir esm --module esnext", | ||
"build:esnext": "tsc --project tsconfig.json --outDir lib --module esnext", | ||
"typedoc": "typedoc --json ../../../docs/types/piral-fetch.json src --exclude \"src/**/*.test.*\"", | ||
@@ -71,6 +57,6 @@ "test": "echo \"Error: run tests from root\" && exit 1" | ||
"express": "^4.17.1", | ||
"piral-core": "1.6.0-beta.7240", | ||
"piral-core": "1.6.0-beta.7243", | ||
"whatwg-fetch": "^3.0.0" | ||
}, | ||
"gitHead": "2fd8ff47d9a7e0666e4e6bc1dc5a7ef45e8e9f39" | ||
"gitHead": "bbb6e4f78c61b6ef753099a5b378ad2708565ce3" | ||
} |
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
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
2
31425
25
549