mm_action 0.0.0-stage → 1.0.0

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 (4) hide show
  1. package/README.md +14 -2
  2. package/index.js +18 -0
  3. package/package.json +23 -3
  4. package/test.js +10 -0
package/README.md CHANGED
@@ -1,3 +1,15 @@
1
- # Temporary Holding Version
1
+ # 动作(mm_action)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ## 说明
4
+
5
+ mm_action 是动作管理模块,提供动作的注册与管理能力。
6
+
7
+ ## 安装
8
+
9
+ ```bash
10
+ npm install mm_action
11
+ ```
12
+
13
+ ## 状态
14
+
15
+ 模块骨架已创建,功能开发中。
package/index.js ADDED
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Action —— 动作管理模块。
5
+ *
6
+ * 骨架已就绪:构造时接收配置对象,具体功能待开发。
7
+ */
8
+ class Action {
9
+ /**
10
+ * 构造函数
11
+ * @param {Object} [config] 模块配置
12
+ */
13
+ constructor(config = {}) {
14
+ this.config = config;
15
+ }
16
+ }
17
+
18
+ module.exports = Action;
package/package.json CHANGED
@@ -1,6 +1,26 @@
1
1
  {
2
2
  "name": "mm_action",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "动作管理模块:提供动作的注册与管理能力",
5
+ "main": "index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://gitee.com/qiuwenwu91/mm_action.git"
9
+ },
10
+ "keywords": [
11
+ "mm_mod",
12
+ "mm_infra",
13
+ "action",
14
+ "动作"
15
+ ],
16
+ "layer": "infra",
17
+ "group": "common",
18
+ "author": "邱文武",
19
+ "license": "ISC",
20
+ "engines": {
21
+ "node": ">=18.0.0"
22
+ },
23
+ "scripts": {
24
+ "test": "node test.js"
25
+ }
6
26
  }
package/test.js ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ const assert = require('assert');
4
+ const Action = require('./index.js');
5
+
6
+ const instance = new Action();
7
+ assert.ok(instance instanceof Action, 'instance 应为 Action 实例');
8
+ assert.deepStrictEqual(instance.config, {}, '默认配置应为空对象');
9
+
10
+ console.log('mm_action test passed');