@wox-launcher/wox-plugin 0.0.1 → 0.0.5

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 (2) hide show
  1. package/package.json +9 -10
  2. package/src/wox.ts +5 -5
package/package.json CHANGED
@@ -1,26 +1,25 @@
1
1
  {
2
2
  "name": "@wox-launcher/wox-plugin",
3
- "version": "0.0.1",
3
+ "version": "0.0.5",
4
4
  "description": "All nodejs plugin for Wox should use types in this package",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/Wox-launcher/Wox.git"
8
8
  },
9
- "scripts": {
10
- "build": "pnpm clean && ncc build src/wox.ts -o dist",
11
- "clean": "node -e \"var { rmdirSync, existsSync } = require('fs'), path = require('path'); ['./dist'].forEach(fPath => {if (existsSync(path.join(__dirname, fPath))) rmdirSync(path.join(__dirname, fPath), { recursive: true })}); process.exit(0);\"",
12
- "clean:all": "npm run clean && (rm -r ./node_modules || true)",
13
- "lint": "eslint --ext .ts --fix src/**/*.ts"
14
- },
15
9
  "devDependencies": {
16
10
  "@typescript-eslint/eslint-plugin": "^6.6.0",
17
11
  "@typescript-eslint/parser": "^6.6.0",
18
- "@vercel/ncc": "^0.38.0",
19
12
  "eslint": "^8.49.0",
20
13
  "eslint-config-prettier": "9.0.0",
21
14
  "prettier": "3.0.2",
22
15
  "typescript": "^5.2.2"
23
16
  },
24
- "dependencies": {
17
+ "dependencies": {},
18
+ "scripts": {
19
+ "build": "pnpm clean && tsc",
20
+ "clean": "node -e \"var { rmdirSync, existsSync } = require('fs'), path = require('path'); ['./dist'].forEach(fPath => {if (existsSync(path.join(__dirname, fPath))) rmdirSync(path.join(__dirname, fPath), { recursive: true })}); process.exit(0);\"",
21
+ "clean:all": "npm run clean && (rm -r ./node_modules || true)",
22
+ "lint": "eslint --ext .ts --fix src/**/*.ts",
23
+ "pub": "pnpm build && pnpm version patch && pnpm publish --no-git-checks --access public"
25
24
  }
26
- }
25
+ }
package/src/wox.ts CHANGED
@@ -1,9 +1,9 @@
1
- interface Plugin {
1
+ export interface Plugin {
2
2
  init: (context: PluginInitContext) => void
3
3
  query: (query: Query) => Result[]
4
4
  }
5
5
 
6
- interface Query {
6
+ export interface Query {
7
7
  /**
8
8
  * Raw query, this includes trigger keyword if it has
9
9
  * We didn't recommend use this property directly. You should always use Search property.
@@ -23,7 +23,7 @@ interface Query {
23
23
  Search: string
24
24
  }
25
25
 
26
- interface Result {
26
+ export interface Result {
27
27
  Title: string
28
28
  Description?: string
29
29
  IcoPath: string
@@ -31,11 +31,11 @@ interface Result {
31
31
  Action: () => boolean
32
32
  }
33
33
 
34
- interface PluginInitContext {
34
+ export interface PluginInitContext {
35
35
  API: PublicAPI
36
36
  }
37
37
 
38
- interface PublicAPI {
38
+ export interface PublicAPI {
39
39
  /**
40
40
  * Change Wox query
41
41
  */