Skip to content
Permalink
Browse files

refactor: moving things around

BREAKING CHANGE:
Not exporting GotService, getDebug, localDateUtil anymore (they're "in progress", not production ready yet).
  • Loading branch information...
kirillgroshkov committed Feb 16, 2019
1 parent 66cbf8c commit 6169c65fb008f9b871e507c1de2e1c9330396e9a
@@ -0,0 +1,12 @@
import { GotJSONOptions } from 'got'
import * as http from 'http'

export interface GotOptions extends GotJSONOptions {}

export interface GotResponse<T = string> extends http.IncomingMessage {
body: T
url: string
requestUrl: string
fromCache: boolean
redirectUrls?: string[]
}
File renamed without changes.
@@ -1,19 +1,8 @@
import { GotJSONOptions } from 'got'
import * as got from 'got'
import * as http from 'http'
import { getDebug } from '../util/debug'
import { getDebug } from '../log/debug'
import { GotOptions, GotResponse } from './got.model'
const debug = getDebug(__filename)

export interface GotOptions extends GotJSONOptions {}

export interface GotResponse<T = string> extends http.IncomingMessage {
body: T
url: string
requestUrl: string
fromCache: boolean
redirectUrls?: string[]
}

class GotService {
/**
* Just a proxy method, to simplify importing `* as got`, etc.
@@ -1,8 +1,4 @@
import { GotOptions, GotResponse, gotService } from './service/got.service'
import { getDebug } from './util/debug'
import { localDateUtil, LUXON_ISO_DATE_FORMAT } from './util/localDate.util'
import { localTimeUtil } from './util/localTime.util'
import { processSharedUtil } from './util/process.shared.util'
import { processSharedUtil } from './infra/process.shared.util'
import { zipSharedUtil } from './util/zip.shared.util'
import { ExtendedJoi, Joi } from './validation/joi/joi.extensions'
import {
@@ -30,13 +26,14 @@ import { JoiValidationError } from './validation/joi/joi.validation.error'
import { JoiValidationResult, joiValidationService } from './validation/joi/joi.validation.service'

export {
GotOptions,
GotResponse,
gotService,
getDebug,
LUXON_ISO_DATE_FORMAT,
localDateUtil,
localTimeUtil,
// todo: in progress, not exported yet
// GotOptions,
// GotResponse,
// gotService,
// getDebug,
// LUXON_ISO_DATE_FORMAT,
// localDateUtil,
// localTimeUtil,
JoiValidationError,
JoiValidationResult,
joiValidationService,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6169c65

Please sign in to comment.
You can’t perform that action at this time.