Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@podium/client

Package Overview
Dependencies
Maintainers
6
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@podium/client - npm Package Compare versions

Comparing version 5.0.0-next.6 to 5.0.0-next.7

dist/client.js

146

CHANGELOG.md

@@ -0,2 +1,40 @@

# [5.0.0-next.7](https://github.com/podium-lib/client/compare/v5.0.0-next.6...v5.0.0-next.7) (2021-05-05)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.0.4 ([#136](https://github.com/podium-lib/client/issues/136)) ([9f71f0f](https://github.com/podium-lib/client/commit/9f71f0fe3c579d58c6a3b5376f8d9a0f3165867e)), closes [#142](https://github.com/podium-lib/client/issues/142)
* **deps:** update dependency @podium/schemas to v4.0.5 ([e9263c9](https://github.com/podium-lib/client/commit/e9263c9c7d7a890bd913249ea29adce9ed786ea3))
* **deps:** update dependency @podium/schemas to v4.1.10 ([8f12c52](https://github.com/podium-lib/client/commit/8f12c52ed6e3f0e214e66ee4c293e65422a0b9f2))
* **deps:** update dependency @podium/schemas to v4.1.11 ([4f136aa](https://github.com/podium-lib/client/commit/4f136aa20e99537dc8e4633133325b95a035640f))
* **deps:** update dependency @podium/schemas to v4.1.14 ([3870a77](https://github.com/podium-lib/client/commit/3870a77ccd7d03f05f051e42c49dfa4b1cd25e14))
* **deps:** update dependency @podium/schemas to v4.1.15 ([f9eea3f](https://github.com/podium-lib/client/commit/f9eea3faa87047316ace92382780899fc6d1533e))
* **deps:** update dependency @podium/schemas to v4.1.16 ([2156ae4](https://github.com/podium-lib/client/commit/2156ae49c6832a9d9895bdb4d506b83c5c67205e))
* **deps:** update dependency @podium/utils to v4.3.1 ([f5483b6](https://github.com/podium-lib/client/commit/f5483b6445baf36e6d1d33daa59da564a42ef33e))
* **deps:** update dependency @podium/utils to v4.3.3 ([f4ee3a2](https://github.com/podium-lib/client/commit/f4ee3a2d6e821cfd9033deac4ed5661c0eb5fbf8))
* **deps:** update dependency @podium/utils to v4.4.0 ([f3712b3](https://github.com/podium-lib/client/commit/f3712b3be5e17d0e2956e9e4cae3cf79696a3634))
* **deps:** update dependency @podium/utils to v4.4.1 ([3f0dddc](https://github.com/podium-lib/client/commit/3f0dddcf3b203d1903dc13fa4522c632459ae48b))
* **deps:** update dependency @podium/utils to v4.4.13 ([6771733](https://github.com/podium-lib/client/commit/67717335c91b5366c2931cbf8d34e5d62c720678))
* **deps:** update dependency @podium/utils to v4.4.14 ([cd7ed39](https://github.com/podium-lib/client/commit/cd7ed39fadf12232a6fc67678815dd30c8a076ac))
* **deps:** update dependency @podium/utils to v4.4.15 ([ce00590](https://github.com/podium-lib/client/commit/ce00590e5c5eb23ca138f4337605b8a84787e01c))
* **deps:** update dependency @podium/utils to v4.4.16 ([f0bfe5f](https://github.com/podium-lib/client/commit/f0bfe5f24d4fc0a69e36cab7e80b0d8d11415aca))
* **deps:** update dependency @podium/utils to v4.4.17 ([a57669c](https://github.com/podium-lib/client/commit/a57669c5e26745a04b5e7b453db41049d7aea8c7))
* Update @podium/schema to version 4.1.9 to fix ajv error ([#188](https://github.com/podium-lib/client/issues/188)) ([1b03065](https://github.com/podium-lib/client/commit/1b0306562a15e0fe496adb22bf9b2aa76ac26436))
### Features
* Convert to ESM ([#206](https://github.com/podium-lib/client/issues/206)) ([d31298f](https://github.com/podium-lib/client/commit/d31298fac7e1b84dc401c5832bce132a68a84943))
### BREAKING CHANGES
* Convert from CommonJS to ESM
* fix: Remove outcommented code
Co-authored-by: Trygve Lie <trygve.lie@finn.no>
# [5.0.0-next.6](https://github.com/podium-lib/client/compare/v5.0.0-next.5...v5.0.0-next.6) (2020-10-06)
## [4.4.19](https://github.com/podium-lib/client/compare/v4.4.18...v4.4.19) (2021-04-27)

@@ -107,2 +145,110 @@

* `HttpIncoming` must now be passed as the first argument to .fetch() and .stream()
* **deps:** update dependency @podium/utils to v4.4.17 ([a57669c](https://github.com/podium-lib/client/commit/a57669c5e26745a04b5e7b453db41049d7aea8c7))
## [4.4.18](https://github.com/podium-lib/client/compare/v4.4.17...v4.4.18) (2021-04-27)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.1.16 ([2156ae4](https://github.com/podium-lib/client/commit/2156ae49c6832a9d9895bdb4d506b83c5c67205e))
## [4.4.17](https://github.com/podium-lib/client/compare/v4.4.16...v4.4.17) (2021-04-12)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.4.16 ([f0bfe5f](https://github.com/podium-lib/client/commit/f0bfe5f24d4fc0a69e36cab7e80b0d8d11415aca))
## [4.4.16](https://github.com/podium-lib/client/compare/v4.4.15...v4.4.16) (2021-04-11)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.1.15 ([f9eea3f](https://github.com/podium-lib/client/commit/f9eea3faa87047316ace92382780899fc6d1533e))
## [4.4.15](https://github.com/podium-lib/client/compare/v4.4.14...v4.4.15) (2021-04-02)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.4.15 ([ce00590](https://github.com/podium-lib/client/commit/ce00590e5c5eb23ca138f4337605b8a84787e01c))
## [4.4.14](https://github.com/podium-lib/client/compare/v4.4.13...v4.4.14) (2021-04-02)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.4.14 ([cd7ed39](https://github.com/podium-lib/client/commit/cd7ed39fadf12232a6fc67678815dd30c8a076ac))
## [4.4.13](https://github.com/podium-lib/client/compare/v4.4.12...v4.4.13) (2021-04-02)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.1.14 ([3870a77](https://github.com/podium-lib/client/commit/3870a77ccd7d03f05f051e42c49dfa4b1cd25e14))
## [4.4.12](https://github.com/podium-lib/client/compare/v4.4.11...v4.4.12) (2021-04-01)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.4.13 ([6771733](https://github.com/podium-lib/client/commit/67717335c91b5366c2931cbf8d34e5d62c720678))
## [4.4.11](https://github.com/podium-lib/client/compare/v4.4.10...v4.4.11) (2021-04-01)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.1.11 ([4f136aa](https://github.com/podium-lib/client/commit/4f136aa20e99537dc8e4633133325b95a035640f))
## [4.4.10](https://github.com/podium-lib/client/compare/v4.4.9...v4.4.10) (2021-03-31)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.1.10 ([8f12c52](https://github.com/podium-lib/client/commit/8f12c52ed6e3f0e214e66ee4c293e65422a0b9f2))
## [4.4.9](https://github.com/podium-lib/client/compare/v4.4.8...v4.4.9) (2021-03-31)
### Bug Fixes
* Update @podium/schema to version 4.1.9 to fix ajv error ([#188](https://github.com/podium-lib/client/issues/188)) ([1b03065](https://github.com/podium-lib/client/commit/1b0306562a15e0fe496adb22bf9b2aa76ac26436))
## [4.4.8](https://github.com/podium-lib/client/compare/v4.4.7...v4.4.8) (2020-10-29)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.4.1 ([3f0dddc](https://github.com/podium-lib/client/commit/3f0dddcf3b203d1903dc13fa4522c632459ae48b))
## [4.4.7](https://github.com/podium-lib/client/compare/v4.4.6...v4.4.7) (2020-10-12)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.4.0 ([f3712b3](https://github.com/podium-lib/client/commit/f3712b3be5e17d0e2956e9e4cae3cf79696a3634))
## [4.4.6](https://github.com/podium-lib/client/compare/v4.4.5...v4.4.6) (2020-10-10)
### Bug Fixes
* **deps:** update dependency @podium/utils to v4.3.3 ([f4ee3a2](https://github.com/podium-lib/client/commit/f4ee3a2d6e821cfd9033deac4ed5661c0eb5fbf8))
## [4.4.5](https://github.com/podium-lib/client/compare/v4.4.4...v4.4.5) (2020-10-10)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.0.5 ([e9263c9](https://github.com/podium-lib/client/commit/e9263c9c7d7a890bd913249ea29adce9ed786ea3))
## [4.4.4](https://github.com/podium-lib/client/compare/v4.4.3...v4.4.4) (2020-10-06)
### Bug Fixes
* **deps:** update dependency @podium/schemas to v4.0.4 ([#136](https://github.com/podium-lib/client/issues/136)) ([9f71f0f](https://github.com/podium-lib/client/commit/9f71f0fe3c579d58c6a3b5376f8d9a0f3165867e)), closes [#142](https://github.com/podium-lib/client/issues/142)
* **deps:** update dependency @podium/utils to v4.3.1 ([f5483b6](https://github.com/podium-lib/client/commit/f5483b6445baf36e6d1d33daa59da564a42ef33e))
## [4.4.3](https://github.com/podium-lib/client/compare/v4.4.2...v4.4.3) (2020-10-06)

@@ -109,0 +255,0 @@

29

lib/client.js

@@ -1,14 +0,12 @@

'use strict';
import EventEmitter from 'events';
import * as schemas from '@podium/schemas';
import Metrics from '@metrics/client';
import abslog from 'abslog';
import Cache from 'ttl-mem-cache';
import http from 'http';
import https from 'https';
const EventEmitter = require('events');
const { validate } = require('@podium/schemas');
const Metrics = require('@metrics/client');
const abslog = require('abslog');
const Cache = require('ttl-mem-cache');
const http = require('http');
const https = require('https');
import Resource from './resource.js';
import State from './state.js';
const Resource = require('./resource');
const State = require('./state');
const inspect = Symbol.for('nodejs.util.inspect.custom');

@@ -39,3 +37,3 @@

const PodiumClient = class PodiumClient extends EventEmitter {
export default class PodiumClient extends EventEmitter {
#resources;

@@ -51,3 +49,3 @@ #registry;

if (validate.name(options.name).error) {
if (schemas.name(options.name).error) {
throw new Error(

@@ -133,3 +131,3 @@ `The value, "${options.name}", for the required argument "name" on the Client constructor is not defined or not valid.`,

register(options = {}) {
if (validate.name(options.name).error)
if (schemas.name(options.name).error)
throw new Error(

@@ -139,3 +137,3 @@ `The value, "${options.name}", for the required argument "name" on the .register() method is not defined or not valid.`,

if (validate.uriStrict(options.uri).error)
if (schemas.uriStrict(options.uri).error)
throw new Error(

@@ -211,2 +209,1 @@ `The value, "${options.uri}", for the required argument "uri" on the .register() method is not defined or not valid.`,

};
module.exports = PodiumClient;
/* eslint-disable no-underscore-dangle */
'use strict';
import { PassThrough } from 'readable-stream';
import assert from 'assert';
const { PassThrough } = require('readable-stream');
const assert = require('assert');
const PodletClientHttpOutgoing = class PodletClientHttpOutgoing extends PassThrough {
export default class PodletClientHttpOutgoing extends PassThrough {
#killRecursions;

@@ -222,2 +220,1 @@ #killThreshold;

};
module.exports = PodletClientHttpOutgoing;
/* eslint-disable no-plusplus */
/* eslint-disable no-param-reassign */
'use strict';
import clonedeep from 'lodash.clonedeep';
import abslog from 'abslog';
import assert from 'assert';
const clonedeep = require('lodash.clonedeep');
const abslog = require('abslog');
const assert = require('assert');
module.exports = class PodletClientCacheResolver {
export default class PodletClientCacheResolver {
#registry;

@@ -12,0 +10,0 @@ #log;

/* eslint-disable no-param-reassign */
'use strict';
import { pipeline } from 'readable-stream';
import Metrics from '@metrics/client';
import request from 'request';
import abslog from 'abslog';
import * as putils from '@podium/utils';
import { Boom, badGateway } from '@hapi/boom';
const { pipeline } = require('readable-stream');
const Metrics = require('@metrics/client');
const request = require('request');
const abslog = require('abslog');
const putils = require('@podium/utils');
const { Boom, badGateway } = require('@hapi/boom');
const Response = require('./response');
const utils = require('./utils');
const pkg = require('../package.json');
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs';
import * as utils from './utils.js';
import Response from './response.js';
const currentDirectory = dirname(fileURLToPath(import.meta.url));
const pkgJson = fs.readFileSync(join(currentDirectory, '../package.json'), 'utf-8');
const pkg = JSON.parse(pkgJson);
const UA_STRING = `${pkg.name} ${pkg.version}`;
module.exports = class PodletClientContentResolver {
export default class PodletClientContentResolver {
#log;

@@ -19,0 +25,0 @@ #agent;

/* eslint-disable no-param-reassign */
'use strict';
import request from 'request';
import abslog from 'abslog';
import Metrics from '@metrics/client';
const request = require('request');
const abslog = require('abslog');
const Metrics = require('@metrics/client');
const pkg = require('../package.json');
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs';
const currentDirectory = dirname(fileURLToPath(import.meta.url));
const pkgJson = fs.readFileSync(join(currentDirectory, '../package.json'), 'utf-8');
const pkg = JSON.parse(pkgJson);
const UA_STRING = `${pkg.name} ${pkg.version}`;
module.exports = class PodletClientFallbackResolver {
export default class PodletClientFallbackResolver {
#log;

@@ -14,0 +20,0 @@ #agent;

@@ -1,12 +0,10 @@

'use strict';
import Metrics from '@metrics/client';
import abslog from 'abslog';
import assert from 'assert';
import Manifest from './resolver.manifest.js';
import Fallback from './resolver.fallback.js';
import Content from './resolver.content.js';
import Cache from './resolver.cache.js';
const Metrics = require('@metrics/client');
const abslog = require('abslog');
const assert = require('assert');
const Manifest = require('./resolver.manifest');
const Fallback = require('./resolver.fallback');
const Content = require('./resolver.content');
const Cache = require('./resolver.cache');
module.exports = class PodletClientResolver {
export default class PodletClientResolver {
#cache;

@@ -13,0 +11,0 @@ #manifest;

/* eslint-disable no-param-reassign */
'use strict';
import CachePolicy from 'http-cache-semantics';
import * as schemas from'@podium/schemas';
import request from 'request';
import Metrics from '@metrics/client';
import abslog from 'abslog';
import * as utils from '@podium/utils';
const { validate } = require('@podium/schemas');
const CachePolicy = require('http-cache-semantics');
const request = require('request');
const Metrics = require('@metrics/client');
const abslog = require('abslog');
const utils = require('@podium/utils');
const pkg = require('../package.json');
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs';
const currentDirectory = dirname(fileURLToPath(import.meta.url));
const pkgJson = fs.readFileSync(join(currentDirectory, '../package.json'), 'utf-8');
const pkg = JSON.parse(pkgJson);
const UA_STRING = `${pkg.name} ${pkg.version}`;
module.exports = class PodletClientManifestResolver {
export default class PodletClientManifestResolver {
#log;

@@ -110,3 +116,3 @@ #agent;

const manifest = validate.manifest(body);
const manifest = schemas.manifest(body);

@@ -113,0 +119,0 @@ // Manifest validation error

/* eslint-disable no-param-reassign */
'use strict';
import Metrics from '@metrics/client';
import stream from 'readable-stream';
import abslog from 'abslog';
import assert from 'assert';
const Metrics = require('@metrics/client');
const stream = require('readable-stream');
const abslog = require('abslog');
const assert = require('assert');
import HttpOutgoing from './http-outgoing.js';
import Response from './response.js';
import Resolver from './resolver.js';
import * as utils from './utils.js';
const HttpOutgoing = require('./http-outgoing');
const Response = require('./response');
const Resolver = require('./resolver');
const utils = require('./utils');
const inspect = Symbol.for('nodejs.util.inspect.custom');
const PodiumClientResource = class PodiumClientResource {
export default class PodiumClientResource {
#resolver;

@@ -121,2 +119,1 @@ #options;

};
module.exports = PodiumClientResource;

@@ -1,6 +0,4 @@

'use strict';
const inspect = Symbol.for('nodejs.util.inspect.custom');
const PodiumClientResponse = class PodiumClientResponse {
export default class PodiumClientResponse {
#redirect;

@@ -81,2 +79,1 @@ #content;

};
module.exports = PodiumClientResponse;

@@ -1,8 +0,6 @@

'use strict';
import EventEmitter from 'events';
const EventEmitter = require('events');
const inspect = Symbol.for('nodejs.util.inspect.custom');
const PodiumClientState = class PodiumClientState extends EventEmitter {
export default class PodiumClientState extends EventEmitter {
#thresholdTimer;

@@ -119,2 +117,1 @@ #threshold;

};
module.exports = PodiumClientState;

@@ -1,3 +0,1 @@

'use strict';
/**

@@ -14,3 +12,3 @@ * Checks if a header Oject has a header.

module.exports.isHeaderDefined = (headers, header) => {
export const isHeaderDefined = (headers, header) => {
if (headers[header] === undefined || headers[header].trim() === '') {

@@ -32,3 +30,3 @@ return false;

module.exports.hasManifestChange = item => {
export const hasManifestChange = item => {
const oldVersion = item.oldVal ? item.oldVal.version : '';

@@ -39,25 +37,2 @@ const newVersion = item.newVal ? item.newVal.version : '';

/**
* Check if a value is a HttpIncoming object or not. If not, it
* assume the incoming value is a context
*
* @param {Object} incoming A object
*
* @returns {HttpIncoming}
function incomingDeprecated() {
if (!incomingDeprecated.warned) {
incomingDeprecated.warned = true;
process.emitWarning(
'Passing an arbitrary value as the first argument to .fetch() and .stream() is deprecated. In a future version it will be required to pass in a HttpIncoming object as a the first argument to these methods. For further information and how to migrate, please see https://podium-lib.io/blog/2019/06/14/version-4.0.0#httpincoming-replaces-context-argument',
'DeprecationWarning',
);
}
}
*/
module.exports.validateIncoming = (incoming = {}) => {
return (Object.prototype.toString.call(incoming) === '[object PodiumHttpIncoming]');
};
export const validateIncoming = (incoming = {}) => (Object.prototype.toString.call(incoming) === '[object PodiumHttpIncoming]');
{
"name": "@podium/client",
"version": "5.0.0-next.6",
"main": "lib/client.js",
"version": "5.0.0-next.7",
"type": "module",
"license": "MIT",

@@ -27,4 +27,10 @@ "keywords": [

"LICENSE",
"dist",
"lib"
],
"main": "./dist/client.js",
"exports": {
"require": "./dist/client.js",
"import": "./lib/client.js"
},
"types": "index.d.ts",

@@ -34,4 +40,5 @@ "scripts": {

"lint:fix": "eslint --fix .",
"test": "tap --no-esm --no-cov --no-ts --no-jsx test/*.js",
"precommit": "lint-staged"
"test": "tap --no-check-coverage",
"prepare": "npm run -s build",
"build": "rollup -c"
},

@@ -41,4 +48,4 @@ "dependencies": {

"@metrics/client": "2.5.0",
"@podium/schemas": "5.0.0-next.1",
"@podium/utils": "5.0.0-next.2",
"@podium/schemas": "5.0.0-next.4",
"@podium/utils": "5.0.0-next.6",
"abslog": "2.4.0",

@@ -52,25 +59,26 @@ "http-cache-semantics": "^4.0.3",

"devDependencies": {
"@podium/test-utils": "2.3.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/commit-analyzer": "8.0.1",
"@semantic-release/git": "9.0.0",
"@semantic-release/github": "7.0.7",
"@semantic-release/npm": "7.0.5",
"@semantic-release/release-notes-generator": "9.0.1",
"semantic-release": "17.1.1",
"@podium/test-utils": "2.2.0",
"@sinonjs/fake-timers": "6.0.1",
"@semantic-release/github": "7.2.1",
"@semantic-release/npm": "7.1.1",
"@semantic-release/release-notes-generator": "9.0.2",
"@sinonjs/fake-timers": "7.0.5",
"babel-eslint": "10.1.0",
"benchmark": "2.1.4",
"eslint": "7.5.0",
"eslint-config-airbnb-base": "14.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-prettier": "3.1.4",
"babel-eslint": "10.1.0",
"eslint": "7.25.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-prettier": "3.4.0",
"express": "4.17.1",
"get-stream": "6.0.0",
"get-stream": "6.0.1",
"http-proxy": "1.18.1",
"is-stream": "2.0.0",
"prettier": "2.0.5",
"tap": "14.10.8"
"prettier": "2.2.1",
"rollup": "2.46.0",
"semantic-release": "17.4.2",
"tap": "15.0.6"
}
}
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