v26.1.38 is released
This commit is contained in:
Родитель
a60f77e72d
Коммит
2d96a883ba
|
@ -2,7 +2,7 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## 26.1.35 (2024-06-11)
|
||||
## 26.1.38 (2024-06-19)
|
||||
|
||||
### Barcode
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ require('aws-sdk/lib/maintenance_mode_message').suppress = true;
|
|||
To use the SDK in the browser, simply add the following script tag to your
|
||||
HTML pages:
|
||||
|
||||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1638.0.min.js"></script>
|
||||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1639.0.min.js"></script>
|
||||
|
||||
You can also build a custom browser SDK with your specified set of AWS services.
|
||||
This can allow you to reduce the SDK's size, specify different API versions of
|
||||
|
|
|
@ -88,3 +88,41 @@ status code rather than reporting the signal properly. This
|
|||
module tries to do the right thing, but on Windows systems, you
|
||||
may see that incorrect result. There is as far as I'm aware no
|
||||
workaround for this.
|
||||
|
||||
## util: `foreground-child/proxy-signals`
|
||||
|
||||
If you just want to proxy the signals to a child process that the
|
||||
main process receives, you can use the `proxy-signals` export
|
||||
from this package.
|
||||
|
||||
```js
|
||||
import { proxySignals } from 'foreground-child/proxy-signals'
|
||||
|
||||
const childProcess = spawn('command', ['some', 'args'])
|
||||
proxySignals(childProcess)
|
||||
```
|
||||
|
||||
Now, any fatal signal received by the current process will be
|
||||
proxied to the child process.
|
||||
|
||||
It doesn't go in the other direction; ie, signals sent to the
|
||||
child process will not affect the parent. For that, listen to the
|
||||
child `exit` or `close` events, and handle them appropriately.
|
||||
|
||||
## util: `foreground-child/watchdog`
|
||||
|
||||
If you are spawning a child process, and want to ensure that it
|
||||
isn't left dangling if the parent process exits, you can use the
|
||||
watchdog utility exported by this module.
|
||||
|
||||
```js
|
||||
import { watchdog } from 'foreground-child/watchdog'
|
||||
|
||||
const childProcess = spawn('command', ['some', 'args'])
|
||||
const watchdogProcess = watchdog(childProcess)
|
||||
|
||||
// watchdogProcess is a reference to the process monitoring the
|
||||
// parent and child. There's usually no reason to do anything
|
||||
// with it, as it's silent and will terminate
|
||||
// automatically when it's no longer needed.
|
||||
```
|
||||
|
|
11
components/buttons/node_modules/@syncfusion/ej2-build-test/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/buttons/node_modules/@syncfusion/ej2-build-test/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
|
@ -8,7 +8,7 @@ This package contains type definitions for validator (https://github.com/validat
|
|||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/validator.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Sat, 11 May 2024 09:35:43 GMT
|
||||
* Last updated: Sun, 16 Jun 2024 11:35:49 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
|
|
282
components/buttons/node_modules/acorn-walk/node_modules/acorn/README.md
сгенерированный
поставляемый
Normal file
282
components/buttons/node_modules/acorn-walk/node_modules/acorn/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,282 @@
|
|||
# Acorn
|
||||
|
||||
A tiny, fast JavaScript parser written in JavaScript.
|
||||
|
||||
## Community
|
||||
|
||||
Acorn is open source software released under an
|
||||
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
|
||||
|
||||
You are welcome to
|
||||
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
|
||||
requests on [github](https://github.com/acornjs/acorn).
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
npm install acorn
|
||||
```
|
||||
|
||||
Alternately, you can download the source and build acorn yourself:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/acornjs/acorn.git
|
||||
cd acorn
|
||||
npm install
|
||||
```
|
||||
|
||||
## Interface
|
||||
|
||||
**parse**`(input, options)` is the main interface to the library. The
|
||||
`input` parameter is a string, `options` must be an object setting
|
||||
some of the options listed below. The return value will be an abstract
|
||||
syntax tree object as specified by the [ESTree
|
||||
spec](https://github.com/estree/estree).
|
||||
|
||||
```javascript
|
||||
let acorn = require("acorn");
|
||||
console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}));
|
||||
```
|
||||
|
||||
When encountering a syntax error, the parser will raise a
|
||||
`SyntaxError` object with a meaningful message. The error object will
|
||||
have a `pos` property that indicates the string offset at which the
|
||||
error occurred, and a `loc` object that contains a `{line, column}`
|
||||
object referring to that same position.
|
||||
|
||||
Options are provided by in a second argument, which should be an
|
||||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
implemented through plugins.
|
||||
|
||||
- **sourceType**: Indicate the mode the code should be parsed in. Can be
|
||||
either `"script"` or `"module"`. This influences global strict mode
|
||||
and parsing of `import` and `export` declarations.
|
||||
|
||||
**NOTE**: If set to `"module"`, then static `import` / `export` syntax
|
||||
will be valid, even if `ecmaVersion` is less than 6.
|
||||
|
||||
- **onInsertedSemicolon**: If given a callback, that callback will be
|
||||
called whenever a missing semicolon is inserted by the parser. The
|
||||
callback will be given the character offset of the point where the
|
||||
semicolon is inserted as argument, and if `locations` is on, also a
|
||||
`{line, column}` object representing this position.
|
||||
|
||||
- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
|
||||
commas.
|
||||
|
||||
- **allowReserved**: If `false`, using a reserved word will generate
|
||||
an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
|
||||
versions. When given the value `"never"`, reserved words and
|
||||
keywords can also not be used as property names (as in Internet
|
||||
Explorer's old parser).
|
||||
|
||||
- **allowReturnOutsideFunction**: By default, a return statement at
|
||||
the top level raises an error. Set this to `true` to accept such
|
||||
code.
|
||||
|
||||
- **allowImportExportEverywhere**: By default, `import` and `export`
|
||||
declarations can only appear at a program's top level. Setting this
|
||||
option to `true` allows them anywhere where a statement is allowed,
|
||||
and also allows `import.meta` expressions to appear in scripts
|
||||
(when `sourceType` is not `"module"`).
|
||||
|
||||
- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
|
||||
only appear inside `async` functions. Defaults to `true` in modules
|
||||
for `ecmaVersion` 2022 and later, `false` for lower versions.
|
||||
Setting this option to `true` allows to have top-level `await`
|
||||
expressions. They are still not allowed in non-`async` functions,
|
||||
though.
|
||||
|
||||
- **allowSuperOutsideMethod**: By default, `super` outside a method
|
||||
raises an error. Set this to `true` to accept such code.
|
||||
|
||||
- **allowHashBang**: When this is enabled, if the code starts with the
|
||||
characters `#!` (as in a shellscript), the first line will be
|
||||
treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
|
||||
|
||||
- **checkPrivateFields**: By default, the parser will verify that
|
||||
private properties are only used in places where they are valid and
|
||||
have been declared. Set this to false to turn such checks off.
|
||||
|
||||
- **locations**: When `true`, each node has a `loc` object attached
|
||||
with `start` and `end` subobjects, each of which contains the
|
||||
one-based line and zero-based column numbers in `{line, column}`
|
||||
form. Default is `false`.
|
||||
|
||||
- **onToken**: If a function is passed for this option, each found
|
||||
token will be passed in same format as tokens returned from
|
||||
`tokenizer().getToken()`.
|
||||
|
||||
If array is passed, each found token is pushed to it.
|
||||
|
||||
Note that you are not allowed to call the parser from the
|
||||
callback—that will corrupt its internal state.
|
||||
|
||||
- **onComment**: If a function is passed for this option, whenever a
|
||||
comment is encountered the function will be called with the
|
||||
following parameters:
|
||||
|
||||
- `block`: `true` if the comment is a block comment, false if it
|
||||
is a line comment.
|
||||
- `text`: The content of the comment.
|
||||
- `start`: Character offset of the start of the comment.
|
||||
- `end`: Character offset of the end of the comment.
|
||||
|
||||
When the `locations` options is on, the `{line, column}` locations
|
||||
of the comment’s start and end are passed as two additional
|
||||
parameters.
|
||||
|
||||
If array is passed for this option, each found comment is pushed
|
||||
to it as object in Esprima format:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"type": "Line" | "Block",
|
||||
"value": "comment text",
|
||||
"start": Number,
|
||||
"end": Number,
|
||||
// If `locations` option is on:
|
||||
"loc": {
|
||||
"start": {line: Number, column: Number}
|
||||
"end": {line: Number, column: Number}
|
||||
},
|
||||
// If `ranges` option is on:
|
||||
"range": [Number, Number]
|
||||
}
|
||||
```
|
||||
|
||||
Note that you are not allowed to call the parser from the
|
||||
callback—that will corrupt its internal state.
|
||||
|
||||
- **ranges**: Nodes have their start and end characters offsets
|
||||
recorded in `start` and `end` properties (directly on the node,
|
||||
rather than the `loc` object, which holds line/column data. To also
|
||||
add a
|
||||
[semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
|
||||
`range` property holding a `[start, end]` array with the same
|
||||
numbers, set the `ranges` option to `true`.
|
||||
|
||||
- **program**: It is possible to parse multiple files into a single
|
||||
AST by passing the tree produced by parsing the first file as the
|
||||
`program` option in subsequent parses. This will add the toplevel
|
||||
forms of the parsed file to the "Program" (top) node of an existing
|
||||
parse tree.
|
||||
|
||||
- **sourceFile**: When the `locations` option is `true`, you can pass
|
||||
this option to add a `source` attribute in every node’s `loc`
|
||||
object. Note that the contents of this option are not examined or
|
||||
processed in any way; you are free to use whatever format you
|
||||
choose.
|
||||
|
||||
- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
|
||||
will be added (regardless of the `location` option) directly to the
|
||||
nodes, rather than the `loc` object.
|
||||
|
||||
- **preserveParens**: If this option is `true`, parenthesized expressions
|
||||
are represented by (non-standard) `ParenthesizedExpression` nodes
|
||||
that have a single `expression` property containing the expression
|
||||
inside parentheses.
|
||||
|
||||
**parseExpressionAt**`(input, offset, options)` will parse a single
|
||||
expression in a string, and return its AST. It will not complain if
|
||||
there is more of the string left after the expression.
|
||||
|
||||
**tokenizer**`(input, options)` returns an object with a `getToken`
|
||||
method that can be called repeatedly to get the next token, a `{start,
|
||||
end, type, value}` object (with added `loc` property when the
|
||||
`locations` option is enabled and `range` property when the `ranges`
|
||||
option is enabled). When the token's type is `tokTypes.eof`, you
|
||||
should stop calling the method, since it will keep returning that same
|
||||
token forever.
|
||||
|
||||
Note that tokenizing JavaScript without parsing it is, in modern
|
||||
versions of the language, not really possible due to the way syntax is
|
||||
overloaded in ways that can only be disambiguated by the parse
|
||||
context. This package applies a bunch of heuristics to try and do a
|
||||
reasonable job, but you are advised to use `parse` with the `onToken`
|
||||
option instead of this.
|
||||
|
||||
In ES6 environment, returned result can be used as any other
|
||||
protocol-compliant iterable:
|
||||
|
||||
```javascript
|
||||
for (let token of acorn.tokenizer(str)) {
|
||||
// iterate over the tokens
|
||||
}
|
||||
|
||||
// transform code to array of tokens:
|
||||
var tokens = [...acorn.tokenizer(str)];
|
||||
```
|
||||
|
||||
**tokTypes** holds an object mapping names to the token type objects
|
||||
that end up in the `type` properties of tokens.
|
||||
|
||||
**getLineInfo**`(input, offset)` can be used to get a `{line,
|
||||
column}` object for a given program string and offset.
|
||||
|
||||
### The `Parser` class
|
||||
|
||||
Instances of the **`Parser`** class contain all the state and logic
|
||||
that drives a parse. It has static methods `parse`,
|
||||
`parseExpressionAt`, and `tokenizer` that match the top-level
|
||||
functions by the same name.
|
||||
|
||||
When extending the parser with plugins, you need to call these methods
|
||||
on the extended version of the class. To extend a parser with plugins,
|
||||
you can use its static `extend` method.
|
||||
|
||||
```javascript
|
||||
var acorn = require("acorn");
|
||||
var jsx = require("acorn-jsx");
|
||||
var JSXParser = acorn.Parser.extend(jsx());
|
||||
JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020});
|
||||
```
|
||||
|
||||
The `extend` method takes any number of plugin values, and returns a
|
||||
new `Parser` class that includes the extra parser logic provided by
|
||||
the plugins.
|
||||
|
||||
## Command line interface
|
||||
|
||||
The `bin/acorn` utility can be used to parse a file from the command
|
||||
line. It accepts as arguments its input file and the following
|
||||
options:
|
||||
|
||||
- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
|
||||
to parse. Default is version 9.
|
||||
|
||||
- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
|
||||
|
||||
- `--locations`: Attaches a "loc" object to each node with "start" and
|
||||
"end" subobjects, each of which contains the one-based line and
|
||||
zero-based column numbers in `{line, column}` form.
|
||||
|
||||
- `--allow-hash-bang`: If the code starts with the characters #! (as
|
||||
in a shellscript), the first line will be treated as a comment.
|
||||
|
||||
- `--allow-await-outside-function`: Allows top-level `await` expressions.
|
||||
See the `allowAwaitOutsideFunction` option for more information.
|
||||
|
||||
- `--compact`: No whitespace is used in the AST output.
|
||||
|
||||
- `--silent`: Do not output the AST, just return the exit status.
|
||||
|
||||
- `--help`: Print the usage information and quit.
|
||||
|
||||
The utility spits out the syntax tree as JSON data.
|
||||
|
||||
## Existing plugins
|
||||
|
||||
- [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
|
|
@ -64,7 +64,7 @@ require('aws-sdk/lib/maintenance_mode_message').suppress = true;
|
|||
To use the SDK in the browser, simply add the following script tag to your
|
||||
HTML pages:
|
||||
|
||||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1635.0.min.js"></script>
|
||||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1643.0.min.js"></script>
|
||||
|
||||
You can also build a custom browser SDK with your specified set of AWS services.
|
||||
This can allow you to reduce the SDK's size, specify different API versions of
|
||||
|
|
|
@ -88,3 +88,41 @@ status code rather than reporting the signal properly. This
|
|||
module tries to do the right thing, but on Windows systems, you
|
||||
may see that incorrect result. There is as far as I'm aware no
|
||||
workaround for this.
|
||||
|
||||
## util: `foreground-child/proxy-signals`
|
||||
|
||||
If you just want to proxy the signals to a child process that the
|
||||
main process receives, you can use the `proxy-signals` export
|
||||
from this package.
|
||||
|
||||
```js
|
||||
import { proxySignals } from 'foreground-child/proxy-signals'
|
||||
|
||||
const childProcess = spawn('command', ['some', 'args'])
|
||||
proxySignals(childProcess)
|
||||
```
|
||||
|
||||
Now, any fatal signal received by the current process will be
|
||||
proxied to the child process.
|
||||
|
||||
It doesn't go in the other direction; ie, signals sent to the
|
||||
child process will not affect the parent. For that, listen to the
|
||||
child `exit` or `close` events, and handle them appropriately.
|
||||
|
||||
## util: `foreground-child/watchdog`
|
||||
|
||||
If you are spawning a child process, and want to ensure that it
|
||||
isn't left dangling if the parent process exits, you can use the
|
||||
watchdog utility exported by this module.
|
||||
|
||||
```js
|
||||
import { watchdog } from 'foreground-child/watchdog'
|
||||
|
||||
const childProcess = spawn('command', ['some', 'args'])
|
||||
const watchdogProcess = watchdog(childProcess)
|
||||
|
||||
// watchdogProcess is a reference to the process monitoring the
|
||||
// parent and child. There's usually no reason to do anything
|
||||
// with it, as it's silent and will terminate
|
||||
// automatically when it's no longer needed.
|
||||
```
|
||||
|
|
11
components/buttons/node_modules/karma-typescript/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/buttons/node_modules/karma-typescript/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
11
components/buttons/node_modules/terser-webpack-plugin/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/buttons/node_modules/terser-webpack-plugin/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
11
components/buttons/node_modules/webpack/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/buttons/node_modules/webpack/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syncfusion/ej2-angular-buttons",
|
||||
"version": "18.64.1",
|
||||
"version": "26.1.35",
|
||||
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch. for Angular",
|
||||
"author": "Syncfusion Inc.",
|
||||
"license": "SEE LICENSE IN license",
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## 26.1.38 (2024-06-19)
|
||||
|
||||
### Chart
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- `#I594639` - Now, the range navigator and the chart are rendered with the same width.
|
||||
- `#I598543` - Now, the chart area scrolling works properly when enabling the trackball in mobile mode.
|
||||
- `#F188458` - Now, the page remains in the same position when adding or removing a series in chart.
|
||||
|
||||
## 26.1.35 (2024-06-11)
|
||||
|
||||
### Accumulation Chart
|
||||
|
|
11
components/charts/node_modules/@syncfusion/ej2-build-test/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/charts/node_modules/@syncfusion/ej2-build-test/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
|
@ -8,7 +8,7 @@ This package contains type definitions for validator (https://github.com/validat
|
|||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/validator.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Sat, 11 May 2024 09:35:43 GMT
|
||||
* Last updated: Sun, 16 Jun 2024 11:35:49 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
|
|
282
components/charts/node_modules/acorn-walk/node_modules/acorn/README.md
сгенерированный
поставляемый
Normal file
282
components/charts/node_modules/acorn-walk/node_modules/acorn/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,282 @@
|
|||
# Acorn
|
||||
|
||||
A tiny, fast JavaScript parser written in JavaScript.
|
||||
|
||||
## Community
|
||||
|
||||
Acorn is open source software released under an
|
||||
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
|
||||
|
||||
You are welcome to
|
||||
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
|
||||
requests on [github](https://github.com/acornjs/acorn).
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
npm install acorn
|
||||
```
|
||||
|
||||
Alternately, you can download the source and build acorn yourself:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/acornjs/acorn.git
|
||||
cd acorn
|
||||
npm install
|
||||
```
|
||||
|
||||
## Interface
|
||||
|
||||
**parse**`(input, options)` is the main interface to the library. The
|
||||
`input` parameter is a string, `options` must be an object setting
|
||||
some of the options listed below. The return value will be an abstract
|
||||
syntax tree object as specified by the [ESTree
|
||||
spec](https://github.com/estree/estree).
|
||||
|
||||
```javascript
|
||||
let acorn = require("acorn");
|
||||
console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}));
|
||||
```
|
||||
|
||||
When encountering a syntax error, the parser will raise a
|
||||
`SyntaxError` object with a meaningful message. The error object will
|
||||
have a `pos` property that indicates the string offset at which the
|
||||
error occurred, and a `loc` object that contains a `{line, column}`
|
||||
object referring to that same position.
|
||||
|
||||
Options are provided by in a second argument, which should be an
|
||||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
implemented through plugins.
|
||||
|
||||
- **sourceType**: Indicate the mode the code should be parsed in. Can be
|
||||
either `"script"` or `"module"`. This influences global strict mode
|
||||
and parsing of `import` and `export` declarations.
|
||||
|
||||
**NOTE**: If set to `"module"`, then static `import` / `export` syntax
|
||||
will be valid, even if `ecmaVersion` is less than 6.
|
||||
|
||||
- **onInsertedSemicolon**: If given a callback, that callback will be
|
||||
called whenever a missing semicolon is inserted by the parser. The
|
||||
callback will be given the character offset of the point where the
|
||||
semicolon is inserted as argument, and if `locations` is on, also a
|
||||
`{line, column}` object representing this position.
|
||||
|
||||
- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
|
||||
commas.
|
||||
|
||||
- **allowReserved**: If `false`, using a reserved word will generate
|
||||
an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
|
||||
versions. When given the value `"never"`, reserved words and
|
||||
keywords can also not be used as property names (as in Internet
|
||||
Explorer's old parser).
|
||||
|
||||
- **allowReturnOutsideFunction**: By default, a return statement at
|
||||
the top level raises an error. Set this to `true` to accept such
|
||||
code.
|
||||
|
||||
- **allowImportExportEverywhere**: By default, `import` and `export`
|
||||
declarations can only appear at a program's top level. Setting this
|
||||
option to `true` allows them anywhere where a statement is allowed,
|
||||
and also allows `import.meta` expressions to appear in scripts
|
||||
(when `sourceType` is not `"module"`).
|
||||
|
||||
- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
|
||||
only appear inside `async` functions. Defaults to `true` in modules
|
||||
for `ecmaVersion` 2022 and later, `false` for lower versions.
|
||||
Setting this option to `true` allows to have top-level `await`
|
||||
expressions. They are still not allowed in non-`async` functions,
|
||||
though.
|
||||
|
||||
- **allowSuperOutsideMethod**: By default, `super` outside a method
|
||||
raises an error. Set this to `true` to accept such code.
|
||||
|
||||
- **allowHashBang**: When this is enabled, if the code starts with the
|
||||
characters `#!` (as in a shellscript), the first line will be
|
||||
treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
|
||||
|
||||
- **checkPrivateFields**: By default, the parser will verify that
|
||||
private properties are only used in places where they are valid and
|
||||
have been declared. Set this to false to turn such checks off.
|
||||
|
||||
- **locations**: When `true`, each node has a `loc` object attached
|
||||
with `start` and `end` subobjects, each of which contains the
|
||||
one-based line and zero-based column numbers in `{line, column}`
|
||||
form. Default is `false`.
|
||||
|
||||
- **onToken**: If a function is passed for this option, each found
|
||||
token will be passed in same format as tokens returned from
|
||||
`tokenizer().getToken()`.
|
||||
|
||||
If array is passed, each found token is pushed to it.
|
||||
|
||||
Note that you are not allowed to call the parser from the
|
||||
callback—that will corrupt its internal state.
|
||||
|
||||
- **onComment**: If a function is passed for this option, whenever a
|
||||
comment is encountered the function will be called with the
|
||||
following parameters:
|
||||
|
||||
- `block`: `true` if the comment is a block comment, false if it
|
||||
is a line comment.
|
||||
- `text`: The content of the comment.
|
||||
- `start`: Character offset of the start of the comment.
|
||||
- `end`: Character offset of the end of the comment.
|
||||
|
||||
When the `locations` options is on, the `{line, column}` locations
|
||||
of the comment’s start and end are passed as two additional
|
||||
parameters.
|
||||
|
||||
If array is passed for this option, each found comment is pushed
|
||||
to it as object in Esprima format:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"type": "Line" | "Block",
|
||||
"value": "comment text",
|
||||
"start": Number,
|
||||
"end": Number,
|
||||
// If `locations` option is on:
|
||||
"loc": {
|
||||
"start": {line: Number, column: Number}
|
||||
"end": {line: Number, column: Number}
|
||||
},
|
||||
// If `ranges` option is on:
|
||||
"range": [Number, Number]
|
||||
}
|
||||
```
|
||||
|
||||
Note that you are not allowed to call the parser from the
|
||||
callback—that will corrupt its internal state.
|
||||
|
||||
- **ranges**: Nodes have their start and end characters offsets
|
||||
recorded in `start` and `end` properties (directly on the node,
|
||||
rather than the `loc` object, which holds line/column data. To also
|
||||
add a
|
||||
[semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
|
||||
`range` property holding a `[start, end]` array with the same
|
||||
numbers, set the `ranges` option to `true`.
|
||||
|
||||
- **program**: It is possible to parse multiple files into a single
|
||||
AST by passing the tree produced by parsing the first file as the
|
||||
`program` option in subsequent parses. This will add the toplevel
|
||||
forms of the parsed file to the "Program" (top) node of an existing
|
||||
parse tree.
|
||||
|
||||
- **sourceFile**: When the `locations` option is `true`, you can pass
|
||||
this option to add a `source` attribute in every node’s `loc`
|
||||
object. Note that the contents of this option are not examined or
|
||||
processed in any way; you are free to use whatever format you
|
||||
choose.
|
||||
|
||||
- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
|
||||
will be added (regardless of the `location` option) directly to the
|
||||
nodes, rather than the `loc` object.
|
||||
|
||||
- **preserveParens**: If this option is `true`, parenthesized expressions
|
||||
are represented by (non-standard) `ParenthesizedExpression` nodes
|
||||
that have a single `expression` property containing the expression
|
||||
inside parentheses.
|
||||
|
||||
**parseExpressionAt**`(input, offset, options)` will parse a single
|
||||
expression in a string, and return its AST. It will not complain if
|
||||
there is more of the string left after the expression.
|
||||
|
||||
**tokenizer**`(input, options)` returns an object with a `getToken`
|
||||
method that can be called repeatedly to get the next token, a `{start,
|
||||
end, type, value}` object (with added `loc` property when the
|
||||
`locations` option is enabled and `range` property when the `ranges`
|
||||
option is enabled). When the token's type is `tokTypes.eof`, you
|
||||
should stop calling the method, since it will keep returning that same
|
||||
token forever.
|
||||
|
||||
Note that tokenizing JavaScript without parsing it is, in modern
|
||||
versions of the language, not really possible due to the way syntax is
|
||||
overloaded in ways that can only be disambiguated by the parse
|
||||
context. This package applies a bunch of heuristics to try and do a
|
||||
reasonable job, but you are advised to use `parse` with the `onToken`
|
||||
option instead of this.
|
||||
|
||||
In ES6 environment, returned result can be used as any other
|
||||
protocol-compliant iterable:
|
||||
|
||||
```javascript
|
||||
for (let token of acorn.tokenizer(str)) {
|
||||
// iterate over the tokens
|
||||
}
|
||||
|
||||
// transform code to array of tokens:
|
||||
var tokens = [...acorn.tokenizer(str)];
|
||||
```
|
||||
|
||||
**tokTypes** holds an object mapping names to the token type objects
|
||||
that end up in the `type` properties of tokens.
|
||||
|
||||
**getLineInfo**`(input, offset)` can be used to get a `{line,
|
||||
column}` object for a given program string and offset.
|
||||
|
||||
### The `Parser` class
|
||||
|
||||
Instances of the **`Parser`** class contain all the state and logic
|
||||
that drives a parse. It has static methods `parse`,
|
||||
`parseExpressionAt`, and `tokenizer` that match the top-level
|
||||
functions by the same name.
|
||||
|
||||
When extending the parser with plugins, you need to call these methods
|
||||
on the extended version of the class. To extend a parser with plugins,
|
||||
you can use its static `extend` method.
|
||||
|
||||
```javascript
|
||||
var acorn = require("acorn");
|
||||
var jsx = require("acorn-jsx");
|
||||
var JSXParser = acorn.Parser.extend(jsx());
|
||||
JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020});
|
||||
```
|
||||
|
||||
The `extend` method takes any number of plugin values, and returns a
|
||||
new `Parser` class that includes the extra parser logic provided by
|
||||
the plugins.
|
||||
|
||||
## Command line interface
|
||||
|
||||
The `bin/acorn` utility can be used to parse a file from the command
|
||||
line. It accepts as arguments its input file and the following
|
||||
options:
|
||||
|
||||
- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
|
||||
to parse. Default is version 9.
|
||||
|
||||
- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
|
||||
|
||||
- `--locations`: Attaches a "loc" object to each node with "start" and
|
||||
"end" subobjects, each of which contains the one-based line and
|
||||
zero-based column numbers in `{line, column}` form.
|
||||
|
||||
- `--allow-hash-bang`: If the code starts with the characters #! (as
|
||||
in a shellscript), the first line will be treated as a comment.
|
||||
|
||||
- `--allow-await-outside-function`: Allows top-level `await` expressions.
|
||||
See the `allowAwaitOutsideFunction` option for more information.
|
||||
|
||||
- `--compact`: No whitespace is used in the AST output.
|
||||
|
||||
- `--silent`: Do not output the AST, just return the exit status.
|
||||
|
||||
- `--help`: Print the usage information and quit.
|
||||
|
||||
The utility spits out the syntax tree as JSON data.
|
||||
|
||||
## Existing plugins
|
||||
|
||||
- [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
|
|
@ -64,7 +64,7 @@ require('aws-sdk/lib/maintenance_mode_message').suppress = true;
|
|||
To use the SDK in the browser, simply add the following script tag to your
|
||||
HTML pages:
|
||||
|
||||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1635.0.min.js"></script>
|
||||
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1643.0.min.js"></script>
|
||||
|
||||
You can also build a custom browser SDK with your specified set of AWS services.
|
||||
This can allow you to reduce the SDK's size, specify different API versions of
|
||||
|
|
103
components/charts/node_modules/engine.io-client/node_modules/ws/README.md
сгенерированный
поставляемый
103
components/charts/node_modules/engine.io-client/node_modules/ws/README.md
сгенерированный
поставляемый
|
@ -1,7 +1,7 @@
|
|||
# ws: a Node.js WebSocket library
|
||||
|
||||
[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
|
||||
[![CI](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[![CI](https://img.shields.io/github/actions/workflow/status/websockets/ws/ci.yml?branch=master&label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)
|
||||
|
||||
ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and
|
||||
|
@ -11,8 +11,8 @@ Passes the quite extensive Autobahn test suite: [server][server-report],
|
|||
[client][client-report].
|
||||
|
||||
**Note**: This module does not work in the browser. The client in the docs is a
|
||||
reference to a back end with the role of a client in the WebSocket
|
||||
communication. Browser clients must use the native
|
||||
reference to a backend with the role of a client in the WebSocket communication.
|
||||
Browser clients must use the native
|
||||
[`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
|
||||
object. To make the same code work seamlessly on Node.js and the browser, you
|
||||
can use one of the many wrappers available on npm, like
|
||||
|
@ -23,6 +23,7 @@ can use one of the many wrappers available on npm, like
|
|||
- [Protocol support](#protocol-support)
|
||||
- [Installing](#installing)
|
||||
- [Opt-in for performance](#opt-in-for-performance)
|
||||
- [Legacy opt-in for performance](#legacy-opt-in-for-performance)
|
||||
- [API docs](#api-docs)
|
||||
- [WebSocket compression](#websocket-compression)
|
||||
- [Usage examples](#usage-examples)
|
||||
|
@ -57,23 +58,37 @@ npm install ws
|
|||
|
||||
### Opt-in for performance
|
||||
|
||||
There are 2 optional modules that can be installed along side with the ws
|
||||
module. These modules are binary addons which improve certain operations.
|
||||
Prebuilt binaries are available for the most popular platforms so you don't
|
||||
necessarily need to have a C++ compiler installed on your machine.
|
||||
[bufferutil][] is an optional module that can be installed alongside the ws
|
||||
module:
|
||||
|
||||
- `npm install --save-optional bufferutil`: Allows to efficiently perform
|
||||
operations such as masking and unmasking the data payload of the WebSocket
|
||||
frames.
|
||||
- `npm install --save-optional utf-8-validate`: Allows to efficiently check if a
|
||||
message contains valid UTF-8.
|
||||
```
|
||||
npm install --save-optional bufferutil
|
||||
```
|
||||
|
||||
To not even try to require and use these modules, use the
|
||||
[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) and
|
||||
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment
|
||||
variables. These might be useful to enhance security in systems where a user can
|
||||
put a package in the package search path of an application of another user, due
|
||||
to how the Node.js resolver algorithm works.
|
||||
This is a binary addon that improves the performance of certain operations such
|
||||
as masking and unmasking the data payload of the WebSocket frames. Prebuilt
|
||||
binaries are available for the most popular platforms, so you don't necessarily
|
||||
need to have a C++ compiler installed on your machine.
|
||||
|
||||
To force ws to not use bufferutil, use the
|
||||
[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) environment variable. This
|
||||
can be useful to enhance security in systems where a user can put a package in
|
||||
the package search path of an application of another user, due to how the
|
||||
Node.js resolver algorithm works.
|
||||
|
||||
#### Legacy opt-in for performance
|
||||
|
||||
If you are running on an old version of Node.js (prior to v18.14.0), ws also
|
||||
supports the [utf-8-validate][] module:
|
||||
|
||||
```
|
||||
npm install --save-optional utf-8-validate
|
||||
```
|
||||
|
||||
This contains a binary polyfill for [`buffer.isUtf8()`][].
|
||||
|
||||
To force ws not to use utf-8-validate, use the
|
||||
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment variable.
|
||||
|
||||
## API docs
|
||||
|
||||
|
@ -131,7 +146,7 @@ const wss = new WebSocketServer({
|
|||
```
|
||||
|
||||
The client will only use the extension if it is supported and enabled on the
|
||||
server. To always disable the extension on the client set the
|
||||
server. To always disable the extension on the client, set the
|
||||
`perMessageDeflate` option to `false`.
|
||||
|
||||
```js
|
||||
|
@ -151,6 +166,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('ws://www.host.com/path');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
ws.send('something');
|
||||
});
|
||||
|
@ -167,6 +184,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('ws://www.host.com/path');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
const array = new Float32Array(5);
|
||||
|
||||
|
@ -186,6 +205,8 @@ import { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log('received: %s', data);
|
||||
});
|
||||
|
@ -208,6 +229,8 @@ const server = createServer({
|
|||
const wss = new WebSocketServer({ server });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log('received: %s', data);
|
||||
});
|
||||
|
@ -222,7 +245,6 @@ server.listen(8080);
|
|||
|
||||
```js
|
||||
import { createServer } from 'http';
|
||||
import { parse } from 'url';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
const server = createServer();
|
||||
|
@ -230,15 +252,19 @@ const wss1 = new WebSocketServer({ noServer: true });
|
|||
const wss2 = new WebSocketServer({ noServer: true });
|
||||
|
||||
wss1.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
wss2.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
const { pathname } = parse(request.url);
|
||||
const { pathname } = new URL(request.url, 'wss://base.url');
|
||||
|
||||
if (pathname === '/foo') {
|
||||
wss1.handleUpgrade(request, socket, head, function done(ws) {
|
||||
|
@ -262,16 +288,24 @@ server.listen(8080);
|
|||
import { createServer } from 'http';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
function onSocketError(err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
const server = createServer();
|
||||
const wss = new WebSocketServer({ noServer: true });
|
||||
|
||||
wss.on('connection', function connection(ws, request, client) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log(`Received message ${data} from user ${client}`);
|
||||
});
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
socket.on('error', onSocketError);
|
||||
|
||||
// This function is not defined on purpose. Implement it with your own logic.
|
||||
authenticate(request, function next(err, client) {
|
||||
if (err || !client) {
|
||||
|
@ -280,6 +314,8 @@ server.on('upgrade', function upgrade(request, socket, head) {
|
|||
return;
|
||||
}
|
||||
|
||||
socket.removeListener('error', onSocketError);
|
||||
|
||||
wss.handleUpgrade(request, socket, head, function done(ws) {
|
||||
wss.emit('connection', ws, request, client);
|
||||
});
|
||||
|
@ -302,6 +338,8 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data, isBinary) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client.readyState === WebSocket.OPEN) {
|
||||
|
@ -321,6 +359,8 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data, isBinary) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client !== ws && client.readyState === WebSocket.OPEN) {
|
||||
|
@ -338,6 +378,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('wss://websocket-echo.com/');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
console.log('connected');
|
||||
ws.send(Date.now());
|
||||
|
@ -365,6 +407,8 @@ const ws = new WebSocket('wss://websocket-echo.com/');
|
|||
|
||||
const duplex = createWebSocketStream(ws, { encoding: 'utf8' });
|
||||
|
||||
duplex.on('error', console.error);
|
||||
|
||||
duplex.pipe(process.stdout);
|
||||
process.stdin.pipe(duplex);
|
||||
```
|
||||
|
@ -389,6 +433,8 @@ const wss = new WebSocketServer({ port: 8080 });
|
|||
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
const ip = req.socket.remoteAddress;
|
||||
|
||||
ws.on('error', console.error);
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -398,16 +444,18 @@ the `X-Forwarded-For` header.
|
|||
```js
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
const ip = req.headers['x-forwarded-for'].split(',')[0].trim();
|
||||
|
||||
ws.on('error', console.error);
|
||||
});
|
||||
```
|
||||
|
||||
### How to detect and close broken connections?
|
||||
|
||||
Sometimes the link between the server and the client can be interrupted in a way
|
||||
that keeps both the server and the client unaware of the broken state of the
|
||||
Sometimes, the link between the server and the client can be interrupted in a
|
||||
way that keeps both the server and the client unaware of the broken state of the
|
||||
connection (e.g. when pulling the cord).
|
||||
|
||||
In these cases ping messages can be used as a means to verify that the remote
|
||||
In these cases, ping messages can be used as a means to verify that the remote
|
||||
endpoint is still responsive.
|
||||
|
||||
```js
|
||||
|
@ -421,6 +469,7 @@ const wss = new WebSocketServer({ port: 8080 });
|
|||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.isAlive = true;
|
||||
ws.on('error', console.error);
|
||||
ws.on('pong', heartbeat);
|
||||
});
|
||||
|
||||
|
@ -441,7 +490,7 @@ wss.on('close', function close() {
|
|||
Pong messages are automatically sent in response to ping messages as required by
|
||||
the spec.
|
||||
|
||||
Just like the server example above your clients might as well lose connection
|
||||
Just like the server example above, your clients might as well lose connection
|
||||
without knowing it. You might want to add a ping listener on your clients to
|
||||
prevent that. A simple implementation would be:
|
||||
|
||||
|
@ -462,6 +511,7 @@ function heartbeat() {
|
|||
|
||||
const client = new WebSocket('wss://websocket-echo.com/');
|
||||
|
||||
client.on('error', console.error);
|
||||
client.on('open', heartbeat);
|
||||
client.on('ping', heartbeat);
|
||||
client.on('close', function clear() {
|
||||
|
@ -482,6 +532,8 @@ We're using the GitHub [releases][changelog] for changelog entries.
|
|||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[`buffer.isutf8()`]: https://nodejs.org/api/buffer.html#bufferisutf8input
|
||||
[bufferutil]: https://github.com/websockets/bufferutil
|
||||
[changelog]: https://github.com/websockets/ws/releases
|
||||
[client-report]: http://websockets.github.io/ws/autobahn/clients/
|
||||
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
|
||||
|
@ -492,4 +544,5 @@ We're using the GitHub [releases][changelog] for changelog entries.
|
|||
[server-report]: http://websockets.github.io/ws/autobahn/servers/
|
||||
[session-parse-example]: ./examples/express-session-parse
|
||||
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
|
||||
[utf-8-validate]: https://github.com/websockets/utf-8-validate
|
||||
[ws-server-options]: ./doc/ws.md#new-websocketserveroptions-callback
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# ws: a Node.js WebSocket library
|
||||
|
||||
[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
|
||||
[![CI](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[![CI](https://img.shields.io/github/actions/workflow/status/websockets/ws/ci.yml?branch=master&label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)
|
||||
|
||||
ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and
|
||||
|
@ -11,8 +11,8 @@ Passes the quite extensive Autobahn test suite: [server][server-report],
|
|||
[client][client-report].
|
||||
|
||||
**Note**: This module does not work in the browser. The client in the docs is a
|
||||
reference to a back end with the role of a client in the WebSocket
|
||||
communication. Browser clients must use the native
|
||||
reference to a backend with the role of a client in the WebSocket communication.
|
||||
Browser clients must use the native
|
||||
[`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
|
||||
object. To make the same code work seamlessly on Node.js and the browser, you
|
||||
can use one of the many wrappers available on npm, like
|
||||
|
@ -23,6 +23,7 @@ can use one of the many wrappers available on npm, like
|
|||
- [Protocol support](#protocol-support)
|
||||
- [Installing](#installing)
|
||||
- [Opt-in for performance](#opt-in-for-performance)
|
||||
- [Legacy opt-in for performance](#legacy-opt-in-for-performance)
|
||||
- [API docs](#api-docs)
|
||||
- [WebSocket compression](#websocket-compression)
|
||||
- [Usage examples](#usage-examples)
|
||||
|
@ -57,23 +58,37 @@ npm install ws
|
|||
|
||||
### Opt-in for performance
|
||||
|
||||
There are 2 optional modules that can be installed along side with the ws
|
||||
module. These modules are binary addons which improve certain operations.
|
||||
Prebuilt binaries are available for the most popular platforms so you don't
|
||||
necessarily need to have a C++ compiler installed on your machine.
|
||||
[bufferutil][] is an optional module that can be installed alongside the ws
|
||||
module:
|
||||
|
||||
- `npm install --save-optional bufferutil`: Allows to efficiently perform
|
||||
operations such as masking and unmasking the data payload of the WebSocket
|
||||
frames.
|
||||
- `npm install --save-optional utf-8-validate`: Allows to efficiently check if a
|
||||
message contains valid UTF-8.
|
||||
```
|
||||
npm install --save-optional bufferutil
|
||||
```
|
||||
|
||||
To not even try to require and use these modules, use the
|
||||
[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) and
|
||||
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment
|
||||
variables. These might be useful to enhance security in systems where a user can
|
||||
put a package in the package search path of an application of another user, due
|
||||
to how the Node.js resolver algorithm works.
|
||||
This is a binary addon that improves the performance of certain operations such
|
||||
as masking and unmasking the data payload of the WebSocket frames. Prebuilt
|
||||
binaries are available for the most popular platforms, so you don't necessarily
|
||||
need to have a C++ compiler installed on your machine.
|
||||
|
||||
To force ws to not use bufferutil, use the
|
||||
[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) environment variable. This
|
||||
can be useful to enhance security in systems where a user can put a package in
|
||||
the package search path of an application of another user, due to how the
|
||||
Node.js resolver algorithm works.
|
||||
|
||||
#### Legacy opt-in for performance
|
||||
|
||||
If you are running on an old version of Node.js (prior to v18.14.0), ws also
|
||||
supports the [utf-8-validate][] module:
|
||||
|
||||
```
|
||||
npm install --save-optional utf-8-validate
|
||||
```
|
||||
|
||||
This contains a binary polyfill for [`buffer.isUtf8()`][].
|
||||
|
||||
To force ws not to use utf-8-validate, use the
|
||||
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment variable.
|
||||
|
||||
## API docs
|
||||
|
||||
|
@ -131,7 +146,7 @@ const wss = new WebSocketServer({
|
|||
```
|
||||
|
||||
The client will only use the extension if it is supported and enabled on the
|
||||
server. To always disable the extension on the client set the
|
||||
server. To always disable the extension on the client, set the
|
||||
`perMessageDeflate` option to `false`.
|
||||
|
||||
```js
|
||||
|
@ -151,6 +166,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('ws://www.host.com/path');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
ws.send('something');
|
||||
});
|
||||
|
@ -167,6 +184,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('ws://www.host.com/path');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
const array = new Float32Array(5);
|
||||
|
||||
|
@ -186,6 +205,8 @@ import { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log('received: %s', data);
|
||||
});
|
||||
|
@ -208,6 +229,8 @@ const server = createServer({
|
|||
const wss = new WebSocketServer({ server });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log('received: %s', data);
|
||||
});
|
||||
|
@ -222,7 +245,6 @@ server.listen(8080);
|
|||
|
||||
```js
|
||||
import { createServer } from 'http';
|
||||
import { parse } from 'url';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
const server = createServer();
|
||||
|
@ -230,15 +252,19 @@ const wss1 = new WebSocketServer({ noServer: true });
|
|||
const wss2 = new WebSocketServer({ noServer: true });
|
||||
|
||||
wss1.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
wss2.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
const { pathname } = parse(request.url);
|
||||
const { pathname } = new URL(request.url, 'wss://base.url');
|
||||
|
||||
if (pathname === '/foo') {
|
||||
wss1.handleUpgrade(request, socket, head, function done(ws) {
|
||||
|
@ -262,16 +288,24 @@ server.listen(8080);
|
|||
import { createServer } from 'http';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
function onSocketError(err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
const server = createServer();
|
||||
const wss = new WebSocketServer({ noServer: true });
|
||||
|
||||
wss.on('connection', function connection(ws, request, client) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log(`Received message ${data} from user ${client}`);
|
||||
});
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
socket.on('error', onSocketError);
|
||||
|
||||
// This function is not defined on purpose. Implement it with your own logic.
|
||||
authenticate(request, function next(err, client) {
|
||||
if (err || !client) {
|
||||
|
@ -280,6 +314,8 @@ server.on('upgrade', function upgrade(request, socket, head) {
|
|||
return;
|
||||
}
|
||||
|
||||
socket.removeListener('error', onSocketError);
|
||||
|
||||
wss.handleUpgrade(request, socket, head, function done(ws) {
|
||||
wss.emit('connection', ws, request, client);
|
||||
});
|
||||
|
@ -302,6 +338,8 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data, isBinary) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client.readyState === WebSocket.OPEN) {
|
||||
|
@ -321,6 +359,8 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data, isBinary) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client !== ws && client.readyState === WebSocket.OPEN) {
|
||||
|
@ -338,6 +378,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('wss://websocket-echo.com/');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
console.log('connected');
|
||||
ws.send(Date.now());
|
||||
|
@ -365,6 +407,8 @@ const ws = new WebSocket('wss://websocket-echo.com/');
|
|||
|
||||
const duplex = createWebSocketStream(ws, { encoding: 'utf8' });
|
||||
|
||||
duplex.on('error', console.error);
|
||||
|
||||
duplex.pipe(process.stdout);
|
||||
process.stdin.pipe(duplex);
|
||||
```
|
||||
|
@ -389,6 +433,8 @@ const wss = new WebSocketServer({ port: 8080 });
|
|||
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
const ip = req.socket.remoteAddress;
|
||||
|
||||
ws.on('error', console.error);
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -398,16 +444,18 @@ the `X-Forwarded-For` header.
|
|||
```js
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
const ip = req.headers['x-forwarded-for'].split(',')[0].trim();
|
||||
|
||||
ws.on('error', console.error);
|
||||
});
|
||||
```
|
||||
|
||||
### How to detect and close broken connections?
|
||||
|
||||
Sometimes the link between the server and the client can be interrupted in a way
|
||||
that keeps both the server and the client unaware of the broken state of the
|
||||
Sometimes, the link between the server and the client can be interrupted in a
|
||||
way that keeps both the server and the client unaware of the broken state of the
|
||||
connection (e.g. when pulling the cord).
|
||||
|
||||
In these cases ping messages can be used as a means to verify that the remote
|
||||
In these cases, ping messages can be used as a means to verify that the remote
|
||||
endpoint is still responsive.
|
||||
|
||||
```js
|
||||
|
@ -421,6 +469,7 @@ const wss = new WebSocketServer({ port: 8080 });
|
|||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.isAlive = true;
|
||||
ws.on('error', console.error);
|
||||
ws.on('pong', heartbeat);
|
||||
});
|
||||
|
||||
|
@ -441,7 +490,7 @@ wss.on('close', function close() {
|
|||
Pong messages are automatically sent in response to ping messages as required by
|
||||
the spec.
|
||||
|
||||
Just like the server example above your clients might as well lose connection
|
||||
Just like the server example above, your clients might as well lose connection
|
||||
without knowing it. You might want to add a ping listener on your clients to
|
||||
prevent that. A simple implementation would be:
|
||||
|
||||
|
@ -462,6 +511,7 @@ function heartbeat() {
|
|||
|
||||
const client = new WebSocket('wss://websocket-echo.com/');
|
||||
|
||||
client.on('error', console.error);
|
||||
client.on('open', heartbeat);
|
||||
client.on('ping', heartbeat);
|
||||
client.on('close', function clear() {
|
||||
|
@ -482,6 +532,8 @@ We're using the GitHub [releases][changelog] for changelog entries.
|
|||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[`buffer.isutf8()`]: https://nodejs.org/api/buffer.html#bufferisutf8input
|
||||
[bufferutil]: https://github.com/websockets/bufferutil
|
||||
[changelog]: https://github.com/websockets/ws/releases
|
||||
[client-report]: http://websockets.github.io/ws/autobahn/clients/
|
||||
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
|
||||
|
@ -492,4 +544,5 @@ We're using the GitHub [releases][changelog] for changelog entries.
|
|||
[server-report]: http://websockets.github.io/ws/autobahn/servers/
|
||||
[session-parse-example]: ./examples/express-session-parse
|
||||
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
|
||||
[utf-8-validate]: https://github.com/websockets/utf-8-validate
|
||||
[ws-server-options]: ./doc/ws.md#new-websocketserveroptions-callback
|
||||
|
|
|
@ -88,3 +88,41 @@ status code rather than reporting the signal properly. This
|
|||
module tries to do the right thing, but on Windows systems, you
|
||||
may see that incorrect result. There is as far as I'm aware no
|
||||
workaround for this.
|
||||
|
||||
## util: `foreground-child/proxy-signals`
|
||||
|
||||
If you just want to proxy the signals to a child process that the
|
||||
main process receives, you can use the `proxy-signals` export
|
||||
from this package.
|
||||
|
||||
```js
|
||||
import { proxySignals } from 'foreground-child/proxy-signals'
|
||||
|
||||
const childProcess = spawn('command', ['some', 'args'])
|
||||
proxySignals(childProcess)
|
||||
```
|
||||
|
||||
Now, any fatal signal received by the current process will be
|
||||
proxied to the child process.
|
||||
|
||||
It doesn't go in the other direction; ie, signals sent to the
|
||||
child process will not affect the parent. For that, listen to the
|
||||
child `exit` or `close` events, and handle them appropriately.
|
||||
|
||||
## util: `foreground-child/watchdog`
|
||||
|
||||
If you are spawning a child process, and want to ensure that it
|
||||
isn't left dangling if the parent process exits, you can use the
|
||||
watchdog utility exported by this module.
|
||||
|
||||
```js
|
||||
import { watchdog } from 'foreground-child/watchdog'
|
||||
|
||||
const childProcess = spawn('command', ['some', 'args'])
|
||||
const watchdogProcess = watchdog(childProcess)
|
||||
|
||||
// watchdogProcess is a reference to the process monitoring the
|
||||
// parent and child. There's usually no reason to do anything
|
||||
// with it, as it's silent and will terminate
|
||||
// automatically when it's no longer needed.
|
||||
```
|
||||
|
|
11
components/charts/node_modules/karma-typescript/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/charts/node_modules/karma-typescript/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
103
components/charts/node_modules/socket.io-adapter/node_modules/ws/README.md
сгенерированный
поставляемый
103
components/charts/node_modules/socket.io-adapter/node_modules/ws/README.md
сгенерированный
поставляемый
|
@ -1,7 +1,7 @@
|
|||
# ws: a Node.js WebSocket library
|
||||
|
||||
[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
|
||||
[![CI](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[![CI](https://img.shields.io/github/actions/workflow/status/websockets/ws/ci.yml?branch=master&label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
|
||||
[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)
|
||||
|
||||
ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and
|
||||
|
@ -11,8 +11,8 @@ Passes the quite extensive Autobahn test suite: [server][server-report],
|
|||
[client][client-report].
|
||||
|
||||
**Note**: This module does not work in the browser. The client in the docs is a
|
||||
reference to a back end with the role of a client in the WebSocket
|
||||
communication. Browser clients must use the native
|
||||
reference to a backend with the role of a client in the WebSocket communication.
|
||||
Browser clients must use the native
|
||||
[`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
|
||||
object. To make the same code work seamlessly on Node.js and the browser, you
|
||||
can use one of the many wrappers available on npm, like
|
||||
|
@ -23,6 +23,7 @@ can use one of the many wrappers available on npm, like
|
|||
- [Protocol support](#protocol-support)
|
||||
- [Installing](#installing)
|
||||
- [Opt-in for performance](#opt-in-for-performance)
|
||||
- [Legacy opt-in for performance](#legacy-opt-in-for-performance)
|
||||
- [API docs](#api-docs)
|
||||
- [WebSocket compression](#websocket-compression)
|
||||
- [Usage examples](#usage-examples)
|
||||
|
@ -57,23 +58,37 @@ npm install ws
|
|||
|
||||
### Opt-in for performance
|
||||
|
||||
There are 2 optional modules that can be installed along side with the ws
|
||||
module. These modules are binary addons which improve certain operations.
|
||||
Prebuilt binaries are available for the most popular platforms so you don't
|
||||
necessarily need to have a C++ compiler installed on your machine.
|
||||
[bufferutil][] is an optional module that can be installed alongside the ws
|
||||
module:
|
||||
|
||||
- `npm install --save-optional bufferutil`: Allows to efficiently perform
|
||||
operations such as masking and unmasking the data payload of the WebSocket
|
||||
frames.
|
||||
- `npm install --save-optional utf-8-validate`: Allows to efficiently check if a
|
||||
message contains valid UTF-8.
|
||||
```
|
||||
npm install --save-optional bufferutil
|
||||
```
|
||||
|
||||
To not even try to require and use these modules, use the
|
||||
[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) and
|
||||
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment
|
||||
variables. These might be useful to enhance security in systems where a user can
|
||||
put a package in the package search path of an application of another user, due
|
||||
to how the Node.js resolver algorithm works.
|
||||
This is a binary addon that improves the performance of certain operations such
|
||||
as masking and unmasking the data payload of the WebSocket frames. Prebuilt
|
||||
binaries are available for the most popular platforms, so you don't necessarily
|
||||
need to have a C++ compiler installed on your machine.
|
||||
|
||||
To force ws to not use bufferutil, use the
|
||||
[`WS_NO_BUFFER_UTIL`](./doc/ws.md#ws_no_buffer_util) environment variable. This
|
||||
can be useful to enhance security in systems where a user can put a package in
|
||||
the package search path of an application of another user, due to how the
|
||||
Node.js resolver algorithm works.
|
||||
|
||||
#### Legacy opt-in for performance
|
||||
|
||||
If you are running on an old version of Node.js (prior to v18.14.0), ws also
|
||||
supports the [utf-8-validate][] module:
|
||||
|
||||
```
|
||||
npm install --save-optional utf-8-validate
|
||||
```
|
||||
|
||||
This contains a binary polyfill for [`buffer.isUtf8()`][].
|
||||
|
||||
To force ws not to use utf-8-validate, use the
|
||||
[`WS_NO_UTF_8_VALIDATE`](./doc/ws.md#ws_no_utf_8_validate) environment variable.
|
||||
|
||||
## API docs
|
||||
|
||||
|
@ -131,7 +146,7 @@ const wss = new WebSocketServer({
|
|||
```
|
||||
|
||||
The client will only use the extension if it is supported and enabled on the
|
||||
server. To always disable the extension on the client set the
|
||||
server. To always disable the extension on the client, set the
|
||||
`perMessageDeflate` option to `false`.
|
||||
|
||||
```js
|
||||
|
@ -151,6 +166,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('ws://www.host.com/path');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
ws.send('something');
|
||||
});
|
||||
|
@ -167,6 +184,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('ws://www.host.com/path');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
const array = new Float32Array(5);
|
||||
|
||||
|
@ -186,6 +205,8 @@ import { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log('received: %s', data);
|
||||
});
|
||||
|
@ -208,6 +229,8 @@ const server = createServer({
|
|||
const wss = new WebSocketServer({ server });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log('received: %s', data);
|
||||
});
|
||||
|
@ -222,7 +245,6 @@ server.listen(8080);
|
|||
|
||||
```js
|
||||
import { createServer } from 'http';
|
||||
import { parse } from 'url';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
const server = createServer();
|
||||
|
@ -230,15 +252,19 @@ const wss1 = new WebSocketServer({ noServer: true });
|
|||
const wss2 = new WebSocketServer({ noServer: true });
|
||||
|
||||
wss1.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
wss2.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
// ...
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
const { pathname } = parse(request.url);
|
||||
const { pathname } = new URL(request.url, 'wss://base.url');
|
||||
|
||||
if (pathname === '/foo') {
|
||||
wss1.handleUpgrade(request, socket, head, function done(ws) {
|
||||
|
@ -262,16 +288,24 @@ server.listen(8080);
|
|||
import { createServer } from 'http';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
function onSocketError(err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
const server = createServer();
|
||||
const wss = new WebSocketServer({ noServer: true });
|
||||
|
||||
wss.on('connection', function connection(ws, request, client) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data) {
|
||||
console.log(`Received message ${data} from user ${client}`);
|
||||
});
|
||||
});
|
||||
|
||||
server.on('upgrade', function upgrade(request, socket, head) {
|
||||
socket.on('error', onSocketError);
|
||||
|
||||
// This function is not defined on purpose. Implement it with your own logic.
|
||||
authenticate(request, function next(err, client) {
|
||||
if (err || !client) {
|
||||
|
@ -280,6 +314,8 @@ server.on('upgrade', function upgrade(request, socket, head) {
|
|||
return;
|
||||
}
|
||||
|
||||
socket.removeListener('error', onSocketError);
|
||||
|
||||
wss.handleUpgrade(request, socket, head, function done(ws) {
|
||||
wss.emit('connection', ws, request, client);
|
||||
});
|
||||
|
@ -302,6 +338,8 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data, isBinary) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client.readyState === WebSocket.OPEN) {
|
||||
|
@ -321,6 +359,8 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|||
const wss = new WebSocketServer({ port: 8080 });
|
||||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('message', function message(data, isBinary) {
|
||||
wss.clients.forEach(function each(client) {
|
||||
if (client !== ws && client.readyState === WebSocket.OPEN) {
|
||||
|
@ -338,6 +378,8 @@ import WebSocket from 'ws';
|
|||
|
||||
const ws = new WebSocket('wss://websocket-echo.com/');
|
||||
|
||||
ws.on('error', console.error);
|
||||
|
||||
ws.on('open', function open() {
|
||||
console.log('connected');
|
||||
ws.send(Date.now());
|
||||
|
@ -365,6 +407,8 @@ const ws = new WebSocket('wss://websocket-echo.com/');
|
|||
|
||||
const duplex = createWebSocketStream(ws, { encoding: 'utf8' });
|
||||
|
||||
duplex.on('error', console.error);
|
||||
|
||||
duplex.pipe(process.stdout);
|
||||
process.stdin.pipe(duplex);
|
||||
```
|
||||
|
@ -389,6 +433,8 @@ const wss = new WebSocketServer({ port: 8080 });
|
|||
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
const ip = req.socket.remoteAddress;
|
||||
|
||||
ws.on('error', console.error);
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -398,16 +444,18 @@ the `X-Forwarded-For` header.
|
|||
```js
|
||||
wss.on('connection', function connection(ws, req) {
|
||||
const ip = req.headers['x-forwarded-for'].split(',')[0].trim();
|
||||
|
||||
ws.on('error', console.error);
|
||||
});
|
||||
```
|
||||
|
||||
### How to detect and close broken connections?
|
||||
|
||||
Sometimes the link between the server and the client can be interrupted in a way
|
||||
that keeps both the server and the client unaware of the broken state of the
|
||||
Sometimes, the link between the server and the client can be interrupted in a
|
||||
way that keeps both the server and the client unaware of the broken state of the
|
||||
connection (e.g. when pulling the cord).
|
||||
|
||||
In these cases ping messages can be used as a means to verify that the remote
|
||||
In these cases, ping messages can be used as a means to verify that the remote
|
||||
endpoint is still responsive.
|
||||
|
||||
```js
|
||||
|
@ -421,6 +469,7 @@ const wss = new WebSocketServer({ port: 8080 });
|
|||
|
||||
wss.on('connection', function connection(ws) {
|
||||
ws.isAlive = true;
|
||||
ws.on('error', console.error);
|
||||
ws.on('pong', heartbeat);
|
||||
});
|
||||
|
||||
|
@ -441,7 +490,7 @@ wss.on('close', function close() {
|
|||
Pong messages are automatically sent in response to ping messages as required by
|
||||
the spec.
|
||||
|
||||
Just like the server example above your clients might as well lose connection
|
||||
Just like the server example above, your clients might as well lose connection
|
||||
without knowing it. You might want to add a ping listener on your clients to
|
||||
prevent that. A simple implementation would be:
|
||||
|
||||
|
@ -462,6 +511,7 @@ function heartbeat() {
|
|||
|
||||
const client = new WebSocket('wss://websocket-echo.com/');
|
||||
|
||||
client.on('error', console.error);
|
||||
client.on('open', heartbeat);
|
||||
client.on('ping', heartbeat);
|
||||
client.on('close', function clear() {
|
||||
|
@ -482,6 +532,8 @@ We're using the GitHub [releases][changelog] for changelog entries.
|
|||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[`buffer.isutf8()`]: https://nodejs.org/api/buffer.html#bufferisutf8input
|
||||
[bufferutil]: https://github.com/websockets/bufferutil
|
||||
[changelog]: https://github.com/websockets/ws/releases
|
||||
[client-report]: http://websockets.github.io/ws/autobahn/clients/
|
||||
[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
|
||||
|
@ -492,4 +544,5 @@ We're using the GitHub [releases][changelog] for changelog entries.
|
|||
[server-report]: http://websockets.github.io/ws/autobahn/servers/
|
||||
[session-parse-example]: ./examples/express-session-parse
|
||||
[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
|
||||
[utf-8-validate]: https://github.com/websockets/utf-8-validate
|
||||
[ws-server-options]: ./doc/ws.md#new-websocketserveroptions-callback
|
||||
|
|
11
components/charts/node_modules/terser-webpack-plugin/node_modules/acorn/README.md
сгенерированный
поставляемый
11
components/charts/node_modules/terser-webpack-plugin/node_modules/acorn/README.md
сгенерированный
поставляемый
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
|
@ -50,12 +50,11 @@ Options are provided by in a second argument, which should be an
|
|||
object containing any of these fields (only `ecmaVersion` is
|
||||
required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
|
||||
number, either in year (`2022`) or plain version number (`6`) form,
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support for
|
||||
new syntax features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@syncfusion/ej2-angular-charts",
|
||||
"version": "20.22.1",
|
||||
"version": "26.1.35",
|
||||
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball. for Angular",
|
||||
"author": "Syncfusion Inc.",
|
||||
"license": "SEE LICENSE IN license",
|
||||
|
|
|
@ -4,7 +4,7 @@ import { AccumulationSeriesDirective, AccumulationSeriesCollectionDirective } fr
|
|||
import { AccumulationAnnotationDirective, AccumulationAnnotationsDirective } from './annotations.directive';
|
||||
import { AccumulationChartComponent } from './accumulationchart.component';
|
||||
import { AccumulationChartModule } from './accumulationchart.module';
|
||||
import {PieSeries, FunnelSeries, PyramidSeries, AccumulationTooltip, AccumulationLegend, AccumulationSelection, AccumulationDataLabel, AccumulationAnnotation} from '@syncfusion/ej2-charts'
|
||||
import {PieSeries, FunnelSeries, PyramidSeries, AccumulationTooltip, AccumulationLegend, AccumulationSelection, AccumulationHighlight, AccumulationDataLabel, AccumulationAnnotation} from '@syncfusion/ej2-charts'
|
||||
|
||||
|
||||
export const PieSeriesService: ValueProvider = { provide: 'ChartsPieSeries', useValue: PieSeries};
|
||||
|
@ -13,6 +13,7 @@ export const PyramidSeriesService: ValueProvider = { provide: 'ChartsPyramidSeri
|
|||
export const AccumulationTooltipService: ValueProvider = { provide: 'ChartsAccumulationTooltip', useValue: AccumulationTooltip};
|
||||
export const AccumulationLegendService: ValueProvider = { provide: 'ChartsAccumulationLegend', useValue: AccumulationLegend};
|
||||
export const AccumulationSelectionService: ValueProvider = { provide: 'ChartsAccumulationSelection', useValue: AccumulationSelection};
|
||||
export const AccumulationHighlightService: ValueProvider = { provide: 'ChartsAccumulationHighlight', useValue: AccumulationHighlight};
|
||||
export const AccumulationDataLabelService: ValueProvider = { provide: 'ChartsAccumulationDataLabel', useValue: AccumulationDataLabel};
|
||||
export const AccumulationAnnotationService: ValueProvider = { provide: 'ChartsAccumulationAnnotation', useValue: AccumulationAnnotation};
|
||||
|
||||
|
@ -31,6 +32,7 @@ export const AccumulationAnnotationService: ValueProvider = { provide: 'ChartsAc
|
|||
AccumulationTooltipService,
|
||||
AccumulationLegendService,
|
||||
AccumulationSelectionService,
|
||||
AccumulationHighlightService,
|
||||
AccumulationDataLabelService,
|
||||
AccumulationAnnotationService
|
||||
]
|
||||
|
|
|
@ -101,6 +101,12 @@ export class AccumulationChartComponent extends AccumulationChart implements ICo
|
|||
this.injectedModules.push(mod)
|
||||
}
|
||||
} catch { }
|
||||
try {
|
||||
let mod = this.injector.get('ChartsAccumulationHighlight');
|
||||
if(this.injectedModules.indexOf(mod) === -1) {
|
||||
this.injectedModules.push(mod)
|
||||
}
|
||||
} catch { }
|
||||
try {
|
||||
let mod = this.injector.get('ChartsAccumulationDataLabel');
|
||||
if(this.injectedModules.indexOf(mod) === -1) {
|
||||
|
|
|
@ -2,4 +2,4 @@ export {AccumulationSeriesDirective,AccumulationSeriesCollectionDirective} from
|
|||
export {AccumulationAnnotationDirective,AccumulationAnnotationsDirective} from './annotations.directive';
|
||||
export { AccumulationChartComponent} from './accumulationchart.component';
|
||||
export { AccumulationChartModule } from './accumulationchart.module';
|
||||
export { AccumulationChartAllModule, PieSeriesService, FunnelSeriesService, PyramidSeriesService, AccumulationTooltipService, AccumulationLegendService, AccumulationSelectionService, AccumulationDataLabelService, AccumulationAnnotationService } from './accumulationchart-all.module';
|
||||
export { AccumulationChartAllModule, PieSeriesService, FunnelSeriesService, PyramidSeriesService, AccumulationTooltipService, AccumulationLegendService, AccumulationSelectionService, AccumulationHighlightService, AccumulationDataLabelService, AccumulationAnnotationService } from './accumulationchart-all.module';
|
|
@ -18,7 +18,7 @@ export {AccumulationSeriesDirective,AccumulationSeriesCollectionDirective} from
|
|||
export {AccumulationAnnotationDirective,AccumulationAnnotationsDirective} from './accumulation-chart/annotations.directive';
|
||||
export { AccumulationChartComponent} from './accumulation-chart/accumulationchart.component';
|
||||
export { AccumulationChartModule } from './accumulation-chart/accumulationchart.module';
|
||||
export { AccumulationChartAllModule, PieSeriesService, FunnelSeriesService, PyramidSeriesService, AccumulationTooltipService, AccumulationLegendService, AccumulationSelectionService, AccumulationDataLabelService, AccumulationAnnotationService } from './accumulation-chart/accumulationchart-all.module';
|
||||
export { AccumulationChartAllModule, PieSeriesService, FunnelSeriesService, PyramidSeriesService, AccumulationTooltipService, AccumulationLegendService, AccumulationSelectionService, AccumulationHighlightService, AccumulationDataLabelService, AccumulationAnnotationService } from './accumulation-chart/accumulationchart-all.module';
|
||||
export {RangenavigatorSeriesDirective,RangenavigatorSeriesCollectionDirective} from './range-navigator/series.directive';
|
||||
export { RangeNavigatorComponent} from './range-navigator/rangenavigator.component';
|
||||
export { RangeNavigatorModule } from './range-navigator/rangenavigator.module';
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
<!-- markdownlint-disable MD004 -->
|
||||
|
||||
|
||||
# Changelog
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## 26.1.35 (2024-06-11)
|
||||
## 26.1.38 (2024-06-19)
|
||||
|
||||
### Circular Gauge
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
- `#I580684` - Exceptions will no longer be thrown when the pointer is removed, and its value is updated dynamically in the Circular Gauge.
|
||||
|
||||
## 25.1.35 (2024-03-15)
|
||||
|
||||
### Circular Gauge
|
||||
|
||||
|
@ -185,7 +192,7 @@
|
|||
|
||||
#### New Features
|
||||
|
||||
- `#I218689` - An option has been provided to hide a label when it intersects with other labels.
|
||||
- `#I218689` - An option has been provided to hide a label when it intersects with other labels.
|
||||
- `#I229216` - Tooltip support has been provided for circular gauge annotation.
|
||||
- `#I238868` - Tooltip support has been provided for circular gauge ranges.
|
||||
- `#I210142` - Legend support has been provided for circular gauge ranges.
|
||||
|
@ -265,13 +272,19 @@
|
|||
#### New Features
|
||||
|
||||
- Support has been provided to round off the axis label values and tooltip text.
|
||||
|
||||
- Support has been provided to display the last label even if it is not in the visible range.
|
||||
|
||||
- An event has been provided to get or set the Circular Gauge radius dynamically.
|
||||
|
||||
- Provided support to assign percentage values for pointer width, ranges width and axis line width.
|
||||
|
||||
- Provided rounding places support for the axis labels and tooltip text in circular gauge.
|
||||
|
||||
- Provided support to display the last axis label, even if it is not in the interval value.
|
||||
|
||||
- Provided event to get and set the calculated radius of the circular gauge.
|
||||
|
||||
- Provided support to assign percentage values for pointer width, ranges width and axis line width.
|
||||
|
||||
#### Bug Fixes
|
||||
|
@ -347,10 +360,7 @@
|
|||
|
||||
- Provided one way binding support for Axes properties in Angular platform.
|
||||
|
||||
- Provided one way binding support for Axes properties in Angular platform.
|
||||
|
||||
|
||||
## 16.1.24 (2018-02-22)
|
||||
- Provided one way binding support for Axes properties in Angular platform.## 16.1.24 (2018-02-22)
|
||||
|
||||
### Common
|
||||
|
||||
|
@ -370,7 +380,6 @@
|
|||
|
||||
• Provided ranges startWidth and endWidth percentage support.
|
||||
|
||||
|
||||
## 15.4.23-preview (2017-12-27)
|
||||
|
||||
### Common
|
||||
|
@ -379,12 +388,10 @@
|
|||
|
||||
• Added typing file for ES5 global scripts (dist/global/index.d.ts)
|
||||
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
• Modified the module bundle file name for ES6 bundling
|
||||
|
||||
|
||||
## 15.4.17-preview (2017-11-13)
|
||||
|
||||
### CircularGauge
|
||||
|
@ -393,17 +400,13 @@ Circular Gauge component is ideal to visualize numeric values over a circular sc
|
|||
of the gauge that are pointer, pointer cap, axis, ticks, labels, and annotation can be easily
|
||||
customized.
|
||||
|
||||
|
||||
- **Ranges** - Supports for highlighting the range values in the gauge scale.
|
||||
- **Axis** - Supports to render multiple axis in the gauge.
|
||||
- **Pointers** - Supports to add multiple pointers to the gauge (RangeBar, Needle, Marker, and Image).
|
||||
- **Annotation** - Supports to add custom elements to the gauge by using annotation.
|
||||
- **Animation** - Supports animation for the pointer.
|
||||
- **Custom Label** - Supports the addition of custom label text in the required location of the gauge.
|
||||
- **User Interaction** - Supports interactive features like tooltip and pointer drag and drop.
|
||||
|
||||
|
||||
## 19.4.38 (2021-12-17)
|
||||
* **Ranges** - Supports for highlighting the range values in the gauge scale.
|
||||
* **Axis** - Supports to render multiple axis in the gauge.
|
||||
* **Pointers** - Supports to add multiple pointers to the gauge (RangeBar, Needle, Marker, and Image).
|
||||
* **Annotation** - Supports to add custom elements to the gauge by using annotation.
|
||||
* **Animation** - Supports animation for the pointer.
|
||||
* **Custom Label** - Supports the addition of custom label text in the required location of the gauge.
|
||||
* **User Interaction** - Supports interactive features like tooltip and pointer drag and drop.## 19.4.38 (2021-12-17)
|
||||
|
||||
### CircularGauge
|
||||
|
||||
|
|
|
@ -0,0 +1,178 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
|
||||
import { CircularGaugeComponent, CircularGauge, Pointer, GaugeTheme } from '@syncfusion/ej2-angular-circulargauge';
|
||||
import { IAnnotationRenderEventArgs, ILoadedEventArgs, IResizeEventArgs } from '@syncfusion/ej2-circulargauge';
|
||||
import { AnnotationDataSerive } from './annotation.service';
|
||||
import { Browser } from '@syncfusion/ej2-base';
|
||||
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'annotation.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class AnnotationComponent {
|
||||
|
||||
@ViewChild('gauge1')
|
||||
public circularGauge: CircularGaugeComponent;
|
||||
public tooltipInterval: number;
|
||||
|
||||
public clockInterval: number;
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
hiddenLabel: 'First',
|
||||
font: { color: 'rgb(29,29,29)' },
|
||||
autoAngle: false
|
||||
};
|
||||
public pointerWidth: number = 5;
|
||||
public angle1: number = 270;
|
||||
public angle2: number = 180;
|
||||
public angle3: number = 90;
|
||||
public angle4: number = 360;
|
||||
public startAngle: number = 0;
|
||||
public endAngle: number = 0;
|
||||
public minimum: number = 0;
|
||||
public maximum: number = 12;
|
||||
public start: number = 0;
|
||||
public end: number = 3;
|
||||
public width: number = 10;
|
||||
//Initializing majorTicks
|
||||
public majorTicks: Object = {
|
||||
width: 2, height: 14, interval: 1,
|
||||
color: 'rgb(29,29,29)'
|
||||
};
|
||||
public annotationRadius: string = Browser.isDevice ? '90%' : '75%';
|
||||
public minorTicks: Object = {
|
||||
height: 4, width: 1, interval: 0.2,
|
||||
color: 'rgb(29,29,29)'
|
||||
};
|
||||
public border: Object = { width: 0, color: 'rgba(29,29,29,0.8)' };
|
||||
public cap: Object = {
|
||||
radius: 0,
|
||||
border: { width: 0, color: 'red' }
|
||||
};
|
||||
public needleTail: Object = {
|
||||
length: '0%'
|
||||
};
|
||||
public animation: Object = {
|
||||
enable: false
|
||||
};
|
||||
public lineStyle: Object = { width: 0 };
|
||||
public cap1: Object = {
|
||||
color: 'white',
|
||||
radius: 4,
|
||||
border: {
|
||||
width: 2,
|
||||
color: 'rgba(29,29,29,0.8)'
|
||||
}
|
||||
};
|
||||
public border1: Object = {
|
||||
width: 2,
|
||||
color: 'rgba(29,29,29,0.8)'
|
||||
};
|
||||
public needleTail1: Object = {
|
||||
color: 'rgba(29,29,29,0.8)',
|
||||
length: '20%',
|
||||
border: {
|
||||
width: 2,
|
||||
color: 'rgba(29,29,29,0.8)'
|
||||
}
|
||||
};
|
||||
public animation1: Object = {
|
||||
enable: false,
|
||||
duration: 500
|
||||
};
|
||||
public resize(args: IResizeEventArgs): void {
|
||||
window.location.reload();
|
||||
}
|
||||
public loaded(args: ILoadedEventArgs): void {
|
||||
let intervalExecute: boolean = true;
|
||||
let subGauge1: CircularGauge = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge1);
|
||||
subGauge1.appendTo('#minutes');
|
||||
let subGauge2: CircularGauge = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge2);
|
||||
subGauge2.appendTo('#seconds');
|
||||
|
||||
if (intervalExecute) {
|
||||
updateTime(false, this.circularGauge);
|
||||
this.clockInterval = setInterval(
|
||||
(): void => {
|
||||
updateTime(true, this.circularGauge, this.clockInterval);
|
||||
},
|
||||
1000
|
||||
);
|
||||
intervalExecute = false;
|
||||
}
|
||||
function updateSubGauge1(): void {
|
||||
subGauge1 = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge1);
|
||||
subGauge1.appendTo('#minutes');
|
||||
}
|
||||
function updateSubGauge2(): void {
|
||||
subGauge2 = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge2);
|
||||
subGauge2.appendTo('#seconds');
|
||||
}
|
||||
function updateTime(enable: boolean, indianTime: CircularGauge, interval?: number): void {
|
||||
if (document.getElementById('clock-container') && document.getElementsByClassName('e-circulargauge')) {
|
||||
getTime('+5.5', indianTime, enable);
|
||||
if (document.getElementById('minutes').childElementCount) {
|
||||
getTime('+5.5', subGauge1, enable, true);
|
||||
} else {
|
||||
updateSubGauge1();
|
||||
getTime('+5.5', subGauge1, enable, true);
|
||||
}
|
||||
if (document.getElementById('seconds').childElementCount) {
|
||||
getTime('+5.5', subGauge2, enable, true);
|
||||
} else {
|
||||
updateSubGauge2();
|
||||
getTime('+5.5', subGauge2, enable, true);
|
||||
}
|
||||
} else {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}
|
||||
function calcTime(offset: string): Date {
|
||||
let date: Date = new Date();
|
||||
let localTime: number = date.getTime();
|
||||
let localOffset: number = date.getTimezoneOffset() * 60000;
|
||||
let utc: number = localTime + localOffset;
|
||||
let curretDate: Date = new Date(utc + (3600000 * (+offset)));
|
||||
return curretDate;
|
||||
}
|
||||
function getTime(offset: string, gauge: CircularGauge, enable: boolean, subGauge?: boolean): void {
|
||||
let returnTime: Date = calcTime(offset);
|
||||
let seconds: number = returnTime.getSeconds() * 12 / 60; seconds = seconds === 0 ? 12 : seconds;
|
||||
if (!subGauge) {
|
||||
gauge.axes[0].pointers[2].animation.enable = enable;
|
||||
(<Pointer>gauge.axes[0].pointers[2]).currentValue = seconds === 0.2 ? 0 : (<Pointer>gauge.axes[0].pointers[2]).currentValue;
|
||||
} else {
|
||||
(<Pointer>gauge.axes[0].pointers[0]).currentValue = seconds === 0.2 ? 0 : (<Pointer>gauge.axes[0].pointers[0]).currentValue;
|
||||
gauge.axes[0].pointers[0].animation.enable = (gauge.element.id === 'seconds' && enable);
|
||||
}
|
||||
let hour: number = (returnTime.getHours() + returnTime.getMinutes() / 60) % 12;
|
||||
let minutes: number = returnTime.getMinutes() * 12 / 60 + returnTime.getSeconds() * 12 / 3600;
|
||||
let content: string;
|
||||
let hourValue: number;
|
||||
if (subGauge) {
|
||||
if (gauge.element.id === 'minutes') {
|
||||
content = '<div id="tm" style="font-size:8px;">' + Math.floor(returnTime.getMinutes()) + ' M</div>';
|
||||
gauge.setPointerValue(0, 0, minutes); gauge.setAnnotationValue(0, 3, content);
|
||||
} else {
|
||||
gauge.setPointerValue(0, 0, seconds);
|
||||
content = '<div id="tm" style="font-size:8px;">' + Math.floor(returnTime.getSeconds()) + ' S</div>';
|
||||
gauge.setAnnotationValue(0, 3, content);
|
||||
}
|
||||
} else {
|
||||
hourValue = (Math.floor(returnTime.getHours()) % 12);
|
||||
gauge.setPointerValue(0, 0, hour); gauge.setPointerValue(0, 1, minutes); gauge.setPointerValue(0, 2, seconds);
|
||||
content = '<div id="hr" style="background-color:rgba(226,226,226,0.4);color:rgba(29,29,29,0.9);font-size:12px;padding:4px;">' +
|
||||
(hourValue === 0 ? 12 : hourValue) + ':' + Math.floor(returnTime.getMinutes()) +
|
||||
(returnTime.getHours() >= 12 ? ' PM' : ' AM') + '</div>';
|
||||
gauge.setAnnotationValue(0, 2, content); let date: Date = new Date();
|
||||
content = '<div id="tm" style="font-size:10px;">' + date.getDate() + '-' +
|
||||
(date.getMonth() + 1) + '-' + date.getFullYear() + '</div>';
|
||||
gauge.setAnnotationValue(0, 3, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
|
||||
import { CircularGaugeComponent, CircularGauge, Pointer, GaugeTheme } from '@syncfusion/ej2-angular-circulargauge';
|
||||
import { IAnnotationRenderEventArgs, ILoadedEventArgs, IResizeEventArgs } from '@syncfusion/ej2-angular-circulargauge';
|
||||
import { AnnotationDataSerive } from './annotation-service';
|
||||
import { Browser } from '@syncfusion/ej2-base';
|
||||
/**
|
||||
* Sample for annotation
|
||||
*/
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'annotation.component.html',
|
||||
styleUrls: ['annoation.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class AnnotationComponent {
|
||||
|
||||
@ViewChild('gauge1')
|
||||
public circularGauge: CircularGaugeComponent;
|
||||
public tooltipInterval: number;
|
||||
|
||||
public clockInterval: number;
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
hiddenLabel: 'First',
|
||||
font: { color: 'rgb(29,29,29)' },
|
||||
autoAngle: false
|
||||
};
|
||||
public pointerWidth: number = 5;
|
||||
public angle1: number = 270;
|
||||
public angle2: number = 180;
|
||||
public angle3: number = 90;
|
||||
public angle4: number = 360;
|
||||
public startAngle: number = 0;
|
||||
public endAngle: number = 0;
|
||||
public minimum: number = 0;
|
||||
public maximum: number = 12;
|
||||
public start: number = 0;
|
||||
public end: number = 3;
|
||||
public width: number = 10;
|
||||
//Initializing majorTicks
|
||||
public majorTicks: Object = {
|
||||
width: 2, height: 14, interval: 1,
|
||||
color: 'rgb(29,29,29)'
|
||||
};
|
||||
public annotationRadius: string = Browser.isDevice ? '90%' : '75%';
|
||||
public minorTicks: Object = {
|
||||
height: 4, width: 1, interval: 0.2,
|
||||
color: 'rgb(29,29,29)'
|
||||
};
|
||||
public border: Object = { width: 0, color: 'rgba(29,29,29,0.8)' };
|
||||
public cap: Object = {
|
||||
radius: 0,
|
||||
border: { width: 0, color: 'red' }
|
||||
};
|
||||
public needleTail: Object = {
|
||||
length: '0%'
|
||||
};
|
||||
public animation: Object = {
|
||||
enable: false
|
||||
};
|
||||
public lineStyle: Object = { width: 0 };
|
||||
public cap1: Object = {
|
||||
color: 'white',
|
||||
radius: 4,
|
||||
border: {
|
||||
width: 2,
|
||||
color: 'rgba(29,29,29,0.8)'
|
||||
}
|
||||
};
|
||||
public border1: Object = {
|
||||
width: 2,
|
||||
color: 'rgba(29,29,29,0.8)'
|
||||
};
|
||||
public needleTail1: Object = {
|
||||
color: 'rgba(29,29,29,0.8)',
|
||||
length: '20%',
|
||||
border: {
|
||||
width: 2,
|
||||
color: 'rgba(29,29,29,0.8)'
|
||||
}
|
||||
};
|
||||
public animation1: Object = {
|
||||
enable: false,
|
||||
duration: 500
|
||||
};
|
||||
public resize(args: IResizeEventArgs): void {
|
||||
window.location.reload();
|
||||
}
|
||||
public loaded(args: ILoadedEventArgs): void {
|
||||
let intervalExecute: boolean = true;
|
||||
let subGauge1: CircularGauge = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge1);
|
||||
subGauge1.appendTo('#minutes');
|
||||
let subGauge2: CircularGauge = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge2);
|
||||
subGauge2.appendTo('#seconds');
|
||||
|
||||
if (intervalExecute) {
|
||||
updateTime(false, this.circularGauge);
|
||||
this.clockInterval = setInterval(
|
||||
(): void => {
|
||||
updateTime(true, this.circularGauge, this.clockInterval);
|
||||
},
|
||||
1000
|
||||
);
|
||||
intervalExecute = false;
|
||||
}
|
||||
function updateSubGauge1(): void {
|
||||
subGauge1 = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge1);
|
||||
subGauge1.appendTo('#minutes');
|
||||
}
|
||||
function updateSubGauge2(): void {
|
||||
subGauge2 = new CircularGauge(AnnotationDataSerive.prototype.GetSubGauge1().gauge2);
|
||||
subGauge2.appendTo('#seconds');
|
||||
}
|
||||
function updateTime(enable: boolean, indianTime: CircularGauge, interval?: number): void {
|
||||
if (document.getElementById('clock-container') && document.getElementsByClassName('e-circulargauge')) {
|
||||
getTime('+5.5', indianTime, enable);
|
||||
if (document.getElementById('minutes').childElementCount) {
|
||||
getTime('+5.5', subGauge1, enable, true);
|
||||
} else {
|
||||
updateSubGauge1();
|
||||
getTime('+5.5', subGauge1, enable, true);
|
||||
}
|
||||
if (document.getElementById('seconds').childElementCount) {
|
||||
getTime('+5.5', subGauge2, enable, true);
|
||||
} else {
|
||||
updateSubGauge2();
|
||||
getTime('+5.5', subGauge2, enable, true);
|
||||
}
|
||||
} else {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}
|
||||
function calcTime(offset: string): Date {
|
||||
let date: Date = new Date();
|
||||
let localTime: number = date.getTime();
|
||||
let localOffset: number = date.getTimezoneOffset() * 60000;
|
||||
let utc: number = localTime + localOffset;
|
||||
let curretDate: Date = new Date(utc + (3600000 * (+offset)));
|
||||
return curretDate;
|
||||
}
|
||||
function getTime(offset: string, gauge: CircularGauge, enable: boolean, subGauge?: boolean): void {
|
||||
let returnTime: Date = calcTime(offset);
|
||||
let seconds: number = returnTime.getSeconds() * 12 / 60; seconds = seconds === 0 ? 12 : seconds;
|
||||
if (!subGauge) {
|
||||
gauge.axes[0].pointers[2].animation.enable = enable;
|
||||
(<Pointer>gauge.axes[0].pointers[2]).currentValue = seconds === 0.2 ? 0 : (<Pointer>gauge.axes[0].pointers[2]).currentValue;
|
||||
} else {
|
||||
(<Pointer>gauge.axes[0].pointers[0]).currentValue = seconds === 0.2 ? 0 : (<Pointer>gauge.axes[0].pointers[0]).currentValue;
|
||||
gauge.axes[0].pointers[0].animation.enable = (gauge.element.id === 'seconds' && enable);
|
||||
}
|
||||
let hour: number = (returnTime.getHours() + returnTime.getMinutes() / 60) % 12;
|
||||
let minutes: number = returnTime.getMinutes() * 12 / 60 + returnTime.getSeconds() * 12 / 3600;
|
||||
let content: string;
|
||||
let hourValue: number;
|
||||
if (subGauge) {
|
||||
if (gauge.element.id === 'minutes') {
|
||||
content = '<div id="tm" style="font-size:8px;">' + Math.floor(returnTime.getMinutes()) + ' M</div>';
|
||||
gauge.setPointerValue(0, 0, minutes); gauge.setAnnotationValue(0, 3, content);
|
||||
} else {
|
||||
gauge.setPointerValue(0, 0, seconds);
|
||||
content = '<div id="tm" style="font-size:8px;">' + Math.floor(returnTime.getSeconds()) + ' S</div>';
|
||||
gauge.setAnnotationValue(0, 3, content);
|
||||
}
|
||||
} else {
|
||||
hourValue = (Math.floor(returnTime.getHours()) % 12);
|
||||
gauge.setPointerValue(0, 0, hour); gauge.setPointerValue(0, 1, minutes); gauge.setPointerValue(0, 2, seconds);
|
||||
content = '<div id="hr" style="background-color:rgba(226,226,226,0.4);color:rgba(29,29,29,0.9);font-size:12px;padding:4px;">' +
|
||||
(hourValue === 0 ? 12 : hourValue) + ':' + Math.floor(returnTime.getMinutes()) +
|
||||
(returnTime.getHours() >= 12 ? ' PM' : ' AM') + '</div>';
|
||||
gauge.setAnnotationValue(0, 2, content); let date: Date = new Date();
|
||||
content = '<div id="tm" style="font-size:10px;">' + date.getDate() + '-' +
|
||||
(date.getMonth() + 1) + '-' + date.getFullYear() + '</div>';
|
||||
gauge.setAnnotationValue(0, 3, content);
|
||||
}
|
||||
}
|
||||
}
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'arch-gauge.component.html',
|
||||
styleUrls: ['arch-gauge.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class RangeComponent {
|
||||
|
||||
public lineStyle: Object = {
|
||||
width: 0, color: '#0450C2'
|
||||
};
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
position: 'Outside', autoAngle: true,
|
||||
font: { size: '15px', fontWeight: 'normal', color: '#0450C2' }
|
||||
};
|
||||
public majorTicks: Object = {
|
||||
height: 0,
|
||||
};
|
||||
public minorTicks: Object = {
|
||||
height: 0,
|
||||
}
|
||||
public tail: Object = {
|
||||
color: '#0450C2',
|
||||
length: '25%'
|
||||
};
|
||||
public pointerCap: Object = {
|
||||
radius: 10,
|
||||
color: '#0450C2',
|
||||
border: { width: 0 }
|
||||
};
|
||||
public ranges: Object=[{
|
||||
start: 0, end: 100,
|
||||
radius: '90%',
|
||||
startWidth: 30, endWidth: 30,
|
||||
color: '#E0E0E0',
|
||||
roundedCornerRadius: 20
|
||||
}];
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'default.component.html',
|
||||
styleUrls: ['default.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class DefaultComponent {
|
||||
public ticks: Object = {
|
||||
width: 0
|
||||
};
|
||||
public lineStyle: Object = {
|
||||
width: 8, color: '#E0E0E0'
|
||||
};
|
||||
//Initializing Label Style
|
||||
public labelStyle: Object = {
|
||||
font: {
|
||||
fontFamily: 'Roboto',
|
||||
size: '12px',
|
||||
fontWeight: 'Regular'
|
||||
},
|
||||
offset: -5
|
||||
};
|
||||
public cap: Object = {
|
||||
radius: 8,
|
||||
color: '#757575',
|
||||
border: { width: 0 }
|
||||
};
|
||||
public tail: Object = {
|
||||
length: '25%',
|
||||
color: '#757575'
|
||||
}
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'direction.component.html',
|
||||
styleUrls: ['direction.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class DirectionComponent {
|
||||
public lineStyle: Object = {
|
||||
width: 10, color: '#E0E0E0'
|
||||
};
|
||||
public onLabelRender(args: IAxisLabelRenderEventArgs): void {
|
||||
args.text = ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW', ''][args.value];
|
||||
}
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
font: {
|
||||
size: '12px', fontFamily: 'Roboto'
|
||||
},
|
||||
useRangeColor: true,
|
||||
autoAngle: true,
|
||||
hiddenLabel: 'Last'
|
||||
};
|
||||
//Initializing majorTicks
|
||||
public majorTicks: Object = {
|
||||
height: 15,
|
||||
interval: 1,
|
||||
color: '#9E9E9E'
|
||||
};
|
||||
public minorTicks: Object = {
|
||||
height: 10,
|
||||
interval: 0.5,
|
||||
color: '#9E9E9E'
|
||||
};
|
||||
|
||||
public ranges: Object[] = [{
|
||||
start: 7,
|
||||
end: 7,
|
||||
color: '#f03e3e'
|
||||
}];
|
||||
public pointers: Object[] = [{
|
||||
value: 7,
|
||||
radius: '50%',
|
||||
color: '#f03e3e',
|
||||
pointerWidth: 20,
|
||||
cap: {
|
||||
radius: 0
|
||||
},
|
||||
animation: { enable: false }
|
||||
}, {
|
||||
value: 3,
|
||||
radius: '50%',
|
||||
color: '#9E9E9E',
|
||||
pointerWidth: 20,
|
||||
cap: {
|
||||
radius: 0
|
||||
},
|
||||
animation: { enable: false }
|
||||
}];
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'label.component.html',
|
||||
styleUrls: ['label.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class LabelComponent {
|
||||
public margin: Object = {
|
||||
left: 0, right: 0, top: 0, bottom: 0
|
||||
};
|
||||
//Initializing Border
|
||||
public border: Object = { color: 'transparent', width: 4 };
|
||||
public lineStyle1: Object = {
|
||||
width: 2, color: '#9E9E9E'
|
||||
};
|
||||
|
||||
public labelStyle1: Object = {
|
||||
position: 'Outside', autoAngle: true,
|
||||
font: {
|
||||
size: '10px'
|
||||
}
|
||||
};
|
||||
public majorTicks1: Object = {
|
||||
position: 'Inside', color: '#757575', width: 2, height: 10, interval: 20
|
||||
};
|
||||
public minorTicks1: Object = {
|
||||
position: 'Inside', color: '#757575', height: 5, width: 2, interval: 10
|
||||
};
|
||||
public pointers: Object[] = [{
|
||||
value: 145, type: 'RangeBar', roundedCornerRadius: 10,
|
||||
pointerWidth: 10, color: '#8BC34A', radius: '60%'
|
||||
}];
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'multiple-axis.component.html',
|
||||
styleUrls: ['multiple-axis.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class MultipleAxisComponent {
|
||||
public axisIndex: number = 0;
|
||||
public lineStyle1: Object = {
|
||||
width: 1.5, color: '#9E9E9E'
|
||||
};
|
||||
//Initializing MajorTicks
|
||||
public majorTicks1: Object = {
|
||||
position: 'Inside',
|
||||
width: 2,
|
||||
height: 10,
|
||||
color: '#757575'
|
||||
|
||||
};
|
||||
public title: string = 'Gauge with Multiple Axes';
|
||||
//Initializing TitleStyle
|
||||
public titleStyle: Object = {
|
||||
color: 'gray',
|
||||
size: '16px'
|
||||
};
|
||||
public minorTicks1: Object = {
|
||||
position: 'Inside',
|
||||
width: 2,
|
||||
height: 5,
|
||||
color: '#757575'
|
||||
|
||||
};
|
||||
public markerHeight: number = 15;
|
||||
public markerWidth: number = 15;
|
||||
public labelStyle1: Object = {
|
||||
position: 'Inside',
|
||||
autoAngle: true,
|
||||
hiddenLabel: 'None'
|
||||
};
|
||||
public cap: Object = { color: 'white', radius: 0, border: { width: 0 } };
|
||||
|
||||
public lineStyle2: Object = { width: 1.5, color: '#E84011' };
|
||||
|
||||
public labelStyle2: Object = {
|
||||
position: 'Outside',
|
||||
autoAngle: true,
|
||||
hiddenLabel: 'None',
|
||||
font: { color: '#E84011' }
|
||||
};
|
||||
public majorTicks2: Object = {
|
||||
position: 'Outside',
|
||||
width: 2,
|
||||
height: 10,
|
||||
color: '#E84011'
|
||||
};
|
||||
public minorTicks2: Object = {
|
||||
position: 'Outside',
|
||||
width: 2,
|
||||
height: 5,
|
||||
color: '#E84011'
|
||||
};
|
||||
|
||||
|
||||
constructor() {
|
||||
//
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'pointer-image.component.html',
|
||||
styleUrls: ['pointer-image.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class PointerImageComponent {
|
||||
public font1: Object = {
|
||||
size: '15px',
|
||||
color: '#00CC66'
|
||||
};
|
||||
public rangeWidth: number= 25;
|
||||
//Initializing titleStyle
|
||||
public titleStyle: Object = { size: '18px' };
|
||||
public title: string = 'Short Put Distance';
|
||||
public font2: Object = {
|
||||
size: '15px',
|
||||
color: '#fcde0b'
|
||||
};
|
||||
public value4: number = 0.1;
|
||||
public font3: Object = {
|
||||
size: '15px',
|
||||
color: '#ff5985'
|
||||
};
|
||||
|
||||
public font4: Object = {
|
||||
size: '15px',
|
||||
color: '#00BFFF'
|
||||
};
|
||||
|
||||
public animation1: Object = { duration: 1500 };
|
||||
public animation2: Object = { duration: 1200 };
|
||||
public animation3: Object = { duration: 900 };
|
||||
public animation4: Object = { duration: 0 };
|
||||
public markerWidth: number = 28;
|
||||
public markerHeight: number = 28;
|
||||
public value: number = 12;
|
||||
public value1: number = 11;
|
||||
public value2: number = 10;
|
||||
public value3: number = 12;
|
||||
public markerWidth1: number = 90;
|
||||
public markerHeight1: number = 90;
|
||||
public lineStyle: Object = { width: 0, color: '#1d1d1d' };
|
||||
public labelStyle: Object = { font: { size: '0px' } };
|
||||
public majorTicks: Object = { interval: 20, width: 0 };
|
||||
public minorTicks: Object = { width: 0 };
|
||||
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'range.component.html',
|
||||
styleUrls: ['range.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class RangeComponent {
|
||||
|
||||
public lineStyle: Object = {
|
||||
width: 10, color: 'transparent'
|
||||
};
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
position: 'Inside', useRangeColor: false,
|
||||
font: { size: '12px', fontFamily: 'Roboto', fontStyle: 'Regular' }
|
||||
};
|
||||
public majorTicks: Object = {
|
||||
height: 10, offset: 5, color: '#9E9E9E'
|
||||
};
|
||||
public minorTicks: Object = {
|
||||
height: 0
|
||||
};
|
||||
public tail: Object = {
|
||||
length: '18%', color: '#757575'
|
||||
};
|
||||
public pointerCap: Object = {
|
||||
radius: 7, color: '#757575'
|
||||
};
|
||||
|
||||
public annotaions: Object = [{
|
||||
content: '<div><span style="font-size:14px; color:#9E9E9E; font-family:Regular">Speedometer</span></div>',
|
||||
radius: '30%', angle: 0, zIndex:'1'
|
||||
}, {
|
||||
content: '<div><span style="font-size:24px; color:#424242; font-family:Regular">65 MPH</span></div>',
|
||||
radius: '40%', angle: 180, zIndex:'1'
|
||||
}];
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'semi-circle.component.html',
|
||||
styleUrls: ['semi-circle.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class RangeComponent {
|
||||
|
||||
public lineStyle: Object = {
|
||||
width: 0, color: '#0450C2'
|
||||
};
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
position: 'Outside', autoAngle: true,
|
||||
font: { size: '15px', fontWeight: 'normal', color: '#0450C2' }
|
||||
};
|
||||
public majorTicks: Object = {
|
||||
position: 'Inside', color: '#0450C2', width: 2, height: 25, interval: 20
|
||||
};
|
||||
public minorTicks: Object = {
|
||||
position: 'Inside', color: '#0450C2', height: 10, width: 1, interval: 2
|
||||
};
|
||||
public tail: Object = {
|
||||
color: '#0450C2',
|
||||
length: '25%'
|
||||
};
|
||||
public pointerCap: Object = {
|
||||
radius: 10,
|
||||
color: '#0450C2',
|
||||
border: { width: 0 }
|
||||
};
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'speedometer.component.html',
|
||||
styleUrls: ['speedometer.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class RangeComponent {
|
||||
|
||||
public lineStyle: Object = {
|
||||
width: 0, color: '#0450C2'
|
||||
};
|
||||
//Initializing LabelStyle
|
||||
public labelStyle: Object = {
|
||||
position: 'Outside', autoAngle: true,
|
||||
font: { size: '15px', fontWeight: 'normal', color: '#0450C2' }
|
||||
};
|
||||
public majorTicks: Object = {
|
||||
height: 0,
|
||||
};
|
||||
public minorTicks: Object = {
|
||||
height: 0,
|
||||
}
|
||||
public ranges: Object=[
|
||||
{
|
||||
start: 0,
|
||||
end: 20,
|
||||
startWidth: 5, endWidth: 10,
|
||||
radius: '102%',
|
||||
color: '#82b944',
|
||||
},
|
||||
{
|
||||
start: 20,
|
||||
end: 40,
|
||||
startWidth: 10, endWidth: 15,
|
||||
radius: '102%',
|
||||
color: '#a1cb43',
|
||||
}, {
|
||||
start: 40,
|
||||
end: 60,
|
||||
startWidth: 15, endWidth: 20,
|
||||
radius: '102%',
|
||||
color: '#e5ce20',
|
||||
},
|
||||
{
|
||||
start: 60,
|
||||
end: 80,
|
||||
startWidth: 20, endWidth: 25,
|
||||
radius: '102%',
|
||||
color: '#f79c02',
|
||||
},
|
||||
{
|
||||
start: 80,
|
||||
end: 100,
|
||||
startWidth: 25, endWidth: 30,
|
||||
radius: '102%',
|
||||
color: '#ea501a',
|
||||
},
|
||||
{
|
||||
start: 100,
|
||||
end: 120,
|
||||
startWidth: 30, endWidth: 35,
|
||||
radius: '102%',
|
||||
color: 'red',
|
||||
}
|
||||
];
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
|
||||
import { CircularGaugeComponent } from '@syncfusion/ej2-angular-circulargauge';
|
||||
import { ILoadedEventArgs, GaugeTheme } from '@syncfusion/ej2-angular-circulargauge';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'tooltip.component.html',
|
||||
styleUrls: ['tooltip.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class TooltipComponent {
|
||||
@ViewChild('tooltipContainer')
|
||||
public circulargauge: CircularGaugeComponent;
|
||||
public cap: Object = { radius: 10, border: { color: '#33BCBD', width: 5 } };
|
||||
public animation: Object = { enable: true, duration: 1500 };
|
||||
public title: string = 'Tooltip Customization';
|
||||
//Initializing titleStyle
|
||||
public titleStyle: Object = { size: '15px', color: 'grey' };
|
||||
public majorTicks: Object = { color: 'white', offset: -5, height: 12 };
|
||||
public minorTicks: Object = { width: 0 };
|
||||
public labelStyle: Object = { useRangeColor: true, font: { color: '#424242', size: '13px', fontFamily: 'Roboto' } };
|
||||
public lineStyle: Object = { width: 0 };
|
||||
//Initializing Tooltip
|
||||
public tooltip: Object = {
|
||||
enable: true,
|
||||
enableAnimation: false
|
||||
};
|
||||
public rangeWidth: number = 10;
|
||||
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
/* eslint-disable */
|
||||
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
|
||||
import { IPointerDragEventArgs, CircularGaugeComponent} from '@syncfusion/ej2-angular-circulargauge';
|
||||
import { getRangeColor, Range } from '@syncfusion/ej2-angular-circulargauge';
|
||||
@Component({
|
||||
selector: 'control-content',
|
||||
templateUrl: 'user-interaction.component.html',
|
||||
styleUrls: ['user-interaction.component.css'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class UserInteractionComponent {
|
||||
@ViewChild('circulargauge')
|
||||
public circulargauge: CircularGaugeComponent;
|
||||
public content: string = '<div style="font-size: 14px;color:#E5C31C;font-weight: lighter;font-style: oblique;"><span>';
|
||||
public pointerValue: number;
|
||||
|
||||
public lineStyle: Object = { width: 0, color: '#9E9E9E' };
|
||||
public labelStyle: Object = {
|
||||
useRangeColor: true
|
||||
};
|
||||
|
||||
//Initializing MajorTicks
|
||||
public majorTicks: Object = {
|
||||
useRangeColor: true
|
||||
};
|
||||
public content1: string = '<div style="font-size: 14px;color:#E5C31C;font-weight: lighter;font-style: oblique;"><span>70 MPH</span></div>';
|
||||
public minorTicks: Object = {
|
||||
useRangeColor: true
|
||||
};public dragMove(args: IPointerDragEventArgs): void {
|
||||
this.pointerValue = Math.round(args.currentValue);
|
||||
document.getElementById('pointerValue').innerHTML = 'Pointer Value <span> ' + this.pointerValue;
|
||||
(<HTMLInputElement>document.getElementById('value')).value = this.pointerValue.toString();
|
||||
this.circulargauge.setAnnotationValue(0, 0, this.content + this.pointerValue + ' MPH</span></div>');
|
||||
};
|
||||
public dragEnd(args: IPointerDragEventArgs): void {
|
||||
this.pointerValue = Math.round(args.currentValue);
|
||||
this.setPointersValue(this.circulargauge, this.pointerValue);
|
||||
};
|
||||
public markerHeight: number = 20;
|
||||
public markerWidth: number = 20;
|
||||
public rangeWidth: number = 8;
|
||||
public cap: Object = { radius: 10, border: { width: 5, color: '#E5C31C' } };
|
||||
public tail: Object = { length: '0%', color: '#E5C31C' };
|
||||
public animation: Object = { enable: true, duration: 500 };
|
||||
public setPointersValue(circulargauge: CircularGaugeComponent, pointerValue: number): void {
|
||||
let color: string = getRangeColor(pointerValue, <Range[]>(circulargauge.axes[0].ranges), circulargauge.axes[0].pointers[0].color);
|
||||
circulargauge.axes[0].pointers[0].color = color;
|
||||
circulargauge.axes[0].pointers[1].color = color;
|
||||
circulargauge.axes[0].pointers[0].animation.enable = true;
|
||||
circulargauge.axes[0].pointers[1].animation.enable = true;
|
||||
circulargauge.axes[0].pointers[0].needleTail.color = color;
|
||||
circulargauge.axes[0].pointers[1].needleTail.color = color;
|
||||
circulargauge.axes[0].pointers[0].cap.border.color = color;
|
||||
circulargauge.axes[0].pointers[1].cap.border.color = color;
|
||||
circulargauge.setPointerValue(0, 1, pointerValue);
|
||||
circulargauge.setPointerValue(0, 0, pointerValue);
|
||||
this.content = '<div style="font-size: 14px;color:' + color + ';font-weight: lighter;font-style: oblique;"><span>';
|
||||
circulargauge.setAnnotationValue(0, 0, this.content + pointerValue + ' MPH</span></div>');
|
||||
}
|
||||
ngAfterViewInit(): void {
|
||||
document.getElementById('value').onpointermove = document.getElementById('value').ontouchmove =
|
||||
document.getElementById('value').onchange = () => {
|
||||
let value: number = parseInt((<HTMLInputElement>document.getElementById('value')).value, 10);
|
||||
document.getElementById('pointerValue').innerHTML = 'Pointer Value <span> ' + value;
|
||||
this.setPointersValue(this.circulargauge, value);
|
||||
};
|
||||
|
||||
document.getElementById('enable').onchange = () => {
|
||||
let value: boolean = (<HTMLInputElement>document.getElementById('enable')).checked;
|
||||
this.circulargauge.enablePointerDrag = value;
|
||||
};
|
||||
}
|
||||
constructor() {
|
||||
// code
|
||||
};
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Project description: Repository for EJ2 angular API Documentation.
|
|
@ -5,7 +5,7 @@ var gulp = require('gulp');
|
|||
/**
|
||||
* Build ts and scss files
|
||||
*/
|
||||
gulp.task('build', ['scripts', 'styles']);
|
||||
gulp.task('build', gulp.series('scripts', 'styles'));
|
||||
|
||||
/**
|
||||
* Compile ts files
|
||||
|
|
126
components/circulargauge/node_modules/@ampproject/remapping/README.md
сгенерированный
поставляемый
Normal file
126
components/circulargauge/node_modules/@ampproject/remapping/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,126 @@
|
|||
# @ampproject/remapping
|
||||
|
||||
> Remap sequential sourcemaps through transformations to point at the original source code
|
||||
|
||||
Remapping allows you to take the sourcemaps generated through transforming your code and
|
||||
"remap" them to the original source locations. Think "my minified code, transformed with babel and
|
||||
bundled with webpack", all pointing to the correct location in your original source code.
|
||||
|
||||
With remapping, none of your source code transformations need to be aware of the input's sourcemap,
|
||||
they only need to generate an output sourcemap. This greatly simplifies building custom
|
||||
transformations (think a find-and-replace).
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install @ampproject/remapping
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```typescript
|
||||
function remapping(
|
||||
map: SourceMap | SourceMap[],
|
||||
loader: (file: string) => (SourceMap | null | undefined),
|
||||
options?: { excludeContent: boolean, decodedMappings: boolean }
|
||||
): SourceMap;
|
||||
```
|
||||
|
||||
`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer
|
||||
in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents
|
||||
a transformed file (it has a sourcmap associated with it), then the `loader` should return that
|
||||
sourcemap. If not, the path will be treated as an original, untransformed source code.
|
||||
|
||||
```js
|
||||
// Babel transformed "helloworld.js" into "transformed.js"
|
||||
const transformedMap = JSON.stringify({
|
||||
file: 'transformed.js',
|
||||
// 1st column of 2nd line of output file translates into the 1st source
|
||||
// file, line 3, column 2
|
||||
mappings: ';CAEE',
|
||||
sources: ['helloworld.js'],
|
||||
version: 3,
|
||||
});
|
||||
|
||||
// Uglify minified "transformed.js" into "transformed.min.js"
|
||||
const minifiedTransformedMap = JSON.stringify({
|
||||
file: 'transformed.min.js',
|
||||
// 0th column of 1st line of output file translates into the 1st source
|
||||
// file, line 2, column 1.
|
||||
mappings: 'AACC',
|
||||
names: [],
|
||||
sources: ['transformed.js'],
|
||||
version: 3,
|
||||
});
|
||||
|
||||
const remapped = remapping(
|
||||
minifiedTransformedMap,
|
||||
(file) => {
|
||||
|
||||
// The "transformed.js" file is an transformed file.
|
||||
if (file === 'transformed.js') {
|
||||
return transformedMap;
|
||||
}
|
||||
|
||||
// Loader will be called to load transformedMap's source file pointers as well.
|
||||
console.assert(file === 'helloworld.js');
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
console.log(remapped);
|
||||
// {
|
||||
// file: 'transpiled.min.js',
|
||||
// mappings: 'AAEE',
|
||||
// sources: ['helloworld.js'],
|
||||
// version: 3,
|
||||
// };
|
||||
```
|
||||
|
||||
In this example, `loader` will be called twice:
|
||||
|
||||
1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the
|
||||
associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can
|
||||
be traced through it into the source files it represents.
|
||||
2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so
|
||||
we return `null`.
|
||||
|
||||
The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If
|
||||
you were to read the `mappings`, it says "0th column of the first line output line points to the 1st
|
||||
column of the 2nd line of the file `helloworld.js`".
|
||||
|
||||
### Multiple transformations of a file
|
||||
|
||||
As a convenience, if you have multiple single-source transformations of a file, you may pass an
|
||||
array of sourcemap files in the order of most-recent transformation sourcemap first. So our above
|
||||
example could have been writen as:
|
||||
|
||||
```js
|
||||
const remapped = remapping(
|
||||
[minifiedTransformedMap, transformedMap],
|
||||
() => null
|
||||
);
|
||||
|
||||
console.log(remapped);
|
||||
// {
|
||||
// file: 'transpiled.min.js',
|
||||
// mappings: 'AAEE',
|
||||
// sources: ['helloworld.js'],
|
||||
// version: 3,
|
||||
// };
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
#### excludeContent
|
||||
|
||||
By default, `excludeContent` is `false`. Passing `{ excludeContent: true }`
|
||||
will exclude the `sourcesContent` field from the returned sourcemap. This is
|
||||
mainly useful when you want to reduce the size out the sourcemap.
|
||||
|
||||
#### decodedMappings
|
||||
|
||||
By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }`
|
||||
will leave the `mappings` field in a [decoded
|
||||
state](https://github.com/rich-harris/sourcemap-codec) instead of encoding
|
||||
into a VLQ string.
|
3
components/circulargauge/node_modules/@angular-devkit/architect/README.md
сгенерированный
поставляемый
Normal file
3
components/circulargauge/node_modules/@angular-devkit/architect/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Angular Build Facade
|
||||
|
||||
WIP
|
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
142
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
142
components/circulargauge/node_modules/@angular-devkit/architect/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,142 @@
|
|||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
20
components/circulargauge/node_modules/@angular-devkit/build-angular/README.md
сгенерированный
поставляемый
Normal file
20
components/circulargauge/node_modules/@angular-devkit/build-angular/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,20 @@
|
|||
# @angular-devkit/build-angular
|
||||
|
||||
This package contains [Architect builders](/packages/angular_devkit/architect/README.md) used to build and test Angular applications and libraries.
|
||||
|
||||
## Builders
|
||||
|
||||
| Name | Description |
|
||||
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| app-shell | Build an Angular [App shell](https://angular.io/guide/app-shell). |
|
||||
| browser | Build an Angular application targeting a browser environment. |
|
||||
| dev-server | A development server that provides live reloading. |
|
||||
| extract-i18n | Extract i18n messages from an Angular application. |
|
||||
| karma | Execute unit tests using [Karma](https://github.com/karma-runner/karma) test runner. |
|
||||
| ng-packagr | Build and package an Angular library in [Angular Package Format (APF)](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/preview) format using [ng-packagr](https://github.com/ng-packagr/ng-packagr). |
|
||||
| server | Build an Angular application targeting a [Node.js](https://nodejs.org) environment. |
|
||||
| protractor | **Deprecated** - Run end-to-end tests using [Protractor](https://www.protractortest.org/) framework. |
|
||||
|
||||
## Disclaimer
|
||||
|
||||
While the builders when executed via the Angular CLI and their associated options are considered stable, the programmatic APIs are not considered officially supported and are not subject to the breaking change guarantees of SemVer.
|
378
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/glob/README.md
сгенерированный
поставляемый
Normal file
378
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/glob/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,378 @@
|
|||
# Glob
|
||||
|
||||
Match files using the patterns the shell uses, like stars and stuff.
|
||||
|
||||
[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Build Status](https://ci.appveyor.com/api/projects/status/kd7f3yftf7unxlsx?svg=true)](https://ci.appveyor.com/project/isaacs/node-glob) [![Coverage Status](https://coveralls.io/repos/isaacs/node-glob/badge.svg?branch=master&service=github)](https://coveralls.io/github/isaacs/node-glob?branch=master)
|
||||
|
||||
This is a glob implementation in JavaScript. It uses the `minimatch`
|
||||
library to do its matching.
|
||||
|
||||
![a fun cartoon logo made of glob characters](logo/glob.png)
|
||||
|
||||
## Usage
|
||||
|
||||
Install with npm
|
||||
|
||||
```
|
||||
npm i glob
|
||||
```
|
||||
|
||||
```javascript
|
||||
var glob = require("glob")
|
||||
|
||||
// options is optional
|
||||
glob("**/*.js", options, function (er, files) {
|
||||
// files is an array of filenames.
|
||||
// If the `nonull` option is set, and nothing
|
||||
// was found, then files is ["**/*.js"]
|
||||
// er is an error object or null.
|
||||
})
|
||||
```
|
||||
|
||||
## Glob Primer
|
||||
|
||||
"Globs" are the patterns you type when you do stuff like `ls *.js` on
|
||||
the command line, or put `build/*` in a `.gitignore` file.
|
||||
|
||||
Before parsing the path part patterns, braced sections are expanded
|
||||
into a set. Braced sections start with `{` and end with `}`, with any
|
||||
number of comma-delimited sections within. Braced sections may contain
|
||||
slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
|
||||
|
||||
The following characters have special magic meaning when used in a
|
||||
path portion:
|
||||
|
||||
* `*` Matches 0 or more characters in a single path portion
|
||||
* `?` Matches 1 character
|
||||
* `[...]` Matches a range of characters, similar to a RegExp range.
|
||||
If the first character of the range is `!` or `^` then it matches
|
||||
any character not in the range.
|
||||
* `!(pattern|pattern|pattern)` Matches anything that does not match
|
||||
any of the patterns provided.
|
||||
* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
|
||||
patterns provided.
|
||||
* `+(pattern|pattern|pattern)` Matches one or more occurrences of the
|
||||
patterns provided.
|
||||
* `*(a|b|c)` Matches zero or more occurrences of the patterns provided
|
||||
* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
|
||||
provided
|
||||
* `**` If a "globstar" is alone in a path portion, then it matches
|
||||
zero or more directories and subdirectories searching for matches.
|
||||
It does not crawl symlinked directories.
|
||||
|
||||
### Dots
|
||||
|
||||
If a file or directory path portion has a `.` as the first character,
|
||||
then it will not match any glob pattern unless that pattern's
|
||||
corresponding path part also has a `.` as its first character.
|
||||
|
||||
For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
|
||||
However the pattern `a/*/c` would not, because `*` does not start with
|
||||
a dot character.
|
||||
|
||||
You can make glob treat dots as normal characters by setting
|
||||
`dot:true` in the options.
|
||||
|
||||
### Basename Matching
|
||||
|
||||
If you set `matchBase:true` in the options, and the pattern has no
|
||||
slashes in it, then it will seek for any file anywhere in the tree
|
||||
with a matching basename. For example, `*.js` would match
|
||||
`test/simple/basic.js`.
|
||||
|
||||
### Empty Sets
|
||||
|
||||
If no matching files are found, then an empty array is returned. This
|
||||
differs from the shell, where the pattern itself is returned. For
|
||||
example:
|
||||
|
||||
$ echo a*s*d*f
|
||||
a*s*d*f
|
||||
|
||||
To get the bash-style behavior, set the `nonull:true` in the options.
|
||||
|
||||
### See Also:
|
||||
|
||||
* `man sh`
|
||||
* `man bash` (Search for "Pattern Matching")
|
||||
* `man 3 fnmatch`
|
||||
* `man 5 gitignore`
|
||||
* [minimatch documentation](https://github.com/isaacs/minimatch)
|
||||
|
||||
## glob.hasMagic(pattern, [options])
|
||||
|
||||
Returns `true` if there are any special characters in the pattern, and
|
||||
`false` otherwise.
|
||||
|
||||
Note that the options affect the results. If `noext:true` is set in
|
||||
the options object, then `+(a|b)` will not be considered a magic
|
||||
pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
|
||||
then that is considered magical, unless `nobrace:true` is set in the
|
||||
options.
|
||||
|
||||
## glob(pattern, [options], cb)
|
||||
|
||||
* `pattern` `{String}` Pattern to be matched
|
||||
* `options` `{Object}`
|
||||
* `cb` `{Function}`
|
||||
* `err` `{Error | null}`
|
||||
* `matches` `{Array<String>}` filenames found matching the pattern
|
||||
|
||||
Perform an asynchronous glob search.
|
||||
|
||||
## glob.sync(pattern, [options])
|
||||
|
||||
* `pattern` `{String}` Pattern to be matched
|
||||
* `options` `{Object}`
|
||||
* return: `{Array<String>}` filenames found matching the pattern
|
||||
|
||||
Perform a synchronous glob search.
|
||||
|
||||
## Class: glob.Glob
|
||||
|
||||
Create a Glob object by instantiating the `glob.Glob` class.
|
||||
|
||||
```javascript
|
||||
var Glob = require("glob").Glob
|
||||
var mg = new Glob(pattern, options, cb)
|
||||
```
|
||||
|
||||
It's an EventEmitter, and starts walking the filesystem to find matches
|
||||
immediately.
|
||||
|
||||
### new glob.Glob(pattern, [options], [cb])
|
||||
|
||||
* `pattern` `{String}` pattern to search for
|
||||
* `options` `{Object}`
|
||||
* `cb` `{Function}` Called when an error occurs, or matches are found
|
||||
* `err` `{Error | null}`
|
||||
* `matches` `{Array<String>}` filenames found matching the pattern
|
||||
|
||||
Note that if the `sync` flag is set in the options, then matches will
|
||||
be immediately available on the `g.found` member.
|
||||
|
||||
### Properties
|
||||
|
||||
* `minimatch` The minimatch object that the glob uses.
|
||||
* `options` The options object passed in.
|
||||
* `aborted` Boolean which is set to true when calling `abort()`. There
|
||||
is no way at this time to continue a glob search after aborting, but
|
||||
you can re-use the statCache to avoid having to duplicate syscalls.
|
||||
* `cache` Convenience object. Each field has the following possible
|
||||
values:
|
||||
* `false` - Path does not exist
|
||||
* `true` - Path exists
|
||||
* `'FILE'` - Path exists, and is not a directory
|
||||
* `'DIR'` - Path exists, and is a directory
|
||||
* `[file, entries, ...]` - Path exists, is a directory, and the
|
||||
array value is the results of `fs.readdir`
|
||||
* `statCache` Cache of `fs.stat` results, to prevent statting the same
|
||||
path multiple times.
|
||||
* `symlinks` A record of which paths are symbolic links, which is
|
||||
relevant in resolving `**` patterns.
|
||||
* `realpathCache` An optional object which is passed to `fs.realpath`
|
||||
to minimize unnecessary syscalls. It is stored on the instantiated
|
||||
Glob object, and may be re-used.
|
||||
|
||||
### Events
|
||||
|
||||
* `end` When the matching is finished, this is emitted with all the
|
||||
matches found. If the `nonull` option is set, and no match was found,
|
||||
then the `matches` list contains the original pattern. The matches
|
||||
are sorted, unless the `nosort` flag is set.
|
||||
* `match` Every time a match is found, this is emitted with the specific
|
||||
thing that matched. It is not deduplicated or resolved to a realpath.
|
||||
* `error` Emitted when an unexpected error is encountered, or whenever
|
||||
any fs error occurs if `options.strict` is set.
|
||||
* `abort` When `abort()` is called, this event is raised.
|
||||
|
||||
### Methods
|
||||
|
||||
* `pause` Temporarily stop the search
|
||||
* `resume` Resume the search
|
||||
* `abort` Stop the search forever
|
||||
|
||||
### Options
|
||||
|
||||
All the options that can be passed to Minimatch can also be passed to
|
||||
Glob to change pattern matching behavior. Also, some have been added,
|
||||
or have glob-specific ramifications.
|
||||
|
||||
All options are false by default, unless otherwise noted.
|
||||
|
||||
All options are added to the Glob object, as well.
|
||||
|
||||
If you are running many `glob` operations, you can pass a Glob object
|
||||
as the `options` argument to a subsequent operation to shortcut some
|
||||
`stat` and `readdir` calls. At the very least, you may pass in shared
|
||||
`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
|
||||
parallel glob operations will be sped up by sharing information about
|
||||
the filesystem.
|
||||
|
||||
* `cwd` The current working directory in which to search. Defaults
|
||||
to `process.cwd()`.
|
||||
* `root` The place where patterns starting with `/` will be mounted
|
||||
onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
|
||||
systems, and `C:\` or some such on Windows.)
|
||||
* `dot` Include `.dot` files in normal matches and `globstar` matches.
|
||||
Note that an explicit dot in a portion of the pattern will always
|
||||
match dot files.
|
||||
* `nomount` By default, a pattern starting with a forward-slash will be
|
||||
"mounted" onto the root setting, so that a valid filesystem path is
|
||||
returned. Set this flag to disable that behavior.
|
||||
* `mark` Add a `/` character to directory matches. Note that this
|
||||
requires additional stat calls.
|
||||
* `nosort` Don't sort the results.
|
||||
* `stat` Set to true to stat *all* results. This reduces performance
|
||||
somewhat, and is completely unnecessary, unless `readdir` is presumed
|
||||
to be an untrustworthy indicator of file existence.
|
||||
* `silent` When an unusual error is encountered when attempting to
|
||||
read a directory, a warning will be printed to stderr. Set the
|
||||
`silent` option to true to suppress these warnings.
|
||||
* `strict` When an unusual error is encountered when attempting to
|
||||
read a directory, the process will just continue on in search of
|
||||
other matches. Set the `strict` option to raise an error in these
|
||||
cases.
|
||||
* `cache` See `cache` property above. Pass in a previously generated
|
||||
cache object to save some fs calls.
|
||||
* `statCache` A cache of results of filesystem information, to prevent
|
||||
unnecessary stat calls. While it should not normally be necessary
|
||||
to set this, you may pass the statCache from one glob() call to the
|
||||
options object of another, if you know that the filesystem will not
|
||||
change between calls. (See "Race Conditions" below.)
|
||||
* `symlinks` A cache of known symbolic links. You may pass in a
|
||||
previously generated `symlinks` object to save `lstat` calls when
|
||||
resolving `**` matches.
|
||||
* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
|
||||
* `nounique` In some cases, brace-expanded patterns can result in the
|
||||
same file showing up multiple times in the result set. By default,
|
||||
this implementation prevents duplicates in the result set. Set this
|
||||
flag to disable that behavior.
|
||||
* `nonull` Set to never return an empty set, instead returning a set
|
||||
containing the pattern itself. This is the default in glob(3).
|
||||
* `debug` Set to enable debug logging in minimatch and glob.
|
||||
* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
|
||||
* `noglobstar` Do not match `**` against multiple filenames. (Ie,
|
||||
treat it as a normal `*` instead.)
|
||||
* `noext` Do not match `+(a|b)` "extglob" patterns.
|
||||
* `nocase` Perform a case-insensitive match. Note: on
|
||||
case-insensitive filesystems, non-magic patterns will match by
|
||||
default, since `stat` and `readdir` will not raise errors.
|
||||
* `matchBase` Perform a basename-only match if the pattern does not
|
||||
contain any slash characters. That is, `*.js` would be treated as
|
||||
equivalent to `**/*.js`, matching all js files in all directories.
|
||||
* `nodir` Do not match directories, only files. (Note: to match
|
||||
*only* directories, simply put a `/` at the end of the pattern.)
|
||||
* `ignore` Add a pattern or an array of glob patterns to exclude matches.
|
||||
Note: `ignore` patterns are *always* in `dot:true` mode, regardless
|
||||
of any other settings.
|
||||
* `follow` Follow symlinked directories when expanding `**` patterns.
|
||||
Note that this can result in a lot of duplicate references in the
|
||||
presence of cyclic links.
|
||||
* `realpath` Set to true to call `fs.realpath` on all of the results.
|
||||
In the case of a symlink that cannot be resolved, the full absolute
|
||||
path to the matched entry is returned (though it will usually be a
|
||||
broken symlink)
|
||||
* `absolute` Set to true to always receive absolute paths for matched
|
||||
files. Unlike `realpath`, this also affects the values returned in
|
||||
the `match` event.
|
||||
* `fs` File-system object with Node's `fs` API. By default, the built-in
|
||||
`fs` module will be used. Set to a volume provided by a library like
|
||||
`memfs` to avoid using the "real" file-system.
|
||||
|
||||
## Comparisons to other fnmatch/glob implementations
|
||||
|
||||
While strict compliance with the existing standards is a worthwhile
|
||||
goal, some discrepancies exist between node-glob and other
|
||||
implementations, and are intentional.
|
||||
|
||||
The double-star character `**` is supported by default, unless the
|
||||
`noglobstar` flag is set. This is supported in the manner of bsdglob
|
||||
and bash 4.3, where `**` only has special significance if it is the only
|
||||
thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
|
||||
`a/**b` will not.
|
||||
|
||||
Note that symlinked directories are not crawled as part of a `**`,
|
||||
though their contents may match against subsequent portions of the
|
||||
pattern. This prevents infinite loops and duplicates and the like.
|
||||
|
||||
If an escaped pattern has no matches, and the `nonull` flag is set,
|
||||
then glob returns the pattern as-provided, rather than
|
||||
interpreting the character escapes. For example,
|
||||
`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
|
||||
`"*a?"`. This is akin to setting the `nullglob` option in bash, except
|
||||
that it does not resolve escaped pattern characters.
|
||||
|
||||
If brace expansion is not disabled, then it is performed before any
|
||||
other interpretation of the glob pattern. Thus, a pattern like
|
||||
`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
|
||||
**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
|
||||
checked for validity. Since those two are valid, matching proceeds.
|
||||
|
||||
### Comments and Negation
|
||||
|
||||
Previously, this module let you mark a pattern as a "comment" if it
|
||||
started with a `#` character, or a "negated" pattern if it started
|
||||
with a `!` character.
|
||||
|
||||
These options were deprecated in version 5, and removed in version 6.
|
||||
|
||||
To specify things that should not match, use the `ignore` option.
|
||||
|
||||
## Windows
|
||||
|
||||
**Please only use forward-slashes in glob expressions.**
|
||||
|
||||
Though windows uses either `/` or `\` as its path separator, only `/`
|
||||
characters are used by this glob implementation. You must use
|
||||
forward-slashes **only** in glob expressions. Back-slashes will always
|
||||
be interpreted as escape characters, not path separators.
|
||||
|
||||
Results from absolute patterns such as `/foo/*` are mounted onto the
|
||||
root setting using `path.join`. On windows, this will by default result
|
||||
in `/foo/*` matching `C:\foo\bar.txt`.
|
||||
|
||||
## Race Conditions
|
||||
|
||||
Glob searching, by its very nature, is susceptible to race conditions,
|
||||
since it relies on directory walking and such.
|
||||
|
||||
As a result, it is possible that a file that exists when glob looks for
|
||||
it may have been deleted or modified by the time it returns the result.
|
||||
|
||||
As part of its internal implementation, this program caches all stat
|
||||
and readdir calls that it makes, in order to cut down on system
|
||||
overhead. However, this also makes it even more susceptible to races,
|
||||
especially if the cache or statCache objects are reused between glob
|
||||
calls.
|
||||
|
||||
Users are thus advised not to use a glob result as a guarantee of
|
||||
filesystem state in the face of rapid changes. For the vast majority
|
||||
of operations, this is never a problem.
|
||||
|
||||
## Glob Logo
|
||||
Glob's logo was created by [Tanya Brassie](http://tanyabrassie.com/). Logo files can be found [here](https://github.com/isaacs/node-glob/tree/master/logo).
|
||||
|
||||
The logo is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).
|
||||
|
||||
## Contributing
|
||||
|
||||
Any change to behavior (including bugfixes) must come with a test.
|
||||
|
||||
Patches that fail tests or reduce performance will be rejected.
|
||||
|
||||
```
|
||||
# to run tests
|
||||
npm test
|
||||
|
||||
# to re-generate test fixtures
|
||||
npm run test-regen
|
||||
|
||||
# to benchmark against bash/zsh
|
||||
npm run bench
|
||||
|
||||
# to profile javascript
|
||||
npm run prof
|
||||
```
|
||||
|
||||
![](oh-my-glob.gif)
|
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
142
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
142
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,142 @@
|
|||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
164
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
164
components/circulargauge/node_modules/@angular-devkit/build-angular/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,164 @@
|
|||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
npm install tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
yarn add tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
bower install tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 3.9.2 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 3.8.4 or earlier
|
||||
jspm install tslib@^1
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
- Choose your new version number
|
||||
- Set it in `package.json` and `bower.json`
|
||||
- Create a tag: `git tag [version]`
|
||||
- Push the tag: `git push --tags`
|
||||
- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
|
||||
- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
|
||||
|
||||
Done.
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
34
components/circulargauge/node_modules/@angular-devkit/build-webpack/README.md
сгенерированный
поставляемый
Normal file
34
components/circulargauge/node_modules/@angular-devkit/build-webpack/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Webpack Builder for Architect
|
||||
|
||||
This package allows you to run Webpack and Webpack Dev Server using Architect.
|
||||
|
||||
To use it on your Angular CLI app, follow these steps:
|
||||
|
||||
- run `npm install @angular-devkit/build-webpack`.
|
||||
- create a webpack configuration.
|
||||
- add the following targets inside `angular.json`.
|
||||
|
||||
```
|
||||
"projects": {
|
||||
"app": {
|
||||
// ...
|
||||
"architect": {
|
||||
// ...
|
||||
"build-webpack": {
|
||||
"builder": "@angular-devkit/build-webpack:webpack",
|
||||
"options": {
|
||||
"webpackConfig": "webpack.config.js"
|
||||
}
|
||||
},
|
||||
"serve-webpack": {
|
||||
"builder": "@angular-devkit/build-webpack:webpack-dev-server",
|
||||
"options": {
|
||||
"webpackConfig": "webpack.config.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- run `ng run app:build-webpack` to build, and `ng run app:serve-webpack` to serve.
|
||||
|
||||
All options, including `watch` and `stats`, are looked up inside the webpack configuration.
|
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
142
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
142
components/circulargauge/node_modules/@angular-devkit/build-webpack/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,142 @@
|
|||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
167
components/circulargauge/node_modules/@angular-devkit/core/README.md
сгенерированный
поставляемый
Normal file
167
components/circulargauge/node_modules/@angular-devkit/core/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,167 @@
|
|||
# Core
|
||||
|
||||
> Shared utilities for Angular DevKit.
|
||||
|
||||
# Exception
|
||||
|
||||
# Json
|
||||
|
||||
## Schema
|
||||
|
||||
### SchemaValidatorResult
|
||||
|
||||
```
|
||||
export interface SchemaValidatorResult {
|
||||
success: boolean;
|
||||
errors?: string[];
|
||||
}
|
||||
```
|
||||
|
||||
### SchemaValidator
|
||||
|
||||
```
|
||||
export interface SchemaValidator {
|
||||
(data: any): Observable<SchemaValidatorResult>;
|
||||
}
|
||||
```
|
||||
|
||||
### SchemaFormatter
|
||||
|
||||
```
|
||||
export interface SchemaFormatter {
|
||||
readonly async: boolean;
|
||||
validate(data: any): boolean | Observable<boolean>;
|
||||
}
|
||||
```
|
||||
|
||||
### SchemaRegistry
|
||||
|
||||
```
|
||||
export interface SchemaRegistry {
|
||||
compile(schema: Object): Observable<SchemaValidator>;
|
||||
addFormat(name: string, formatter: SchemaFormatter): void;
|
||||
}
|
||||
```
|
||||
|
||||
### CoreSchemaRegistry
|
||||
|
||||
`SchemaRegistry` implementation using https://github.com/epoberezkin/ajv.
|
||||
Constructor accepts object containing `SchemaFormatter` that will be added automatically.
|
||||
|
||||
```
|
||||
export class CoreSchemaRegistry implements SchemaRegistry {
|
||||
constructor(formats: { [name: string]: SchemaFormatter} = {}) {}
|
||||
}
|
||||
```
|
||||
|
||||
# Logger
|
||||
|
||||
# Utils
|
||||
|
||||
# Virtual FS
|
||||
|
||||
# Workspaces
|
||||
|
||||
The `workspaces` namespace provides an API for interacting with the workspace file formats.
|
||||
It provides an abstraction of the underlying storage format of the workspace and provides
|
||||
support for both reading and writing. Currently, the only supported format is the JSON-based
|
||||
format used by the Angular CLI. For this format, the API provides internal change tracking of values which
|
||||
enables fine-grained updates to the underlying storage of the workspace. This allows for the
|
||||
retention of existing formatting and comments.
|
||||
|
||||
A workspace is defined via the following object model. Definition collection objects are specialized
|
||||
Javascript `Map` objects with an additional `add` method to simplify addition and provide more localized
|
||||
error checking of the newly added values.
|
||||
|
||||
```ts
|
||||
export interface WorkspaceDefinition {
|
||||
readonly extensions: Record<string, JsonValue | undefined>;
|
||||
readonly projects: ProjectDefinitionCollection;
|
||||
}
|
||||
|
||||
export interface ProjectDefinition {
|
||||
readonly extensions: Record<string, JsonValue | undefined>;
|
||||
readonly targets: TargetDefinitionCollection;
|
||||
root: string;
|
||||
prefix?: string;
|
||||
sourceRoot?: string;
|
||||
}
|
||||
|
||||
export interface TargetDefinition {
|
||||
options?: Record<string, JsonValue | undefined>;
|
||||
configurations?: Record<string, Record<string, JsonValue | undefined> | undefined>;
|
||||
builder: string;
|
||||
}
|
||||
```
|
||||
|
||||
The API is asynchronous and has two main functions to facilitate reading, creation, and modifying
|
||||
a workspace: `readWorkspace` and `writeWorkspace`.
|
||||
|
||||
```ts
|
||||
export enum WorkspaceFormat {
|
||||
JSON,
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
export function readWorkspace(
|
||||
path: string,
|
||||
host: WorkspaceHost,
|
||||
format?: WorkspaceFormat,
|
||||
): Promise<{ workspace: WorkspaceDefinition }>;
|
||||
```
|
||||
|
||||
```ts
|
||||
export function writeWorkspace(
|
||||
workspace: WorkspaceDefinition,
|
||||
host: WorkspaceHost,
|
||||
path?: string,
|
||||
format?: WorkspaceFormat,
|
||||
): Promise<void>;
|
||||
```
|
||||
|
||||
A `WorkspaceHost` abstracts the underlying data access methods from the functions. It provides
|
||||
methods to read, write, and analyze paths. A utility function is provided to create
|
||||
an instance of a `WorkspaceHost` from the Angular DevKit's virtual filesystem host abstraction.
|
||||
|
||||
```ts
|
||||
export interface WorkspaceHost {
|
||||
readFile(path: string): Promise<string>;
|
||||
writeFile(path: string, data: string): Promise<void>;
|
||||
isDirectory(path: string): Promise<boolean>;
|
||||
isFile(path: string): Promise<boolean>;
|
||||
}
|
||||
|
||||
export function createWorkspaceHost(host: virtualFs.Host): WorkspaceHost;
|
||||
```
|
||||
|
||||
## Usage Example
|
||||
|
||||
To demonstrate the usage of the API, the following code will show how to add a option property
|
||||
to a build target for an application.
|
||||
|
||||
```ts
|
||||
import { NodeJsSyncHost } from '@angular-devkit/core/node';
|
||||
import { workspaces } from '@angular-devkit/core';
|
||||
|
||||
async function demonstrate() {
|
||||
const host = workspaces.createWorkspaceHost(new NodeJsSyncHost());
|
||||
const { workspace } = await workspaces.readWorkspace('path/to/workspace/directory/', host);
|
||||
|
||||
const project = workspace.projects.get('my-app');
|
||||
if (!project) {
|
||||
throw new Error('my-app does not exist');
|
||||
}
|
||||
|
||||
const buildTarget = project.targets.get('build');
|
||||
if (!buildTarget) {
|
||||
throw new Error('build target does not exist');
|
||||
}
|
||||
|
||||
buildTarget.options.optimization = true;
|
||||
|
||||
await workspaces.writeWorkspace(workspace, host);
|
||||
}
|
||||
|
||||
demonstrate();
|
||||
```
|
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/_esm2015/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/_esm5/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
147
components/circulargauge/node_modules/@angular-devkit/core/node_modules/rxjs/src/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,147 @@
|
|||
# <img src="docs_app/assets/Rx_Logo_S.png" alt="RxJS Logo" width="86" height="86"> RxJS: Reactive Extensions For JavaScript
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x.svg?style=svg)](https://circleci.com/gh/ReactiveX/rxjs/tree/6.x)
|
||||
[![npm version](https://badge.fury.io/js/%40reactivex%2Frxjs.svg)](http://badge.fury.io/js/%40reactivex%2Frxjs)
|
||||
[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
# RxJS 6 Stable
|
||||
|
||||
### MIGRATION AND RELEASE INFORMATION:
|
||||
|
||||
Find out how to update to v6, **automatically update your TypeScript code**, and more!
|
||||
|
||||
- [Current home is MIGRATION.md](./docs_app/content/guide/v6/migration.md)
|
||||
|
||||
### FOR V 5.X PLEASE GO TO [THE 5.0 BRANCH](https://github.com/ReactiveX/rxjs/tree/5.x)
|
||||
|
||||
Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface.
|
||||
|
||||
[Apache 2.0 License](LICENSE.txt)
|
||||
|
||||
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
- [Contribution Guidelines](CONTRIBUTING.md)
|
||||
- [Maintainer Guidelines](doc_app/content/maintainer-guidelines.md)
|
||||
- [API Documentation](https://rxjs.dev/)
|
||||
|
||||
## Versions In This Repository
|
||||
|
||||
- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current, unreleased work, which is against v6 of RxJS right now
|
||||
- [stable](https://github.com/ReactiveX/rxjs/commits/stable) - This is the branch for the latest version you'd get if you do `npm install rxjs`
|
||||
|
||||
## Important
|
||||
|
||||
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### ES6 via npm
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. And you can pull in any operator you need from one spot, under `'rxjs/operators'`.
|
||||
|
||||
```ts
|
||||
import { range } from "rxjs";
|
||||
import { map, filter } from "rxjs/operators";
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
Here, we're using the built-in `pipe` method on Observables to combine operators. See [pipeable operators](https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md) for more information.
|
||||
|
||||
### CommonJS via npm
|
||||
|
||||
To install this library for CommonJS (CJS) usage, use the following command:
|
||||
|
||||
```sh
|
||||
npm install rxjs
|
||||
```
|
||||
|
||||
(Note: destructuring available in Node 8+)
|
||||
|
||||
```js
|
||||
const { range } = require('rxjs');
|
||||
const { map, filter } = require('rxjs/operators');
|
||||
|
||||
range(1, 200).pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
).subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
For CDN, you can use [unpkg](https://unpkg.com/):
|
||||
|
||||
https://unpkg.com/rxjs/bundles/rxjs.umd.min.js
|
||||
|
||||
The global namespace for rxjs is `rxjs`:
|
||||
|
||||
```js
|
||||
const { range } = rxjs;
|
||||
const { map, filter } = rxjs.operators;
|
||||
|
||||
range(1, 200)
|
||||
.pipe(
|
||||
filter(x => x % 2 === 1),
|
||||
map(x => x + x)
|
||||
)
|
||||
.subscribe(x => console.log(x));
|
||||
```
|
||||
|
||||
## Goals
|
||||
|
||||
- Smaller overall bundles sizes
|
||||
- Provide better performance than preceding versions of RxJS
|
||||
- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable
|
||||
- Provide more modular file structure in a variety of formats
|
||||
- Provide more debuggable call stacks than preceding versions of RxJS
|
||||
|
||||
## Building/Testing
|
||||
|
||||
- `npm run build_all` - builds everything
|
||||
- `npm test` - runs tests
|
||||
- `npm run test_no_cache` - run test with `ts-node` set to false
|
||||
|
||||
## Performance Tests
|
||||
|
||||
Run `npm run build_perf` or `npm run perf` to run the performance tests with `protractor`.
|
||||
|
||||
Run `npm run perf_micro [operator]` to run micro performance test benchmarking operator.
|
||||
|
||||
## Adding documentation
|
||||
|
||||
We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app).
|
||||
|
||||
## Generating PNG marble diagrams
|
||||
|
||||
The script `npm run tests2png` requires some native packages installed locally: `imagemagick`, `graphicsmagick`, and `ghostscript`.
|
||||
|
||||
For Mac OS X with [Homebrew](http://brew.sh/):
|
||||
|
||||
- `brew install imagemagick`
|
||||
- `brew install graphicsmagick`
|
||||
- `brew install ghostscript`
|
||||
- You may need to install the Ghostscript fonts manually:
|
||||
- Download the tarball from the [gs-fonts project](https://sourceforge.net/projects/gs-fonts)
|
||||
- `mkdir -p /usr/local/share/ghostscript && tar zxvf /path/to/ghostscript-fonts.tar.gz -C /usr/local/share/ghostscript`
|
||||
|
||||
For Debian Linux:
|
||||
|
||||
- `sudo add-apt-repository ppa:dhor/myway`
|
||||
- `apt-get install imagemagick`
|
||||
- `apt-get install graphicsmagick`
|
||||
- `apt-get install ghostscript`
|
||||
|
||||
For Windows and other Operating Systems, check the download instructions here:
|
||||
|
||||
- http://imagemagick.org
|
||||
- http://www.graphicsmagick.org
|
||||
- http://www.ghostscript.com/
|
142
components/circulargauge/node_modules/@angular-devkit/core/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
142
components/circulargauge/node_modules/@angular-devkit/core/node_modules/tslib/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,142 @@
|
|||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
510
components/circulargauge/node_modules/@angular-devkit/core/src/experimental/jobs/README.md
сгенерированный
поставляемый
Normal file
510
components/circulargauge/node_modules/@angular-devkit/core/src/experimental/jobs/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,510 @@
|
|||
# Description
|
||||
|
||||
Jobs is the Angular DevKit subsystem for scheduling and running generic functions with clearly
|
||||
typed inputs and outputs. A `Job` instance is a function associated with metadata. You can
|
||||
schedule a job, synchronize it with other jobs, and use it to schedule other jobs.
|
||||
|
||||
The whole API is serializable, allowing you to use a Node Stream or message channel to
|
||||
communicate between the job and the job scheduler.
|
||||
|
||||
Jobs are lazy, cold, and guaranteed to execute exactly once when scheduled. Subscribing to a job
|
||||
returns messages from the point where the job is at.
|
||||
|
||||
## Argument, Input, Output and Channels
|
||||
|
||||
A job receives a single argument when scheduled and can also listen to an input channel. It can
|
||||
emit multiple outputs, and can also provide multiple output channels that emit asynchronous JSON
|
||||
messages, which can be typed.
|
||||
|
||||
The I/O model is like that of an executable, where the argument corresponds to arguments on the
|
||||
command line, the input channel to STDIN, the output channel to STDOUT, and the channels
|
||||
would be additional output streams.
|
||||
|
||||
## LifeCycle
|
||||
|
||||
A `Job` goes through multiple LifeCycle messages before its completion;
|
||||
|
||||
1. `JobState.Queued`. The job was queued and is waiting. This is the default state from the
|
||||
scheduler.
|
||||
1. `JobState.Ready`. The job's dependencies (see
|
||||
["Synchronizing and Dependencies"](#Dependencies)) are done running, the argument is
|
||||
validated, and the job is ready to execute.
|
||||
1. `JobState.Started`. The argument has been validated, the job has been called and is running.
|
||||
This is handled by the job itself (or `createJobHandler()`).
|
||||
1. `JobState.Ended`. The job has ended and is done running. This is handled by the job itself (or
|
||||
`createJobHandler()`).
|
||||
1. `JobState.Errored`. A unrecoverable error happened.
|
||||
|
||||
Each state (except `Queued`) corresponds to a `JobOutboundMessage` on the `outboundBus` observable
|
||||
that triggers the state change. The `Scheduler` emits the `Ready` and `Errored` messages; the job
|
||||
implementation should not emit them, and if it does they are filtered out. You can listen for
|
||||
these messages or use the corresponding state member.
|
||||
|
||||
The job implementation should emit the `Start` and `End` messages when it is starting the job logic
|
||||
itself. Only the first `Start` and `End` messages will be forwarded. Any more will be filtered out.
|
||||
|
||||
The `Queued` state is set as the job is scheduled, so there is no need to listen for the message.
|
||||
|
||||
## `Job<OutputType>` Object
|
||||
|
||||
The `Job` object that is returned when you schedule a job provides access to the job's status and
|
||||
utilities for tracking and modifying the job.
|
||||
|
||||
1. `id`. A unique symbol that can be used as a Map key.
|
||||
1. `description`. The description of the job from the scheduler. See `JobDescription` object.
|
||||
1. `argument`. The argument value that was used to start the job.
|
||||
1. `input`. An `Observer` that can be used to send validated inputs to the job itself.
|
||||
1. `output`. An `Observable<OutputType>` that filters out messages to get only the returned output
|
||||
of a job.
|
||||
1. `promise`. A promise that waits for the last output of a job. Returns the last value outputted
|
||||
(or no value if there's no last value).
|
||||
1. `state`. The current state of the job (see `LifeCycle`).
|
||||
1. `channels`. A map of side channels the user can listen to as `Observable`.
|
||||
1. `ping()`. A function that can be used to ping the job, receiving a `Promise` for when the ping
|
||||
is answered.
|
||||
1. `stop()`. Sends a `stop` input to the job, which suggests to stop the job. The job itself can
|
||||
choose to ignore this message.
|
||||
1. `inboundBus`. The raw input `Observer<JobInboundMessage>`. This can be used to send messages to
|
||||
the `context.inboundBus` observable in the job. These are `JobInboundMessage` messages. See
|
||||
["Communicating With Jobs"](#Communicating).
|
||||
1. `outboundBus`. The raw output `Observable<JobOutput>`. This can be used to listen to messages
|
||||
from the job. See ["Communicating With Jobs"](#Communicating).
|
||||
|
||||
## `JobHandlerContext<I, O>` Object
|
||||
|
||||
The `JobHandlerContext<>` is passed to the job handler code in addition to its argument. The
|
||||
context contains the following members:
|
||||
|
||||
1. `description`. The description of the job. Its name and schemas.
|
||||
1. `scheduler`. A `Scheduler<>` instance that can be used to create additional jobs.
|
||||
1. `dependencies`. A generic list of other job instances that were run as dependencies when
|
||||
scheduling this job. Their `id` is not guaranteed to match the `id` of the `Job<>` instance
|
||||
itself (those `Job<>`s might just be proxies). The state of those `Job<>` is guaranteed to be
|
||||
`JobState.Ended`, as `JobState.Errored` would have prevented this handler from running.
|
||||
1. `inboundBus`. The raw input observable, complement of the `inboundBus` observer from the `Job<>`.
|
||||
|
||||
# Examples
|
||||
|
||||
An example of a job that adds all input together and return the output value. We use a
|
||||
simple synchronous job registry and a simple job scheduler.
|
||||
|
||||
```typescript
|
||||
import { jobs } from '@angular-devkit/core';
|
||||
|
||||
const add = jobs.createJobHandle<number[], number>((input) =>
|
||||
input.reduce((total, curr) => total + curr, 0),
|
||||
);
|
||||
|
||||
// Register the job in a SimpleJobRegistry. Different registries have different API.
|
||||
const registry = new jobs.SimpleJobRegistry();
|
||||
const scheduler = new jobs.SimpleScheduler(registry);
|
||||
registry.register(add, {
|
||||
name: 'add',
|
||||
input: { type: 'array', items: { type: 'number' } },
|
||||
output: { type: 'number' },
|
||||
});
|
||||
|
||||
scheduler
|
||||
.schedule('add', [1, 2, 3, 4])
|
||||
.promise.then((output) => console.log('1 + 2 + 3 + 4 is ' + output));
|
||||
```
|
||||
|
||||
# Creating Jobs
|
||||
|
||||
A job is at its core a function with a description object attached to it. The description object
|
||||
stores the JSON schemas used to validate the types of the argument passed in, the input and
|
||||
output values. By default, a job accepts and can output any JSON object.
|
||||
|
||||
```typescript
|
||||
import { Observable } from 'rxjs';
|
||||
import { jobs } from '@angular-devkit/core';
|
||||
|
||||
const argument = {
|
||||
type: 'array',
|
||||
items: { type: 'number' },
|
||||
};
|
||||
const output = {
|
||||
type: 'number',
|
||||
};
|
||||
|
||||
export function add(argument: number[]): Observable<jobs.JobOutboundMessage<number>> {
|
||||
return new Observable((o) => {
|
||||
o.next({ kind: jobs.JobOutboundMessageKind.Start });
|
||||
o.next({
|
||||
kind: jobs.JobOutboundMessageKind.Output,
|
||||
output: argument.reduce((total, curr) => total + curr, 0),
|
||||
});
|
||||
o.next({ kind: jobs.JobOutboundMessageKind.End });
|
||||
o.complete();
|
||||
});
|
||||
}
|
||||
|
||||
// Add a property to `add` to make it officially a JobHandler. The Job system does not recognize
|
||||
// any function as a JobHandler.
|
||||
add.jobDescription = {
|
||||
argument: argument,
|
||||
output: output,
|
||||
};
|
||||
|
||||
// Call the job with an array as argument, and log its output.
|
||||
declare const scheduler: jobs.Scheduler;
|
||||
scheduler.schedule('add', [1, 2, 3, 4]).output.subscribe((x) => console.log(x)); // Will output 10.
|
||||
```
|
||||
|
||||
This is a lot of boilerplate, so we made some helpers to improve readability and manage argument,
|
||||
input and output automatically:
|
||||
|
||||
```typescript
|
||||
// Add is a JobHandler function, like the above.
|
||||
export const add = jobs.createJobHandler<number[], number>((argument) =>
|
||||
argument.reduce((total, curr) => total + curr, 0),
|
||||
);
|
||||
|
||||
// Schedule like above.
|
||||
```
|
||||
|
||||
You can also return a Promise or an Observable, as jobs are asynchronous. This helper will set
|
||||
start and end messages appropriately. It will also manage channels automatically (see below).
|
||||
|
||||
A more complex job can be declared like this:
|
||||
|
||||
```typescript
|
||||
import { Observable } from 'rxjs';
|
||||
import { jobs } from '@angular-devkit/core';
|
||||
|
||||
// Show progress with each count in a separate output channel. Output "more" in a channel.
|
||||
export const count = jobs.createJobHandler<number, number>(
|
||||
// Receive a context that contains additional methods to create channels.
|
||||
(argument: number, { createChannel }) =>
|
||||
new Observable<number>((o) => {
|
||||
const side = createChannel('side', { type: 'string', const: 'more' });
|
||||
const progress = createChannel('progress', { type: 'number' });
|
||||
let i = 0;
|
||||
function doCount() {
|
||||
o.next(i++);
|
||||
progress.next(i / argument);
|
||||
side.next('more');
|
||||
|
||||
if (i < argument) {
|
||||
setTimeout(doCount, 100);
|
||||
} else {
|
||||
o.complete();
|
||||
}
|
||||
}
|
||||
setTimeout(doCount, 100);
|
||||
}),
|
||||
{
|
||||
argument: { type: 'number' },
|
||||
output: { type: 'number' },
|
||||
},
|
||||
);
|
||||
|
||||
// Get a hold of a scheduler that refers to the job above.
|
||||
declare const scheduler: jobs.Scheduler;
|
||||
|
||||
const job = scheduler.schedule('count', 0);
|
||||
job.getChannel('side').subscribe((x) => console.log(x));
|
||||
// You can type a channel too. Messages will be filtered out.
|
||||
job
|
||||
.getChannel<number>('progress', { type: 'number' })
|
||||
.subscribe((x) => console.log(x));
|
||||
```
|
||||
|
||||
## <a name="Communicating"></a>Communicating With Jobs
|
||||
|
||||
Jobs can be started and updated in a separate process or thread, and as such communication with a
|
||||
job should avoid using global objects (which might not be shared). The jobs API and schedulers
|
||||
provide 2 communication streams (one for input and the other for output), named `inboundBus` and
|
||||
`outboundBus`.
|
||||
|
||||
### Raw Input Stream
|
||||
|
||||
The `schedule()` function returns a `Job<>` interface that contains a `inboundBus` member of type
|
||||
`Observer<JobInboundMessage>`. All messages sent _to_ the job goes through this stream. The `kind`
|
||||
member of the `JobInboundMessage` interface dictates what kind of message it is sending:
|
||||
|
||||
1. `JobInboundMessageKind.Ping`. A simple message that should be answered with
|
||||
`JobOutboundMessageKind.Pong` when the job is responsive. The `id` field of the message should
|
||||
be used when returning `Pong`.
|
||||
1. `JobInboundMessageKind.Stop`. The job should be stopped. This is used when
|
||||
cancelling/unsubscribing from the `output` (or by calling `stop()`). Any inputs or outputs
|
||||
after this message will be ignored.
|
||||
1. `JobInboundMessageKind.Input` is used when sending inputs to a job. These correspond to the
|
||||
`next` methods of an `Observer` and are reported to the job through its `context.input`
|
||||
Observable. There is no way to communicate an error to the job.
|
||||
|
||||
Using the `createJobHandler()` helper, all those messages are automatically handled by the
|
||||
boilerplate code. If you need direct access to raw inputs, you should subscribe to the
|
||||
`context.inboundBus` Observable.
|
||||
|
||||
### Raw Output Stream
|
||||
|
||||
The `Job<>` interface also contains a `outboundBus` member (of type
|
||||
`Observable<JobOutboundMessage<O>>` where `O` is the typed output of the job) which is the output
|
||||
complement of `inboundBus`. All messages sent _from_ the job goes through this stream. The `kind`
|
||||
member of the `JobOutboundMessage<O>` interface dictates what kind of message it is sending:
|
||||
|
||||
1. `JobOutboundMessageKind.Create`. The `Job<>` was created, its dependencies are done, and the
|
||||
library is validating Argument and calling the internal job code.
|
||||
1. `JobOutboundMessageKind.Start`. The job code itself should send that message when started.
|
||||
`createJobHandler()` will do it automatically.
|
||||
1. `JobOutboundMessageKind.End`. The job has ended. This is done by the job itself and should always
|
||||
be sent when completed. The scheduler will listen to this message to set the state and unblock
|
||||
dependent jobs. `createJobHandler()` automatically send this message.
|
||||
1. `JobOutboundMessageKind.Pong`. The job should answer a `JobInboundMessageKind.Ping` message with
|
||||
this. Automatically done by `createJobHandler()`.
|
||||
1. `JobOutboundMessageKind.Output`. An `Output` has been generated by the job.
|
||||
1. `JobOutboundMessageKind.ChannelMessage`, `JobOutboundMessageKind.ChannelError` and
|
||||
`JobOutboundMessageKind.ChannelComplete` are used for output channels. These correspond to the
|
||||
`next`, `error` and `complete` methods of an `Observer` and are available to the callee through
|
||||
the `job.channels` map of Observable.
|
||||
|
||||
Those messages can be accessed directly through the `job.outboundBus` member. The job itself should
|
||||
return an `Observable<JobOutboundMessage<O>>`. The `createJobHandler()` helper handles most of use
|
||||
cases of this and makes it easier for jobs to handle this.
|
||||
|
||||
## Job Dispatchers
|
||||
|
||||
Dispatchers are a helper that redirect to different jobs given conditions. To create a job
|
||||
dispatcher, use the `createDispatcher()` function:
|
||||
|
||||
```typescript
|
||||
import { jobs } from '@angular-devkit/core';
|
||||
|
||||
// A dispatcher that installs node modules given a user's preference.
|
||||
const dispatcher = jobs.createDispatcher({
|
||||
name: 'node-install',
|
||||
argument: { properties: { moduleName: { type: 'string' } } },
|
||||
output: { type: 'boolean' },
|
||||
});
|
||||
|
||||
const npmInstall = jobs.createJobHandler(/* ... */, { name: 'npm-install' });
|
||||
const yarnInstall = jobs.createJobHandler(/* ... */, { name: 'yarn-install' });
|
||||
const pnpmInstall = jobs.createJobHandler(/* ... */, { name: 'pnpm-install' });
|
||||
|
||||
declare const registry: jobs.SimpleJobRegistry;
|
||||
registry.register(dispatcher);
|
||||
registry.register(npmInstall);
|
||||
registry.register(yarnInstall);
|
||||
registry.register(pnpmInstall);
|
||||
|
||||
// Default to npm.
|
||||
dispatcher.setDefaultDelegate(npmInstall.name);
|
||||
// If the user is asking for yarn over npm, uses it.
|
||||
dispatcher.addConditionalDelegate(() => userWantsYarn, yarnInstall.name);
|
||||
```
|
||||
|
||||
## Execution Strategy
|
||||
|
||||
Jobs are always run in parallel and will always start, but many helper functions are provided
|
||||
when creating a job to help you control the execution strategy;
|
||||
|
||||
1. `serialize()`. Multiple runs of this job will be queued with each others.
|
||||
1. `memoize(replayMessages = false)` will create a job, or reuse the same job when inputs are
|
||||
matching. If the inputs don't match, a new job will be started and its outputs will be stored.
|
||||
|
||||
These strategies can be used when creating the job:
|
||||
|
||||
```typescript
|
||||
// Same input and output as above.
|
||||
|
||||
export const add = jobs.strategy.memoize()(
|
||||
jobs.createJobHandler<number[], number>((argument) =>
|
||||
argument.reduce((total, curr) => total + curr, 0),
|
||||
),
|
||||
);
|
||||
```
|
||||
|
||||
Strategies can be reused to synchronize between jobs. For example, given jobs `jobA` and `jobB`,
|
||||
you can reuse the strategy to serialize both jobs together;
|
||||
|
||||
```typescript
|
||||
const strategy = jobs.strategy.serialize();
|
||||
const jobA = strategy(jobs.createJobHandler(...));
|
||||
const jobB = strategy(jobs.createJobHandler(...));
|
||||
```
|
||||
|
||||
Even further, we can have package A and package B run in serialization, and B and C also be
|
||||
serialized. Running A and C will run in parallel, while running B will wait for both A and C
|
||||
to finish.
|
||||
|
||||
```typescript
|
||||
const strategy1 = jobs.strategy.serialize();
|
||||
const strategy2 = jobs.strategy.serialize();
|
||||
const jobA = strategy1(jobs.createJobHandler(...));
|
||||
const jobB = strategy1(strategy2(jobs.createJobHandler(...)));
|
||||
const jobC = strategy2(jobs.createJobHandler(...));
|
||||
```
|
||||
|
||||
# Scheduling Jobs
|
||||
|
||||
Jobs can be scheduled using a `Scheduler` interface, which contains a `schedule()` method:
|
||||
|
||||
```typescript
|
||||
interface Scheduler {
|
||||
/**
|
||||
* Schedule a job to be run, using its name.
|
||||
* @param name The name of job to be run.
|
||||
* @param argument The argument to send to the job when starting it.
|
||||
* @param options Scheduling options.
|
||||
* @returns The Job being run.
|
||||
*/
|
||||
schedule<I extends MinimumInputValueT, O extends MinimumOutputValueT>(
|
||||
name: JobName,
|
||||
argument: I,
|
||||
options?: ScheduleJobOptions,
|
||||
): Job<JsonValue, O>;
|
||||
}
|
||||
```
|
||||
|
||||
The scheduler also has a `getDescription()` method to get a `JobDescription` object for a certain
|
||||
name; that description contains schemas for the argument, input, output, and other channels:
|
||||
|
||||
```typescript
|
||||
interface Scheduler {
|
||||
/**
|
||||
* Get a job description for a named job.
|
||||
*
|
||||
* @param name The name of the job.
|
||||
* @returns A description, or null if the job cannot be scheduled.
|
||||
*/
|
||||
getDescription(name: JobName): JobDescription | null;
|
||||
|
||||
/**
|
||||
* Returns true if the job name has been registered.
|
||||
* @param name The name of the job.
|
||||
* @returns True if the job exists, false otherwise.
|
||||
*/
|
||||
has(name: JobName): boolean;
|
||||
}
|
||||
```
|
||||
|
||||
Finally, the scheduler interface has a `pause()` method to stop scheduling. This will queue all
|
||||
jobs and wait for the unpause function to be called before unblocking all the jobs scheduled.
|
||||
This does not affect already running jobs.
|
||||
|
||||
```typescript
|
||||
interface Scheduler {
|
||||
/**
|
||||
* Pause the scheduler, temporary queueing _new_ jobs. Returns a resume function that should be
|
||||
* used to resume execution. If multiple `pause()` were called, all their resume functions must
|
||||
* be called before the Scheduler actually starts new jobs. Additional calls to the same resume
|
||||
* function will have no effect.
|
||||
*
|
||||
* Jobs already running are NOT paused. This is pausing the scheduler only.
|
||||
*
|
||||
* @returns A function that can be run to resume the scheduler. If multiple `pause()` calls
|
||||
* were made, all their return function must be called (in any order) before the
|
||||
* scheduler can resume.
|
||||
*/
|
||||
pause(): () => void;
|
||||
}
|
||||
```
|
||||
|
||||
## <a name="Dependencies"></a>Synchronizing and Dependencies
|
||||
|
||||
When scheduling jobs, it is often necessary to run jobs after certain other jobs are finished.
|
||||
This is done through the `dependencies` options in the `schedule()` method.
|
||||
|
||||
These jobs will also be passed to the job being scheduled, through its context. This can be
|
||||
useful if, for example, the output of those jobs are of a known type, or have known side channels.
|
||||
|
||||
An example of this would be a compiler that needs to know the output directory of other compilers
|
||||
before it, in a tool chain.
|
||||
|
||||
### Dependencies
|
||||
|
||||
When scheduling jobs, the user can add a `dependencies` field to the scheduling options. The
|
||||
scheduler will wait for those dependencies to finish before running the job, and pass those jobs
|
||||
in the context of the job.
|
||||
|
||||
### Accessing Dependencies
|
||||
|
||||
Jobs are called with a `JobHandlerContext` as a second argument, which contains a
|
||||
`dependencies: Job<JsonValue>[]` member which contains all dependencies that were used when
|
||||
scheduling the job. Those aren't fully typed as they are determined by the user, and not the job
|
||||
itself. They also can contain jobs that are not finished, and the job should use the `state`
|
||||
member of the job itself before trying to access its content.
|
||||
|
||||
### Scheduler Sub Jobs
|
||||
|
||||
The `JobHandlerContext` also contains a `scheduler` member which can be used to schedule jobs
|
||||
using the same scheduler that was used for the job. This allows jobs to call other jobs
|
||||
and wait for them to end.
|
||||
|
||||
## Available Schedulers
|
||||
|
||||
The Core Angular DevKit library provides 2 implementations for the `Scheduler` interface:
|
||||
|
||||
## SimpleJobRegistry
|
||||
|
||||
Available in the jobs namespace. A registry that accept job registration, and can also schedule
|
||||
jobs.
|
||||
|
||||
```typescript
|
||||
import { jobs } from '@angular-devkit/core';
|
||||
|
||||
const add = jobs.createJobHandler<number[], number>((argument) =>
|
||||
argument.reduce((total, curr) => total + curr, 0),
|
||||
);
|
||||
|
||||
// Register the job in a SimpleJobRegistry. Different registries have different API.
|
||||
const registry = new jobs.SimpleJobRegistry();
|
||||
const scheduler = new SimpleJobScheduler(registry);
|
||||
|
||||
registry.register(add, {
|
||||
name: 'add',
|
||||
argument: { type: 'array', items: { type: 'number' } },
|
||||
output: { type: 'number' },
|
||||
});
|
||||
|
||||
scheduler.schedule('add', [1, 2, 3, 4]);
|
||||
```
|
||||
|
||||
## NodeModuleJobRegistry
|
||||
|
||||
Available through `@angular-devkit/core/node`.
|
||||
|
||||
A scheduler that loads jobs using their node package names. These jobs need to use the
|
||||
`createJobHandler()` helper and report their argument/input/output schemas that way.
|
||||
|
||||
```typescript
|
||||
declare const registry: NodeModuleJobRegistry;
|
||||
const scheduler = new SimpleJobScheduler(registry);
|
||||
|
||||
scheduler.schedule('some-node-package#someExport', 'input');
|
||||
```
|
||||
|
||||
# Gotchas
|
||||
|
||||
1. Deadlocking Dependencies
|
||||
It is impossible to add dependencies to an already running job, but it is entirely possible to
|
||||
get locked between jobs. Be aware of your own dependencies.
|
||||
|
||||
1. Using `job.promise`
|
||||
`job.promise` waits for the job to ends. Don't rely on it unless you know the job is not
|
||||
watching and running for a long time. If you aren't sure, use
|
||||
`job.output.pipe(first()).toPromise()` instead which will return the first next output,
|
||||
regardless of whether the job watches and rerun or not.
|
||||
|
||||
# FAQ
|
||||
|
||||
1. Laziness
|
||||
A job is lazy until executed, but its messages will be replayed when resubscribed.
|
||||
|
||||
1. Serialize Strategy vs Dependencies
|
||||
Strategies are functions that transform the execution of a job, and can be used when
|
||||
declaring the job, or registering it. Dependencies, on the other hand, are listed when
|
||||
scheduling a job to order jobs during scheduling.
|
||||
|
||||
A job has no control over the way it's scheduled, and its dependencies. It can, however,
|
||||
declare that it shouldn't run at the same time as itself. Alternatively, a user could
|
||||
schedule a job twice and imply that the second run should wait for the first to finish. In
|
||||
practice, this would be equivalent to having the job be serialized, but the important detail
|
||||
is in _whom_ is defining the rules; using the `serialize()` strategy, the job implementation
|
||||
is, while when using dependencies, the user is.
|
||||
|
||||
The user does not need to know how to job needs to synchronize with itself, and the job does
|
||||
not need to know how it synchronizes with other jobs that it doesn't know about. That's part
|
||||
of the strength of this system as every job can be developed in a vacuum, only caring about
|
||||
its contracts (argument, input and output) and its own synchronization.
|
8
components/circulargauge/node_modules/@angular/animations/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/animations/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
273
components/circulargauge/node_modules/@angular/cli/README.md
сгенерированный
поставляемый
Normal file
273
components/circulargauge/node_modules/@angular/cli/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,273 @@
|
|||
## Angular CLI
|
||||
|
||||
<!-- Badges section here. -->
|
||||
|
||||
[![Dependency Status][david-badge]][david-badge-url]
|
||||
[![devDependency Status][david-dev-badge]][david-dev-badge-url]
|
||||
|
||||
[![npm](https://img.shields.io/npm/v/%40angular/cli.svg)][npm-badge-url]
|
||||
[![npm](https://img.shields.io/npm/v/%40angular/cli/next.svg)][npm-badge-url]
|
||||
[![npm](https://img.shields.io/npm/l/@angular/cli.svg)][license-url]
|
||||
[![npm](https://img.shields.io/npm/dm/@angular/cli.svg)][npm-badge-url]
|
||||
|
||||
[![Join the chat at https://gitter.im/angular/angular-cli](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/angular/angular-cli?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
[![GitHub forks](https://img.shields.io/github/forks/angular/angular-cli.svg?style=social&label=Fork)](https://github.com/angular/angular-cli/fork)
|
||||
[![GitHub stars](https://img.shields.io/github/stars/angular/angular-cli.svg?style=social&label=Star)](https://github.com/angular/angular-cli)
|
||||
|
||||
## Note
|
||||
|
||||
If you are updating from a beta or RC version, check out our [1.0 Update Guide](https://github.com/angular/angular-cli/wiki/stories-1.0-update).
|
||||
|
||||
If you wish to collaborate, check out [our issue list](https://github.com/angular/angular-cli/issues).
|
||||
|
||||
Before submitting new issues, have a look at [issues marked with the `type: faq` label](https://github.com/angular/angular-cli/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3A%22type%3A%20faq%22%20).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Both the CLI and generated project have dependencies that require Node 8.9 or higher, together
|
||||
with NPM 5.5.1 or higher.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
- [Generating a New Project](#generating-and-serving-an-angular-project-via-a-development-server)
|
||||
- [Generating Components, Directives, Pipes and Services](#generating-components-directives-pipes-and-services)
|
||||
- [Updating Angular CLI](#updating-angular-cli)
|
||||
- [Development Hints for working on Angular CLI](#development-hints-for-working-on-angular-cli)
|
||||
- [Documentation](#documentation)
|
||||
- [License](#license)
|
||||
|
||||
## Installation
|
||||
|
||||
**BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites)
|
||||
|
||||
### Install Globally
|
||||
|
||||
```bash
|
||||
npm install -g @angular/cli
|
||||
```
|
||||
|
||||
### Install Locally
|
||||
|
||||
```bash
|
||||
npm install @angular/cli
|
||||
```
|
||||
|
||||
To run a locally installed version of the angular-cli, you can call `ng` commands directly by adding the `.bin` folder within your local `node_modules` folder to your PATH. The `node_modules` and `.bin` folders are created in the directory where `npm install @angular/cli` was run upon completion of the install command.
|
||||
|
||||
Alternatively, you can install [npx](https://www.npmjs.com/package/npx) and run `npx ng <command>` within the local directory where `npm install @angular/cli` was run, which will use the locally installed angular-cli.
|
||||
|
||||
### Install Specific Version (Example: 6.1.1)
|
||||
|
||||
```bash
|
||||
npm install -g @angular/cli@6.1.1
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
ng help
|
||||
```
|
||||
|
||||
### Generating and serving an Angular project via a development server
|
||||
|
||||
```bash
|
||||
ng new PROJECT-NAME
|
||||
cd PROJECT-NAME
|
||||
ng serve
|
||||
```
|
||||
|
||||
Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
You can configure the default HTTP host and port used by the development server with two command-line options :
|
||||
|
||||
```bash
|
||||
ng serve --host 0.0.0.0 --port 4201
|
||||
```
|
||||
|
||||
### Generating Components, Directives, Pipes and Services
|
||||
|
||||
You can use the `ng generate` (or just `ng g`) command to generate Angular components:
|
||||
|
||||
```bash
|
||||
ng generate component my-new-component
|
||||
ng g component my-new-component # using the alias
|
||||
|
||||
# components support relative path generation
|
||||
# if in the directory src/app/feature/ and you run
|
||||
ng g component new-cmp
|
||||
# your component will be generated in src/app/feature/new-cmp
|
||||
# but if you were to run
|
||||
ng g component ./newer-cmp
|
||||
# your component will be generated in src/app/newer-cmp
|
||||
# if in the directory src/app you can also run
|
||||
ng g component feature/new-cmp
|
||||
# and your component will be generated in src/app/feature/new-cmp
|
||||
```
|
||||
|
||||
You can find all possible blueprints in the table below:
|
||||
|
||||
| Scaffold | Usage |
|
||||
| ------------------------------------------------------ | --------------------------------- |
|
||||
| [Component](https://angular.io/cli/generate#component) | `ng g component my-new-component` |
|
||||
| [Directive](https://angular.io/cli/generate#directive) | `ng g directive my-new-directive` |
|
||||
| [Pipe](https://angular.io/cli/generate#pipe) | `ng g pipe my-new-pipe` |
|
||||
| [Service](https://angular.io/cli/generate#service) | `ng g service my-new-service` |
|
||||
| [Class](https://angular.io/cli/generate#class) | `ng g class my-new-class` |
|
||||
| [Guard](https://angular.io/cli/generate#guard) | `ng g guard my-new-guard` |
|
||||
| [Interface](https://angular.io/cli/generate#interface) | `ng g interface my-new-interface` |
|
||||
| [Enum](https://angular.io/cli/generate#enum) | `ng g enum my-new-enum` |
|
||||
| [Module](https://angular.io/cli/generate#module) | `ng g module my-module` |
|
||||
|
||||
angular-cli will add reference to `components`, `directives` and `pipes` automatically in the `app.module.ts`. If you need to add this references to another custom module, follow these steps:
|
||||
|
||||
1. `ng g module new-module` to create a new module
|
||||
2. call `ng g component new-module/new-component`
|
||||
|
||||
This should add the new `component`, `directive` or `pipe` reference to the `new-module` you've created.
|
||||
|
||||
### Updating Angular CLI
|
||||
|
||||
If you're using Angular CLI `1.0.0-beta.28` or less, you need to uninstall `angular-cli` package. It should be done due to changing of package's name and scope from `angular-cli` to `@angular/cli`:
|
||||
|
||||
```bash
|
||||
npm uninstall -g angular-cli
|
||||
npm uninstall --save-dev angular-cli
|
||||
```
|
||||
|
||||
To update Angular CLI to a new version, you must update both the global package and your project's local package.
|
||||
|
||||
Global package:
|
||||
|
||||
```bash
|
||||
npm uninstall -g @angular/cli
|
||||
npm cache verify
|
||||
# if npm version is < 5 then use `npm cache clean`
|
||||
npm install -g @angular/cli@latest
|
||||
```
|
||||
|
||||
Local project package:
|
||||
|
||||
```bash
|
||||
rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
|
||||
npm install --save-dev @angular/cli@latest
|
||||
npm install
|
||||
```
|
||||
|
||||
If you are updating to 1.0 from a beta or RC version, check out our [1.0 Update Guide](https://github.com/angular/angular-cli/wiki/stories-1.0-update).
|
||||
|
||||
You can find more details about changes between versions in [the Releases tab on GitHub](https://github.com/angular/angular-cli/releases).
|
||||
|
||||
## Development Hints for working on Angular CLI
|
||||
|
||||
### Working with master
|
||||
|
||||
```bash
|
||||
git clone https://github.com/angular/angular-cli.git
|
||||
yarn
|
||||
npm run build
|
||||
cd dist/@angular/cli
|
||||
npm link
|
||||
```
|
||||
|
||||
`npm link` is very similar to `npm install -g` except that instead of downloading the package
|
||||
from the repo, the just built `dist/@angular/cli/` folder becomes the global package.
|
||||
Additionally, this repository publishes several packages and we use special logic to load all of them
|
||||
on development setups.
|
||||
|
||||
Any changes to the files in the `angular-cli/` folder will immediately affect the global `@angular/cli` package,
|
||||
meaning that, in order to quickly test any changes you make to the cli project, you should simply just run `npm run build`
|
||||
again.
|
||||
|
||||
Now you can use `@angular/cli` via the command line:
|
||||
|
||||
```bash
|
||||
ng new foo
|
||||
cd foo
|
||||
npm link @angular/cli
|
||||
ng serve
|
||||
```
|
||||
|
||||
`npm link @angular/cli` is needed because by default the globally installed `@angular/cli` just loads
|
||||
the local `@angular/cli` from the project which was fetched remotely from npm.
|
||||
`npm link @angular/cli` symlinks the global `@angular/cli` package to the local `@angular/cli` package.
|
||||
Now the `angular-cli` you cloned before is in three places:
|
||||
The folder you cloned it into, npm's folder where it stores global packages and the Angular CLI project you just created.
|
||||
|
||||
You can also use `ng new foo --link-cli` to automatically link the `@angular/cli` package.
|
||||
|
||||
Please read the official [npm-link documentation](https://docs.npmjs.com/cli/link)
|
||||
and the [npm-link cheatsheet](http://browsenpm.org/help#linkinganynpmpackagelocally) for more information.
|
||||
|
||||
To run the Angular CLI E2E test suite, use the `node ./tests/legacy-cli/run_e2e` command.
|
||||
It can also receive a filename to only run that test (e.g. `node ./tests/legacy-cli/run_e2e tests/legacy-cli/e2e/tests/build/dev-build.ts`).
|
||||
|
||||
As part of the test procedure, all packages will be built and linked.
|
||||
You will need to re-run `npm link` to re-link the development Angular CLI environment after tests finish.
|
||||
|
||||
### Debugging with VS Code
|
||||
|
||||
In order to debug some Angular CLI behaviour using Visual Studio Code, you can run `npm run build`, and then use a launch configuration like the following:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "ng serve",
|
||||
"cwd": "<path to an Angular project generated with Angular-CLI>",
|
||||
"program": "${workspaceFolder}/dist/@angular/cli/bin/ng",
|
||||
"args": [
|
||||
"<ng command>",
|
||||
...other arguments
|
||||
],
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
```
|
||||
|
||||
Then you can add breakpoints in `dist/@angular` files.
|
||||
|
||||
For more informations about Node.js debugging in VS Code, see the related [VS Code Documentation](https://code.visualstudio.com/docs/nodejs/nodejs-debugging).
|
||||
|
||||
### CPU Profiling
|
||||
|
||||
In order to investigate performance issues, CPU profiling is often useful.
|
||||
|
||||
To capture a CPU profiling, you can:
|
||||
|
||||
1. install the v8-profiler-node8 dependency: `npm install v8-profiler-node8 --no-save`
|
||||
1. set the NG_CLI_PROFILING Environment variable to the file name you want:
|
||||
- on Unix systems (Linux & Mac OS X): ̀`export NG_CLI_PROFILING=my-profile`
|
||||
- on Windows: ̀̀`setx NG_CLI_PROFILING my-profile`
|
||||
|
||||
Then, just run the ng command on which you want to capture a CPU profile.
|
||||
You will then obtain a `my-profile.cpuprofile` file in the folder from which you ran the ng command.
|
||||
|
||||
You can use the Chrome Devtools to process it. To do so:
|
||||
|
||||
1. open `chrome://inspect/#devices` in Chrome
|
||||
1. click on "Open dedicated DevTools for Node"
|
||||
1. go to the "profiler" tab
|
||||
1. click on the "Load" button and select the generated .cpuprofile file
|
||||
1. on the left panel, select the associated file
|
||||
|
||||
In addition to this one, another, more elaborated way to capture a CPU profile using the Chrome Devtools is detailed in https://github.com/angular/angular-cli/issues/8259#issue-269908550.
|
||||
|
||||
## Documentation
|
||||
|
||||
The documentation for the Angular CLI is located on our [documentation website](https://angular.io/cli).
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/angular/angular-cli/blob/master/LICENSE)
|
||||
|
||||
[travis-badge]: https://travis-ci.org/angular/angular-cli.svg?branch=master
|
||||
[travis-badge-url]: https://travis-ci.org/angular/angular-cli
|
||||
[david-badge]: https://david-dm.org/angular/angular-cli.svg
|
||||
[david-badge-url]: https://david-dm.org/angular/angular-cli
|
||||
[david-dev-badge]: https://david-dm.org/angular/angular-cli/dev-status.svg
|
||||
[david-dev-badge-url]: https://david-dm.org/angular/angular-cli?type=dev
|
||||
[npm-badge]: https://img.shields.io/npm/v/@angular/cli.svg
|
||||
[npm-badge-url]: https://www.npmjs.com/package/@angular/cli
|
||||
[license-url]: https://github.com/angular/angular-cli/blob/master/LICENSE
|
8
components/circulargauge/node_modules/@angular/common/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/common/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@angular/compiler/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/compiler/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@angular/core/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/core/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@angular/forms/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/forms/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@angular/platform-browser-dynamic/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/platform-browser-dynamic/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@angular/platform-browser/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/platform-browser/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@angular/router/README.md
сгенерированный
поставляемый
Executable file
8
components/circulargauge/node_modules/@angular/router/README.md
сгенерированный
поставляемый
Executable file
|
@ -0,0 +1,8 @@
|
|||
Angular
|
||||
=======
|
||||
|
||||
The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
|
||||
|
||||
Usage information and reference details can be found in [Angular documentation](https://angular.io/docs).
|
||||
|
||||
License: MIT
|
8
components/circulargauge/node_modules/@assemblyscript/loader/README.md
сгенерированный
поставляемый
Normal file
8
components/circulargauge/node_modules/@assemblyscript/loader/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,8 @@
|
|||
# AssemblyScript Loader
|
||||
|
||||
<a href="https://www.npmjs.com/package/@assemblyscript/loader"><img src="https://img.shields.io/npm/v/@assemblyscript/loader.svg?color=0074C1" alt="npm package" /></a>
|
||||
<a href="https://www.npmjs.com/package/@assemblyscript/loader"><img src="https://img.shields.io/npm/v/@assemblyscript/loader/nightly.svg?color=0074C1" alt="npm package (nightly)" /></a>
|
||||
|
||||
A convenient loader for [AssemblyScript](https://assemblyscript.org) modules. Demangles module exports to a friendly object structure compatible with TypeScript definitions and provides useful utility to read/write data from/to memory.
|
||||
|
||||
[Documentation](https://assemblyscript.org/loader.html)
|
176
components/circulargauge/node_modules/@axe-core/playwright/README.md
сгенерированный
поставляемый
Normal file
176
components/circulargauge/node_modules/@axe-core/playwright/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,176 @@
|
|||
# @axe-core/playwright
|
||||
|
||||
> Provides a chainable axe API for playwright and automatically injects into all frames
|
||||
|
||||
## Getting Started
|
||||
|
||||
Install [Node.js](https://docs.npmjs.com/getting-started/installing-node) if you haven't already.
|
||||
|
||||
Install Playwright:
|
||||
|
||||
NPM:
|
||||
|
||||
```console
|
||||
npm install playwright
|
||||
```
|
||||
|
||||
Yarn:
|
||||
|
||||
```console
|
||||
yarn add playwright
|
||||
```
|
||||
|
||||
Install `@axe-core/playwright` and its dependencies:
|
||||
|
||||
NPM:
|
||||
|
||||
```console
|
||||
npm install @axe-core/playwright
|
||||
```
|
||||
|
||||
Yarn:
|
||||
|
||||
```console
|
||||
yarn add @axe-core/playwright
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This module uses a chainable API to assist in injecting, configuring, and analyzing axe with [Playwright](https://playwright.dev/). As such, it is required to pass an instance of Playwright.
|
||||
|
||||
Here is an example of a script that will drive Playwright to a page, perform an analysis, and then log results to the console.
|
||||
|
||||
```js
|
||||
const AxeBuilder = require('@axe-core/playwright').default;
|
||||
const playwright = require('playwright');
|
||||
|
||||
(async () => {
|
||||
const browser = await playwright.chromium.launch();
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
await page.goto('https://dequeuniversity.com/demo/mars/');
|
||||
|
||||
try {
|
||||
const results = await new AxeBuilder({ page }).analyze();
|
||||
console.log(results);
|
||||
} catch (e) {
|
||||
// do something with the error
|
||||
}
|
||||
await browser.close();
|
||||
})();
|
||||
```
|
||||
|
||||
## AxeBuilder({ page: Playwright.Page })
|
||||
|
||||
Constructor for the AxeBuilder helper. You must pass an instance of Playwright as the first argument.
|
||||
|
||||
```js
|
||||
const builder = new AxeBuilder({ page });
|
||||
```
|
||||
|
||||
### AxeBuilder#analyze(): Promise<axe.Results | Error>
|
||||
|
||||
Performs analysis and passes any encountered error and/or the result object.
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page })
|
||||
.analyze()
|
||||
.then(results => {
|
||||
console.log(results);
|
||||
})
|
||||
.catch(e => {
|
||||
// Do something with error
|
||||
});
|
||||
```
|
||||
|
||||
### AxeBuilder#include(selector: String | String[])
|
||||
|
||||
Adds a CSS selector to the list of elements to include in analysis
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).include('.results-panel');
|
||||
```
|
||||
|
||||
Method chaining is also available, add multiple CSS selectors to the list of elements to include in analysis
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page })
|
||||
.include('.selector-one')
|
||||
.include('.selector-two')
|
||||
.include('.selector-three');
|
||||
```
|
||||
|
||||
Note: arrays with more than one index when passing multiple CSS selectors are not currently supported example: ` .include(['#foo', '#bar', '#baz'])`
|
||||
|
||||
### AxeBuilder#exclude(selector: String | String[])
|
||||
|
||||
Add a CSS selector to the list of elements to exclude from analysis
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).exclude('.another-element');
|
||||
```
|
||||
|
||||
Method chaining is also available, add multiple CSS selectors to the list of elements to exclude from analysis
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page })
|
||||
.exclude('.selector-one')
|
||||
.exclude('.selector-two')
|
||||
.exclude('.selector-three');
|
||||
```
|
||||
|
||||
Note: arrays with more than one index when passing multiple CSS selectors are not currently supported example: ` .exclude(['#foo', '#bar', '#baz'])`
|
||||
|
||||
### AxeBuilder#options(options: [axe.RunOptions](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter))
|
||||
|
||||
Specifies options to be used by `axe.run`. Will override any other configured options. including calls to `AxeBuilder#withRules()` and `AxeBuilder#withTags()`. See [axe-core API documentation](https://github.com/dequelabs/axe-core/blob/master/doc/API.md) for information on its structure.
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).options({ checks: { 'valid-lang': ['orcish'] } });
|
||||
```
|
||||
|
||||
### AxeBuilder#withRules(rules: String|Array)
|
||||
|
||||
Limits analysis to only those with the specified rule IDs. Accepts a String of a single rule ID or an Array of multiple rule IDs. Subsequent calls to `AxeBuilder#options`, `AxeBuilder#withRules` or `AxeBuilder#withRules` will override specified options.
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).withRules('html-lang');
|
||||
```
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).withRules(['html-lang', 'image-alt']);
|
||||
```
|
||||
|
||||
### AxeBuilder#withTags(tags: String|Array)
|
||||
|
||||
Limits analysis to only those with the specified rule IDs. Accepts a String of a single tag or an Array of multiple tags. Subsequent calls to `AxeBuilder#options`, `AxeBuilder#withRules` or `AxeBuilder#withRules` will override specified options.
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).withTags('wcag2a');
|
||||
```
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).withTags(['wcag2a', 'wcag2aa']);
|
||||
```
|
||||
|
||||
### AxeBuilder#disableRules(rules: String|Array)
|
||||
|
||||
Skips verification of the rules provided. Accepts a String of a single rule ID or an Array of multiple rule IDs. Subsequent calls to `AxeBuilder#options`, `AxeBuilder#disableRules` will override specified options.
|
||||
|
||||
```js
|
||||
new AxeBuilder({ page }).disableRules('color-contrast');
|
||||
```
|
||||
|
||||
### AxeBuilder#setLegacyMode(legacyMode: boolean = true)
|
||||
|
||||
Set the frame testing method to "legacy mode". In this mode, axe will not open a blank page in which to aggregate its results. This can be used in an environment where opening a blank page is causes issues.
|
||||
|
||||
With legacy mode turned on, axe will fall back to its test solution prior to the 4.3 release, but with cross-origin frame testing disabled. The `frame-tested` rule will report which frames were untested.
|
||||
|
||||
**Important** Use of `.setLegacyMode()` is a last resort. If you find there is no other solution, please [report this as an issue](https://github.com/dequelabs/axe-core-npm/issues/).
|
||||
|
||||
```js
|
||||
const axe = new AxeBuilder({ page }).setLegacyMode();
|
||||
const result = await axe.analyze();
|
||||
axe.setLegacyMode(false); // Disables legacy mode
|
||||
```
|
169
components/circulargauge/node_modules/@axe-core/playwright/node_modules/playwright/README.md
сгенерированный
поставляемый
Normal file
169
components/circulargauge/node_modules/@axe-core/playwright/node_modules/playwright/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,169 @@
|
|||
# 🎭 Playwright
|
||||
|
||||
[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-125.0.6422.26-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-125.0.1-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->
|
||||
|
||||
## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)
|
||||
|
||||
Playwright is a framework for Web Testing and Automation. It allows testing [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.
|
||||
|
||||
| | Linux | macOS | Windows |
|
||||
| :--- | :---: | :---: | :---: |
|
||||
| Chromium <!-- GEN:chromium-version -->125.0.6422.26<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Firefox <!-- GEN:firefox-version -->125.0.1<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
|
||||
Headless execution is supported for all browsers on all platforms. Check out [system requirements](https://playwright.dev/docs/intro#system-requirements) for details.
|
||||
|
||||
Looking for Playwright for [Python](https://playwright.dev/python/docs/intro), [.NET](https://playwright.dev/dotnet/docs/intro), or [Java](https://playwright.dev/java/docs/intro)?
|
||||
|
||||
## Installation
|
||||
|
||||
Playwright has its own test runner for end-to-end tests, we call it Playwright Test.
|
||||
|
||||
### Using init command
|
||||
|
||||
The easiest way to get started with Playwright Test is to run the init command.
|
||||
|
||||
```Shell
|
||||
# Run from your project's root directory
|
||||
npm init playwright@latest
|
||||
# Or create a new project
|
||||
npm init playwright@latest new-project
|
||||
```
|
||||
|
||||
This will create a configuration file, optionally add examples, a GitHub Action workflow and a first test example.spec.ts. You can now jump directly to writing assertions section.
|
||||
|
||||
### Manually
|
||||
|
||||
Add dependency and install browsers.
|
||||
|
||||
```Shell
|
||||
npm i -D @playwright/test
|
||||
# install supported browsers
|
||||
npx playwright install
|
||||
```
|
||||
|
||||
You can optionally install only selected browsers, see [install browsers](https://playwright.dev/docs/cli#install-browsers) for more details. Or you can install no browsers at all and use existing [browser channels](https://playwright.dev/docs/browsers).
|
||||
|
||||
* [Getting started](https://playwright.dev/docs/intro)
|
||||
* [Installation configuration](https://playwright.dev/docs/installation)
|
||||
* [API reference](https://playwright.dev/docs/api/class-playwright)
|
||||
|
||||
## Capabilities
|
||||
|
||||
### Resilient • No flaky tests
|
||||
|
||||
**Auto-wait**. Playwright waits for elements to be actionable prior to performing actions. It also has a rich set of introspection events. The combination of the two eliminates the need for artificial timeouts - a primary cause of flaky tests.
|
||||
|
||||
**Web-first assertions**. Playwright assertions are created specifically for the dynamic web. Checks are automatically retried until the necessary conditions are met.
|
||||
|
||||
**Tracing**. Configure test retry strategy, capture execution trace, videos and screenshots to eliminate flakes.
|
||||
|
||||
### No trade-offs • No limits
|
||||
|
||||
Browsers run web content belonging to different origins in different processes. Playwright is aligned with the architecture of the modern browsers and runs tests out-of-process. This makes Playwright free of the typical in-process test runner limitations.
|
||||
|
||||
**Multiple everything**. Test scenarios that span multiple tabs, multiple origins and multiple users. Create scenarios with different contexts for different users and run them against your server, all in one test.
|
||||
|
||||
**Trusted events**. Hover elements, interact with dynamic controls and produce trusted events. Playwright uses real browser input pipeline indistinguishable from the real user.
|
||||
|
||||
Test frames, pierce Shadow DOM. Playwright selectors pierce shadow DOM and allow entering frames seamlessly.
|
||||
|
||||
### Full isolation • Fast execution
|
||||
|
||||
**Browser contexts**. Playwright creates a browser context for each test. Browser context is equivalent to a brand new browser profile. This delivers full test isolation with zero overhead. Creating a new browser context only takes a handful of milliseconds.
|
||||
|
||||
**Log in once**. Save the authentication state of the context and reuse it in all the tests. This bypasses repetitive log-in operations in each test, yet delivers full isolation of independent tests.
|
||||
|
||||
### Powerful Tooling
|
||||
|
||||
**[Codegen](https://playwright.dev/docs/codegen)**. Generate tests by recording your actions. Save them into any language.
|
||||
|
||||
**[Playwright inspector](https://playwright.dev/docs/inspector)**. Inspect page, generate selectors, step through the test execution, see click points and explore execution logs.
|
||||
|
||||
**[Trace Viewer](https://playwright.dev/docs/trace-viewer)**. Capture all the information to investigate the test failure. Playwright trace contains test execution screencast, live DOM snapshots, action explorer, test source and many more.
|
||||
|
||||
Looking for Playwright for [TypeScript](https://playwright.dev/docs/intro), [JavaScript](https://playwright.dev/docs/intro), [Python](https://playwright.dev/python/docs/intro), [.NET](https://playwright.dev/dotnet/docs/intro), or [Java](https://playwright.dev/java/docs/intro)?
|
||||
|
||||
## Examples
|
||||
|
||||
To learn how to run these Playwright Test examples, check out our [getting started docs](https://playwright.dev/docs/intro).
|
||||
|
||||
#### Page screenshot
|
||||
|
||||
This code snippet navigates to Playwright homepage and saves a screenshot.
|
||||
|
||||
```TypeScript
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
test('Page Screenshot', async ({ page }) => {
|
||||
await page.goto('https://playwright.dev/');
|
||||
await page.screenshot({ path: `example.png` });
|
||||
});
|
||||
```
|
||||
|
||||
#### Mobile and geolocation
|
||||
|
||||
This snippet emulates Mobile Safari on a device at given geolocation, navigates to maps.google.com, performs the action and takes a screenshot.
|
||||
|
||||
```TypeScript
|
||||
import { test, devices } from '@playwright/test';
|
||||
|
||||
test.use({
|
||||
...devices['iPhone 13 Pro'],
|
||||
locale: 'en-US',
|
||||
geolocation: { longitude: 12.492507, latitude: 41.889938 },
|
||||
permissions: ['geolocation'],
|
||||
})
|
||||
|
||||
test('Mobile and geolocation', async ({ page }) => {
|
||||
await page.goto('https://maps.google.com');
|
||||
await page.getByText('Your location').click();
|
||||
await page.waitForRequest(/.*preview\/pwa/);
|
||||
await page.screenshot({ path: 'colosseum-iphone.png' });
|
||||
});
|
||||
```
|
||||
|
||||
#### Evaluate in browser context
|
||||
|
||||
This code snippet navigates to example.com, and executes a script in the page context.
|
||||
|
||||
```TypeScript
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
test('Evaluate in browser context', async ({ page }) => {
|
||||
await page.goto('https://www.example.com/');
|
||||
const dimensions = await page.evaluate(() => {
|
||||
return {
|
||||
width: document.documentElement.clientWidth,
|
||||
height: document.documentElement.clientHeight,
|
||||
deviceScaleFactor: window.devicePixelRatio
|
||||
}
|
||||
});
|
||||
console.log(dimensions);
|
||||
});
|
||||
```
|
||||
|
||||
#### Intercept network requests
|
||||
|
||||
This code snippet sets up request routing for a page to log all network requests.
|
||||
|
||||
```TypeScript
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
test('Intercept network requests', async ({ page }) => {
|
||||
// Log and continue all network requests
|
||||
await page.route('**', route => {
|
||||
console.log(route.request().url());
|
||||
route.continue();
|
||||
});
|
||||
await page.goto('http://todomvc.com');
|
||||
});
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
* [Documentation](https://playwright.dev/docs/intro)
|
||||
* [API reference](https://playwright.dev/docs/api/class-playwright/)
|
||||
* [Contribution guide](CONTRIBUTING.md)
|
||||
* [Changelog](https://github.com/microsoft/playwright/releases)
|
19
components/circulargauge/node_modules/@babel/code-frame/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/code-frame/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/code-frame
|
||||
|
||||
> Generate errors that contain a code frame that point to source locations.
|
||||
|
||||
See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/code-frame
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/code-frame --dev
|
||||
```
|
19
components/circulargauge/node_modules/@babel/compat-data/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/compat-data/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/compat-data
|
||||
|
||||
>
|
||||
|
||||
See our website [@babel/compat-data](https://babeljs.io/docs/babel-compat-data) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/compat-data
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/compat-data
|
||||
```
|
19
components/circulargauge/node_modules/@babel/core/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/core/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/core
|
||||
|
||||
> Babel compiler core.
|
||||
|
||||
See our website [@babel/core](https://babeljs.io/docs/en/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/core
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/core --dev
|
||||
```
|
443
components/circulargauge/node_modules/@babel/core/node_modules/semver/README.md
сгенерированный
поставляемый
Normal file
443
components/circulargauge/node_modules/@babel/core/node_modules/semver/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,443 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
--rtl
|
||||
Coerce version strings right to left
|
||||
|
||||
--ltr
|
||||
Coerce version strings left to right (default)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero element in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
|
||||
are equal. Sorts in ascending order if passed to `Array.sort()`.
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `coerce(version, options)`: Coerces a string to semver if possible
|
||||
|
||||
This aims to provide a very forgiving translation of a non-semver string to
|
||||
semver. It looks for the first digit in a string, and consumes all
|
||||
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
||||
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
||||
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
||||
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
||||
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
||||
is not valid). The maximum length for any semver component considered for
|
||||
coercion is 16 characters; longer components will be ignored
|
||||
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
||||
semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
||||
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
||||
|
||||
If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||
coercible tuple that does not share an ending index with a longer coercible
|
||||
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||
any other overlapping SemVer tuple.
|
||||
|
||||
### Clean
|
||||
|
||||
* `clean(version)`: Clean a string to be a valid semver if possible
|
||||
|
||||
This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
|
||||
|
||||
ex.
|
||||
* `s.clean(' = v 2.1.5foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean(' = v 2.1.5-foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean('=v2.1.5')`: `'2.1.5'`
|
||||
* `s.clean(' =v2.1.5')`: `2.1.5`
|
||||
* `s.clean(' 2.1.5 ')`: `'2.1.5'`
|
||||
* `s.clean('~1.0.0')`: `null`
|
729
components/circulargauge/node_modules/@babel/core/node_modules/source-map/README.md
сгенерированный
поставляемый
Normal file
729
components/circulargauge/node_modules/@babel/core/node_modules/source-map/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,729 @@
|
|||
# Source Map
|
||||
|
||||
[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)
|
||||
|
||||
[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map)
|
||||
|
||||
This is a library to generate and consume the source map format
|
||||
[described here][format].
|
||||
|
||||
[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
|
||||
|
||||
## Use with Node
|
||||
|
||||
$ npm install source-map
|
||||
|
||||
## Use on the Web
|
||||
|
||||
<script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
<!-- `npm run toc` to regenerate the Table of Contents -->
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table of Contents
|
||||
|
||||
- [Examples](#examples)
|
||||
- [Consuming a source map](#consuming-a-source-map)
|
||||
- [Generating a source map](#generating-a-source-map)
|
||||
- [With SourceNode (high level API)](#with-sourcenode-high-level-api)
|
||||
- [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
|
||||
- [API](#api)
|
||||
- [SourceMapConsumer](#sourcemapconsumer)
|
||||
- [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
|
||||
- [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
|
||||
- [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
|
||||
- [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
|
||||
- [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
|
||||
- [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
|
||||
- [SourceMapGenerator](#sourcemapgenerator)
|
||||
- [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
|
||||
- [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
|
||||
- [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
|
||||
- [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
|
||||
- [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
|
||||
- [SourceNode](#sourcenode)
|
||||
- [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
|
||||
- [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
|
||||
- [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
|
||||
- [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
|
||||
- [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
|
||||
- [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
|
||||
- [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
|
||||
- [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
|
||||
- [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
|
||||
- [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Examples
|
||||
|
||||
### Consuming a source map
|
||||
|
||||
```js
|
||||
var rawSourceMap = {
|
||||
version: 3,
|
||||
file: 'min.js',
|
||||
names: ['bar', 'baz', 'n'],
|
||||
sources: ['one.js', 'two.js'],
|
||||
sourceRoot: 'http://example.com/www/js/',
|
||||
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
|
||||
};
|
||||
|
||||
var smc = new SourceMapConsumer(rawSourceMap);
|
||||
|
||||
console.log(smc.sources);
|
||||
// [ 'http://example.com/www/js/one.js',
|
||||
// 'http://example.com/www/js/two.js' ]
|
||||
|
||||
console.log(smc.originalPositionFor({
|
||||
line: 2,
|
||||
column: 28
|
||||
}));
|
||||
// { source: 'http://example.com/www/js/two.js',
|
||||
// line: 2,
|
||||
// column: 10,
|
||||
// name: 'n' }
|
||||
|
||||
console.log(smc.generatedPositionFor({
|
||||
source: 'http://example.com/www/js/two.js',
|
||||
line: 2,
|
||||
column: 10
|
||||
}));
|
||||
// { line: 2, column: 28 }
|
||||
|
||||
smc.eachMapping(function (m) {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
### Generating a source map
|
||||
|
||||
In depth guide:
|
||||
[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
|
||||
|
||||
#### With SourceNode (high level API)
|
||||
|
||||
```js
|
||||
function compile(ast) {
|
||||
switch (ast.type) {
|
||||
case 'BinaryExpression':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
[compile(ast.left), " + ", compile(ast.right)]
|
||||
);
|
||||
case 'Literal':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
String(ast.value)
|
||||
);
|
||||
// ...
|
||||
default:
|
||||
throw new Error("Bad AST");
|
||||
}
|
||||
}
|
||||
|
||||
var ast = parse("40 + 2", "add.js");
|
||||
console.log(compile(ast).toStringWithSourceMap({
|
||||
file: 'add.js'
|
||||
}));
|
||||
// { code: '40 + 2',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
||||
|
||||
#### With SourceMapGenerator (low level API)
|
||||
|
||||
```js
|
||||
var map = new SourceMapGenerator({
|
||||
file: "source-mapped.js"
|
||||
});
|
||||
|
||||
map.addMapping({
|
||||
generated: {
|
||||
line: 10,
|
||||
column: 35
|
||||
},
|
||||
source: "foo.js",
|
||||
original: {
|
||||
line: 33,
|
||||
column: 2
|
||||
},
|
||||
name: "christopher"
|
||||
});
|
||||
|
||||
console.log(map.toString());
|
||||
// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Get a reference to the module:
|
||||
|
||||
```js
|
||||
// Node.js
|
||||
var sourceMap = require('source-map');
|
||||
|
||||
// Browser builds
|
||||
var sourceMap = window.sourceMap;
|
||||
|
||||
// Inside Firefox
|
||||
const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
|
||||
```
|
||||
|
||||
### SourceMapConsumer
|
||||
|
||||
A SourceMapConsumer instance represents a parsed source map which we can query
|
||||
for information about the original file positions by giving it a file position
|
||||
in the generated source.
|
||||
|
||||
#### new SourceMapConsumer(rawSourceMap)
|
||||
|
||||
The only parameter is the raw source map (either as a string which can be
|
||||
`JSON.parse`'d, or an object). According to the spec, source maps have the
|
||||
following attributes:
|
||||
|
||||
* `version`: Which version of the source map spec this map is following.
|
||||
|
||||
* `sources`: An array of URLs to the original source files.
|
||||
|
||||
* `names`: An array of identifiers which can be referenced by individual
|
||||
mappings.
|
||||
|
||||
* `sourceRoot`: Optional. The URL root from which all sources are relative.
|
||||
|
||||
* `sourcesContent`: Optional. An array of contents of the original source files.
|
||||
|
||||
* `mappings`: A string of base64 VLQs which contain the actual mappings.
|
||||
|
||||
* `file`: Optional. The generated filename this source map is associated with.
|
||||
|
||||
```js
|
||||
var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.computeColumnSpans()
|
||||
|
||||
Compute the last column for each generated mapping. The last column is
|
||||
inclusive.
|
||||
|
||||
```js
|
||||
// Before:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
|
||||
consumer.computeColumnSpans();
|
||||
|
||||
// After:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1,
|
||||
// lastColumn: 9 },
|
||||
// { line: 2,
|
||||
// column: 10,
|
||||
// lastColumn: 19 },
|
||||
// { line: 2,
|
||||
// column: 20,
|
||||
// lastColumn: Infinity } ]
|
||||
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
|
||||
|
||||
Returns the original source, line, and column information for the generated
|
||||
source's line and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `line`: The line number in the generated source.
|
||||
|
||||
* `column`: The column number in the generated source.
|
||||
|
||||
* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
|
||||
`SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
|
||||
element that is smaller than or greater than the one we are searching for,
|
||||
respectively, if the exact element cannot be found. Defaults to
|
||||
`SourceMapConsumer.GREATEST_LOWER_BOUND`.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `source`: The original source file, or null if this information is not
|
||||
available.
|
||||
|
||||
* `line`: The line number in the original source, or null if this information is
|
||||
not available.
|
||||
|
||||
* `column`: The column number in the original source, or null if this
|
||||
information is not available.
|
||||
|
||||
* `name`: The original identifier, or null if this information is not available.
|
||||
|
||||
```js
|
||||
consumer.originalPositionFor({ line: 2, column: 10 })
|
||||
// { source: 'foo.coffee',
|
||||
// line: 2,
|
||||
// column: 2,
|
||||
// name: null }
|
||||
|
||||
consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
|
||||
// { source: null,
|
||||
// line: null,
|
||||
// column: null,
|
||||
// name: null }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
|
||||
|
||||
Returns the generated line and column information for the original source,
|
||||
line, and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source.
|
||||
|
||||
* `column`: The column number in the original source.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null.
|
||||
|
||||
* `column`: The column number in the generated source, or null.
|
||||
|
||||
```js
|
||||
consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
|
||||
// { line: 1,
|
||||
// column: 56 }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
|
||||
|
||||
Returns all generated line and column information for the original source, line,
|
||||
and column provided. If no column is provided, returns all mappings
|
||||
corresponding to a either the line we are searching for or the next closest line
|
||||
that has any mappings. Otherwise, returns all mappings corresponding to the
|
||||
given line and either the column we are searching for or the next closest column
|
||||
that has any offsets.
|
||||
|
||||
The only argument is an object with the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source.
|
||||
|
||||
* `column`: Optional. The column number in the original source.
|
||||
|
||||
and an array of objects is returned, each with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null.
|
||||
|
||||
* `column`: The column number in the generated source, or null.
|
||||
|
||||
```js
|
||||
consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.hasContentsOfAllSources()
|
||||
|
||||
Return true if we have the embedded source content for every source listed in
|
||||
the source map, false otherwise.
|
||||
|
||||
In other words, if this method returns `true`, then
|
||||
`consumer.sourceContentFor(s)` will succeed for every source `s` in
|
||||
`consumer.sources`.
|
||||
|
||||
```js
|
||||
// ...
|
||||
if (consumer.hasContentsOfAllSources()) {
|
||||
consumerReadyCallback(consumer);
|
||||
} else {
|
||||
fetchSources(consumer, consumerReadyCallback);
|
||||
}
|
||||
// ...
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
|
||||
|
||||
Returns the original source content for the source provided. The only
|
||||
argument is the URL of the original source file.
|
||||
|
||||
If the source content for the given source is not found, then an error is
|
||||
thrown. Optionally, pass `true` as the second param to have `null` returned
|
||||
instead.
|
||||
|
||||
```js
|
||||
consumer.sources
|
||||
// [ "my-cool-lib.clj" ]
|
||||
|
||||
consumer.sourceContentFor("my-cool-lib.clj")
|
||||
// "..."
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map");
|
||||
// Error: "this is not in the source map" is not in the source map
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map", true);
|
||||
// null
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
|
||||
|
||||
Iterate over each mapping between an original source/line/column and a
|
||||
generated line/column in this source map.
|
||||
|
||||
* `callback`: The function that is called with each mapping. Mappings have the
|
||||
form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
|
||||
name }`
|
||||
|
||||
* `context`: Optional. If specified, this object will be the value of `this`
|
||||
every time that `callback` is called.
|
||||
|
||||
* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
|
||||
`SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
|
||||
the mappings sorted by the generated file's line/column order or the
|
||||
original's source/line/column order, respectively. Defaults to
|
||||
`SourceMapConsumer.GENERATED_ORDER`.
|
||||
|
||||
```js
|
||||
consumer.eachMapping(function (m) { console.log(m); })
|
||||
// ...
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 1,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 1,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 2,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 2,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// ...
|
||||
```
|
||||
### SourceMapGenerator
|
||||
|
||||
An instance of the SourceMapGenerator represents a source map which is being
|
||||
built incrementally.
|
||||
|
||||
#### new SourceMapGenerator([startOfSourceMap])
|
||||
|
||||
You may pass an object with the following properties:
|
||||
|
||||
* `file`: The filename of the generated source that this source map is
|
||||
associated with.
|
||||
|
||||
* `sourceRoot`: A root for all relative URLs in this source map.
|
||||
|
||||
* `skipValidation`: Optional. When `true`, disables validation of mappings as
|
||||
they are added. This can improve performance but should be used with
|
||||
discretion, as a last resort. Even then, one should avoid using this flag when
|
||||
running tests, if possible.
|
||||
|
||||
```js
|
||||
var generator = new sourceMap.SourceMapGenerator({
|
||||
file: "my-generated-javascript-file.js",
|
||||
sourceRoot: "http://example.com/app/js/"
|
||||
});
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
|
||||
|
||||
Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
|
||||
|
||||
* `sourceMapConsumer` The SourceMap.
|
||||
|
||||
```js
|
||||
var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.addMapping(mapping)
|
||||
|
||||
Add a single mapping from original source line and column to the generated
|
||||
source's line and column for this source map being created. The mapping object
|
||||
should have the following properties:
|
||||
|
||||
* `generated`: An object with the generated line and column positions.
|
||||
|
||||
* `original`: An object with the original line and column positions.
|
||||
|
||||
* `source`: The original source file (relative to the sourceRoot).
|
||||
|
||||
* `name`: An optional original token name for this mapping.
|
||||
|
||||
```js
|
||||
generator.addMapping({
|
||||
source: "module-one.scm",
|
||||
original: { line: 128, column: 0 },
|
||||
generated: { line: 3, column: 456 }
|
||||
})
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for an original source file.
|
||||
|
||||
* `sourceFile` the URL of the original source file.
|
||||
|
||||
* `sourceContent` the content of the source file.
|
||||
|
||||
```js
|
||||
generator.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
|
||||
|
||||
Applies a SourceMap for a source file to the SourceMap.
|
||||
Each mapping to the supplied source file is rewritten using the
|
||||
supplied SourceMap. Note: The resolution for the resulting mappings
|
||||
is the minimum of this map and the supplied map.
|
||||
|
||||
* `sourceMapConsumer`: The SourceMap to be applied.
|
||||
|
||||
* `sourceFile`: Optional. The filename of the source file.
|
||||
If omitted, sourceMapConsumer.file will be used, if it exists.
|
||||
Otherwise an error will be thrown.
|
||||
|
||||
* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
|
||||
to be applied. If relative, it is relative to the SourceMap.
|
||||
|
||||
This parameter is needed when the two SourceMaps aren't in the same
|
||||
directory, and the SourceMap to be applied contains relative source
|
||||
paths. If so, those relative source paths need to be rewritten
|
||||
relative to the SourceMap.
|
||||
|
||||
If omitted, it is assumed that both SourceMaps are in the same directory,
|
||||
thus not needing any rewriting. (Supplying `'.'` has the same effect.)
|
||||
|
||||
#### SourceMapGenerator.prototype.toString()
|
||||
|
||||
Renders the source map being generated to a string.
|
||||
|
||||
```js
|
||||
generator.toString()
|
||||
// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
|
||||
```
|
||||
|
||||
### SourceNode
|
||||
|
||||
SourceNodes provide a way to abstract over interpolating and/or concatenating
|
||||
snippets of generated JavaScript source code, while maintaining the line and
|
||||
column information associated between those snippets and the original source
|
||||
code. This is useful as the final intermediate representation a compiler might
|
||||
use before outputting the generated JS and source map.
|
||||
|
||||
#### new SourceNode([line, column, source[, chunk[, name]]])
|
||||
|
||||
* `line`: The original line number associated with this source node, or null if
|
||||
it isn't associated with an original line.
|
||||
|
||||
* `column`: The original column number associated with this source node, or null
|
||||
if it isn't associated with an original column.
|
||||
|
||||
* `source`: The original source's filename; null if no filename is provided.
|
||||
|
||||
* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
|
||||
below.
|
||||
|
||||
* `name`: Optional. The original identifier.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.cpp", [
|
||||
new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
|
||||
new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
|
||||
new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
|
||||
]);
|
||||
```
|
||||
|
||||
#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
|
||||
|
||||
Creates a SourceNode from generated code and a SourceMapConsumer.
|
||||
|
||||
* `code`: The generated code
|
||||
|
||||
* `sourceMapConsumer` The SourceMap for the generated code
|
||||
|
||||
* `relativePath` The optional path that relative sources in `sourceMapConsumer`
|
||||
should be relative to.
|
||||
|
||||
```js
|
||||
var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
|
||||
var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
|
||||
consumer);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.add(chunk)
|
||||
|
||||
Add a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.add(" + ");
|
||||
node.add(otherNode);
|
||||
node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.prepend(chunk)
|
||||
|
||||
Prepend a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.prepend("/** Build Id: f783haef86324gf **/\n\n");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for a source file. This will be added to the
|
||||
`SourceMap` in the `sourcesContent` field.
|
||||
|
||||
* `sourceFile`: The filename of the source file
|
||||
|
||||
* `sourceContent`: The content of the source file
|
||||
|
||||
```js
|
||||
node.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walk(fn)
|
||||
|
||||
Walk over the tree of JS snippets in this node and its children. The walking
|
||||
function is called once for each snippet of JS and is passed that snippet and
|
||||
the its original associated source's line/column location.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.walk(function (code, loc) { console.log("WALK:", code, loc); })
|
||||
// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
|
||||
// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walkSourceContents(fn)
|
||||
|
||||
Walk over the tree of SourceNodes. The walking function is called for each
|
||||
source file content and is passed the filename and source content.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var a = new SourceNode(1, 2, "a.js", "generated from a");
|
||||
a.setSourceContent("a.js", "original a");
|
||||
var b = new SourceNode(1, 2, "b.js", "generated from b");
|
||||
b.setSourceContent("b.js", "original b");
|
||||
var c = new SourceNode(1, 2, "c.js", "generated from c");
|
||||
c.setSourceContent("c.js", "original c");
|
||||
|
||||
var node = new SourceNode(null, null, null, [a, b, c]);
|
||||
node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
|
||||
// WALK: a.js : original a
|
||||
// WALK: b.js : original b
|
||||
// WALK: c.js : original c
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.join(sep)
|
||||
|
||||
Like `Array.prototype.join` except for SourceNodes. Inserts the separator
|
||||
between each of this source node's children.
|
||||
|
||||
* `sep`: The separator.
|
||||
|
||||
```js
|
||||
var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
|
||||
var operand = new SourceNode(3, 4, "a.rs", "=");
|
||||
var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
|
||||
|
||||
var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
|
||||
var joinedNode = node.join(" ");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.replaceRight(pattern, replacement)
|
||||
|
||||
Call `String.prototype.replace` on the very right-most source snippet. Useful
|
||||
for trimming white space from the end of a source node, etc.
|
||||
|
||||
* `pattern`: The pattern to replace.
|
||||
|
||||
* `replacement`: The thing to replace the pattern with.
|
||||
|
||||
```js
|
||||
// Trim trailing white space.
|
||||
node.replaceRight(/\s*$/, "");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toString()
|
||||
|
||||
Return the string representation of this source node. Walks over the tree and
|
||||
concatenates all the various snippets together to one string.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toString()
|
||||
// 'unodostresquatro'
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
|
||||
|
||||
Returns the string representation of this tree of source nodes, plus a
|
||||
SourceMapGenerator which contains all the mappings between the generated and
|
||||
original sources.
|
||||
|
||||
The arguments are the same as those to `new SourceMapGenerator`.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toStringWithSourceMap({ file: "my-output-file.js" })
|
||||
// { code: 'unodostresquatro',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
19
components/circulargauge/node_modules/@babel/generator/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/generator/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/generator
|
||||
|
||||
> Turns an AST into code.
|
||||
|
||||
See our website [@babel/generator](https://babeljs.io/docs/en/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/generator
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/generator --dev
|
||||
```
|
729
components/circulargauge/node_modules/@babel/generator/node_modules/source-map/README.md
сгенерированный
поставляемый
Normal file
729
components/circulargauge/node_modules/@babel/generator/node_modules/source-map/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,729 @@
|
|||
# Source Map
|
||||
|
||||
[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)
|
||||
|
||||
[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map)
|
||||
|
||||
This is a library to generate and consume the source map format
|
||||
[described here][format].
|
||||
|
||||
[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
|
||||
|
||||
## Use with Node
|
||||
|
||||
$ npm install source-map
|
||||
|
||||
## Use on the Web
|
||||
|
||||
<script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
<!-- `npm run toc` to regenerate the Table of Contents -->
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table of Contents
|
||||
|
||||
- [Examples](#examples)
|
||||
- [Consuming a source map](#consuming-a-source-map)
|
||||
- [Generating a source map](#generating-a-source-map)
|
||||
- [With SourceNode (high level API)](#with-sourcenode-high-level-api)
|
||||
- [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
|
||||
- [API](#api)
|
||||
- [SourceMapConsumer](#sourcemapconsumer)
|
||||
- [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
|
||||
- [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
|
||||
- [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
|
||||
- [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
|
||||
- [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
|
||||
- [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
|
||||
- [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
|
||||
- [SourceMapGenerator](#sourcemapgenerator)
|
||||
- [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
|
||||
- [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
|
||||
- [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
|
||||
- [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
|
||||
- [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
|
||||
- [SourceNode](#sourcenode)
|
||||
- [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
|
||||
- [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
|
||||
- [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
|
||||
- [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
|
||||
- [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
|
||||
- [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
|
||||
- [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
|
||||
- [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
|
||||
- [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
|
||||
- [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
|
||||
- [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Examples
|
||||
|
||||
### Consuming a source map
|
||||
|
||||
```js
|
||||
var rawSourceMap = {
|
||||
version: 3,
|
||||
file: 'min.js',
|
||||
names: ['bar', 'baz', 'n'],
|
||||
sources: ['one.js', 'two.js'],
|
||||
sourceRoot: 'http://example.com/www/js/',
|
||||
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
|
||||
};
|
||||
|
||||
var smc = new SourceMapConsumer(rawSourceMap);
|
||||
|
||||
console.log(smc.sources);
|
||||
// [ 'http://example.com/www/js/one.js',
|
||||
// 'http://example.com/www/js/two.js' ]
|
||||
|
||||
console.log(smc.originalPositionFor({
|
||||
line: 2,
|
||||
column: 28
|
||||
}));
|
||||
// { source: 'http://example.com/www/js/two.js',
|
||||
// line: 2,
|
||||
// column: 10,
|
||||
// name: 'n' }
|
||||
|
||||
console.log(smc.generatedPositionFor({
|
||||
source: 'http://example.com/www/js/two.js',
|
||||
line: 2,
|
||||
column: 10
|
||||
}));
|
||||
// { line: 2, column: 28 }
|
||||
|
||||
smc.eachMapping(function (m) {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
### Generating a source map
|
||||
|
||||
In depth guide:
|
||||
[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
|
||||
|
||||
#### With SourceNode (high level API)
|
||||
|
||||
```js
|
||||
function compile(ast) {
|
||||
switch (ast.type) {
|
||||
case 'BinaryExpression':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
[compile(ast.left), " + ", compile(ast.right)]
|
||||
);
|
||||
case 'Literal':
|
||||
return new SourceNode(
|
||||
ast.location.line,
|
||||
ast.location.column,
|
||||
ast.location.source,
|
||||
String(ast.value)
|
||||
);
|
||||
// ...
|
||||
default:
|
||||
throw new Error("Bad AST");
|
||||
}
|
||||
}
|
||||
|
||||
var ast = parse("40 + 2", "add.js");
|
||||
console.log(compile(ast).toStringWithSourceMap({
|
||||
file: 'add.js'
|
||||
}));
|
||||
// { code: '40 + 2',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
||||
|
||||
#### With SourceMapGenerator (low level API)
|
||||
|
||||
```js
|
||||
var map = new SourceMapGenerator({
|
||||
file: "source-mapped.js"
|
||||
});
|
||||
|
||||
map.addMapping({
|
||||
generated: {
|
||||
line: 10,
|
||||
column: 35
|
||||
},
|
||||
source: "foo.js",
|
||||
original: {
|
||||
line: 33,
|
||||
column: 2
|
||||
},
|
||||
name: "christopher"
|
||||
});
|
||||
|
||||
console.log(map.toString());
|
||||
// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
Get a reference to the module:
|
||||
|
||||
```js
|
||||
// Node.js
|
||||
var sourceMap = require('source-map');
|
||||
|
||||
// Browser builds
|
||||
var sourceMap = window.sourceMap;
|
||||
|
||||
// Inside Firefox
|
||||
const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
|
||||
```
|
||||
|
||||
### SourceMapConsumer
|
||||
|
||||
A SourceMapConsumer instance represents a parsed source map which we can query
|
||||
for information about the original file positions by giving it a file position
|
||||
in the generated source.
|
||||
|
||||
#### new SourceMapConsumer(rawSourceMap)
|
||||
|
||||
The only parameter is the raw source map (either as a string which can be
|
||||
`JSON.parse`'d, or an object). According to the spec, source maps have the
|
||||
following attributes:
|
||||
|
||||
* `version`: Which version of the source map spec this map is following.
|
||||
|
||||
* `sources`: An array of URLs to the original source files.
|
||||
|
||||
* `names`: An array of identifiers which can be referenced by individual
|
||||
mappings.
|
||||
|
||||
* `sourceRoot`: Optional. The URL root from which all sources are relative.
|
||||
|
||||
* `sourcesContent`: Optional. An array of contents of the original source files.
|
||||
|
||||
* `mappings`: A string of base64 VLQs which contain the actual mappings.
|
||||
|
||||
* `file`: Optional. The generated filename this source map is associated with.
|
||||
|
||||
```js
|
||||
var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.computeColumnSpans()
|
||||
|
||||
Compute the last column for each generated mapping. The last column is
|
||||
inclusive.
|
||||
|
||||
```js
|
||||
// Before:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
|
||||
consumer.computeColumnSpans();
|
||||
|
||||
// After:
|
||||
consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1,
|
||||
// lastColumn: 9 },
|
||||
// { line: 2,
|
||||
// column: 10,
|
||||
// lastColumn: 19 },
|
||||
// { line: 2,
|
||||
// column: 20,
|
||||
// lastColumn: Infinity } ]
|
||||
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
|
||||
|
||||
Returns the original source, line, and column information for the generated
|
||||
source's line and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `line`: The line number in the generated source.
|
||||
|
||||
* `column`: The column number in the generated source.
|
||||
|
||||
* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
|
||||
`SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
|
||||
element that is smaller than or greater than the one we are searching for,
|
||||
respectively, if the exact element cannot be found. Defaults to
|
||||
`SourceMapConsumer.GREATEST_LOWER_BOUND`.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `source`: The original source file, or null if this information is not
|
||||
available.
|
||||
|
||||
* `line`: The line number in the original source, or null if this information is
|
||||
not available.
|
||||
|
||||
* `column`: The column number in the original source, or null if this
|
||||
information is not available.
|
||||
|
||||
* `name`: The original identifier, or null if this information is not available.
|
||||
|
||||
```js
|
||||
consumer.originalPositionFor({ line: 2, column: 10 })
|
||||
// { source: 'foo.coffee',
|
||||
// line: 2,
|
||||
// column: 2,
|
||||
// name: null }
|
||||
|
||||
consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
|
||||
// { source: null,
|
||||
// line: null,
|
||||
// column: null,
|
||||
// name: null }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
|
||||
|
||||
Returns the generated line and column information for the original source,
|
||||
line, and column positions provided. The only argument is an object with
|
||||
the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source.
|
||||
|
||||
* `column`: The column number in the original source.
|
||||
|
||||
and an object is returned with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null.
|
||||
|
||||
* `column`: The column number in the generated source, or null.
|
||||
|
||||
```js
|
||||
consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
|
||||
// { line: 1,
|
||||
// column: 56 }
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
|
||||
|
||||
Returns all generated line and column information for the original source, line,
|
||||
and column provided. If no column is provided, returns all mappings
|
||||
corresponding to a either the line we are searching for or the next closest line
|
||||
that has any mappings. Otherwise, returns all mappings corresponding to the
|
||||
given line and either the column we are searching for or the next closest column
|
||||
that has any offsets.
|
||||
|
||||
The only argument is an object with the following properties:
|
||||
|
||||
* `source`: The filename of the original source.
|
||||
|
||||
* `line`: The line number in the original source.
|
||||
|
||||
* `column`: Optional. The column number in the original source.
|
||||
|
||||
and an array of objects is returned, each with the following properties:
|
||||
|
||||
* `line`: The line number in the generated source, or null.
|
||||
|
||||
* `column`: The column number in the generated source, or null.
|
||||
|
||||
```js
|
||||
consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
|
||||
// [ { line: 2,
|
||||
// column: 1 },
|
||||
// { line: 2,
|
||||
// column: 10 },
|
||||
// { line: 2,
|
||||
// column: 20 } ]
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.hasContentsOfAllSources()
|
||||
|
||||
Return true if we have the embedded source content for every source listed in
|
||||
the source map, false otherwise.
|
||||
|
||||
In other words, if this method returns `true`, then
|
||||
`consumer.sourceContentFor(s)` will succeed for every source `s` in
|
||||
`consumer.sources`.
|
||||
|
||||
```js
|
||||
// ...
|
||||
if (consumer.hasContentsOfAllSources()) {
|
||||
consumerReadyCallback(consumer);
|
||||
} else {
|
||||
fetchSources(consumer, consumerReadyCallback);
|
||||
}
|
||||
// ...
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
|
||||
|
||||
Returns the original source content for the source provided. The only
|
||||
argument is the URL of the original source file.
|
||||
|
||||
If the source content for the given source is not found, then an error is
|
||||
thrown. Optionally, pass `true` as the second param to have `null` returned
|
||||
instead.
|
||||
|
||||
```js
|
||||
consumer.sources
|
||||
// [ "my-cool-lib.clj" ]
|
||||
|
||||
consumer.sourceContentFor("my-cool-lib.clj")
|
||||
// "..."
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map");
|
||||
// Error: "this is not in the source map" is not in the source map
|
||||
|
||||
consumer.sourceContentFor("this is not in the source map", true);
|
||||
// null
|
||||
```
|
||||
|
||||
#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
|
||||
|
||||
Iterate over each mapping between an original source/line/column and a
|
||||
generated line/column in this source map.
|
||||
|
||||
* `callback`: The function that is called with each mapping. Mappings have the
|
||||
form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
|
||||
name }`
|
||||
|
||||
* `context`: Optional. If specified, this object will be the value of `this`
|
||||
every time that `callback` is called.
|
||||
|
||||
* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
|
||||
`SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
|
||||
the mappings sorted by the generated file's line/column order or the
|
||||
original's source/line/column order, respectively. Defaults to
|
||||
`SourceMapConsumer.GENERATED_ORDER`.
|
||||
|
||||
```js
|
||||
consumer.eachMapping(function (m) { console.log(m); })
|
||||
// ...
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 1,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 1,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// { source: 'illmatic.js',
|
||||
// generatedLine: 2,
|
||||
// generatedColumn: 0,
|
||||
// originalLine: 2,
|
||||
// originalColumn: 0,
|
||||
// name: null }
|
||||
// ...
|
||||
```
|
||||
### SourceMapGenerator
|
||||
|
||||
An instance of the SourceMapGenerator represents a source map which is being
|
||||
built incrementally.
|
||||
|
||||
#### new SourceMapGenerator([startOfSourceMap])
|
||||
|
||||
You may pass an object with the following properties:
|
||||
|
||||
* `file`: The filename of the generated source that this source map is
|
||||
associated with.
|
||||
|
||||
* `sourceRoot`: A root for all relative URLs in this source map.
|
||||
|
||||
* `skipValidation`: Optional. When `true`, disables validation of mappings as
|
||||
they are added. This can improve performance but should be used with
|
||||
discretion, as a last resort. Even then, one should avoid using this flag when
|
||||
running tests, if possible.
|
||||
|
||||
```js
|
||||
var generator = new sourceMap.SourceMapGenerator({
|
||||
file: "my-generated-javascript-file.js",
|
||||
sourceRoot: "http://example.com/app/js/"
|
||||
});
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
|
||||
|
||||
Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
|
||||
|
||||
* `sourceMapConsumer` The SourceMap.
|
||||
|
||||
```js
|
||||
var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.addMapping(mapping)
|
||||
|
||||
Add a single mapping from original source line and column to the generated
|
||||
source's line and column for this source map being created. The mapping object
|
||||
should have the following properties:
|
||||
|
||||
* `generated`: An object with the generated line and column positions.
|
||||
|
||||
* `original`: An object with the original line and column positions.
|
||||
|
||||
* `source`: The original source file (relative to the sourceRoot).
|
||||
|
||||
* `name`: An optional original token name for this mapping.
|
||||
|
||||
```js
|
||||
generator.addMapping({
|
||||
source: "module-one.scm",
|
||||
original: { line: 128, column: 0 },
|
||||
generated: { line: 3, column: 456 }
|
||||
})
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for an original source file.
|
||||
|
||||
* `sourceFile` the URL of the original source file.
|
||||
|
||||
* `sourceContent` the content of the source file.
|
||||
|
||||
```js
|
||||
generator.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
|
||||
|
||||
Applies a SourceMap for a source file to the SourceMap.
|
||||
Each mapping to the supplied source file is rewritten using the
|
||||
supplied SourceMap. Note: The resolution for the resulting mappings
|
||||
is the minimum of this map and the supplied map.
|
||||
|
||||
* `sourceMapConsumer`: The SourceMap to be applied.
|
||||
|
||||
* `sourceFile`: Optional. The filename of the source file.
|
||||
If omitted, sourceMapConsumer.file will be used, if it exists.
|
||||
Otherwise an error will be thrown.
|
||||
|
||||
* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
|
||||
to be applied. If relative, it is relative to the SourceMap.
|
||||
|
||||
This parameter is needed when the two SourceMaps aren't in the same
|
||||
directory, and the SourceMap to be applied contains relative source
|
||||
paths. If so, those relative source paths need to be rewritten
|
||||
relative to the SourceMap.
|
||||
|
||||
If omitted, it is assumed that both SourceMaps are in the same directory,
|
||||
thus not needing any rewriting. (Supplying `'.'` has the same effect.)
|
||||
|
||||
#### SourceMapGenerator.prototype.toString()
|
||||
|
||||
Renders the source map being generated to a string.
|
||||
|
||||
```js
|
||||
generator.toString()
|
||||
// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
|
||||
```
|
||||
|
||||
### SourceNode
|
||||
|
||||
SourceNodes provide a way to abstract over interpolating and/or concatenating
|
||||
snippets of generated JavaScript source code, while maintaining the line and
|
||||
column information associated between those snippets and the original source
|
||||
code. This is useful as the final intermediate representation a compiler might
|
||||
use before outputting the generated JS and source map.
|
||||
|
||||
#### new SourceNode([line, column, source[, chunk[, name]]])
|
||||
|
||||
* `line`: The original line number associated with this source node, or null if
|
||||
it isn't associated with an original line.
|
||||
|
||||
* `column`: The original column number associated with this source node, or null
|
||||
if it isn't associated with an original column.
|
||||
|
||||
* `source`: The original source's filename; null if no filename is provided.
|
||||
|
||||
* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
|
||||
below.
|
||||
|
||||
* `name`: Optional. The original identifier.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.cpp", [
|
||||
new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
|
||||
new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
|
||||
new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
|
||||
]);
|
||||
```
|
||||
|
||||
#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
|
||||
|
||||
Creates a SourceNode from generated code and a SourceMapConsumer.
|
||||
|
||||
* `code`: The generated code
|
||||
|
||||
* `sourceMapConsumer` The SourceMap for the generated code
|
||||
|
||||
* `relativePath` The optional path that relative sources in `sourceMapConsumer`
|
||||
should be relative to.
|
||||
|
||||
```js
|
||||
var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
|
||||
var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
|
||||
consumer);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.add(chunk)
|
||||
|
||||
Add a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.add(" + ");
|
||||
node.add(otherNode);
|
||||
node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.prepend(chunk)
|
||||
|
||||
Prepend a chunk of generated JS to this source node.
|
||||
|
||||
* `chunk`: A string snippet of generated JS code, another instance of
|
||||
`SourceNode`, or an array where each member is one of those things.
|
||||
|
||||
```js
|
||||
node.prepend("/** Build Id: f783haef86324gf **/\n\n");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
|
||||
|
||||
Set the source content for a source file. This will be added to the
|
||||
`SourceMap` in the `sourcesContent` field.
|
||||
|
||||
* `sourceFile`: The filename of the source file
|
||||
|
||||
* `sourceContent`: The content of the source file
|
||||
|
||||
```js
|
||||
node.setSourceContent("module-one.scm",
|
||||
fs.readFileSync("path/to/module-one.scm"))
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walk(fn)
|
||||
|
||||
Walk over the tree of JS snippets in this node and its children. The walking
|
||||
function is called once for each snippet of JS and is passed that snippet and
|
||||
the its original associated source's line/column location.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.walk(function (code, loc) { console.log("WALK:", code, loc); })
|
||||
// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
|
||||
// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
|
||||
// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.walkSourceContents(fn)
|
||||
|
||||
Walk over the tree of SourceNodes. The walking function is called for each
|
||||
source file content and is passed the filename and source content.
|
||||
|
||||
* `fn`: The traversal function.
|
||||
|
||||
```js
|
||||
var a = new SourceNode(1, 2, "a.js", "generated from a");
|
||||
a.setSourceContent("a.js", "original a");
|
||||
var b = new SourceNode(1, 2, "b.js", "generated from b");
|
||||
b.setSourceContent("b.js", "original b");
|
||||
var c = new SourceNode(1, 2, "c.js", "generated from c");
|
||||
c.setSourceContent("c.js", "original c");
|
||||
|
||||
var node = new SourceNode(null, null, null, [a, b, c]);
|
||||
node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
|
||||
// WALK: a.js : original a
|
||||
// WALK: b.js : original b
|
||||
// WALK: c.js : original c
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.join(sep)
|
||||
|
||||
Like `Array.prototype.join` except for SourceNodes. Inserts the separator
|
||||
between each of this source node's children.
|
||||
|
||||
* `sep`: The separator.
|
||||
|
||||
```js
|
||||
var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
|
||||
var operand = new SourceNode(3, 4, "a.rs", "=");
|
||||
var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
|
||||
|
||||
var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
|
||||
var joinedNode = node.join(" ");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.replaceRight(pattern, replacement)
|
||||
|
||||
Call `String.prototype.replace` on the very right-most source snippet. Useful
|
||||
for trimming white space from the end of a source node, etc.
|
||||
|
||||
* `pattern`: The pattern to replace.
|
||||
|
||||
* `replacement`: The thing to replace the pattern with.
|
||||
|
||||
```js
|
||||
// Trim trailing white space.
|
||||
node.replaceRight(/\s*$/, "");
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toString()
|
||||
|
||||
Return the string representation of this source node. Walks over the tree and
|
||||
concatenates all the various snippets together to one string.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toString()
|
||||
// 'unodostresquatro'
|
||||
```
|
||||
|
||||
#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
|
||||
|
||||
Returns the string representation of this tree of source nodes, plus a
|
||||
SourceMapGenerator which contains all the mappings between the generated and
|
||||
original sources.
|
||||
|
||||
The arguments are the same as those to `new SourceMapGenerator`.
|
||||
|
||||
```js
|
||||
var node = new SourceNode(1, 2, "a.js", [
|
||||
new SourceNode(3, 4, "b.js", "uno"),
|
||||
"dos",
|
||||
[
|
||||
"tres",
|
||||
new SourceNode(5, 6, "c.js", "quatro")
|
||||
]
|
||||
]);
|
||||
|
||||
node.toStringWithSourceMap({ file: "my-output-file.js" })
|
||||
// { code: 'unodostresquatro',
|
||||
// map: [object SourceMapGenerator] }
|
||||
```
|
19
components/circulargauge/node_modules/@babel/helper-annotate-as-pure/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/helper-annotate-as-pure/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-annotate-as-pure
|
||||
|
||||
> Helper function to annotate paths and nodes with #__PURE__ comment
|
||||
|
||||
See our website [@babel/helper-annotate-as-pure](https://babeljs.io/docs/en/babel-helper-annotate-as-pure) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/helper-annotate-as-pure
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-annotate-as-pure --dev
|
||||
```
|
19
components/circulargauge/node_modules/@babel/helper-builder-binary-assignment-operator-visitor/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/helper-builder-binary-assignment-operator-visitor/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-builder-binary-assignment-operator-visitor
|
||||
|
||||
> Helper function to build binary assignment operator visitors
|
||||
|
||||
See our website [@babel/helper-builder-binary-assignment-operator-visitor](https://babeljs.io/docs/babel-helper-builder-binary-assignment-operator-visitor) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-builder-binary-assignment-operator-visitor
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-builder-binary-assignment-operator-visitor
|
||||
```
|
19
components/circulargauge/node_modules/@babel/helper-compilation-targets/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/helper-compilation-targets/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-compilation-targets
|
||||
|
||||
> Helper functions on Babel compilation targets
|
||||
|
||||
See our website [@babel/helper-compilation-targets](https://babeljs.io/docs/babel-helper-compilation-targets) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-compilation-targets
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-compilation-targets
|
||||
```
|
443
components/circulargauge/node_modules/@babel/helper-compilation-targets/node_modules/semver/README.md
сгенерированный
поставляемый
Normal file
443
components/circulargauge/node_modules/@babel/helper-compilation-targets/node_modules/semver/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,443 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
--rtl
|
||||
Coerce version strings right to left
|
||||
|
||||
--ltr
|
||||
Coerce version strings left to right (default)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero element in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
|
||||
are equal. Sorts in ascending order if passed to `Array.sort()`.
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `coerce(version, options)`: Coerces a string to semver if possible
|
||||
|
||||
This aims to provide a very forgiving translation of a non-semver string to
|
||||
semver. It looks for the first digit in a string, and consumes all
|
||||
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
||||
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
||||
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
||||
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
||||
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
||||
is not valid). The maximum length for any semver component considered for
|
||||
coercion is 16 characters; longer components will be ignored
|
||||
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
||||
semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
||||
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
||||
|
||||
If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||
coercible tuple that does not share an ending index with a longer coercible
|
||||
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||
any other overlapping SemVer tuple.
|
||||
|
||||
### Clean
|
||||
|
||||
* `clean(version)`: Clean a string to be a valid semver if possible
|
||||
|
||||
This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
|
||||
|
||||
ex.
|
||||
* `s.clean(' = v 2.1.5foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean(' = v 2.1.5-foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean('=v2.1.5')`: `'2.1.5'`
|
||||
* `s.clean(' =v2.1.5')`: `2.1.5`
|
||||
* `s.clean(' 2.1.5 ')`: `'2.1.5'`
|
||||
* `s.clean('~1.0.0')`: `null`
|
19
components/circulargauge/node_modules/@babel/helper-create-class-features-plugin/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/helper-create-class-features-plugin/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-create-class-features-plugin
|
||||
|
||||
> Compile class public and private fields, private methods and decorators to ES6
|
||||
|
||||
See our website [@babel/helper-create-class-features-plugin](https://babeljs.io/docs/babel-helper-create-class-features-plugin) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-create-class-features-plugin
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-create-class-features-plugin
|
||||
```
|
19
components/circulargauge/node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-annotate-as-pure/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-annotate-as-pure/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-annotate-as-pure
|
||||
|
||||
> Helper function to annotate paths and nodes with #__PURE__ comment
|
||||
|
||||
See our website [@babel/helper-annotate-as-pure](https://babeljs.io/docs/babel-helper-annotate-as-pure) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-annotate-as-pure
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-annotate-as-pure
|
||||
```
|
443
components/circulargauge/node_modules/@babel/helper-create-class-features-plugin/node_modules/semver/README.md
сгенерированный
поставляемый
Normal file
443
components/circulargauge/node_modules/@babel/helper-create-class-features-plugin/node_modules/semver/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,443 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
--rtl
|
||||
Coerce version strings right to left
|
||||
|
||||
--ltr
|
||||
Coerce version strings left to right (default)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero element in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
|
||||
are equal. Sorts in ascending order if passed to `Array.sort()`.
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `coerce(version, options)`: Coerces a string to semver if possible
|
||||
|
||||
This aims to provide a very forgiving translation of a non-semver string to
|
||||
semver. It looks for the first digit in a string, and consumes all
|
||||
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
||||
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
||||
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
||||
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
||||
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
||||
is not valid). The maximum length for any semver component considered for
|
||||
coercion is 16 characters; longer components will be ignored
|
||||
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
||||
semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
||||
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
||||
|
||||
If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||
coercible tuple that does not share an ending index with a longer coercible
|
||||
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||
any other overlapping SemVer tuple.
|
||||
|
||||
### Clean
|
||||
|
||||
* `clean(version)`: Clean a string to be a valid semver if possible
|
||||
|
||||
This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
|
||||
|
||||
ex.
|
||||
* `s.clean(' = v 2.1.5foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean(' = v 2.1.5-foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean('=v2.1.5')`: `'2.1.5'`
|
||||
* `s.clean(' =v2.1.5')`: `2.1.5`
|
||||
* `s.clean(' 2.1.5 ')`: `'2.1.5'`
|
||||
* `s.clean('~1.0.0')`: `null`
|
19
components/circulargauge/node_modules/@babel/helper-create-regexp-features-plugin/README.md
сгенерированный
поставляемый
Normal file
19
components/circulargauge/node_modules/@babel/helper-create-regexp-features-plugin/README.md
сгенерированный
поставляемый
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-create-regexp-features-plugin
|
||||
|
||||
> Compile ESNext Regular Expressions to ES5
|
||||
|
||||
See our website [@babel/helper-create-regexp-features-plugin](https://babeljs.io/docs/babel-helper-create-regexp-features-plugin) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-create-regexp-features-plugin
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-create-regexp-features-plugin
|
||||
```
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче