new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { RequestInterface, RequestParameters, Route } from "./types";
|
||||
export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): {
|
||||
[Symbol.asyncIterator]: () => {
|
||||
next(): Promise<{
|
||||
done: boolean;
|
||||
value?: undefined;
|
||||
} | {
|
||||
value: import("@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>;
|
||||
done?: undefined;
|
||||
} | {
|
||||
value: {
|
||||
status: number;
|
||||
headers: {};
|
||||
data: never[];
|
||||
};
|
||||
done?: undefined;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
let urlAlphabet =
|
||||
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
|
||||
module.exports = { urlAlphabet }
|
||||
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=workarounds.js.map
|
||||
@@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
var has = require('has');
|
||||
|
||||
var setToStringTag = require('../');
|
||||
|
||||
test('setToStringTag', function (t) {
|
||||
t.equal(typeof setToStringTag, 'function', 'is a function');
|
||||
|
||||
var obj = {};
|
||||
var sentinel = {};
|
||||
|
||||
setToStringTag(obj, sentinel);
|
||||
|
||||
t.test('has Symbol.toStringTag', { skip: !hasToStringTag }, function (st) {
|
||||
st.ok(has(obj, Symbol.toStringTag), 'has toStringTag property');
|
||||
|
||||
st.equal(obj[Symbol.toStringTag], sentinel, 'toStringTag property is as expected');
|
||||
|
||||
st.equal(String(obj), '[object Object]', 'toStringTag works');
|
||||
|
||||
var tagged = {};
|
||||
tagged[Symbol.toStringTag] = 'already tagged';
|
||||
st.equal(String(tagged), '[object already tagged]', 'toStringTag works');
|
||||
|
||||
setToStringTag(tagged, 'new tag');
|
||||
st.equal(String(tagged), '[object already tagged]', 'toStringTag is unchanged');
|
||||
|
||||
setToStringTag(tagged, 'new tag', { force: true });
|
||||
st.equal(String(tagged), '[object new tag]', 'toStringTag is changed with force: true');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('does not have Symbol.toStringTag', { skip: hasToStringTag }, function (st) {
|
||||
var passed = true;
|
||||
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
||||
if (has(obj, key)) {
|
||||
st.fail('object has own key ' + key);
|
||||
passed = false;
|
||||
}
|
||||
}
|
||||
if (passed) {
|
||||
st.ok(true, 'object has no enumerable own keys');
|
||||
}
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,107 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.1.2](https://github.com/inspect-js/is-boolean-object/compare/v1.1.1...v1.1.2) - 2021-08-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`6d319ea`](https://github.com/inspect-js/is-boolean-object/commit/6d319eac0ba237f7ba440a1fc4b32d007b1b0cf3)
|
||||
- [Dev Deps] update `auto-changelog`, `core-js`, `eslint`, `tape` [`4f85bef`](https://github.com/inspect-js/is-boolean-object/commit/4f85bef244f8fdd9ab99db0afe0b8fa00c853709)
|
||||
|
||||
## [v1.1.1](https://github.com/inspect-js/is-boolean-object/compare/v1.1.0...v1.1.1) - 2021-05-07
|
||||
|
||||
### Commits
|
||||
|
||||
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`7201c41`](https://github.com/inspect-js/is-boolean-object/commit/7201c41fc1fd9d64b51716b80fc63d95064a4a59)
|
||||
- [Tests] run tests with core-js as well [`9590e61`](https://github.com/inspect-js/is-boolean-object/commit/9590e6135505e2e3f69c6d8785a539fca1b1e594)
|
||||
- [meta] do not publish github action workflow files [`341472b`](https://github.com/inspect-js/is-boolean-object/commit/341472bbe9855030c7eda9340ee4284244f0a4ad)
|
||||
- [readme] update repo URLs; remove travis badge [`9fdbbc6`](https://github.com/inspect-js/is-boolean-object/commit/9fdbbc64b2a70ee93fcfd95fc6c94c7ec2bbedd4)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1cd35c9`](https://github.com/inspect-js/is-boolean-object/commit/1cd35c9b9b0b4af203f20bda0d7fd60798e57f99)
|
||||
- [readme] add actions and codecov badges [`03769fe`](https://github.com/inspect-js/is-boolean-object/commit/03769feb1466f03b1345882ca0e4f8cacbbce9ce)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`db6598c`](https://github.com/inspect-js/is-boolean-object/commit/db6598c4cabcd0ffd2ba9b4525b53907f8b2ff1f)
|
||||
- [Fix] do not use `Object.prototype.toString` when `Symbol.toStringTag` is shammed [`e0b8a9f`](https://github.com/inspect-js/is-boolean-object/commit/e0b8a9f0fc1290a0a29c75967d56bc1c17eb8d2d)
|
||||
- [readme] remove defunct testling badge [`986a621`](https://github.com/inspect-js/is-boolean-object/commit/986a6217da7385f7063e1d4e4bf5be2892d00c20)
|
||||
- [meta] use `prepublishOnly` script for npm 7+ [`7bb3b29`](https://github.com/inspect-js/is-boolean-object/commit/7bb3b2902008ca07af4185ca98bc41b3222d579f)
|
||||
- [Deps] update `call-bind` [`3af6a71`](https://github.com/inspect-js/is-boolean-object/commit/3af6a71e1004c79567630ac9944b9f2cc184ac77)
|
||||
- [meta] do not publish corejs test file [`d911f03`](https://github.com/inspect-js/is-boolean-object/commit/d911f0368b6922645d15b9e28f3ed92e1badcef4)
|
||||
- [actions] update workflows [`9bb3d90`](https://github.com/inspect-js/is-boolean-object/commit/9bb3d9015f377280324b162a3062d21936707216)
|
||||
|
||||
## [v1.1.0](https://github.com/inspect-js/is-boolean-object/compare/v1.0.1...v1.1.0) - 2020-12-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`6cdb652`](https://github.com/inspect-js/is-boolean-object/commit/6cdb652add3c6e44c2f7fe07c5ca4c0d14ddc2c1)
|
||||
- [Tests] run `nyc` on all tests [`9a33076`](https://github.com/inspect-js/is-boolean-object/commit/9a33076d14869bf5120a6ca3903bcb9a008cf2e5)
|
||||
- [Tests] add .editorconfig [`bb401c0`](https://github.com/inspect-js/is-boolean-object/commit/bb401c084416b010d64e0c5a74465b37addab31f)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`5cb2405`](https://github.com/inspect-js/is-boolean-object/commit/5cb24052ca84d840e929f05cd1fe6c03b85ec032)
|
||||
- [Robustness] use `call-bind` to avoid a dependency on `.call` [`76d87ae`](https://github.com/inspect-js/is-boolean-object/commit/76d87ae74235a9995d39bcf5783c04c744c34520)
|
||||
- [actions] add "Allow Edits" workflow [`337206a`](https://github.com/inspect-js/is-boolean-object/commit/337206af74bd7c340bc938ab6dc0535c08490b3d)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`11f0481`](https://github.com/inspect-js/is-boolean-object/commit/11f0481efca28a241a35d384e2a302b1bcdc9a37)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b9602c8`](https://github.com/inspect-js/is-boolean-object/commit/b9602c8ca11be138722187c1fb0a5b25a57a4edc)
|
||||
- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`999e9e2`](https://github.com/inspect-js/is-boolean-object/commit/999e9e224d4eec8b20fc9c3431e9ba42caad79c9)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bbb6728`](https://github.com/inspect-js/is-boolean-object/commit/bbb6728b9410f9d3e2d266523a477127e5e4c16f)
|
||||
|
||||
## [v1.0.1](https://github.com/inspect-js/is-boolean-object/compare/v1.0.0...v1.0.1) - 2019-12-18
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use shared travis-ci configs [`a1778b8`](https://github.com/inspect-js/is-boolean-object/commit/a1778b81ab4fe4479176de854e4e233cc441f183)
|
||||
- Update `eslint`; use my personal shared `eslint` config. [`2c42c50`](https://github.com/inspect-js/is-boolean-object/commit/2c42c50a0654044b6c7e2a4ab18227e8c275464b)
|
||||
- [Tests] remove `jscs` [`3807025`](https://github.com/inspect-js/is-boolean-object/commit/380702504fabc47fe22f61c4847379023d31a657)
|
||||
- [Tests] up to `node` `v8.4`, `v7.10`, `v6.11`, `v5.12`, `v4.8`; improve matrix; newer npm breaks in older node; improve scripts. [`a02b986`](https://github.com/inspect-js/is-boolean-object/commit/a02b98682b285de09e2c5a895627771d6a7f552c)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `jscs`, `nsp`, `semver`, `tape` [`d9030a9`](https://github.com/inspect-js/is-boolean-object/commit/d9030a99b8e274c76ae5f23f31d9d085a7e25272)
|
||||
- Update `eslint`, `nsp` [`a1b6388`](https://github.com/inspect-js/is-boolean-object/commit/a1b6388fabd0de51a02c567953826344ef05890c)
|
||||
- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`17a0fd3`](https://github.com/inspect-js/is-boolean-object/commit/17a0fd391e32635ec3434baca0d062f8abeeb592)
|
||||
- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`0b1818f`](https://github.com/inspect-js/is-boolean-object/commit/0b1818fdcaebc6133e515dfe3b5a8930b38999b5)
|
||||
- [meta] remove unused Makefile and associated utilities [`33dc0ae`](https://github.com/inspect-js/is-boolean-object/commit/33dc0ae35a03e91f81b1bb3db5ba763dacadbfa2)
|
||||
- Update `covert`, `jscs`, `eslint`, `semver` [`7e513c1`](https://github.com/inspect-js/is-boolean-object/commit/7e513c12998a651c14f62b3ecfb7215a5cc5ee8f)
|
||||
- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` [`992b849`](https://github.com/inspect-js/is-boolean-object/commit/992b84933760e0fe6ba2cee74ad7fff507f28128)
|
||||
- [meta] add `auto-changelog` [`63d71b8`](https://github.com/inspect-js/is-boolean-object/commit/63d71b8beb9aeb77cab3d2db2cf643f1b8b1a55c)
|
||||
- Update `tape`, `eslint`, `semver` [`76aea69`](https://github.com/inspect-js/is-boolean-object/commit/76aea699fb315ac460799182d707c388b4a4e017)
|
||||
- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a6cbec0`](https://github.com/inspect-js/is-boolean-object/commit/a6cbec09940b6f2c7cf366526a94c0c4756508f5)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape`; add `safe-publish-latest` [`7cf6bb0`](https://github.com/inspect-js/is-boolean-object/commit/7cf6bb05ba7bac504df680dd9ca625fba6dccb5a)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`57d713c`](https://github.com/inspect-js/is-boolean-object/commit/57d713cca2ccbbbf1da1142ee5e8236d12551f76)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`f7a2bdb`](https://github.com/inspect-js/is-boolean-object/commit/f7a2bdb905e07d75c65593359f81bfeda9fe9826)
|
||||
- [meta] create FUNDING.yml [`9765e73`](https://github.com/inspect-js/is-boolean-object/commit/9765e738cccdd5ff6c89b21324119a2bf4064fbd)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `replace`, `semver`, `tape` [`5c16b56`](https://github.com/inspect-js/is-boolean-object/commit/5c16b56a5a2d36c6a70c1bd396b3a6c931f655db)
|
||||
- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`5717aad`](https://github.com/inspect-js/is-boolean-object/commit/5717aadd8b0e8c76ccb194d1845ad8cc120f29c6)
|
||||
- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`80b924d`](https://github.com/inspect-js/is-boolean-object/commit/80b924dd270188e1e928f4141078bee14d810e9b)
|
||||
- [Dev Deps] update `jscs` [`2e5479e`](https://github.com/inspect-js/is-boolean-object/commit/2e5479e56b6d33288582cfe8c254ca081e79500c)
|
||||
- Test up to `io.js` `v2.2` [`93379a4`](https://github.com/inspect-js/is-boolean-object/commit/93379a4b48ba719113006ab08bbe6679c8a27293)
|
||||
- [Tests] remove `nsp`; use `npm audit`; allow to fail for now [`36ae30a`](https://github.com/inspect-js/is-boolean-object/commit/36ae30acffe4a892ea0882a793b8a90f09d08fdf)
|
||||
- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ef76976`](https://github.com/inspect-js/is-boolean-object/commit/ef76976db22f2867fca2ee377fdbc9da81f0d142)
|
||||
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`a1182bd`](https://github.com/inspect-js/is-boolean-object/commit/a1182bd99e5d31e113107241f0d697e71b27bf7b)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`4f79b47`](https://github.com/inspect-js/is-boolean-object/commit/4f79b474f0643fd2c9dbc863949a61cf01255b6f)
|
||||
- [Tests] up to `node` `v10.3` [`5e96464`](https://github.com/inspect-js/is-boolean-object/commit/5e96464fc08eacc45f5f58fe7800ddbc45e40cea)
|
||||
- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`e1eb3fa`](https://github.com/inspect-js/is-boolean-object/commit/e1eb3fad8bad65140db3bd2381bb3bea6a9c6242)
|
||||
- Only apps should have lockfiles. [`c7f301f`](https://github.com/inspect-js/is-boolean-object/commit/c7f301ff368f9e04f7f64a2ce9b6ae1aec803e69)
|
||||
- [meta] add `funding` field [`fad0366`](https://github.com/inspect-js/is-boolean-object/commit/fad03662becea5db7cef29d816d173ad771be86a)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`80d39d9`](https://github.com/inspect-js/is-boolean-object/commit/80d39d90205d3bb564acb80b0625e90c267347fd)
|
||||
- [Tests] use `eclint` instead of `editorconfig-tools` [`980e91b`](https://github.com/inspect-js/is-boolean-object/commit/980e91b186a728f77366ba16b7bebc813b9cc3b0)
|
||||
- [Dev Deps] Update `tape`, `eslint` [`9960830`](https://github.com/inspect-js/is-boolean-object/commit/9960830876a3672686c569fde3d43bb7983955f1)
|
||||
- Test up to `io.js` `v3.0` [`a3c3cd0`](https://github.com/inspect-js/is-boolean-object/commit/a3c3cd087d7fcefbf4f3525c05f4cee3b6e5b0ef)
|
||||
- [Dev Deps] update `tape` [`217fbd6`](https://github.com/inspect-js/is-boolean-object/commit/217fbd6bb2989f9304ad95cd49697da7fe03b8d5)
|
||||
- [Tests] only audit prod deps [`89284ee`](https://github.com/inspect-js/is-boolean-object/commit/89284ee17dce1d044df0ca9e006072f25742bbaf)
|
||||
- [Performance] only use toStringTag code path when the value has that property [`2863bc5`](https://github.com/inspect-js/is-boolean-object/commit/2863bc5b72680f05ace8e66fddcf48966b942d55)
|
||||
- [Dev Deps] update `replace` [`53e72a5`](https://github.com/inspect-js/is-boolean-object/commit/53e72a5ceca5b3a82e6407829f9227df9df6d329)
|
||||
- [Enhancement] slight optimization for `null` [`a90a3c4`](https://github.com/inspect-js/is-boolean-object/commit/a90a3c4464d0300e23384d96fb4281b55b7fd723)
|
||||
- [Dev Deps] update `tape` [`9377bd5`](https://github.com/inspect-js/is-boolean-object/commit/9377bd5110e99d8ec550f24ef3f6ead62a8f1f50)
|
||||
- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`3085530`](https://github.com/inspect-js/is-boolean-object/commit/30855304841854f79e406372f524efe4bc7d8c04)
|
||||
- Test on `io.js` `v2.4` [`8af335c`](https://github.com/inspect-js/is-boolean-object/commit/8af335ca82a0eeba4a0a593775e4caf744834ec4)
|
||||
- Test on `io.js` `v2.3` [`1eb3424`](https://github.com/inspect-js/is-boolean-object/commit/1eb3424bef528551f5c99a754281a51d92e40ab1)
|
||||
|
||||
## v1.0.0 - 2015-04-28
|
||||
|
||||
### Commits
|
||||
|
||||
- Dotfiles [`6b9b998`](https://github.com/inspect-js/is-boolean-object/commit/6b9b998bb238a32d4829c9f9bf274e5ca15023ee)
|
||||
- `make release` [`d5e50b3`](https://github.com/inspect-js/is-boolean-object/commit/d5e50b33a3cd8d8abe7de8ae36e2944c24ce76ba)
|
||||
- package.json [`117676a`](https://github.com/inspect-js/is-boolean-object/commit/117676a48609e636d4257c1b35c695ff20939211)
|
||||
- Read me [`ef327a7`](https://github.com/inspect-js/is-boolean-object/commit/ef327a74c7f73e64cfa3c20a9620ef7accf8b762)
|
||||
- Initial commit [`2346886`](https://github.com/inspect-js/is-boolean-object/commit/2346886252b9637c1af6851a3fc2cbc98bc986aa)
|
||||
- Tests [`67211f8`](https://github.com/inspect-js/is-boolean-object/commit/67211f8bff1a49e5df219935765b83573c097353)
|
||||
- Implementation [`2d88bd6`](https://github.com/inspect-js/is-boolean-object/commit/2d88bd6e1ef0f07f5a639775eb89f3b78e12eb65)
|
||||
@@ -0,0 +1,24 @@
|
||||
var arrayMap = require('./_arrayMap'),
|
||||
createOver = require('./_createOver');
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `iteratees` with the arguments it receives
|
||||
* and returns their results.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {...(Function|Function[])} [iteratees=[_.identity]]
|
||||
* The iteratees to invoke.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var func = _.over([Math.max, Math.min]);
|
||||
*
|
||||
* func(1, 2, 3, 4);
|
||||
* // => [4, 1]
|
||||
*/
|
||||
var over = createOver(arrayMap);
|
||||
|
||||
module.exports = over;
|
||||
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = void 0;
|
||||
|
||||
var _cssesc = _interopRequireDefault(require("cssesc"));
|
||||
|
||||
var _util = require("../util");
|
||||
|
||||
var _node = _interopRequireDefault(require("./node"));
|
||||
|
||||
var _types = require("./types");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
var ClassName = /*#__PURE__*/function (_Node) {
|
||||
_inheritsLoose(ClassName, _Node);
|
||||
|
||||
function ClassName(opts) {
|
||||
var _this;
|
||||
|
||||
_this = _Node.call(this, opts) || this;
|
||||
_this.type = _types.CLASS;
|
||||
_this._constructed = true;
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = ClassName.prototype;
|
||||
|
||||
_proto.valueToString = function valueToString() {
|
||||
return '.' + _Node.prototype.valueToString.call(this);
|
||||
};
|
||||
|
||||
_createClass(ClassName, [{
|
||||
key: "value",
|
||||
get: function get() {
|
||||
return this._value;
|
||||
},
|
||||
set: function set(v) {
|
||||
if (this._constructed) {
|
||||
var escaped = (0, _cssesc["default"])(v, {
|
||||
isIdentifier: true
|
||||
});
|
||||
|
||||
if (escaped !== v) {
|
||||
(0, _util.ensureObject)(this, "raws");
|
||||
this.raws.value = escaped;
|
||||
} else if (this.raws) {
|
||||
delete this.raws.value;
|
||||
}
|
||||
}
|
||||
|
||||
this._value = v;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ClassName;
|
||||
}(_node["default"]);
|
||||
|
||||
exports["default"] = ClassName;
|
||||
module.exports = exports.default;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"30":0.00949,"52":0.03163,"70":0.00316,"79":0.00949,"83":0.00316,"91":0.00316,"102":0.04112,"104":0.00949,"105":0.00316,"106":0.00949,"107":0.00633,"108":0.03163,"109":0.62944,"110":0.36691,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 80 81 82 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 100 101 103 111 112 3.5 3.6"},D:{"39":0.00316,"49":0.14234,"53":0.00316,"56":0.00949,"61":0.00316,"64":0.00949,"65":0.00316,"66":0.0253,"69":0.00949,"70":0.00316,"71":0.00949,"72":0.01265,"74":0.00316,"75":0.00949,"76":0.00316,"77":0.00316,"78":0.00633,"79":0.04428,"80":0.01582,"81":0.00316,"83":0.03796,"84":0.03796,"85":0.04428,"86":0.05377,"87":0.03479,"88":0.00633,"89":0.03796,"90":0.01265,"91":0.00949,"92":0.01265,"93":0.01265,"94":0.00316,"95":0.00633,"96":0.0253,"97":0.01898,"98":0.01582,"99":0.01265,"100":0.06959,"101":0.02214,"102":0.09173,"103":0.05377,"104":0.02847,"105":0.03163,"106":0.17713,"107":0.10754,"108":0.30681,"109":13.09798,"110":6.34498,"111":0.00633,"112":0.00633,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 50 51 52 54 55 57 58 59 60 62 63 67 68 73 113"},F:{"28":0.00633,"40":0.01582,"45":0.00316,"46":0.00949,"49":0.00633,"51":0.00316,"53":0.02214,"55":0.00316,"57":0.00633,"60":0.00633,"62":0.0253,"64":0.00633,"67":0.00316,"73":0.00633,"77":0.00316,"79":0.06326,"84":0.00949,"90":0.03163,"93":0.03163,"94":0.24039,"95":0.23406,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 41 42 43 44 47 48 50 52 54 56 58 63 65 66 68 69 70 71 72 74 75 76 78 80 81 82 83 85 86 87 88 89 91 92 9.5-9.6 10.5 10.6 11.1 11.5 11.6 12.1","10.0-10.1":0},B:{"12":0.00316,"14":0.00316,"15":0.00949,"16":0.00949,"17":0.00949,"18":0.0601,"84":0.01582,"85":0.00633,"86":0.00949,"89":0.00316,"90":0.00633,"92":0.02214,"100":0.00949,"105":0.00316,"106":0.00633,"107":0.01265,"108":0.03796,"109":0.63893,"110":0.96472,_:"13 79 80 81 83 87 88 91 93 94 95 96 97 98 99 101 102 103 104"},E:{"4":0,"5":0.02214,"14":0.02847,_:"0 6 7 8 9 10 11 12 13 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 16.4","5.1":0.21508,"12.1":0.00316,"13.1":0.00949,"14.1":0.02847,"15.1":0.00949,"15.2-15.3":0.00949,"15.4":0.01265,"15.5":0.02847,"15.6":0.13917,"16.0":0.02214,"16.1":0.07591,"16.2":0.08856,"16.3":0.12336},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00326,"6.0-6.1":0,"7.0-7.1":0.01629,"8.1-8.4":0.00081,"9.0-9.2":0.00489,"9.3":0.04399,"10.0-10.2":0,"10.3":0.02932,"11.0-11.2":0.01303,"11.3-11.4":0.00407,"12.0-12.1":0.0057,"12.2-12.5":0.52785,"13.0-13.1":0.00244,"13.2":0.00244,"13.3":0.01222,"13.4-13.7":0.0505,"14.0-14.4":0.11811,"14.5-14.8":0.21831,"15.0-15.1":0.07983,"15.2-15.3":0.10508,"15.4":0.13522,"15.5":0.17676,"15.6":0.41218,"16.0":1.05732,"16.1":1.29274,"16.2":1.40759,"16.3":1.419,"16.4":0.0057},P:{"4":0.59093,"20":0.73357,"5.0-5.4":0.04075,"6.2-6.4":0.08151,"7.2-7.4":0.60112,"8.2":0.01016,"9.2":0.04075,"10.1":0.01011,"11.1-11.2":0.14264,"12.0":0.04075,"13.0":0.12226,"14.0":0.15283,"15.0":0.08151,"16.0":0.24452,"17.0":0.21396,"18.0":0.31584,"19.0":2.31278},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00234,"4.2-4.3":0.00313,"4.4":0,"4.4.3-4.4.4":0.02188},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"9":0.00316,"11":0.13285,_:"6 7 8 10 5.5"},N:{"10":0.03712,"11":0.07423},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":3.46636},H:{"0":0.30422},L:{"0":52.21532},R:{_:"0"},M:{"0":0.06153},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isMongoId;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
var _isHexadecimal = _interopRequireDefault(require("./isHexadecimal"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function isMongoId(str) {
|
||||
(0, _assertString.default)(str);
|
||||
return (0, _isHexadecimal.default)(str) && str.length === 24;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { WebSocketSubject } from './WebSocketSubject';
|
||||
export function webSocket(urlConfigOrSource) {
|
||||
return new WebSocketSubject(urlConfigOrSource);
|
||||
}
|
||||
//# sourceMappingURL=webSocket.js.map
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* Returns a `Buffer` instance from the given data URI `uri`.
|
||||
*
|
||||
* @param {String} uri Data URI to turn into a Buffer instance
|
||||
* @returns {Buffer} Buffer instance from Data URI
|
||||
* @api public
|
||||
*/
|
||||
export function dataUriToBuffer(uri) {
|
||||
if (!/^data:/i.test(uri)) {
|
||||
throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
|
||||
}
|
||||
// strip newlines
|
||||
uri = uri.replace(/\r?\n/g, '');
|
||||
// split the URI up into the "metadata" and the "data" portions
|
||||
const firstComma = uri.indexOf(',');
|
||||
if (firstComma === -1 || firstComma <= 4) {
|
||||
throw new TypeError('malformed data: URI');
|
||||
}
|
||||
// remove the "data:" scheme and parse the metadata
|
||||
const meta = uri.substring(5, firstComma).split(';');
|
||||
let charset = '';
|
||||
let base64 = false;
|
||||
const type = meta[0] || 'text/plain';
|
||||
let typeFull = type;
|
||||
for (let i = 1; i < meta.length; i++) {
|
||||
if (meta[i] === 'base64') {
|
||||
base64 = true;
|
||||
}
|
||||
else if (meta[i]) {
|
||||
typeFull += `;${meta[i]}`;
|
||||
if (meta[i].indexOf('charset=') === 0) {
|
||||
charset = meta[i].substring(8);
|
||||
}
|
||||
}
|
||||
}
|
||||
// defaults to US-ASCII only if type is not provided
|
||||
if (!meta[0] && !charset.length) {
|
||||
typeFull += ';charset=US-ASCII';
|
||||
charset = 'US-ASCII';
|
||||
}
|
||||
// get the encoded data portion and decode URI-encoded chars
|
||||
const encoding = base64 ? 'base64' : 'ascii';
|
||||
const data = unescape(uri.substring(firstComma + 1));
|
||||
const buffer = Buffer.from(data, encoding);
|
||||
// set `.type` and `.typeFull` properties to MIME type
|
||||
buffer.type = type;
|
||||
buffer.typeFull = typeFull;
|
||||
// set the `.charset` property
|
||||
buffer.charset = charset;
|
||||
return buffer;
|
||||
}
|
||||
export default dataUriToBuffer;
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: ()=>getModuleDependencies
|
||||
});
|
||||
const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
|
||||
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
||||
const _resolve = /*#__PURE__*/ _interopRequireDefault(require("resolve"));
|
||||
const _detective = /*#__PURE__*/ _interopRequireDefault(require("detective"));
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function createModule(file) {
|
||||
const source = _fs.default.readFileSync(file, "utf-8");
|
||||
const requires = (0, _detective.default)(source);
|
||||
return {
|
||||
file,
|
||||
requires
|
||||
};
|
||||
}
|
||||
function getModuleDependencies(entryFile) {
|
||||
const rootModule = createModule(entryFile);
|
||||
const modules = [
|
||||
rootModule
|
||||
];
|
||||
// Iterate over the modules, even when new
|
||||
// ones are being added
|
||||
for (const mdl of modules){
|
||||
mdl.requires.filter((dep)=>{
|
||||
// Only track local modules, not node_modules
|
||||
return dep.startsWith("./") || dep.startsWith("../");
|
||||
}).forEach((dep)=>{
|
||||
try {
|
||||
const basedir = _path.default.dirname(mdl.file);
|
||||
const depPath = _resolve.default.sync(dep, {
|
||||
basedir
|
||||
});
|
||||
const depModule = createModule(depPath);
|
||||
modules.push(depModule);
|
||||
} catch (_err) {
|
||||
// eslint-disable-next-line no-empty
|
||||
}
|
||||
});
|
||||
}
|
||||
return modules;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAkDhE,SAAgB,WAAW;IACzB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,kCAmBC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"cacheWrapper.d.ts","sourceRoot":"","sources":["../src/cacheWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEnD,iBAAe,YAAY,CACzB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,GACnC,OAAO,CAAC,iBAAiB,CAAC,CAS5B;AAED,iBAAS,gBAAgB,CACvB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,MAAM,iBAAiB,GAC1B,iBAAiB,CASnB;AAED,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[20290] = (function(){ var d = "\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 。「」、・ヲァィゥ£.<(+|&ェォャュョッ<EFBDAE>ー<EFBFBD>!¥*);¬-/abcdefgh<67>,%_>?[ijklmnop`:#@'=\"]アイウエオカキクケコqサシスセソタチツテトナニヌネノr<EFBE89>ハヒフ~‾ヘホマミムメモヤユsヨラリル^¢\\tuvwxyzレロワン゙゚{ABCDEFGHI<48><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}JKLMNOPQR<51><52><EFBFBD><EFBFBD><EFBFBD><EFBFBD>$<24>STUVWXYZ<59><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0123456789<38><39><EFBFBD><EFBFBD><EFBFBD>", 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,267 @@
|
||||
import {Buffer} from 'node:buffer';
|
||||
import path from 'node:path';
|
||||
import childProcess from 'node:child_process';
|
||||
import process from 'node:process';
|
||||
import crossSpawn from 'cross-spawn';
|
||||
import stripFinalNewline from 'strip-final-newline';
|
||||
import {npmRunPathEnv} from 'npm-run-path';
|
||||
import onetime from 'onetime';
|
||||
import {makeError} from './lib/error.js';
|
||||
import {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';
|
||||
import {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';
|
||||
import {handleInput, getSpawnedResult, makeAllStream, validateInputSync} from './lib/stream.js';
|
||||
import {mergePromise, getSpawnedPromise} from './lib/promise.js';
|
||||
import {joinCommand, parseCommand, getEscapedCommand} from './lib/command.js';
|
||||
|
||||
const DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;
|
||||
|
||||
const getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {
|
||||
const env = extendEnv ? {...process.env, ...envOption} : envOption;
|
||||
|
||||
if (preferLocal) {
|
||||
return npmRunPathEnv({env, cwd: localDir, execPath});
|
||||
}
|
||||
|
||||
return env;
|
||||
};
|
||||
|
||||
const handleArguments = (file, args, options = {}) => {
|
||||
const parsed = crossSpawn._parse(file, args, options);
|
||||
file = parsed.command;
|
||||
args = parsed.args;
|
||||
options = parsed.options;
|
||||
|
||||
options = {
|
||||
maxBuffer: DEFAULT_MAX_BUFFER,
|
||||
buffer: true,
|
||||
stripFinalNewline: true,
|
||||
extendEnv: true,
|
||||
preferLocal: false,
|
||||
localDir: options.cwd || process.cwd(),
|
||||
execPath: process.execPath,
|
||||
encoding: 'utf8',
|
||||
reject: true,
|
||||
cleanup: true,
|
||||
all: false,
|
||||
windowsHide: true,
|
||||
...options,
|
||||
};
|
||||
|
||||
options.env = getEnv(options);
|
||||
|
||||
options.stdio = normalizeStdio(options);
|
||||
|
||||
if (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {
|
||||
// #116
|
||||
args.unshift('/q');
|
||||
}
|
||||
|
||||
return {file, args, options, parsed};
|
||||
};
|
||||
|
||||
const handleOutput = (options, value, error) => {
|
||||
if (typeof value !== 'string' && !Buffer.isBuffer(value)) {
|
||||
// When `execaSync()` errors, we normalize it to '' to mimic `execa()`
|
||||
return error === undefined ? undefined : '';
|
||||
}
|
||||
|
||||
if (options.stripFinalNewline) {
|
||||
return stripFinalNewline(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
export function execa(file, args, options) {
|
||||
const parsed = handleArguments(file, args, options);
|
||||
const command = joinCommand(file, args);
|
||||
const escapedCommand = getEscapedCommand(file, args);
|
||||
|
||||
validateTimeout(parsed.options);
|
||||
|
||||
let spawned;
|
||||
try {
|
||||
spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
|
||||
} catch (error) {
|
||||
// Ensure the returned error is always both a promise and a child process
|
||||
const dummySpawned = new childProcess.ChildProcess();
|
||||
const errorPromise = Promise.reject(makeError({
|
||||
error,
|
||||
stdout: '',
|
||||
stderr: '',
|
||||
all: '',
|
||||
command,
|
||||
escapedCommand,
|
||||
parsed,
|
||||
timedOut: false,
|
||||
isCanceled: false,
|
||||
killed: false,
|
||||
}));
|
||||
return mergePromise(dummySpawned, errorPromise);
|
||||
}
|
||||
|
||||
const spawnedPromise = getSpawnedPromise(spawned);
|
||||
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
||||
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
||||
|
||||
const context = {isCanceled: false};
|
||||
|
||||
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
||||
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
||||
|
||||
const handlePromise = async () => {
|
||||
const [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
||||
const stdout = handleOutput(parsed.options, stdoutResult);
|
||||
const stderr = handleOutput(parsed.options, stderrResult);
|
||||
const all = handleOutput(parsed.options, allResult);
|
||||
|
||||
if (error || exitCode !== 0 || signal !== null) {
|
||||
const returnedError = makeError({
|
||||
error,
|
||||
exitCode,
|
||||
signal,
|
||||
stdout,
|
||||
stderr,
|
||||
all,
|
||||
command,
|
||||
escapedCommand,
|
||||
parsed,
|
||||
timedOut,
|
||||
isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),
|
||||
killed: spawned.killed,
|
||||
});
|
||||
|
||||
if (!parsed.options.reject) {
|
||||
return returnedError;
|
||||
}
|
||||
|
||||
throw returnedError;
|
||||
}
|
||||
|
||||
return {
|
||||
command,
|
||||
escapedCommand,
|
||||
exitCode: 0,
|
||||
stdout,
|
||||
stderr,
|
||||
all,
|
||||
failed: false,
|
||||
timedOut: false,
|
||||
isCanceled: false,
|
||||
killed: false,
|
||||
};
|
||||
};
|
||||
|
||||
const handlePromiseOnce = onetime(handlePromise);
|
||||
|
||||
handleInput(spawned, parsed.options.input);
|
||||
|
||||
spawned.all = makeAllStream(spawned, parsed.options);
|
||||
|
||||
return mergePromise(spawned, handlePromiseOnce);
|
||||
}
|
||||
|
||||
export function execaSync(file, args, options) {
|
||||
const parsed = handleArguments(file, args, options);
|
||||
const command = joinCommand(file, args);
|
||||
const escapedCommand = getEscapedCommand(file, args);
|
||||
|
||||
validateInputSync(parsed.options);
|
||||
|
||||
let result;
|
||||
try {
|
||||
result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
|
||||
} catch (error) {
|
||||
throw makeError({
|
||||
error,
|
||||
stdout: '',
|
||||
stderr: '',
|
||||
all: '',
|
||||
command,
|
||||
escapedCommand,
|
||||
parsed,
|
||||
timedOut: false,
|
||||
isCanceled: false,
|
||||
killed: false,
|
||||
});
|
||||
}
|
||||
|
||||
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
||||
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
||||
|
||||
if (result.error || result.status !== 0 || result.signal !== null) {
|
||||
const error = makeError({
|
||||
stdout,
|
||||
stderr,
|
||||
error: result.error,
|
||||
signal: result.signal,
|
||||
exitCode: result.status,
|
||||
command,
|
||||
escapedCommand,
|
||||
parsed,
|
||||
timedOut: result.error && result.error.code === 'ETIMEDOUT',
|
||||
isCanceled: false,
|
||||
killed: result.signal !== null,
|
||||
});
|
||||
|
||||
if (!parsed.options.reject) {
|
||||
return error;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
return {
|
||||
command,
|
||||
escapedCommand,
|
||||
exitCode: 0,
|
||||
stdout,
|
||||
stderr,
|
||||
failed: false,
|
||||
timedOut: false,
|
||||
isCanceled: false,
|
||||
killed: false,
|
||||
};
|
||||
}
|
||||
|
||||
export function execaCommand(command, options) {
|
||||
const [file, ...args] = parseCommand(command);
|
||||
return execa(file, args, options);
|
||||
}
|
||||
|
||||
export function execaCommandSync(command, options) {
|
||||
const [file, ...args] = parseCommand(command);
|
||||
return execaSync(file, args, options);
|
||||
}
|
||||
|
||||
export function execaNode(scriptPath, args, options = {}) {
|
||||
if (args && !Array.isArray(args) && typeof args === 'object') {
|
||||
options = args;
|
||||
args = [];
|
||||
}
|
||||
|
||||
const stdio = normalizeStdioNode(options);
|
||||
const defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));
|
||||
|
||||
const {
|
||||
nodePath = process.execPath,
|
||||
nodeOptions = defaultExecArgv,
|
||||
} = options;
|
||||
|
||||
return execa(
|
||||
nodePath,
|
||||
[
|
||||
...nodeOptions,
|
||||
scriptPath,
|
||||
...(Array.isArray(args) ? args : []),
|
||||
],
|
||||
{
|
||||
...options,
|
||||
stdin: undefined,
|
||||
stdout: undefined,
|
||||
stderr: undefined,
|
||||
stdio,
|
||||
shell: false,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export const crypto = {
|
||||
node: undefined,
|
||||
web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined,
|
||||
};
|
||||
//# sourceMappingURL=cryptoBrowser.js.map
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
var value = require("../../../object/valid-value")
|
||||
, toInteger = require("../../../number/to-integer")
|
||||
, max = Math.max
|
||||
, min = Math.min;
|
||||
|
||||
module.exports = function (searchString /*, position*/) {
|
||||
var start, self = String(value(this));
|
||||
start = min(max(toInteger(arguments[1]), 0), self.length);
|
||||
return self.indexOf(searchString, start) === start;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, ensureThenable = require("../../thenable/ensure");
|
||||
|
||||
describe("thenable/ensure", function () {
|
||||
it("Should return input value", function () {
|
||||
var value = { then: function () { return true; } };
|
||||
assert.equal(ensureThenable(value), value);
|
||||
});
|
||||
it("Should crash on no value", function () {
|
||||
try {
|
||||
ensureThenable({});
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.name, "TypeError");
|
||||
assert.equal(error.message, "[object Object] is not a thenable object");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAgBlE,MAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,EAAW;CACxC,CAAC;AA2EF,MAAM,UAAU,OAAO,CACrB,QAAsC,EACtC,SAA2B,cAAc;IAEzC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var SameValue = require('./SameValue');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-samevaluenonnumeric
|
||||
|
||||
module.exports = function SameValueNonNumeric(x, y) {
|
||||
var xType = Type(x);
|
||||
if (xType === 'Number' || xType === 'BigInt') {
|
||||
throw new $TypeError('Assertion failed: SameValueNonNumeric does not accept Number or BigInt values');
|
||||
}
|
||||
if (xType !== Type(y)) {
|
||||
throw new $TypeError('SameValueNonNumeric requires two non-numeric values of the same type.');
|
||||
}
|
||||
return SameValue(x, y);
|
||||
};
|
||||
@@ -0,0 +1,160 @@
|
||||
'use strict';
|
||||
|
||||
// Detect either spaces or tabs but not both to properly handle tabs for indentation and spaces for alignment
|
||||
const INDENT_REGEX = /^(?:( )+|\t+)/;
|
||||
|
||||
const INDENT_TYPE_SPACE = 'space';
|
||||
const INDENT_TYPE_TAB = 'tab';
|
||||
|
||||
// Make a Map that counts how many indents/unindents have occurred for a given size and how many lines follow a given indentation.
|
||||
// The key is a concatenation of the indentation type (s = space and t = tab) and the size of the indents/unindents.
|
||||
//
|
||||
// indents = {
|
||||
// t3: [1, 0],
|
||||
// t4: [1, 5],
|
||||
// s5: [1, 0],
|
||||
// s12: [1, 0],
|
||||
// }
|
||||
function makeIndentsMap(string, ignoreSingleSpaces) {
|
||||
const indents = new Map();
|
||||
|
||||
// Remember the size of previous line's indentation
|
||||
let previousSize = 0;
|
||||
let previousIndentType;
|
||||
|
||||
// Indents key (ident type + size of the indents/unindents)
|
||||
let key;
|
||||
|
||||
for (const line of string.split(/\n/g)) {
|
||||
if (!line) {
|
||||
// Ignore empty lines
|
||||
continue;
|
||||
}
|
||||
|
||||
let indent;
|
||||
let indentType;
|
||||
let weight;
|
||||
let entry;
|
||||
const matches = line.match(INDENT_REGEX);
|
||||
|
||||
if (matches === null) {
|
||||
previousSize = 0;
|
||||
previousIndentType = '';
|
||||
} else {
|
||||
indent = matches[0].length;
|
||||
|
||||
if (matches[1]) {
|
||||
indentType = INDENT_TYPE_SPACE;
|
||||
} else {
|
||||
indentType = INDENT_TYPE_TAB;
|
||||
}
|
||||
|
||||
// Ignore single space unless it's the only indent detected to prevent common false positives
|
||||
if (ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && indent === 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (indentType !== previousIndentType) {
|
||||
previousSize = 0;
|
||||
}
|
||||
|
||||
previousIndentType = indentType;
|
||||
|
||||
weight = 0;
|
||||
|
||||
const indentDifference = indent - previousSize;
|
||||
previousSize = indent;
|
||||
|
||||
// Previous line have same indent?
|
||||
if (indentDifference === 0) {
|
||||
weight++;
|
||||
// We use the key from previous loop
|
||||
} else {
|
||||
const absoluteIndentDifference = indentDifference > 0 ? indentDifference : -indentDifference;
|
||||
key = encodeIndentsKey(indentType, absoluteIndentDifference);
|
||||
}
|
||||
|
||||
// Update the stats
|
||||
entry = indents.get(key);
|
||||
|
||||
if (entry === undefined) {
|
||||
entry = [1, 0]; // Init
|
||||
} else {
|
||||
entry = [++entry[0], entry[1] + weight];
|
||||
}
|
||||
|
||||
indents.set(key, entry);
|
||||
}
|
||||
}
|
||||
|
||||
return indents;
|
||||
}
|
||||
|
||||
// Encode the indent type and amount as a string (e.g. 's4') for use as a compound key in the indents Map.
|
||||
function encodeIndentsKey(indentType, indentAmount) {
|
||||
const typeCharacter = indentType === INDENT_TYPE_SPACE ? 's' : 't';
|
||||
return typeCharacter + String(indentAmount);
|
||||
}
|
||||
|
||||
// Extract the indent type and amount from a key of the indents Map.
|
||||
function decodeIndentsKey(indentsKey) {
|
||||
const keyHasTypeSpace = indentsKey[0] === 's';
|
||||
const type = keyHasTypeSpace ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
||||
|
||||
const amount = Number(indentsKey.slice(1));
|
||||
|
||||
return {type, amount};
|
||||
}
|
||||
|
||||
// Return the key (e.g. 's4') from the indents Map that represents the most common indent,
|
||||
// or return undefined if there are no indents.
|
||||
function getMostUsedKey(indents) {
|
||||
let result;
|
||||
let maxUsed = 0;
|
||||
let maxWeight = 0;
|
||||
|
||||
for (const [key, [usedCount, weight]] of indents) {
|
||||
if (usedCount > maxUsed || (usedCount === maxUsed && weight > maxWeight)) {
|
||||
maxUsed = usedCount;
|
||||
maxWeight = weight;
|
||||
result = key;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function makeIndentString(type, amount) {
|
||||
const indentCharacter = type === INDENT_TYPE_SPACE ? ' ' : '\t';
|
||||
return indentCharacter.repeat(amount);
|
||||
}
|
||||
|
||||
module.exports = string => {
|
||||
if (typeof string !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
// Identify indents while skipping single space indents to avoid common edge cases (e.g. code comments)
|
||||
// If no indents are identified, run again and include all indents for comprehensive detection
|
||||
let indents = makeIndentsMap(string, true);
|
||||
if (indents.size === 0) {
|
||||
indents = makeIndentsMap(string, false);
|
||||
}
|
||||
|
||||
const keyOfMostUsedIndent = getMostUsedKey(indents);
|
||||
|
||||
let type;
|
||||
let amount = 0;
|
||||
let indent = '';
|
||||
|
||||
if (keyOfMostUsedIndent !== undefined) {
|
||||
({type, amount} = decodeIndentsKey(keyOfMostUsedIndent));
|
||||
indent = makeIndentString(type, amount);
|
||||
}
|
||||
|
||||
return {
|
||||
amount,
|
||||
type,
|
||||
indent
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"is-string","version":"1.0.7","files":{".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883671619,"integrity":"sha512-aLxN7EM7vuJGE3vcz8CsQow+RuaR3thZWTHupkykz/8WOXUd8ayX5goRxPe3MCnZ0VVDkuEk8UBkk3NodRfMOg==","mode":420,"size":159},"LICENSE":{"checkedAt":1678883671601,"integrity":"sha512-CWRd82wre8E2D9wfNTwrOCxhLsdU7obtQTc4poEGt1uTk93MEI2QW01sXILetqMRgoYp4EIKQZNHNCQrALOFjw==","mode":420,"size":1082},".eslintrc":{"checkedAt":1678883671733,"integrity":"sha512-xSC2Jbf3piDkVEnTOZp1DLdSRbBjtmhqsNPYNO6A3vTIZNlKEIjGjanyRpSnDL/WEbAlsQppaOedA43q+GyRgQ==","mode":420,"size":217},"package.json":{"checkedAt":1678883671733,"integrity":"sha512-Dr7l6ipRyNu4JT2Y/pTfwM2hLM7NKDBZX9YBgDR+yLztaiyFxbdpQHE0IfntB3mu8XN836pXVrpYHjm428cFjQ==","mode":420,"size":2100},"test/index.js":{"checkedAt":1678883671733,"integrity":"sha512-kgQJEMWwDH1RXOKGROOkpqaNN10V+rppOjk6LE4sOOf8V3bNVh2F8T7kIqHUqX6Ti8DlhaR/3FHLrjHRXrWhJg==","mode":420,"size":1411},"index.js":{"checkedAt":1678883671733,"integrity":"sha512-oolwHwFdshEVSWfbQVglfxFPpzkrMc/wjd3YOeINEOdywLFNaj+OlAI4NeAKjiWRfAl6KNdAMpQaMet2N7wxXg==","mode":420,"size":560},"CHANGELOG.md":{"checkedAt":1678883671736,"integrity":"sha512-yzFFL+biSDlUWbjDexMYnJDBhqmcC4BnrVBzKAXIlvNt76bO6A/yKkMWyKPi0a9tPdygoVdGC4Fz9A/b/np2Og==","mode":420,"size":10944},"README.md":{"checkedAt":1678883671736,"integrity":"sha512-yHOU8Jpw+TA+qoNc7rQtdeCg303bYoaLBWxMt77LIh6/umItCciajXSKQNkYV+JM7vHShPKdu6O5Ri+GSFIcIQ==","mode":420,"size":2064},".github/FUNDING.yml":{"checkedAt":1678883671736,"integrity":"sha512-82RQmsZ2ogIrwLFA5+EsL6QYsDr7htp+yCFL44qJH5+ir6gK7Wkl/Ebmk8AZb4J8OlN+0Y9fKl3KlmiAzMYrFQ==","mode":420,"size":580}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"dot-prop","version":"6.0.1","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1678883672491,"integrity":"sha512-5goZKiz6+vvDzcG5iM23yGK68ni3bZaFjRCrPayWcuXxmuX+Ps1ratevtLKrqTp1H16RqxEyS2nIr+2kr5eTxg==","mode":420,"size":2705},"package.json":{"checkedAt":1678883672491,"integrity":"sha512-t+JvP/BO7/2h2F6RbGB+N6lhe86IO77sW4obHStGa2hSnVO7btuMubP3ppGBZdQfJnPjQjxKZfgJja5oz+QVLw==","mode":420,"size":896},"readme.md":{"checkedAt":1678883672491,"integrity":"sha512-9t5VcwkD89RzVqg1iOS4Ue6KIKw7pPrD1GSveIMm5vlkehJqwY4PDtinW4OyDRc+Mtkn43wRoFUCOm762mtaxw==","mode":420,"size":2689},"index.d.ts":{"checkedAt":1678883672491,"integrity":"sha512-54EjbC/ZL4t+L5WR19kf9rf2ZxI1K4ffHsZXkPu1o8p14eGwINLMqyEzfBcl84ziToLI6qbtUeopcfUiGM+uHA==","mode":420,"size":2747}}}
|
||||
@@ -0,0 +1,309 @@
|
||||
# boxen
|
||||
|
||||
> Create boxes in the terminal
|
||||
|
||||

|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install boxen
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import boxen from 'boxen';
|
||||
|
||||
console.log(boxen('unicorn', {padding: 1}));
|
||||
/*
|
||||
┌─────────────┐
|
||||
│ │
|
||||
│ unicorn │
|
||||
│ │
|
||||
└─────────────┘
|
||||
*/
|
||||
|
||||
console.log(boxen('unicorn', {padding: 1, margin: 1, borderStyle: 'double'}));
|
||||
/*
|
||||
|
||||
╔═════════════╗
|
||||
║ ║
|
||||
║ unicorn ║
|
||||
║ ║
|
||||
╚═════════════╝
|
||||
|
||||
*/
|
||||
|
||||
console.log(boxen('unicorns love rainbows', {title: 'magical', titleAlignment: 'center'}));
|
||||
/*
|
||||
┌────── magical ───────┐
|
||||
│unicorns love rainbows│
|
||||
└──────────────────────┘
|
||||
*/
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### boxen(text, options?)
|
||||
|
||||
#### text
|
||||
|
||||
Type: `string`
|
||||
|
||||
Text inside the box.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### borderColor
|
||||
|
||||
Type: `string`\
|
||||
Values: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` or a hex value like `'#ff0000'`
|
||||
|
||||
Color of the box border.
|
||||
|
||||
##### borderStyle
|
||||
|
||||
Type: `string | object`\
|
||||
Default: `'single'`\
|
||||
Values:
|
||||
- `'single'`
|
||||
```
|
||||
┌───┐
|
||||
│foo│
|
||||
└───┘
|
||||
```
|
||||
- `'double'`
|
||||
```
|
||||
╔═══╗
|
||||
║foo║
|
||||
╚═══╝
|
||||
```
|
||||
- `'round'` (`'single'` sides with round corners)
|
||||
```
|
||||
╭───╮
|
||||
│foo│
|
||||
╰───╯
|
||||
```
|
||||
- `'bold'`
|
||||
```
|
||||
┏━━━┓
|
||||
┃foo┃
|
||||
┗━━━┛
|
||||
```
|
||||
- `'singleDouble'` (`'single'` on top and bottom, `'double'` on right and left)
|
||||
```
|
||||
╓───╖
|
||||
║foo║
|
||||
╙───╜
|
||||
```
|
||||
- `'doubleSingle'` (`'double'` on top and bottom, `'single'` on right and left)
|
||||
```
|
||||
╒═══╕
|
||||
│foo│
|
||||
╘═══╛
|
||||
```
|
||||
- `'classic'`
|
||||
```
|
||||
+---+
|
||||
|foo|
|
||||
+---+
|
||||
```
|
||||
- `'arrow'`
|
||||
```
|
||||
↘↓↓↓↙
|
||||
→foo←
|
||||
↗↑↑↑↖
|
||||
```
|
||||
|
||||
Style of the box border.
|
||||
|
||||
Can be any of the above predefined styles or an object with the following keys:
|
||||
|
||||
```js
|
||||
{
|
||||
topLeft: '+',
|
||||
topRight: '+',
|
||||
bottomLeft: '+',
|
||||
bottomRight: '+',
|
||||
top: '-',
|
||||
bottom: '-',
|
||||
left: '|',
|
||||
right: '|'
|
||||
}
|
||||
```
|
||||
|
||||
##### dimBorder
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
Reduce opacity of the border.
|
||||
|
||||
##### title
|
||||
|
||||
Type: `string`
|
||||
|
||||
Display a title at the top of the box.
|
||||
If needed, the box will horizontally expand to fit the title.
|
||||
|
||||
Example:
|
||||
```js
|
||||
console.log(boxen('foo bar', {title: 'example'}));
|
||||
/*
|
||||
┌ example ┐
|
||||
│foo bar │
|
||||
└─────────┘
|
||||
*/
|
||||
```
|
||||
|
||||
##### titleAlignment
|
||||
|
||||
Type: `string`\
|
||||
Default: `'left'`
|
||||
|
||||
Align the title in the top bar.
|
||||
|
||||
Values:
|
||||
- `'left'`
|
||||
```js
|
||||
/*
|
||||
┌ example ──────┐
|
||||
│foo bar foo bar│
|
||||
└───────────────┘
|
||||
*/
|
||||
```
|
||||
- `'center'`
|
||||
```js
|
||||
/*
|
||||
┌─── example ───┐
|
||||
│foo bar foo bar│
|
||||
└───────────────┘
|
||||
*/
|
||||
```
|
||||
- `'right'`
|
||||
```js
|
||||
/*
|
||||
┌────── example ┐
|
||||
│foo bar foo bar│
|
||||
└───────────────┘
|
||||
*/
|
||||
```
|
||||
|
||||
##### width
|
||||
|
||||
Type: `number`
|
||||
|
||||
Set a fixed width for the box.
|
||||
|
||||
*Note:* This disables terminal overflow handling and may cause the box to look broken if the user's terminal is not wide enough.
|
||||
|
||||
```js
|
||||
import boxen from 'boxen';
|
||||
|
||||
console.log(boxen('foo bar', {width: 15}));
|
||||
// ┌─────────────┐
|
||||
// │foo bar │
|
||||
// └─────────────┘
|
||||
```
|
||||
|
||||
##### height
|
||||
|
||||
Type: `number`
|
||||
|
||||
Set a fixed height for the box.
|
||||
|
||||
*Note:* This option will crop overflowing content.
|
||||
|
||||
```js
|
||||
import boxen from 'boxen';
|
||||
|
||||
console.log(boxen('foo bar', {height: 5}));
|
||||
// ┌───────┐
|
||||
// │foo bar│
|
||||
// │ │
|
||||
// │ │
|
||||
// └───────┘
|
||||
```
|
||||
|
||||
##### fullscreen
|
||||
|
||||
Type: `boolean | (width: number, height: number) => [width: number, height: number]`
|
||||
|
||||
Whether or not to fit all available space within the terminal.
|
||||
|
||||
Pass a callback function to control box dimensions:
|
||||
|
||||
```js
|
||||
import boxen from 'boxen';
|
||||
|
||||
console.log(boxen('foo bar', {
|
||||
fullscreen: (width, height) => [width, height - 1],
|
||||
}));
|
||||
```
|
||||
|
||||
##### padding
|
||||
|
||||
Type: `number | object`\
|
||||
Default: `0`
|
||||
|
||||
Space between the text and box border.
|
||||
|
||||
Accepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right padding is 3 times the top/bottom to make it look nice.
|
||||
|
||||
##### margin
|
||||
|
||||
Type: `number | object`\
|
||||
Default: `0`
|
||||
|
||||
Space around the box.
|
||||
|
||||
Accepts a number or an object with any of the `top`, `right`, `bottom`, `left` properties. When a number is specified, the left/right margin is 3 times the top/bottom to make it look nice.
|
||||
|
||||
##### float
|
||||
|
||||
Type: `string`\
|
||||
Default: `'left'`\
|
||||
Values: `'right'` `'center'` `'left'`
|
||||
|
||||
Float the box on the available terminal screen space.
|
||||
|
||||
##### backgroundColor
|
||||
|
||||
Type: `string`\
|
||||
Values: `'black'` `'red'` `'green'` `'yellow'` `'blue'` `'magenta'` `'cyan'` `'white'` `'gray'` or a hex value like `'#ff0000'`
|
||||
|
||||
Color of the background.
|
||||
|
||||
##### textAlignment
|
||||
|
||||
Type: `string`\
|
||||
Default: `'left'`\
|
||||
Values: `'left'` `'center'` `'right'`
|
||||
|
||||
Align the text in the box based on the widest line.
|
||||
|
||||
## Maintainer
|
||||
|
||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
- [Caesarovich](https://github.com/Caesarovich)
|
||||
|
||||
## Related
|
||||
|
||||
- [boxen-cli](https://github.com/sindresorhus/boxen-cli) - CLI for this module
|
||||
- [cli-boxes](https://github.com/sindresorhus/cli-boxes) - Boxes for use in the terminal
|
||||
- [ink-box](https://github.com/sindresorhus/ink-box) - Box component for Ink that uses this package
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-boxen?utm_source=npm-boxen&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var of = Array.of, result;
|
||||
if (typeof of !== "function") return false;
|
||||
result = of("foo", "bar");
|
||||
return Boolean(result && result[1] === "bar");
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AACtC,iDAAgD;AA2DhD,SAAgB,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,uBAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,mBAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,mBAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC;AAZD,gCAYC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require('./keyBy');
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('../utils')
|
||||
|
||||
class BackdropFilter extends Declaration {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(
|
||||
this.prefixes.map(i => {
|
||||
return i === '-ms-' ? '-webkit-' : i
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BackdropFilter.names = ['backdrop-filter']
|
||||
|
||||
module.exports = BackdropFilter
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "cli-width",
|
||||
"version": "4.0.0",
|
||||
"description": "Get stdout window width, with two fallbacks, tty and then a default.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "node test | tspec",
|
||||
"coverage": "nyc node test | tspec",
|
||||
"coveralls": "npm run coverage -s && coveralls < coverage/lcov.info",
|
||||
"release": "standard-version"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:knownasilya/cli-width.git"
|
||||
},
|
||||
"author": "Ilya Radchenko <knownasilya@gmail.com>",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/knownasilya/cli-width/issues"
|
||||
},
|
||||
"homepage": "https://github.com/knownasilya/cli-width",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.1.1",
|
||||
"nyc": "^15.1.0",
|
||||
"standard-version": "^9.3.2",
|
||||
"tap-spec": "^5.0.0",
|
||||
"tape": "^5.5.2"
|
||||
},
|
||||
"volta": {
|
||||
"node": "12.22.11",
|
||||
"npm": "8.5.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.commaDecimal = exports.dotDecimal = exports.bengaliLocales = exports.farsiLocales = exports.arabicLocales = exports.englishLocales = exports.decimal = exports.alphanumeric = exports.alpha = void 0;
|
||||
var alpha = {
|
||||
'en-US': /^[A-Z]+$/i,
|
||||
'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
||||
'bg-BG': /^[А-Я]+$/i,
|
||||
'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
||||
'da-DK': /^[A-ZÆØÅ]+$/i,
|
||||
'de-DE': /^[A-ZÄÖÜß]+$/i,
|
||||
'el-GR': /^[Α-ώ]+$/i,
|
||||
'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i,
|
||||
'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,
|
||||
'fi-FI': /^[A-ZÅÄÖ]+$/i,
|
||||
'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
||||
'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
||||
'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
||||
'nb-NO': /^[A-ZÆØÅ]+$/i,
|
||||
'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
|
||||
'nn-NO': /^[A-ZÆØÅ]+$/i,
|
||||
'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
||||
'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
||||
'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
||||
'ru-RU': /^[А-ЯЁ]+$/i,
|
||||
'sl-SI': /^[A-ZČĆĐŠŽ]+$/i,
|
||||
'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
||||
'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i,
|
||||
'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i,
|
||||
'sv-SE': /^[A-ZÅÄÖ]+$/i,
|
||||
'th-TH': /^[ก-๐\s]+$/i,
|
||||
'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
|
||||
'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,
|
||||
'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
||||
'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
||||
'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
||||
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
||||
he: /^[א-ת]+$/,
|
||||
fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,
|
||||
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
||||
'hi-IN': /^[\u0900-\u0961]+[\u0972-\u097F]*$/i,
|
||||
'si-LK': /^[\u0D80-\u0DFF]+$/
|
||||
};
|
||||
exports.alpha = alpha;
|
||||
var alphanumeric = {
|
||||
'en-US': /^[0-9A-Z]+$/i,
|
||||
'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
||||
'bg-BG': /^[0-9А-Я]+$/i,
|
||||
'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
||||
'da-DK': /^[0-9A-ZÆØÅ]+$/i,
|
||||
'de-DE': /^[0-9A-ZÄÖÜß]+$/i,
|
||||
'el-GR': /^[0-9Α-ω]+$/i,
|
||||
'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
|
||||
'fi-FI': /^[0-9A-ZÅÄÖ]+$/i,
|
||||
'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
||||
'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
||||
'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
||||
'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
||||
'nb-NO': /^[0-9A-ZÆØÅ]+$/i,
|
||||
'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
|
||||
'nn-NO': /^[0-9A-ZÆØÅ]+$/i,
|
||||
'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
||||
'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
||||
'ru-RU': /^[0-9А-ЯЁ]+$/i,
|
||||
'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,
|
||||
'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
||||
'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,
|
||||
'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
|
||||
'sv-SE': /^[0-9A-ZÅÄÖ]+$/i,
|
||||
'th-TH': /^[ก-๙\s]+$/i,
|
||||
'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
|
||||
'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
|
||||
'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
||||
'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
||||
'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
||||
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
||||
he: /^[0-9א-ת]+$/,
|
||||
fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
|
||||
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
||||
'hi-IN': /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
|
||||
'si-LK': /^[0-9\u0D80-\u0DFF]+$/
|
||||
};
|
||||
exports.alphanumeric = alphanumeric;
|
||||
var decimal = {
|
||||
'en-US': '.',
|
||||
ar: '٫'
|
||||
};
|
||||
exports.decimal = decimal;
|
||||
var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM'];
|
||||
exports.englishLocales = englishLocales;
|
||||
|
||||
for (var locale, i = 0; i < englishLocales.length; i++) {
|
||||
locale = "en-".concat(englishLocales[i]);
|
||||
alpha[locale] = alpha['en-US'];
|
||||
alphanumeric[locale] = alphanumeric['en-US'];
|
||||
decimal[locale] = decimal['en-US'];
|
||||
} // Source: http://www.localeplanet.com/java/
|
||||
|
||||
|
||||
var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE'];
|
||||
exports.arabicLocales = arabicLocales;
|
||||
|
||||
for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
|
||||
_locale = "ar-".concat(arabicLocales[_i]);
|
||||
alpha[_locale] = alpha.ar;
|
||||
alphanumeric[_locale] = alphanumeric.ar;
|
||||
decimal[_locale] = decimal.ar;
|
||||
}
|
||||
|
||||
var farsiLocales = ['IR', 'AF'];
|
||||
exports.farsiLocales = farsiLocales;
|
||||
|
||||
for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {
|
||||
_locale2 = "fa-".concat(farsiLocales[_i2]);
|
||||
alphanumeric[_locale2] = alphanumeric.fa;
|
||||
decimal[_locale2] = decimal.ar;
|
||||
}
|
||||
|
||||
var bengaliLocales = ['BD', 'IN'];
|
||||
exports.bengaliLocales = bengaliLocales;
|
||||
|
||||
for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) {
|
||||
_locale3 = "bn-".concat(bengaliLocales[_i3]);
|
||||
alpha[_locale3] = alpha.bn;
|
||||
alphanumeric[_locale3] = alphanumeric.bn;
|
||||
decimal[_locale3] = decimal['en-US'];
|
||||
} // Source: https://en.wikipedia.org/wiki/Decimal_mark
|
||||
|
||||
|
||||
var dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY'];
|
||||
exports.dotDecimal = dotDecimal;
|
||||
var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'es-ES', 'fr-CA', 'fr-FR', 'id-ID', 'it-IT', 'ku-IQ', 'hi-IN', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN'];
|
||||
exports.commaDecimal = commaDecimal;
|
||||
|
||||
for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) {
|
||||
decimal[dotDecimal[_i4]] = decimal['en-US'];
|
||||
}
|
||||
|
||||
for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) {
|
||||
decimal[commaDecimal[_i5]] = ',';
|
||||
}
|
||||
|
||||
alpha['fr-CA'] = alpha['fr-FR'];
|
||||
alphanumeric['fr-CA'] = alphanumeric['fr-FR'];
|
||||
alpha['pt-BR'] = alpha['pt-PT'];
|
||||
alphanumeric['pt-BR'] = alphanumeric['pt-PT'];
|
||||
decimal['pt-BR'] = decimal['pt-PT']; // see #862
|
||||
|
||||
alpha['pl-Pl'] = alpha['pl-PL'];
|
||||
alphanumeric['pl-Pl'] = alphanumeric['pl-PL'];
|
||||
decimal['pl-Pl'] = decimal['pl-PL']; // see #1455
|
||||
|
||||
alpha['fa-AF'] = alpha.fa;
|
||||
@@ -0,0 +1,70 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';
|
||||
import { from } from './from';
|
||||
import { identity } from '../util/identity';
|
||||
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
|
||||
import { popResultSelector, popScheduler } from '../util/args';
|
||||
import { createObject } from '../util/createObject';
|
||||
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
|
||||
import { executeSchedule } from '../util/executeSchedule';
|
||||
export function combineLatest() {
|
||||
var args = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
args[_i] = arguments[_i];
|
||||
}
|
||||
var scheduler = popScheduler(args);
|
||||
var resultSelector = popResultSelector(args);
|
||||
var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;
|
||||
if (observables.length === 0) {
|
||||
return from([], scheduler);
|
||||
}
|
||||
var result = new Observable(combineLatestInit(observables, scheduler, keys
|
||||
?
|
||||
function (values) { return createObject(keys, values); }
|
||||
:
|
||||
identity));
|
||||
return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;
|
||||
}
|
||||
export function combineLatestInit(observables, scheduler, valueTransform) {
|
||||
if (valueTransform === void 0) { valueTransform = identity; }
|
||||
return function (subscriber) {
|
||||
maybeSchedule(scheduler, function () {
|
||||
var length = observables.length;
|
||||
var values = new Array(length);
|
||||
var active = length;
|
||||
var remainingFirstValues = length;
|
||||
var _loop_1 = function (i) {
|
||||
maybeSchedule(scheduler, function () {
|
||||
var source = from(observables[i], scheduler);
|
||||
var hasFirstValue = false;
|
||||
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
|
||||
values[i] = value;
|
||||
if (!hasFirstValue) {
|
||||
hasFirstValue = true;
|
||||
remainingFirstValues--;
|
||||
}
|
||||
if (!remainingFirstValues) {
|
||||
subscriber.next(valueTransform(values.slice()));
|
||||
}
|
||||
}, function () {
|
||||
if (!--active) {
|
||||
subscriber.complete();
|
||||
}
|
||||
}));
|
||||
}, subscriber);
|
||||
};
|
||||
for (var i = 0; i < length; i++) {
|
||||
_loop_1(i);
|
||||
}
|
||||
}, subscriber);
|
||||
};
|
||||
}
|
||||
function maybeSchedule(scheduler, execute, subscription) {
|
||||
if (scheduler) {
|
||||
executeSchedule(subscription, scheduler, execute);
|
||||
}
|
||||
else {
|
||||
execute();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=combineLatest.js.map
|
||||
@@ -0,0 +1,87 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: ()=>normalizeTailwindDirectives
|
||||
});
|
||||
const _log = /*#__PURE__*/ _interopRequireDefault(require("../util/log"));
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
function normalizeTailwindDirectives(root) {
|
||||
let tailwindDirectives = new Set();
|
||||
let layerDirectives = new Set();
|
||||
let applyDirectives = new Set();
|
||||
root.walkAtRules((atRule)=>{
|
||||
if (atRule.name === "apply") {
|
||||
applyDirectives.add(atRule);
|
||||
}
|
||||
if (atRule.name === "import") {
|
||||
if (atRule.params === '"tailwindcss/base"' || atRule.params === "'tailwindcss/base'") {
|
||||
atRule.name = "tailwind";
|
||||
atRule.params = "base";
|
||||
} else if (atRule.params === '"tailwindcss/components"' || atRule.params === "'tailwindcss/components'") {
|
||||
atRule.name = "tailwind";
|
||||
atRule.params = "components";
|
||||
} else if (atRule.params === '"tailwindcss/utilities"' || atRule.params === "'tailwindcss/utilities'") {
|
||||
atRule.name = "tailwind";
|
||||
atRule.params = "utilities";
|
||||
} else if (atRule.params === '"tailwindcss/screens"' || atRule.params === "'tailwindcss/screens'" || atRule.params === '"tailwindcss/variants"' || atRule.params === "'tailwindcss/variants'") {
|
||||
atRule.name = "tailwind";
|
||||
atRule.params = "variants";
|
||||
}
|
||||
}
|
||||
if (atRule.name === "tailwind") {
|
||||
if (atRule.params === "screens") {
|
||||
atRule.params = "variants";
|
||||
}
|
||||
tailwindDirectives.add(atRule.params);
|
||||
}
|
||||
if ([
|
||||
"layer",
|
||||
"responsive",
|
||||
"variants"
|
||||
].includes(atRule.name)) {
|
||||
if ([
|
||||
"responsive",
|
||||
"variants"
|
||||
].includes(atRule.name)) {
|
||||
_log.default.warn(`${atRule.name}-at-rule-deprecated`, [
|
||||
`The \`@${atRule.name}\` directive has been deprecated in Tailwind CSS v3.0.`,
|
||||
`Use \`@layer utilities\` or \`@layer components\` instead.`,
|
||||
"https://tailwindcss.com/docs/upgrade-guide#replace-variants-with-layer"
|
||||
]);
|
||||
}
|
||||
layerDirectives.add(atRule);
|
||||
}
|
||||
});
|
||||
if (!tailwindDirectives.has("base") || !tailwindDirectives.has("components") || !tailwindDirectives.has("utilities")) {
|
||||
for (let rule of layerDirectives){
|
||||
if (rule.name === "layer" && [
|
||||
"base",
|
||||
"components",
|
||||
"utilities"
|
||||
].includes(rule.params)) {
|
||||
if (!tailwindDirectives.has(rule.params)) {
|
||||
throw rule.error(`\`@layer ${rule.params}\` is used but no matching \`@tailwind ${rule.params}\` directive is present.`);
|
||||
}
|
||||
} else if (rule.name === "responsive") {
|
||||
if (!tailwindDirectives.has("utilities")) {
|
||||
throw rule.error("`@responsive` is used but `@tailwind utilities` is missing.");
|
||||
}
|
||||
} else if (rule.name === "variants") {
|
||||
if (!tailwindDirectives.has("utilities")) {
|
||||
throw rule.error("`@variants` is used but `@tailwind utilities` is missing.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
tailwindDirectives,
|
||||
applyDirectives
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K"},C:{"1":"QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB EC FC"},D:{"1":"6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 I v J D E F A B C K L G M N O w g x y z"},E:{"1":"C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A B HC zB IC JC KC LC 0B"},F:{"1":"0 1 2 3 4 5 6 7 8 9 N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C G M PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:7,C:"Directory selection from file input"};
|
||||
@@ -0,0 +1,64 @@
|
||||
<script>
|
||||
export let isActive = false;
|
||||
export let isFirst = false;
|
||||
export let isHover = false;
|
||||
export let getOptionLabel = undefined;
|
||||
export let item = undefined;
|
||||
export let filterText = '';
|
||||
|
||||
let itemClasses = '';
|
||||
|
||||
$: {
|
||||
const classes = [];
|
||||
if (isActive) { classes.push('active'); }
|
||||
if (isFirst) { classes.push('first'); }
|
||||
if (isHover) { classes.push('hover'); }
|
||||
if (item.isGroupHeader) { classes.push('groupHeader'); }
|
||||
if (item.isGroupItem) { classes.push('groupItem'); }
|
||||
itemClasses = classes.join(' ');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
cursor: default;
|
||||
height: var(--height, 42px);
|
||||
line-height: var(--height, 42px);
|
||||
padding: var(--itemPadding, 0 20px);
|
||||
color: var(--itemColor, inherit);
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.groupHeader {
|
||||
text-transform: var(--groupTitleTextTransform, uppercase);
|
||||
}
|
||||
|
||||
.groupItem {
|
||||
padding-left: var(--groupItemPaddingLeft, 40px);
|
||||
}
|
||||
|
||||
.item:active {
|
||||
background: var(--itemActiveBackground, #b9daff);
|
||||
}
|
||||
|
||||
.item.active {
|
||||
background: var(--itemIsActiveBG, #007aff);
|
||||
color: var(--itemIsActiveColor, #fff);
|
||||
}
|
||||
|
||||
.item.first {
|
||||
border-radius: var(--itemFirstBorderRadius, 4px 4px 0 0);
|
||||
}
|
||||
|
||||
.item.hover:not(.active) {
|
||||
background: var(--itemHoverBG, #e7f2ff);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="item {itemClasses}">
|
||||
{@html getOptionLabel(item, filterText)}
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
import { Node } from 'estree';
|
||||
export default function flatten_reference(node: Node): {
|
||||
name: string;
|
||||
nodes: any[];
|
||||
parts: any[];
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
import { Subscription } from '../Subscription';
|
||||
import { SchedulerLike } from '../types';
|
||||
export declare function executeSchedule(parentSubscription: Subscription, scheduler: SchedulerLike, work: () => void, delay: number, repeat: true): void;
|
||||
export declare function executeSchedule(parentSubscription: Subscription, scheduler: SchedulerLike, work: () => void, delay?: number, repeat?: false): Subscription;
|
||||
//# sourceMappingURL=executeSchedule.d.ts.map
|
||||
@@ -0,0 +1,180 @@
|
||||
import { PartialObserver, ObservableNotification, CompleteNotification, NextNotification, ErrorNotification } from './types';
|
||||
import { Observable } from './Observable';
|
||||
/**
|
||||
* @deprecated Use a string literal instead. `NotificationKind` will be replaced with a type alias in v8.
|
||||
* It will not be replaced with a const enum as those are not compatible with isolated modules.
|
||||
*/
|
||||
export declare enum NotificationKind {
|
||||
NEXT = "N",
|
||||
ERROR = "E",
|
||||
COMPLETE = "C"
|
||||
}
|
||||
/**
|
||||
* Represents a push-based event or value that an {@link Observable} can emit.
|
||||
* This class is particularly useful for operators that manage notifications,
|
||||
* like {@link materialize}, {@link dematerialize}, {@link observeOn}, and
|
||||
* others. Besides wrapping the actual delivered value, it also annotates it
|
||||
* with metadata of, for instance, what type of push message it is (`next`,
|
||||
* `error`, or `complete`).
|
||||
*
|
||||
* @see {@link materialize}
|
||||
* @see {@link dematerialize}
|
||||
* @see {@link observeOn}
|
||||
* @deprecated It is NOT recommended to create instances of `Notification` directly.
|
||||
* Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.
|
||||
* For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.
|
||||
* Will be removed in v8.
|
||||
*/
|
||||
export declare class Notification<T> {
|
||||
readonly kind: 'N' | 'E' | 'C';
|
||||
readonly value?: T | undefined;
|
||||
readonly error?: any;
|
||||
/**
|
||||
* A value signifying that the notification will "next" if observed. In truth,
|
||||
* This is really synonymous with just checking `kind === "N"`.
|
||||
* @deprecated Will be removed in v8. Instead, just check to see if the value of `kind` is `"N"`.
|
||||
*/
|
||||
readonly hasValue: boolean;
|
||||
/**
|
||||
* Creates a "Next" notification object.
|
||||
* @param kind Always `'N'`
|
||||
* @param value The value to notify with if observed.
|
||||
* @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead.
|
||||
*/
|
||||
constructor(kind: 'N', value?: T);
|
||||
/**
|
||||
* Creates an "Error" notification object.
|
||||
* @param kind Always `'E'`
|
||||
* @param value Always `undefined`
|
||||
* @param error The error to notify with if observed.
|
||||
* @deprecated Internal implementation detail. Use {@link Notification#createError createError} instead.
|
||||
*/
|
||||
constructor(kind: 'E', value: undefined, error: any);
|
||||
/**
|
||||
* Creates a "completion" notification object.
|
||||
* @param kind Always `'C'`
|
||||
* @deprecated Internal implementation detail. Use {@link Notification#createComplete createComplete} instead.
|
||||
*/
|
||||
constructor(kind: 'C');
|
||||
/**
|
||||
* Executes the appropriate handler on a passed `observer` given the `kind` of notification.
|
||||
* If the handler is missing it will do nothing. Even if the notification is an error, if
|
||||
* there is no error handler on the observer, an error will not be thrown, it will noop.
|
||||
* @param observer The observer to notify.
|
||||
*/
|
||||
observe(observer: PartialObserver<T>): void;
|
||||
/**
|
||||
* Executes a notification on the appropriate handler from a list provided.
|
||||
* If a handler is missing for the kind of notification, nothing is called
|
||||
* and no error is thrown, it will be a noop.
|
||||
* @param next A next handler
|
||||
* @param error An error handler
|
||||
* @param complete A complete handler
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
do(next: (value: T) => void, error: (err: any) => void, complete: () => void): void;
|
||||
/**
|
||||
* Executes a notification on the appropriate handler from a list provided.
|
||||
* If a handler is missing for the kind of notification, nothing is called
|
||||
* and no error is thrown, it will be a noop.
|
||||
* @param next A next handler
|
||||
* @param error An error handler
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
do(next: (value: T) => void, error: (err: any) => void): void;
|
||||
/**
|
||||
* Executes the next handler if the Notification is of `kind` `"N"`. Otherwise
|
||||
* this will not error, and it will be a noop.
|
||||
* @param next The next handler
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
do(next: (value: T) => void): void;
|
||||
/**
|
||||
* Executes a notification on the appropriate handler from a list provided.
|
||||
* If a handler is missing for the kind of notification, nothing is called
|
||||
* and no error is thrown, it will be a noop.
|
||||
* @param next A next handler
|
||||
* @param error An error handler
|
||||
* @param complete A complete handler
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
accept(next: (value: T) => void, error: (err: any) => void, complete: () => void): void;
|
||||
/**
|
||||
* Executes a notification on the appropriate handler from a list provided.
|
||||
* If a handler is missing for the kind of notification, nothing is called
|
||||
* and no error is thrown, it will be a noop.
|
||||
* @param next A next handler
|
||||
* @param error An error handler
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
accept(next: (value: T) => void, error: (err: any) => void): void;
|
||||
/**
|
||||
* Executes the next handler if the Notification is of `kind` `"N"`. Otherwise
|
||||
* this will not error, and it will be a noop.
|
||||
* @param next The next handler
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
accept(next: (value: T) => void): void;
|
||||
/**
|
||||
* Executes the appropriate handler on a passed `observer` given the `kind` of notification.
|
||||
* If the handler is missing it will do nothing. Even if the notification is an error, if
|
||||
* there is no error handler on the observer, an error will not be thrown, it will noop.
|
||||
* @param observer The observer to notify.
|
||||
* @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8.
|
||||
*/
|
||||
accept(observer: PartialObserver<T>): void;
|
||||
/**
|
||||
* Returns a simple Observable that just delivers the notification represented
|
||||
* by this Notification instance.
|
||||
*
|
||||
* @deprecated Will be removed in v8. To convert a `Notification` to an {@link Observable},
|
||||
* use {@link of} and {@link dematerialize}: `of(notification).pipe(dematerialize())`.
|
||||
*/
|
||||
toObservable(): Observable<T>;
|
||||
private static completeNotification;
|
||||
/**
|
||||
* A shortcut to create a Notification instance of the type `next` from a
|
||||
* given value.
|
||||
* @param {T} value The `next` value.
|
||||
* @return {Notification<T>} The "next" Notification representing the
|
||||
* argument.
|
||||
* @nocollapse
|
||||
* @deprecated It is NOT recommended to create instances of `Notification` directly.
|
||||
* Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.
|
||||
* For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.
|
||||
* Will be removed in v8.
|
||||
*/
|
||||
static createNext<T>(value: T): Notification<T> & NextNotification<T>;
|
||||
/**
|
||||
* A shortcut to create a Notification instance of the type `error` from a
|
||||
* given error.
|
||||
* @param {any} [err] The `error` error.
|
||||
* @return {Notification<T>} The "error" Notification representing the
|
||||
* argument.
|
||||
* @nocollapse
|
||||
* @deprecated It is NOT recommended to create instances of `Notification` directly.
|
||||
* Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.
|
||||
* For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.
|
||||
* Will be removed in v8.
|
||||
*/
|
||||
static createError(err?: any): Notification<never> & ErrorNotification;
|
||||
/**
|
||||
* A shortcut to create a Notification instance of the type `complete`.
|
||||
* @return {Notification<any>} The valueless "complete" Notification.
|
||||
* @nocollapse
|
||||
* @deprecated It is NOT recommended to create instances of `Notification` directly.
|
||||
* Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}.
|
||||
* For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`.
|
||||
* Will be removed in v8.
|
||||
*/
|
||||
static createComplete(): Notification<never> & CompleteNotification;
|
||||
}
|
||||
/**
|
||||
* Executes the appropriate handler on a passed `observer` given the `kind` of notification.
|
||||
* If the handler is missing it will do nothing. Even if the notification is an error, if
|
||||
* there is no error handler on the observer, an error will not be thrown, it will noop.
|
||||
* @param notification The notification object to observe.
|
||||
* @param observer The observer to notify.
|
||||
*/
|
||||
export declare function observeNotification<T>(notification: ObservableNotification<T>, observer: PartialObserver<T>): void;
|
||||
//# sourceMappingURL=Notification.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;IAAA;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,iDAAkB,GAAlB;QACE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAa;QAChC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AAlBD,IAkBC"}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('assignWith', require('../assignWith'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[20269] = (function(){ var d = "\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"<22><>%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]<5D>_<EFBFBD>abcdefghijklmnopqrstuvwxyz{|}<7D>
<C29C><C29D> ¡¢£$¥#§¤‘“«←↑→↓°±²³×µ¶·÷’”»¼½¿<EFA3B7>`´^~¯̆̈<EFA3B8>̧̨̲̊̋̌―¹®©™♩<EFA3BB><EFA3BC>⅛⅜⅝⅞ΩÆÐĦ<EFA3BD>IJĿŁØŒºÞŦŊʼnĸæđðħıijŀłøœßþŧ", 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,24 @@
|
||||
"use strict";
|
||||
|
||||
var ensurePlainFunction = require("../../../object/ensure-plain-function")
|
||||
, isThenable = require("../../../object/is-thenable")
|
||||
, ensureThenable = require("../../../object/ensure-thenable");
|
||||
|
||||
var resolveCallback = function (callback, next) {
|
||||
var callbackResult = callback();
|
||||
if (!isThenable(callbackResult)) return next();
|
||||
return callbackResult.then(next);
|
||||
};
|
||||
|
||||
module.exports = function (callback) {
|
||||
ensureThenable(this);
|
||||
ensurePlainFunction(callback);
|
||||
return this.then(
|
||||
function (result) {
|
||||
return resolveCallback(callback, function () { return result; });
|
||||
},
|
||||
function (error) {
|
||||
return resolveCallback(callback, function () { throw error; });
|
||||
}
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,168 @@
|
||||
var path = require('path');
|
||||
|
||||
var mjsStub = path.join(__dirname, 'mjs-stub');
|
||||
|
||||
var extensions = {
|
||||
'.babel.js': [
|
||||
{
|
||||
module: '@babel/register',
|
||||
register: function(hook) {
|
||||
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
|
||||
// which only captures the final extension (.babel.js -> .js)
|
||||
hook({ extensions: '.js' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'babel-register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.js' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'babel-core/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.js' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'babel/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.js' });
|
||||
},
|
||||
},
|
||||
],
|
||||
'.babel.ts': [
|
||||
{
|
||||
module: '@babel/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.ts' });
|
||||
},
|
||||
},
|
||||
],
|
||||
'.buble.js': 'buble/register',
|
||||
'.cirru': 'cirru-script/lib/register',
|
||||
'.cjsx': 'node-cjsx/register',
|
||||
'.co': 'coco',
|
||||
'.coffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'],
|
||||
'.coffee.md': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'],
|
||||
'.csv': 'require-csv',
|
||||
'.eg': 'earlgrey/register',
|
||||
'.esm.js': {
|
||||
module: 'esm',
|
||||
register: function(hook) {
|
||||
// register on .js extension due to https://github.com/joyent/node/blob/v0.12.0/lib/module.js#L353
|
||||
// which only captures the final extension (.babel.js -> .js)
|
||||
var esmLoader = hook(module);
|
||||
require.extensions['.js'] = esmLoader('module')._extensions['.js'];
|
||||
},
|
||||
},
|
||||
'.iced': ['iced-coffee-script/register', 'iced-coffee-script'],
|
||||
'.iced.md': 'iced-coffee-script/register',
|
||||
'.ini': 'require-ini',
|
||||
'.js': null,
|
||||
'.json': null,
|
||||
'.json5': 'json5/lib/require',
|
||||
'.jsx': [
|
||||
{
|
||||
module: '@babel/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.jsx' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'babel-register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.jsx' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'babel-core/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.jsx' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'babel/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.jsx' });
|
||||
},
|
||||
},
|
||||
{
|
||||
module: 'node-jsx',
|
||||
register: function(hook) {
|
||||
hook.install({ extension: '.jsx', harmony: true });
|
||||
},
|
||||
},
|
||||
],
|
||||
'.litcoffee': ['coffeescript/register', 'coffee-script/register', 'coffeescript', 'coffee-script'],
|
||||
'.liticed': 'iced-coffee-script/register',
|
||||
'.ls': ['livescript', 'LiveScript'],
|
||||
'.mjs': mjsStub,
|
||||
'.node': null,
|
||||
'.toml': {
|
||||
module: 'toml-require',
|
||||
register: function(hook) {
|
||||
hook.install();
|
||||
},
|
||||
},
|
||||
'.ts': [
|
||||
'ts-node/register',
|
||||
'typescript-node/register',
|
||||
'typescript-register',
|
||||
'typescript-require',
|
||||
'sucrase/register/ts',
|
||||
{
|
||||
module: '@babel/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.ts' });
|
||||
},
|
||||
},
|
||||
],
|
||||
'.tsx': [
|
||||
'ts-node/register',
|
||||
'typescript-node/register',
|
||||
'sucrase/register',
|
||||
{
|
||||
module: '@babel/register',
|
||||
register: function(hook) {
|
||||
hook({ extensions: '.tsx' });
|
||||
},
|
||||
},
|
||||
],
|
||||
'.wisp': 'wisp/engine/node',
|
||||
'.xml': 'require-xml',
|
||||
'.yaml': 'require-yaml',
|
||||
'.yml': 'require-yaml',
|
||||
};
|
||||
|
||||
var jsVariantExtensions = [
|
||||
'.js',
|
||||
'.babel.js',
|
||||
'.babel.ts',
|
||||
'.buble.js',
|
||||
'.cirru',
|
||||
'.cjsx',
|
||||
'.co',
|
||||
'.coffee',
|
||||
'.coffee.md',
|
||||
'.eg',
|
||||
'.esm.js',
|
||||
'.iced',
|
||||
'.iced.md',
|
||||
'.jsx',
|
||||
'.litcoffee',
|
||||
'.liticed',
|
||||
'.ls',
|
||||
'.mjs',
|
||||
'.ts',
|
||||
'.tsx',
|
||||
'.wisp',
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
extensions: extensions,
|
||||
jsVariants: jsVariantExtensions.reduce(function(result, ext) {
|
||||
result[ext] = extensions[ext];
|
||||
return result;
|
||||
}, {}),
|
||||
};
|
||||
@@ -0,0 +1,90 @@
|
||||
# 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 encompassed in a special Socks UDP frame format. SocksClient.createUDPFrame() and SocksClient.parseUDPFrame() create and parse these special UDP packets.
|
||||
|
||||
```typescript
|
||||
const dgram = require('dgram');
|
||||
const SocksClient = require('socks').SocksClient;
|
||||
|
||||
// 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 = {
|
||||
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
|
||||
});
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('sum', require('../sum'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Array.prototype.fill : require("./shim");
|
||||
@@ -0,0 +1,5 @@
|
||||
import { MessageFormatElement, DateTimeSkeleton } from './types';
|
||||
export declare function printAST(ast: MessageFormatElement[]): string;
|
||||
export declare function doPrintAST(ast: MessageFormatElement[], isInPlural: boolean): string;
|
||||
export declare function printDateTimeSkeleton(style: DateTimeSkeleton): string;
|
||||
//# sourceMappingURL=printer.d.ts.map
|
||||
@@ -0,0 +1,9 @@
|
||||
export type RunnerOrganization = {
|
||||
address?: any;
|
||||
key?: string;
|
||||
distance: number;
|
||||
distanceDonationAmount: number;
|
||||
id: number;
|
||||
name: string;
|
||||
contact?: any;
|
||||
};
|
||||
@@ -0,0 +1,102 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/testNew/testCSVConverter2.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/testNew</a> testCSVConverter2.ts
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">98% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>98/100</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>15/15</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">98% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>98/100</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 high'></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/testNew/testCSVConverter2.ts(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/testNew/testCSVConverter2.ts')
|
||||
Error: Unable to lookup source: /Users/kxiang/work/projects/csv2json/testNew/testCSVConverter2.ts(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/testNew/testCSVConverter2.ts')
|
||||
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>
|
||||
@@ -0,0 +1,897 @@
|
||||
/**
|
||||
* The `url` module provides utilities for URL resolution and parsing. It can be
|
||||
* accessed using:
|
||||
*
|
||||
* ```js
|
||||
* import url from 'url';
|
||||
* ```
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
|
||||
*/
|
||||
declare module 'url' {
|
||||
import { Blob as NodeBlob } from 'node:buffer';
|
||||
import { ClientRequestArgs } from 'node:http';
|
||||
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
|
||||
// Input to `url.format`
|
||||
interface UrlObject {
|
||||
auth?: string | null | undefined;
|
||||
hash?: string | null | undefined;
|
||||
host?: string | null | undefined;
|
||||
hostname?: string | null | undefined;
|
||||
href?: string | null | undefined;
|
||||
pathname?: string | null | undefined;
|
||||
protocol?: string | null | undefined;
|
||||
search?: string | null | undefined;
|
||||
slashes?: boolean | null | undefined;
|
||||
port?: string | number | null | undefined;
|
||||
query?: string | null | ParsedUrlQueryInput | undefined;
|
||||
}
|
||||
// Output of `url.parse`
|
||||
interface Url {
|
||||
auth: string | null;
|
||||
hash: string | null;
|
||||
host: string | null;
|
||||
hostname: string | null;
|
||||
href: string;
|
||||
path: string | null;
|
||||
pathname: string | null;
|
||||
protocol: string | null;
|
||||
search: string | null;
|
||||
slashes: boolean | null;
|
||||
port: string | null;
|
||||
query: string | null | ParsedUrlQuery;
|
||||
}
|
||||
interface UrlWithParsedQuery extends Url {
|
||||
query: ParsedUrlQuery;
|
||||
}
|
||||
interface UrlWithStringQuery extends Url {
|
||||
query: string | null;
|
||||
}
|
||||
/**
|
||||
* The `url.parse()` method takes a URL string, parses it, and returns a URL
|
||||
* object.
|
||||
*
|
||||
* A `TypeError` is thrown if `urlString` is not a string.
|
||||
*
|
||||
* A `URIError` is thrown if the `auth` property is present but cannot be decoded.
|
||||
*
|
||||
* Use of the legacy `url.parse()` method is discouraged. Users should
|
||||
* use the WHATWG `URL` API. Because the `url.parse()` method uses a
|
||||
* lenient, non-standard algorithm for parsing URL strings, security
|
||||
* issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and
|
||||
* incorrect handling of usernames and passwords have been identified.
|
||||
*
|
||||
* Deprecation of this API has been shelved for now primarily due to the the
|
||||
* inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373).
|
||||
* [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this.
|
||||
*
|
||||
* @since v0.1.25
|
||||
* @param urlString The URL string to parse.
|
||||
* @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
|
||||
* on the returned URL object will be an unparsed, undecoded string.
|
||||
* @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
|
||||
* result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
|
||||
*/
|
||||
function parse(urlString: string): UrlWithStringQuery;
|
||||
function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
|
||||
function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|
||||
function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
|
||||
/**
|
||||
* The `url.format()` method returns a formatted URL string derived from`urlObject`.
|
||||
*
|
||||
* ```js
|
||||
* const url = require('url');
|
||||
* url.format({
|
||||
* protocol: 'https',
|
||||
* hostname: 'example.com',
|
||||
* pathname: '/some/path',
|
||||
* query: {
|
||||
* page: 1,
|
||||
* format: 'json'
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // => 'https://example.com/some/path?page=1&format=json'
|
||||
* ```
|
||||
*
|
||||
* If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
|
||||
*
|
||||
* The formatting process operates as follows:
|
||||
*
|
||||
* * A new empty string `result` is created.
|
||||
* * If `urlObject.protocol` is a string, it is appended as-is to `result`.
|
||||
* * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
|
||||
* * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
|
||||
* colon (`:`) character, the literal string `:` will be appended to `result`.
|
||||
* * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
|
||||
* * `urlObject.slashes` property is true;
|
||||
* * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
|
||||
* * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
|
||||
* and appended to `result`followed by the literal string `@`.
|
||||
* * If the `urlObject.host` property is `undefined` then:
|
||||
* * If the `urlObject.hostname` is a string, it is appended to `result`.
|
||||
* * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
|
||||
* an `Error` is thrown.
|
||||
* * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
|
||||
* * The literal string `:` is appended to `result`, and
|
||||
* * The value of `urlObject.port` is coerced to a string and appended to`result`.
|
||||
* * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
|
||||
* * If the `urlObject.pathname` property is a string that is not an empty string:
|
||||
* * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
|
||||
* (`/`), then the literal string `'/'` is appended to `result`.
|
||||
* * The value of `urlObject.pathname` is appended to `result`.
|
||||
* * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
|
||||
* * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
|
||||
* `querystring` module's `stringify()`method passing the value of `urlObject.query`.
|
||||
* * Otherwise, if `urlObject.search` is a string:
|
||||
* * If the value of `urlObject.search`_does not start_ with the ASCII question
|
||||
* mark (`?`) character, the literal string `?` is appended to `result`.
|
||||
* * The value of `urlObject.search` is appended to `result`.
|
||||
* * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
|
||||
* * If the `urlObject.hash` property is a string:
|
||||
* * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
|
||||
* character, the literal string `#` is appended to `result`.
|
||||
* * The value of `urlObject.hash` is appended to `result`.
|
||||
* * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
|
||||
* string, an `Error` is thrown.
|
||||
* * `result` is returned.
|
||||
* @since v0.1.25
|
||||
* @deprecated Legacy: Use the WHATWG URL API instead.
|
||||
* @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
|
||||
*/
|
||||
function format(urlObject: URL, options?: URLFormatOptions): string;
|
||||
/**
|
||||
* The `url.format()` method returns a formatted URL string derived from`urlObject`.
|
||||
*
|
||||
* ```js
|
||||
* const url = require('url');
|
||||
* url.format({
|
||||
* protocol: 'https',
|
||||
* hostname: 'example.com',
|
||||
* pathname: '/some/path',
|
||||
* query: {
|
||||
* page: 1,
|
||||
* format: 'json'
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* // => 'https://example.com/some/path?page=1&format=json'
|
||||
* ```
|
||||
*
|
||||
* If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
|
||||
*
|
||||
* The formatting process operates as follows:
|
||||
*
|
||||
* * A new empty string `result` is created.
|
||||
* * If `urlObject.protocol` is a string, it is appended as-is to `result`.
|
||||
* * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
|
||||
* * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
|
||||
* colon (`:`) character, the literal string `:` will be appended to `result`.
|
||||
* * If either of the following conditions is true, then the literal string `//`will be appended to `result`:
|
||||
* * `urlObject.slashes` property is true;
|
||||
* * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or`file`;
|
||||
* * If the value of the `urlObject.auth` property is truthy, and either`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of`urlObject.auth` will be coerced into a string
|
||||
* and appended to `result`followed by the literal string `@`.
|
||||
* * If the `urlObject.host` property is `undefined` then:
|
||||
* * If the `urlObject.hostname` is a string, it is appended to `result`.
|
||||
* * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
|
||||
* an `Error` is thrown.
|
||||
* * If the `urlObject.port` property value is truthy, and `urlObject.hostname`is not `undefined`:
|
||||
* * The literal string `:` is appended to `result`, and
|
||||
* * The value of `urlObject.port` is coerced to a string and appended to`result`.
|
||||
* * Otherwise, if the `urlObject.host` property value is truthy, the value of`urlObject.host` is coerced to a string and appended to `result`.
|
||||
* * If the `urlObject.pathname` property is a string that is not an empty string:
|
||||
* * If the `urlObject.pathname`_does not start_ with an ASCII forward slash
|
||||
* (`/`), then the literal string `'/'` is appended to `result`.
|
||||
* * The value of `urlObject.pathname` is appended to `result`.
|
||||
* * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
|
||||
* * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result`followed by the output of calling the
|
||||
* `querystring` module's `stringify()`method passing the value of `urlObject.query`.
|
||||
* * Otherwise, if `urlObject.search` is a string:
|
||||
* * If the value of `urlObject.search`_does not start_ with the ASCII question
|
||||
* mark (`?`) character, the literal string `?` is appended to `result`.
|
||||
* * The value of `urlObject.search` is appended to `result`.
|
||||
* * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
|
||||
* * If the `urlObject.hash` property is a string:
|
||||
* * If the value of `urlObject.hash`_does not start_ with the ASCII hash (`#`)
|
||||
* character, the literal string `#` is appended to `result`.
|
||||
* * The value of `urlObject.hash` is appended to `result`.
|
||||
* * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
|
||||
* string, an `Error` is thrown.
|
||||
* * `result` is returned.
|
||||
* @since v0.1.25
|
||||
* @deprecated Legacy: Use the WHATWG URL API instead.
|
||||
* @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
|
||||
*/
|
||||
function format(urlObject: UrlObject | string): string;
|
||||
/**
|
||||
* The `url.resolve()` method resolves a target URL relative to a base URL in a
|
||||
* manner similar to that of a web browser resolving an anchor tag.
|
||||
*
|
||||
* ```js
|
||||
* const url = require('url');
|
||||
* url.resolve('/one/two/three', 'four'); // '/one/two/four'
|
||||
* url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
|
||||
* url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
||||
* ```
|
||||
*
|
||||
* To achieve the same result using the WHATWG URL API:
|
||||
*
|
||||
* ```js
|
||||
* function resolve(from, to) {
|
||||
* const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
|
||||
* if (resolvedUrl.protocol === 'resolve:') {
|
||||
* // `from` is a relative URL.
|
||||
* const { pathname, search, hash } = resolvedUrl;
|
||||
* return pathname + search + hash;
|
||||
* }
|
||||
* return resolvedUrl.toString();
|
||||
* }
|
||||
*
|
||||
* resolve('/one/two/three', 'four'); // '/one/two/four'
|
||||
* resolve('http://example.com/', '/one'); // 'http://example.com/one'
|
||||
* resolve('http://example.com/one', '/two'); // 'http://example.com/two'
|
||||
* ```
|
||||
* @since v0.1.25
|
||||
* @deprecated Legacy: Use the WHATWG URL API instead.
|
||||
* @param from The base URL to use if `to` is a relative URL.
|
||||
* @param to The target URL to resolve.
|
||||
*/
|
||||
function resolve(from: string, to: string): string;
|
||||
/**
|
||||
* Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
|
||||
* invalid domain, the empty string is returned.
|
||||
*
|
||||
* It performs the inverse operation to {@link domainToUnicode}.
|
||||
*
|
||||
* This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
|
||||
*
|
||||
* ```js
|
||||
* import url from 'url';
|
||||
*
|
||||
* console.log(url.domainToASCII('español.com'));
|
||||
* // Prints xn--espaol-zwa.com
|
||||
* console.log(url.domainToASCII('中文.com'));
|
||||
* // Prints xn--fiq228c.com
|
||||
* console.log(url.domainToASCII('xn--iñvalid.com'));
|
||||
* // Prints an empty string
|
||||
* ```
|
||||
* @since v7.4.0, v6.13.0
|
||||
*/
|
||||
function domainToASCII(domain: string): string;
|
||||
/**
|
||||
* Returns the Unicode serialization of the `domain`. If `domain` is an invalid
|
||||
* domain, the empty string is returned.
|
||||
*
|
||||
* It performs the inverse operation to {@link domainToASCII}.
|
||||
*
|
||||
* This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
|
||||
*
|
||||
* ```js
|
||||
* import url from 'url';
|
||||
*
|
||||
* console.log(url.domainToUnicode('xn--espaol-zwa.com'));
|
||||
* // Prints español.com
|
||||
* console.log(url.domainToUnicode('xn--fiq228c.com'));
|
||||
* // Prints 中文.com
|
||||
* console.log(url.domainToUnicode('xn--iñvalid.com'));
|
||||
* // Prints an empty string
|
||||
* ```
|
||||
* @since v7.4.0, v6.13.0
|
||||
*/
|
||||
function domainToUnicode(domain: string): string;
|
||||
/**
|
||||
* This function ensures the correct decodings of percent-encoded characters as
|
||||
* well as ensuring a cross-platform valid absolute path string.
|
||||
*
|
||||
* ```js
|
||||
* import { fileURLToPath } from 'url';
|
||||
*
|
||||
* const __filename = fileURLToPath(import.meta.url);
|
||||
*
|
||||
* new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
|
||||
* fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
|
||||
*
|
||||
* new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
|
||||
* fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
|
||||
*
|
||||
* new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
|
||||
* fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
|
||||
*
|
||||
* new URL('file:///hello world').pathname; // Incorrect: /hello%20world
|
||||
* fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
|
||||
* ```
|
||||
* @since v10.12.0
|
||||
* @param url The file URL string or URL object to convert to a path.
|
||||
* @return The fully-resolved platform-specific Node.js file path.
|
||||
*/
|
||||
function fileURLToPath(url: string | URL): string;
|
||||
/**
|
||||
* This function ensures that `path` is resolved absolutely, and that the URL
|
||||
* control characters are correctly encoded when converting into a File URL.
|
||||
*
|
||||
* ```js
|
||||
* import { pathToFileURL } from 'url';
|
||||
*
|
||||
* new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
|
||||
* pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
|
||||
*
|
||||
* new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
|
||||
* pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
|
||||
* ```
|
||||
* @since v10.12.0
|
||||
* @param path The path to convert to a File URL.
|
||||
* @return The file URL object.
|
||||
*/
|
||||
function pathToFileURL(path: string): URL;
|
||||
/**
|
||||
* This utility function converts a URL object into an ordinary options object as
|
||||
* expected by the `http.request()` and `https.request()` APIs.
|
||||
*
|
||||
* ```js
|
||||
* import { urlToHttpOptions } from 'url';
|
||||
* const myURL = new URL('https://a:b@測試?abc#foo');
|
||||
*
|
||||
* console.log(urlToHttpOptions(myURL));
|
||||
* /*
|
||||
* {
|
||||
* protocol: 'https:',
|
||||
* hostname: 'xn--g6w251d',
|
||||
* hash: '#foo',
|
||||
* search: '?abc',
|
||||
* pathname: '/',
|
||||
* path: '/?abc',
|
||||
* href: 'https://a:b@xn--g6w251d/?abc#foo',
|
||||
* auth: 'a:b'
|
||||
* }
|
||||
*
|
||||
* ```
|
||||
* @since v15.7.0, v14.18.0
|
||||
* @param url The `WHATWG URL` object to convert to an options object.
|
||||
* @return Options object
|
||||
*/
|
||||
function urlToHttpOptions(url: URL): ClientRequestArgs;
|
||||
interface URLFormatOptions {
|
||||
auth?: boolean | undefined;
|
||||
fragment?: boolean | undefined;
|
||||
search?: boolean | undefined;
|
||||
unicode?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* Browser-compatible `URL` class, implemented by following the WHATWG URL
|
||||
* Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
|
||||
* The `URL` class is also available on the global object.
|
||||
*
|
||||
* In accordance with browser conventions, all properties of `URL` objects
|
||||
* are implemented as getters and setters on the class prototype, rather than as
|
||||
* data properties on the object itself. Thus, unlike `legacy urlObject` s,
|
||||
* using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
|
||||
* return `true`.
|
||||
* @since v7.0.0, v6.13.0
|
||||
*/
|
||||
class URL {
|
||||
/**
|
||||
* Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
|
||||
*
|
||||
* ```js
|
||||
* const {
|
||||
* Blob,
|
||||
* resolveObjectURL,
|
||||
* } = require('buffer');
|
||||
*
|
||||
* const blob = new Blob(['hello']);
|
||||
* const id = URL.createObjectURL(blob);
|
||||
*
|
||||
* // later...
|
||||
*
|
||||
* const otherBlob = resolveObjectURL(id);
|
||||
* console.log(otherBlob.size);
|
||||
* ```
|
||||
*
|
||||
* The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
|
||||
*
|
||||
* `Blob` objects are registered within the current thread. If using Worker
|
||||
* Threads, `Blob` objects registered within one Worker will not be available
|
||||
* to other workers or the main thread.
|
||||
* @since v16.7.0
|
||||
* @experimental
|
||||
*/
|
||||
static createObjectURL(blob: NodeBlob): string;
|
||||
/**
|
||||
* Removes the stored `Blob` identified by the given ID. Attempting to revoke a
|
||||
* ID that isn’t registered will silently fail.
|
||||
* @since v16.7.0
|
||||
* @experimental
|
||||
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
||||
*/
|
||||
static revokeObjectURL(objectUrl: string): void;
|
||||
constructor(input: string, base?: string | URL);
|
||||
/**
|
||||
* Gets and sets the fragment portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/foo#bar');
|
||||
* console.log(myURL.hash);
|
||||
* // Prints #bar
|
||||
*
|
||||
* myURL.hash = 'baz';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/foo#baz
|
||||
* ```
|
||||
*
|
||||
* Invalid URL characters included in the value assigned to the `hash` property
|
||||
* are `percent-encoded`. The selection of which characters to
|
||||
* percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
hash: string;
|
||||
/**
|
||||
* Gets and sets the host portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org:81/foo');
|
||||
* console.log(myURL.host);
|
||||
* // Prints example.org:81
|
||||
*
|
||||
* myURL.host = 'example.com:82';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.com:82/foo
|
||||
* ```
|
||||
*
|
||||
* Invalid host values assigned to the `host` property are ignored.
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
|
||||
* port.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org:81/foo');
|
||||
* console.log(myURL.hostname);
|
||||
* // Prints example.org
|
||||
*
|
||||
* // Setting the hostname does not change the port
|
||||
* myURL.hostname = 'example.com:82';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.com:81/foo
|
||||
*
|
||||
* // Use myURL.host to change the hostname and port
|
||||
* myURL.host = 'example.org:82';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org:82/foo
|
||||
* ```
|
||||
*
|
||||
* Invalid host name values assigned to the `hostname` property are ignored.
|
||||
*/
|
||||
hostname: string;
|
||||
/**
|
||||
* Gets and sets the serialized URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/foo');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/foo
|
||||
*
|
||||
* myURL.href = 'https://example.com/bar';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.com/bar
|
||||
* ```
|
||||
*
|
||||
* Getting the value of the `href` property is equivalent to calling {@link toString}.
|
||||
*
|
||||
* Setting the value of this property to a new value is equivalent to creating a
|
||||
* new `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.
|
||||
*
|
||||
* If the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.
|
||||
*/
|
||||
href: string;
|
||||
/**
|
||||
* Gets the read-only serialization of the URL's origin.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/foo/bar?baz');
|
||||
* console.log(myURL.origin);
|
||||
* // Prints https://example.org
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* const idnURL = new URL('https://測試');
|
||||
* console.log(idnURL.origin);
|
||||
* // Prints https://xn--g6w251d
|
||||
*
|
||||
* console.log(idnURL.hostname);
|
||||
* // Prints xn--g6w251d
|
||||
* ```
|
||||
*/
|
||||
readonly origin: string;
|
||||
/**
|
||||
* Gets and sets the password portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://abc:xyz@example.com');
|
||||
* console.log(myURL.password);
|
||||
* // Prints xyz
|
||||
*
|
||||
* myURL.password = '123';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://abc:123@example.com
|
||||
* ```
|
||||
*
|
||||
* Invalid URL characters included in the value assigned to the `password` property
|
||||
* are `percent-encoded`. The selection of which characters to
|
||||
* percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* Gets and sets the path portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/abc/xyz?123');
|
||||
* console.log(myURL.pathname);
|
||||
* // Prints /abc/xyz
|
||||
*
|
||||
* myURL.pathname = '/abcdef';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/abcdef?123
|
||||
* ```
|
||||
*
|
||||
* Invalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters
|
||||
* to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
pathname: string;
|
||||
/**
|
||||
* Gets and sets the port portion of the URL.
|
||||
*
|
||||
* The port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will
|
||||
* result in the `port` value becoming
|
||||
* the empty string (`''`).
|
||||
*
|
||||
* The port value can be an empty string in which case the port depends on
|
||||
* the protocol/scheme:
|
||||
*
|
||||
* <omitted>
|
||||
*
|
||||
* Upon assigning a value to the port, the value will first be converted to a
|
||||
* string using `.toString()`.
|
||||
*
|
||||
* If that string is invalid but it begins with a number, the leading number is
|
||||
* assigned to `port`.
|
||||
* If the number lies outside the range denoted above, it is ignored.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org:8888');
|
||||
* console.log(myURL.port);
|
||||
* // Prints 8888
|
||||
*
|
||||
* // Default ports are automatically transformed to the empty string
|
||||
* // (HTTPS protocol's default port is 443)
|
||||
* myURL.port = '443';
|
||||
* console.log(myURL.port);
|
||||
* // Prints the empty string
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/
|
||||
*
|
||||
* myURL.port = 1234;
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org:1234/
|
||||
*
|
||||
* // Completely invalid port strings are ignored
|
||||
* myURL.port = 'abcd';
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
*
|
||||
* // Leading numbers are treated as a port number
|
||||
* myURL.port = '5678abcd';
|
||||
* console.log(myURL.port);
|
||||
* // Prints 5678
|
||||
*
|
||||
* // Non-integers are truncated
|
||||
* myURL.port = 1234.5678;
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
*
|
||||
* // Out-of-range numbers which are not represented in scientific notation
|
||||
* // will be ignored.
|
||||
* myURL.port = 1e10; // 10000000000, will be range-checked as described below
|
||||
* console.log(myURL.port);
|
||||
* // Prints 1234
|
||||
* ```
|
||||
*
|
||||
* Numbers which contain a decimal point,
|
||||
* such as floating-point numbers or numbers in scientific notation,
|
||||
* are not an exception to this rule.
|
||||
* Leading numbers up to the decimal point will be set as the URL's port,
|
||||
* assuming they are valid:
|
||||
*
|
||||
* ```js
|
||||
* myURL.port = 4.567e21;
|
||||
* console.log(myURL.port);
|
||||
* // Prints 4 (because it is the leading number in the string '4.567e21')
|
||||
* ```
|
||||
*/
|
||||
port: string;
|
||||
/**
|
||||
* Gets and sets the protocol portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org');
|
||||
* console.log(myURL.protocol);
|
||||
* // Prints https:
|
||||
*
|
||||
* myURL.protocol = 'ftp';
|
||||
* console.log(myURL.href);
|
||||
* // Prints ftp://example.org/
|
||||
* ```
|
||||
*
|
||||
* Invalid URL protocol values assigned to the `protocol` property are ignored.
|
||||
*/
|
||||
protocol: string;
|
||||
/**
|
||||
* Gets and sets the serialized query portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/abc?123');
|
||||
* console.log(myURL.search);
|
||||
* // Prints ?123
|
||||
*
|
||||
* myURL.search = 'abc=xyz';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/abc?abc=xyz
|
||||
* ```
|
||||
*
|
||||
* Any invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which
|
||||
* characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
search: string;
|
||||
/**
|
||||
* Gets the `URLSearchParams` object representing the query parameters of the
|
||||
* URL. This property is read-only but the `URLSearchParams` object it provides
|
||||
* can be used to mutate the URL instance; to replace the entirety of query
|
||||
* parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
|
||||
*
|
||||
* Use care when using `.searchParams` to modify the `URL` because,
|
||||
* per the WHATWG specification, the `URLSearchParams` object uses
|
||||
* different rules to determine which characters to percent-encode. For
|
||||
* instance, the `URL` object will not percent encode the ASCII tilde (`~`)
|
||||
* character, while `URLSearchParams` will always encode it:
|
||||
*
|
||||
* ```js
|
||||
* const myUrl = new URL('https://example.org/abc?foo=~bar');
|
||||
*
|
||||
* console.log(myUrl.search); // prints ?foo=~bar
|
||||
*
|
||||
* // Modify the URL via searchParams...
|
||||
* myUrl.searchParams.sort();
|
||||
*
|
||||
* console.log(myUrl.search); // prints ?foo=%7Ebar
|
||||
* ```
|
||||
*/
|
||||
readonly searchParams: URLSearchParams;
|
||||
/**
|
||||
* Gets and sets the username portion of the URL.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://abc:xyz@example.com');
|
||||
* console.log(myURL.username);
|
||||
* // Prints abc
|
||||
*
|
||||
* myURL.username = '123';
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://123:xyz@example.com/
|
||||
* ```
|
||||
*
|
||||
* Any invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which
|
||||
* characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
* The `toString()` method on the `URL` object returns the serialized URL. The
|
||||
* value returned is equivalent to that of {@link href} and {@link toJSON}.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* The `toJSON()` method on the `URL` object returns the serialized URL. The
|
||||
* value returned is equivalent to that of {@link href} and {@link toString}.
|
||||
*
|
||||
* This method is automatically called when an `URL` object is serialized
|
||||
* with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
|
||||
*
|
||||
* ```js
|
||||
* const myURLs = [
|
||||
* new URL('https://www.example.com'),
|
||||
* new URL('https://test.example.org'),
|
||||
* ];
|
||||
* console.log(JSON.stringify(myURLs));
|
||||
* // Prints ["https://www.example.com/","https://test.example.org/"]
|
||||
* ```
|
||||
*/
|
||||
toJSON(): string;
|
||||
}
|
||||
/**
|
||||
* The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the
|
||||
* four following constructors.
|
||||
* The `URLSearchParams` class is also available on the global object.
|
||||
*
|
||||
* The WHATWG `URLSearchParams` interface and the `querystring` module have
|
||||
* similar purpose, but the purpose of the `querystring` module is more
|
||||
* general, as it allows the customization of delimiter characters (`&` and `=`).
|
||||
* On the other hand, this API is designed purely for URL query strings.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/?abc=123');
|
||||
* console.log(myURL.searchParams.get('abc'));
|
||||
* // Prints 123
|
||||
*
|
||||
* myURL.searchParams.append('abc', 'xyz');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?abc=123&abc=xyz
|
||||
*
|
||||
* myURL.searchParams.delete('abc');
|
||||
* myURL.searchParams.set('a', 'b');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b
|
||||
*
|
||||
* const newSearchParams = new URLSearchParams(myURL.searchParams);
|
||||
* // The above is equivalent to
|
||||
* // const newSearchParams = new URLSearchParams(myURL.search);
|
||||
*
|
||||
* newSearchParams.append('a', 'c');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b
|
||||
* console.log(newSearchParams.toString());
|
||||
* // Prints a=b&a=c
|
||||
*
|
||||
* // newSearchParams.toString() is implicitly called
|
||||
* myURL.search = newSearchParams;
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b&a=c
|
||||
* newSearchParams.delete('a');
|
||||
* console.log(myURL.href);
|
||||
* // Prints https://example.org/?a=b&a=c
|
||||
* ```
|
||||
* @since v7.5.0, v6.13.0
|
||||
*/
|
||||
class URLSearchParams implements Iterable<[string, string]> {
|
||||
constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
|
||||
/**
|
||||
* Append a new name-value pair to the query string.
|
||||
*/
|
||||
append(name: string, value: string): void;
|
||||
/**
|
||||
* Remove all name-value pairs whose name is `name`.
|
||||
*/
|
||||
delete(name: string): void;
|
||||
/**
|
||||
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
||||
* Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
|
||||
*
|
||||
* Alias for `urlSearchParams[@@iterator]()`.
|
||||
*/
|
||||
entries(): IterableIterator<[string, string]>;
|
||||
/**
|
||||
* Iterates over each name-value pair in the query and invokes the given function.
|
||||
*
|
||||
* ```js
|
||||
* const myURL = new URL('https://example.org/?a=b&c=d');
|
||||
* myURL.searchParams.forEach((value, name, searchParams) => {
|
||||
* console.log(name, value, myURL.searchParams === searchParams);
|
||||
* });
|
||||
* // Prints:
|
||||
* // a b true
|
||||
* // c d true
|
||||
* ```
|
||||
* @param fn Invoked for each name-value pair in the query
|
||||
* @param thisArg To be used as `this` value for when `fn` is called
|
||||
*/
|
||||
forEach<TThis = this>(callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, thisArg?: TThis): void;
|
||||
/**
|
||||
* Returns the value of the first name-value pair whose name is `name`. If there
|
||||
* are no such pairs, `null` is returned.
|
||||
* @return or `null` if there is no name-value pair with the given `name`.
|
||||
*/
|
||||
get(name: string): string | null;
|
||||
/**
|
||||
* Returns the values of all name-value pairs whose name is `name`. If there are
|
||||
* no such pairs, an empty array is returned.
|
||||
*/
|
||||
getAll(name: string): string[];
|
||||
/**
|
||||
* Returns `true` if there is at least one name-value pair whose name is `name`.
|
||||
*/
|
||||
has(name: string): boolean;
|
||||
/**
|
||||
* Returns an ES6 `Iterator` over the names of each name-value pair.
|
||||
*
|
||||
* ```js
|
||||
* const params = new URLSearchParams('foo=bar&foo=baz');
|
||||
* for (const name of params.keys()) {
|
||||
* console.log(name);
|
||||
* }
|
||||
* // Prints:
|
||||
* // foo
|
||||
* // foo
|
||||
* ```
|
||||
*/
|
||||
keys(): IterableIterator<string>;
|
||||
/**
|
||||
* Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
|
||||
* set the first such pair's value to `value` and remove all others. If not,
|
||||
* append the name-value pair to the query string.
|
||||
*
|
||||
* ```js
|
||||
* const params = new URLSearchParams();
|
||||
* params.append('foo', 'bar');
|
||||
* params.append('foo', 'baz');
|
||||
* params.append('abc', 'def');
|
||||
* console.log(params.toString());
|
||||
* // Prints foo=bar&foo=baz&abc=def
|
||||
*
|
||||
* params.set('foo', 'def');
|
||||
* params.set('xyz', 'opq');
|
||||
* console.log(params.toString());
|
||||
* // Prints foo=def&abc=def&xyz=opq
|
||||
* ```
|
||||
*/
|
||||
set(name: string, value: string): void;
|
||||
/**
|
||||
* Sort all existing name-value pairs in-place by their names. Sorting is done
|
||||
* with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
|
||||
* with the same name is preserved.
|
||||
*
|
||||
* This method can be used, in particular, to increase cache hits.
|
||||
*
|
||||
* ```js
|
||||
* const params = new URLSearchParams('query[]=abc&type=search&query[]=123');
|
||||
* params.sort();
|
||||
* console.log(params.toString());
|
||||
* // Prints query%5B%5D=abc&query%5B%5D=123&type=search
|
||||
* ```
|
||||
* @since v7.7.0, v6.13.0
|
||||
*/
|
||||
sort(): void;
|
||||
/**
|
||||
* Returns the search parameters serialized as a string, with characters
|
||||
* percent-encoded where necessary.
|
||||
*/
|
||||
toString(): string;
|
||||
/**
|
||||
* Returns an ES6 `Iterator` over the values of each name-value pair.
|
||||
*/
|
||||
values(): IterableIterator<string>;
|
||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||
}
|
||||
import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
|
||||
global {
|
||||
interface URLSearchParams extends _URLSearchParams {}
|
||||
interface URL extends _URL {}
|
||||
interface Global {
|
||||
URL: typeof _URL;
|
||||
URLSearchParams: typeof _URLSearchParams;
|
||||
}
|
||||
/**
|
||||
* `URL` class is a global reference for `require('url').URL`
|
||||
* https://nodejs.org/api/url.html#the-whatwg-url-api
|
||||
* @since v10.0.0
|
||||
*/
|
||||
var URL: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
URL: infer T;
|
||||
}
|
||||
? T
|
||||
: typeof _URL;
|
||||
/**
|
||||
* `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
|
||||
* https://nodejs.org/api/url.html#class-urlsearchparams
|
||||
* @since v10.0.0
|
||||
*/
|
||||
var URLSearchParams: typeof globalThis extends {
|
||||
onmessage: any;
|
||||
URLSearchParams: infer T;
|
||||
}
|
||||
? T
|
||||
: typeof _URLSearchParams;
|
||||
}
|
||||
}
|
||||
declare module 'node:url' {
|
||||
export * from 'url';
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name" : "isarray",
|
||||
"description" : "Array#isArray for older browsers",
|
||||
"version" : "0.0.1",
|
||||
"repository" : "juliangruber/isarray",
|
||||
"homepage": "https://github.com/juliangruber/isarray",
|
||||
"main" : "index.js",
|
||||
"scripts" : [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies" : {},
|
||||
"keywords": ["browser","isarray","array"],
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import Settings from '../settings';
|
||||
import { Pattern, PatternsGroup } from '../types';
|
||||
export declare type Task = {
|
||||
base: string;
|
||||
dynamic: boolean;
|
||||
patterns: Pattern[];
|
||||
positive: Pattern[];
|
||||
negative: Pattern[];
|
||||
};
|
||||
export declare function generate(patterns: Pattern[], settings: Settings): Task[];
|
||||
/**
|
||||
* Returns tasks grouped by basic pattern directories.
|
||||
*
|
||||
* Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
|
||||
* This is necessary because directory traversal starts at the base directory and goes deeper.
|
||||
*/
|
||||
export declare function convertPatternsToTasks(positive: Pattern[], negative: Pattern[], dynamic: boolean): Task[];
|
||||
export declare function getPositivePatterns(patterns: Pattern[]): Pattern[];
|
||||
export declare function getNegativePatternsAsPositive(patterns: Pattern[], ignore: Pattern[]): Pattern[];
|
||||
export declare function groupPatternsByBaseDirectory(patterns: Pattern[]): PatternsGroup;
|
||||
export declare function convertPatternGroupsToTasks(positive: PatternsGroup, negative: Pattern[], dynamic: boolean): Task[];
|
||||
export declare function convertPatternGroupToTask(base: string, positive: Pattern[], negative: Pattern[], dynamic: boolean): Task;
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('defaultTo', require('../defaultTo'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"F A B CC","8":"J D E"},B:{"2":"C K L G M N O","8":"P Q R S T U V W X Y Z a b c d e i","584":"j k l m n o p q r s t u","1025":"f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","129":"DC tB EC FC"},D:{"1":"0","8":"1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i","584":"j k l m n o p q r s t u","1025":"f H xB yB GC"},E:{"1":"A B C K L G 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","260":"I v J D E F HC zB IC JC KC LC"},F:{"2":"F","8":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB","584":"S T U V W X Y Z a b c d","1025":"e","2052":"B C PC QC RC SC qB AC TC rB"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","8":"zB UC BC"},H:{"8":"oC"},I:{"8":"tB I pC qC rC sC BC tC uC","1025":"f"},J:{"1":"A","8":"D"},K:{"8":"A B C h qB AC rB"},L:{"1025":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"8":"vC"},P:{"8":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"8":"1B"},R:{"8":"9C"},S:{"1":"AD BD"}},B:2,C:"MathML"};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00358,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.04291,"74":0,"75":0,"76":0,"77":0,"78":0.00358,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00358,"103":0,"104":0.01073,"105":0.00358,"106":0.00358,"107":0.00358,"108":0.00715,"109":0.32542,"110":0.21456,"111":0.00358,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00358,"50":0.00358,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0.00358,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0.00358,"77":0,"78":0.00358,"79":0.03218,"80":0,"81":0.00715,"83":0,"84":0.00358,"85":0,"86":0,"87":0.00715,"88":0.00715,"89":0,"90":0.00358,"91":0.01788,"92":0.01073,"93":0.00358,"94":0.00358,"95":0.00358,"96":0.00358,"97":0.00715,"98":0.00715,"99":0.00715,"100":0.00715,"101":0.00358,"102":0.00715,"103":0.03934,"104":0.01788,"105":0.02146,"106":0.02146,"107":0.03576,"108":0.12874,"109":4.69529,"110":3.28634,"111":0.00358,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.01073,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.05364,"94":0.43985,"95":0.18595,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00358,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.01073,"99":0,"100":0.00358,"101":0,"102":0,"103":0.00358,"104":0.00358,"105":0.00358,"106":0.00358,"107":0.01073,"108":0.0143,"109":0.43985,"110":0.58289},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00358,"14":0.01073,"15":0.00358,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.02146,"14.1":0.03218,"15.1":0.00358,"15.2-15.3":0.00715,"15.4":0.01788,"15.5":0.02146,"15.6":0.12158,"16.0":0.01788,"16.1":0.07152,"16.2":0.14304,"16.3":0.13589,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00156,"6.0-6.1":0.01711,"7.0-7.1":0.00311,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.014,"10.0-10.2":0,"10.3":0.00933,"11.0-11.2":0,"11.3-11.4":0.00156,"12.0-12.1":0.00156,"12.2-12.5":0.18514,"13.0-13.1":0.00311,"13.2":0.00156,"13.3":0.00933,"13.4-13.7":0.04201,"14.0-14.4":0.10579,"14.5-14.8":0.23959,"15.0-15.1":0.07001,"15.2-15.3":0.08712,"15.4":0.14158,"15.5":0.23492,"15.6":0.86968,"16.0":1.66002,"16.1":3.46784,"16.2":4.26285,"16.3":3.37916,"16.4":0.02178},P:{"4":0.0912,"20":0.94238,"5.0-5.4":0.01013,"6.2-6.4":0,"7.2-7.4":0.1824,"8.2":0,"9.2":0.01013,"10.1":0,"11.1-11.2":0.0608,"12.0":0.01013,"13.0":0.0304,"14.0":0.05067,"15.0":0.02027,"16.0":0.1216,"17.0":0.07093,"18.0":0.10133,"19.0":1.70236},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.13934},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00715,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.08351},H:{"0":0.24327},L:{"0":67.95531},R:{_:"0"},M:{"0":0.23769},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* Generate secure URL-friendly unique ID.
|
||||
*
|
||||
* By default, the ID will have 21 symbols to have a collision probability
|
||||
* similar to UUID v4.
|
||||
*
|
||||
* ```js
|
||||
* import { nanoid } from 'nanoid'
|
||||
* model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"
|
||||
* ```
|
||||
*
|
||||
* @param size Size of the ID. The default size is 21.
|
||||
* @returns A random string.
|
||||
*/
|
||||
export function nanoid(size?: number): string
|
||||
|
||||
/**
|
||||
* Generate secure unique ID with custom alphabet.
|
||||
*
|
||||
* Alphabet must contain 256 symbols or less. Otherwise, the generator
|
||||
* will not be secure.
|
||||
*
|
||||
* @param alphabet Alphabet used to generate the ID.
|
||||
* @param defaultSize Size of the ID. The default size is 21.
|
||||
* @returns A random string generator.
|
||||
*
|
||||
* ```js
|
||||
* const { customAlphabet } = require('nanoid')
|
||||
* const nanoid = customAlphabet('0123456789абвгдеё', 5)
|
||||
* nanoid() //=> "8ё56а"
|
||||
* ```
|
||||
*/
|
||||
export function customAlphabet(
|
||||
alphabet: string,
|
||||
defaultSize?: number
|
||||
): (size?: number) => string
|
||||
|
||||
/**
|
||||
* Generate unique ID with custom random generator and alphabet.
|
||||
*
|
||||
* Alphabet must contain 256 symbols or less. Otherwise, the generator
|
||||
* will not be secure.
|
||||
*
|
||||
* ```js
|
||||
* import { customRandom } from 'nanoid/format'
|
||||
*
|
||||
* const nanoid = customRandom('abcdef', 5, size => {
|
||||
* const random = []
|
||||
* for (let i = 0; i < size; i++) {
|
||||
* random.push(randomByte())
|
||||
* }
|
||||
* return random
|
||||
* })
|
||||
*
|
||||
* nanoid() //=> "fbaef"
|
||||
* ```
|
||||
*
|
||||
* @param alphabet Alphabet used to generate a random string.
|
||||
* @param size Size of the random string.
|
||||
* @param random A random bytes generator.
|
||||
* @returns A random string generator.
|
||||
*/
|
||||
export function customRandom(
|
||||
alphabet: string,
|
||||
size: number,
|
||||
random: (bytes: number) => Uint8Array
|
||||
): () => string
|
||||
|
||||
/**
|
||||
* URL safe symbols.
|
||||
*
|
||||
* ```js
|
||||
* import { urlAlphabet } from 'nanoid'
|
||||
* const nanoid = customAlphabet(urlAlphabet, 10)
|
||||
* nanoid() //=> "Uakgb_J5m9"
|
||||
* ```
|
||||
*/
|
||||
export const urlAlphabet: string
|
||||
|
||||
/**
|
||||
* Generate an array of random bytes collected from hardware noise.
|
||||
*
|
||||
* ```js
|
||||
* import { customRandom, random } from 'nanoid'
|
||||
* const nanoid = customRandom("abcdef", 5, random)
|
||||
* ```
|
||||
*
|
||||
* @param bytes Size of the array.
|
||||
* @returns An array of random bytes.
|
||||
*/
|
||||
export function random(bytes: number): Uint8Array
|
||||
@@ -0,0 +1,2 @@
|
||||
declare function isError(value: any): boolean;
|
||||
export default isError;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,qCAAoC;AA+CpC,SAAgB,SAAS,CAAI,QAA8B;IACzD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAM,cAAc,GAAG,6CAAwB,CAC7C,UAAU,EACV;YACE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,WAAI,CACL,CAAC;QAEF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,8BAiBC"}
|
||||
@@ -0,0 +1,7 @@
|
||||
import Component from '../Component';
|
||||
import { CompileOptions, CssResult } from '../../interfaces';
|
||||
import { Node } from 'estree';
|
||||
export default function ssr(component: Component, options: CompileOptions): {
|
||||
js: Node[];
|
||||
css: CssResult;
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user