node-karin 0.8.6 → 0.8.9

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.
Files changed (51) hide show
  1. package/lib/core/karin.d.ts +1 -1
  2. package/lib/event/message.handler.js +1 -1
  3. package/lib/modules/art-template.d.ts +1 -0
  4. package/lib/modules/art-template.js +1 -0
  5. package/lib/modules/axios.d.ts +2 -0
  6. package/lib/modules/axios.js +2 -0
  7. package/lib/modules/chalk.d.ts +2 -0
  8. package/lib/modules/chalk.js +2 -0
  9. package/lib/modules/chokidar.d.ts +2 -0
  10. package/lib/modules/chokidar.js +2 -0
  11. package/lib/modules/commander.d.ts +2 -0
  12. package/lib/modules/commander.js +2 -0
  13. package/lib/modules/express.d.ts +3 -0
  14. package/lib/modules/express.js +3 -0
  15. package/lib/modules/grpc-js.d.ts +2 -0
  16. package/lib/modules/grpc-js.js +2 -0
  17. package/lib/modules/kritor-proto.d.ts +2 -0
  18. package/lib/modules/kritor-proto.js +2 -0
  19. package/lib/modules/level.d.ts +2 -0
  20. package/lib/modules/level.js +2 -0
  21. package/lib/modules/lodash.d.ts +1 -0
  22. package/lib/modules/lodash.js +1 -0
  23. package/lib/modules/log4js.d.ts +2 -0
  24. package/lib/modules/log4js.js +2 -0
  25. package/lib/modules/moment.d.ts +1 -0
  26. package/lib/modules/moment.js +1 -0
  27. package/lib/modules/node-schedule.d.ts +2 -0
  28. package/lib/modules/node-schedule.js +2 -0
  29. package/lib/modules/proto-loader.d.ts +2 -0
  30. package/lib/modules/proto-loader.js +2 -0
  31. package/lib/modules/redis.d.ts +2 -0
  32. package/lib/modules/redis.js +2 -0
  33. package/lib/modules/ws.d.ts +3 -0
  34. package/lib/modules/ws.js +3 -0
  35. package/lib/modules/yaml.d.ts +2 -0
  36. package/lib/modules/yaml.js +2 -0
  37. package/lib/render/app.d.ts +8 -2
  38. package/lib/render/app.js +24 -3
  39. package/lib/render/base.d.ts +2 -2
  40. package/lib/render/base.js +1 -2
  41. package/lib/render/client.d.ts +1 -1
  42. package/lib/render/client.js +1 -1
  43. package/lib/render/http.d.ts +1 -1
  44. package/lib/render/server.d.ts +3 -19
  45. package/lib/render/server.js +1 -17
  46. package/lib/render/wormhole.js +2 -2
  47. package/lib/types/element.d.ts +13 -3
  48. package/lib/types/render.d.ts +7 -1
  49. package/lib/utils/common.js +7 -7
  50. package/lib/utils/segment.d.ts +3 -3
  51. package/package.json +95 -2
@@ -119,7 +119,7 @@ export declare class Karin {
119
119
  * - 渲染
120
120
  * @param options - 渲染参数
121
121
  */
122
- render(options: KarinRenderType): Promise<string | string[]>;
122
+ render(options: KarinRenderType): Promise<string>;
123
123
  /**
124
124
  * - 上下文
125
125
  * @param e - 消息事件
@@ -11,7 +11,7 @@ export class MessageHandler extends EventHandler {
11
11
  /**
12
12
  * - 是否打印群消息日志
13
13
  */
14
- GroupMsgPrint = false
14
+ GroupMsgPrint = true
15
15
  constructor (e) {
16
16
  super(e)
17
17
  this.e = e
@@ -0,0 +1 @@
1
+ export { default } from 'art-template';
@@ -0,0 +1 @@
1
+ export { default } from 'art-template'
@@ -0,0 +1,2 @@
1
+ export * from 'axios';
2
+ export { default } from 'axios';
@@ -0,0 +1,2 @@
1
+ export * from 'axios'
2
+ export { default } from 'axios'
@@ -0,0 +1,2 @@
1
+ export * from 'chalk';
2
+ export { default } from 'chalk';
@@ -0,0 +1,2 @@
1
+ export * from 'chalk'
2
+ export { default } from 'chalk'
@@ -0,0 +1,2 @@
1
+ export * from 'chokidar';
2
+ export { default } from 'chokidar';
@@ -0,0 +1,2 @@
1
+ export * from 'chokidar'
2
+ export { default } from 'chokidar'
@@ -0,0 +1,2 @@
1
+ export * from 'commander';
2
+ export { default } from 'commander';
@@ -0,0 +1,2 @@
1
+ export * from 'commander'
2
+ export { default } from 'commander'
@@ -0,0 +1,3 @@
1
+ import { query, Router } from 'express';
2
+ export { default } from 'express';
3
+ export { query, Router };
@@ -0,0 +1,3 @@
1
+ import { query, Router } from 'express'
2
+ export { default } from 'express'
3
+ export { query, Router }
@@ -0,0 +1,2 @@
1
+ export * from '@grpc/grpc-js';
2
+ export { default } from '@grpc/grpc-js';
@@ -0,0 +1,2 @@
1
+ export * from '@grpc/grpc-js'
2
+ export { default } from '@grpc/grpc-js'
@@ -0,0 +1,2 @@
1
+ export * from 'kritor-proto';
2
+ export { default } from 'kritor-proto';
@@ -0,0 +1,2 @@
1
+ export * from 'kritor-proto'
2
+ export { default } from 'kritor-proto'
@@ -0,0 +1,2 @@
1
+ export * from 'level';
2
+ export { default } from 'level';
@@ -0,0 +1,2 @@
1
+ export * from 'level'
2
+ export { default } from 'level'
@@ -0,0 +1 @@
1
+ export { default } from 'lodash';
@@ -0,0 +1 @@
1
+ export { default } from 'lodash'
@@ -0,0 +1,2 @@
1
+ export * from 'log4js';
2
+ export { default } from 'log4js';
@@ -0,0 +1,2 @@
1
+ export * from 'log4js'
2
+ export { default } from 'log4js'
@@ -0,0 +1 @@
1
+ export { default } from 'moment';
@@ -0,0 +1 @@
1
+ export { default } from 'moment'
@@ -0,0 +1,2 @@
1
+ export * from 'node-schedule';
2
+ export { default } from 'node-schedule';
@@ -0,0 +1,2 @@
1
+ export * from 'node-schedule'
2
+ export { default } from 'node-schedule'
@@ -0,0 +1,2 @@
1
+ export * from '@grpc/proto-loader';
2
+ export { default } from '@grpc/proto-loader';
@@ -0,0 +1,2 @@
1
+ export * from '@grpc/proto-loader'
2
+ export { default } from '@grpc/proto-loader'
@@ -0,0 +1,2 @@
1
+ export * from 'redis';
2
+ export { default } from 'redis';
@@ -0,0 +1,2 @@
1
+ export * from 'redis'
2
+ export { default } from 'redis'
@@ -0,0 +1,3 @@
1
+ import { WebSocket, WebSocketServer, createWebSocketStream } from 'ws';
2
+ export { WebSocket, WebSocketServer, createWebSocketStream };
3
+ export { default } from 'ws';
@@ -0,0 +1,3 @@
1
+ import { WebSocket, WebSocketServer, createWebSocketStream } from 'ws'
2
+ export { WebSocket, WebSocketServer, createWebSocketStream }
3
+ export { default } from 'ws'
@@ -0,0 +1,2 @@
1
+ export * from 'yaml';
2
+ export { default } from 'yaml';
@@ -0,0 +1,2 @@
1
+ export * from 'yaml'
2
+ export { default } from 'yaml'
@@ -31,13 +31,19 @@ declare class Renderers {
31
31
  /**
32
32
  * 调用标准渲染器
33
33
  */
34
- render(options: KarinRenderType, id?: string): Promise<string | string[]>;
34
+ render<T extends KarinRenderType>(options: T, id?: string): Promise<import("../types/index.js").RenderResult<T>>;
35
35
  /**
36
36
  * 快速渲染
37
37
  * @param data html路径、http地址
38
38
  * @returns 返回图片base64或数组
39
39
  */
40
- renderHtml(data: string): Promise<string | string[]>;
40
+ renderHtml(data: string): Promise<string>;
41
+ /**
42
+ * 快速分片渲染
43
+ * @param data html路径、http地址
44
+ * @param multiPage 分片高度 自动计算传true
45
+ */
46
+ renderMultiHtml(data: string, multiPage: number | true): Promise<Array<string>>;
41
47
  }
42
48
  /**
43
49
  * 渲染器管理器
package/lib/render/app.js CHANGED
@@ -69,7 +69,13 @@ class Renderers {
69
69
  */
70
70
  async render (options, id) {
71
71
  const res = this.App(id)
72
- return res.render(options)
72
+ if (typeof options.multiPage === 'number' || options.multiPage === true) {
73
+ const result = await res.render(options)
74
+ return result
75
+ } else {
76
+ const result = await res.render(options)
77
+ return result
78
+ }
73
79
  }
74
80
 
75
81
  /**
@@ -78,10 +84,25 @@ class Renderers {
78
84
  * @returns 返回图片base64或数组
79
85
  */
80
86
  async renderHtml (data) {
81
- const app = this.App()
82
- return app.render({
87
+ return this.render({
88
+ file: data,
89
+ name: 'render',
90
+ pageGotoParams: {
91
+ waitUntil: 'networkidle2',
92
+ },
93
+ })
94
+ }
95
+
96
+ /**
97
+ * 快速分片渲染
98
+ * @param data html路径、http地址
99
+ * @param multiPage 分片高度 自动计算传true
100
+ */
101
+ async renderMultiHtml (data, multiPage) {
102
+ return await this.render({
83
103
  file: data,
84
104
  name: 'render',
105
+ multiPage,
85
106
  pageGotoParams: {
86
107
  waitUntil: 'networkidle2',
87
108
  },
@@ -1,5 +1,5 @@
1
1
  import chokidar from 'chokidar';
2
- import { KarinRender, KarinRenderType } from '../types/render.js';
2
+ import { KarinRender, KarinRenderType, RenderResult } from '../types/render.js';
3
3
  /**
4
4
  * 渲染器基类 所有渲染器都应该继承这个类
5
5
  */
@@ -26,5 +26,5 @@ export declare class RenderBase implements KarinRender {
26
26
  /**
27
27
  * 渲染标准方法
28
28
  */
29
- render(options: KarinRenderType): Promise<string | Array<string>>;
29
+ render<T extends KarinRenderType>(options: T): Promise<RenderResult<T>>;
30
30
  }
@@ -64,7 +64,6 @@ export class RenderBase {
64
64
  * 渲染标准方法
65
65
  */
66
66
  async render (options) {
67
- logger.error('未实现渲染方法')
68
- return ''
67
+ throw new Error('未实现渲染方法')
69
68
  }
70
69
  }
@@ -26,5 +26,5 @@ export declare class RenderClient extends RenderBase {
26
26
  * 渲染标准方法
27
27
  * @param options 渲染参数
28
28
  */
29
- render(options: KarinRenderType): Promise<string | string[]>;
29
+ async<T extends KarinRenderType>(options: T): "" | Promise<unknown>;
30
30
  }
@@ -118,7 +118,7 @@ export class RenderClient extends RenderBase {
118
118
  * 渲染标准方法
119
119
  * @param options 渲染参数
120
120
  */
121
- async render (options) {
121
+ async (options) {
122
122
  /** 渲染模板 */
123
123
  let file = options.file
124
124
  let action = 'renderHtml'
@@ -15,5 +15,5 @@ export declare class HttpRenderer extends RenderBase {
15
15
  /**
16
16
  * 渲染
17
17
  */
18
- render(options: KarinRenderType): Promise<string | Array<string>>;
18
+ render<T extends KarinRenderType>(options: T): Promise<any>;
19
19
  }
@@ -1,7 +1,7 @@
1
1
  import WebSocket from 'ws';
2
2
  import { RenderBase } from './base.js';
3
3
  import { IncomingMessage } from 'http';
4
- import { KarinRenderType } from '../types/index.js';
4
+ import { KarinRenderType, RenderResult } from '../types/index.js';
5
5
  declare class Puppeteer extends RenderBase {
6
6
  socket: WebSocket;
7
7
  id: any;
@@ -13,25 +13,9 @@ declare class Puppeteer extends RenderBase {
13
13
  server(socket: WebSocket, request: IncomingMessage): Promise<void>;
14
14
  /**
15
15
  * 渲染模板
16
- * @param {object} options 渲染参数
17
- * @param {string} options.file http地址或本地文件路径
18
- * @param {string} [options.name] 模板名称
19
- * @param {string} [options.fileID] art-template后的文件名
20
- * @param {object} [options.data] 传递给模板的数据 template.render(data)
21
- * @param {'png'|'jpeg'|'webp'} [options.type] 截图类型 默认'webp'
22
- * @param {number} [options.quality] 截图质量 默认90 1-100
23
- * @param {boolean} options.omitBackground 是否隐藏背景 默认false
24
- * @param {object} [options.setViewport] 设置视窗大小和设备像素比 默认1920*1080、1
25
- * @param {number} [options.setViewport.width] 视窗宽度
26
- * @param {number} [options.setViewport.height] 视窗高度
27
- * @param {string} [options.setViewport.deviceScaleFactor] 设备像素比
28
- * @param {number|boolean} [options.multiPage] 分页截图 传递数字则视为视窗高度 返回数组
29
- * @param {object} [options.pageGotoParams] 页面goto时的参数
30
- * @param {number} [options.pageGotoParams.timeout] 页面加载超时时间
31
- * @param {'load'|'domcontentloaded'|'networkidle0'|'networkidle2'} [options.pageGotoParams.waitUntil] 页面加载状态
32
- * @returns {Promise<string|string[]>} 返回图片base64或数组
16
+ * @param options 模板参数
33
17
  */
34
- render(options: KarinRenderType): Promise<string | string[]>;
18
+ render<T extends KarinRenderType>(options: T): Promise<RenderResult<T>>;
35
19
  }
36
20
  export declare const RenderServer: {
37
21
  type: string;
@@ -62,23 +62,7 @@ class Puppeteer extends RenderBase {
62
62
 
63
63
  /**
64
64
  * 渲染模板
65
- * @param {object} options 渲染参数
66
- * @param {string} options.file http地址或本地文件路径
67
- * @param {string} [options.name] 模板名称
68
- * @param {string} [options.fileID] art-template后的文件名
69
- * @param {object} [options.data] 传递给模板的数据 template.render(data)
70
- * @param {'png'|'jpeg'|'webp'} [options.type] 截图类型 默认'webp'
71
- * @param {number} [options.quality] 截图质量 默认90 1-100
72
- * @param {boolean} options.omitBackground 是否隐藏背景 默认false
73
- * @param {object} [options.setViewport] 设置视窗大小和设备像素比 默认1920*1080、1
74
- * @param {number} [options.setViewport.width] 视窗宽度
75
- * @param {number} [options.setViewport.height] 视窗高度
76
- * @param {string} [options.setViewport.deviceScaleFactor] 设备像素比
77
- * @param {number|boolean} [options.multiPage] 分页截图 传递数字则视为视窗高度 返回数组
78
- * @param {object} [options.pageGotoParams] 页面goto时的参数
79
- * @param {number} [options.pageGotoParams.timeout] 页面加载超时时间
80
- * @param {'load'|'domcontentloaded'|'networkidle0'|'networkidle2'} [options.pageGotoParams.waitUntil] 页面加载状态
81
- * @returns {Promise<string|string[]>} 返回图片base64或数组
65
+ * @param options 模板参数
82
66
  */
83
67
  async render (options) {
84
68
  /** 渲染模板 */
@@ -33,9 +33,9 @@ export function Wormhole () {
33
33
  case 'msg': {
34
34
  const { post, token, WormholeClient } = config.Server.HttpRender
35
35
  const parsedUrl = new URL(WormholeClient)
36
- const { hostname, port } = parsedUrl
36
+ const { hostname, port, pathname } = parsedUrl
37
37
  const ishttps = WormholeClient.includes('wss://')
38
- const host = `${ishttps ? 'https' : 'http'}://${hostname}${port ? `:${port}` : ''}/web/${data.date}`
38
+ const host = `${ishttps ? 'https' : 'http'}://${hostname}${port ? `:${port}` : ''}${pathname.replace(/ws\/(?=[^ws/]*$)/, 'web/')}${data.date}`
39
39
  logger.mark(`web渲染器已连接,地址:${host}`)
40
40
  /** 注册渲染器 */
41
41
  const rd = new HttpRenderer(host, post, token)
@@ -442,7 +442,7 @@ export interface FileElement extends Element {
442
442
  /**
443
443
  * - 原生 Markdown 元素
444
444
  */
445
- export interface ContentElement extends Element {
445
+ export interface RawMarkdownElement extends Element {
446
446
  type: 'markdown';
447
447
  /**
448
448
  * - 原生markdown内容
@@ -458,7 +458,7 @@ export interface ContentElement extends Element {
458
458
  /**
459
459
  * - 模板 Markdown 元素
460
460
  */
461
- export interface TemplateElement extends Element {
461
+ export interface TplMarkdownElement extends Element {
462
462
  type: 'markdown_tpl';
463
463
  /**
464
464
  * - 模板ID
@@ -478,6 +478,16 @@ export interface TemplateElement extends Element {
478
478
  values: Array<string>;
479
479
  }>;
480
480
  }
481
+ /**
482
+ * - Markdown 元素
483
+ */
484
+ export interface MarkdownElement extends Element {
485
+ type: 'markdown';
486
+ /**
487
+ * - Markdown内容
488
+ */
489
+ content: string;
490
+ }
481
491
  /**
482
492
  * - 按钮
483
493
  */
@@ -552,7 +562,7 @@ export interface LongMsgElement extends Element {
552
562
  */
553
563
  id: string;
554
564
  }
555
- export type KarinElement = TextElement | AtElement | FaceElement | BubbleFaceElement | ReplyElement | ImageElement | VoiceElement | VideoElement | BasketballElement | DiceElement | RpsElement | PokeElement | MusicElement | WeatherElement | LocationElement | ShareElement | GiftElement | MarketFaceElement | ForwardElement | ContactElement | JsonElement | XmlElement | FileElement | ButtonElement | RowElement | RecordElement | LongMsgElement | TemplateElement | ContentElement;
565
+ export type KarinElement = TextElement | AtElement | FaceElement | BubbleFaceElement | ReplyElement | ImageElement | VoiceElement | VideoElement | BasketballElement | DiceElement | RpsElement | PokeElement | MusicElement | WeatherElement | LocationElement | ShareElement | GiftElement | MarketFaceElement | ForwardElement | ContactElement | JsonElement | XmlElement | FileElement | ButtonElement | RowElement | RecordElement | LongMsgElement | TplMarkdownElement | RawMarkdownElement;
556
566
  /**
557
567
  * - 构建自定义转发节点 此元素仅可通过专用接口发送 不支持混合发送
558
568
  */
@@ -72,6 +72,12 @@ export interface KarinRenderType {
72
72
  [key: string]: any;
73
73
  };
74
74
  }
75
+ /**
76
+ * 渲染结果
77
+ */
78
+ export type RenderResult<T> = T extends {
79
+ multiPage: true | number;
80
+ } ? Array<string> : string;
75
81
  /**
76
82
  * 渲染基类
77
83
  */
@@ -98,7 +104,7 @@ export interface KarinRender {
98
104
  * 渲染
99
105
  * @param options - 标准渲染方法
100
106
  */
101
- render: (options: KarinRenderType) => Promise<string | Array<string>>;
107
+ render: <T extends KarinRenderType>(options: T, id?: string) => Promise<RenderResult<T>>;
102
108
  }
103
109
  /**
104
110
  * 渲染器管理
@@ -420,22 +420,22 @@ class Common {
420
420
  return list
421
421
  } else {
422
422
  const list = []
423
- const readPackageJson = async (name) => {
423
+ const readPackageJson = async (files) => {
424
424
  try {
425
- const pkgPath = path.join(process.cwd(), 'node_modules', name, 'package.json')
425
+ const pkgPath = path.join(process.cwd(), 'node_modules', files, 'package.json')
426
426
  const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'))
427
427
  if (pkg?.karin) {
428
428
  if (pkg?.main) {
429
- const dir = `${name}/${path.dirname(pkg.main).replace(/\.\//, '')}`
429
+ const dir = `${files}/${path.dirname(pkg.main).replace(/\.\//, '')}`
430
430
  list.push({ dir, name: path.basename(pkg.main), isMain: true })
431
431
  }
432
432
  if (pkg?.karin?.apps?.length) {
433
433
  pkg.karin.apps.forEach((app) => {
434
- fs.readdirSync(`./node_modules/${name}/${app}`).forEach((name) => {
434
+ fs.readdirSync(`./node_modules/${files}/${app}`).forEach((filename) => {
435
435
  /** 忽略非js */
436
- if (!name.endsWith('.js')) { return }
437
- const dir = `${name}/${app}`
438
- list.push({ dir, name, isMain: false })
436
+ if (!filename.endsWith('.js')) { return }
437
+ const dir = `${files}/${app}`
438
+ list.push({ dir, name: filename, isMain: false })
439
439
  })
440
440
  })
441
441
  }
@@ -1,4 +1,4 @@
1
- import { TextElement, AtElement, ImageElement, FaceElement, BubbleFaceElement, ReplyElement, VideoElement, BasketballElement, DiceElement, RpsElement, PokeElement, MusicElement, WeatherElement, LocationElement, ShareElement, GiftElement, MarketFaceElement, ForwardElement, ContactElement, JsonElement, XmlElement, FileElement, ButtonElement, CustomMusicElemen, TemplateElement, ContentElement, NodeElement, KarinElement, LongMsgElement, RecordElement } from '../types/index.js';
1
+ import { TextElement, AtElement, ImageElement, FaceElement, BubbleFaceElement, ReplyElement, VideoElement, BasketballElement, DiceElement, RpsElement, PokeElement, MusicElement, WeatherElement, LocationElement, ShareElement, GiftElement, MarketFaceElement, ForwardElement, ContactElement, JsonElement, XmlElement, FileElement, ButtonElement, CustomMusicElemen, TplMarkdownElement, RawMarkdownElement, NodeElement, KarinElement, LongMsgElement, RecordElement } from '../types/index.js';
2
2
  export declare const segment: {
3
3
  /**
4
4
  * 纯文本
@@ -252,13 +252,13 @@ export declare const segment: {
252
252
  * @param content - 原生markdown内容
253
253
  * @param config - 未知的参数
254
254
  */
255
- markdown(content: ContentElement["content"], config?: ContentElement["config"]): ContentElement;
255
+ markdown(content: RawMarkdownElement["content"], config?: RawMarkdownElement["config"]): RawMarkdownElement;
256
256
  /**
257
257
  * 构建模板Markdown
258
258
  * @param custom_template_id - 模板ID
259
259
  * @param params - 模板markdown参数
260
260
  */
261
- markdown_tpl(custom_template_id: TemplateElement["custom_template_id"], params: TemplateElement["params"]): TemplateElement;
261
+ markdown_tpl(custom_template_id: TplMarkdownElement["custom_template_id"], params: TplMarkdownElement["params"]): TplMarkdownElement;
262
262
  /**
263
263
  * 按钮
264
264
  * @param data - 按钮数据
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.8.6",
3
+ "version": "0.8.9",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",
@@ -14,6 +14,98 @@
14
14
  "license": "GPL-3.0-only",
15
15
  "author": "Karin",
16
16
  "type": "module",
17
+ "exports": {
18
+ ".": {
19
+ "import": "./lib/index.js",
20
+ "require": "./lib/index.js",
21
+ "types": "./lib/index.d.ts"
22
+ },
23
+ "./art-template": {
24
+ "import": "./lib/modules/art-template.js",
25
+ "require": "./lib/modules/art-template.js",
26
+ "types": "./lib/modules/art-template.d.ts"
27
+ },
28
+ "./axios": {
29
+ "import": "./lib/modules/axios.js",
30
+ "require": "./lib/modules/axios.js",
31
+ "types": "./lib/modules/axios.d.ts"
32
+ },
33
+ "./chalk": {
34
+ "import": "./lib/modules/chalk.js",
35
+ "require": "./lib/modules/chalk.js",
36
+ "types": "./lib/modules/chalk.d.ts"
37
+ },
38
+ "./chokidar": {
39
+ "import": "./lib/modules/chokidar.js",
40
+ "require": "./lib/modules/chokidar.js",
41
+ "types": "./lib/modules/chokidar.d.ts"
42
+ },
43
+ "./commander": {
44
+ "import": "./lib/modules/commander.js",
45
+ "require": "./lib/modules/commander.js",
46
+ "types": "./lib/modules/commander.d.ts"
47
+ },
48
+ "./express": {
49
+ "import": "./lib/modules/express.js",
50
+ "require": "./lib/modules/express.js",
51
+ "types": "./lib/modules/express.d.ts"
52
+ },
53
+ "./grpc-js": {
54
+ "import": "./lib/modules/grpc-js.js",
55
+ "require": "./lib/modules/grpc-js.js",
56
+ "types": "./lib/modules/grpc-js.d.ts"
57
+ },
58
+ "./kritor-proto": {
59
+ "import": "./lib/modules/kritor-proto.js",
60
+ "require": "./lib/modules/kritor-proto.js",
61
+ "types": "./lib/modules/kritor-proto.d.ts"
62
+ },
63
+ "./level": {
64
+ "import": "./lib/modules/level.js",
65
+ "require": "./lib/modules/level.js",
66
+ "types": "./lib/modules/level.d.ts"
67
+ },
68
+ "./lodash": {
69
+ "import": "./lib/modules/lodash.js",
70
+ "require": "./lib/modules/lodash.js",
71
+ "types": "./lib/modules/lodash.d.ts"
72
+ },
73
+ "./log4js": {
74
+ "import": "./lib/modules/log4js.js",
75
+ "require": "./lib/modules/log4js.js",
76
+ "types": "./lib/modules/log4js.d.ts"
77
+ },
78
+ "./moment": {
79
+ "import": "./lib/modules/moment.js",
80
+ "require": "./lib/modules/moment.js",
81
+ "types": "./lib/modules/moment.d.ts"
82
+ },
83
+ "./node-schedule": {
84
+ "import": "./lib/modules/node-schedule.js",
85
+ "require": "./lib/modules/node-schedule.js",
86
+ "types": "./lib/modules/node-schedule.d.ts"
87
+ },
88
+ "./proto-loader": {
89
+ "import": "./lib/modules/proto-loader.js",
90
+ "require": "./lib/modules/proto-loader.js",
91
+ "types": "./lib/modules/proto-loader.d.ts"
92
+ },
93
+ "./redis": {
94
+ "import": "./lib/modules/redis.js",
95
+ "require": "./lib/modules/redis.js",
96
+ "types": "./lib/modules/redis.d.ts"
97
+ },
98
+ "./ws": {
99
+ "import": "./lib/modules/ws.js",
100
+ "require": "./lib/modules/ws.js",
101
+ "types": "./lib/modules/ws.d.ts"
102
+ },
103
+ "./yaml": {
104
+ "import": "./lib/modules/yaml.js",
105
+ "require": "./lib/modules/yaml.js",
106
+ "types": "./lib/modules/yaml.d.ts"
107
+ }
108
+ },
17
109
  "main": "./lib/index.js",
18
110
  "types": "./lib/index.d.ts",
19
111
  "bin": {
@@ -40,7 +132,7 @@
40
132
  "fix": "eslint lib/**/*.js --fix",
41
133
  "fix:all": "eslint lib/**/*.js --fix && eslint lib/**/*.d.ts --fix",
42
134
  "pub": "npm publish --access public",
43
- "sort": "npx sort-package-json"
135
+ "sort": "npx sort-package-json && sort-json tsconfig.json"
44
136
  },
45
137
  "dependencies": {
46
138
  "@grpc/grpc-js": "1.11.1",
@@ -69,6 +161,7 @@
69
161
  "@types/ws": "^8.5.11",
70
162
  "eslint": "^9.7.0",
71
163
  "neostandard": "^0.11.1",
164
+ "sort-json": "^2.0.1",
72
165
  "sort-package-json": "^2.10.0",
73
166
  "tsc-alias": "^1.8.10",
74
167
  "tsx": "^4.16.2",