new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "normalize-url",
|
||||
"version": "8.0.0",
|
||||
"description": "Normalize a URL",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/normalize-url",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && c8 ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"normalize",
|
||||
"url",
|
||||
"uri",
|
||||
"address",
|
||||
"string",
|
||||
"normalization",
|
||||
"normalisation",
|
||||
"query",
|
||||
"querystring",
|
||||
"simplify",
|
||||
"strip",
|
||||
"trim",
|
||||
"canonical"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^5.0.1",
|
||||
"c8": "^7.12.0",
|
||||
"tsd": "^0.24.1",
|
||||
"xo": "^0.52.4"
|
||||
},
|
||||
"c8": {
|
||||
"reporter": [
|
||||
"text",
|
||||
"lcov"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
import {DelimiterCase} from './delimiter-case';
|
||||
|
||||
/**
|
||||
Convert object properties to delimiter case recursively.
|
||||
|
||||
This can be useful when, for example, converting some API types from a different style.
|
||||
|
||||
@see DelimiterCase
|
||||
@see DelimiterCasedProperties
|
||||
|
||||
@example
|
||||
```
|
||||
interface User {
|
||||
userId: number;
|
||||
userName: string;
|
||||
}
|
||||
|
||||
interface UserWithFriends {
|
||||
userInfo: User;
|
||||
userFriends: User[];
|
||||
}
|
||||
|
||||
const result: DelimiterCasedPropertiesDeep<UserWithFriends, '-'> = {
|
||||
'user-info': {
|
||||
'user-id': 1,
|
||||
'user-name': 'Tom',
|
||||
},
|
||||
'user-friends': [
|
||||
{
|
||||
'user-id': 2,
|
||||
'user-name': 'Jerry',
|
||||
},
|
||||
{
|
||||
'user-id': 3,
|
||||
'user-name': 'Spike',
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
@category Template Literals
|
||||
*/
|
||||
export type DelimiterCasedPropertiesDeep<
|
||||
Value,
|
||||
Delimiter extends string
|
||||
> = Value extends Function
|
||||
? Value
|
||||
: Value extends Array<infer U>
|
||||
? Array<DelimiterCasedPropertiesDeep<U, Delimiter>>
|
||||
: Value extends Set<infer U>
|
||||
? Set<DelimiterCasedPropertiesDeep<U, Delimiter>> : {
|
||||
[K in keyof Value as DelimiterCase<
|
||||
K,
|
||||
Delimiter
|
||||
>]: DelimiterCasedPropertiesDeep<Value[K], Delimiter>;
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
var Set = require('./_Set'),
|
||||
noop = require('./noop'),
|
||||
setToArray = require('./_setToArray');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
|
||||
/**
|
||||
* Creates a set object of `values`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} values The values to add to the set.
|
||||
* @returns {Object} Returns the new set.
|
||||
*/
|
||||
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
||||
return new Set(values);
|
||||
};
|
||||
|
||||
module.exports = createSet;
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
import { asyncScheduler } from '../scheduler/async';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike } from '../types';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
|
||||
/**
|
||||
* Emits a notification from the source Observable only after a particular time span
|
||||
* has passed without another source emission.
|
||||
*
|
||||
* <span class="informal">It's like {@link delay}, but passes only the most
|
||||
* recent notification from each burst of emissions.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `debounceTime` delays notifications emitted by the source Observable, but drops
|
||||
* previous pending delayed emissions if a new notification arrives on the source
|
||||
* Observable. This operator keeps track of the most recent notification from the
|
||||
* source Observable, and emits that only when `dueTime` has passed
|
||||
* without any other notification appearing on the source Observable. If a new value
|
||||
* appears before `dueTime` silence occurs, the previous notification will be dropped
|
||||
* and will not be emitted and a new `dueTime` is scheduled.
|
||||
* If the completing event happens during `dueTime` the last cached notification
|
||||
* is emitted before the completion event is forwarded to the output observable.
|
||||
* If the error event happens during `dueTime` or after it only the error event is
|
||||
* forwarded to the output observable. The cache notification is not emitted in this case.
|
||||
*
|
||||
* This is a rate-limiting operator, because it is impossible for more than one
|
||||
* notification to be emitted in any time window of duration `dueTime`, but it is also
|
||||
* a delay-like operator since output emissions do not occur at the same time as
|
||||
* they did on the source Observable. Optionally takes a {@link SchedulerLike} for
|
||||
* managing timers.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Emit the most recent click after a burst of clicks
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, debounceTime } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(debounceTime(1000));
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* @see {@link audit}
|
||||
* @see {@link auditTime}
|
||||
* @see {@link debounce}
|
||||
* @see {@link sample}
|
||||
* @see {@link sampleTime}
|
||||
* @see {@link throttle}
|
||||
* @see {@link throttleTime}
|
||||
*
|
||||
* @param {number} dueTime The timeout duration in milliseconds (or the time
|
||||
* unit determined internally by the optional `scheduler`) for the window of
|
||||
* time required to wait for emission silence before emitting the most recent
|
||||
* source value.
|
||||
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
|
||||
* managing the timers that handle the timeout for each value.
|
||||
* @return A function that returns an Observable that delays the emissions of
|
||||
* the source Observable by the specified `dueTime`, and may drop some values
|
||||
* if they occur too frequently.
|
||||
*/
|
||||
export function debounceTime<T>(dueTime: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction<T> {
|
||||
return operate((source, subscriber) => {
|
||||
let activeTask: Subscription | null = null;
|
||||
let lastValue: T | null = null;
|
||||
let lastTime: number | null = null;
|
||||
|
||||
const emit = () => {
|
||||
if (activeTask) {
|
||||
// We have a value! Free up memory first, then emit the value.
|
||||
activeTask.unsubscribe();
|
||||
activeTask = null;
|
||||
const value = lastValue!;
|
||||
lastValue = null;
|
||||
subscriber.next(value);
|
||||
}
|
||||
};
|
||||
function emitWhenIdle(this: SchedulerAction<unknown>) {
|
||||
// This is called `dueTime` after the first value
|
||||
// but we might have received new values during this window!
|
||||
|
||||
const targetTime = lastTime! + dueTime;
|
||||
const now = scheduler.now();
|
||||
if (now < targetTime) {
|
||||
// On that case, re-schedule to the new target
|
||||
activeTask = this.schedule(undefined, targetTime - now);
|
||||
subscriber.add(activeTask);
|
||||
return;
|
||||
}
|
||||
|
||||
emit();
|
||||
}
|
||||
|
||||
source.subscribe(
|
||||
createOperatorSubscriber(
|
||||
subscriber,
|
||||
(value: T) => {
|
||||
lastValue = value;
|
||||
lastTime = scheduler.now();
|
||||
|
||||
// Only set up a task if it's not already up
|
||||
if (!activeTask) {
|
||||
activeTask = scheduler.schedule(emitWhenIdle, dueTime);
|
||||
subscriber.add(activeTask);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
// Source completed.
|
||||
// Emit any pending debounced values then complete
|
||||
emit();
|
||||
subscriber.complete();
|
||||
},
|
||||
// Pass all errors through to consumer.
|
||||
undefined,
|
||||
() => {
|
||||
// Finalization.
|
||||
lastValue = activeTask = null;
|
||||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,269 @@
|
||||
# plugin-paginate-rest.js
|
||||
|
||||
> Octokit plugin to paginate REST API endpoint responses
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/plugin-paginate-rest)
|
||||
[](https://github.com/octokit/plugin-paginate-rest.js/actions?workflow=Test)
|
||||
|
||||
## Usage
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Browsers
|
||||
</th><td width=100%>
|
||||
|
||||
Load `@octokit/plugin-paginate-rest` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
|
||||
import {
|
||||
paginateRest,
|
||||
composePaginateRest,
|
||||
} from "https://cdn.skypack.dev/@octokit/plugin-paginate-rest";
|
||||
</script>
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Node
|
||||
</th><td>
|
||||
|
||||
Install with `npm install @octokit/core @octokit/plugin-paginate-rest`. Optionally replace `@octokit/core` with a core-compatible module
|
||||
|
||||
```js
|
||||
const { Octokit } = require("@octokit/core");
|
||||
const {
|
||||
paginateRest,
|
||||
composePaginateRest,
|
||||
} = require("@octokit/plugin-paginate-rest");
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
```js
|
||||
const MyOctokit = Octokit.plugin(paginateRest);
|
||||
const octokit = new MyOctokit({ auth: "secret123" });
|
||||
|
||||
// See https://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||
const issues = await octokit.paginate("GET /repos/{owner}/{repo}/issues", {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
});
|
||||
```
|
||||
|
||||
If you want to utilize the pagination methods in another plugin, use `composePaginateRest`.
|
||||
|
||||
```js
|
||||
function myPlugin(octokit, options) {
|
||||
return {
|
||||
allStars({owner, repo}) => {
|
||||
return composePaginateRest(
|
||||
octokit,
|
||||
"GET /repos/{owner}/{repo}/stargazers",
|
||||
{owner, repo }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `octokit.paginate()`
|
||||
|
||||
The `paginateRest` plugin adds a new `octokit.paginate()` method which accepts the same parameters as [`octokit.request`](https://github.com/octokit/request.js#request). Only "List ..." endpoints such as [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) are supporting pagination. Their [response includes a Link header](https://developer.github.com/v3/issues/#response-1). For other endpoints, `octokit.paginate()` behaves the same as `octokit.request()`.
|
||||
|
||||
The `per_page` parameter is usually defaulting to `30`, and can be set to up to `100`, which helps retrieving a big amount of data without hitting the rate limits too soon.
|
||||
|
||||
An optional `mapFunction` can be passed to map each page response to a new value, usually an array with only the data you need. This can help to reduce memory usage, as only the relevant data has to be kept in memory until the pagination is complete.
|
||||
|
||||
```js
|
||||
const issueTitles = await octokit.paginate(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
{
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
},
|
||||
(response) => response.data.map((issue) => issue.title)
|
||||
);
|
||||
```
|
||||
|
||||
The `mapFunction` gets a 2nd argument `done` which can be called to end the pagination early.
|
||||
|
||||
```js
|
||||
const issues = await octokit.paginate(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
{
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
},
|
||||
(response, done) => {
|
||||
if (response.data.find((issue) => issue.title.includes("something"))) {
|
||||
done();
|
||||
}
|
||||
return response.data;
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/):
|
||||
|
||||
```js
|
||||
const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
});
|
||||
```
|
||||
|
||||
## `octokit.paginate.iterator()`
|
||||
|
||||
If your target runtime environments supports async iterators (such as most modern browsers and Node 10+), you can iterate through each response
|
||||
|
||||
```js
|
||||
const parameters = {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
};
|
||||
for await (const response of octokit.paginate.iterator(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
parameters
|
||||
)) {
|
||||
// do whatever you want with each response, break out of the loop, etc.
|
||||
const issues = response.data;
|
||||
console.log("%d issues found", issues.length);
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/):
|
||||
|
||||
```js
|
||||
const parameters = {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
};
|
||||
for await (const response of octokit.paginate.iterator(
|
||||
octokit.rest.issues.listForRepo,
|
||||
parameters
|
||||
)) {
|
||||
// do whatever you want with each response, break out of the loop, etc.
|
||||
const issues = response.data;
|
||||
console.log("%d issues found", issues.length);
|
||||
}
|
||||
```
|
||||
|
||||
## `composePaginateRest` and `composePaginateRest.iterator`
|
||||
|
||||
The `compose*` methods work just like their `octokit.*` counterparts described above, with the differenct that both methods require an `octokit` instance to be passed as first argument
|
||||
|
||||
## How it works
|
||||
|
||||
`octokit.paginate()` wraps `octokit.request()`. As long as a `rel="next"` link value is present in the response's `Link` header, it sends another request for that URL, and so on.
|
||||
|
||||
Most of GitHub's paginating REST API endpoints return an array, but there are a few exceptions which return an object with a key that includes the items array. For example:
|
||||
|
||||
- [Search repositories](https://developer.github.com/v3/search/#example) (key `items`)
|
||||
- [List check runs for a specific ref](https://developer.github.com/v3/checks/runs/#response-3) (key: `check_runs`)
|
||||
- [List check suites for a specific ref](https://developer.github.com/v3/checks/suites/#response-1) (key: `check_suites`)
|
||||
- [List repositories](https://developer.github.com/v3/apps/installations/#list-repositories) for an installation (key: `repositories`)
|
||||
- [List installations for a user](https://developer.github.com/v3/apps/installations/#response-1) (key `installations`)
|
||||
|
||||
`octokit.paginate()` is working around these inconsistencies so you don't have to worry about it.
|
||||
|
||||
If a response is lacking the `Link` header, `octokit.paginate()` still resolves with an array, even if the response returns a single object.
|
||||
|
||||
## Types
|
||||
|
||||
The plugin also exposes some types and runtime type guards for TypeScript projects.
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Types
|
||||
</th><td>
|
||||
|
||||
```typescript
|
||||
import {
|
||||
PaginateInterface,
|
||||
PaginatingEndpoints,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Guards
|
||||
</th><td>
|
||||
|
||||
```typescript
|
||||
import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### PaginateInterface
|
||||
|
||||
An `interface` that declares all the overloads of the `.paginate` method.
|
||||
|
||||
### PaginatingEndpoints
|
||||
|
||||
An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments.
|
||||
|
||||
```typescript
|
||||
import { Octokit } from "@octokit/core";
|
||||
import {
|
||||
PaginatingEndpoints,
|
||||
composePaginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
|
||||
type DataType<T> = "data" extends keyof T ? T["data"] : unknown;
|
||||
|
||||
async function myPaginatePlugin<E extends keyof PaginatingEndpoints>(
|
||||
octokit: Octokit,
|
||||
endpoint: E,
|
||||
parameters?: PaginatingEndpoints[E]["parameters"]
|
||||
): Promise<DataType<PaginatingEndpoints[E]["response"]>> {
|
||||
return await composePaginateRest(octokit, endpoint, parameters);
|
||||
}
|
||||
```
|
||||
|
||||
### isPaginatingEndpoint
|
||||
|
||||
A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`).
|
||||
|
||||
```typescript
|
||||
import { Octokit } from "@octokit/core";
|
||||
import {
|
||||
isPaginatingEndpoint,
|
||||
composePaginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
|
||||
async function myPlugin(octokit: Octokit, arg: unknown) {
|
||||
if (isPaginatingEndpoint(arg)) {
|
||||
return await composePaginateRest(octokit, arg);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[1026] = (function(){ var d = "\u0000\u0001\u0002\u0003\t\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013
\b\u0018\u0019\u001c\u001d\u001e\u001f\n\u0017\u001b\u0005\u0006\u0007\u0016\u0004\u0014\u0015\u001a âäàáãå{ñÇ.<(+!&éêëèíîïìßĞİ*);^-/ÂÄÀÁÃÅ[Ñş,%_>?øÉÊËÈÍÎÏÌı:ÖŞ'=ÜØabcdefghi«»}`¦±°jklmnopqrªºæ¸Æ¤µöstuvwxyz¡¿]$@®¢£¥·©§¶¼½¾¬|¯¨´×çABCDEFGHIô~òóõğJKLMNOPQR¹û\\ùúÿü÷STUVWXYZ²Ô#ÒÓÕ0123456789³Û\"ÙÚ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1,25 @@
|
||||
var arrayShuffle = require('./_arrayShuffle'),
|
||||
baseShuffle = require('./_baseShuffle'),
|
||||
isArray = require('./isArray');
|
||||
|
||||
/**
|
||||
* Creates an array of shuffled values, using a version of the
|
||||
* [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Collection
|
||||
* @param {Array|Object} collection The collection to shuffle.
|
||||
* @returns {Array} Returns the new shuffled array.
|
||||
* @example
|
||||
*
|
||||
* _.shuffle([1, 2, 3, 4]);
|
||||
* // => [4, 1, 3, 2]
|
||||
*/
|
||||
function shuffle(collection) {
|
||||
var func = isArray(collection) ? arrayShuffle : baseShuffle;
|
||||
return func(collection);
|
||||
}
|
||||
|
||||
module.exports = shuffle;
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "semver-diff",
|
||||
"version": "4.0.0",
|
||||
"description": "Get the diff type of two semver versions: 0.0.1 0.0.2 → patch",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/semver-diff",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"semver",
|
||||
"version",
|
||||
"semantic",
|
||||
"diff",
|
||||
"difference"
|
||||
],
|
||||
"dependencies": {
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.39.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"joinAllInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAoB,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,6EAU/H"}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "path-key",
|
||||
"version": "4.0.0",
|
||||
"description": "Get the PATH environment variable key cross-platform",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/path-key",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"path",
|
||||
"key",
|
||||
"environment",
|
||||
"env",
|
||||
"variable",
|
||||
"get",
|
||||
"cross-platform",
|
||||
"windows"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.14.37",
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"animationFrame.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,uBAAuB,yBAAoD,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,cAAc,yBAA0B,CAAC"}
|
||||
@@ -0,0 +1,22 @@
|
||||
var baseEach = require('./_baseEach');
|
||||
|
||||
/**
|
||||
* The base implementation of `_.some` without support for iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array|Object} collection The collection to iterate over.
|
||||
* @param {Function} predicate The function invoked per iteration.
|
||||
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
||||
* else `false`.
|
||||
*/
|
||||
function baseSome(collection, predicate) {
|
||||
var result;
|
||||
|
||||
baseEach(collection, function(value, index, collection) {
|
||||
result = predicate(value, index, collection);
|
||||
return !result;
|
||||
});
|
||||
return !!result;
|
||||
}
|
||||
|
||||
module.exports = baseSome;
|
||||
@@ -0,0 +1,8 @@
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { observeOn } from '../operators/observeOn';
|
||||
import { subscribeOn } from '../operators/subscribeOn';
|
||||
import { InteropObservable, SchedulerLike } from '../types';
|
||||
|
||||
export function scheduleObservable<T>(input: InteropObservable<T>, scheduler: SchedulerLike) {
|
||||
return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"update-notifier","version":"6.0.2","files":{"license":{"checkedAt":1678883673413,"integrity":"sha512-9Ko9biztsEUyfGPY7C4WmGlaxGm9AyoiehJZ4t7puBjwt84X+ju9rmInMX+jkZSKMhWrUz3Q+oeNwPrTRQk89A==","mode":420,"size":1254},"index.js":{"checkedAt":1678883673413,"integrity":"sha512-ocFSFP5B8jVWZrSN3CFOhehBaj55OmeuV/qJj3WLN03hvcIf9d4QJBLG+Em2qS8E5BUvZHMcKYzVVdBTom1PUw==","mode":420,"size":206},"check.js":{"checkedAt":1678883673413,"integrity":"sha512-WQA7ihJQDG1+/b7UzFqh5bLRZID4uxiwk88DHovhiIP8oL2pRE1hkZMedZOVoBlGQLSI224Yz3M6hr8knXQNrg==","mode":420,"size":768},"update-notifier.js":{"checkedAt":1678883673413,"integrity":"sha512-pGNu5+93viL7ecVd4zTZ6nLqigmSA2mkQO5++ipV0j5v9GfwfqcBW7n5e5t2ntIzcqBDwwPPnEY7b80mBa1+EA==","mode":420,"size":5303},"package.json":{"checkedAt":1678883673413,"integrity":"sha512-pVdRKeu9G13dxYJUYgSNO7A2XChgKkKdTqvlXU0ZU4pFvf8idvIzYPWSDx2qpN4tEl5W7r6fYeohG3bxAK+elA==","mode":420,"size":1305},"readme.md":{"checkedAt":1678883673413,"integrity":"sha512-UgMAD8k+1RhMAaoiR+/W8q011k3cdt/AjMjzG9i0JoHksq+KjmIHs/xppUjCCo5Owqod657UXt9ZQxckiV8JUg==","mode":420,"size":6742}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('./isMatch');
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "@formatjs/icu-messageformat-parser",
|
||||
"version": "2.1.0",
|
||||
"main": "index.js",
|
||||
"module": "lib/index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/formatjs/formatjs.git",
|
||||
"directory": "packages/icu-messageformat-parser"
|
||||
},
|
||||
"dependencies": {
|
||||
"@formatjs/ecma402-abstract": "1.11.4",
|
||||
"@formatjs/icu-skeleton-parser": "1.3.6",
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
var arrayMap = require('./_arrayMap'),
|
||||
baseIteratee = require('./_baseIteratee'),
|
||||
basePickBy = require('./_basePickBy'),
|
||||
getAllKeysIn = require('./_getAllKeysIn');
|
||||
|
||||
/**
|
||||
* Creates an object composed of the `object` properties `predicate` returns
|
||||
* truthy for. The predicate is invoked with two arguments: (value, key).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The source object.
|
||||
* @param {Function} [predicate=_.identity] The function invoked per property.
|
||||
* @returns {Object} Returns the new object.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
||||
*
|
||||
* _.pickBy(object, _.isNumber);
|
||||
* // => { 'a': 1, 'c': 3 }
|
||||
*/
|
||||
function pickBy(object, predicate) {
|
||||
if (object == null) {
|
||||
return {};
|
||||
}
|
||||
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
||||
return [prop];
|
||||
});
|
||||
predicate = baseIteratee(predicate);
|
||||
return basePickBy(object, props, function(value, path) {
|
||||
return predicate(value, path[0]);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = pickBy;
|
||||
@@ -0,0 +1,71 @@
|
||||
# registry-auth-token
|
||||
|
||||
[](https://www.npmjs.com/package/registry-auth-token)[](https://www.npmjs.com/package/registry-auth-token)
|
||||
|
||||
Get the auth token set for an npm registry from `.npmrc`. Also allows fetching the configured registry URL for a given npm scope.
|
||||
|
||||
## Installing
|
||||
|
||||
```
|
||||
npm install --save registry-auth-token
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Returns an object containing `token` and `type`, or `undefined` if no token can be found. `type` can be either `Bearer` or `Basic`.
|
||||
|
||||
```js
|
||||
const getAuthToken = require('registry-auth-token')
|
||||
const getRegistryUrl = require('registry-auth-token/registry-url')
|
||||
|
||||
// Get auth token and type for default `registry` set in `.npmrc`
|
||||
console.log(getAuthToken()) // {token: 'someToken', type: 'Bearer'}
|
||||
|
||||
// Get auth token for a specific registry URL
|
||||
console.log(getAuthToken('//registry.foo.bar'))
|
||||
|
||||
// Find the registry auth token for a given URL (with deep path):
|
||||
// If registry is at `//some.host/registry`
|
||||
// URL passed is `//some.host/registry/deep/path`
|
||||
// Will find token the closest matching path; `//some.host/registry`
|
||||
console.log(getAuthToken('//some.host/registry/deep/path', {recursive: true}))
|
||||
|
||||
// Use the npm config that is passed in
|
||||
console.log(getAuthToken('//registry.foo.bar', {
|
||||
npmrc: {
|
||||
'registry': 'http://registry.foo.bar',
|
||||
'//registry.foo.bar/:_authToken': 'qar'
|
||||
}
|
||||
}))
|
||||
|
||||
// Find the configured registry url for scope `@foobar`.
|
||||
// Falls back to the global registry if not defined.
|
||||
console.log(getRegistryUrl('@foobar'))
|
||||
|
||||
// Use the npm config that is passed in
|
||||
console.log(getRegistryUrl('http://registry.foobar.eu/', {
|
||||
'registry': 'http://registry.foobar.eu/',
|
||||
'//registry.foobar.eu/:_authToken': 'qar'
|
||||
}))
|
||||
```
|
||||
|
||||
## Return value
|
||||
|
||||
```js
|
||||
// If auth info can be found:
|
||||
{token: 'someToken', type: 'Bearer'}
|
||||
|
||||
// Or:
|
||||
{token: 'someOtherToken', type: 'Basic'}
|
||||
|
||||
// Or, if nothing is found:
|
||||
undefined
|
||||
```
|
||||
|
||||
## Security
|
||||
|
||||
Please be careful when using this. Leaking your auth token is dangerous.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Espen Hovlandsdal](https://espen.codes/)
|
||||
@@ -0,0 +1,3 @@
|
||||
import Let from '../../../nodes/Let';
|
||||
import { ObjectPattern } from 'estree';
|
||||
export declare function get_slot_scope(lets: Let[]): ObjectPattern;
|
||||
@@ -0,0 +1,87 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getBestPattern = void 0;
|
||||
var time_data_generated_1 = require("./time-data.generated");
|
||||
/**
|
||||
* Returns the best matching date time pattern if a date time skeleton
|
||||
* pattern is provided with a locale. Follows the Unicode specification:
|
||||
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
||||
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
||||
* @param locale
|
||||
*/
|
||||
function getBestPattern(skeleton, locale) {
|
||||
var skeletonCopy = '';
|
||||
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
||||
var patternChar = skeleton.charAt(patternPos);
|
||||
if (patternChar === 'j') {
|
||||
var extraLength = 0;
|
||||
while (patternPos + 1 < skeleton.length &&
|
||||
skeleton.charAt(patternPos + 1) === patternChar) {
|
||||
extraLength++;
|
||||
patternPos++;
|
||||
}
|
||||
var hourLen = 1 + (extraLength & 1);
|
||||
var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
|
||||
var dayPeriodChar = 'a';
|
||||
var hourChar = getDefaultHourSymbolFromLocale(locale);
|
||||
if (hourChar == 'H' || hourChar == 'k') {
|
||||
dayPeriodLen = 0;
|
||||
}
|
||||
while (dayPeriodLen-- > 0) {
|
||||
skeletonCopy += dayPeriodChar;
|
||||
}
|
||||
while (hourLen-- > 0) {
|
||||
skeletonCopy = hourChar + skeletonCopy;
|
||||
}
|
||||
}
|
||||
else if (patternChar === 'J') {
|
||||
skeletonCopy += 'H';
|
||||
}
|
||||
else {
|
||||
skeletonCopy += patternChar;
|
||||
}
|
||||
}
|
||||
return skeletonCopy;
|
||||
}
|
||||
exports.getBestPattern = getBestPattern;
|
||||
/**
|
||||
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
||||
* of the given `locale` to the corresponding time pattern.
|
||||
* @param locale
|
||||
*/
|
||||
function getDefaultHourSymbolFromLocale(locale) {
|
||||
var hourCycle = locale.hourCycle;
|
||||
if (hourCycle === undefined &&
|
||||
// @ts-ignore hourCycle(s) is not identified yet
|
||||
locale.hourCycles &&
|
||||
// @ts-ignore
|
||||
locale.hourCycles.length) {
|
||||
// @ts-ignore
|
||||
hourCycle = locale.hourCycles[0];
|
||||
}
|
||||
if (hourCycle) {
|
||||
switch (hourCycle) {
|
||||
case 'h24':
|
||||
return 'k';
|
||||
case 'h23':
|
||||
return 'H';
|
||||
case 'h12':
|
||||
return 'h';
|
||||
case 'h11':
|
||||
return 'K';
|
||||
default:
|
||||
throw new Error('Invalid hourCycle');
|
||||
}
|
||||
}
|
||||
// TODO: Once hourCycle is fully supported remove the following with data generation
|
||||
var languageTag = locale.language;
|
||||
var regionTag;
|
||||
if (languageTag !== 'root') {
|
||||
regionTag = locale.maximize().region;
|
||||
}
|
||||
var hourCycles = time_data_generated_1.timeData[regionTag || ''] ||
|
||||
time_data_generated_1.timeData[languageTag || ''] ||
|
||||
time_data_generated_1.timeData["".concat(languageTag, "-001")] ||
|
||||
time_data_generated_1.timeData['001'];
|
||||
return hourCycles[0];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Mattias Buelens
|
||||
Copyright (c) 2016 Diwank Singh Tomer
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019 Octokit contributors
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,4 @@
|
||||
export type CreateTrackScan = {
|
||||
card: number;
|
||||
station?: number;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SubscriptionLog = void 0;
|
||||
var SubscriptionLog = (function () {
|
||||
function SubscriptionLog(subscribedFrame, unsubscribedFrame) {
|
||||
if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; }
|
||||
this.subscribedFrame = subscribedFrame;
|
||||
this.unsubscribedFrame = unsubscribedFrame;
|
||||
}
|
||||
return SubscriptionLog;
|
||||
}());
|
||||
exports.SubscriptionLog = SubscriptionLog;
|
||||
//# sourceMappingURL=SubscriptionLog.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"ora","version":"6.1.2","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"utilities.js":{"checkedAt":1678883671210,"integrity":"sha512-BG9I1J3PH4n8bVr8KGyJrnQmtSS5ARqomm74JttJKUtEWfYiAuN+e95tYLlsWjx0tT2O/lG8wjL6Q2fRtFPjIg==","mode":420,"size":1755},"package.json":{"checkedAt":1678883671210,"integrity":"sha512-/MKOANe/izuMqmPKlRikSKW/Y3gxd38iSkQylt4dG67CD+VLT0vmED2XqiegEUeFiM6MDffog1FsnILRybDtmQ==","mode":420,"size":1141},"index.js":{"checkedAt":1678883671210,"integrity":"sha512-gE20NC7u/rVdf4vFirwfP5muYnp4dmklHXgCUsy/pYWfQa1l8cxIOH7h6WRiaPaH4eGDnIJ/kosXYSXb2yM21w==","mode":420,"size":8363},"index.d.ts":{"checkedAt":1678883671212,"integrity":"sha512-KNbm1OFDMACeIDaGOo5Yh5ZnQzZIfK+qGV02Psk52hVJMre+T+s/sXqp8wy76s6YdO5P/p6Je5I1PGgN79OHng==","mode":420,"size":6668},"readme.md":{"checkedAt":1678883671213,"integrity":"sha512-hO2u5kUlq8446Ztgqq/M6TwRXNVyujgZCPC3FtrttOneeucPd+kt1CvF9CYfnNve8nee1O7FnFK0IqKeUY2QOQ==","mode":420,"size":7188}}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
module.exports = path => {
|
||||
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
|
||||
const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex
|
||||
|
||||
if (isExtendedLengthPath || hasNonAscii) {
|
||||
return path;
|
||||
}
|
||||
|
||||
return path.replace(/\\/g, '/');
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, ensureNaturalNumber = require("../../natural-number/ensure");
|
||||
|
||||
describe("natural-number/ensure", function () {
|
||||
it("Should return coerced value", function () {
|
||||
assert.equal(ensureNaturalNumber("12.23"), 12);
|
||||
});
|
||||
it("Should crash on no value", function () {
|
||||
try {
|
||||
ensureNaturalNumber(-20);
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.name, "TypeError");
|
||||
assert.equal(error.message, "-20 is not a natural number");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiDhE,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,17 @@
|
||||
export class FetchBaseError extends Error {
|
||||
constructor(message, type) {
|
||||
super(message);
|
||||
// Hide custom error implementation details from end-users
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.constructor.name;
|
||||
}
|
||||
|
||||
get [Symbol.toStringTag]() {
|
||||
return this.constructor.name;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,30 @@
|
||||
import assertString from './util/assertString';
|
||||
export default function isLuhnValid(str) {
|
||||
assertString(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);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-messageformat/src/error.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IAEnB,aAAa,kBAAkB;IAE/B,aAAa,kBAAkB;IAE/B,gBAAgB,qBAAqB;CACtC;AAED,qBAAa,WAAY,SAAQ,KAAK;IACpC,SAAgB,IAAI,EAAE,SAAS,CAAA;IAC/B;;;;;;OAMG;IACH,SAAgB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAA;gBACvC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC,EAAE,MAAM;IAK3D,QAAQ;CAGhB;AAED,qBAAa,iBAAkB,SAAQ,WAAW;gBAE9C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,MAAM,EAAE,EACjB,eAAe,CAAC,EAAE,MAAM;CAU3B;AAED,qBAAa,qBAAsB,SAAQ,WAAW;gBACxC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM;CAO/D;AAED,qBAAa,iBAAkB,SAAQ,WAAW;gBACpC,UAAU,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM;CAOzD"}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Original definitions (@types/postcss-nested)
|
||||
// by Maxim Vorontsov <https://github.com/VorontsovMaxim>
|
||||
|
||||
import { PluginCreator } from 'postcss'
|
||||
|
||||
declare namespace nested {
|
||||
interface Options {
|
||||
/**
|
||||
* By default, plugin will bubble only `@media`, `@supports` and `@layer`
|
||||
* at-rules. Use this option to add your custom at-rules to this list.
|
||||
*/
|
||||
bubble?: string[]
|
||||
|
||||
/**
|
||||
* By default, plugin will unwrap only `@font-face`, `@keyframes`,
|
||||
* and `@document` at-rules. You can add your custom at-rules
|
||||
* to this list by this option.
|
||||
*/
|
||||
unwrap?: string[]
|
||||
|
||||
/**
|
||||
* By default, plugin will strip out any empty selector generated
|
||||
* by intermediate nesting levels. You can set this option to `true`
|
||||
* to preserve them.
|
||||
*/
|
||||
preserveEmpty?: boolean
|
||||
|
||||
/**
|
||||
* The plugin supports the SCSS custom at-rule `@at-root` which breaks
|
||||
* rule blocks out of their nested position. If you want, you can choose
|
||||
* a new custom name for this rule in your code.
|
||||
*/
|
||||
rootRuleName?: string
|
||||
}
|
||||
|
||||
type Nested = PluginCreator<Options>
|
||||
}
|
||||
|
||||
declare const nested: nested.Nested
|
||||
|
||||
export = nested
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAuEhF,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,UAAU,CAAyC,CAAC,UAAU,EAAE,EAAE;QAI3E,MAAM,QAAQ,GAAG,iBAAiB,IAAI,4BAA4B,CAAC;QAMnE,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,MAAM,GAAG,GAAG,GAAG,EAAE;YACf,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC,SAAuC,EAAE,EAAE;oBAC5F,EAAE,GAAG,CAAC,CAAC;oBAQP,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO,GAAG,EAAE;YACV,IAAI,EAAE,EAAE;gBACN,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,MAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"}
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-getnumberoption
|
||||
* @param options
|
||||
* @param property
|
||||
* @param min
|
||||
* @param max
|
||||
* @param fallback
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetNumberOption = void 0;
|
||||
var DefaultNumberOption_1 = require("./DefaultNumberOption");
|
||||
function GetNumberOption(options, property, minimum, maximum, fallback) {
|
||||
var val = options[property];
|
||||
// @ts-expect-error
|
||||
return (0, DefaultNumberOption_1.DefaultNumberOption)(val, minimum, maximum, fallback);
|
||||
}
|
||||
exports.GetNumberOption = GetNumberOption;
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FormatNumericToParts = void 0;
|
||||
var PartitionNumberPattern_1 = require("./PartitionNumberPattern");
|
||||
var _262_1 = require("../262");
|
||||
function FormatNumericToParts(nf, x, implDetails) {
|
||||
var parts = (0, PartitionNumberPattern_1.PartitionNumberPattern)(nf, x, implDetails);
|
||||
var result = (0, _262_1.ArrayCreate)(0);
|
||||
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
||||
var part = parts_1[_i];
|
||||
result.push({
|
||||
type: part.type,
|
||||
value: part.value,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.FormatNumericToParts = FormatNumericToParts;
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.filter = void 0;
|
||||
var lift_1 = require("../util/lift");
|
||||
var OperatorSubscriber_1 = require("./OperatorSubscriber");
|
||||
function filter(predicate, thisArg) {
|
||||
return lift_1.operate(function (source, subscriber) {
|
||||
var index = 0;
|
||||
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));
|
||||
});
|
||||
}
|
||||
exports.filter = filter;
|
||||
//# sourceMappingURL=filter.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2DtC,MAAM,UAAU,SAAS;IACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC"}
|
||||
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var StringIterator = require("es6-iterator/string")
|
||||
, value = require("../../../object/valid-value");
|
||||
|
||||
module.exports = function () { return new StringIterator(value(this)); };
|
||||
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isInt;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;
|
||||
var intLeadingZeroes = /^[-+]?[0-9]+$/;
|
||||
|
||||
function isInt(str, options) {
|
||||
(0, _assertString.default)(str);
|
||||
options = options || {}; // Get the regex to use for testing, based on whether
|
||||
// leading zeroes are allowed or not.
|
||||
|
||||
var regex = options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ? int : intLeadingZeroes; // Check min/max/lt/gt
|
||||
|
||||
var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min;
|
||||
var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max;
|
||||
var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt;
|
||||
var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt;
|
||||
return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,89 @@
|
||||
import MuteStream from 'mute-stream';
|
||||
import readline from 'node:readline';
|
||||
|
||||
/**
|
||||
* Base interface class other can inherits from
|
||||
*/
|
||||
|
||||
export default class UI {
|
||||
constructor(opt) {
|
||||
// Instantiate the Readline interface
|
||||
// @Note: Don't reassign if already present (allow test to override the Stream)
|
||||
if (!this.rl) {
|
||||
this.rl = readline.createInterface(setupReadlineOptions(opt));
|
||||
}
|
||||
|
||||
this.rl.resume();
|
||||
|
||||
this.onForceClose = this.onForceClose.bind(this);
|
||||
|
||||
// Make sure new prompt start on a newline when closing
|
||||
process.on('exit', this.onForceClose);
|
||||
|
||||
// Terminate process on SIGINT (which will call process.on('exit') in return)
|
||||
this.rl.on('SIGINT', this.onForceClose);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the ^C exit
|
||||
* @return {null}
|
||||
*/
|
||||
|
||||
onForceClose() {
|
||||
this.close();
|
||||
process.kill(process.pid, 'SIGINT');
|
||||
console.log('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the interface and cleanup listeners
|
||||
*/
|
||||
|
||||
close() {
|
||||
// Remove events listeners
|
||||
this.rl.removeListener('SIGINT', this.onForceClose);
|
||||
process.removeListener('exit', this.onForceClose);
|
||||
|
||||
this.rl.output.unmute();
|
||||
|
||||
if (this.activePrompt && typeof this.activePrompt.close === 'function') {
|
||||
this.activePrompt.close();
|
||||
}
|
||||
|
||||
// Close the readline
|
||||
this.rl.output.end();
|
||||
this.rl.pause();
|
||||
this.rl.close();
|
||||
}
|
||||
}
|
||||
|
||||
function setupReadlineOptions(opt = {}) {
|
||||
// Inquirer 8.x:
|
||||
// opt.skipTTYChecks = opt.skipTTYChecks === undefined ? opt.input !== undefined : opt.skipTTYChecks;
|
||||
opt.skipTTYChecks = opt.skipTTYChecks === undefined ? true : opt.skipTTYChecks;
|
||||
|
||||
// Default `input` to stdin
|
||||
const input = opt.input || process.stdin;
|
||||
|
||||
// Check if prompt is being called in TTY environment
|
||||
// If it isn't return a failed promise
|
||||
if (!opt.skipTTYChecks && !input.isTTY) {
|
||||
const nonTtyError = new Error(
|
||||
'Prompts can not be meaningfully rendered in non-TTY environments'
|
||||
);
|
||||
nonTtyError.isTtyError = true;
|
||||
throw nonTtyError;
|
||||
}
|
||||
|
||||
// Add mute capabilities to the output
|
||||
const ms = new MuteStream();
|
||||
ms.pipe(opt.output || process.stdout);
|
||||
const output = ms;
|
||||
|
||||
return {
|
||||
terminal: true,
|
||||
...opt,
|
||||
input,
|
||||
output,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"util-deprecate","version":"1.0.2","files":{"package.json":{"checkedAt":1678883671305,"integrity":"sha512-t8JHXKSuqDTJvzONFc6YAbMKMwRsaL539wb4WVOyeswdTSLpdY+tELBK8moq94CIMMhXSL+LfbzV7FiMLCkQ/g==","mode":420,"size":694},"README.md":{"checkedAt":1678883671305,"integrity":"sha512-gnBkJ+KrW26XBjy0Bo6pbA/s859Tkt4qQlbdoKTgxfAipxn+1WpMGzLfgKGNOxwU79KDGncXTpWrH7dRgq61+A==","mode":420,"size":1666},"node.js":{"checkedAt":1678883671305,"integrity":"sha512-6GDUjKSud32WOrZmqumfNxm98za/IYsoK3aioPAmjKa3KDv4yCVUSg7P29u/8863yYZJ2J+VZl06Xisvba7cDg==","mode":420,"size":123},"browser.js":{"checkedAt":1678883671305,"integrity":"sha512-ZGsJKmbXf2naHjO9wg8QN4ZaAzaMfo6DmU3cfmz4rCRncoFaE9QFoRUaVSNyEtCBuWaZo4kLTfVVB9LMDJdj4Q==","mode":420,"size":1614},"LICENSE":{"checkedAt":1678883671305,"integrity":"sha512-hElreSqhgIRnqBHxtPWF+70iv+3/gk9uLTHUdCjnckMF7c7+wGiuFhYUXP5rWupepd6bGK2MIUW5u2aY2cVXRg==","mode":420,"size":1102},"History.md":{"checkedAt":1678883671305,"integrity":"sha512-TUTHdDTG8WIwOSVQ0ChcJo/5P1FeZCZJ/fMRV5/JFBJ18zqVtBuTl9/pj5aGVw8ncL6ptnGGBfNopxG/76Ej3g==","mode":420,"size":282}}}
|
||||
@@ -0,0 +1,20 @@
|
||||
import chalk from 'chalk';
|
||||
import isUnicodeSupported from 'is-unicode-supported';
|
||||
|
||||
const main = {
|
||||
info: chalk.blue('ℹ'),
|
||||
success: chalk.green('✔'),
|
||||
warning: chalk.yellow('⚠'),
|
||||
error: chalk.red('✖'),
|
||||
};
|
||||
|
||||
const fallback = {
|
||||
info: chalk.blue('i'),
|
||||
success: chalk.green('√'),
|
||||
warning: chalk.yellow('‼'),
|
||||
error: chalk.red('×'),
|
||||
};
|
||||
|
||||
const logSymbols = isUnicodeSupported() ? main : fallback;
|
||||
|
||||
export default logSymbols;
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"name": "micromatch",
|
||||
"description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.",
|
||||
"version": "4.0.5",
|
||||
"homepage": "https://github.com/micromatch/micromatch",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"(https://github.com/DianeLooney)",
|
||||
"Amila Welihinda (amilajack.com)",
|
||||
"Bogdan Chadkin (https://github.com/TrySound)",
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"Devon Govett (http://badassjs.com)",
|
||||
"Elan Shanker (https://github.com/es128)",
|
||||
"Fabrício Matté (https://ultcombo.js.org)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Martin Kolárik (https://kolarik.sk)",
|
||||
"Olsten Larck (https://i.am.charlike.online)",
|
||||
"Paul Miller (paulmillr.com)",
|
||||
"Tom Byrer (https://github.com/tomByrer)",
|
||||
"Tyler Akins (http://rumkin.com)",
|
||||
"Peter Bright <drpizza@quiscalusmexicanus.org> (https://github.com/drpizza)",
|
||||
"Kuba Juszczyk (https://github.com/ku8ar)"
|
||||
],
|
||||
"repository": "micromatch/micromatch",
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/micromatch/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"braces": "^3.0.2",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"fill-range": "^7.0.1",
|
||||
"gulp-format-md": "^2.0.0",
|
||||
"minimatch": "^5.0.1",
|
||||
"mocha": "^9.2.2",
|
||||
"time-require": "github:jonschlinkert/time-require"
|
||||
},
|
||||
"keywords": [
|
||||
"bash",
|
||||
"bracket",
|
||||
"character-class",
|
||||
"expand",
|
||||
"expansion",
|
||||
"expression",
|
||||
"extglob",
|
||||
"extglobs",
|
||||
"file",
|
||||
"files",
|
||||
"filter",
|
||||
"find",
|
||||
"glob",
|
||||
"globbing",
|
||||
"globs",
|
||||
"globstar",
|
||||
"lookahead",
|
||||
"lookaround",
|
||||
"lookbehind",
|
||||
"match",
|
||||
"matcher",
|
||||
"matches",
|
||||
"matching",
|
||||
"micromatch",
|
||||
"minimatch",
|
||||
"multimatch",
|
||||
"negate",
|
||||
"negation",
|
||||
"path",
|
||||
"pattern",
|
||||
"patterns",
|
||||
"posix",
|
||||
"regex",
|
||||
"regexp",
|
||||
"regular",
|
||||
"shell",
|
||||
"star",
|
||||
"wildcard"
|
||||
],
|
||||
"verb": {
|
||||
"toc": "collapsible",
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
},
|
||||
"related": {
|
||||
"list": [
|
||||
"braces",
|
||||
"expand-brackets",
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"nanomatch"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"extglob",
|
||||
"fill-range",
|
||||
"glob-object",
|
||||
"minimatch",
|
||||
"multimatch"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
Get the name and version of a macOS release from the Darwin version.
|
||||
|
||||
@param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
|
||||
|
||||
@example
|
||||
```
|
||||
import os from 'node:os';
|
||||
import macosRelease from 'macos-release';
|
||||
|
||||
// On a macOS Sierra system
|
||||
|
||||
macosRelease();
|
||||
//=> {name: 'Sierra', version: '10.12'}
|
||||
|
||||
os.release();
|
||||
//=> 13.2.0
|
||||
// This is the Darwin kernel version
|
||||
|
||||
macosRelease(os.release());
|
||||
//=> {name: 'Sierra', version: '10.12'}
|
||||
|
||||
macosRelease('14.0.0');
|
||||
//=> {name: 'Yosemite', version: '10.10'}
|
||||
|
||||
macosRelease('20.0.0');
|
||||
//=> {name: 'Big Sur', version: '11'}
|
||||
```
|
||||
*/
|
||||
export default function macosRelease(): {name: string; version: string};
|
||||
export default function macosRelease(release: string): {name: string; version: string} | undefined;
|
||||
Reference in New Issue
Block a user