alemonjs 1.0.22 → 1.0.24

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.
@@ -1,27 +1,13 @@
1
- import { compilationTools } from 'alemon-rollup';
2
1
  import PupOptions from '../default/pup.js';
3
2
  import { rebotMap } from './map.js';
4
3
  import { nodeScripts } from './child_process.js';
5
4
  import { AvailableIntentsEventsEnum } from 'qq-guild-bot';
6
5
  import { ClientAPIByQQ as ClientByNTQQ } from '../ntqq/sdk/index.js';
7
6
  import { command } from './command.js';
8
- import { createApp, setLanchConfig, loadInit, appsInit, setAppProCoinfg, getAppProCoinfg } from '../core/index.js';
7
+ import { createApp, setLanchConfig, loadInit, appsInit, setAppProCoinfg } from '../core/index.js';
9
8
  import { getPupPath, setBotConfigByKey, getBotConfigByKey } from '../config/index.js';
10
9
  // 设置ntqq独立鉴权路径
11
10
  export const setAuthenticationByNtqq = ClientByNTQQ.setAuthentication;
12
- /**
13
- * 应用模块集成
14
- * @param AppName
15
- * @param name
16
- * @returns
17
- */
18
- export function ApplicationTools(AppName, name = 'apps') {
19
- const appDir = getAppProCoinfg('dir');
20
- return compilationTools({
21
- aInput: `${appDir.replace(/^\//, '')}/${AppName}/${name}/**/*.ts`,
22
- aOutput: `${appDir.replace(/^\//, '')}/${AppName}/apps.js`
23
- });
24
- }
25
11
  let OptionsCache;
26
12
  /**
27
13
  * 得到载入配置
@@ -169,13 +155,6 @@ export async function defineAlemonConfig(Options) {
169
155
  if (Options?.app?.regJSon?.address) {
170
156
  setAppProCoinfg('route', Options?.app?.regJSon?.address);
171
157
  }
172
- if (Options?.app?.module) {
173
- const word = await compilationTools({
174
- aInput: Options?.app?.module?.input?.replace(/^\//, '') ?? 'apps/**/*.ts',
175
- aOutput: Options?.app?.module?.output.replace(/^\//, '') ?? '.apps/index.js'
176
- });
177
- app.component(word);
178
- }
179
158
  if (Options?.app?.component) {
180
159
  for await (const item of Options.app.component) {
181
160
  app.component(item);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alemonjs",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "description": "阿柠檬框架",
5
5
  "author": "ningmengchongshui",
6
6
  "license": "GPL-2.0",
@@ -14,7 +14,6 @@
14
14
  "@discordjs/builders": "^1.6.3",
15
15
  "@discordjs/core": "^0.6.0",
16
16
  "@discordjs/rest": "^1.7.1",
17
- "alemon-rollup": "^1.0.3",
18
17
  "axios": "^1.4.0",
19
18
  "discord.js": "^14.11.0",
20
19
  "image-size": "^1.0.2",
@@ -48,23 +47,16 @@
48
47
  "lib",
49
48
  "types",
50
49
  "run.js",
51
- "run.d.ts",
52
- "build.js",
53
- "build.d.ts"
50
+ "run.d.ts"
54
51
  ],
55
52
  "exports": {
56
- ".": "./lib/index.js",
53
+ ".": {
54
+ "import": "./lib/index.js",
55
+ "types": "./types/index.d.ts"
56
+ },
57
57
  "./run": {
58
58
  "import": "./run.js",
59
59
  "types": "./run.d.ts"
60
- },
61
- "./build": {
62
- "import": "./build.js",
63
- "types": "./build.d.ts"
64
- },
65
- "./core": {
66
- "import": "./core.js",
67
- "types": "./core.d.ts"
68
60
  }
69
61
  },
70
62
  "bin": {
@@ -1,13 +1,6 @@
1
1
  import { AlemonOptions } from './types.js';
2
2
  import { ClientAPIByQQ as ClientByNTQQ } from '../ntqq/sdk/index.js';
3
3
  export declare const setAuthenticationByNtqq: typeof ClientByNTQQ.setAuthentication;
4
- /**
5
- * 应用模块集成
6
- * @param AppName
7
- * @param name
8
- * @returns
9
- */
10
- export declare function ApplicationTools(AppName: string, name?: string): any;
11
4
  /**
12
5
  * 得到载入配置
13
6
  * @returns
@@ -42,23 +42,6 @@ export interface AlemonOptions {
42
42
  */
43
43
  address?: string;
44
44
  };
45
- /**
46
- * 独立模块配置
47
- */
48
- module?: {
49
- /**
50
- * 输入规则
51
- */
52
- input?: string;
53
- /**
54
- * 输出规则
55
- */
56
- output?: string;
57
- };
58
- /**
59
- * 关闭指定应用
60
- */
61
- close?: string[];
62
45
  /**
63
46
  * 重定义消息对象
64
47
  * @param args
package/build.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function commandBuild(): Promise<void>
package/build.js DELETED
@@ -1,20 +0,0 @@
1
- import { compilationTools } from 'alemon-rollup'
2
- export async function commandBuild() {
3
- const ars = process.argv.slice(2)
4
- const Options = {
5
- input: 'apps/**/*.ts',
6
- output: 'alemon.app.js'
7
- }
8
- const i = ars.indexOf('--i')
9
- if (i != -1) {
10
- Options.input = ars[i + 1]
11
- }
12
- const o = ars.indexOf('--o')
13
- if (ars.indexOf('--o') != -1) {
14
- Options.output = ars[o + 1]
15
- }
16
- await compilationTools({
17
- aInput: Options.input,
18
- aOutput: Options.output
19
- })
20
- }
package/lib/build.js DELETED
@@ -1,20 +0,0 @@
1
- import { compilationTools } from 'alemon-rollup';
2
- export async function commandBuild() {
3
- const ars = process.argv.slice(2);
4
- const Options = {
5
- input: 'apps/**/*.ts',
6
- output: 'alemon.app.js'
7
- };
8
- const i = ars.indexOf('--i');
9
- if (i != -1) {
10
- Options.input = ars[i + 1];
11
- }
12
- const o = ars.indexOf('--o');
13
- if (ars.indexOf('--o') != -1) {
14
- Options.output = ars[o + 1];
15
- }
16
- await compilationTools({
17
- aInput: Options.input,
18
- aOutput: Options.output
19
- });
20
- }
package/types/build.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function commandBuild(): Promise<void>;
package/types/run.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function commandRun(ars: string[]): void;