@vltpkg/url-open 1.0.0-rc.8 → 1.0.1
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,70 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/url-open",
|
|
3
3
|
"description": "Open URLs using the system's default web browser",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
8
8
|
"directory": "src/url-open"
|
|
9
9
|
},
|
|
10
|
-
"author":
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"dialects": [
|
|
15
|
-
"esm"
|
|
16
|
-
],
|
|
17
|
-
"exports": {
|
|
18
|
-
"./package.json": "./package.json",
|
|
19
|
-
".": "./src/index.ts"
|
|
20
|
-
}
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "vlt technology inc.",
|
|
12
|
+
"email": "support@vlt.sh",
|
|
13
|
+
"url": "http://vlt.sh"
|
|
21
14
|
},
|
|
22
15
|
"dependencies": {
|
|
23
|
-
"@vltpkg/promise-spawn": "1.0.
|
|
24
|
-
"@vltpkg/which": "1.0.
|
|
16
|
+
"@vltpkg/promise-spawn": "1.0.1",
|
|
17
|
+
"@vltpkg/which": "1.0.1"
|
|
25
18
|
},
|
|
26
19
|
"devDependencies": {
|
|
27
|
-
"@eslint/js": "^9.
|
|
28
|
-
"@types/node": "^22.
|
|
29
|
-
"eslint": "^9.
|
|
30
|
-
"prettier": "^3.
|
|
31
|
-
"tap": "^21.
|
|
32
|
-
"tshy": "^3.0.2",
|
|
20
|
+
"@eslint/js": "^9.39.1",
|
|
21
|
+
"@types/node": "^22.19.2",
|
|
22
|
+
"eslint": "^9.39.1",
|
|
23
|
+
"prettier": "^3.7.4",
|
|
24
|
+
"tap": "^21.5.0",
|
|
33
25
|
"typedoc": "~0.27.9",
|
|
34
26
|
"typescript": "5.7.3",
|
|
35
|
-
"typescript-eslint": "^8.
|
|
27
|
+
"typescript-eslint": "^8.49.0"
|
|
36
28
|
},
|
|
37
29
|
"license": "BSD-2-Clause-Patent",
|
|
38
30
|
"engines": {
|
|
39
|
-
"node": ">=22"
|
|
31
|
+
"node": ">=22.22.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
|
|
35
|
+
"format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
|
|
36
|
+
"lint": "eslint . --fix",
|
|
37
|
+
"lint:check": "eslint .",
|
|
38
|
+
"prepack": "tsc -p tsconfig.publish.json && ../../scripts/update-dist-exports.ts",
|
|
39
|
+
"snap": "tap",
|
|
40
|
+
"test": "tap",
|
|
41
|
+
"posttest": "tsc --noEmit",
|
|
42
|
+
"typecheck": "tsc --noEmit"
|
|
40
43
|
},
|
|
41
44
|
"tap": {
|
|
42
45
|
"extends": "../../tap-config.yaml"
|
|
43
46
|
},
|
|
44
47
|
"prettier": "../../.prettierrc.js",
|
|
45
|
-
"module": "./dist/
|
|
48
|
+
"module": "./dist/index.js",
|
|
46
49
|
"type": "module",
|
|
47
50
|
"exports": {
|
|
48
51
|
"./package.json": "./package.json",
|
|
49
52
|
".": {
|
|
50
53
|
"import": {
|
|
51
|
-
"
|
|
52
|
-
"default": "./dist/esm/index.js"
|
|
54
|
+
"default": "./dist/index.js"
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
},
|
|
56
58
|
"files": [
|
|
57
59
|
"dist"
|
|
58
60
|
],
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"tshy": "tshy",
|
|
68
|
-
"typecheck": "tsc --noEmit"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
61
|
+
"bugs": [
|
|
62
|
+
{
|
|
63
|
+
"type": "link",
|
|
64
|
+
"url": "https://github.com/vltpkg/vltpkg/issues"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"homepage": "https://github.com/vltpkg/vltpkg/tree/main/src/url-open#readme"
|
|
68
|
+
}
|
package/dist/esm/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAA;AAKD,eAAO,MAAM,OAAO,QACb,MAAM,eACC,WAAW;;;wBAsCxB,CAAA"}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AAC1B,IACE,QAAQ,KAAK,OAAO;IACpB,OAAO,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EAC7C,CAAC;IACD,QAAQ,GAAG,OAAO,CAAA;AACpB,CAAC;AAMD,sCAAsC;AACtC,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAE/C,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAC1B,GAAW,EACX,EAAE,MAAM,KAAkB,EAAE,EAC5B,EAAE;IACF,MAAM,GAAG,GACP,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO;QAC9B,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM;YAChC,CAAC,CAAC,UAAU,CAAA;IACd,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IAElB,4CAA4C;IAC5C,+DAA+D;IAC/D,MAAM,IAAI,GACR,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpB,aAAa,GAAG,WAAW,GAAG,oBAAoB;QACpD,CAAC,CAAC,GAAG,CAAA;IAEP;IACE,yDAAyD;IACzD,mBAAmB;IACnB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;QACpB,wDAAwD;QACxD,gEAAgE;QAChE,CAAC,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,IAAI,EAC9C,CAAC;QACD,GAAG,CAAC,yCAAyC,IAAI,YAAY,CAAC,CAAA;QAC9D,OAAM;IACR,CAAC;IAED,GAAG,CAAC,6BAA6B,IAAI,EAAE,CAAC,CAAA;IAExC,OAAO,YAAY,CACjB,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,EACxC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAC7C;QACE,MAAM;QACN,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,SAAS;KACjB,CACF,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { promiseSpawn } from '@vltpkg/promise-spawn'\nimport { which } from '@vltpkg/which'\nimport { release } from 'node:os'\n\nlet { platform } = process\nif (\n platform === 'linux' &&\n release().toLowerCase().includes('microsoft')\n) {\n platform = 'win32'\n}\n\nexport type OpenOptions = {\n signal?: AbortSignal\n}\n\n// eslint-disable-next-line no-console\nconst log = (msg: string) => console.error(msg)\n\nexport const urlOpen = async (\n url: string,\n { signal }: OpenOptions = {},\n) => {\n const cmd =\n platform === 'win32' ? 'start'\n : platform === 'darwin' ? 'open'\n : 'xdg-open'\n const args = [url]\n\n // print as hyperlink if we think it's a TTY\n // TODO: only do if chalk says the support level is high enough\n const link =\n process.stderr.isTTY ?\n `\\u001b]8;;${url}\\u001b\\\\${url}\\u001b]8;;\\u001b\\\\`\n : url\n\n if (\n // Use stdin.isTTY to detect if we should attempt to open\n // a browser or not\n !process.stdin.isTTY ||\n // Also check if the command is available since we don't\n // want the process to exit if we aren't able to open a browser.\n (await which(cmd, { nothrow: true })) === null\n ) {\n log(`Could not open a browser. Please open ${link} manually.`)\n return\n }\n\n log(`Opening a web browser to: ${link}`)\n\n return promiseSpawn(\n platform === 'win32' ? `${cmd} \"\"` : cmd,\n platform === 'win32' ? ['\"\"', ...args] : args,\n {\n signal,\n shell: true,\n stdio: 'inherit',\n },\n )\n}\n"]}
|
package/dist/esm/package.json
DELETED