@stuntman/shared 0.3.3 → 0.3.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.
@@ -1,4 +1,4 @@
1
- import type * as Stuntman from '.';
1
+ import type * as Stuntman from './index.js';
2
2
  export interface AppErrorInterface {
3
3
  name?: string;
4
4
  httpCode: Stuntman.HttpCode;
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Config } from './index';
1
+ import type { Config } from './index.js';
2
2
  declare const _default: Config;
3
3
  export default _default;
4
4
  //# sourceMappingURL=config.d.ts.map
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
- import { DEFAULT_API_PORT, DEFAULT_MOCK_DOMAIN, EXTERNAL_DNS, DEFAULT_MOCK_PORT, DEFAULT_PROXY_TIMEOUT, DEFAULT_CACHE_MAX_ENTRIES, DEFAULT_CACHE_MAX_SIZE, DEFAULT_CACHE_TTL, } from './constants';
2
- import nodeConfig from 'config';
1
+ import { DEFAULT_API_PORT, DEFAULT_MOCK_DOMAIN, EXTERNAL_DNS, DEFAULT_MOCK_PORT, DEFAULT_PROXY_TIMEOUT, DEFAULT_CACHE_MAX_ENTRIES, DEFAULT_CACHE_MAX_SIZE, DEFAULT_CACHE_TTL, } from './constants.js';
2
+ import nodeConfig from 'config.js';
3
3
  import path from 'path';
4
4
  // TODO safeguards & defaults
5
5
  const defaultConfig = {
@@ -1,4 +1,4 @@
1
1
  /// <reference types="node" />
2
- import type * as Stuntman from './index';
2
+ import type * as Stuntman from './index.js';
3
3
  export declare const naiveGQLParser: (body: Buffer | string) => Stuntman.GQLRequestBody | undefined;
4
4
  //# sourceMappingURL=gqlParser.d.ts.map
package/dist/gqlParser.js CHANGED
@@ -1,4 +1,4 @@
1
- import { logger } from './logger';
1
+ import { logger } from './logger.js';
2
2
  export const naiveGQLParser = (body) => {
3
3
  // TODO consider real parser :P
4
4
  try {
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export * from './constants';
2
- export * from './appError';
3
- export * from './logger';
4
- export * from './stringify';
5
- export * from './rawHeaders';
6
- export * from './gqlParser';
7
- export * from './escapeStringRegexp';
8
- export * from './errorToLog';
1
+ export * from './constants.js';
2
+ export * from './appError.js';
3
+ export * from './logger.js';
4
+ export * from './stringify.js';
5
+ export * from './rawHeaders.js';
6
+ export * from './gqlParser.js';
7
+ export * from './escapeStringRegexp.js';
8
+ export * from './errorToLog.js';
9
9
  export declare const stuntmanConfig: Config;
10
10
  export declare const INDEX_DTS: string;
11
11
  type NonObject = string | number | boolean | symbol | undefined | null | any[];
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  /* eslint-disable @typescript-eslint/ban-types */
2
- import config from './config';
2
+ import config from './config.js';
3
3
  import { dirname } from 'path';
4
4
  import { fileURLToPath } from 'url';
5
- export * from './constants';
6
- export * from './appError';
7
- export * from './logger';
8
- export * from './stringify';
9
- export * from './rawHeaders';
10
- export * from './gqlParser';
11
- export * from './escapeStringRegexp';
12
- export * from './errorToLog';
5
+ export * from './constants.js';
6
+ export * from './appError.js';
7
+ export * from './logger.js';
8
+ export * from './stringify.js';
9
+ export * from './rawHeaders.js';
10
+ export * from './gqlParser.js';
11
+ export * from './escapeStringRegexp.js';
12
+ export * from './errorToLog.js';
13
13
  import fs from 'fs';
14
14
  export const stuntmanConfig = config;
15
15
  const __dirname = dirname(fileURLToPath(import.meta.url)).replace(/\/src$/, '/dist');
@@ -1,4 +1,4 @@
1
- import type * as Stuntman from '.';
1
+ import type * as Stuntman from './index.js';
2
2
  export declare class RawHeaders extends Array<string> implements Stuntman.RawHeadersInterface {
3
3
  get(name: string): string | undefined;
4
4
  has(name: string, value?: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stuntman/shared",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Stuntman - HTTP proxy / mock shared types and utils",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,10 +52,6 @@
52
52
  "LICENSE",
53
53
  "CHANGELOG.md"
54
54
  ],
55
- "tsc-alias": {
56
- "resolveFullPaths": true,
57
- "verbose": false
58
- },
59
55
  "scripts": {
60
56
  "test": "NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test LOG_LEVEL=silent NODE_CONFIG_STRICT_MODE= SUPPRESS_NO_CONFIG_WARNING=1 jest --coverage",
61
57
  "clean": "rm -fr dist",