new license file version [CI SKIP]

This commit is contained in:
2023-03-15 12:34:41 +00:00
parent 0a6d92a1f3
commit 61328d20ed
13115 changed files with 1892314 additions and 1 deletions

View File

@@ -0,0 +1,407 @@
import { Document, scalarOptions } from './index'
import { CST } from './parse-cst'
import { Type } from './util'
export const binaryOptions: scalarOptions.Binary
export const boolOptions: scalarOptions.Bool
export const intOptions: scalarOptions.Int
export const nullOptions: scalarOptions.Null
export const strOptions: scalarOptions.Str
export class Schema {
/** Default: `'tag:yaml.org,2002:'` */
static defaultPrefix: string
static defaultTags: {
/** Default: `'tag:yaml.org,2002:map'` */
MAP: string
/** Default: `'tag:yaml.org,2002:seq'` */
SEQ: string
/** Default: `'tag:yaml.org,2002:str'` */
STR: string
}
constructor(options: Schema.Options)
/**
* Convert any value into a `Node` using this schema, recursively turning
* objects into collections.
*
* @param wrapScalars If `true`, also wraps plain values in `Scalar` objects;
* if undefined or `false` and `value` is not an object, it will be returned
* directly.
* @param tag Use to specify the collection type, e.g. `"!!omap"`. Note that
* this requires the corresponding tag to be available in this schema.
*/
createNode(
value: any,
wrapScalars?: boolean,
tag?: string,
ctx?: Schema.CreateNodeContext
): Node
/**
* Convert a key and a value into a `Pair` using this schema, recursively
* wrapping all values as `Scalar` or `Collection` nodes.
*
* @param ctx To not wrap scalars, use a context `{ wrapScalars: false }`
*/
createPair(key: any, value: any, ctx?: Schema.CreateNodeContext): Pair
merge: boolean
name: Schema.Name
sortMapEntries: ((a: Pair, b: Pair) => number) | null
tags: Schema.Tag[]
}
export namespace Schema {
type Name = 'core' | 'failsafe' | 'json' | 'yaml-1.1'
interface Options {
/**
* Array of additional tags to include in the schema, or a function that may
* modify the schema's base tag array.
*/
customTags?: (TagId | Tag)[] | ((tags: Tag[]) => Tag[])
/**
* Enable support for `<<` merge keys.
*
* Default: `false` for YAML 1.2, `true` for earlier versions
*/
merge?: boolean
/**
* The base schema to use.
*
* Default: `"core"` for YAML 1.2, `"yaml-1.1"` for earlier versions
*/
schema?: Name
/**
* When stringifying, sort map entries. If `true`, sort by comparing key values with `<`.
*
* Default: `false`
*/
sortMapEntries?: boolean | ((a: Pair, b: Pair) => number)
/**
* @deprecated Use `customTags` instead.
*/
tags?: Options['customTags']
}
interface CreateNodeContext {
wrapScalars?: boolean
[key: string]: any
}
interface StringifyContext {
forceBlockIndent?: boolean
implicitKey?: boolean
indent?: string
indentAtStart?: number
inFlow?: boolean
[key: string]: any
}
type TagId =
| 'binary'
| 'bool'
| 'float'
| 'floatExp'
| 'floatNaN'
| 'floatTime'
| 'int'
| 'intHex'
| 'intOct'
| 'intTime'
| 'null'
| 'omap'
| 'pairs'
| 'set'
| 'timestamp'
type Tag = CustomTag | DefaultTag
interface BaseTag {
/**
* An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes.
*/
createNode?: (
schema: Schema,
value: any,
ctx: Schema.CreateNodeContext
) => YAMLMap | YAMLSeq | Scalar
/**
* If a tag has multiple forms that should be parsed and/or stringified differently, use `format` to identify them.
*/
format?: string
/**
* Used by `YAML.createNode` to detect your data type, e.g. using `typeof` or
* `instanceof`.
*/
identify(value: any): boolean
/**
* The `Node` child class that implements this tag. Required for collections and tags that have overlapping JS representations.
*/
nodeClass?: new () => any
/**
* Used by some tags to configure their stringification, where applicable.
*/
options?: object
/**
* Optional function stringifying the AST node in the current context. If your
* data includes a suitable `.toString()` method, you can probably leave this
* undefined and use the default stringifier.
*
* @param item The node being stringified.
* @param ctx Contains the stringifying context variables.
* @param onComment Callback to signal that the stringifier includes the
* item's comment in its output.
* @param onChompKeep Callback to signal that the output uses a block scalar
* type with the `+` chomping indicator.
*/
stringify?: (
item: Node,
ctx: Schema.StringifyContext,
onComment?: () => void,
onChompKeep?: () => void
) => string
/**
* The identifier for your data type, with which its stringified form will be
* prefixed. Should either be a !-prefixed local `!tag`, or a fully qualified
* `tag:domain,date:foo`.
*/
tag: string
}
interface CustomTag extends BaseTag {
/**
* A JavaScript class that should be matched to this tag, e.g. `Date` for `!!timestamp`.
* @deprecated Use `Tag.identify` instead
*/
class?: new () => any
/**
* Turns a CST node into an AST node. If returning a non-`Node` value, the
* output will be wrapped as a `Scalar`.
*/
resolve(doc: Document, cstNode: CST.Node): Node | any
}
interface DefaultTag extends BaseTag {
/**
* If `true`, together with `test` allows for values to be stringified without
* an explicit tag. For most cases, it's unlikely that you'll actually want to
* use this, even if you first think you do.
*/
default: true
/**
* Alternative form used by default tags; called with `test` match results.
*/
resolve(...match: string[]): Node | any
/**
* Together with `default` allows for values to be stringified without an
* explicit tag and detected using a regular expression. For most cases, it's
* unlikely that you'll actually want to use these, even if you first think
* you do.
*/
test: RegExp
}
}
export class Node {
/** A comment on or immediately after this */
comment?: string | null
/** A comment before this */
commentBefore?: string | null
/** Only available when `keepCstNodes` is set to `true` */
cstNode?: CST.Node
/**
* The [start, end] range of characters of the source parsed
* into this node (undefined for pairs or if not parsed)
*/
range?: [number, number] | null
/** A blank line before this node and its commentBefore */
spaceBefore?: boolean
/** A fully qualified tag, if required */
tag?: string
/** A plain JS representation of this node */
toJSON(arg?: any): any
/** The type of this node */
type?: Type | Pair.Type
}
export class Scalar extends Node {
constructor(value: any)
type?: Scalar.Type
/**
* By default (undefined), numbers use decimal notation.
* The YAML 1.2 core schema only supports 'HEX' and 'OCT'.
*/
format?: 'BIN' | 'HEX' | 'OCT' | 'TIME'
value: any
toJSON(arg?: any, ctx?: AST.NodeToJsonContext): any
toString(): string
}
export namespace Scalar {
type Type =
| Type.BLOCK_FOLDED
| Type.BLOCK_LITERAL
| Type.PLAIN
| Type.QUOTE_DOUBLE
| Type.QUOTE_SINGLE
}
export class Alias extends Node {
type: Type.ALIAS
source: Node
cstNode?: CST.Alias
toString(ctx: Schema.StringifyContext): string
}
export class Pair extends Node {
constructor(key: any, value?: any)
type: Pair.Type.PAIR | Pair.Type.MERGE_PAIR
/** Always Node or null when parsed, but can be set to anything. */
key: any
/** Always Node or null when parsed, but can be set to anything. */
value: any
cstNode?: never // no corresponding cstNode
toJSON(arg?: any, ctx?: AST.NodeToJsonContext): object | Map<any, any>
toString(
ctx?: Schema.StringifyContext,
onComment?: () => void,
onChompKeep?: () => void
): string
}
export namespace Pair {
enum Type {
PAIR = 'PAIR',
MERGE_PAIR = 'MERGE_PAIR'
}
}
export class Merge extends Pair {
type: Pair.Type.MERGE_PAIR
/** Always Scalar('<<'), defined by the type specification */
key: AST.PlainValue
/** Always YAMLSeq<Alias(Map)>, stringified as *A if length = 1 */
value: YAMLSeq
toString(ctx?: Schema.StringifyContext, onComment?: () => void): string
}
export class Collection extends Node {
type?: Type.MAP | Type.FLOW_MAP | Type.SEQ | Type.FLOW_SEQ | Type.DOCUMENT
items: any[]
schema?: Schema
/**
* Adds a value to the collection. For `!!map` and `!!omap` the value must
* be a Pair instance or a `{ key, value }` object, which may not have a key
* that already exists in the map.
*/
add(value: any): void
addIn(path: Iterable<any>, value: any): void
/**
* Removes a value from the collection.
* @returns `true` if the item was found and removed.
*/
delete(key: any): boolean
deleteIn(path: Iterable<any>): boolean
/**
* Returns item at `key`, or `undefined` if not found. By default unwraps
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
get(key: any, keepScalar?: boolean): any
getIn(path: Iterable<any>, keepScalar?: boolean): any
/**
* Checks if the collection includes a value with the key `key`.
*/
has(key: any): boolean
hasIn(path: Iterable<any>): boolean
/**
* Sets a value in this collection. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*/
set(key: any, value: any): void
setIn(path: Iterable<any>, value: any): void
}
export class YAMLMap extends Collection {
type?: Type.FLOW_MAP | Type.MAP
items: Array<Pair>
hasAllNullValues(): boolean
toJSON(arg?: any, ctx?: AST.NodeToJsonContext): object | Map<any, any>
toString(
ctx?: Schema.StringifyContext,
onComment?: () => void,
onChompKeep?: () => void
): string
}
export class YAMLSeq extends Collection {
type?: Type.FLOW_SEQ | Type.SEQ
delete(key: number | string | Scalar): boolean
get(key: number | string | Scalar, keepScalar?: boolean): any
has(key: number | string | Scalar): boolean
set(key: number | string | Scalar, value: any): void
hasAllNullValues(): boolean
toJSON(arg?: any, ctx?: AST.NodeToJsonContext): any[]
toString(
ctx?: Schema.StringifyContext,
onComment?: () => void,
onChompKeep?: () => void
): string
}
export namespace AST {
interface NodeToJsonContext {
anchors?: any[]
doc: Document
keep?: boolean
mapAsMap?: boolean
maxAliasCount?: number
onCreate?: (node: Node) => void
[key: string]: any
}
interface BlockFolded extends Scalar {
type: Type.BLOCK_FOLDED
cstNode?: CST.BlockFolded
}
interface BlockLiteral extends Scalar {
type: Type.BLOCK_LITERAL
cstNode?: CST.BlockLiteral
}
interface PlainValue extends Scalar {
type: Type.PLAIN
cstNode?: CST.PlainValue
}
interface QuoteDouble extends Scalar {
type: Type.QUOTE_DOUBLE
cstNode?: CST.QuoteDouble
}
interface QuoteSingle extends Scalar {
type: Type.QUOTE_SINGLE
cstNode?: CST.QuoteSingle
}
interface FlowMap extends YAMLMap {
type: Type.FLOW_MAP
cstNode?: CST.FlowMap
}
interface BlockMap extends YAMLMap {
type: Type.MAP
cstNode?: CST.Map
}
interface FlowSeq extends YAMLSeq {
type: Type.FLOW_SEQ
items: Array<Node>
cstNode?: CST.FlowSeq
}
interface BlockSeq extends YAMLSeq {
type: Type.SEQ
items: Array<Node | null>
cstNode?: CST.Seq
}
}

View File

@@ -0,0 +1,43 @@
/* Generated by `npm run build`, do not edit! */
"use strict"
var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g
var tt = require("acorn").tokTypes
module.exports = function(Parser) {
return /*@__PURE__*/(function (Parser) {
function anonymous () {
Parser.apply(this, arguments);
}
if ( Parser ) anonymous.__proto__ = Parser;
anonymous.prototype = Object.create( Parser && Parser.prototype );
anonymous.prototype.constructor = anonymous;
anonymous.prototype.parseExport = function parseExport (node, exports) {
skipWhiteSpace.lastIndex = this.pos
var skip = skipWhiteSpace.exec(this.input)
var next = this.input.charAt(this.pos + skip[0].length)
if (next !== "*") { return Parser.prototype.parseExport.call(this, node, exports) }
this.next()
var specifier = this.startNode()
this.expect(tt.star)
if (this.eatContextual("as")) {
node.declaration = null
specifier.exported = this.parseIdent(true)
this.checkExport(exports, specifier.exported.name, this.lastTokStart)
node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")]
}
this.expectContextual("from")
if (this.type !== tt.string) { this.unexpected() }
node.source = this.parseExprAtom()
this.semicolon()
return this.finishNode(node, node.specifiers ? "ExportNamedDeclaration" : "ExportAllDeclaration")
};
return anonymous;
}(Parser))
}

View File

@@ -0,0 +1,93 @@
# socks examples
## Example for SOCKS 'associate' command
The associate command tells the SOCKS proxy server to establish a UDP relay. The server binds to a new UDP port and communicates the newly opened port back to the origin client. From here, any SOCKS UDP frame packets sent to this special UDP port on the Proxy server will be forwarded to the desired destination, and any responses will be forwarded back to the origin client (you).
This can be used for things such as DNS queries, and other UDP communicates.
**Connection Steps**
1. Client -(associate)-> Proxy (Tells the proxy to create a UDP relay and bind on a new port)
2. Client <-(port)- Proxy (Tells the origin client which port it opened and is accepting UDP frame packets on)
At this point the proxy is accepting UDP frames on the specified port.
3. Client --(udp frame) -> Proxy -> Destination (The origin client sends a UDP frame to the proxy on the UDP port, and the proxy then forwards it to the destination specified in the UDP frame.)
4. Client <--(udp frame) <-- Proxy <-- Destination (The destination client responds to the udp packet sent in #3)
## Usage
The 'associate' command can only be used by creating a new SocksClient instance and listening for the 'established' event.
**Note:** UDP packets relayed through the proxy servers are packaged in a special Socks UDP frame format. SocksClient.createUDPFrame() and SocksClient.parseUDPFrame() create and parse these special UDP packets.
```typescript
import * as dgram from 'dgram';
import { SocksClient, SocksClientOptions } from 'socks';
// Create a local UDP socket for sending/receiving packets to/from the proxy.
const udpSocket = dgram.createSocket('udp4');
udpSocket.bind();
// Listen for incoming UDP packets from the proxy server.
udpSocket.on('message', (message, rinfo) => {
console.log(SocksClient.parseUDPFrame(message));
/*
{ frameNumber: 0,
remoteHost: { host: '8.8.8.8', port: 53 }, // The remote host that replied with a UDP packet
data: <Buffer 74 65 73 74 0a> // The data
}
*/
});
const options: SocksClientOptions = {
proxy: {
host: '104.131.124.203',
port: 1081,
type: 5
},
// This should be the ip and port of the expected client that will be sending UDP frames to the newly opened UDP port on the server.
// Most SOCKS servers accept 0.0.0.0 as a wildcard address to accept UDP frames from any source.
destination: {
host: '0.0.0.0',
port: 0
},
command: 'associate'
};
const client = new SocksClient(options);
// This event is fired when the SOCKS server has started listening on a new UDP port for UDP relaying.
client.on('established', info => {
console.log(info);
/*
{
socket: <Socket ...>,
remoteHost: { // This is the remote port on the SOCKS proxy server to send UDP frame packets to.
host: '104.131.124.203',
port: 58232
}
}
*/
// Send a udp frame to 8.8.8.8 on port 53 through the proxy.
const packet = SocksClient.createUDPFrame({
remoteHost: { host: '8.8.8.8', port: 53 },
data: Buffer.from('hello') // A DNS lookup in the real world.
});
// Send packet.
udpSocket.send(packet, info.remoteHost.port, info.remoteHost.host);
});
// SOCKS proxy failed to bind.
client.on('error', () => {
// Handle errors
});
// Start connection
client.connect();
```

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').allSeries;

View File

@@ -0,0 +1 @@
{"version":3,"file":"LookupSupportedLocales.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-localematcher/abstract/LookupSupportedLocales.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,gBAAgB,EAAE,MAAM,EAAE,YAiB3B"}

View File

@@ -0,0 +1,25 @@
/**
Get keys of the given type as strings.
Number keys are converted to strings.
Use-cases:
- Get string keys from a type which may have number keys.
- Makes it possible to index using strings retrieved from template types.
@example
```
import type {StringKeyOf} from 'type-fest';
type Foo = {
1: number,
stringKey: string,
};
type StringKeysOfFoo = StringKeyOf<Foo>;
//=> '1' | 'stringKey'
```
@category Object
*/
export type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;

View File

@@ -0,0 +1,10 @@
function hasInherit(property) {
for (var i = property.value.length - 1; i >= 0; i--) {
if (property.value[i][1] == 'inherit')
return true;
}
return false;
}
module.exports = hasInherit;

View File

@@ -0,0 +1 @@
{"version":3,"file":"lift.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI;IAAE,IAAI,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;CAAE,CAEhG;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,IAAI,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GACpF,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAaxB"}

View File

@@ -0,0 +1,39 @@
import { MonoTypeOperatorFunction } from '../types';
import { filter } from './filter';
/**
* Returns an Observable that skips the first `count` items emitted by the source Observable.
*
* ![](skip.png)
*
* Skips the values until the sent notifications are equal or less than provided skip count. It raises
* an error if skip count is equal or more than the actual number of emits and source raises an error.
*
* ## Example
*
* Skip the values before the emission
*
* ```ts
* import { interval, skip } from 'rxjs';
*
* // emit every half second
* const source = interval(500);
* // skip the first 10 emitted values
* const result = source.pipe(skip(10));
*
* result.subscribe(value => console.log(value));
* // output: 10...11...12...13...
* ```
*
* @see {@link last}
* @see {@link skipWhile}
* @see {@link skipUntil}
* @see {@link skipLast}
*
* @param {Number} count - The number of times, items emitted by source Observable should be skipped.
* @return A function that returns an Observable that skips the first `count`
* values emitted by the source Observable.
*/
export function skip<T>(count: number): MonoTypeOperatorFunction<T> {
return filter((_, index) => count <= index);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"IsWellFormedCurrencyCode.d.ts","sourceRoot":"","sources":["../../../../../../packages/ecma402-abstract/IsWellFormedCurrencyCode.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CASlE"}

View File

@@ -0,0 +1,3 @@
"use strict";
module.exports = { asCallback: require("./as-callback"), finally: require("./finally") };

View File

@@ -0,0 +1,102 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for csv2json/libs/core/rowSplit.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../prettify.css" />
<link rel="stylesheet" href="../../../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../../../index.html">All files</a> / <a href="index.html">csv2json/libs/core</a> rowSplit.js
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/70</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/35</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/5</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/70</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span></td><td class="text"><pre class="prettyprint lang-js">Unable to lookup source: /Users/kxiang/work/projects/csv2json/libs/core/rowSplit.js(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/libs/core/rowSplit.js')
Error: Unable to lookup source: /Users/kxiang/work/projects/csv2json/libs/core/rowSplit.js(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/libs/core/rowSplit.js')
at Context.defaultSourceLookup [as sourceFinder] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:15:15)
at Context.getSource (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:74:17)
at Object.annotateSourceCode (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:172:38)
at HtmlReport.onDetail (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/index.js:237:39)
at Visitor.(anonymous function) [as onDetail] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:34:30)
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:123:17)
at /Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:116:23
at Array.forEach (native)
at visitChildren (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:115:32)
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:126:5)</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:36:07 GMT+0100 (IST)
</div>
</div>
<script src="../../../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../../../sorter.js"></script>
<script src="../../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,4 @@
import { SchedulerLike } from '../types';
import { Observable } from '../Observable';
export declare function scheduleAsyncIterable<T>(input: AsyncIterable<T>, scheduler: SchedulerLike): Observable<T>;
//# sourceMappingURL=scheduleAsyncIterable.d.ts.map

View File

@@ -0,0 +1,77 @@
{
"name": "braces",
"description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.",
"version": "3.0.2",
"homepage": "https://github.com/micromatch/braces",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Brian Woodward (https://twitter.com/doowb)",
"Elan Shanker (https://github.com/es128)",
"Eugene Sharygin (https://github.com/eush77)",
"hemanth.hm (http://h3manth.com)",
"Jon Schlinkert (http://twitter.com/jonschlinkert)"
],
"repository": "micromatch/braces",
"bugs": {
"url": "https://github.com/micromatch/braces/issues"
},
"license": "MIT",
"files": [
"index.js",
"lib"
],
"main": "index.js",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "mocha",
"benchmark": "node benchmark"
},
"dependencies": {
"fill-range": "^7.0.1"
},
"devDependencies": {
"ansi-colors": "^3.2.4",
"bash-path": "^2.0.1",
"gulp-format-md": "^2.0.0",
"mocha": "^6.1.1"
},
"keywords": [
"alpha",
"alphabetical",
"bash",
"brace",
"braces",
"expand",
"expansion",
"filepath",
"fill",
"fs",
"glob",
"globbing",
"letter",
"match",
"matches",
"matching",
"number",
"numerical",
"path",
"range",
"ranges",
"sh"
],
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"lint": {
"reflinks": true
},
"plugins": [
"gulp-format-md"
]
}
}

View File

@@ -0,0 +1,7 @@
import { RequestMethod } from "./RequestMethod";
import { Url } from "./Url";
import { RequestParameters } from "./RequestParameters";
export type EndpointOptions = RequestParameters & {
method: RequestMethod;
url: Url;
};

View File

@@ -0,0 +1,14 @@
/**
Generate a unique random string.
@returns A 32 character unique string. Matches the length of MD5, which is [unique enough](https://stackoverflow.com/a/2444336/64949) for non-crypto purposes.
@example
```
import uniqueString from 'unique-string';
uniqueString();
//=> 'b4de2a49c8ffa3fbee04446f045483b2'
```
*/
export default function uniqueString(): string;

View File

@@ -0,0 +1,16 @@
import { ParseRuntime } from "./ParseRuntime";
/**
* convert data chunk to file lines array
* @param {string} data data chunk as utf8 string
* @param {object} param Converter param object
* @return {Object} {lines:[line1,line2...],partial:String}
*/
export declare function stringToLines(data: string, param: ParseRuntime): StringToLinesResult;
export interface StringToLinesResult {
lines: Fileline[];
/**
* last line which could be incomplete line.
*/
partial: string;
}
export declare type Fileline = string;

View File

@@ -0,0 +1,7 @@
import { Subscriber } from '../Subscriber';
/**
* Subscribes to an ArrayLike with a subscriber
* @param array The array or array-like to subscribe to
*/
export declare const subscribeToArray: <T>(array: ArrayLike<T>) => (subscriber: Subscriber<T>) => void;
//# sourceMappingURL=subscribeToArray.d.ts.map

View File

@@ -0,0 +1,15 @@
/** Used to match words composed of alphanumeric characters. */
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/**
* Splits an ASCII `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
module.exports = asciiWords;

View File

@@ -0,0 +1,24 @@
'use strict'
const f = require('./format-num.js')
class FloatingDateTime extends Date {
constructor (value) {
super(value + 'Z')
this.isFloating = true
}
toISOString () {
const date = `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`
const time = `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`
return `${date}T${time}`
}
}
module.exports = value => {
const date = new FloatingDateTime(value)
/* istanbul ignore if */
if (isNaN(date)) {
throw new TypeError('Invalid Datetime')
} else {
return date
}
}

View File

@@ -0,0 +1,25 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
var modulo = require('../modulo');
var Type = require('../Type');
// https://262.ecma-international.org/12.0/#sec-numeric-types-number-unsignedRightShift
module.exports = function NumberUnsignedRightShift(x, y) {
if (Type(x) !== 'Number' || Type(y) !== 'Number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = modulo(rnum, 32);
return lnum >>> shiftCount;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAO3D,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAChG,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACvH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAClC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EACzE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EACrC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EACzE,YAAY,EAAE,CAAC,GACd,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9B,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAC5B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EACtE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,8 @@
TIMESTAMP,UPDATE,UID,BYTES SENT,BYTES RCVED
"13954264""22","n,""10028"",""1213"",""5461""
"abc,
def, ccc", n,10013,9954,13560
1395426422,n,10013,9954,13560
1395426422,n,10109,221391500,141836
1395426422,n,10007,53448,308549
"1395426422,n,10022,15506,72125

View File

@@ -0,0 +1,28 @@
var toString = require('./toString');
/**
* Converts `string`, as a whole, to lower case just like
* [String#toLowerCase](https://mdn.io/toLowerCase).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.toLower('--Foo-Bar--');
* // => '--foo-bar--'
*
* _.toLower('fooBar');
* // => 'foobar'
*
* _.toLower('__FOO_BAR__');
* // => '__foo_bar__'
*/
function toLower(value) {
return toString(value).toLowerCase();
}
module.exports = toLower;

View File

@@ -0,0 +1,107 @@
var common = require('./common');
var fs = require('fs');
common.register('head', _head, {
canReceivePipe: true,
cmdOptions: {
'n': 'numLines',
},
});
// Reads |numLines| lines or the entire file, whichever is less.
function readSomeLines(file, numLines) {
var buf = common.buffer();
var bufLength = buf.length;
var bytesRead = bufLength;
var pos = 0;
var fdr = fs.openSync(file, 'r');
var numLinesRead = 0;
var ret = '';
while (bytesRead === bufLength && numLinesRead < numLines) {
bytesRead = fs.readSync(fdr, buf, 0, bufLength, pos);
var bufStr = buf.toString('utf8', 0, bytesRead);
numLinesRead += bufStr.split('\n').length - 1;
ret += bufStr;
pos += bytesRead;
}
fs.closeSync(fdr);
return ret;
}
//@
//@ ### head([{'-n': \<num\>},] file [, file ...])
//@ ### head([{'-n': \<num\>},] file_array)
//@
//@ Available options:
//@
//@ + `-n <num>`: Show the first `<num>` lines of the files
//@
//@ Examples:
//@
//@ ```javascript
//@ var str = head({'-n': 1}, 'file*.txt');
//@ var str = head('file1', 'file2');
//@ var str = head(['file1', 'file2']); // same as above
//@ ```
//@
//@ Read the start of a file.
function _head(options, files) {
var head = [];
var pipe = common.readFromPipe();
if (!files && !pipe) common.error('no paths given');
var idx = 1;
if (options.numLines === true) {
idx = 2;
options.numLines = Number(arguments[1]);
} else if (options.numLines === false) {
options.numLines = 10;
}
files = [].slice.call(arguments, idx);
if (pipe) {
files.unshift('-');
}
var shouldAppendNewline = false;
files.forEach(function (file) {
if (file !== '-') {
if (!fs.existsSync(file)) {
common.error('no such file or directory: ' + file, { continue: true });
return;
} else if (common.statFollowLinks(file).isDirectory()) {
common.error("error reading '" + file + "': Is a directory", {
continue: true,
});
return;
}
}
var contents;
if (file === '-') {
contents = pipe;
} else if (options.numLines < 0) {
contents = fs.readFileSync(file, 'utf8');
} else {
contents = readSomeLines(file, options.numLines);
}
var lines = contents.split('\n');
var hasTrailingNewline = (lines[lines.length - 1] === '');
if (hasTrailingNewline) {
lines.pop();
}
shouldAppendNewline = (hasTrailingNewline || options.numLines < lines.length);
head = head.concat(lines.slice(0, options.numLines));
});
if (shouldAppendNewline) {
head.push(''); // to add a trailing newline once we join
}
return head.join('\n');
}
module.exports = _head;

View File

@@ -0,0 +1,81 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for csv2json/src/test.ts</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../../index.html">All files</a> / <a href="index.html">csv2json/src</a> test.ts
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/0</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import a from "./index";
&nbsp;
&nbsp;
// a("sss","CCc");
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:36:07 GMT+0100 (IST)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [ "es5" ],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": ".",
"paths": { "xlsx": ["."] },
"types": [],
"noEmit": true,
"strictFunctionTypes": true,
"forceConsistentCasingInFileNames": true
}
}

View File

@@ -0,0 +1,29 @@
'use strict';
const {isIP} = require('net');
const assert = require('assert');
const getHost = host => {
if (host[0] === '[') {
const idx = host.indexOf(']');
assert(idx !== -1);
return host.slice(1, idx);
}
const idx = host.indexOf(':');
if (idx === -1) {
return host;
}
return host.slice(0, idx);
};
module.exports = host => {
const servername = getHost(host);
if (isIP(servername)) {
return '';
}
return servername;
};

View File

@@ -0,0 +1,43 @@
'use strict';
const {promisify} = require('util');
const fs = require('fs');
async function isType(fsStatType, statsMethodName, filePath) {
if (typeof filePath !== 'string') {
throw new TypeError(`Expected a string, got ${typeof filePath}`);
}
try {
const stats = await promisify(fs[fsStatType])(filePath);
return stats[statsMethodName]();
} catch (error) {
if (error.code === 'ENOENT') {
return false;
}
throw error;
}
}
function isTypeSync(fsStatType, statsMethodName, filePath) {
if (typeof filePath !== 'string') {
throw new TypeError(`Expected a string, got ${typeof filePath}`);
}
try {
return fs[fsStatType](filePath)[statsMethodName]();
} catch (error) {
if (error.code === 'ENOENT') {
return false;
}
throw error;
}
}
exports.isFile = isType.bind(null, 'stat', 'isFile');
exports.isDirectory = isType.bind(null, 'stat', 'isDirectory');
exports.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink');
exports.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');
exports.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');
exports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');

View File

@@ -0,0 +1,2 @@
import{options as r}from"preact";export{Fragment}from"preact";var _=0;function o(o,e,n,t,f,l){var s,u,a={};for(u in e)"ref"==u?s=e[u]:a[u]=e[u];var i={type:o,props:a,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--_,__source:f,__self:l};if("function"==typeof o&&(s=o.defaultProps))for(u in s)void 0===a[u]&&(a[u]=s[u]);return r.vnode&&r.vnode(i),i}export{o as jsx,o as jsxDEV,o as jsxs};
//# sourceMappingURL=jsxRuntime.module.js.map

View File

@@ -0,0 +1,7 @@
import { createErrorClass } from './createErrorClass';
export const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {
_super(this);
this.name = 'EmptyError';
this.message = 'no elements in sequence';
});
//# sourceMappingURL=EmptyError.js.map

View File

@@ -0,0 +1,27 @@
{
"name": "didyoumean",
"version": "1.2.2",
"description": "Match human-quality input to potential matches by edit distance.",
"homepage": "https://github.com/dcporter/didyoumean.js",
"author": {
"name": "Dave Porter",
"email": "dcporter@gmail.com",
"url": "http://dcporter.net/"
},
"keywords": [
"didyoumean",
"mean",
"edit",
"distance",
"levenshtein"
],
"main": "./didYouMean-1.2.1.js",
"repository": {
"type": "git",
"url": "https://github.com/dcporter/didyoumean.js.git"
},
"bugs": {
"url": "https://github.com/dcporter/didyoumean.js/issues"
},
"license": "Apache-2.0"
}

View File

@@ -0,0 +1,21 @@
export interface ArgumentOutOfRangeError extends Error {
}
export interface ArgumentOutOfRangeErrorCtor {
/**
* @deprecated Internal implementation detail. Do not construct error instances.
* Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269
*/
new (): ArgumentOutOfRangeError;
}
/**
* An error thrown when an element was queried at a certain index of an
* Observable, but no such index or position exists in that sequence.
*
* @see {@link elementAt}
* @see {@link take}
* @see {@link takeLast}
*
* @class ArgumentOutOfRangeError
*/
export declare const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor;
//# sourceMappingURL=ArgumentOutOfRangeError.d.ts.map

View File

@@ -0,0 +1,68 @@
{
"name": "commander",
"version": "7.2.0",
"description": "the complete solution for node.js command-line programs",
"keywords": [
"commander",
"command",
"option",
"parser",
"cli",
"argument",
"args",
"argv"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/tj/commander.js.git"
},
"scripts": {
"lint": "eslint index.js esm.mjs \"tests/**/*.js\"",
"typescript-lint": "eslint typings/*.ts tests/*.ts",
"test": "jest && npm run test-typings",
"test-esm": "node --experimental-modules ./tests/esm-imports-test.mjs",
"test-typings": "tsd",
"typescript-checkJS": "tsc --allowJS --checkJS index.js --noEmit",
"test-all": "npm run test && npm run lint && npm run typescript-lint && npm run typescript-checkJS && npm run test-esm"
},
"main": "./index.js",
"files": [
"index.js",
"esm.mjs",
"typings/index.d.ts",
"package-support.json"
],
"type": "commonjs",
"dependencies": {},
"devDependencies": {
"@types/jest": "^26.0.20",
"@types/node": "^14.14.20",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"eslint": "^7.17.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-jest": "^24.1.3",
"jest": "^26.6.3",
"standard": "^16.0.3",
"ts-jest": "^26.5.1",
"tsd": "^0.14.0",
"typescript": "^4.1.2"
},
"types": "typings/index.d.ts",
"jest": {
"testEnvironment": "node",
"collectCoverage": true,
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testPathIgnorePatterns": [
"/node_modules/"
]
},
"engines": {
"node": ">= 10"
},
"support": true
}

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isLuhnValid;
var _assertString = _interopRequireDefault(require("./util/assertString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isLuhnValid(str) {
(0, _assertString.default)(str);
var sanitized = str.replace(/[- ]+/g, '');
var sum = 0;
var digit;
var tmpNum;
var shouldDouble;
for (var i = sanitized.length - 1; i >= 0; i--) {
digit = sanitized.substring(i, i + 1);
tmpNum = parseInt(digit, 10);
if (shouldDouble) {
tmpNum *= 2;
if (tmpNum >= 10) {
sum += tmpNum % 10 + 1;
} else {
sum += tmpNum;
}
} else {
sum += tmpNum;
}
shouldDouble = !shouldDouble;
}
return !!(sum % 10 === 0 ? sanitized : false);
}
module.exports = exports.default;
module.exports.default = exports.default;

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sequenceEqual = void 0;
var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
var innerFrom_1 = require("../observable/innerFrom");
function sequenceEqual(compareTo, comparator) {
if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }
return lift_1.operate(function (source, subscriber) {
var aState = createState();
var bState = createState();
var emit = function (isEqual) {
subscriber.next(isEqual);
subscriber.complete();
};
var createSubscriber = function (selfState, otherState) {
var sequenceEqualSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (a) {
var buffer = otherState.buffer, complete = otherState.complete;
if (buffer.length === 0) {
complete ? emit(false) : selfState.buffer.push(a);
}
else {
!comparator(a, buffer.shift()) && emit(false);
}
}, function () {
selfState.complete = true;
var complete = otherState.complete, buffer = otherState.buffer;
complete && emit(buffer.length === 0);
sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe();
});
return sequenceEqualSubscriber;
};
source.subscribe(createSubscriber(aState, bState));
innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState));
});
}
exports.sequenceEqual = sequenceEqual;
function createState() {
return {
buffer: [],
complete: false,
};
}
//# sourceMappingURL=sequenceEqual.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqChD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AAK3D,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC"}

View File

@@ -0,0 +1,15 @@
The ISC License
Copyright (c) Isaac Z. Schlueter
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1,54 @@
{
"name": "@octokit/plugin-paginate-rest",
"description": "Octokit plugin to paginate REST API endpoint responses",
"version": "6.0.0",
"license": "MIT",
"files": [
"dist-*/",
"bin/"
],
"source": "dist-src/index.js",
"types": "dist-types/index.d.ts",
"main": "dist-node/index.js",
"module": "dist-web/index.js",
"pika": true,
"sideEffects": false,
"keywords": [
"github",
"api",
"sdk",
"toolkit"
],
"repository": "github:octokit/plugin-paginate-rest.js",
"dependencies": {
"@octokit/types": "^9.0.0"
},
"peerDependencies": {
"@octokit/core": ">=4"
},
"devDependencies": {
"@octokit/core": "^4.0.0",
"@octokit/plugin-rest-endpoint-methods": "^7.0.1",
"@pika/pack": "^0.3.7",
"@pika/plugin-build-node": "^0.9.0",
"@pika/plugin-build-web": "^0.9.0",
"@pika/plugin-ts-standard-pkg": "^0.9.0",
"@types/fetch-mock": "^7.3.1",
"@types/jest": "^29.0.0",
"@types/node": "^18.0.0",
"fetch-mock": "^9.0.0",
"github-openapi-graphql-query": "^3.0.0",
"jest": "^29.0.0",
"npm-run-all": "^4.1.5",
"prettier": "2.8.3",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.0.2"
},
"engines": {
"node": ">= 14"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,94 @@
var assignMergeValue = require('./_assignMergeValue'),
cloneBuffer = require('./_cloneBuffer'),
cloneTypedArray = require('./_cloneTypedArray'),
copyArray = require('./_copyArray'),
initCloneObject = require('./_initCloneObject'),
isArguments = require('./isArguments'),
isArray = require('./isArray'),
isArrayLikeObject = require('./isArrayLikeObject'),
isBuffer = require('./isBuffer'),
isFunction = require('./isFunction'),
isObject = require('./isObject'),
isPlainObject = require('./isPlainObject'),
isTypedArray = require('./isTypedArray'),
safeGet = require('./_safeGet'),
toPlainObject = require('./toPlainObject');
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key),
srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer
? customizer(objValue, srcValue, (key + ''), object, source, stack)
: undefined;
var isCommon = newValue === undefined;
if (isCommon) {
var isArr = isArray(srcValue),
isBuff = !isArr && isBuffer(srcValue),
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
}
else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
}
else {
newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
}
else {
isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
assignMergeValue(object, key, newValue);
}
module.exports = baseMergeDeep;

View File

@@ -0,0 +1,271 @@
"use strict";
exports.__esModule = true;
exports["default"] = tokenize;
exports.FIELDS = void 0;
var t = _interopRequireWildcard(require("./tokenTypes"));
var _unescapable, _wordDelimiters;
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
var hex = {};
var hexChars = "0123456789abcdefABCDEF";
for (var i = 0; i < hexChars.length; i++) {
hex[hexChars.charCodeAt(i)] = true;
}
/**
* Returns the last index of the bar css word
* @param {string} css The string in which the word begins
* @param {number} start The index into the string where word's first letter occurs
*/
function consumeWord(css, start) {
var next = start;
var code;
do {
code = css.charCodeAt(next);
if (wordDelimiters[code]) {
return next - 1;
} else if (code === t.backslash) {
next = consumeEscape(css, next) + 1;
} else {
// All other characters are part of the word
next++;
}
} while (next < css.length);
return next - 1;
}
/**
* Returns the last index of the escape sequence
* @param {string} css The string in which the sequence begins
* @param {number} start The index into the string where escape character (`\`) occurs.
*/
function consumeEscape(css, start) {
var next = start;
var code = css.charCodeAt(next + 1);
if (unescapable[code]) {// just consume the escape char
} else if (hex[code]) {
var hexDigits = 0; // consume up to 6 hex chars
do {
next++;
hexDigits++;
code = css.charCodeAt(next + 1);
} while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape
if (hexDigits < 6 && code === t.space) {
next++;
}
} else {
// the next char is part of the current word
next++;
}
return next;
}
var FIELDS = {
TYPE: 0,
START_LINE: 1,
START_COL: 2,
END_LINE: 3,
END_COL: 4,
START_POS: 5,
END_POS: 6
};
exports.FIELDS = FIELDS;
function tokenize(input) {
var tokens = [];
var css = input.css.valueOf();
var _css = css,
length = _css.length;
var offset = -1;
var line = 1;
var start = 0;
var end = 0;
var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
function unclosed(what, fix) {
if (input.safe) {
// fyi: this is never set to true.
css += fix;
next = css.length - 1;
} else {
throw input.error('Unclosed ' + what, line, start - offset, start);
}
}
while (start < length) {
code = css.charCodeAt(start);
if (code === t.newline) {
offset = start;
line += 1;
}
switch (code) {
case t.space:
case t.tab:
case t.newline:
case t.cr:
case t.feed:
next = start;
do {
next += 1;
code = css.charCodeAt(next);
if (code === t.newline) {
offset = next;
line += 1;
}
} while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
tokenType = t.space;
endLine = line;
endColumn = next - offset - 1;
end = next;
break;
case t.plus:
case t.greaterThan:
case t.tilde:
case t.pipe:
next = start;
do {
next += 1;
code = css.charCodeAt(next);
} while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
tokenType = t.combinator;
endLine = line;
endColumn = start - offset;
end = next;
break;
// Consume these characters as single tokens.
case t.asterisk:
case t.ampersand:
case t.bang:
case t.comma:
case t.equals:
case t.dollar:
case t.caret:
case t.openSquare:
case t.closeSquare:
case t.colon:
case t.semicolon:
case t.openParenthesis:
case t.closeParenthesis:
next = start;
tokenType = code;
endLine = line;
endColumn = start - offset;
end = next + 1;
break;
case t.singleQuote:
case t.doubleQuote:
quote = code === t.singleQuote ? "'" : '"';
next = start;
do {
escaped = false;
next = css.indexOf(quote, next + 1);
if (next === -1) {
unclosed('quote', quote);
}
escapePos = next;
while (css.charCodeAt(escapePos - 1) === t.backslash) {
escapePos -= 1;
escaped = !escaped;
}
} while (escaped);
tokenType = t.str;
endLine = line;
endColumn = start - offset;
end = next + 1;
break;
default:
if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
next = css.indexOf('*/', start + 2) + 1;
if (next === 0) {
unclosed('comment', '*/');
}
content = css.slice(start, next + 1);
lines = content.split('\n');
last = lines.length - 1;
if (last > 0) {
nextLine = line + last;
nextOffset = next - lines[last].length;
} else {
nextLine = line;
nextOffset = offset;
}
tokenType = t.comment;
line = nextLine;
endLine = nextLine;
endColumn = next - nextOffset;
} else if (code === t.slash) {
next = start;
tokenType = code;
endLine = line;
endColumn = start - offset;
end = next + 1;
} else {
next = consumeWord(css, start);
tokenType = t.word;
endLine = line;
endColumn = next - offset;
}
end = next + 1;
break;
} // Ensure that the token structure remains consistent
tokens.push([tokenType, // [0] Token type
line, // [1] Starting line
start - offset, // [2] Starting column
endLine, // [3] Ending line
endColumn, // [4] Ending column
start, // [5] Start position / Source index
end // [6] End position
]); // Reset offset for the next token
if (nextOffset) {
offset = nextOffset;
nextOffset = null;
}
start = end;
}
return tokens;
}

View File

@@ -0,0 +1,14 @@
/**
* The base implementation of `_.gt` which doesn't coerce arguments.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
*/
function baseGt(value, other) {
return value > other;
}
module.exports = baseGt;

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=NotificationFactories.d.ts.map