@initx-plugin/cp 0.0.9 → 0.0.11

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## @initx-plugin/cp
8
8
 
9
- Copy some text to clipboard
9
+ Copy plugin for `initx`
10
10
 
11
11
  ## Documentation
12
12
 
package/dist/index.d.mts CHANGED
@@ -14,4 +14,4 @@ declare class CpHandler extends InitxHandler {
14
14
  private copy;
15
15
  }
16
16
 
17
- export { CpHandler };
17
+ export { CpHandler as default };
package/dist/index.d.ts CHANGED
@@ -14,4 +14,4 @@ declare class CpHandler extends InitxHandler {
14
14
  private copy;
15
15
  }
16
16
 
17
- export { CpHandler };
17
+ export { CpHandler as default };
package/dist/index.mjs CHANGED
@@ -28,6 +28,8 @@ class CpHandler extends InitxHandler {
28
28
  }
29
29
  async handle(_options, cpType, ...others) {
30
30
  if (!cpType || typeof this[cpType] !== "function") {
31
+ const typeList = CpType;
32
+ log.error(`Please enter the copy type, Available types: ${Object.keys(typeList).map((key) => typeList[key])}`);
31
33
  return;
32
34
  }
33
35
  this[cpType](...others);
@@ -48,4 +50,4 @@ class CpHandler extends InitxHandler {
48
50
  }
49
51
  }
50
52
 
51
- export { CpHandler };
53
+ export { CpHandler as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@initx-plugin/cp",
3
3
  "type": "module",
4
- "version": "0.0.9",
4
+ "version": "0.0.11",
5
5
  "description": "initx plugin, copy some text to clipboard",
6
6
  "author": "imba97",
7
7
  "license": "MIT",
@@ -24,8 +24,8 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "clipboardy": "^4.0.0",
27
- "@initx-plugin/core": "0.0.9",
28
- "@initx-plugin/utils": "0.0.9"
27
+ "@initx-plugin/utils": "0.0.11",
28
+ "@initx-plugin/core": "0.0.11"
29
29
  },
30
30
  "scripts": {
31
31
  "stub": "unbuild --stub",