First upload version 0.0.1

This commit is contained in:
Neyra
2026-02-05 15:27:49 +08:00
commit 8e9b7201ed
4182 changed files with 593136 additions and 0 deletions

154
node_modules/sleep-promise/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,154 @@
# [9.1.0](https://github.com/brummelte/sleep-promise/compare/v9.0.1...v9.1.0) (2021-01-06)
### Features
* **release:** release new version ([f48e5c4](https://github.com/brummelte/sleep-promise/commit/f48e5c4a95e732bd158d9e01002b391621f74126))
## [9.0.1](https://github.com/brummelte/sleep-promise/compare/v9.0.0...v9.0.1) (2021-01-06)
### Bug Fixes
* **deps:** update dependency rollup to ^2.36.0 ([a6e5427](https://github.com/brummelte/sleep-promise/commit/a6e5427eb20180a15a9f6937f3585515bd5472c1))
# [9.0.0](https://github.com/brummelte/sleep-promise/compare/v8.0.1...v9.0.0) (2020-10-18)
* chore: add github actions ([a355a7b](https://github.com/brummelte/sleep-promise/commit/a355a7b))
* chore: add pnpify SDKs ([396c1a7](https://github.com/brummelte/sleep-promise/commit/396c1a7))
* chore: add renovate ([069d930](https://github.com/brummelte/sleep-promise/commit/069d930))
* chore: add semantic release ([c26e0c1](https://github.com/brummelte/sleep-promise/commit/c26e0c1))
* chore: configure junit path ([ca2b1af](https://github.com/brummelte/sleep-promise/commit/ca2b1af))
* chore: lint all files ([c2a17bd](https://github.com/brummelte/sleep-promise/commit/c2a17bd))
* chore: remove prettier formatting ([d7bb1ed](https://github.com/brummelte/sleep-promise/commit/d7bb1ed))
* chore: update circle CI node image ([73f0135](https://github.com/brummelte/sleep-promise/commit/73f0135))
* chore: update editorconfig ([82a497b](https://github.com/brummelte/sleep-promise/commit/82a497b))
* chore: update yarn to v2 ([d31a858](https://github.com/brummelte/sleep-promise/commit/d31a858))
* chore: yarn install ([2a399b8](https://github.com/brummelte/sleep-promise/commit/2a399b8))
* chore: yarn install ([f9c7617](https://github.com/brummelte/sleep-promise/commit/f9c7617))
* chore(babel): use transform runtime for jest ([e119083](https://github.com/brummelte/sleep-promise/commit/e119083))
* chore(release): 9.0.0 [skip ci] ([fbae007](https://github.com/brummelte/sleep-promise/commit/fbae007))
* chore!: update dependencies ([75a90f4](https://github.com/brummelte/sleep-promise/commit/75a90f4))
* chore!: use terser instead of babel minify ([c3cdca3](https://github.com/brummelte/sleep-promise/commit/c3cdca3))
* refactor: circle CI configuration file ([52279a0](https://github.com/brummelte/sleep-promise/commit/52279a0))
* refactor: eslint config ([2861624](https://github.com/brummelte/sleep-promise/commit/2861624))
* refactor: json indentation ([912b1dd](https://github.com/brummelte/sleep-promise/commit/912b1dd))
* refactor: rename index to sleep ([b81aebb](https://github.com/brummelte/sleep-promise/commit/b81aebb))
* refactor: rollup config ([988a828](https://github.com/brummelte/sleep-promise/commit/988a828))
### BREAKING CHANGE
* build output has been changed, which might potentially be breaking
## <small>8.0.1 (2018-06-06)</small>
* Add coveralls ([4d6405c](https://github.com/brummelte/sleep-promise/commit/4d6405c))
* Add license information to readme ([48671ce](https://github.com/brummelte/sleep-promise/commit/48671ce))
* Fix CI code test coverage ([36303f2](https://github.com/brummelte/sleep-promise/commit/36303f2))
* Fix license link ([2661144](https://github.com/brummelte/sleep-promise/commit/2661144))
* Remove default value for createSleepPromise options ([c683f77](https://github.com/brummelte/sleep-promise/commit/c683f77))
* v8.0.1 ([8abf89e](https://github.com/brummelte/sleep-promise/commit/8abf89e))
## 8.0.0 (2018-06-06)
* Add minification ([21959b7](https://github.com/brummelte/sleep-promise/commit/21959b7))
* Add TypeScript tests ([507b81e](https://github.com/brummelte/sleep-promise/commit/507b81e))
* Fix sinon example ([7a5ee41](https://github.com/brummelte/sleep-promise/commit/7a5ee41))
* fix typings ([c95f35d](https://github.com/brummelte/sleep-promise/commit/c95f35d))
* Fix typings in esm file ([73bd965](https://github.com/brummelte/sleep-promise/commit/73bd965))
* Upgrade dependencies ([dc31457](https://github.com/brummelte/sleep-promise/commit/dc31457))
* v8.0.0 ([adf5362](https://github.com/brummelte/sleep-promise/commit/adf5362))
## 7.1.0 (2018-06-05)
* Fix import path ([0b75d97](https://github.com/brummelte/sleep-promise/commit/0b75d97))
* v7.1.0 ([fc8aa33](https://github.com/brummelte/sleep-promise/commit/fc8aa33))
## 7.0.0 (2018-06-05)
* Add documentation for useCachedSetTimeout ([2b1f5ee](https://github.com/brummelte/sleep-promise/commit/2b1f5ee))
* Add linting ([456012c](https://github.com/brummelte/sleep-promise/commit/456012c))
* Add options parameter to sleep function ([fb9b198](https://github.com/brummelte/sleep-promise/commit/fb9b198))
* Add TypeScript file formatting validation ([a5a0a9b](https://github.com/brummelte/sleep-promise/commit/a5a0a9b))
* Fix import path ([7c093ae](https://github.com/brummelte/sleep-promise/commit/7c093ae))
* Ignore build folder for eslint ([93fd20d](https://github.com/brummelte/sleep-promise/commit/93fd20d))
* Refactor code ([89c1295](https://github.com/brummelte/sleep-promise/commit/89c1295))
* Refactor code ([b21e5fb](https://github.com/brummelte/sleep-promise/commit/b21e5fb))
* Refactor readme ([301e9bd](https://github.com/brummelte/sleep-promise/commit/301e9bd))
* Remove test delays where not needed ([13a62c1](https://github.com/brummelte/sleep-promise/commit/13a62c1))
* v7.0.0 ([78c9462](https://github.com/brummelte/sleep-promise/commit/78c9462))
## 6.0.0 (2018-04-14)
* Add circle ci ([3bead78](https://github.com/brummelte/sleep-promise/commit/3bead78))
* avoid redelay on chain sleep ([c1d4c44](https://github.com/brummelte/sleep-promise/commit/c1d4c44))
* Split delayed promise chain tests ([4f6a123](https://github.com/brummelte/sleep-promise/commit/4f6a123))
* v6.0.0 ([39a337d](https://github.com/brummelte/sleep-promise/commit/39a337d))
## 5.1.0 (2018-04-11)
* Fix type path ([75611c8](https://github.com/brummelte/sleep-promise/commit/75611c8))
* v5.1.0 ([92e1a2c](https://github.com/brummelte/sleep-promise/commit/92e1a2c))
## 5.0.0 (2018-04-11)
* Move types into separate directory ([82ed19b](https://github.com/brummelte/sleep-promise/commit/82ed19b))
* Rename bundle files ([d3146e0](https://github.com/brummelte/sleep-promise/commit/d3146e0))
* v5.0.0 ([1201afd](https://github.com/brummelte/sleep-promise/commit/1201afd))
## 4.1.0 (2018-04-08)
* Fix yarn publish ([2a1f6a8](https://github.com/brummelte/sleep-promise/commit/2a1f6a8))
* v4.1.0 ([640b254](https://github.com/brummelte/sleep-promise/commit/640b254))
## 4.0.0 (2018-04-08)
* Add esm export ([487df8c](https://github.com/brummelte/sleep-promise/commit/487df8c))
* Add TypeScript typings ([edd6c1c](https://github.com/brummelte/sleep-promise/commit/edd6c1c))
* Fix types to use default export ([9b0dfec](https://github.com/brummelte/sleep-promise/commit/9b0dfec))
* Refactor code to use arrow functions ([678557c](https://github.com/brummelte/sleep-promise/commit/678557c))
* v4.0.0 ([f75ca8a](https://github.com/brummelte/sleep-promise/commit/f75ca8a))
## 3.0.0 (2018-04-07)
* Add tests ([da8ae8c](https://github.com/brummelte/sleep-promise/commit/da8ae8c))
* Fix delayed promise ([255ea72](https://github.com/brummelte/sleep-promise/commit/255ea72)), closes [#3](https://github.com/brummelte/sleep-promise/issues/3)
* v3.0.0 ([fb13360](https://github.com/brummelte/sleep-promise/commit/fb13360))
## 2.0.0 (2016-07-30)
* 2.0.0 ([1aa4741](https://github.com/brummelte/sleep-promise/commit/1aa4741))
* Change readme ([b572f20](https://github.com/brummelte/sleep-promise/commit/b572f20))
* Fix readme ([6e941b7](https://github.com/brummelte/sleep-promise/commit/6e941b7))
* Fix syntax error ([b531504](https://github.com/brummelte/sleep-promise/commit/b531504))
* Pass value through in a promise chain ([9beda8f](https://github.com/brummelte/sleep-promise/commit/9beda8f)), closes [#3](https://github.com/brummelte/sleep-promise/issues/3)
* Simplification to avoid one more function call. ([c9216a5](https://github.com/brummelte/sleep-promise/commit/c9216a5))
## 1.0.0 (2015-08-22)
* Corrected license year. ([fdfc2b8](https://github.com/brummelte/sleep-promise/commit/fdfc2b8))
* Initial commit ([36de357](https://github.com/brummelte/sleep-promise/commit/36de357))

21
node_modules/sleep-promise/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Jan Brummelte
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.

96
node_modules/sleep-promise/README.md generated vendored Normal file
View File

@@ -0,0 +1,96 @@
# sleep-promise [![License][license-image]][license-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][npm-downloads-image]][npm-downloads-url] [![Build][build-image]][build-url] [![Coverage][coverage-image]][coverage-url]
_sleep-promise_ resolves a promise after a specified delay.
## Installation
### node.js
npm install sleep-promise
## Usage async / await
```javascript
import sleep from 'sleep-promise';
(async () => {
await sleep(2000);
console.log('2 seconds later …');
})();
```
## Usage ES5
```javascript
var sleep = require('sleep-promise');
sleep(2000).then(function() {
console.log('2 seconds later …');
});
```
## Usage in a promise chain
```javascript
import sleep from 'sleep-promise';
let trace = value => {
console.log(value);
return value;
};
sleep(2000)
.then(() => 'hello')
.then(trace)
.then(sleep(1000))
.then(value => value + ' world')
.then(trace)
.then(sleep(500))
.then(value => value + '!')
.then(trace);
// [2 seconds sleep]
// hello
// [1 second sleep]
// hello world
// [500 ms sleep]
// hello world!
```
## Usage in a test file that mocks setTimeout
```javascript
import sinon from 'sinon';
import sleep from 'sleep-promise';
const clock = sinon.useFakeTimers();
(async () => {
// 2 seconds faked by sinon
const sleepPromise = sleep(2000);
clock.tick(2000);
await sleepPromise;
console.log('instant');
// Caches global setTimeout before sinon replaced it
const sleepPromise2 = sleep(2000, { useCachedSetTimeout: true });
clock.tick(2000);
await sleepPromise2;
console.log('2 seconds later');
})();
```
## License
[MIT](LICENSE.md)
[license-image]: https://img.shields.io/github/license/brummelte/sleep-promise.svg
[license-url]: https://github.com/brummelte/sleep-promise/blob/master/LICENSE.md
[npm-image]: https://img.shields.io/npm/v/sleep-promise.svg
[npm-url]: https://www.npmjs.com/package/sleep-promise
[npm-downloads-image]: https://img.shields.io/npm/dm/sleep-promise.svg
[npm-downloads-url]: https://www.npmjs.com/package/sleep-promise
[build-image]: https://img.shields.io/circleci/project/github/brummelte/sleep-promise/master.svg
[build-url]: https://circleci.com/gh/brummelte/sleep-promise
[coverage-image]: https://img.shields.io/coveralls/github/brummelte/sleep-promise/master.svg
[coverage-url]: https://coveralls.io/github/brummelte/sleep-promise?branch=master

12
node_modules/sleep-promise/build/cjs.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import { SleepOptions } from './shared';
declare namespace sleep {
// Allow usage of a CJS module
}
declare function sleep<T = any>(
timeout: number,
options?: SleepOptions,
): Promise<T> & ((value: T) => T);
export = sleep;

1
node_modules/sleep-promise/build/cjs.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";var e=setTimeout;function t(t,n){var u=n.useCachedSetTimeout?e:setTimeout;return new Promise((function(e){u(e,t)}))}module.exports=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=n.useCachedSetTimeout,r=t(e,{useCachedSetTimeout:u});function o(e){return r.then((function(){return e}))}return o.then=function(){return r.then.apply(r,arguments)},o.catch=Promise.resolve().catch,o};

8
node_modules/sleep-promise/build/esm.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { SleepOptions } from './shared';
declare function sleep<T = any>(
timeout: number,
options?: SleepOptions,
): Promise<T> & ((value: T) => T);
export default sleep;

1
node_modules/sleep-promise/build/esm.mjs generated vendored Normal file
View File

@@ -0,0 +1 @@
var e=setTimeout;function t(t,n){var u=n.useCachedSetTimeout?e:setTimeout;return new Promise((function(e){u(e,t)}))}function n(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=n.useCachedSetTimeout,r=t(e,{useCachedSetTimeout:u});function o(e){return r.then((function(){return e}))}return o.then=function(){return r.then.apply(r,arguments)},o.catch=Promise.resolve().catch,o}export default n;

3
node_modules/sleep-promise/build/shared.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export interface SleepOptions {
useCachedSetTimeout?: boolean;
}

60
node_modules/sleep-promise/package.json generated vendored Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "sleep-promise",
"author": "Jan Brummelte <sleep-promise@jan-brummelte.de> (https://jan-brummelte.de)",
"version": "9.1.0",
"description": "Resolves a promise after a specified delay",
"main": "build/cjs.js",
"module": "build/esm.mjs",
"types": "build/cjs.d.ts",
"scripts": {
"test": "npm run test:code && npm run test:eslint && npm run test:typescript",
"test:code": "jest",
"test:eslint": "eslint .",
"test:typescript": "tsc",
"build": "npm run build:clean && npm run build:bundle && npm run build:types",
"build:clean": "rimraf build",
"build:bundle": "rollup --config",
"build:types": "copyfiles -u 1 types/* build",
"prepublishOnly": "yarn build"
},
"repository": {
"type": "git",
"url": "https://github.com/brummelte/sleep-promise"
},
"keywords": [
"sleep",
"promise",
"delay"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/brummelte/sleep-promise/issues"
},
"homepage": "https://github.com/brummelte/sleep-promise",
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@brummelte/eslint-config": "^8.3.12",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.2.0",
"@semantic-release/npm": "^7.0.9",
"@semantic-release/release-notes-generator": "^9.0.1",
"babel-jest": "^26.6.3",
"copyfiles": "^2.4.1",
"coveralls": "^3.1.0",
"eslint": "^7.17.0",
"jest": "^26.6.3",
"jest-junit": "^12.0.0",
"rimraf": "^3.0.2",
"rollup": "^2.36.0",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^17.3.1",
"typescript": "^4.1.3"
}
}

12347
node_modules/sleep-promise/yarn.lock generated vendored Normal file

File diff suppressed because it is too large Load Diff