@theshelf/http 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Http } from './definitions/interfaces';
1
+ import type { Http } from './definitions/interfaces.js';
2
2
  export default class Memory implements Http {
3
3
  #private;
4
4
  constructor(implementation: Http);
package/dist/Client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { HTTP_METHODS } from './definitions/constants';
1
+ import { HTTP_METHODS } from './definitions/constants.js';
2
2
  export default class Memory {
3
3
  #implementation;
4
4
  #cache = new Map();
@@ -1,4 +1,4 @@
1
- import HttpError from './HttpError';
1
+ import HttpError from './HttpError.js';
2
2
  export default class UnknownImplementation extends HttpError {
3
3
  constructor(name: string);
4
4
  }
@@ -1,4 +1,4 @@
1
- import HttpError from './HttpError';
1
+ import HttpError from './HttpError.js';
2
2
  export default class UnknownImplementation extends HttpError {
3
3
  constructor(name) {
4
4
  super(`Unknown http implementation: ${name}`);
@@ -1,3 +1,3 @@
1
- import type { Http } from './definitions/interfaces';
1
+ import type { Http } from './definitions/interfaces.js';
2
2
  declare const _default: Http;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
- import UnknownImplementation from './errors/UnknownImplementation';
2
- import createFetch from './implementations/fetch/create';
1
+ import UnknownImplementation from './errors/UnknownImplementation.js';
2
+ import createFetch from './implementations/fetch/create.js';
3
3
  const implementations = new Map([
4
4
  ['fetch', createFetch]
5
5
  ]);
@@ -1,4 +1,4 @@
1
- import type { Http } from '../../definitions/interfaces';
1
+ import type { Http } from '../../definitions/interfaces.js';
2
2
  export default class Fetch implements Http {
3
3
  get(url: string, headers?: Record<string, string> | undefined): Promise<Response>;
4
4
  post(url: string, body: unknown, headers?: Record<string, string> | undefined): Promise<Response>;
@@ -1,4 +1,4 @@
1
- import { HTTP_METHODS } from '../../definitions/constants';
1
+ import { HTTP_METHODS } from '../../definitions/constants.js';
2
2
  export default class Fetch {
3
3
  get(url, headers) {
4
4
  return fetch(url, { method: HTTP_METHODS.GET, headers });
@@ -1,2 +1,2 @@
1
- import Fetch from './Fetch';
1
+ import Fetch from './Fetch.js';
2
2
  export default function create(): Fetch;
@@ -1,4 +1,4 @@
1
- import Fetch from './Fetch';
1
+ import Fetch from './Fetch.js';
2
2
  export default function create() {
3
3
  return new Fetch();
4
4
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Client from './Client';
1
+ import Client from './Client.js';
2
2
  declare const client: Client;
3
- export * from './definitions/constants';
3
+ export * from './definitions/constants.js';
4
4
  export default client;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import Client from './Client';
2
- import implementation from './implementation';
1
+ import Client from './Client.js';
2
+ import implementation from './implementation.js';
3
3
  const client = new Client(implementation);
4
- export * from './definitions/constants';
4
+ export * from './definitions/constants.js';
5
5
  export default client;
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@theshelf/http",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
+ "repository": {
7
+ "url": "https://github.com/MaskingTechnology/theshelf"
8
+ },
6
9
  "scripts": {
7
10
  "build": "tsc",
8
11
  "clean": "rimraf dist",