win_webview2 1.0.4 → 1.0.6

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 CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "win_webview2",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/nnttoo/win_webview2"
7
7
  },
8
8
  "description": "",
9
- "main": "index.js",
10
- "exports": "./winWebview2.mjs",
9
+ "main": "./winWebview2.mjs",
10
+ "types": "./winWebview2.d.ts",
11
11
  "bin": {
12
12
  "win_webview2": "./ww2_builder.mjs"
13
13
  },
@@ -18,5 +18,8 @@
18
18
  "rcedit": "^4.0.1",
19
19
  "sharp": "^0.33.5",
20
20
  "sharp-ico": "^0.1.5"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^25.5.0"
21
24
  }
22
- }
25
+ }
@@ -0,0 +1,21 @@
1
+ import { OpenDialogFileArg, OpenWebArg } from "./argtype";
2
+
3
+
4
+ /**
5
+ * Open WebView window via IPC
6
+ */
7
+ export function openWeb(arg: OpenWebArg): void;
8
+
9
+ /**
10
+ * Open file dialog and return selected file path
11
+ */
12
+ export function openDialogFile(arg: OpenDialogFileArg): Promise<string>;
13
+
14
+ /**
15
+ * Open folder dialog and return selected folder path
16
+ */
17
+ export function openDialogFolder(): Promise<string>;
18
+
19
+ export declare class WW2Deploy {
20
+ static startDeploy(): Promise<void>;
21
+ }
package/winWebview2.mjs CHANGED
@@ -1,5 +1,4 @@
1
- // @ts-check
2
-
1
+
3
2
  import net from "net"
4
3
  let isOncloseSetted = false;
5
4
  const prefixWebview = "WINWEBVIEW_";
@@ -53,6 +52,8 @@ async function createPipe() {
53
52
  console.log('Anak terhubung ke Named Pipe!');
54
53
  });
55
54
 
55
+
56
+
56
57
  client.on('data', (buff) => {
57
58
  let data = buff.toString();
58
59
 
@@ -113,4 +114,6 @@ export async function openDialogFolder() {
113
114
  fun: "OpenDialogFolder"
114
115
  };
115
116
  return waitingResult(obj);
116
- }
117
+ }
118
+
119
+ export { WW2Deploy } from "./ww2_builder_deploy.mjs";
Binary file
Binary file
package/ww2_builder.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
-
3
- // @ts-check
2
+
4
3
 
5
4
  import prompts from "prompts";
6
5
  import fs from 'fs'
@@ -0,0 +1,3 @@
1
+ export class WW2Deploy {
2
+ static startDeploy(): Promise<void>;
3
+ }