@wox-launcher/wox-plugin 0.0.1 → 0.0.2
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/package.json +8 -9
- package/src/wox.ts +5 -5
package/package.json
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wox-launcher/wox-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
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",
|
|
@@ -21,6 +15,11 @@
|
|
|
21
15
|
"prettier": "3.0.2",
|
|
22
16
|
"typescript": "^5.2.2"
|
|
23
17
|
},
|
|
24
|
-
"dependencies": {
|
|
18
|
+
"dependencies": {},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "pnpm clean && ncc build src/wox.ts -o dist",
|
|
21
|
+
"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);\"",
|
|
22
|
+
"clean:all": "npm run clean && (rm -r ./node_modules || true)",
|
|
23
|
+
"lint": "eslint --ext .ts --fix src/**/*.ts"
|
|
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
|
*/
|