@initx-plugin/cp 0.0.18 → 0.0.19

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 (3) hide show
  1. package/README.md +6 -0
  2. package/dist/index.mjs +9 -18
  3. package/package.json +11 -11
package/README.md CHANGED
@@ -28,6 +28,12 @@ npx initx cp cwd
28
28
  npx initx cp ssh
29
29
  ```
30
30
 
31
+ ### GPG Public Key
32
+
33
+ ```bash
34
+ npx initx cp gpg
35
+ ```
36
+
31
37
  ## Documentation
32
38
 
33
39
  [initx](https://github.com/initx-collective/initx)
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import os from 'node:os';
2
- import { cwd } from 'node:process';
3
1
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
+ import os from 'node:os';
4
3
  import { resolve } from 'node:path';
5
- import clipboard from 'clipboardy';
4
+ import { cwd } from 'node:process';
6
5
  import { InitxPlugin } from '@initx-plugin/core';
7
6
  import { log, inquirer, gpgList, c } from '@initx-plugin/utils';
7
+ import clipboard from 'clipboardy';
8
8
 
9
9
  var CpType = /* @__PURE__ */ ((CpType2) => {
10
10
  CpType2["SSH"] = "ssh";
@@ -13,22 +13,13 @@ var CpType = /* @__PURE__ */ ((CpType2) => {
13
13
  return CpType2;
14
14
  })(CpType || {});
15
15
 
16
- var __defProp = Object.defineProperty;
17
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18
- var __publicField = (obj, key, value) => {
19
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
20
- return value;
21
- };
22
16
  class CpPlugin extends InitxPlugin {
23
- constructor() {
24
- super(...arguments);
25
- __publicField(this, "matchers", [
26
- {
27
- matching: "cp",
28
- description: "Copy SSH public key"
29
- }
30
- ]);
31
- }
17
+ matchers = [
18
+ {
19
+ matching: "cp",
20
+ description: "Copy SSH public key"
21
+ }
22
+ ];
32
23
  async handle(_ctx, cpType, ...others) {
33
24
  if (!cpType || typeof this[cpType] !== "function") {
34
25
  const typeList = CpType;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@initx-plugin/cp",
3
3
  "type": "module",
4
- "version": "0.0.18",
4
+ "version": "0.0.19",
5
5
  "description": "initx plugin, copy some text to clipboard",
6
6
  "author": "imba97",
7
7
  "license": "MIT",
@@ -24,20 +24,20 @@
24
24
  "dist"
25
25
  ],
26
26
  "dependencies": {
27
- "@initx-plugin/core": "^0.0.23",
28
- "@initx-plugin/utils": "^0.0.23",
27
+ "@initx-plugin/core": "^0.0.27",
28
+ "@initx-plugin/utils": "^0.0.27",
29
29
  "clipboardy": "^4.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@imba97/eslint-config": "^0.0.4",
33
- "@types/node": "^22.9.0",
34
- "bumpp": "^9.8.1",
35
- "eslint": "^9.15.0",
36
- "lint-staged": "^15.2.10",
32
+ "@imba97/eslint-config": "^0.0.5",
33
+ "@types/node": "^22.10.2",
34
+ "bumpp": "^9.9.2",
35
+ "eslint": "^9.17.0",
36
+ "lint-staged": "^15.3.0",
37
37
  "simple-git-hooks": "^2.11.1",
38
- "typescript": "5.5.4",
39
- "unbuild": "^2.0.0",
40
- "vitest": "^2.1.5"
38
+ "typescript": "^5.7.2",
39
+ "unbuild": "^3.1.0",
40
+ "vitest": "^2.1.8"
41
41
  },
42
42
  "simple-git-hooks": {
43
43
  "pre-commit": "pnpm lint-staged"