sys-shim-bin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sys-shim-bin might be problematic. Click here for more details.

package/dist/index.cjs ADDED
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var path = require('node:path');
4
+ var process = require('node:process');
5
+ var node_url = require('node:url');
6
+
7
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
8
+ const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
9
+ const __dirname$1 = path.dirname(__filename$1);
10
+
11
+ function getPath() {
12
+ if (process.platform === "win32") {
13
+ return path.join(`${__dirname$1}/dist/main.exe`);
14
+ } else if (process.platform === "darwin") {
15
+ return ``
16
+ } else {
17
+ return ``
18
+ }
19
+ }
20
+
21
+ exports.getPath = getPath;
22
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../index.js"],"sourcesContent":["import path from \"node:path\";\nimport process from 'node:process'\n\nimport { fileURLToPath } from 'node:url'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\n\nexport function getPath() {\n if (process.platform === \"win32\") {\n return path.join(`${__dirname}/dist/main.exe`);\n } else if (process.platform === \"darwin\") {\n return ``\n } else {\n return ``\n }\n}\n"],"names":["__filename","fileURLToPath","__dirname"],"mappings":";;;;;;;AAKA,MAAMA,YAAU,GAAGC,sBAAa,CAAC,2PAAe,EAAC;AACjD,MAAMC,WAAS,GAAG,IAAI,CAAC,OAAO,CAACF,YAAU,EAAC;AAC1C;AACO,SAAS,OAAO,GAAG;AAC1B,EAAE,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;AACpC,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,EAAEE,WAAS,CAAC,cAAc,CAAC,CAAC,CAAC;AACnD,GAAG,MAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;AAC5C,IAAI,OAAO,CAAC,CAAC;AACb,GAAG,MAAM;AACT,IAAI,OAAO,CAAC,CAAC;AACb,GAAG;AACH;;;;"}
package/dist/index.mjs ADDED
@@ -0,0 +1,19 @@
1
+ import path from 'node:path';
2
+ import process from 'node:process';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = path.dirname(__filename);
7
+
8
+ function getPath() {
9
+ if (process.platform === "win32") {
10
+ return path.join(`${__dirname}/dist/main.exe`);
11
+ } else if (process.platform === "darwin") {
12
+ return ``
13
+ } else {
14
+ return ``
15
+ }
16
+ }
17
+
18
+ export { getPath };
19
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../index.js"],"sourcesContent":["import path from \"node:path\";\nimport process from 'node:process'\n\nimport { fileURLToPath } from 'node:url'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = path.dirname(__filename)\n\nexport function getPath() {\n if (process.platform === \"win32\") {\n return path.join(`${__dirname}/dist/main.exe`);\n } else if (process.platform === \"darwin\") {\n return ``\n } else {\n return ``\n }\n}\n"],"names":[],"mappings":";;;;AAKA,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAC;AACjD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAC;AAC1C;AACO,SAAS,OAAO,GAAG;AAC1B,EAAE,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;AACpC,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;AACnD,GAAG,MAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;AAC5C,IAAI,OAAO,CAAC,CAAC;AACb,GAAG,MAAM;AACT,IAAI,OAAO,CAAC,CAAC;AACb,GAAG;AACH;;;;"}
package/dist/main.exe ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "sys-shim-bin",
3
+ "version": "0.0.1",
4
+ "description": "把系统 api 封装为可执行程序,并提供服务供 webview 调用。",
5
+ "types": "./index.d.ts",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/index.mjs",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
15
+ "bin": {
16
+ "sys-shim-bin": "./dist/main.exe"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "build": "node build.js",
23
+ "test": "echo \"Error: no test specified\" && exit 1"
24
+ },
25
+ "keywords": ["webview"],
26
+ "author": "wll8",
27
+ "license": "ISC",
28
+ "devDependencies": {
29
+ "@rollup/plugin-node-resolve": "^15.2.3",
30
+ "rollup": "^4.17.2",
31
+ "shx": "^0.3.4"
32
+ }
33
+ }
package/readme.md ADDED
@@ -0,0 +1,19 @@
1
+
2
+ ## sys-shim-bin
3
+
4
+ 把系统 api 封装为可执行程序,并提供服务供 webview 调用。
5
+
6
+ ## 开发
7
+
8
+ ```sh
9
+ # 使用 ide 编译出 exe
10
+
11
+ # 进入 script 目录
12
+ cd script
13
+
14
+ # 安装依赖
15
+ pnpm i
16
+
17
+ # 生成 npm 包
18
+ pnpm build
19
+ ```