@alemonjs/qq-bot 2.1.12 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/desktop.js CHANGED
@@ -3,16 +3,16 @@ import { dirname, join } from 'path';
3
3
  import { fileURLToPath } from 'url';
4
4
  import { getConfig, getConfigValue } from 'alemonjs';
5
5
 
6
- const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ const __dirname$1 = dirname(fileURLToPath(import.meta.url));
7
7
  const activate = context => {
8
8
  const webView = context.createSidebarWebView(context);
9
9
  context.onCommand('open.qq-bot', () => {
10
- const dir = join(__dirname, '../', 'dist', 'index.html');
10
+ const dir = join(__dirname$1, '../', 'dist', 'index.html');
11
11
  const scriptReg = /<script.*?src="(.+?)".*?>/;
12
12
  const styleReg = /<link.*?rel="stylesheet".*?href="(.+?)".*?>/;
13
13
  const iconReg = /<link.*?rel="icon".*?href="(.+?)".*?>/g;
14
- const styleUri = context.createExtensionDir(join(__dirname, '../', 'dist', 'assets', 'index.css'));
15
- const scriptUri = context.createExtensionDir(join(__dirname, '../', 'dist', 'assets', 'index.js'));
14
+ const styleUri = context.createExtensionDir(join(__dirname$1, '../', 'dist', 'assets', 'index.css'));
15
+ const scriptUri = context.createExtensionDir(join(__dirname$1, '../', 'dist', 'assets', 'index.js'));
16
16
  const html = readFileSync(dir, 'utf-8')
17
17
  .replace(iconReg, '')
18
18
  .replace(scriptReg, `<script type="module" crossorigin src="${scriptUri}"></script>`)
package/lib/hook.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createEventValue, useClient as useClient$1 } from 'alemonjs';
1
+ import { useClient as useClient$1, createEventValue } from 'alemonjs';
2
2
  import { QQBotAPI } from './sdk/api.js';
3
3
 
4
4
  const useValue = (event) => {