Reorganize file structure

This commit is contained in:
yumauri
2020-02-12 13:12:25 +03:00
parent 9d86b3b089
commit 5312b26400
25 changed files with 47 additions and 46 deletions
+1
View File
@@ -6,4 +6,5 @@ yarn-error.log
.DS_Store
.project
.vscode
.idea
*.log
+1 -1
View File
@@ -1,5 +1,5 @@
import { HeadersModifier, HttpHeaders, Request } from './_types'
import { headers } from './_headers'
import { headers } from './internal/headers'
/**
* Adjust Request headers, for any request
+1 -1
View File
@@ -1,4 +1,4 @@
import { path } from './_path'
import { path } from './internal/path'
/**
* Adjust Request url, by adding `/convert` to it
+4 -4
View File
@@ -1,8 +1,8 @@
import { ChromeRequestFields, HtmlRequest, Request, RequestType } from './_types'
import { pipe } from './_pipe'
import { fields } from './_fields'
import { path } from './_path'
import { type } from './_type'
import { pipe } from './tools/pipe'
import { fields } from './internal/fields'
import { path } from './internal/path'
import { type } from './internal/type'
/**
* Adjust Request url, by adding `/html` to it; Can add request parameters
+2 -2
View File
@@ -20,8 +20,8 @@ export * from './set-helpers'
export * from './to-helpers'
export * from './page'
// export pipe helper
export { pipe } from './_pipe'
// export pipe tool
export { pipe } from './tools/pipe'
// export types
export * from './_types'
+1 -1
View File
@@ -1,4 +1,4 @@
import { Request, RequestFields } from './_types'
import { Request, RequestFields } from '../_types'
/**
* Adjust Request fields, by extending `fields`
+1 -1
View File
@@ -1,4 +1,4 @@
import { HttpHeaders, Request } from './_types'
import { HttpHeaders, Request } from '../_types'
/**
* Adjust Request headers, by extending `headers`
+1 -1
View File
@@ -1,4 +1,4 @@
import { Request } from './_types'
import { Request } from '../_types'
/**
* Adjust Request fields, by adding given `path` to it
@@ -1,5 +1,5 @@
import { Readable } from 'stream'
import { FileURI, ObjectSource, PlainSource, Source, TupleSource } from './_types'
import { FileURI, ObjectSource, PlainSource, Source, TupleSource } from '../_types'
/**
* Check if argument is String
@@ -1,7 +1,7 @@
import { basename, extname } from 'path'
import { createReadStream, ReadStream } from 'fs'
import { Readable } from 'stream'
import { FileURI, PlainSource, Source, TupleSource, TupleStreamsSource } from './_types'
import { FileURI, PlainSource, Source, TupleSource, TupleStreamsSource } from '../_types'
import {
isBuffer,
isFileName,
@@ -12,7 +12,7 @@ import {
isString,
isTuple,
isURL,
} from './_source-checkers'
} from './source-checkers'
export const DEFAULT_FILENAME = 'index.html'
+1 -1
View File
@@ -7,7 +7,7 @@ import {
Request,
RequestType,
UrlRequest,
} from './_types'
} from '../_types'
/**
* Adjust Request fields, by changing `type`
+4 -4
View File
@@ -1,8 +1,8 @@
import { ChromeRequestFields, MarkdownRequest, Request, RequestType } from './_types'
import { pipe } from './_pipe'
import { fields } from './_fields'
import { path } from './_path'
import { type } from './_type'
import { pipe } from './tools/pipe'
import { fields } from './internal/fields'
import { path } from './internal/path'
import { type } from './internal/type'
/**
* Adjust Request url, by adding `/markdown` to it; Can add request parameters
+4 -4
View File
@@ -1,8 +1,8 @@
import { MergeRequest, Request, RequestType } from './_types'
import { isIterable, isObject } from './_source-checkers'
import { pipe } from './_pipe'
import { path } from './_path'
import { type } from './_type'
import { isIterable, isObject } from './internal/source-checkers'
import { pipe } from './tools/pipe'
import { path } from './internal/path'
import { type } from './internal/type'
/**
* Adjust Request url, by adding `/merge` to it
+3 -3
View File
@@ -1,7 +1,7 @@
import { OfficeRequest, Request, RequestType } from './_types'
import { pipe } from './_pipe'
import { path } from './_path'
import { type } from './_type'
import { pipe } from './tools/pipe'
import { path } from './internal/path'
import { type } from './internal/type'
/**
* Adjust Request url, by adding `/office` to it
+3 -3
View File
@@ -1,7 +1,7 @@
import { PingRequest, Request, RequestType } from './_types'
import { pipe } from './_pipe'
import { path } from './_path'
import { type } from './_type'
import { pipe } from './tools/pipe'
import { path } from './internal/path'
import { type } from './internal/type'
/**
* Adjust Request url, by adding `/ping` to it
+1 -1
View File
@@ -1,6 +1,6 @@
import FormData from 'form-data'
import { PingRequest, RequestFields, RequestType, TupleStreamsSource, TypedRequest } from './_types'
import { DEFAULT_FILENAME, toStreams } from './_source-converters'
import { DEFAULT_FILENAME, toStreams } from './internal/source-converters'
/**
* Helper function to convert fields and files to form data
+1 -1
View File
@@ -1,5 +1,5 @@
import { FieldsModifier, Request, RequestFields } from './_types'
import { fields } from './_fields'
import { fields } from './internal/fields'
/**
* Adjust Request fields, for any request
+1 -1
View File
@@ -7,7 +7,7 @@ import {
PaperOptions,
RequestFields,
} from './_types'
import { fields } from './_fields'
import { fields } from './internal/fields'
import { marginSizes, paperSize } from './to-helpers'
/**
View File
+5 -5
View File
@@ -1,9 +1,9 @@
import { Request, RequestType, UrlRequest } from './_types'
import { isString, isURL } from './_source-checkers'
import { pipe } from './_pipe'
import { fields } from './_fields'
import { path } from './_path'
import { type } from './_type'
import { isString, isURL } from './internal/source-checkers'
import { pipe } from './tools/pipe'
import { fields } from './internal/fields'
import { path } from './internal/path'
import { type } from './internal/type'
/**
* Adjust Request url, by adding `/url` to it; Set `remoteURL` from source
@@ -1,5 +1,5 @@
import { Request } from '../src'
import { fields } from '../src/_fields'
import { Request } from '../../src'
import { fields } from '../../src/internal/fields'
// dumb object to test purity
const dumb = { url: 'test', fields: { landscape: false } }
@@ -1,5 +1,5 @@
import { Request } from '../src'
import { headers } from '../src/_headers'
import { Request } from '../../src'
import { headers } from '../../src/internal/headers'
// dumb object to test purity
const dumb = { url: 'test', headers: { Test: 'Test' } }
@@ -1,5 +1,5 @@
import { Request } from '../src'
import { path } from '../src/_path'
import { Request } from '../../src'
import { path } from '../../src/internal/path'
// dumb object to test purity
const dumb = { url: 'test', fields: {} }
@@ -10,7 +10,7 @@ import {
isString,
isTuple,
isURL,
} from '../src/_source-checkers'
} from '../../src/internal/source-checkers'
// tslint:disable no-any
@@ -1,5 +1,5 @@
import { Request, RequestType } from '../src'
import { type } from '../src/_type'
import { Request, RequestType } from '../../src'
import { type } from '../../src/internal/type'
// dumb object to test purity
const dumb = { type: RequestType.Undefined, url: 'test' }