diff --git a/client/shared/cache/cache.ts b/client/shared/cache/cache.ts index 3d158916..8555b5a8 100644 --- a/client/shared/cache/cache.ts +++ b/client/shared/cache/cache.ts @@ -65,11 +65,23 @@ export async function getCachedRegistryPlugins(): Promise { fetchRegistryPlugins().catch(() => []), fetchServiceRegistryPlugins() .then((list) => - list.map((manifest) => ({ - ...manifest, - // 后端url策略。根据前端的url在获取时自动变更为当前链接的后端地址 - url: parseUrlStr(manifest.url), - })) + list.map((manifest) => { + const serviceManifest = { + ...manifest, + // 后端url策略。根据前端的url在获取时自动变更为当前链接的后端地址 + url: parseUrlStr(manifest.url), + }; + + if (manifest.icon) { + serviceManifest.icon = parseUrlStr(manifest.icon); + } + + if (manifest.documentUrl) { + serviceManifest.documentUrl = parseUrlStr(manifest.documentUrl); + } + + return serviceManifest; + }) ) .catch(() => []), fetchLocalStaticRegistryPlugins().catch(() => []), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 166849ed..9256d8c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -950,6 +950,8 @@ importers: '@types/react': 18.0.20 got: 11.8.6 mini-star: '*' + normalize-path: ^3.0.0 + rollup-plugin-copy: ^3.4.0 tailchat-server-sdk: '*' dependencies: got: 11.8.6 @@ -957,6 +959,8 @@ importers: devDependencies: '@types/react': 18.0.20 mini-star: 2.0.5 + normalize-path: 3.0.0 + rollup-plugin-copy: 3.4.0 server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora: specifiers: @@ -1585,6 +1589,19 @@ packages: browserslist: 4.21.3 semver: 6.3.0 + /@babel/helper-compilation-targets/7.18.9_@babel+core@7.20.5: + resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.18.13 + '@babel/core': 7.20.5 + '@babel/helper-validator-option': 7.18.6 + browserslist: 4.21.3 + semver: 6.3.0 + dev: true + /@babel/helper-compilation-targets/7.20.0_@babel+core@7.20.5: resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==} engines: {node: '>=6.9.0'} @@ -1615,6 +1632,24 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helper-create-class-features-plugin/7.18.13_@babel+core@7.20.5: + resolution: {integrity: sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.20.5 + '@babel/helper-annotate-as-pure': 7.18.6 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-member-expression-to-functions': 7.18.9 + '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/helper-replace-supers': 7.18.9 + '@babel/helper-split-export-declaration': 7.18.6 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/helper-create-class-features-plugin/7.20.5_@babel+core@7.20.5: resolution: {integrity: sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==} engines: {node: '>=6.9.0'} @@ -1643,6 +1678,17 @@ packages: '@babel/helper-annotate-as-pure': 7.18.6 regexpu-core: 5.1.0 + /@babel/helper-create-regexp-features-plugin/7.18.6_@babel+core@7.20.5: + resolution: {integrity: sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.20.5 + '@babel/helper-annotate-as-pure': 7.18.6 + regexpu-core: 5.1.0 + dev: true + /@babel/helper-create-regexp-features-plugin/7.20.5_@babel+core@7.20.5: resolution: {integrity: sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==} engines: {node: '>=6.9.0'} @@ -1818,7 +1864,7 @@ packages: '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-wrap-function': 7.18.11 - '@babel/types': 7.20.5 + '@babel/types': 7.18.13 transitivePeerDependencies: - supports-color dev: true @@ -1970,7 +2016,7 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/7.18.9_@babel+core@7.18.13: @@ -1991,8 +2037,8 @@ packages: '@babel/core': ^7.13.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-plugin-utils': 7.18.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.18.9 '@babel/plugin-proposal-optional-chaining': 7.18.9_@babel+core@7.20.5 dev: true @@ -2044,8 +2090,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-class-features-plugin': 7.20.5_@babel+core@7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-create-class-features-plugin': 7.18.13_@babel+core@7.20.5 + '@babel/helper-plugin-utils': 7.18.9 transitivePeerDependencies: - supports-color dev: true @@ -2070,8 +2116,8 @@ packages: '@babel/core': ^7.12.0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-class-features-plugin': 7.20.5_@babel+core@7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-create-class-features-plugin': 7.18.13_@babel+core@7.20.5 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-class-static-block': 7.14.5_@babel+core@7.20.5 transitivePeerDependencies: - supports-color @@ -2110,7 +2156,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.20.5 dev: true @@ -2142,7 +2188,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-export-namespace-from': 7.8.3_@babel+core@7.20.5 dev: true @@ -2163,7 +2209,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.20.5 dev: true @@ -2184,7 +2230,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.20.5 dev: true @@ -2205,7 +2251,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.20.5 dev: true @@ -2226,7 +2272,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.20.5 dev: true @@ -2284,7 +2330,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.20.5 dev: true @@ -2306,8 +2352,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-plugin-utils': 7.18.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.18.9 '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.20.5 dev: true @@ -2330,8 +2376,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-class-features-plugin': 7.20.5_@babel+core@7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-create-class-features-plugin': 7.18.13_@babel+core@7.20.5 + '@babel/helper-plugin-utils': 7.18.9 transitivePeerDependencies: - supports-color dev: true @@ -2382,8 +2428,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-regexp-features-plugin': 7.20.5_@babel+core@7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.20.5 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.18.13: @@ -2400,7 +2446,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.20.5: @@ -2426,7 +2472,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-class-static-block/7.14.5_@babel+core@7.18.13: @@ -2445,7 +2491,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-decorators/7.18.6_@babel+core@7.18.13: @@ -2472,7 +2518,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-export-default-from/7.18.6_@babel+core@7.18.13: @@ -2499,7 +2545,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-flow/7.18.6_@babel+core@7.18.13: @@ -2554,7 +2600,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-jsx/7.12.1_@babel+core@7.12.9: @@ -2588,7 +2634,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.18.13: @@ -2605,7 +2651,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.18.13: @@ -2622,7 +2668,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.12.9: @@ -2647,7 +2693,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.18.13: @@ -2664,7 +2710,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.18.13: @@ -2681,7 +2727,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-private-property-in-object/7.14.5_@babel+core@7.18.13: @@ -2700,7 +2746,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.18.13: @@ -2719,7 +2765,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.13: @@ -2757,7 +2803,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-async-to-generator/7.18.6_@babel+core@7.18.13: @@ -2781,7 +2827,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-module-imports': 7.18.6 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/helper-remap-async-to-generator': 7.18.9_@babel+core@7.20.5 transitivePeerDependencies: - supports-color @@ -2803,7 +2849,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-block-scoping/7.18.9_@babel+core@7.18.13: @@ -2879,7 +2925,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-destructuring/7.18.13_@babel+core@7.18.13: @@ -2918,8 +2964,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-regexp-features-plugin': 7.20.5_@babel+core@7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.20.5 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-duplicate-keys/7.18.9_@babel+core@7.18.13: @@ -2938,7 +2984,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-exponentiation-operator/7.18.6_@babel+core@7.18.13: @@ -2959,7 +3005,7 @@ packages: dependencies: '@babel/core': 7.20.5 '@babel/helper-builder-binary-assignment-operator-visitor': 7.18.9 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-flow-strip-types/7.18.9_@babel+core@7.18.13: @@ -2989,7 +3035,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-function-name/7.18.9_@babel+core@7.18.13: @@ -3010,9 +3056,9 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-compilation-targets': 7.20.0_@babel+core@7.20.5 - '@babel/helper-function-name': 7.19.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.20.5 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-literals/7.18.9_@babel+core@7.18.13: @@ -3031,7 +3077,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-member-expression-literals/7.18.6_@babel+core@7.18.13: @@ -3050,7 +3096,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-modules-amd/7.18.6_@babel+core@7.18.13: @@ -3156,8 +3202,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-module-transforms': 7.20.2 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-module-transforms': 7.18.9 + '@babel/helper-plugin-utils': 7.18.9 transitivePeerDependencies: - supports-color dev: true @@ -3199,7 +3245,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-object-super/7.18.6_@babel+core@7.18.13: @@ -3221,8 +3267,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 - '@babel/helper-replace-supers': 7.19.1 + '@babel/helper-plugin-utils': 7.18.9 + '@babel/helper-replace-supers': 7.18.9 transitivePeerDependencies: - supports-color dev: true @@ -3271,7 +3317,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-react-constant-elements/7.18.12_@babel+core@7.18.13: @@ -3382,7 +3428,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-runtime/7.18.10_@babel+core@7.18.13: @@ -3418,7 +3464,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-spread/7.18.9_@babel+core@7.18.13: @@ -3458,7 +3504,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-template-literals/7.18.9_@babel+core@7.18.13: @@ -3477,7 +3523,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-typeof-symbol/7.18.9_@babel+core@7.18.13: @@ -3496,7 +3542,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-typescript/7.18.12_@babel+core@7.18.13: @@ -3528,7 +3574,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/plugin-transform-unicode-regex/7.18.6_@babel+core@7.18.13: @@ -3548,8 +3594,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-create-regexp-features-plugin': 7.20.5_@babel+core@7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.20.5 + '@babel/helper-plugin-utils': 7.18.9 dev: true /@babel/polyfill/7.12.1: @@ -3761,10 +3807,10 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.20.5 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.18.9 '@babel/plugin-proposal-unicode-property-regex': 7.18.6_@babel+core@7.20.5 '@babel/plugin-transform-dotall-regex': 7.18.6_@babel+core@7.20.5 - '@babel/types': 7.20.5 + '@babel/types': 7.18.13 esutils: 2.0.3 dev: true @@ -5614,7 +5660,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 15.14.9 + '@types/node': 18.11.16 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -5651,7 +5697,7 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 15.14.9 + '@types/node': 18.11.16 jest-mock: 27.5.1 dev: true @@ -5675,7 +5721,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 15.14.9 + '@types/node': 18.11.16 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -5824,7 +5870,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 18.7.11 + '@types/node': 18.11.16 '@types/yargs': 15.0.14 chalk: 4.1.2 dev: true @@ -5835,7 +5881,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 15.14.9 + '@types/node': 18.11.16 '@types/yargs': 16.0.4 chalk: 4.1.2 dev: true @@ -10701,7 +10747,7 @@ packages: '@types/connect': 3.4.35 '@types/express': 4.17.13 '@types/keygrip': 1.0.2 - '@types/node': 18.7.11 + '@types/node': 18.11.16 /@types/copy-webpack-plugin/8.0.1_webpack-cli@4.10.0: resolution: {integrity: sha512-TwEeGse0/wq+t3SFW0DEwroMS/cDkwVZT+vj7tMAYTp7llt/yz6NuW2n04X2M5P/kSfBQOORhrHAN2mqZdmybg==} @@ -10830,7 +10876,7 @@ packages: /@types/express-serve-static-core/4.17.30: resolution: {integrity: sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==} dependencies: - '@types/node': 18.11.7 + '@types/node': 18.11.16 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 @@ -10868,7 +10914,7 @@ packages: /@types/fs-extra/8.1.2: resolution: {integrity: sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg==} dependencies: - '@types/node': 15.14.9 + '@types/node': 18.11.16 dev: true /@types/fs-extra/9.0.13: @@ -11198,6 +11244,7 @@ packages: /@types/node/18.11.7: resolution: {integrity: sha512-LhFTglglr63mNXUSRYD8A+ZAIu5sFqNJ4Y2fPuY7UlrySJH87rRRlhtVmMHplmfk5WkoJGmDjE9oiTfyX94CpQ==} + dev: false /@types/node/18.7.11: resolution: {integrity: sha512-KZhFpSLlmK/sdocfSAjqPETTMd0ug6HIMIAwkwUpU79olnZdQtMxpQP+G1wDzCH7na+FltSIhbaZuKdwZ8RDrw==} @@ -11634,7 +11681,7 @@ packages: /@types/whatwg-url/8.2.2: resolution: {integrity: sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==} dependencies: - '@types/node': 18.7.11 + '@types/node': 18.11.16 '@types/webidl-conversions': 6.1.1 /@types/ws/8.5.3: @@ -13430,7 +13477,7 @@ packages: babel-plugin-syntax-jsx: 6.18.0 lodash: 4.17.21 picomatch: 2.3.1 - styled-components: 5.3.6_7i5myeigehqah43i5u7wbekgba + styled-components: 5.3.6_react@18.2.0 /babel-plugin-syntax-jsx/6.18.0: resolution: {integrity: sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==} @@ -17156,7 +17203,7 @@ packages: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.12 - '@types/node': 18.7.11 + '@types/node': 18.11.16 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -22093,7 +22140,7 @@ packages: pretty-format: 27.5.1 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1_nzafxra4mdyuer2ejmql6rdadq + ts-node: 10.9.1_k2dsl7zculo2nmh5s33pladmoa transitivePeerDependencies: - bufferutil - canvas @@ -22166,7 +22213,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 15.14.9 + '@types/node': 18.11.16 jest-mock: 27.5.1 jest-util: 27.5.1 jsdom: 16.7.0 @@ -22365,7 +22412,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 15.14.9 + '@types/node': 18.11.16 dev: true /jest-pnp-resolver/1.2.3_jest-resolve@27.5.1: @@ -22542,7 +22589,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 15.14.9 + '@types/node': 18.11.16 chalk: 4.1.2 ci-info: 3.7.0 graceful-fs: 4.2.10 @@ -22622,7 +22669,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 15.14.9 + '@types/node': 18.11.16 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -32549,6 +32596,7 @@ packages: react-is: 18.2.0 shallowequal: 1.1.0 supports-color: 5.5.0 + dev: false /styled-components/5.3.6_mdz3marskokvq6744hhidi3r5a: resolution: {integrity: sha512-hGTZquGAaTqhGWldX7hhfzjnIYBZ0IXQXkCYdvF1Sq3DsUaLx6+NTHC5Jj1ooM2F68sBiVz3lvhfwQs/S3l6qg==} @@ -32594,7 +32642,6 @@ packages: react: 18.2.0 shallowequal: 1.1.0 supports-color: 5.5.0 - dev: true /styled-system/5.1.5: resolution: {integrity: sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==} diff --git a/server/plugins/com.msgbyte.agora/.ministarrc.js b/server/plugins/com.msgbyte.agora/.ministarrc.js index 3c4db179..2572af57 100644 --- a/server/plugins/com.msgbyte.agora/.ministarrc.js +++ b/server/plugins/com.msgbyte.agora/.ministarrc.js @@ -1,4 +1,9 @@ const path = require('path'); +const copy = require('rollup-plugin-copy'); +const normalize = require('normalize-path'); + +const pluginRoot = path.resolve(__dirname, './web'); +const outDir = path.resolve(__dirname, '../../public'); module.exports = { externalDeps: [ @@ -9,6 +14,40 @@ module.exports = { 'zustand', 'zustand/middleware/immer', ], - pluginRoot: path.resolve(__dirname, './web'), - outDir: path.resolve(__dirname, '../../public'), + pluginRoot, + outDir, + rollupPlugins: ({ pluginName }) => [ + copy({ + targets: [ + { + src: path.resolve( + pluginRoot, + `./plugins/${pluginName}`, + './assets/**/*' + ), + dest: path.resolve(outDir, `./plugins/${pluginName}/assets/`), + }, + { + src: path.resolve( + pluginRoot, + `./plugins/${pluginName}`, + './docs/**/*' + ), + dest: path.resolve(outDir, `./plugins/${pluginName}/docs/`), + }, + { + src: path.resolve( + pluginRoot, + `./plugins/${pluginName}`, + './README.md' + ), + dest: path.resolve(outDir, `./plugins/${pluginName}/`), + }, + ].map((item) => ({ + // For windows + src: normalize(item.src), + dest: normalize(item.dest, false), + })), + }), + ], }; diff --git a/server/plugins/com.msgbyte.agora/package.json b/server/plugins/com.msgbyte.agora/package.json index fed503ab..13fb8113 100644 --- a/server/plugins/com.msgbyte.agora/package.json +++ b/server/plugins/com.msgbyte.agora/package.json @@ -12,7 +12,9 @@ }, "devDependencies": { "@types/react": "18.0.20", - "mini-star": "*" + "mini-star": "*", + "normalize-path": "^3.0.0", + "rollup-plugin-copy": "^3.4.0" }, "dependencies": { "got": "11.8.6", diff --git a/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/assets/icon.png b/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/assets/icon.png new file mode 100644 index 00000000..0b93e8b9 Binary files /dev/null and b/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/assets/icon.png differ diff --git a/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/manifest.json b/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/manifest.json index 7086c99e..48efeca4 100644 --- a/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/manifest.json +++ b/server/plugins/com.msgbyte.agora/web/plugins/com.msgbyte.agora/manifest.json @@ -1,9 +1,10 @@ -{ - "label": "声网音视频", - "name": "com.msgbyte.agora", - "url": "{BACKEND}/plugins/com.msgbyte.agora/index.js", - "version": "0.0.0", - "author": "moonrailgun", - "description": "为Tailchat增加声网音视频通信功能", - "requireRestart": true -} +{ + "label": "声网音视频", + "name": "com.msgbyte.agora", + "url": "{BACKEND}/plugins/com.msgbyte.agora/index.js", + "icon": "{BACKEND}/plugins/com.msgbyte.agora/assets/icon.png", + "version": "0.0.0", + "author": "moonrailgun", + "description": "为Tailchat增加声网音视频通信功能", + "requireRestart": true +}