Compare commits

...

138 Commits

Author SHA1 Message Date
LukeHagar
b07bac6999 Bump version to 0.0.29 2023-07-18 14:20:10 +00:00
Luke Hagar
dcddc72b18 Update README.md 2023-07-18 09:18:38 -05:00
Luke Hagar
591d498f7c Update readme.md 2023-07-18 09:16:15 -05:00
Luke Hagar
b1b902eac3 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-07-18 09:10:29 -05:00
Luke Hagar
ad603e2e66 Update readme.md 2023-07-18 09:09:16 -05:00
LukeHagar
e8423d9480 Bump version to 0.0.28 2023-07-18 13:40:48 +00:00
Luke Hagar
8783e65fd0 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-07-18 08:39:31 -05:00
Luke Hagar
3a402640e1 Update bump_version.yml 2023-07-18 08:38:34 -05:00
Luke Hagar
387996f522 Merge pull request #5 from LukeHagar/dependabot/npm_and_yarn/examples/decode-uri-component-0.2.2
Bump decode-uri-component from 0.2.0 to 0.2.2 in /examples
2023-07-18 08:31:41 -05:00
dependabot[bot]
6589fbdcd1 Bump decode-uri-component from 0.2.0 to 0.2.2 in /examples
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 13:24:30 +00:00
Luke Hagar
97586f1313 Merge pull request #4 from LukeHagar/dependabot/npm_and_yarn/examples/json5-2.2.3
Bump json5 from 2.2.1 to 2.2.3 in /examples
2023-07-18 08:23:55 -05:00
Luke Hagar
041ff8984a Merge pull request #2 from LukeHagar/dependabot/npm_and_yarn/examples/semver-5.7.2
Bump semver from 5.7.1 to 5.7.2 in /examples
2023-07-18 08:23:49 -05:00
Luke Hagar
925dd2419e Merge pull request #1 from LukeHagar/dependabot/npm_and_yarn/examples/tough-cookie-4.1.3
Bump tough-cookie from 4.1.2 to 4.1.3 in /examples
2023-07-18 08:23:40 -05:00
dependabot[bot]
3df6241d0b Bump semver from 5.7.1 to 5.7.2 in /examples
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 13:22:32 +00:00
dependabot[bot]
2178a02b6d Bump json5 from 2.2.1 to 2.2.3 in /examples
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 13:22:28 +00:00
dependabot[bot]
c170ec368b Bump tough-cookie from 4.1.2 to 4.1.3 in /examples
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 13:22:27 +00:00
Luke Hagar
f1f692b8c7 bumped example versions 2023-07-18 08:21:29 -05:00
Luke Hagar
690a61d9c2 version bumps 2023-07-18 08:20:03 -05:00
GitHub Action Bot
e1c8c15d05 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 5448468461 2023-07-03 20:55:29 +00:00
GitHub Action Bot
c80882f3f7 Automated build 'Added Video transcode endpoint' typescript-axios sdk: 5448277595 2023-07-03 20:24:08 +00:00
GitHub Action Bot
1d2ad047bd Automated build 'Playing with the security parameters' typescript-axios sdk: 5161374370 2023-06-03 02:32:17 +00:00
GitHub Action Bot
bc1c4c63ec Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 5159692781 2023-06-02 21:00:09 +00:00
GitHub Action Bot
0eb55c9ca6 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 5159662646 2023-06-02 20:54:43 +00:00
GitHub Action Bot
d5eaadc4dc Automated build 'Added Progress endpoint' typescript-axios sdk: 5159386015 2023-06-02 20:15:12 +00:00
LukeHagar
eb0fd03f0d Bump version to 0.0.27 2023-05-05 18:59:56 +00:00
GitHub Action Bot
5dad6a62c6 Automated build 'Added Library Delete option' typescript-axios sdk: 4896645258 2023-05-05 18:57:55 +00:00
LukeHagar
3db513ac7d Bump version to 0.0.26 2023-04-25 02:19:26 +00:00
GitHub Action Bot
fe8f8f571b Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4792974837 2023-04-25 02:17:43 +00:00
Luke Hagar
e65a0f1719 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-19 22:48:04 -05:00
Luke Hagar
29ea6c0d75 Plex.tv works!!!! 2023-04-19 22:47:57 -05:00
LukeHagar
c5d773bf41 Bump version to 0.0.25 2023-04-20 03:43:31 +00:00
Luke Hagar
35cf322f7b Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-19 22:42:35 -05:00
Luke Hagar
1d03f750b9 Updated Plex.tv package template 2023-04-19 22:42:29 -05:00
LukeHagar
00eaf93095 Bump version to 0.0.24 2023-04-20 03:39:24 +00:00
Luke Hagar
d3a82b8467 Update bump_version.yml 2023-04-19 22:38:23 -05:00
Luke Hagar
85ce11cadc Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-19 22:27:20 -05:00
Luke Hagar
1b4f9dbf96 Update bump_version.yml 2023-04-19 22:27:13 -05:00
GitHub Action Bot
2f0a7b96d4 Automated build '' typescript-axios sdk: 4750195473 2023-04-20 03:25:13 +00:00
Luke Hagar
fa3519f1bb template files 2023-04-19 22:10:16 -05:00
Luke Hagar
8afc3f323d updated configs 2023-04-19 21:59:53 -05:00
Luke Hagar
7fd2b4ceda separated packages 2023-04-19 21:48:19 -05:00
Luke Hagar
87bb486f1f adjusting for parallel project structure 2023-04-19 21:26:38 -05:00
LukeHagar
18c735a920 Bump version to 0.0.22 2023-04-19 15:29:30 +00:00
GitHub Action Bot
331618b77a Automated build '' typescript-axios sdk: 4745116974 2023-04-19 15:28:00 +00:00
Luke Hagar
5f601ecf65 Update configuration.mustache 2023-04-19 10:27:12 -05:00
Luke Hagar
8eeef06c9c adjusting header defaults 2023-04-19 10:26:41 -05:00
LukeHagar
bc9335abcf Bump version to 0.0.21 2023-04-19 15:21:42 +00:00
GitHub Action Bot
792fedc759 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4744818290 2023-04-19 14:59:37 +00:00
GitHub Action Bot
e343455e77 Automated build 'added geoip, adjusted tags' typescript-axios sdk: 4744665738 2023-04-19 14:43:35 +00:00
GitHub Action Bot
7a7931b0d0 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4744587370 2023-04-19 14:35:42 +00:00
GitHub Action Bot
b3c26fd1a7 Automated build 'Added Photo, myPlex, and search endpoints' typescript-axios sdk: 4744497330 2023-04-19 14:27:18 +00:00
GitHub Action Bot
26fa0aef86 Automated build 'Added Schemas, Edited endpoint order in referenced spec' typescript-axios sdk: 4744017438 2023-04-19 13:40:37 +00:00
GitHub Action Bot
74ecefac8b Automated build 'Added new endpoints' typescript-axios sdk: 4738906190 2023-04-19 02:29:00 +00:00
Luke Hagar
8855195c09 Update readme.md 2023-04-18 20:27:16 -05:00
Luke Hagar
227636620e Update readme.md 2023-04-18 20:26:37 -05:00
Luke Hagar
5866739942 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 20:24:40 -05:00
Luke Hagar
0eacb0e7c4 Improving examples and intellisense 2023-04-18 20:24:34 -05:00
Luke Hagar
c0efb9a732 Update readme.md 2023-04-18 20:19:53 -05:00
Luke Hagar
71484de76e Update readme.md 2023-04-18 20:19:28 -05:00
Luke Hagar
be73efff0b Update readme.md 2023-04-18 20:12:26 -05:00
Luke Hagar
a00c394526 Update readme.md 2023-04-18 20:11:06 -05:00
Luke Hagar
3d57b22b26 Update readme.md 2023-04-18 20:10:37 -05:00
Luke Hagar
995bbedbb6 Update readme.md 2023-04-18 20:09:24 -05:00
LukeHagar
d638acb5d2 Bump version to 0.0.20 2023-04-18 21:13:34 +00:00
Luke Hagar
f87006d3e8 Update configuration.mustache 2023-04-18 16:12:34 -05:00
Luke Hagar
fcab6f2532 Update configuration.mustache 2023-04-18 16:06:36 -05:00
Luke Hagar
4c552faaf5 Update bump_version.yml 2023-04-18 16:05:39 -05:00
Luke Hagar
7ea8776750 Updated Configuration 2023-04-18 16:04:31 -05:00
GitHub Action Bot
b9487a78df Automated build 'Update plex-api-spec.yaml' typescript-axios sdk: 4736816010 2023-04-18 20:46:54 +00:00
LukeHagar
4addcb43e0 Bump version to 0.0.19 2023-04-18 20:26:13 +00:00
Luke Hagar
05444f54ad Example overhaul 2023-04-18 15:25:10 -05:00
LukeHagar
a7139cc510 Bump version to 0.0.18 2023-04-18 20:05:38 +00:00
Luke Hagar
ddbf96d1d1 Working on exports 2023-04-18 15:04:41 -05:00
LukeHagar
a40e1f6ee9 Bump version to 0.0.17 2023-04-18 19:42:16 +00:00
Luke Hagar
b37ec6d21e working on imports and exports 2023-04-18 14:39:42 -05:00
LukeHagar
b868a95db1 Bump version to 0.0.16 2023-04-18 19:21:40 +00:00
Luke Hagar
7d18553ff0 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 14:20:07 -05:00
Luke Hagar
e83d09070a examples and exports 2023-04-18 14:20:04 -05:00
LukeHagar
0794b8457e Bump version to 0.0.15 2023-04-18 18:41:24 +00:00
Luke Hagar
c6ba56222a Update bump_version.yml 2023-04-18 13:40:27 -05:00
Luke Hagar
e8f38b8d0a Update bump_version.yml 2023-04-18 13:37:21 -05:00
Luke Hagar
898fa0212d Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 13:36:06 -05:00
Luke Hagar
67a632bbc2 Update bump_version.yml 2023-04-18 13:35:57 -05:00
LukeHagar
19c72dd7d3 Bump version to 0.0.13 2023-04-18 18:32:10 +00:00
Luke Hagar
f4e18606ce Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 13:31:21 -05:00
Luke Hagar
dfb04b01ca Update bump_version.yml 2023-04-18 13:31:13 -05:00
LukeHagar
59185de71e Bump version to 0.0.12 2023-04-18 18:30:31 +00:00
Luke Hagar
ef52691a35 working on npm publish version 2023-04-18 13:29:02 -05:00
LukeHagar
5ae5c02dbf Bump version to 0.0.11 2023-04-18 18:24:35 +00:00
Luke Hagar
3da49e7178 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 13:23:51 -05:00
Luke Hagar
e8658f4d85 all in one workflow 2023-04-18 13:23:45 -05:00
LukeHagar
db5f6e554a Bump version to 0.0.10 2023-04-18 18:21:16 +00:00
Luke Hagar
05e801ee19 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 13:20:26 -05:00
Luke Hagar
b4e644b42b Update bump_version.yml 2023-04-18 13:20:20 -05:00
LukeHagar
6c27a91f07 Bump version to 0.0.9 2023-04-18 18:18:32 +00:00
Luke Hagar
abc76a4a13 Update index.mustache 2023-04-18 13:17:34 -05:00
Luke Hagar
1021fd9033 Update bump_version.yml 2023-04-18 13:16:21 -05:00
Luke Hagar
5cf4bcc6f6 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-18 13:14:11 -05:00
Luke Hagar
7c7a7acbd9 Adding examples package 2023-04-18 13:14:05 -05:00
LukeHagar
ec6c29f064 Bump version to 0.0.7 2023-04-18 18:07:31 +00:00
Luke Hagar
caa2765c5f Update package.mustache 2023-04-18 13:06:36 -05:00
LukeHagar
1ec095ed56 Bump version to 0.0.6 2023-04-18 17:59:20 +00:00
Luke Hagar
aefb6027f3 Update bump_version.yml 2023-04-18 12:57:40 -05:00
GitHub Action Bot
dc44c91c24 Automated build '' typescript-axios sdk: 4735449858 2023-04-18 17:53:45 +00:00
Luke Hagar
d6277545f3 Update package.mustache 2023-04-17 20:03:35 -05:00
Luke Hagar
bebf4d93ae cleanup 2023-04-17 15:11:29 -05:00
Luke Hagar
2b8140dc54 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-04-17 15:08:32 -05:00
Luke Hagar
7cb29166f7 Update .gitignore 2023-04-17 15:08:25 -05:00
GitHub Action Bot
ea30cd0cc5 Automated build 'Added resource parameters' typescript-axios sdk: 4725309673 2023-04-17 20:03:38 +00:00
Luke Hagar
1be0bd7858 Action and folder cleanup 2023-04-17 14:46:03 -05:00
Luke Hagar
ec8a3f7026 Update config.yaml 2023-04-17 14:09:46 -05:00
GitHub Action Bot
866ca99ca2 Automated build 'Security' typescript-axios sdk: 4723017542 2023-04-17 15:33:39 +00:00
Luke Hagar
01738e4720 adjusted project structure 2023-04-17 09:41:47 -05:00
GitHub Action Bot
d2c3838c84 Automated build 'Adjusting Headers and parameters' typescript-axios sdk: 4722224093 2023-04-17 14:14:51 +00:00
GitHub Action Bot
b57c6be086 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4695449944 2023-04-14 01:37:25 +00:00
GitHub Action Bot
747686ef12 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4695295998 2023-04-14 01:10:46 +00:00
GitHub Action Bot
7bc89004b3 Automated build 'Adjusted Required Parameters, Populated Global Parameters on all endpointss' typescript-axios sdk: 4695261283 2023-04-14 01:04:31 +00:00
GitHub Action Bot
b29457e4fb Automated build 'Update pins.yaml' typescript-axios sdk: 4682879987 2023-04-12 21:04:57 +00:00
GitHub Action Bot
8af9e78276 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4681414548 2023-04-12 18:01:00 +00:00
GitHub Action Bot
a9c96763c0 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4681161204 2023-04-12 17:27:24 +00:00
GitHub Action Bot
84942e4573 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4681041552 2023-04-12 17:13:57 +00:00
GitHub Action Bot
ab8210088d Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4680550303 2023-04-12 16:17:26 +00:00
GitHub Action Bot
49516f4698 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4680407435 2023-04-12 16:03:00 +00:00
GitHub Action Bot
0dd1acd733 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4680335894 2023-04-12 15:55:38 +00:00
GitHub Action Bot
d5d4cf625d Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4680304111 2023-04-12 15:51:52 +00:00
GitHub Action Bot
0acf65e505 Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4679704586 2023-04-12 14:51:28 +00:00
GitHub Action Bot
644d4d0e4a Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4679428838 2023-04-12 14:24:01 +00:00
GitHub Action Bot
632f8d111f Automated build 'Merge branch 'main' of https://github.com/LukeHagar/plex-api-spec' typescript-axios sdk: 4679363310 2023-04-12 14:18:12 +00:00
LukeHagar
f75d22cf6a Bump version to 0.0.5 2023-04-12 02:27:11 +00:00
GitHub Action Bot
705cd5f26b Automated build '' typescript-axios sdk: 4673951944 2023-04-12 02:25:36 +00:00
Luke Hagar
5162542903 removed paginator 2023-04-10 09:34:19 -05:00
LukeHagar
f412ddd4d5 Bump version to 0.0.4 2023-04-07 15:04:24 +00:00
Luke Hagar
3f4ea2071e Update package.json 2023-04-07 09:58:58 -05:00
Luke Hagar
76726427e2 Update bump_version.yml 2023-04-07 09:58:37 -05:00
LukeHagar
1536e4e888 Bump version to 0.0.3 2023-04-07 14:58:09 +00:00
Luke Hagar
0789f62dcf Fixed action 2023-04-07 09:55:54 -05:00
Luke Hagar
bcbd24903b removed node_modules 2023-04-07 09:36:04 -05:00
Luke Hagar
09ad25d937 gitignore and package name 2023-04-07 09:34:12 -05:00
694 changed files with 32391 additions and 1122779 deletions

View File

@@ -30,13 +30,13 @@ jobs:
- name: Build TS SDK
id: buildTS
run: |
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar -O openapi-generator-cli.jar
rm -rf sdk-output/
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o sdk-output/ --global-property skipFormModel=false --config config.yaml
rm -rf plexjs/
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o plexjs/ --global-property skipFormModel=false --config config.yaml
- name: Run npm install and build Typescript SDK
id: buildSDK
if: steps.buildTS.outcome == 'success'
run: |
cd plexjs
npm install
npm run build

View File

@@ -1,5 +1,7 @@
name: "Update Typescript SDK Version"
run-name: Update Typescript SDK Version to ${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
@@ -19,7 +21,6 @@ jobs:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Checkout API Specs Repo
uses: actions/checkout@v3
with:
@@ -54,7 +55,8 @@ jobs:
- name: Update config files with new version
id: updateVersion
run: |
yq -i '.npmVersion = "${{ github.event.inputs.version }}"' config.yaml
yq -i '.npmVersion = "${{ github.event.inputs.version }}"' sdk-resources/pms-config.yaml
yq -i '.npmVersion = "${{ github.event.inputs.version }}"' sdk-resources/plextv-config.yaml
## Update package.json file with new version
- name: Update package.json version
@@ -62,26 +64,51 @@ jobs:
if: steps.updateVersion.outcome == 'success'
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
cd sdk-output
cd plexjs
jq '.version = "${{ github.event.inputs.version }}"' package.json > package.json.tmp && mv package.json.tmp package.json
- name: Build TS SDK
id: buildTS
- name: Build PMS SDK
id: buildPMS
run: |
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.3.0/openapi-generator-cli-6.3.0.jar -O openapi-generator-cli.jar
rm -rf sdk-output/
java -jar openapi-generator-cli.jar generate -i api-specs/referenced/plex-api-spec.yaml -g typescript-axios -o sdk-output/ --global-property skipFormModel=false --config config.yaml
rm -rf plexjs/pms
java -jar openapi-generator-cli.jar generate -i api-specs/pms/pms-spec.yaml -g typescript-axios -o plexjs/pms --global-property skipFormModel=false --config sdk-resources/pms-config.yaml
- name: Build PTV SDK
id: buildPTV
if: steps.buildPMS.outcome == 'success'
run: |
rm -rf plexjs/plextv
java -jar openapi-generator-cli.jar generate -i api-specs/plextv/plextv-spec.yaml -g typescript-axios -o plexjs/plextv --global-property skipFormModel=false --config sdk-resources/plextv-config.yaml
- name: After SDK Build
id: buildSDK
if: steps.buildTS.outcome == 'success'
if: steps.buildPTV.outcome == 'success'
run: |
cd plexjs
npm install
npm run build
- name: Publish to NPM
id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./plexjs/package.json
- name: Commit changes and create new version tag
if: steps.buildSDK.outcome == 'success'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Bump version to ${{ github.event.inputs.version }}
tagging_message: ${{ github.event.inputs.version }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
draft: false
prerelease: false

View File

@@ -1,20 +0,0 @@
name: Publish SDK package to npmjs
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: 12
- run: |
npm ci
- id: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./sdk-output/package.json

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
node_modules
build
dist
api-specs
.env

Submodule api-specs deleted from fd49ee9e54

View File

@@ -1,147 +0,0 @@
import { IAxiosRetryConfig } from "axios-retry";
export interface ConfigurationParameters {
baseurl?: string;
clientId?: string;
clientSecret?: string;
accessToken?: string;
tokenUrl?: string;
}
export interface Configuration {
activeenvironment?: string;
authtype?: string;
customexporttemplatespath?: string;
customsearchtemplatespath?: string;
debug?: boolean;
environments?: {
[key: string]: Environment;
};
}
export interface Environment {
baseurl: string;
pat: Pat;
tenanturl: string;
}
export interface Pat {
clientid: string;
clientsecret: string;
}
export declare class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* parameter for clientId
*
* @type {string}
* @memberof Configuration
*/
clientId?: string;
/**
* parameter for clientSecret
*
* @type {string}
* @memberof Configuration
*/
clientSecret?: string;
/**
* parameter for clientSecret
*
* @type {string}
* @memberof Configuration
*/
/**
* parameter for oauth2 security
* @param name security name
* @param scopes oauth2 scope
* @memberof Configuration
*/
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
/**
* parameter for clientId
*
* @type {string}
* @memberof Configuration
*/
tokenUrl?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
username?: string;
/**
* parameter for basic security
*
* @type {string}
* @memberof Configuration
*/
password?: string;
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePathBeta?: string;
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePathV3?: string;
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePathV2?: string;
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePathCC?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
/**
* axios retry configuration
*
* @type {IAxiosRetryConfig}
* @memberof Configuration
*/
retriesConfig?: IAxiosRetryConfig;
constructor(param?: ConfigurationParameters);
private getParams;
private getAccessToken;
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
}

126
dist/configuration.js vendored
View File

@@ -1,126 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Configuration = void 0;
var axios_1 = require("axios");
var os = require("os");
var path = require("path");
var yaml = require("js-yaml");
var fs = require("fs");
var Configuration = /** @class */ (function () {
function Configuration(param) {
if (!param) {
param = this.getParams();
}
this.basePathBeta = param.baseurl + "/beta";
this.basePathV3 = param.baseurl + "/v3";
this.basePathV2 = param.baseurl + "/v2";
this.basePathCC = param.baseurl;
this.tokenUrl = param.tokenUrl;
this.clientId = param.clientId;
this.clientSecret = param.clientSecret;
var url = "".concat(this.tokenUrl, "?grant_type=client_credentials&client_id=").concat(this.clientId, "&client_secret=").concat(this.clientSecret);
if (!this.accessToken) {
this.accessToken = this.getAccessToken(url);
}
}
Configuration.prototype.getParams = function () {
var config = {};
try {
var homeDir = os.homedir();
var configPath = path.join(homeDir, '.sailpoint', 'config.yaml');
var doc = yaml.load(fs.readFileSync(configPath, 'utf8'));
if (doc.authtype && doc.authtype.toLowerCase() === 'pat') {
config.baseurl = doc.environments[doc.activeenvironment].baseurl;
config.clientId = doc.environments[doc.activeenvironment].pat.clientid;
config.clientSecret = doc.environments[doc.activeenvironment].pat.clientsecret;
}
}
catch (error) {
console.log('unable to find config file');
}
config.baseurl = process.env["SAIL_BASE_URL"] ? process.env["BASE_URL"] : config.baseurl;
config.clientId = process.env["SAIL_CLIENT_ID"] ? process.env["CLIENT_ID"] : config.clientId;
config.clientSecret = process.env["SAIL_CLIENT_SECRET"] ? process.env["CLIENT_SECRET"] : config.clientSecret;
config.tokenUrl = config.baseurl + '/oauth/token';
return config;
};
Configuration.prototype.getAccessToken = function (url) {
return __awaiter(this, void 0, void 0, function () {
var _a, data, status_1, error_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_b.trys.push([0, 2, , 3]);
return [4 /*yield*/, axios_1.default.post(url)];
case 1:
_a = _b.sent(), data = _a.data, status_1 = _a.status;
if (status_1 === 200) {
return [2 /*return*/, data.access_token];
}
else {
throw new Error("Unauthorized");
}
return [3 /*break*/, 3];
case 2:
error_1 = _b.sent();
console.error("Unable to fetch access token. Aborting.");
throw new Error(error_1);
case 3: return [2 /*return*/];
}
});
});
};
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
Configuration.prototype.isJsonMime = function (mime) {
var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
};
return Configuration;
}());
exports.Configuration = Configuration;
//# sourceMappingURL=configuration.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,uBAAyB;AACzB,2BAA6B;AAC7B,8BAAgC;AAChC,uBAAyB;AA+BzB;IA6GI,uBAAY,KAA+B;QAEvC,IAAI,CAAC,KAAK,EAAE;YACR,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAA;SAC3B;QAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;QAC3C,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,GAAG,KAAK,CAAA;QACvC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,GAAG,KAAK,CAAA;QACvC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAA;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACvC,IAAM,GAAG,GAAG,UAAG,IAAI,CAAC,QAAQ,sDAA4C,IAAI,CAAC,QAAQ,4BAAkB,IAAI,CAAC,YAAY,CAAE,CAAC;QAC3H,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;SAC/C;IAEL,CAAC;IAEO,iCAAS,GAAjB;QACI,IAAM,MAAM,GAA4B,EAAE,CAAA;QAC1C,IAAI;YACA,IAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAA;YAC5B,IAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAC,aAAa,CAAC,CAAA;YACjE,IAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAkB,CAAA;YAC3E,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;gBACtD,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAA;gBAChE,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAA;gBACtE,MAAM,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,YAAY,CAAA;aACjF;SACJ;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAA;SAC5C;QACD,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAA;QACxF,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAA;QAC5F,MAAM,CAAC,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAA;QAE5G,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,OAAO,GAAG,cAAc,CAAA;QAEjD,OAAO,MAAM,CAAA;IACjB,CAAC;IAEa,sCAAc,GAA5B,UAA6B,GAAW;;;;;;;wBAET,qBAAM,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAA;;wBAAtC,KAAiB,SAAqB,EAArC,IAAI,UAAA,EAAE,oBAAM;wBACnB,IAAI,QAAM,KAAK,GAAG,EAAE;4BAChB,sBAAO,IAAI,CAAC,YAAY,EAAC;yBAC5B;6BAAM;4BACH,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAA;yBAClC;;;;wBAED,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;wBAC1D,MAAM,IAAI,KAAK,CAAC,OAAK,CAAC,CAAC;;;;;KAE9B;IAGD;;;;;;;;;OASG;IACK,kCAAU,GAAjB,UAAkB,IAAY;QAC3B,IAAM,QAAQ,GAAW,IAAI,MAAM,CAAC,+DAA+D,EAAE,GAAG,CAAC,CAAC;QAC1G,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,6BAA6B,CAAC,CAAC;IAC1G,CAAC;IACL,oBAAC;AAAD,CAAC,AArLD,IAqLC;AArLY,sCAAa"}

4
dist/index.d.ts vendored
View File

@@ -1,4 +0,0 @@
export * from "./sdk-output/api";
export { Configuration, ConfigurationParameters } from "./sdk-output/configuration";
export * from "./paginator";
export * as axiosRetry from "axios-retry";

23
dist/index.js vendored
View File

@@ -1,23 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.axiosRetry = exports.Configuration = void 0;
__exportStar(require("./sdk-output/api"), exports);
var configuration_1 = require("./sdk-output/configuration");
Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return configuration_1.Configuration; } });
__exportStar(require("./paginator"), exports);
exports.axiosRetry = require("axios-retry");
//# sourceMappingURL=index.js.map

1
dist/index.js.map vendored
View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mDAAiC;AAEjC,4DAAkF;AAA1E,8GAAA,aAAa,OAAA;AAErB,8CAA4B;AAE5B,4CAAyC"}

39
dist/paginator.d.ts vendored
View File

@@ -1,39 +0,0 @@
export interface PaginationParams {
/**
* Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
* @type {number}
* @memberof AccountsApiListAccounts
*/
limit?: number;
/**
* Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
* @type {number}
* @memberof AccountsApiListAccounts
*/
offset?: number;
/**
* If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count&#x3D;true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information.
* @type {boolean}
* @memberof AccountsApiListAccounts
*/
count?: boolean;
/**
* Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **identityId**: *eq* **name**: *eq, in* **nativeIdentity**: *eq, in* **sourceId**: *eq, in* **uncorrelated**: *eq*
* @type {string}
* @memberof AccountsApiListAccounts
*/
filters?: string;
}
export interface AxiosResponse<T = any, D = any> {
data: T;
status: number;
statusText: string;
request?: any;
headers: AxiosResponseHeaders;
}
export declare type AxiosResponseHeaders = Record<string, string> & {
"set-cookie"?: string[];
};
export declare class Paginator {
static paginate<T, TResult, A extends PaginationParams>(thisArg: T, callbackFn: (this: T, args: A) => Promise<AxiosResponse<TResult[], any>>, args?: A, increment?: number): Promise<AxiosResponse<TResult[], any>>;
}

81
dist/paginator.js vendored
View File

@@ -1,81 +0,0 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Paginator = void 0;
var Paginator = /** @class */ (function () {
function Paginator() {
}
Paginator.paginate = function (thisArg, callbackFn, args, increment) {
return __awaiter(this, void 0, void 0, function () {
var params, maxLimit, modified, results;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
params = args ? args : { limit: 0, offset: 0 };
maxLimit = params && params.limit ? params.limit : 0;
if (!params.offset) {
params.offset = 0;
}
if (!increment) {
increment = 250;
}
params.limit = increment;
modified = [];
_a.label = 1;
case 1:
if (!true) return [3 /*break*/, 3];
console.log("Paginating call, offset = ".concat(params.offset));
return [4 /*yield*/, callbackFn.call(thisArg, params)];
case 2:
results = _a.sent();
modified.push.apply(modified, results.data);
if (results.data.length < increment || (params.offset >= maxLimit && maxLimit > 0)) {
results.data = modified;
return [2 /*return*/, results];
}
params.offset += increment;
return [3 /*break*/, 1];
case 3: return [2 /*return*/];
}
});
});
};
return Paginator;
}());
exports.Paginator = Paginator;
//# sourceMappingURL=paginator.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"paginator.js","sourceRoot":"","sources":["../paginator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;IAAA;IAwBA,CAAC;IAvBuB,kBAAQ,GAA5B,UAAqE,OAAU,EAAE,UAAwE,EAAE,IAAQ,EAAE,SAAkB;;;;;;wBAC/K,MAAM,GAAqB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAA;wBAC5D,QAAQ,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;wBAC1D,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;4BAChB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAA;yBACpB;wBACD,IAAI,CAAC,SAAS,EAAE;4BACZ,SAAS,GAAG,GAAG,CAAA;yBAClB;wBACD,MAAM,CAAC,KAAK,GAAG,SAAS,CAAA;wBAEpB,QAAQ,GAAc,EAAE,CAAA;;;6BACrB,IAAI;wBACP,OAAO,CAAC,GAAG,CAAC,oCAA6B,MAAM,CAAC,MAAM,CAAE,CAAC,CAAA;wBAC3C,qBAAM,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAA;;wBAAhD,OAAO,GAAG,SAAsC;wBACpD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;wBAC3C,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ,IAAI,QAAQ,GAAG,CAAC,CAAC,EAAE;4BAChF,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAA;4BACvB,sBAAO,OAAO,EAAA;yBACjB;wBACD,MAAM,CAAC,MAAM,IAAI,SAAS,CAAA;;;;;;KAEjC;IACL,gBAAC;AAAD,CAAC,AAxBD,IAwBC;AAxBY,8BAAS"}

1263
dist/sdk-output/api.d.ts vendored

File diff suppressed because it is too large Load Diff

1804
dist/sdk-output/api.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,55 +0,0 @@
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { AxiosInstance, AxiosRequestConfig } from 'axios';
export declare const BASE_PATH: string;
/**
*
* @export
*/
export declare const COLLECTION_FORMATS: {
csv: string;
ssv: string;
tsv: string;
pipes: string;
};
/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
axiosOptions: AxiosRequestConfig;
}
/**
*
* @export
* @class BaseAPI
*/
export declare class BaseAPI {
protected basePath: string;
protected axios: AxiosInstance;
protected configuration: Configuration | undefined;
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export declare class RequiredError extends Error {
field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}

View File

@@ -1,83 +0,0 @@
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
// Some imports not used depending on template conditions
// @ts-ignore
var axios_1 = require("axios");
exports.BASE_PATH = "http://10.10.10.47:32400".replace(/\/+$/, "");
/**
*
* @export
*/
exports.COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @class BaseAPI
*/
var BaseAPI = /** @class */ (function () {
function BaseAPI(configuration, basePath, axios) {
if (basePath === void 0) { basePath = exports.BASE_PATH; }
if (axios === void 0) { axios = axios_1.default; }
this.basePath = basePath;
this.axios = axios;
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
return BaseAPI;
}());
exports.BaseAPI = BaseAPI;
;
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
var RequiredError = /** @class */ (function (_super) {
__extends(RequiredError, _super);
function RequiredError(field, msg) {
var _this = _super.call(this, msg) || this;
_this.field = field;
_this.name = "RequiredError";
return _this;
}
return RequiredError;
}(Error));
exports.RequiredError = RequiredError;
//# sourceMappingURL=base.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../sdk-output/base.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;AAIH,yDAAyD;AACzD,aAAa;AACb,+BAAqF;AAExE,QAAA,SAAS,GAAG,0BAA0B,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAExE;;;GAGG;AACU,QAAA,kBAAkB,GAAG;IAC9B,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,GAAG;CACb,CAAC;AAYF;;;;GAIG;AACH;IAGI,iBAAY,aAA6B,EAAY,QAA4B,EAAY,KAAkC;QAA1E,yBAAA,EAAA,WAAmB,iBAAS;QAAY,sBAAA,EAAA,QAAuB,eAAW;QAA1E,aAAQ,GAAR,QAAQ,CAAoB;QAAY,UAAK,GAAL,KAAK,CAA6B;QAC3H,IAAI,aAAa,EAAE;YACf,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;YACnC,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;SAC3D;IACL,CAAC;IACL,cAAC;AAAD,CAAC,AATD,IASC;AATY,0BAAO;AASnB,CAAC;AAEF;;;;;GAKG;AACH;IAAmC,iCAAK;IAEpC,uBAAmB,KAAa,EAAE,GAAY;QAA9C,YACI,kBAAM,GAAG,CAAC,SACb;QAFkB,WAAK,GAAL,KAAK,CAAQ;QADhC,UAAI,GAAoB,eAAe,CAAC;;IAGxC,CAAC;IACL,oBAAC;AAAD,CAAC,AALD,CAAmC,KAAK,GAKvC;AALY,sCAAa"}

View File

@@ -1,50 +0,0 @@
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Configuration } from "./configuration";
import { RequestArgs } from "./base";
import { AxiosInstance, AxiosResponse } from 'axios';
/**
*
* @export
*/
export declare const DUMMY_BASE_URL = "https://example.com";
/**
*
* @throws {RequiredError}
* @export
*/
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
/**
*
* @export
*/
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
/**
*
* @export
*/
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
/**
*
* @export
*/
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
/**
*
* @export
*/
export declare const toPathString: (url: URL) => string;
/**
*
* @export
*/
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;

View File

@@ -1,176 +0,0 @@
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __assign = (this && this.__assign) || function () {
__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;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
var base_1 = require("./base");
var axios_retry_1 = require("axios-retry");
/**
*
* @export
*/
exports.DUMMY_BASE_URL = 'https://example.com';
/**
*
* @throws {RequiredError}
* @export
*/
var assertParamExists = function (functionName, paramName, paramValue) {
if (paramValue === null || paramValue === undefined) {
throw new base_1.RequiredError(paramName, "Required parameter ".concat(paramName, " was null or undefined when calling ").concat(functionName, "."));
}
};
exports.assertParamExists = assertParamExists;
/**
*
* @export
*/
var setApiKeyToObject = function (object, keyParamName, configuration) {
return __awaiter(this, void 0, void 0, function () {
var localVarApiKeyValue, _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
if (!(configuration && configuration.apiKey)) return [3 /*break*/, 5];
if (!(typeof configuration.apiKey === 'function')) return [3 /*break*/, 2];
return [4 /*yield*/, configuration.apiKey(keyParamName)];
case 1:
_a = _b.sent();
return [3 /*break*/, 4];
case 2: return [4 /*yield*/, configuration.apiKey];
case 3:
_a = _b.sent();
_b.label = 4;
case 4:
localVarApiKeyValue = _a;
object[keyParamName] = localVarApiKeyValue;
_b.label = 5;
case 5: return [2 /*return*/];
}
});
});
};
exports.setApiKeyToObject = setApiKeyToObject;
/**
*
* @export
*/
var setSearchParams = function (url) {
var objects = [];
for (var _i = 1; _i < arguments.length; _i++) {
objects[_i - 1] = arguments[_i];
}
var searchParams = new URLSearchParams(url.search);
for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
var object = objects_1[_a];
for (var key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (var _b = 0, _c = object[key]; _b < _c.length; _b++) {
var item = _c[_b];
searchParams.append(key, item);
}
}
else {
searchParams.set(key, object[key]);
}
}
}
url.search = searchParams.toString();
};
exports.setSearchParams = setSearchParams;
/**
*
* @export
*/
var serializeDataIfNeeded = function (value, requestOptions, configuration) {
var nonString = typeof value !== 'string';
var needsSerialization = nonString && configuration && configuration.isJsonMime
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
: nonString;
return needsSerialization
? JSON.stringify(value !== undefined ? value : {})
: (value || "");
};
exports.serializeDataIfNeeded = serializeDataIfNeeded;
/**
*
* @export
*/
var toPathString = function (url) {
return url.pathname + url.search + url.hash;
};
exports.toPathString = toPathString;
/**
*
* @export
*/
var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
return function (axios, basePath) {
if (axios === void 0) { axios = globalAxios; }
if (basePath === void 0) { basePath = BASE_PATH; }
(0, axios_retry_1.default)(globalAxios, configuration.retriesConfig);
var axiosRequestArgs = __assign(__assign({}, axiosArgs.axiosOptions), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
return axios.request(axiosRequestArgs);
};
};
exports.createRequestFunction = createRequestFunction;
//# sourceMappingURL=common.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../sdk-output/common.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,+BAAoD;AAEpD,2CAAqC;AAErC;;;GAGG;AACU,QAAA,cAAc,GAAG,qBAAqB,CAAA;AAEnD;;;;GAIG;AACI,IAAM,iBAAiB,GAAG,UAAU,YAAoB,EAAE,SAAiB,EAAE,UAAmB;IACnG,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE;QACjD,MAAM,IAAI,oBAAa,CAAC,SAAS,EAAE,6BAAsB,SAAS,iDAAuC,YAAY,MAAG,CAAC,CAAC;KAC7H;AACL,CAAC,CAAA;AAJY,QAAA,iBAAiB,qBAI7B;AAED;;;GAGG;AACI,IAAM,iBAAiB,GAAG,UAAgB,MAAW,EAAE,YAAoB,EAAE,aAA6B;;;;;;yBACzG,CAAA,aAAa,IAAI,aAAa,CAAC,MAAM,CAAA,EAArC,wBAAqC;yBACT,CAAA,OAAO,aAAa,CAAC,MAAM,KAAK,UAAU,CAAA,EAA1C,wBAA0C;oBAChE,qBAAM,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,EAAA;;oBAAxC,KAAA,SAAwC,CAAA;;wBACxC,qBAAM,aAAa,CAAC,MAAM,EAAA;;oBAA1B,KAAA,SAA0B,CAAA;;;oBAF1B,mBAAmB,KAEO;oBAChC,MAAM,CAAC,YAAY,CAAC,GAAG,mBAAmB,CAAC;;;;;;CAElD,CAAA;AAPY,QAAA,iBAAiB,qBAO7B;AAGD;;;GAGG;AACI,IAAM,eAAe,GAAG,UAAU,GAAQ;IAAE,iBAAiB;SAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;QAAjB,gCAAiB;;IAChE,IAAM,YAAY,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrD,KAAqB,UAAO,EAAP,mBAAO,EAAP,qBAAO,EAAP,IAAO,EAAE;QAAzB,IAAM,MAAM,gBAAA;QACb,KAAK,IAAM,GAAG,IAAI,MAAM,EAAE;YACtB,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC5B,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACzB,KAAmB,UAAW,EAAX,KAAA,MAAM,CAAC,GAAG,CAAC,EAAX,cAAW,EAAX,IAAW,EAAE;oBAA3B,IAAM,IAAI,SAAA;oBACX,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;iBAClC;aACJ;iBAAM;gBACH,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;aACtC;SACJ;KACJ;IACD,GAAG,CAAC,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;AACzC,CAAC,CAAA;AAfY,QAAA,eAAe,mBAe3B;AAED;;;GAGG;AACI,IAAM,qBAAqB,GAAG,UAAU,KAAU,EAAE,cAAmB,EAAE,aAA6B;IACzG,IAAM,SAAS,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC;IAC5C,IAAM,kBAAkB,GAAG,SAAS,IAAI,aAAa,IAAI,aAAa,CAAC,UAAU;QAC7E,CAAC,CAAC,aAAa,CAAC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAClE,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,kBAAkB;QACrB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;AACxB,CAAC,CAAA;AARY,QAAA,qBAAqB,yBAQjC;AAED;;;GAGG;AACI,IAAM,YAAY,GAAG,UAAU,GAAQ;IAC1C,OAAO,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,IAAI,CAAA;AAC/C,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB;AAED;;;GAGG;AACI,IAAM,qBAAqB,GAAG,UAAU,SAAsB,EAAE,WAA0B,EAAE,SAAiB,EAAE,aAA6B;IAC/I,OAAO,UAAoC,KAAkC,EAAE,QAA4B;QAAhE,sBAAA,EAAA,mBAAkC;QAAE,yBAAA,EAAA,oBAA4B;QACvG,IAAA,qBAAU,EAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;QACpD,IAAM,gBAAgB,yBAAO,SAAS,CAAC,YAAY,KAAE,GAAG,EAAE,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,KAAI,QAAQ,CAAC,GAAG,SAAS,CAAC,GAAG,GAAC,CAAC;QACjH,OAAO,KAAK,CAAC,OAAO,CAAO,gBAAgB,CAAC,CAAC;IACjD,CAAC,CAAC;AACN,CAAC,CAAA;AANY,QAAA,qBAAqB,yBAMjC"}

View File

@@ -1,65 +0,0 @@
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { IAxiosRetryConfig } from "axios-retry";
export interface ConfigurationParameters {
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
basePath?: string;
}
export declare class Configuration {
/**
* parameter for apiKey security
* @param name security name
* @memberof Configuration
*/
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
/**
* override base path
*
* @type {string}
* @memberof Configuration
*/
basePath?: string;
/**
* base options for axios calls
*
* @type {any}
* @memberof Configuration
*/
baseOptions?: any;
/**
* The FormData constructor that will be used to create multipart form data
* requests. You can inject this here so that execution environments that
* do not support the FormData class can still run the generated client.
*
* @type {new () => FormData}
*/
formDataCtor?: new () => any;
/**
* axios retry configuration
*
* @type {IAxiosRetryConfig}
* @memberof Configuration
*/
retriesConfig?: IAxiosRetryConfig;
constructor(param?: ConfigurationParameters);
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
isJsonMime(mime: string): boolean;
}

View File

@@ -1,40 +0,0 @@
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Configuration = void 0;
var Configuration = /** @class */ (function () {
function Configuration(param) {
if (param === void 0) { param = {}; }
this.apiKey = param.apiKey;
this.basePath = param.basePath;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
Configuration.prototype.isJsonMime = function (mime) {
var jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
};
return Configuration;
}());
exports.Configuration = Configuration;
//# sourceMappingURL=configuration.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../sdk-output/configuration.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAWH;IAyCI,uBAAY,KAAmC;QAAnC,sBAAA,EAAA,UAAmC;QAE3C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAEnC,CAAC;IAED;;;;;;;;;OASG;IACI,kCAAU,GAAjB,UAAkB,IAAY;QAC1B,IAAM,QAAQ,GAAW,IAAI,MAAM,CAAC,+DAA+D,EAAE,GAAG,CAAC,CAAC;QAC1G,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,6BAA6B,CAAC,CAAC;IAC1G,CAAC;IACL,oBAAC;AAAD,CAAC,AA9DD,IA8DC;AA9DY,sCAAa"}

View File

@@ -1,31 +0,0 @@
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Plex-API
* An Open API Spec for interacting with Plex.tv and Plex Servers
*
* The version of the OpenAPI document: 0.0.3
* Contact: Lukeslakemail@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./api"), exports);
//# sourceMappingURL=index.js.map

View File

@@ -1 +0,0 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../sdk-output/index.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAGH,wCAAsB"}

6
examples/.eslintignore Normal file
View File

@@ -0,0 +1,6 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
build
# don't lint nyc coverage output
coverage

19
examples/.eslintrc Normal file
View File

@@ -0,0 +1,19 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "jest"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 1,
"prettier/prettier": 2
},
"env": {
"browser": true,
"node": true,
"jest/globals": true
}
}

107
examples/.gitignore vendored Normal file
View File

@@ -0,0 +1,107 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test

43
examples/README.md Normal file
View File

@@ -0,0 +1,43 @@
# 🧰 Simple TypeScript Starter | 2022
> We talk about a lot of **advanced Node.js and TypeScript** concepts on [the blog](https://khalilstemmler.com), particularly focused around Domain-Driven Design and large-scale enterprise application patterns. However, I received a few emails from readers that were interested in seeing what a basic TypeScript starter project looks like. So I've put together just that.
### Features
- Minimal
- TypeScript v4
- Testing with Jest
- Linting with Eslint and Prettier
- Pre-commit hooks with Husky
- VS Code debugger scripts
- Local development with Nodemon
### Scripts
#### `npm run start:dev`
Starts the application in development using `nodemon` and `ts-node` to do hot reloading.
#### `npm run start`
Starts the app in production by first building the project with `npm run build`, and then executing the compiled JavaScript at `build/index.js`.
#### `npm run build`
Builds the app at `build`, cleaning the folder first.
#### `npm run test`
Runs the `jest` tests once.
#### `npm run test:dev`
Run the `jest` tests in watch mode, waiting for file changes.
#### `npm run prettier-format`
Format your code.
#### `npm run prettier-watch`
Format your code in watch mode, waiting for file changes.

6
examples/nodemon.json Normal file
View File

@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": ".ts,.js",
"ignore": [],
"exec": "npx ts-node ./src/index.ts"
}

17353
examples/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

31
examples/package.json Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "typescript-starter",
"version": "1.0.0",
"description": "A basic typescript app starter for 2023.",
"main": "index.js",
"scripts": {
"build": "rimraf ./build && tsc",
"dev": "npx nodemon",
"start": "npm run build && node build/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@lukehagar/plexjs": "^0.0.27",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.2",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"dotenv": "^16.3.1",
"nodemon": "^3.0.1",
"onchange": "^7.1.0",
"rimraf": "^5.0.1",
"run-script-os": "^1.1.6",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"dependencies": {
"jest-cucumber": "^3.0.1"
}
}

14
examples/src/index.ts Normal file
View File

@@ -0,0 +1,14 @@
import { Configuration, ServerApi, PlexTvApi } from "@lukehagar/plexjs";
import dotenv from "dotenv";
dotenv.config();
const config = new Configuration({
basePath: process.env.BASE_PATH,
plexToken: process.env.PLEX_TOKEN,
});
new ServerApi(config).getServerCapabilities().then((resp) => console.log(resp));
new PlexTvApi(config).getDevices().then((resp) => console.log(resp));
new PlexTvApi(config).getUserDetails().then((resp) => console.log(resp));

16
examples/tsconfig.json Normal file
View File

@@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": ["es6"],
"allowJs": true,
"outDir": "build",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"types": ["node", "jest"],
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["src/**/*.spec.ts"]
}

4379
examples/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
export * from "./sdk-output/api";
export {Configuration, ConfigurationParameters} from "./sdk-output/configuration";
export * from "./paginator";
export * as axiosRetry from "axios-retry"

1
node_modules/.bin/js-yaml generated vendored
View File

@@ -1 +0,0 @@
../js-yaml/bin/js-yaml.js

1
node_modules/.bin/tsc generated vendored
View File

@@ -1 +0,0 @@
../typescript/bin/tsc

1
node_modules/.bin/tsserver generated vendored
View File

@@ -1 +0,0 @@
../typescript/bin/tsserver

22
node_modules/@babel/runtime/LICENSE generated vendored
View File

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

View File

@@ -1,19 +0,0 @@
# @babel/runtime
> babel's modular runtime helpers
See our website [@babel/runtime](https://babeljs.io/docs/en/babel-runtime) for more information.
## Install
Using npm:
```sh
npm install --save @babel/runtime
```
or using yarn:
```sh
yarn add @babel/runtime
```

View File

@@ -1,64 +0,0 @@
var OverloadYield = require("./OverloadYield.js");
function AsyncGenerator(gen) {
var front, back;
function resume(key, arg) {
try {
var result = gen[key](arg),
value = result.value,
overloaded = value instanceof OverloadYield;
Promise.resolve(overloaded ? value.v : value).then(function (arg) {
if (overloaded) {
var nextKey = "return" === key ? "return" : "next";
if (!value.k || arg.done) return resume(nextKey, arg);
arg = gen[nextKey](arg).value;
}
settle(result.done ? "return" : "normal", arg);
}, function (err) {
resume("throw", err);
});
} catch (err) {
settle("throw", err);
}
}
function settle(type, value) {
switch (type) {
case "return":
front.resolve({
value: value,
done: !0
});
break;
case "throw":
front.reject(value);
break;
default:
front.resolve({
value: value,
done: !1
});
}
(front = front.next) ? resume(front.key, front.arg) : back = null;
}
this._invoke = function (key, arg) {
return new Promise(function (resolve, reject) {
var request = {
key: key,
arg: arg,
resolve: resolve,
reject: reject,
next: null
};
back ? back = back.next = request : (front = back = request, resume(key, arg));
});
}, "function" != typeof gen["return"] && (this["return"] = void 0);
}
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
return this;
}, AsyncGenerator.prototype.next = function (arg) {
return this._invoke("next", arg);
}, AsyncGenerator.prototype["throw"] = function (arg) {
return this._invoke("throw", arg);
}, AsyncGenerator.prototype["return"] = function (arg) {
return this._invoke("return", arg);
};
module.exports = AsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _AwaitValue(value) {
this.wrapped = value;
}
module.exports = _AwaitValue, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _OverloadYield(value, kind) {
this.v = value, this.k = kind;
}
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,24 +0,0 @@
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object.keys(descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object.defineProperty(target, property, desc);
desc = null;
}
return desc;
}
module.exports = _applyDecoratedDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,236 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function old_createMetadataMethodsForProperty(metadataMap, kind, property, decoratorFinishedRef) {
return {
getMetadata: function getMetadata(key) {
old_assertNotFinished(decoratorFinishedRef, "getMetadata"), old_assertMetadataKey(key);
var metadataForKey = metadataMap[key];
if (void 0 !== metadataForKey) if (1 === kind) {
var pub = metadataForKey["public"];
if (void 0 !== pub) return pub[property];
} else if (2 === kind) {
var priv = metadataForKey["private"];
if (void 0 !== priv) return priv.get(property);
} else if (Object.hasOwnProperty.call(metadataForKey, "constructor")) return metadataForKey.constructor;
},
setMetadata: function setMetadata(key, value) {
old_assertNotFinished(decoratorFinishedRef, "setMetadata"), old_assertMetadataKey(key);
var metadataForKey = metadataMap[key];
if (void 0 === metadataForKey && (metadataForKey = metadataMap[key] = {}), 1 === kind) {
var pub = metadataForKey["public"];
void 0 === pub && (pub = metadataForKey["public"] = {}), pub[property] = value;
} else if (2 === kind) {
var priv = metadataForKey.priv;
void 0 === priv && (priv = metadataForKey["private"] = new Map()), priv.set(property, value);
} else metadataForKey.constructor = value;
}
};
}
function old_convertMetadataMapToFinal(obj, metadataMap) {
var parentMetadataMap = obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")],
metadataKeys = Object.getOwnPropertySymbols(metadataMap);
if (0 !== metadataKeys.length) {
for (var i = 0; i < metadataKeys.length; i++) {
var key = metadataKeys[i],
metaForKey = metadataMap[key],
parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null,
pub = metaForKey["public"],
parentPub = parentMetaForKey ? parentMetaForKey["public"] : null;
pub && parentPub && Object.setPrototypeOf(pub, parentPub);
var priv = metaForKey["private"];
if (priv) {
var privArr = Array.from(priv.values()),
parentPriv = parentMetaForKey ? parentMetaForKey["private"] : null;
parentPriv && (privArr = privArr.concat(parentPriv)), metaForKey["private"] = privArr;
}
parentMetaForKey && Object.setPrototypeOf(metaForKey, parentMetaForKey);
}
parentMetadataMap && Object.setPrototypeOf(metadataMap, parentMetadataMap), obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = metadataMap;
}
}
function old_createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
old_assertNotFinished(decoratorFinishedRef, "addInitializer"), old_assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function old_memberDec(dec, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var metadataKind,
metadataName,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
isStatic: isStatic,
isPrivate: isPrivate
},
decoratorFinishedRef = {
v: !1
};
if (0 !== kind && (ctx.addInitializer = old_createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate) {
metadataKind = 2, metadataName = Symbol(name);
var access = {};
0 === kind ? (access.get = desc.get, access.set = desc.set) : 2 === kind ? access.get = function () {
return desc.value;
} : (1 !== kind && 3 !== kind || (access.get = function () {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (access.set = function (v) {
desc.set.call(this, v);
})), ctx.access = access;
} else metadataKind = 1, metadataName = name;
try {
return dec(value, Object.assign(ctx, old_createMetadataMethodsForProperty(metadataMap, metadataKind, metadataName, decoratorFinishedRef)));
} finally {
decoratorFinishedRef.v = !0;
}
}
function old_assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}
function old_assertMetadataKey(key) {
if ("symbol" != _typeof(key)) throw new TypeError("Metadata keys must be symbols, received: " + key);
}
function old_assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function old_assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && old_assertCallable(value.get, "accessor.get"), void 0 !== value.set && old_assertCallable(value.set, "accessor.set"), void 0 !== value.init && old_assertCallable(value.init, "accessor.init"), void 0 !== value.initializer && old_assertCallable(value.initializer, "accessor.initializer");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function old_getInit(desc) {
var initializer;
return null == (initializer = desc.init) && (initializer = desc.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), initializer;
}
function old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers) {
var desc,
initializer,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = old_memberDec(decs, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value)) && (old_assertValidReturnValue(kind, newValue), 0 === kind ? initializer = newValue : 1 === kind ? (initializer = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = old_memberDec(decs[i], name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value))) old_assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === initializer ? initializer = newInit : "function" == typeof initializer ? initializer = [initializer, newInit] : initializer.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === initializer) initializer = function initializer(instance, init) {
return init;
};else if ("function" != typeof initializer) {
var ownInitializers = initializer;
initializer = function initializer(instance, init) {
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = initializer;
initializer = function initializer(instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(initializer);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function old_applyMemberDecs(ret, Class, protoMetadataMap, staticMetadataMap, decInfos) {
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
metadataMap,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, metadataMap = staticMetadataMap, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, metadataMap = protoMetadataMap, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers);
}
}
old_pushInitializers(ret, protoInitializers), old_pushInitializers(ret, staticInitializers);
}
function old_pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
function old_applyClassDecs(ret, targetClass, metadataMap, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var ctx = Object.assign({
kind: "class",
name: name,
addInitializer: old_createAddInitializerMethod(initializers, decoratorFinishedRef)
}, old_createMetadataMethodsForProperty(metadataMap, 0, name, decoratorFinishedRef)),
nextNewClass = classDecs[i](newClass, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (old_assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
});
}
}
function applyDecs(targetClass, memberDecs, classDecs) {
var ret = [],
staticMetadataMap = {},
protoMetadataMap = {};
return old_applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs), old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap), old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs), old_convertMetadataMapToFinal(targetClass, staticMetadataMap), ret;
}
module.exports = applyDecs, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,187 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function applyDecs2203Factory() {
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
!function (decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var get,
set,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
"static": isStatic,
"private": isPrivate
},
decoratorFinishedRef = {
v: !1
};
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
return this[name];
}, set = function set(v) {
this[name] = v;
}) : 2 === kind ? get = function get() {
return desc.value;
} : (1 !== kind && 3 !== kind || (get = function get() {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (set = function set(v) {
desc.set.call(this, v);
})), ctx.access = get && set ? {
get: get,
set: set
} : get ? {
get: get
} : {
set: set
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
}
function assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
var desc,
init,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === init) init = function init(instance, _init) {
return _init;
};else if ("function" != typeof init) {
var ownInitializers = init;
init = function init(instance, _init2) {
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function init(instance, _init3) {
return originalInitializer.call(instance, _init3);
};
}
ret.push(init);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
return function (targetClass, memberDecs, classDecs) {
var ret = [];
return function (ret, Class, decInfos) {
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, 0 != (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
}
}
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
}(ret, targetClass, memberDecs), function (ret, targetClass, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
});
}
}(ret, targetClass, classDecs), ret;
};
}
var applyDecs2203Impl;
function applyDecs2203(targetClass, memberDecs, classDecs) {
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(targetClass, memberDecs, classDecs);
}
module.exports = applyDecs2203, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,188 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var get,
set,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
"static": isStatic,
"private": isPrivate
},
decoratorFinishedRef = {
v: !1
};
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
return this[name];
}, set = function set(v) {
this[name] = v;
}) : 2 === kind ? get = function get() {
return desc.value;
} : (1 !== kind && 3 !== kind || (get = function get() {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (set = function set(v) {
desc.set.call(this, v);
})), ctx.access = get && set ? {
get: get,
set: set
} : get ? {
get: get
} : {
set: set
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}
function assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
var desc,
init,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === init) init = function init(instance, _init) {
return _init;
};else if ("function" != typeof init) {
var ownInitializers = init;
init = function init(instance, _init2) {
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function init(instance, _init3) {
return originalInitializer.call(instance, _init3);
};
}
ret.push(init);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function applyMemberDecs(Class, decInfos) {
for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
}
}
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;
}
function pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
function applyClassDecs(targetClass, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
return [newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
}];
}
}
function applyDecs2203R(targetClass, memberDecs, classDecs) {
return {
e: applyMemberDecs(targetClass, memberDecs),
get c() {
return applyClassDecs(targetClass, classDecs);
}
};
}
module.exports = applyDecs2203R, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,5 +0,0 @@
var arrayLikeToArray = require("./arrayLikeToArray.js");
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return arrayLikeToArray(arr);
}
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,24 +0,0 @@
var OverloadYield = require("./OverloadYield.js");
function _asyncGeneratorDelegate(inner) {
var iter = {},
waiting = !1;
function pump(key, value) {
return waiting = !0, value = new Promise(function (resolve) {
resolve(inner[key](value));
}), {
done: !1,
value: new OverloadYield(value, 1)
};
}
return iter["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
return this;
}, iter.next = function (value) {
return waiting ? (waiting = !1, value) : pump("next", value);
}, "function" == typeof inner["throw"] && (iter["throw"] = function (value) {
if (waiting) throw waiting = !1, value;
return pump("throw", value);
}), "function" == typeof inner["return"] && (iter["return"] = function (value) {
return waiting ? (waiting = !1, value) : pump("return", value);
}), iter;
}
module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,45 +0,0 @@
function _asyncIterator(iterable) {
var method,
async,
sync,
retry = 2;
for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) {
if (async && null != (method = iterable[async])) return method.call(iterable);
if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable));
async = "@@asyncIterator", sync = "@@iterator";
}
throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(s) {
function AsyncFromSyncIteratorContinuation(r) {
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
var done = r.done;
return Promise.resolve(r.value).then(function (value) {
return {
value: value,
done: done
};
});
}
return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) {
this.s = s, this.n = s.next;
}, AsyncFromSyncIterator.prototype = {
s: null,
n: null,
next: function next() {
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
},
"return": function _return(value) {
var ret = this.s["return"];
return void 0 === ret ? Promise.resolve({
value: value,
done: !0
}) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
},
"throw": function _throw(value) {
var thr = this.s["return"];
return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
}
}, new AsyncFromSyncIterator(s);
}
module.exports = _asyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,31 +0,0 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,5 +0,0 @@
var OverloadYield = require("./OverloadYield.js");
function _awaitAsyncGenerator(value) {
return new OverloadYield(value, 0);
}
module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var _typeof = require("./typeof.js")["default"];
function _checkInRHS(value) {
if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? _typeof(value) : "null"));
return value;
}
module.exports = _checkInRHS, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _checkPrivateRedeclaration(obj, privateCollection) {
if (privateCollection.has(obj)) {
throw new TypeError("Cannot initialize the same private elements twice on an object");
}
}
module.exports = _checkPrivateRedeclaration, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,18 +0,0 @@
function _classApplyDescriptorDestructureSet(receiver, descriptor) {
if (descriptor.set) {
if (!("__destrObj" in descriptor)) {
descriptor.__destrObj = {
set value(v) {
descriptor.set.call(receiver, v);
}
};
}
return descriptor.__destrObj;
} else {
if (!descriptor.writable) {
throw new TypeError("attempted to set read only private field");
}
return descriptor;
}
}
module.exports = _classApplyDescriptorDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classApplyDescriptorGet(receiver, descriptor) {
if (descriptor.get) {
return descriptor.get.call(receiver);
}
return descriptor.value;
}
module.exports = _classApplyDescriptorGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,11 +0,0 @@
function _classApplyDescriptorSet(receiver, descriptor, value) {
if (descriptor.set) {
descriptor.set.call(receiver, value);
} else {
if (!descriptor.writable) {
throw new TypeError("attempted to set read only private field");
}
descriptor.value = value;
}
}
module.exports = _classApplyDescriptorSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _classCheckPrivateStaticAccess(receiver, classConstructor) {
if (receiver !== classConstructor) {
throw new TypeError("Private static access of wrong provenance");
}
}
module.exports = _classCheckPrivateStaticAccess, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
if (descriptor === undefined) {
throw new TypeError("attempted to " + action + " private static field before its declaration");
}
}
module.exports = _classCheckPrivateStaticFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classExtractFieldDescriptor(receiver, privateMap, action) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to " + action + " private field on non-instance");
}
return privateMap.get(receiver);
}
module.exports = _classExtractFieldDescriptor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _classNameTDZError(name) {
throw new ReferenceError("Class \"" + name + "\" cannot be referenced in computed property keys.");
}
module.exports = _classNameTDZError, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
function _classPrivateFieldDestructureSet(receiver, privateMap) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
return classApplyDescriptorDestructureSet(receiver, descriptor);
}
module.exports = _classPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
function _classPrivateFieldGet(receiver, privateMap) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
return classApplyDescriptorGet(receiver, descriptor);
}
module.exports = _classPrivateFieldGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateFieldInitSpec(obj, privateMap, value) {
checkPrivateRedeclaration(obj, privateMap);
privateMap.set(obj, value);
}
module.exports = _classPrivateFieldInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classPrivateFieldBase(receiver, privateKey) {
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
throw new TypeError("attempted to use private field on non-instance");
}
return receiver;
}
module.exports = _classPrivateFieldBase, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,5 +0,0 @@
var id = 0;
function _classPrivateFieldKey(name) {
return "__private_" + id++ + "_" + name;
}
module.exports = _classPrivateFieldKey, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,8 +0,0 @@
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
var classExtractFieldDescriptor = require("./classExtractFieldDescriptor.js");
function _classPrivateFieldSet(receiver, privateMap, value) {
var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
classApplyDescriptorSet(receiver, descriptor, value);
return value;
}
module.exports = _classPrivateFieldSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,7 +0,0 @@
function _classPrivateMethodGet(receiver, privateSet, fn) {
if (!privateSet.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return fn;
}
module.exports = _classPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateMethodInitSpec(obj, privateSet) {
checkPrivateRedeclaration(obj, privateSet);
privateSet.add(obj);
}
module.exports = _classPrivateMethodInitSpec, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _classPrivateMethodSet() {
throw new TypeError("attempted to reassign private method");
}
module.exports = _classPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,9 +0,0 @@
var classApplyDescriptorDestructureSet = require("./classApplyDescriptorDestructureSet.js");
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
return classApplyDescriptorDestructureSet(receiver, descriptor);
}
module.exports = _classStaticPrivateFieldDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,9 +0,0 @@
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "get");
return classApplyDescriptorGet(receiver, descriptor);
}
module.exports = _classStaticPrivateFieldSpecGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,10 +0,0 @@
var classApplyDescriptorSet = require("./classApplyDescriptorSet.js");
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
classCheckPrivateStaticAccess(receiver, classConstructor);
classCheckPrivateStaticFieldDescriptor(descriptor, "set");
classApplyDescriptorSet(receiver, descriptor, value);
return value;
}
module.exports = _classStaticPrivateFieldSpecSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,6 +0,0 @@
var classCheckPrivateStaticAccess = require("./classCheckPrivateStaticAccess.js");
function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
classCheckPrivateStaticAccess(receiver, classConstructor);
return method;
}
module.exports = _classStaticPrivateMethodGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,4 +0,0 @@
function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
module.exports = _classStaticPrivateMethodSet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,18 +0,0 @@
var setPrototypeOf = require("./setPrototypeOf.js");
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
function _construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
} else {
module.exports = _construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) setPrototypeOf(instance, Class.prototype);
return instance;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
}
return _construct.apply(null, arguments);
}
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,19 +0,0 @@
var toPropertyKey = require("./toPropertyKey.js");
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,53 +0,0 @@
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
function _createForOfIteratorHelper(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (!it) {
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
var F = function F() {};
return {
s: F,
n: function n() {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
},
e: function e(_e) {
throw _e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function s() {
it = it.call(o);
},
n: function n() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function e(_e2) {
didErr = true;
err = _e2;
},
f: function f() {
try {
if (!normalCompletion && it["return"] != null) it["return"]();
} finally {
if (didErr) throw err;
}
}
};
}
module.exports = _createForOfIteratorHelper, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,20 +0,0 @@
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
if (it) return (it = it.call(o)).next.bind(it);
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
return function () {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _createForOfIteratorHelperLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,18 +0,0 @@
var getPrototypeOf = require("./getPrototypeOf.js");
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
var possibleConstructorReturn = require("./possibleConstructorReturn.js");
function _createSuper(Derived) {
var hasNativeReflectConstruct = isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return possibleConstructorReturn(this, result);
};
}
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,343 +0,0 @@
var toArray = require("./toArray.js");
var toPropertyKey = require("./toPropertyKey.js");
function _decorate(decorators, factory, superClass, mixins) {
var api = _getDecoratorsApi();
if (mixins) {
for (var i = 0; i < mixins.length; i++) {
api = mixins[i](api);
}
}
var r = factory(function initialize(O) {
api.initializeInstanceElements(O, decorated.elements);
}, superClass);
var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
api.initializeClassElements(r.F, decorated.elements);
return api.runClassFinishers(r.F, decorated.finishers);
}
function _getDecoratorsApi() {
_getDecoratorsApi = function _getDecoratorsApi() {
return api;
};
var api = {
elementsDefinitionOrder: [["method"], ["field"]],
initializeInstanceElements: function initializeInstanceElements(O, elements) {
["method", "field"].forEach(function (kind) {
elements.forEach(function (element) {
if (element.kind === kind && element.placement === "own") {
this.defineClassElement(O, element);
}
}, this);
}, this);
},
initializeClassElements: function initializeClassElements(F, elements) {
var proto = F.prototype;
["method", "field"].forEach(function (kind) {
elements.forEach(function (element) {
var placement = element.placement;
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
var receiver = placement === "static" ? F : proto;
this.defineClassElement(receiver, element);
}
}, this);
}, this);
},
defineClassElement: function defineClassElement(receiver, element) {
var descriptor = element.descriptor;
if (element.kind === "field") {
var initializer = element.initializer;
descriptor = {
enumerable: descriptor.enumerable,
writable: descriptor.writable,
configurable: descriptor.configurable,
value: initializer === void 0 ? void 0 : initializer.call(receiver)
};
}
Object.defineProperty(receiver, element.key, descriptor);
},
decorateClass: function decorateClass(elements, decorators) {
var newElements = [];
var finishers = [];
var placements = {
"static": [],
prototype: [],
own: []
};
elements.forEach(function (element) {
this.addElementPlacement(element, placements);
}, this);
elements.forEach(function (element) {
if (!_hasDecorators(element)) return newElements.push(element);
var elementFinishersExtras = this.decorateElement(element, placements);
newElements.push(elementFinishersExtras.element);
newElements.push.apply(newElements, elementFinishersExtras.extras);
finishers.push.apply(finishers, elementFinishersExtras.finishers);
}, this);
if (!decorators) {
return {
elements: newElements,
finishers: finishers
};
}
var result = this.decorateConstructor(newElements, decorators);
finishers.push.apply(finishers, result.finishers);
result.finishers = finishers;
return result;
},
addElementPlacement: function addElementPlacement(element, placements, silent) {
var keys = placements[element.placement];
if (!silent && keys.indexOf(element.key) !== -1) {
throw new TypeError("Duplicated element (" + element.key + ")");
}
keys.push(element.key);
},
decorateElement: function decorateElement(element, placements) {
var extras = [];
var finishers = [];
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
var keys = placements[element.placement];
keys.splice(keys.indexOf(element.key), 1);
var elementObject = this.fromElementDescriptor(element);
var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
element = elementFinisherExtras.element;
this.addElementPlacement(element, placements);
if (elementFinisherExtras.finisher) {
finishers.push(elementFinisherExtras.finisher);
}
var newExtras = elementFinisherExtras.extras;
if (newExtras) {
for (var j = 0; j < newExtras.length; j++) {
this.addElementPlacement(newExtras[j], placements);
}
extras.push.apply(extras, newExtras);
}
}
return {
element: element,
finishers: finishers,
extras: extras
};
},
decorateConstructor: function decorateConstructor(elements, decorators) {
var finishers = [];
for (var i = decorators.length - 1; i >= 0; i--) {
var obj = this.fromClassDescriptor(elements);
var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
if (elementsAndFinisher.finisher !== undefined) {
finishers.push(elementsAndFinisher.finisher);
}
if (elementsAndFinisher.elements !== undefined) {
elements = elementsAndFinisher.elements;
for (var j = 0; j < elements.length - 1; j++) {
for (var k = j + 1; k < elements.length; k++) {
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
throw new TypeError("Duplicated element (" + elements[j].key + ")");
}
}
}
}
}
return {
elements: elements,
finishers: finishers
};
},
fromElementDescriptor: function fromElementDescriptor(element) {
var obj = {
kind: element.kind,
key: element.key,
placement: element.placement,
descriptor: element.descriptor
};
var desc = {
value: "Descriptor",
configurable: true
};
Object.defineProperty(obj, Symbol.toStringTag, desc);
if (element.kind === "field") obj.initializer = element.initializer;
return obj;
},
toElementDescriptors: function toElementDescriptors(elementObjects) {
if (elementObjects === undefined) return;
return toArray(elementObjects).map(function (elementObject) {
var element = this.toElementDescriptor(elementObject);
this.disallowProperty(elementObject, "finisher", "An element descriptor");
this.disallowProperty(elementObject, "extras", "An element descriptor");
return element;
}, this);
},
toElementDescriptor: function toElementDescriptor(elementObject) {
var kind = String(elementObject.kind);
if (kind !== "method" && kind !== "field") {
throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
}
var key = toPropertyKey(elementObject.key);
var placement = String(elementObject.placement);
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
}
var descriptor = elementObject.descriptor;
this.disallowProperty(elementObject, "elements", "An element descriptor");
var element = {
kind: kind,
key: key,
placement: placement,
descriptor: Object.assign({}, descriptor)
};
if (kind !== "field") {
this.disallowProperty(elementObject, "initializer", "A method descriptor");
} else {
this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
element.initializer = elementObject.initializer;
}
return element;
},
toElementFinisherExtras: function toElementFinisherExtras(elementObject) {
var element = this.toElementDescriptor(elementObject);
var finisher = _optionalCallableProperty(elementObject, "finisher");
var extras = this.toElementDescriptors(elementObject.extras);
return {
element: element,
finisher: finisher,
extras: extras
};
},
fromClassDescriptor: function fromClassDescriptor(elements) {
var obj = {
kind: "class",
elements: elements.map(this.fromElementDescriptor, this)
};
var desc = {
value: "Descriptor",
configurable: true
};
Object.defineProperty(obj, Symbol.toStringTag, desc);
return obj;
},
toClassDescriptor: function toClassDescriptor(obj) {
var kind = String(obj.kind);
if (kind !== "class") {
throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
}
this.disallowProperty(obj, "key", "A class descriptor");
this.disallowProperty(obj, "placement", "A class descriptor");
this.disallowProperty(obj, "descriptor", "A class descriptor");
this.disallowProperty(obj, "initializer", "A class descriptor");
this.disallowProperty(obj, "extras", "A class descriptor");
var finisher = _optionalCallableProperty(obj, "finisher");
var elements = this.toElementDescriptors(obj.elements);
return {
elements: elements,
finisher: finisher
};
},
runClassFinishers: function runClassFinishers(constructor, finishers) {
for (var i = 0; i < finishers.length; i++) {
var newConstructor = (0, finishers[i])(constructor);
if (newConstructor !== undefined) {
if (typeof newConstructor !== "function") {
throw new TypeError("Finishers must return a constructor.");
}
constructor = newConstructor;
}
}
return constructor;
},
disallowProperty: function disallowProperty(obj, name, objectType) {
if (obj[name] !== undefined) {
throw new TypeError(objectType + " can't have a ." + name + " property.");
}
}
};
return api;
}
function _createElementDescriptor(def) {
var key = toPropertyKey(def.key);
var descriptor;
if (def.kind === "method") {
descriptor = {
value: def.value,
writable: true,
configurable: true,
enumerable: false
};
} else if (def.kind === "get") {
descriptor = {
get: def.value,
configurable: true,
enumerable: false
};
} else if (def.kind === "set") {
descriptor = {
set: def.value,
configurable: true,
enumerable: false
};
} else if (def.kind === "field") {
descriptor = {
configurable: true,
writable: true,
enumerable: true
};
}
var element = {
kind: def.kind === "field" ? "field" : "method",
key: key,
placement: def["static"] ? "static" : def.kind === "field" ? "own" : "prototype",
descriptor: descriptor
};
if (def.decorators) element.decorators = def.decorators;
if (def.kind === "field") element.initializer = def.value;
return element;
}
function _coalesceGetterSetter(element, other) {
if (element.descriptor.get !== undefined) {
other.descriptor.get = element.descriptor.get;
} else {
other.descriptor.set = element.descriptor.set;
}
}
function _coalesceClassElements(elements) {
var newElements = [];
var isSameElement = function isSameElement(other) {
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
};
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var other;
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) {
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
}
other.descriptor = element.descriptor;
} else {
if (_hasDecorators(element)) {
if (_hasDecorators(other)) {
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
}
other.decorators = element.decorators;
}
_coalesceGetterSetter(element, other);
}
} else {
newElements.push(element);
}
}
return newElements;
}
function _hasDecorators(element) {
return element.decorators && element.decorators.length;
}
function _isDataDescriptor(desc) {
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
}
function _optionalCallableProperty(obj, name) {
var value = obj[name];
if (value !== undefined && typeof value !== "function") {
throw new TypeError("Expected '" + name + "' to be a function");
}
return value;
}
module.exports = _decorate, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,12 +0,0 @@
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}
return obj;
}
module.exports = _defaults, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,8 +0,0 @@
function _defineAccessor(type, obj, key, fn) {
var desc = {
configurable: !0,
enumerable: !0
};
return desc[type] = fn, Object.defineProperty(obj, key, desc);
}
module.exports = _defineAccessor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,20 +0,0 @@
function _defineEnumerableProperties(obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
if (Object.getOwnPropertySymbols) {
var objectSymbols = Object.getOwnPropertySymbols(descs);
for (var i = 0; i < objectSymbols.length; i++) {
var sym = objectSymbols[i];
var desc = descs[sym];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, sym, desc);
}
}
return obj;
}
module.exports = _defineEnumerableProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,16 +0,0 @@
var toPropertyKey = require("./toPropertyKey.js");
function _defineProperty(obj, key, value) {
key = toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -1,63 +0,0 @@
import OverloadYield from "./OverloadYield.js";
export default function AsyncGenerator(gen) {
var front, back;
function resume(key, arg) {
try {
var result = gen[key](arg),
value = result.value,
overloaded = value instanceof OverloadYield;
Promise.resolve(overloaded ? value.v : value).then(function (arg) {
if (overloaded) {
var nextKey = "return" === key ? "return" : "next";
if (!value.k || arg.done) return resume(nextKey, arg);
arg = gen[nextKey](arg).value;
}
settle(result.done ? "return" : "normal", arg);
}, function (err) {
resume("throw", err);
});
} catch (err) {
settle("throw", err);
}
}
function settle(type, value) {
switch (type) {
case "return":
front.resolve({
value: value,
done: !0
});
break;
case "throw":
front.reject(value);
break;
default:
front.resolve({
value: value,
done: !1
});
}
(front = front.next) ? resume(front.key, front.arg) : back = null;
}
this._invoke = function (key, arg) {
return new Promise(function (resolve, reject) {
var request = {
key: key,
arg: arg,
resolve: resolve,
reject: reject,
next: null
};
back ? back = back.next = request : (front = back = request, resume(key, arg));
});
}, "function" != typeof gen["return"] && (this["return"] = void 0);
}
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
return this;
}, AsyncGenerator.prototype.next = function (arg) {
return this._invoke("next", arg);
}, AsyncGenerator.prototype["throw"] = function (arg) {
return this._invoke("throw", arg);
}, AsyncGenerator.prototype["return"] = function (arg) {
return this._invoke("return", arg);
};

View File

@@ -1,3 +0,0 @@
export default function _AwaitValue(value) {
this.wrapped = value;
}

View File

@@ -1,3 +0,0 @@
export default function _OverloadYield(value, kind) {
this.v = value, this.k = kind;
}

View File

@@ -1,23 +0,0 @@
export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object.keys(descriptor).forEach(function (key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ('value' in desc || desc.initializer) {
desc.writable = true;
}
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
return decorator(target, property, desc) || desc;
}, desc);
if (context && desc.initializer !== void 0) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (desc.initializer === void 0) {
Object.defineProperty(target, property, desc);
desc = null;
}
return desc;
}

View File

@@ -1,235 +0,0 @@
import _typeof from "./typeof.js";
function old_createMetadataMethodsForProperty(metadataMap, kind, property, decoratorFinishedRef) {
return {
getMetadata: function getMetadata(key) {
old_assertNotFinished(decoratorFinishedRef, "getMetadata"), old_assertMetadataKey(key);
var metadataForKey = metadataMap[key];
if (void 0 !== metadataForKey) if (1 === kind) {
var pub = metadataForKey["public"];
if (void 0 !== pub) return pub[property];
} else if (2 === kind) {
var priv = metadataForKey["private"];
if (void 0 !== priv) return priv.get(property);
} else if (Object.hasOwnProperty.call(metadataForKey, "constructor")) return metadataForKey.constructor;
},
setMetadata: function setMetadata(key, value) {
old_assertNotFinished(decoratorFinishedRef, "setMetadata"), old_assertMetadataKey(key);
var metadataForKey = metadataMap[key];
if (void 0 === metadataForKey && (metadataForKey = metadataMap[key] = {}), 1 === kind) {
var pub = metadataForKey["public"];
void 0 === pub && (pub = metadataForKey["public"] = {}), pub[property] = value;
} else if (2 === kind) {
var priv = metadataForKey.priv;
void 0 === priv && (priv = metadataForKey["private"] = new Map()), priv.set(property, value);
} else metadataForKey.constructor = value;
}
};
}
function old_convertMetadataMapToFinal(obj, metadataMap) {
var parentMetadataMap = obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")],
metadataKeys = Object.getOwnPropertySymbols(metadataMap);
if (0 !== metadataKeys.length) {
for (var i = 0; i < metadataKeys.length; i++) {
var key = metadataKeys[i],
metaForKey = metadataMap[key],
parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null,
pub = metaForKey["public"],
parentPub = parentMetaForKey ? parentMetaForKey["public"] : null;
pub && parentPub && Object.setPrototypeOf(pub, parentPub);
var priv = metaForKey["private"];
if (priv) {
var privArr = Array.from(priv.values()),
parentPriv = parentMetaForKey ? parentMetaForKey["private"] : null;
parentPriv && (privArr = privArr.concat(parentPriv)), metaForKey["private"] = privArr;
}
parentMetaForKey && Object.setPrototypeOf(metaForKey, parentMetaForKey);
}
parentMetadataMap && Object.setPrototypeOf(metadataMap, parentMetadataMap), obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = metadataMap;
}
}
function old_createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
old_assertNotFinished(decoratorFinishedRef, "addInitializer"), old_assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function old_memberDec(dec, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var metadataKind,
metadataName,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
isStatic: isStatic,
isPrivate: isPrivate
},
decoratorFinishedRef = {
v: !1
};
if (0 !== kind && (ctx.addInitializer = old_createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate) {
metadataKind = 2, metadataName = Symbol(name);
var access = {};
0 === kind ? (access.get = desc.get, access.set = desc.set) : 2 === kind ? access.get = function () {
return desc.value;
} : (1 !== kind && 3 !== kind || (access.get = function () {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (access.set = function (v) {
desc.set.call(this, v);
})), ctx.access = access;
} else metadataKind = 1, metadataName = name;
try {
return dec(value, Object.assign(ctx, old_createMetadataMethodsForProperty(metadataMap, metadataKind, metadataName, decoratorFinishedRef)));
} finally {
decoratorFinishedRef.v = !0;
}
}
function old_assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}
function old_assertMetadataKey(key) {
if ("symbol" != _typeof(key)) throw new TypeError("Metadata keys must be symbols, received: " + key);
}
function old_assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function old_assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && old_assertCallable(value.get, "accessor.get"), void 0 !== value.set && old_assertCallable(value.set, "accessor.set"), void 0 !== value.init && old_assertCallable(value.init, "accessor.init"), void 0 !== value.initializer && old_assertCallable(value.initializer, "accessor.initializer");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function old_getInit(desc) {
var initializer;
return null == (initializer = desc.init) && (initializer = desc.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), initializer;
}
function old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers) {
var desc,
initializer,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = old_memberDec(decs, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value)) && (old_assertValidReturnValue(kind, newValue), 0 === kind ? initializer = newValue : 1 === kind ? (initializer = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = old_memberDec(decs[i], name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value))) old_assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === initializer ? initializer = newInit : "function" == typeof initializer ? initializer = [initializer, newInit] : initializer.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === initializer) initializer = function initializer(instance, init) {
return init;
};else if ("function" != typeof initializer) {
var ownInitializers = initializer;
initializer = function initializer(instance, init) {
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = initializer;
initializer = function initializer(instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(initializer);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function old_applyMemberDecs(ret, Class, protoMetadataMap, staticMetadataMap, decInfos) {
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
metadataMap,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, metadataMap = staticMetadataMap, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, metadataMap = protoMetadataMap, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers);
}
}
old_pushInitializers(ret, protoInitializers), old_pushInitializers(ret, staticInitializers);
}
function old_pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
function old_applyClassDecs(ret, targetClass, metadataMap, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var ctx = Object.assign({
kind: "class",
name: name,
addInitializer: old_createAddInitializerMethod(initializers, decoratorFinishedRef)
}, old_createMetadataMethodsForProperty(metadataMap, 0, name, decoratorFinishedRef)),
nextNewClass = classDecs[i](newClass, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (old_assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
});
}
}
export default function applyDecs(targetClass, memberDecs, classDecs) {
var ret = [],
staticMetadataMap = {},
protoMetadataMap = {};
return old_applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs), old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap), old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs), old_convertMetadataMapToFinal(targetClass, staticMetadataMap), ret;
}

View File

@@ -1,186 +0,0 @@
import _typeof from "./typeof.js";
function applyDecs2203Factory() {
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
!function (decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var get,
set,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
"static": isStatic,
"private": isPrivate
},
decoratorFinishedRef = {
v: !1
};
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
return this[name];
}, set = function set(v) {
this[name] = v;
}) : 2 === kind ? get = function get() {
return desc.value;
} : (1 !== kind && 3 !== kind || (get = function get() {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (set = function set(v) {
desc.set.call(this, v);
})), ctx.access = get && set ? {
get: get,
set: set
} : get ? {
get: get
} : {
set: set
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
}
function assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
var desc,
init,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === init) init = function init(instance, _init) {
return _init;
};else if ("function" != typeof init) {
var ownInitializers = init;
init = function init(instance, _init2) {
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function init(instance, _init3) {
return originalInitializer.call(instance, _init3);
};
}
ret.push(init);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
return function (targetClass, memberDecs, classDecs) {
var ret = [];
return function (ret, Class, decInfos) {
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, 0 != (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
}
}
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers);
}(ret, targetClass, memberDecs), function (ret, targetClass, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
ret.push(newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
});
}
}(ret, targetClass, classDecs), ret;
};
}
var applyDecs2203Impl;
export default function applyDecs2203(targetClass, memberDecs, classDecs) {
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(targetClass, memberDecs, classDecs);
}

View File

@@ -1,187 +0,0 @@
import _typeof from "./typeof.js";
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function (initializer) {
assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) {
var kindStr;
switch (kind) {
case 1:
kindStr = "accessor";
break;
case 2:
kindStr = "method";
break;
case 3:
kindStr = "getter";
break;
case 4:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var get,
set,
ctx = {
kind: kindStr,
name: isPrivate ? "#" + name : name,
"static": isStatic,
"private": isPrivate
},
decoratorFinishedRef = {
v: !1
};
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() {
return this[name];
}, set = function set(v) {
this[name] = v;
}) : 2 === kind ? get = function get() {
return desc.value;
} : (1 !== kind && 3 !== kind || (get = function get() {
return desc.get.call(this);
}), 1 !== kind && 4 !== kind || (set = function set(v) {
desc.set.call(this, v);
})), ctx.access = get && set ? {
get: get,
set: set
} : get ? {
get: get
} : {
set: set
};
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = !0;
}
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished");
}
function assertCallable(fn, hint) {
if ("function" != typeof fn) throw new TypeError(hint + " must be a function");
}
function assertValidReturnValue(kind, value) {
var type = _typeof(value);
if (1 === kind) {
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init");
} else if ("function" !== type) {
var hint;
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) {
var desc,
init,
value,
newValue,
get,
set,
decs = decInfo[0];
if (isPrivate ? desc = 0 === kind || 1 === kind ? {
get: decInfo[3],
set: decInfo[4]
} : 3 === kind ? {
get: decInfo[3]
} : 4 === kind ? {
set: decInfo[3]
} : {
value: decInfo[3]
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = {
get: desc.get,
set: desc.set
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) {
var newInit;
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = {
get: get,
set: set
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit));
}
if (0 === kind || 1 === kind) {
if (void 0 === init) init = function init(instance, _init) {
return _init;
};else if ("function" != typeof init) {
var ownInitializers = init;
init = function init(instance, _init2) {
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function init(instance, _init3) {
return originalInitializer.call(instance, _init3);
};
}
ret.push(init);
}
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) {
return value.get.call(instance, args);
}), ret.push(function (instance, args) {
return value.set.call(instance, args);
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) {
return value.call(instance, args);
}) : Object.defineProperty(base, name, desc));
}
function applyMemberDecs(Class, decInfos) {
for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
if (Array.isArray(decInfo)) {
var base,
initializers,
kind = decInfo[1],
name = decInfo[2],
isPrivate = decInfo.length > 3,
isStatic = kind >= 5;
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields,
existingKind = existingNonFields.get(name) || 0;
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0);
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers);
}
}
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret;
}
function pushInitializers(ret, initializers) {
initializers && ret.push(function (instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
function applyClassDecs(targetClass, classDecs) {
if (classDecs.length > 0) {
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = {
v: !1
};
try {
var nextNewClass = classDecs[i](newClass, {
kind: "class",
name: name,
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef)
});
} finally {
decoratorFinishedRef.v = !0;
}
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass);
}
return [newClass, function () {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
}];
}
}
export default function applyDecs2203R(targetClass, memberDecs, classDecs) {
return {
e: applyMemberDecs(targetClass, memberDecs),
get c() {
return applyClassDecs(targetClass, classDecs);
}
};
}

Some files were not shown because too many files have changed in this diff Show More