From 32de5b17e5e895b5388c0a135a165c46355f1e8a Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 19 Apr 2023 16:35:37 +0800 Subject: [PATCH] feat: add plugin com.msgbyte.wxpusher just has basic backend logic --- pnpm-lock.yaml | 456 +++++------------- .../com.msgbyte.wxpusher/.ministarrc.js | 14 + .../models/wxpusher-user.ts | 26 + .../plugins/com.msgbyte.wxpusher/package.json | 21 + .../services/wxpusher.service.dev.ts | 142 ++++++ .../com.msgbyte.wxpusher/manifest.json | 9 + .../plugins/com.msgbyte.wxpusher/package.json | 16 + .../com.msgbyte.wxpusher/src/index.tsx | 1 + .../com.msgbyte.wxpusher/tsconfig.json | 7 + .../com.msgbyte.wxpusher/types/tailchat.d.ts | 2 + 10 files changed, 370 insertions(+), 324 deletions(-) create mode 100644 server/plugins/com.msgbyte.wxpusher/.ministarrc.js create mode 100644 server/plugins/com.msgbyte.wxpusher/models/wxpusher-user.ts create mode 100644 server/plugins/com.msgbyte.wxpusher/package.json create mode 100644 server/plugins/com.msgbyte.wxpusher/services/wxpusher.service.dev.ts create mode 100644 server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/manifest.json create mode 100644 server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/package.json create mode 100644 server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/src/index.tsx create mode 100644 server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/tsconfig.json create mode 100644 server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/types/tailchat.d.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d6cae5ce..a37c2fe9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1935,6 +1935,34 @@ importers: specifier: ^4.3.6 version: 4.3.6(immer@9.0.15)(react@18.2.0) + server/plugins/com.msgbyte.wxpusher: + dependencies: + got: + specifier: ^11.8.3 + version: 11.8.3 + tailchat-server-sdk: + specifier: '*' + version: link:../../packages/sdk + devDependencies: + '@types/react': + specifier: 18.0.20 + version: 18.0.20 + mini-star: + specifier: '*' + version: 1.3.1 + + server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher: + devDependencies: + '@types/styled-components': + specifier: ^5.1.26 + version: 5.1.26 + react: + specifier: 18.2.0 + version: 18.2.0 + styled-components: + specifier: ^5.3.6 + version: 5.3.6(react-dom@18.2.0)(react-is@18.2.0)(react@18.2.0) + server/test/demo/openapi-client: dependencies: axios: @@ -7068,7 +7096,7 @@ packages: '@docusaurus/plugin-content-pages': 2.3.1(esbuild@0.15.18)(eslint@8.34.0)(react-dom@17.0.2)(react@17.0.2)(typescript@4.9.5) '@docusaurus/utils': 2.3.1(@docusaurus/types@2.3.1)(esbuild@0.15.18) '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 17.0.53 '@types/react-router-config': 5.0.6 clsx: 1.2.1 parse-numeric-range: 1.3.0 @@ -7158,7 +7186,7 @@ packages: react-dom: ^16.8.4 || ^17.0.0 dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 17.0.53 commander: 5.1.0 joi: 17.8.3 react: 17.0.2 @@ -8284,7 +8312,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.13.0 + '@types/node': 18.14.1 '@types/yargs': 15.0.14 chalk: 4.1.2 dev: true @@ -9493,7 +9521,7 @@ packages: '@sentry/node': 6.19.7 pino-pretty: 6.0.0 pump: 3.0.0 - readable-stream: 3.6.0 + readable-stream: 3.6.1 split2: 4.1.0 transitivePeerDependencies: - supports-color @@ -9599,7 +9627,7 @@ packages: '@types/throttle-debounce': 2.1.0 case-anything: 2.1.10 dash-get: 1.0.2 - deepmerge: 4.2.2 + deepmerge: 4.3.0 fast-deep-equal: 3.1.3 make-error: 1.3.6 object.omit: 3.0.0 @@ -11097,22 +11125,6 @@ packages: rollup: 2.79.1 dev: true - /@rollup/plugin-commonjs@19.0.2(rollup@2.78.1): - resolution: {integrity: sha512-gBjarfqlC7qs0AutpRW/hrFNm+cd2/QKxhwyFa+srbg1oX7rDsEU3l+W7LAUhsAp9mPJMAkXDhLbQaVwEaE8bA==} - engines: {node: '>= 8.0.0'} - peerDependencies: - rollup: ^2.38.3 - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.78.1) - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 7.2.3 - is-reference: 1.2.1 - magic-string: 0.25.9 - resolve: 1.22.1 - rollup: 2.78.1 - dev: true - /@rollup/plugin-commonjs@19.0.2(rollup@2.79.1): resolution: {integrity: sha512-gBjarfqlC7qs0AutpRW/hrFNm+cd2/QKxhwyFa+srbg1oX7rDsEU3l+W7LAUhsAp9mPJMAkXDhLbQaVwEaE8bA==} engines: {node: '>= 8.0.0'} @@ -11155,15 +11167,6 @@ packages: rollup: 2.78.1 dev: true - /@rollup/plugin-json@4.1.0(rollup@2.78.1): - resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} - peerDependencies: - rollup: ^1.20.0 || ^2.0.0 - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.78.1) - rollup: 2.78.1 - dev: true - /@rollup/plugin-json@4.1.0(rollup@2.79.1): resolution: {integrity: sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==} peerDependencies: @@ -11187,21 +11190,6 @@ packages: rollup: 2.79.1 dev: true - /@rollup/plugin-node-resolve@13.3.0(rollup@2.78.1): - resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} - engines: {node: '>= 10.0.0'} - peerDependencies: - rollup: ^2.42.0 - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.78.1) - '@types/resolve': 1.17.1 - deepmerge: 4.3.0 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.1 - rollup: 2.78.1 - dev: true - /@rollup/plugin-node-resolve@13.3.0(rollup@2.79.1): resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} engines: {node: '>= 10.0.0'} @@ -11225,7 +11213,7 @@ packages: '@rollup/pluginutils': 3.1.0(rollup@2.79.1) '@types/resolve': 1.17.1 builtin-modules: 3.3.0 - deepmerge: 4.2.2 + deepmerge: 4.3.0 is-module: 1.0.0 resolve: 1.22.1 rollup: 2.79.1 @@ -11254,18 +11242,6 @@ packages: rollup: 2.79.1 dev: true - /@rollup/plugin-url@6.1.0(rollup@2.78.1): - resolution: {integrity: sha512-FJNWBnBB7nLzbcaGmu1no+U/LlRR67TtgfRFP+VEKSrWlDTE6n9jMns/N4Q/VL6l4x6kTHQX4HQfwTcldaAfHQ==} - engines: {node: '>=10.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0 - dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.78.1) - make-dir: 3.1.0 - mime: 2.6.0 - rollup: 2.78.1 - dev: true - /@rollup/plugin-url@6.1.0(rollup@2.79.1): resolution: {integrity: sha512-FJNWBnBB7nLzbcaGmu1no+U/LlRR67TtgfRFP+VEKSrWlDTE6n9jMns/N4Q/VL6l4x6kTHQX4HQfwTcldaAfHQ==} engines: {node: '>=10.0.0'} @@ -12030,7 +12006,7 @@ packages: '@storybook/store': 6.5.10(react-dom@18.2.0)(react@18.2.0) '@storybook/theming': 6.5.10(react-dom@18.2.0)(react@18.2.0) '@storybook/ui': 6.5.10(react-dom@18.2.0)(react@18.2.0) - '@types/node': 16.11.64 + '@types/node': 16.11.7 '@types/webpack': 4.41.32 autoprefixer: 9.8.8 babel-loader: 8.2.5(@babel/core@7.21.0)(webpack@4.46.0) @@ -12265,7 +12241,7 @@ packages: '@babel/register': 7.18.9(@babel/core@7.21.0) '@storybook/node-logger': 6.5.10 '@storybook/semver': 7.3.2 - '@types/node': 16.11.64 + '@types/node': 16.11.7 '@types/pretty-hrtime': 1.0.1 babel-loader: 8.2.5(@babel/core@7.21.0)(webpack@4.46.0) babel-plugin-macros: 3.1.0 @@ -12336,7 +12312,7 @@ packages: '@storybook/semver': 7.3.2 '@storybook/store': 6.5.10(react-dom@18.2.0)(react@18.2.0) '@storybook/telemetry': 6.5.10(eslint@8.34.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.7.4) - '@types/node': 16.11.64 + '@types/node': 16.11.7 '@types/node-fetch': 2.6.2 '@types/pretty-hrtime': 1.0.1 '@types/webpack': 4.41.32 @@ -12501,7 +12477,7 @@ packages: '@storybook/node-logger': 6.5.10 '@storybook/theming': 6.5.10(react-dom@18.2.0)(react@18.2.0) '@storybook/ui': 6.5.10(react-dom@18.2.0)(react@18.2.0) - '@types/node': 16.11.64 + '@types/node': 16.11.7 '@types/webpack': 4.41.32 babel-loader: 8.2.5(@babel/core@7.21.0)(webpack@4.46.0) case-sensitive-paths-webpack-plugin: 2.4.0 @@ -13463,7 +13439,7 @@ packages: resolution: {integrity: sha512-RMSSvSfs9kb0VzkvQ2NWobwnj7TxCA9vI/IjR9bDHqgAyVbu2T0DN4wiKVqomyDWqO7dPr/tErSfq7urQ1Q37g==} dependencies: fast-glob: 3.2.12 - minimatch: 5.1.1 + minimatch: 5.1.6 mkdirp: 1.0.4 path-browserify: 1.0.1 dev: false @@ -13710,7 +13686,7 @@ packages: '@types/connect': 3.4.35 '@types/express': 4.17.15 '@types/keygrip': 1.0.2 - '@types/node': 18.11.18 + '@types/node': 18.14.1 /@types/copy-webpack-plugin@8.0.1(esbuild@0.12.29)(webpack-cli@4.10.0): resolution: {integrity: sha512-TwEeGse0/wq+t3SFW0DEwroMS/cDkwVZT+vj7tMAYTp7llt/yz6NuW2n04X2M5P/kSfBQOORhrHAN2mqZdmybg==} @@ -13782,7 +13758,7 @@ packages: /@types/docker-modem@3.0.2: resolution: {integrity: sha512-qC7prjoEYR2QEe6SmCVfB1x3rfcQtUr1n4x89+3e0wSTMQ/KYCyf+/RAA9n2tllkkNc6//JMUZePdFRiGIWfaQ==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 '@types/ssh2': 1.11.6 dev: false @@ -13844,7 +13820,7 @@ packages: /@types/express-serve-static-core@4.17.31: resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 @@ -13919,7 +13895,7 @@ packages: /@types/graceful-fs@4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 dev: true /@types/graceful-fs@4.1.6: @@ -13939,7 +13915,7 @@ packages: /@types/hoist-non-react-statics@3.3.1: resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} dependencies: - '@types/react': 18.0.26 + '@types/react': 17.0.53 hoist-non-react-statics: 3.3.2 /@types/html-minifier-terser@5.1.2: @@ -14118,13 +14094,13 @@ packages: resolution: {integrity: sha512-Ny/PJkO6nxWAQnaet8q/oWz15lrfwvdvBpuY4treB0CSsBO1CG0fVuNLngR3m3bepQLd+E4c3Y3DlC2okpUvPw==} dependencies: '@types/fined': 1.1.3 - '@types/node': 18.13.0 + '@types/node': 18.14.1 dev: false /@types/loadable__component@5.13.4: resolution: {integrity: sha512-YhoCCxyuvP2XeZNbHbi8Wb9EMaUJuA2VGHxJffcQYrJKIKSkymJrhbzsf9y4zpTmr5pExAAEh5hbF628PAZ8Dg==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 dev: true /@types/lodash-es@4.17.7: @@ -14238,7 +14214,7 @@ packages: /@types/node-fetch@2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 form-data: 3.0.1 dev: true @@ -14263,6 +14239,7 @@ packages: /@types/node@18.13.0: resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==} + dev: true /@types/node@18.14.1: resolution: {integrity: sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ==} @@ -14343,20 +14320,20 @@ packages: /@types/pino-pretty@4.7.5: resolution: {integrity: sha512-rfHe6VIknk14DymxGqc9maGsRe8/HQSvM2u46EAz2XrS92qsAJnW16dpdFejBuZKD8cRJX6Aw6uVZqIQctMpAg==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 '@types/pino': 6.3.12 dev: false /@types/pino-std-serializers@2.4.1: resolution: {integrity: sha512-17XcksO47M24IVTVKPeAByWUd3Oez7EbIjXpSbzMPhXVzgjGtrOa49gKBwxH9hb8dKv58OelsWQ+A1G1l9S3wQ==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 dev: false /@types/pino@6.3.12: resolution: {integrity: sha512-dsLRTq8/4UtVSpJgl9aeqHvbh6pzdmjYD3C092SYgLD2TyoCqHpTJk6vp8DvCTGGc7iowZ2MoiYiVUUCcu7muw==} dependencies: - '@types/node': 18.11.18 + '@types/node': 18.14.1 '@types/pino-pretty': 4.7.5 '@types/pino-std-serializers': 2.4.1 sonic-boom: 2.8.0 @@ -14393,7 +14370,7 @@ packages: /@types/react-canvas-draw@1.2.0: resolution: {integrity: sha512-ZrGtORZSsF5ErpRiWw2/Yqwkf7CyCgcNfLnABb6kjCTsx8AjcepO3pkKOOYS7MqGyLHALB6GLuSALl1PtEpRhA==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 dev: true /@types/react-color@3.0.6: @@ -14406,23 +14383,23 @@ packages: /@types/react-dom@18.0.10: resolution: {integrity: sha512-E42GW/JA4Qv15wQdqJq8DL4JhNpB3prJgjgapN3qJT9K2zO5IIAQh4VXvCEDupoqAwnz0cY4RlXeC/ajX5SFHg==} dependencies: - '@types/react': 18.0.26 + '@types/react': 17.0.53 /@types/react-dom@18.0.6: resolution: {integrity: sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 /@types/react-helmet@6.1.6: resolution: {integrity: sha512-ZKcoOdW/Tg+kiUbkFCBtvDw0k3nD4HJ/h/B9yWxN4uDO8OkRksWTO+EL+z/Qu3aHTeTll3Ro0Cc/8UhwBCMG5A==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 dev: true /@types/react-highlight@0.12.5: resolution: {integrity: sha512-P8+mTxltxDdQ+99l+pjn40clziSbNrZy5d5zmvG+j3jKzokAhCoCZlIRmmnFgETTYubuqwKjvXSlvesBZcTfvQ==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 dev: true /@types/react-is@17.0.3: @@ -14434,45 +14411,45 @@ packages: /@types/react-mentions@4.1.8: resolution: {integrity: sha512-Go86ozdnh0FTNbiGiDPAcNqYqtab9iGzLOgZPYUKrnhI4539jGzfJtP6rFHcXgi9Koe58yhkeyKYib6Ucul/sQ==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 dev: true /@types/react-router-config@5.0.6: resolution: {integrity: sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 17.0.53 '@types/react-router': 5.1.20 /@types/react-router-dom@5.3.3: resolution: {integrity: sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.20 + '@types/react': 17.0.53 '@types/react-router': 5.1.20 /@types/react-router@5.1.18: resolution: {integrity: sha512-YYknwy0D0iOwKQgz9v8nOzt2J6l4gouBmDnWqUUznltOTaon+r8US8ky8HvN0tXvc38U9m6z/t2RsVsnd1zM0g==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 17.0.53 dev: true /@types/react-router@5.1.20: resolution: {integrity: sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.20 + '@types/react': 17.0.53 /@types/react-transition-group@4.4.5: resolution: {integrity: sha512-juKD/eiSM3/xZYzjuzH6ZwpP+/lejltmiS3QEzV/vmb/Q8+HfDmxu+Baga8UEMGBqV88Nbg4l2hY/K2DkyaLLA==} dependencies: - '@types/react': 18.0.26 + '@types/react': 17.0.53 /@types/react-virtualized-auto-sizer@1.0.1: resolution: {integrity: sha512-GH8sAnBEM5GV9LTeiz56r4ZhMOUSrP43tAQNSRVxNexDjcNKLCEtnxusAItg1owFUFE6k0NslV26gqVClVvong==} dependencies: - '@types/react': 18.0.20 + '@types/react': 17.0.53 dev: true /@types/react-virtualized@9.21.21: @@ -14605,7 +14582,7 @@ packages: /@types/ssh2@1.11.6: resolution: {integrity: sha512-8Mf6bhzYYBLEB/G6COux7DS/F5bCWwojv/qFo2yH/e4cLzAavJnxvFXrYW59iKfXdhG6OmzJcXDasgOb/s0rxw==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 dev: false /@types/stack-utils@2.0.1: @@ -14616,7 +14593,7 @@ packages: resolution: {integrity: sha512-KuKJ9Z6xb93uJiIyxo/+ksS7yLjS1KzG6iv5i78dhVg/X3u5t1H7juRWqVmodIdz6wGVaIApo1u01kmFRdJHVw==} dependencies: '@types/hoist-non-react-statics': 3.3.1 - '@types/react': 18.0.26 + '@types/react': 17.0.53 csstype: 3.1.1 dev: true @@ -14647,7 +14624,7 @@ packages: /@types/through@0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 /@types/tinycon@0.6.3: resolution: {integrity: sha512-TC42m8KAyp3AqyZKRXVkk5Qy+oIU8zo2U3362i16Qan0JgZNzLawO7oYnin4BJOy8FSZfOadYYvUWQnpaXoZwg==} @@ -14732,7 +14709,7 @@ packages: /@types/webpack@4.41.32: resolution: {integrity: sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.0 '@types/webpack-sources': 3.2.0 @@ -14743,7 +14720,7 @@ packages: /@types/webpack@4.41.33: resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} dependencies: - '@types/node': 15.14.9 + '@types/node': 18.14.1 '@types/tapable': 1.0.8 '@types/uglify-js': 3.17.1 '@types/webpack-sources': 3.2.0 @@ -14767,7 +14744,7 @@ packages: /@types/whatwg-url@8.2.2: resolution: {integrity: sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 '@types/webidl-conversions': 6.1.1 /@types/ws@8.5.4: @@ -15573,7 +15550,7 @@ packages: globalthis: 1.0.3 object.entries: 1.1.6 object.fromentries: 2.0.6 - object.getownpropertydescriptors: 2.1.4 + object.getownpropertydescriptors: 2.1.5 object.values: 1.1.6 promise.allsettled: 1.0.5 promise.prototype.finally: 3.1.3 @@ -15872,7 +15849,7 @@ packages: engines: {node: '>=10'} dependencies: delegates: 1.0.0 - readable-stream: 3.6.0 + readable-stream: 3.6.1 dev: true /arg@4.1.3: @@ -15996,8 +15973,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 es-shim-unscopables: 1.0.0 dev: true @@ -16016,10 +15993,10 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 es-array-method-boxes-properly: 1.0.0 - get-intrinsic: 1.1.3 + get-intrinsic: 1.2.0 is-string: 1.0.7 dev: false @@ -16028,8 +16005,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 es-array-method-boxes-properly: 1.0.0 is-string: 1.0.7 dev: true @@ -16045,17 +16022,6 @@ packages: is-string: 1.0.7 dev: true - /array.prototype.reduce@1.0.4: - resolution: {integrity: sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 - es-array-method-boxes-properly: 1.0.0 - is-string: 1.0.7 - dev: true - /array.prototype.reduce@1.0.5: resolution: {integrity: sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==} engines: {node: '>= 0.4'} @@ -16810,7 +16776,7 @@ packages: /bl@1.2.3: resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} dependencies: - readable-stream: 2.3.7 + readable-stream: 2.3.8 safe-buffer: 5.2.1 dev: true @@ -16831,7 +16797,7 @@ packages: /block-stream2@2.1.0: resolution: {integrity: sha512-suhjmLI57Ewpmq00qaygS8UgEq2ly2PCItenIyhMqVjo4t4pGzqMvfgJuX8iWTeSDdfSSqS6j38fL4ToNL7Pfg==} dependencies: - readable-stream: 3.6.0 + readable-stream: 3.6.1 dev: false /bluebird@3.7.2: @@ -17061,7 +17027,7 @@ packages: elliptic: 6.5.4 inherits: 2.0.4 parse-asn1: 5.1.6 - readable-stream: 3.6.0 + readable-stream: 3.6.1 safe-buffer: 5.2.1 /browserify-zlib@0.1.4: @@ -17081,9 +17047,9 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001418 - electron-to-chromium: 1.4.276 - node-releases: 2.0.6 + caniuse-lite: 1.0.30001457 + electron-to-chromium: 1.4.310 + node-releases: 2.0.10 update-browserslist-db: 1.0.10(browserslist@4.21.3) /browserslist@4.21.5: @@ -17486,9 +17452,6 @@ packages: lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 - /caniuse-lite@1.0.30001418: - resolution: {integrity: sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==} - /caniuse-lite@1.0.30001457: resolution: {integrity: sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==} @@ -17910,7 +17873,6 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: true /clone-buffer@1.0.0: resolution: {integrity: sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==} @@ -18844,17 +18806,6 @@ packages: path-type: 4.0.0 yaml: 1.10.2 - /cosmiconfig@7.0.1: - resolution: {integrity: sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==} - engines: {node: '>=10'} - dependencies: - '@types/parse-json': 4.0.0 - import-fresh: 3.3.0 - parse-json: 5.2.0 - path-type: 4.0.0 - yaml: 1.10.2 - dev: true - /cosmiconfig@7.1.0: resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==} engines: {node: '>=10'} @@ -19791,13 +19742,6 @@ packages: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} - /define-properties@1.1.4: - resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} engines: {node: '>= 0.4'} @@ -20351,9 +20295,6 @@ packages: dependencies: jake: 10.8.5 - /electron-to-chromium@1.4.276: - resolution: {integrity: sha512-EpuHPqu8YhonqLBXHoU6hDJCD98FCe6KDoet3/gY1qsQ6usjJoHqBH2YIVs8FXaAtHwVL8Uqa/fsYao/vq9VWQ==} - /electron-to-chromium@1.4.310: resolution: {integrity: sha512-/xlATgfwkm5uDDwLw5nt/MNEf7c1oazLURMZLy39vOioGYyYzLWIDT8fZMJak6qTiAJ7udFTy7JG7ziyjNutiA==} @@ -20483,7 +20424,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 18.13.0 + '@types/node': 18.14.1 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -20572,36 +20513,6 @@ packages: dependencies: stackframe: 1.3.4 - /es-abstract@1.20.5: - resolution: {integrity: sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 - get-symbol-description: 1.0.0 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-symbols: 1.0.3 - internal-slot: 1.0.4 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-weakref: 1.0.2 - object-inspect: 1.12.2 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 - safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - unbox-primitive: 1.0.2 - /es-abstract@1.21.1: resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} engines: {node: '>= 0.4'} @@ -21482,7 +21393,7 @@ packages: resolution: {integrity: sha512-E4QHYCh+9fyfdBEb8uKJ8p6HD4qq/sUSHBq83lRNlLJp2TQKEg2nFJYbVdC+M3QzaV19dODe43lgjQWVaIpbyQ==} engines: {node: '>=v12.22.9'} dependencies: - glob: 8.0.3 + glob: 8.1.0 graceful-fs: 4.2.10 handlebars: 4.7.7 dev: false @@ -22351,7 +22262,7 @@ packages: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /fromentries@1.3.2: @@ -22429,7 +22340,7 @@ packages: graceful-fs: 4.2.10 iferr: 0.1.5 imurmurhash: 0.1.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /fs.realpath@1.0.0: @@ -22522,13 +22433,6 @@ packages: optional: true dev: false - /get-intrinsic@1.1.3: - resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.3 - /get-intrinsic@1.2.0: resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} dependencies: @@ -22766,17 +22670,6 @@ packages: once: 1.4.0 path-is-absolute: 1.0.1 - /glob@8.0.3: - resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==} - engines: {node: '>=12'} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.1 - once: 1.4.0 - dev: false - /glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} @@ -23284,7 +23177,7 @@ packages: engines: {node: '>=4'} dependencies: inherits: 2.0.4 - readable-stream: 3.6.0 + readable-stream: 3.6.1 safe-buffer: 5.2.1 /hash.js@1.1.7: @@ -24279,14 +24172,6 @@ packages: wrap-ansi: 8.1.0 dev: true - /internal-slot@1.0.4: - resolution: {integrity: sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.1.3 - has: 1.0.3 - side-channel: 1.0.4 - /internal-slot@1.0.5: resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} engines: {node: '>= 0.4'} @@ -25351,7 +25236,7 @@ packages: dependencies: '@jest/types': 26.6.2 '@types/graceful-fs': 4.1.5 - '@types/node': 18.13.0 + '@types/node': 18.14.1 anymatch: 3.1.3 fb-watchman: 2.0.1 graceful-fs: 4.2.10 @@ -25594,7 +25479,7 @@ packages: resolution: {integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==} engines: {node: '>= 10.14.2'} dependencies: - '@types/node': 18.13.0 + '@types/node': 18.14.1 graceful-fs: 4.2.10 dev: true @@ -25641,7 +25526,7 @@ packages: engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 18.13.0 + '@types/node': 18.14.1 chalk: 4.1.2 graceful-fs: 4.2.10 is-ci: 2.0.0 @@ -25962,10 +25847,6 @@ packages: engines: {node: '>=6'} hasBin: true - /jsonc-parser@3.1.0: - resolution: {integrity: sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==} - dev: true - /jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} @@ -27252,7 +27133,7 @@ packages: resolution: {integrity: sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==} dependencies: errno: 0.1.8 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /memory-fs@0.5.0: @@ -27260,7 +27141,7 @@ packages: engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} dependencies: errno: 0.1.8 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /memory-pager@1.5.0: @@ -27805,19 +27686,19 @@ packages: resolution: {integrity: sha512-u9Rw8mPZibaAkEVXBsOQJ1irAURTgjqdKoITFd24+KxIGVXCDK+RYR8KjKRF99VLaCbK6TwTqiJ6iNsqq0G+wA==} hasBin: true dependencies: - '@rollup/plugin-commonjs': 19.0.2(rollup@2.78.1) - '@rollup/plugin-json': 4.1.0(rollup@2.78.1) - '@rollup/plugin-node-resolve': 13.3.0(rollup@2.78.1) - '@rollup/plugin-url': 6.1.0(rollup@2.78.1) - cosmiconfig: 7.0.1 + '@rollup/plugin-commonjs': 19.0.2(rollup@2.79.1) + '@rollup/plugin-json': 4.1.0(rollup@2.79.1) + '@rollup/plugin-node-resolve': 13.3.0(rollup@2.79.1) + '@rollup/plugin-url': 6.1.0(rollup@2.79.1) + cosmiconfig: 7.1.0 esbuild: 0.12.29 fs-extra: 9.1.0 - inquirer: 8.2.4 + inquirer: 8.2.5 ora: 5.4.1 rimraf: 3.0.2 - rollup: 2.78.1 - rollup-plugin-esbuild: 4.10.1(esbuild@0.12.29)(rollup@2.78.1) - rollup-plugin-styles: 3.14.1(rollup@2.78.1) + rollup: 2.79.1 + rollup-plugin-esbuild: 4.10.3(esbuild@0.12.29)(rollup@2.79.1) + rollup-plugin-styles: 3.14.1(rollup@2.79.1) yargs: 16.2.0 transitivePeerDependencies: - supports-color @@ -28265,7 +28146,7 @@ packages: lodash: 4.17.21 lru-cache: 6.0.0 nats: 1.4.12 - node-fetch: 2.6.7 + node-fetch: 2.6.9 recursive-watch: 1.1.4 redlock: 4.2.0 transitivePeerDependencies: @@ -28716,7 +28597,7 @@ packages: process: 0.11.10 punycode: 1.3.2 querystring-es3: 0.2.1 - readable-stream: 2.3.7 + readable-stream: 2.3.8 stream-browserify: 2.0.2 stream-http: 2.8.3 string_decoder: 1.3.0 @@ -28782,9 +28663,6 @@ packages: /node-releases@2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} - /node-releases@2.0.6: - resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} - /nodemailer@6.7.8: resolution: {integrity: sha512-2zaTFGqZixVmTxpJRCFC+Vk5eGRd/fYtvIR+dl5u9QXLTQWGIf48x/JXvo58g9sa0bU6To04XUv554Paykum3g==} engines: {node: '>=6.0.0'} @@ -29004,9 +28882,6 @@ packages: engines: {node: '>= 6'} dev: false - /object-inspect@1.12.2: - resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} - /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} @@ -29064,16 +28939,6 @@ packages: es-abstract: 1.21.1 dev: true - /object.getownpropertydescriptors@2.1.4: - resolution: {integrity: sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ==} - engines: {node: '>= 0.8'} - dependencies: - array.prototype.reduce: 1.0.4 - call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 - dev: true - /object.getownpropertydescriptors@2.1.5: resolution: {integrity: sha512-yDNzckpM6ntyQiGTik1fKV1DcVDRS+w8bvpWNCBanvH5LfRX9O8WTHqQzG4RZwRAM4I0oU7TV11Lj5v0g20ibw==} engines: {node: '>= 0.8'} @@ -29152,7 +29017,7 @@ packages: cacheable-lookup: 6.1.0 debug: 4.3.4(supports-color@9.2.2) ejs: 3.1.8 - got: 11.8.5 + got: 11.8.6 jose: 4.9.0 jsesc: 3.0.2 koa: 2.13.4 @@ -29596,7 +29461,7 @@ packages: dependencies: cyclist: 1.0.1 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /param-case@2.1.1: @@ -30039,7 +29904,7 @@ packages: jmespath: 0.15.0 joycon: 3.1.1 pump: 3.0.0 - readable-stream: 3.6.0 + readable-stream: 3.6.1 rfdc: 1.3.0 split2: 3.2.2 strip-json-comments: 3.1.1 @@ -31139,9 +31004,9 @@ packages: dependencies: array.prototype.map: 1.0.4 call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 - get-intrinsic: 1.1.3 + define-properties: 1.2.0 + es-abstract: 1.21.1 + get-intrinsic: 1.2.0 iterate-value: 1.0.2 dev: true @@ -31162,8 +31027,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 dev: true /promise@7.3.1: @@ -33418,18 +33283,6 @@ packages: string_decoder: 0.10.31 dev: true - /readable-stream@2.3.7: - resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: true - /readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: @@ -33448,6 +33301,7 @@ packages: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 + dev: false /readable-stream@3.6.1: resolution: {integrity: sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ==} @@ -33470,7 +33324,7 @@ packages: dependencies: graceful-fs: 4.2.10 micromatch: 3.1.10 - readable-stream: 2.3.7 + readable-stream: 2.3.8 transitivePeerDependencies: - supports-color dev: true @@ -34309,24 +34163,6 @@ packages: is-plain-object: 3.0.1 dev: true - /rollup-plugin-esbuild@4.10.1(esbuild@0.12.29)(rollup@2.78.1): - resolution: {integrity: sha512-/ymcRB283zjFp1JTBXO8ekxv0c9vRc2L6OTljghsLthQ4vqeDSDWa9BVz1tHiVrx6SbUnUpDPLC0K/MXK7j5TA==} - engines: {node: '>=12'} - peerDependencies: - esbuild: '>=0.10.1' - rollup: ^1.20.0 || ^2.0.0 - dependencies: - '@rollup/pluginutils': 4.2.1 - debug: 4.3.4(supports-color@9.2.2) - es-module-lexer: 0.9.3 - esbuild: 0.12.29 - joycon: 3.1.1 - jsonc-parser: 3.1.0 - rollup: 2.78.1 - transitivePeerDependencies: - - supports-color - dev: true - /rollup-plugin-esbuild@4.10.3(esbuild@0.12.29)(rollup@2.79.1): resolution: {integrity: sha512-RILwUCgnCL5vo8vyZ/ZpwcqRuE5KmLizEv6BujBQfgXFZ6ggcS0FiYvQN+gsTJfWCMaU37l0Fosh4eEufyO97Q==} engines: {node: '>=12'} @@ -34401,33 +34237,6 @@ packages: transitivePeerDependencies: - supports-color - /rollup-plugin-styles@3.14.1(rollup@2.78.1): - resolution: {integrity: sha512-0JodP26O3WZ8320X3sBn5S2SOPv9Al2tLyOmLco+H2UqLjbmycM9KWGypLjcDuIEWwa0oLYiXpViMmO2yyeqIA==} - engines: {node: '>=10'} - peerDependencies: - rollup: ^2.2.0 - dependencies: - '@rollup/pluginutils': 4.2.1 - '@types/cssnano': 4.0.1 - cosmiconfig: 7.1.0 - cssnano: 4.1.11 - fs-extra: 9.1.0 - icss-utils: 5.1.0(postcss@8.4.21) - mime-types: 2.1.35 - p-queue: 6.6.2 - postcss: 8.4.21 - postcss-modules-extract-imports: 3.0.0(postcss@8.4.21) - postcss-modules-local-by-default: 4.0.0(postcss@8.4.21) - postcss-modules-scope: 3.0.0(postcss@8.4.21) - postcss-modules-values: 4.0.0(postcss@8.4.21) - postcss-value-parser: 4.2.0 - query-string: 6.14.1 - resolve: 1.22.1 - rollup: 2.78.1 - source-map: 0.7.4 - tslib: 2.5.0 - dev: true - /rollup-plugin-styles@3.14.1(rollup@2.79.1): resolution: {integrity: sha512-0JodP26O3WZ8320X3sBn5S2SOPv9Al2tLyOmLco+H2UqLjbmycM9KWGypLjcDuIEWwa0oLYiXpViMmO2yyeqIA==} engines: {node: '>=10'} @@ -35697,7 +35506,7 @@ packages: resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: true /stream-each@1.2.3: @@ -35712,7 +35521,7 @@ packages: dependencies: builtin-status-codes: 3.0.0 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 to-arraybuffer: 1.0.1 xtend: 4.0.2 dev: true @@ -35800,8 +35609,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 dev: true /string.prototype.padstart@3.1.3: @@ -35809,8 +35618,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 dev: true /string.prototype.trim@1.2.7: @@ -35818,8 +35627,8 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 - es-abstract: 1.20.5 + define-properties: 1.2.0 + es-abstract: 1.21.1 dev: false /string.prototype.trimend@1.0.6: @@ -36135,8 +35944,8 @@ packages: methods: 1.1.2 mime: 2.6.0 qs: 6.11.0 - readable-stream: 3.6.0 - semver: 7.3.7 + readable-stream: 3.6.1 + semver: 7.3.8 transitivePeerDependencies: - supports-color dev: true @@ -36282,7 +36091,7 @@ packages: call-bind: 1.0.2 get-symbol-description: 1.0.0 has-symbols: 1.0.3 - object.getownpropertydescriptors: 2.1.4 + object.getownpropertydescriptors: 2.1.5 dev: true /synchronous-promise@2.0.15: @@ -36484,7 +36293,7 @@ packages: buffer-alloc: 1.2.0 end-of-stream: 1.4.4 fs-constants: 1.0.0 - readable-stream: 2.3.7 + readable-stream: 2.3.8 to-buffer: 1.1.1 xtend: 4.0.2 dev: true @@ -36774,7 +36583,7 @@ packages: resolution: {integrity: sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==} dependencies: inherits: 2.0.4 - readable-stream: 3.6.0 + readable-stream: 3.6.1 dev: false /through2@4.0.2: @@ -37862,7 +37671,7 @@ packages: tslib: 2.5.0 uuid: 8.3.2 xml2js: 0.4.23 - yargs: 17.5.1 + yargs: 17.7.1 transitivePeerDependencies: - supports-color dev: false @@ -38545,8 +38354,8 @@ packages: /util.promisify@1.0.0: resolution: {integrity: sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==} dependencies: - define-properties: 1.1.4 - object.getownpropertydescriptors: 2.1.4 + define-properties: 1.2.0 + object.getownpropertydescriptors: 2.1.5 dev: true /util.promisify@1.0.1: @@ -38803,7 +38612,7 @@ packages: optional: true dependencies: esbuild: 0.15.18 - postcss: 8.4.20 + postcss: 8.4.21 resolve: 1.22.1 rollup: 2.78.1 optionalDependencies: @@ -39952,7 +39761,6 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: true /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} diff --git a/server/plugins/com.msgbyte.wxpusher/.ministarrc.js b/server/plugins/com.msgbyte.wxpusher/.ministarrc.js new file mode 100644 index 00000000..3c4db179 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/.ministarrc.js @@ -0,0 +1,14 @@ +const path = require('path'); + +module.exports = { + externalDeps: [ + 'react', + 'react-router', + 'axios', + 'styled-components', + 'zustand', + 'zustand/middleware/immer', + ], + pluginRoot: path.resolve(__dirname, './web'), + outDir: path.resolve(__dirname, '../../public'), +}; diff --git a/server/plugins/com.msgbyte.wxpusher/models/wxpusher-user.ts b/server/plugins/com.msgbyte.wxpusher/models/wxpusher-user.ts new file mode 100644 index 00000000..968da931 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/models/wxpusher-user.ts @@ -0,0 +1,26 @@ +import { db } from 'tailchat-server-sdk'; +const { getModelForClass, prop, modelOptions, TimeStamps } = db; + +@modelOptions({ + options: { + customName: 'p_wxpusher_user', + }, +}) +export class WXPusherUser extends TimeStamps implements db.Base { + _id: db.Types.ObjectId; + id: string; + + @prop() + userId: string; + + @prop() + wxpusherUserId: string; +} + +export type WXPusherUserDocument = db.DocumentType; + +const model = getModelForClass(WXPusherUser); + +export type WXPusherUserModel = typeof model; + +export default model; diff --git a/server/plugins/com.msgbyte.wxpusher/package.json b/server/plugins/com.msgbyte.wxpusher/package.json new file mode 100644 index 00000000..f4f905c4 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/package.json @@ -0,0 +1,21 @@ +{ + "name": "tailchat-plugin-wxpusher", + "version": "1.0.0", + "main": "index.js", + "author": "moonrailgun", + "description": "Add support for wxpusher to notify user", + "license": "MIT", + "private": true, + "scripts": { + "build:web": "ministar buildPlugin all", + "build:web:watch": "ministar watchPlugin all" + }, + "devDependencies": { + "@types/react": "18.0.20", + "mini-star": "*" + }, + "dependencies": { + "got": "^11.8.3", + "tailchat-server-sdk": "*" + } +} diff --git a/server/plugins/com.msgbyte.wxpusher/services/wxpusher.service.dev.ts b/server/plugins/com.msgbyte.wxpusher/services/wxpusher.service.dev.ts new file mode 100644 index 00000000..5ad17c58 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/services/wxpusher.service.dev.ts @@ -0,0 +1,142 @@ +import { TcService, TcDbService } from 'tailchat-server-sdk'; +import type { + WXPusherUserDocument, + WXPusherUserModel, +} from '../models/wxpusher-user'; +import got from 'got'; +import type { TcContext } from 'tailchat-server-sdk'; + +/** + * wxpusher + * + * Add support for wxpusher to notify user + */ +interface WxpusherService + extends TcService, + TcDbService {} +class WxpusherService extends TcService { + get serviceName() { + return 'plugin:com.msgbyte.wxpusher'; + } + + get appToken() { + return process.env.WXPUSHER_APP_TOKEN; + } + + /** + * 返回服务是否可用 + */ + get serverAvailable(): boolean { + return Boolean(this.appToken); + } + + onInit() { + this.registerLocalDb(require('../models/wxpusher-user').default); + this.registerAvailableAction(() => this.serverAvailable); + + if (!this.serverAvailable) { + console.warn( + '[plugin:com.msgbyte.wxpusher] require env: WXPUSHER_APP_TOKEN' + ); + return; + } + + this.registerAction('getWXPusherUserId', this.getWXPusherUserId); + this.registerAction('createQRCode', this.createQRCode); + this.registerAction('callback', this.callback, { + params: { + action: 'string', + data: 'any', + }, + }); + + this.registerAuthWhitelist(['/callback']); + } + + async getWXPusherUserId(ctx: TcContext) { + const userId = ctx.meta.userId; + + return await this.findUserWxpusherUid(userId); + } + + async createQRCode(ctx: TcContext) { + const userId = ctx.meta.userId; + + const json = await got + .post('https://wxpusher.zjiecode.com/api/fun/create/qrcode', { + json: { + appToken: this.appToken, // 必填,appToken,前面有说明,应用的标志 + extra: userId, // 必填,二维码携带的参数,最长64位 + validTime: 1800, // 可选,二维码的有效期,默认30分钟,最长30天,单位是秒 + }, + }) + .json(); + + return json; + } + + async callback( + ctx: TcContext<{ + action: string; + data: any; + }> + ) { + const { action, data } = ctx.params; + + if (action === 'app_subscribe') { + this.logger.info('data', data); + // Reference: https://wxpusher.zjiecode.com/docs/#/?id=subscribe-callback + const userId = data.extra; + const wxpusherUserId = data.uid; + + const record = await this.adapter.model.findOne({ userId }); + if (!record) { + // 新增 + await this.adapter.model.create({ + userId, + wxpusherUserId, + }); + } else { + record.wxpusherUserId = wxpusherUserId; + await record.save(); + } + } + + return true; + } + + /** + * 查找wxpusher的用户id + */ + async findUserWxpusherUid(userId: string): Promise { + const user = await this.adapter.model.findOne({ userId }); + if (!user) { + return null; + } + + const uid = user.wxpusherUserId; + + return uid; + } + + /** + * 发送消息 + */ + async sendMessage(userId: string, content: string) { + const uid = await this.findUserWxpusherUid(userId); + if (!uid) { + console.warn('This user not bind wxpusher, skip!'); + return; + } + await got.post('https://wxpusher.zjiecode.com/api/send/message', { + json: { + appToken: this.appToken, + content, + contentType: 1, //内容类型 1表示文字 2表示html(只发送body标签内部的数据即可,不包括body标签) 3表示markdown + uids: [uid], + }, + }); + } +} + +export default WxpusherService; diff --git a/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/manifest.json b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/manifest.json new file mode 100644 index 00000000..01e31414 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/manifest.json @@ -0,0 +1,9 @@ +{ + "label": "wxpusher", + "name": "com.msgbyte.wxpusher", + "url": "{BACKEND}/plugins/com.msgbyte.wxpusher/index.js", + "version": "0.0.0", + "author": "moonrailgun", + "description": "Add support for wxpusher to notify user", + "requireRestart": true +} diff --git a/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/package.json b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/package.json new file mode 100644 index 00000000..c3c1d681 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/package.json @@ -0,0 +1,16 @@ +{ + "name": "@plugins/com.msgbyte.wxpusher", + "main": "src/index.tsx", + "version": "0.0.0", + "description": "Add support for wxpusher to notify user", + "private": true, + "scripts": { + "sync:declaration": "tailchat declaration github" + }, + "dependencies": {}, + "devDependencies": { + "@types/styled-components": "^5.1.26", + "react": "18.2.0", + "styled-components": "^5.3.6" + } +} diff --git a/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/src/index.tsx b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/src/index.tsx new file mode 100644 index 00000000..04ecbf7d --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/src/index.tsx @@ -0,0 +1 @@ +console.log('Plugin wxpusher is loaded'); diff --git a/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/tsconfig.json b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/tsconfig.json new file mode 100644 index 00000000..d9b47ed0 --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "jsx": "react", + "importsNotUsedAsValues": "error" + } +} diff --git a/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/types/tailchat.d.ts b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/types/tailchat.d.ts new file mode 100644 index 00000000..49f524ae --- /dev/null +++ b/server/plugins/com.msgbyte.wxpusher/web/plugins/com.msgbyte.wxpusher/types/tailchat.d.ts @@ -0,0 +1,2 @@ +declare module '@capital/common'; +declare module '@capital/component';