@pnpm/exe 11.0.0-beta.0 → 11.0.0-beta.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.
Files changed (200) hide show
  1. package/dist/node_modules/@gar/promise-retry/lib/index.js +28 -0
  2. package/dist/node_modules/@gar/promise-retry/package.json +48 -0
  3. package/dist/node_modules/@npmcli/agent/package.json +7 -7
  4. package/dist/node_modules/@npmcli/fs/package.json +4 -4
  5. package/dist/node_modules/abbrev/package.json +11 -15
  6. package/dist/node_modules/cacache/package.json +10 -11
  7. package/dist/node_modules/glob/dist/commonjs/glob.js +2 -1
  8. package/dist/node_modules/glob/dist/commonjs/index.min.js +4 -0
  9. package/dist/node_modules/glob/dist/commonjs/pattern.js +4 -0
  10. package/dist/node_modules/glob/dist/esm/glob.js +2 -1
  11. package/dist/node_modules/glob/dist/esm/index.min.js +4 -0
  12. package/dist/node_modules/glob/dist/esm/pattern.js +4 -0
  13. package/dist/node_modules/glob/package.json +38 -37
  14. package/dist/node_modules/graceful-fs/graceful-fs.js +1 -1
  15. package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +460 -525
  16. package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +179 -182
  17. package/dist/node_modules/iconv-lite/encodings/index.js +15 -15
  18. package/dist/node_modules/iconv-lite/encodings/internal.js +168 -148
  19. package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +55 -52
  20. package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +174 -175
  21. package/dist/node_modules/iconv-lite/encodings/utf16.js +121 -131
  22. package/dist/node_modules/iconv-lite/encodings/utf32.js +226 -238
  23. package/dist/node_modules/iconv-lite/encodings/utf7.js +208 -215
  24. package/dist/node_modules/iconv-lite/lib/bom-handling.js +30 -34
  25. package/dist/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  26. package/dist/node_modules/iconv-lite/lib/index.js +125 -123
  27. package/dist/node_modules/iconv-lite/lib/streams.js +92 -96
  28. package/dist/node_modules/iconv-lite/package.json +34 -8
  29. package/dist/node_modules/isexe/package.json +65 -18
  30. package/dist/node_modules/lru-cache/dist/commonjs/index.js +134 -85
  31. package/dist/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  32. package/dist/node_modules/lru-cache/dist/esm/index.js +134 -85
  33. package/dist/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  34. package/dist/node_modules/lru-cache/package.json +18 -41
  35. package/dist/node_modules/make-fetch-happen/lib/remote.js +1 -1
  36. package/dist/node_modules/make-fetch-happen/package.json +10 -10
  37. package/dist/node_modules/minipass-fetch/lib/body.js +25 -15
  38. package/dist/node_modules/minipass-fetch/package.json +7 -7
  39. package/dist/node_modules/minipass-sized/dist/commonjs/index.js +69 -0
  40. package/dist/node_modules/minipass-sized/dist/esm/index.js +64 -0
  41. package/dist/node_modules/minipass-sized/package.json +39 -9
  42. package/dist/node_modules/node-gyp/.release-please-manifest.json +1 -1
  43. package/dist/node_modules/node-gyp/bin/node-gyp.js +7 -0
  44. package/dist/node_modules/node-gyp/gyp/.release-please-manifest.json +1 -1
  45. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +3 -3
  46. package/dist/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +26 -1
  47. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +1 -1
  48. package/dist/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +3 -4
  49. package/dist/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +1 -1
  50. package/dist/node_modules/node-gyp/gyp/pyproject.toml +1 -1
  51. package/dist/node_modules/node-gyp/lib/build.js +2 -2
  52. package/dist/node_modules/node-gyp/lib/find-python.js +2 -8
  53. package/dist/node_modules/node-gyp/lib/find-visualstudio.js +11 -5
  54. package/dist/node_modules/node-gyp/lib/install.js +1 -1
  55. package/dist/node_modules/node-gyp/lib/process-release.js +3 -3
  56. package/dist/node_modules/node-gyp/package.json +13 -13
  57. package/dist/node_modules/nopt/package.json +5 -5
  58. package/dist/node_modules/proc-log/lib/index.js +10 -5
  59. package/dist/node_modules/proc-log/package.json +5 -5
  60. package/dist/node_modules/retry/lib/retry.js +2 -2
  61. package/dist/node_modules/retry/lib/retry_operation.js +10 -6
  62. package/dist/node_modules/retry/package.json +6 -2
  63. package/dist/node_modules/ssri/lib/index.js +33 -63
  64. package/dist/node_modules/ssri/package.json +17 -17
  65. package/dist/node_modules/unique-filename/package.json +5 -5
  66. package/dist/node_modules/unique-slug/package.json +4 -4
  67. package/dist/node_modules/which/package.json +29 -20
  68. package/dist/pnpm.mjs +63969 -54688
  69. package/dist/worker.js +601 -2162
  70. package/package.json +8 -8
  71. package/dist/node_modules/@isaacs/cliui/dist/commonjs/ansi-regex/index.js +0 -16
  72. package/dist/node_modules/@isaacs/cliui/dist/commonjs/ansi-styles/index.js +0 -170
  73. package/dist/node_modules/@isaacs/cliui/dist/commonjs/eastasianwidth/index.js +0 -307
  74. package/dist/node_modules/@isaacs/cliui/dist/commonjs/emoji-regex/index.js +0 -7
  75. package/dist/node_modules/@isaacs/cliui/dist/commonjs/index.js +0 -322
  76. package/dist/node_modules/@isaacs/cliui/dist/commonjs/index.min.js +0 -12
  77. package/dist/node_modules/@isaacs/cliui/dist/commonjs/string-width/index.js +0 -49
  78. package/dist/node_modules/@isaacs/cliui/dist/commonjs/strip-ansi/index.js +0 -8
  79. package/dist/node_modules/@isaacs/cliui/dist/commonjs/wrap-ansi/index.js +0 -176
  80. package/dist/node_modules/@isaacs/cliui/dist/esm/ansi-regex/index.js +0 -12
  81. package/dist/node_modules/@isaacs/cliui/dist/esm/ansi-styles/index.js +0 -167
  82. package/dist/node_modules/@isaacs/cliui/dist/esm/eastasianwidth/index.js +0 -299
  83. package/dist/node_modules/@isaacs/cliui/dist/esm/emoji-regex/index.js +0 -3
  84. package/dist/node_modules/@isaacs/cliui/dist/esm/index.js +0 -317
  85. package/dist/node_modules/@isaacs/cliui/dist/esm/index.min.js +0 -12
  86. package/dist/node_modules/@isaacs/cliui/dist/esm/string-width/index.js +0 -46
  87. package/dist/node_modules/@isaacs/cliui/dist/esm/strip-ansi/index.js +0 -4
  88. package/dist/node_modules/@isaacs/cliui/dist/esm/wrap-ansi/index.js +0 -172
  89. package/dist/node_modules/@isaacs/cliui/package.json +0 -163
  90. package/dist/node_modules/cross-spawn/LICENSE +0 -21
  91. package/dist/node_modules/cross-spawn/index.js +0 -39
  92. package/dist/node_modules/cross-spawn/lib/enoent.js +0 -59
  93. package/dist/node_modules/cross-spawn/lib/parse.js +0 -91
  94. package/dist/node_modules/cross-spawn/lib/util/escape.js +0 -47
  95. package/dist/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  96. package/dist/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  97. package/dist/node_modules/cross-spawn/package.json +0 -73
  98. package/dist/node_modules/encoding/.prettierrc.js +0 -8
  99. package/dist/node_modules/encoding/LICENSE +0 -16
  100. package/dist/node_modules/encoding/lib/encoding.js +0 -83
  101. package/dist/node_modules/encoding/package.json +0 -18
  102. package/dist/node_modules/err-code/.eslintrc.json +0 -7
  103. package/dist/node_modules/err-code/bower.json +0 -30
  104. package/dist/node_modules/err-code/index.js +0 -47
  105. package/dist/node_modules/err-code/index.umd.js +0 -51
  106. package/dist/node_modules/err-code/package.json +0 -34
  107. package/dist/node_modules/foreground-child/LICENSE +0 -15
  108. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.js +0 -58
  109. package/dist/node_modules/foreground-child/dist/commonjs/index.js +0 -123
  110. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.js +0 -38
  111. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.js +0 -50
  112. package/dist/node_modules/foreground-child/dist/esm/all-signals.js +0 -52
  113. package/dist/node_modules/foreground-child/dist/esm/index.js +0 -115
  114. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.js +0 -34
  115. package/dist/node_modules/foreground-child/dist/esm/watchdog.js +0 -46
  116. package/dist/node_modules/foreground-child/package.json +0 -106
  117. package/dist/node_modules/glob/dist/esm/bin.d.mts +0 -3
  118. package/dist/node_modules/glob/dist/esm/bin.mjs +0 -346
  119. package/dist/node_modules/iconv-lite/.github/dependabot.yml +0 -11
  120. package/dist/node_modules/iconv-lite/.idea/codeStyles/Project.xml +0 -47
  121. package/dist/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +0 -5
  122. package/dist/node_modules/iconv-lite/.idea/iconv-lite.iml +0 -12
  123. package/dist/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +0 -6
  124. package/dist/node_modules/iconv-lite/.idea/modules.xml +0 -8
  125. package/dist/node_modules/iconv-lite/.idea/vcs.xml +0 -6
  126. package/dist/node_modules/isexe/LICENSE +0 -15
  127. package/dist/node_modules/isexe/index.js +0 -57
  128. package/dist/node_modules/isexe/mode.js +0 -41
  129. package/dist/node_modules/isexe/windows.js +0 -42
  130. package/dist/node_modules/jackspeak/dist/commonjs/index.js +0 -944
  131. package/dist/node_modules/jackspeak/dist/commonjs/index.min.js +0 -33
  132. package/dist/node_modules/jackspeak/dist/commonjs/package.json +0 -3
  133. package/dist/node_modules/jackspeak/dist/esm/index.js +0 -936
  134. package/dist/node_modules/jackspeak/dist/esm/index.min.js +0 -33
  135. package/dist/node_modules/jackspeak/dist/esm/package.json +0 -3
  136. package/dist/node_modules/jackspeak/package.json +0 -115
  137. package/dist/node_modules/lru-cache/LICENSE +0 -15
  138. package/dist/node_modules/minipass-sized/index.js +0 -67
  139. package/dist/node_modules/minipass-sized/node_modules/minipass/LICENSE +0 -15
  140. package/dist/node_modules/minipass-sized/node_modules/minipass/index.js +0 -649
  141. package/dist/node_modules/minipass-sized/node_modules/minipass/package.json +0 -56
  142. package/dist/node_modules/minipass-sized/package-lock.json +0 -3464
  143. package/dist/node_modules/node-gyp/node_modules/isexe/dist/commonjs/package.json +0 -3
  144. package/dist/node_modules/node-gyp/node_modules/isexe/dist/esm/package.json +0 -3
  145. package/dist/node_modules/node-gyp/node_modules/isexe/package.json +0 -78
  146. package/dist/node_modules/node-gyp/node_modules/which/LICENSE +0 -15
  147. package/dist/node_modules/node-gyp/node_modules/which/package.json +0 -52
  148. package/dist/node_modules/package-json-from-dist/dist/commonjs/index.js +0 -134
  149. package/dist/node_modules/package-json-from-dist/dist/commonjs/package.json +0 -3
  150. package/dist/node_modules/package-json-from-dist/dist/esm/index.js +0 -129
  151. package/dist/node_modules/package-json-from-dist/dist/esm/package.json +0 -3
  152. package/dist/node_modules/package-json-from-dist/package.json +0 -68
  153. package/dist/node_modules/path-key/index.js +0 -16
  154. package/dist/node_modules/path-key/license +0 -9
  155. package/dist/node_modules/path-key/package.json +0 -39
  156. package/dist/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +0 -1589
  157. package/dist/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +0 -2
  158. package/dist/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +0 -3
  159. package/dist/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +0 -1585
  160. package/dist/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +0 -2
  161. package/dist/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +0 -3
  162. package/dist/node_modules/path-scurry/node_modules/lru-cache/package.json +0 -101
  163. package/dist/node_modules/promise-retry/index.js +0 -52
  164. package/dist/node_modules/promise-retry/package.json +0 -37
  165. package/dist/node_modules/retry/equation.gif +0 -0
  166. package/dist/node_modules/shebang-command/index.js +0 -19
  167. package/dist/node_modules/shebang-command/license +0 -9
  168. package/dist/node_modules/shebang-command/package.json +0 -34
  169. package/dist/node_modules/shebang-regex/index.js +0 -2
  170. package/dist/node_modules/shebang-regex/license +0 -9
  171. package/dist/node_modules/shebang-regex/package.json +0 -35
  172. package/dist/node_modules/signal-exit/LICENSE.txt +0 -16
  173. package/dist/node_modules/signal-exit/dist/cjs/browser.js +0 -10
  174. package/dist/node_modules/signal-exit/dist/cjs/index.js +0 -279
  175. package/dist/node_modules/signal-exit/dist/cjs/package.json +0 -3
  176. package/dist/node_modules/signal-exit/dist/cjs/signals.js +0 -42
  177. package/dist/node_modules/signal-exit/dist/mjs/browser.js +0 -4
  178. package/dist/node_modules/signal-exit/dist/mjs/index.js +0 -275
  179. package/dist/node_modules/signal-exit/dist/mjs/package.json +0 -3
  180. package/dist/node_modules/signal-exit/dist/mjs/signals.js +0 -39
  181. package/dist/node_modules/signal-exit/package.json +0 -106
  182. package/dist/node_modules/which/bin/node-which +0 -52
  183. package/dist/node_modules/which/which.js +0 -125
  184. /package/dist/node_modules/{promise-retry → @gar/promise-retry}/LICENSE +0 -0
  185. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/commonjs/index.js +0 -0
  186. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/commonjs/index.min.js +0 -0
  187. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/commonjs/options.js +0 -0
  188. /package/dist/node_modules/{@isaacs/cliui → isexe}/dist/commonjs/package.json +0 -0
  189. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/commonjs/posix.js +0 -0
  190. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/commonjs/win32.js +0 -0
  191. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/esm/index.js +0 -0
  192. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/esm/index.min.js +0 -0
  193. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/esm/options.js +0 -0
  194. /package/dist/node_modules/{@isaacs/cliui → isexe}/dist/esm/package.json +0 -0
  195. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/esm/posix.js +0 -0
  196. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/esm/win32.js +0 -0
  197. /package/dist/node_modules/{foreground-child → minipass-sized}/dist/commonjs/package.json +0 -0
  198. /package/dist/node_modules/{foreground-child → minipass-sized}/dist/esm/package.json +0 -0
  199. /package/dist/node_modules/{node-gyp/node_modules/which → which}/bin/which.js +0 -0
  200. /package/dist/node_modules/{node-gyp/node_modules/which → which}/lib/index.js +0 -0
@@ -1,46 +0,0 @@
1
- // this spawns a child process that listens for SIGHUP when the
2
- // parent process exits, and after 200ms, sends a SIGKILL to the
3
- // child, in case it did not terminate.
4
- import { spawn } from 'child_process';
5
- const watchdogCode = String.raw `
6
- const pid = parseInt(process.argv[1], 10)
7
- process.title = 'node (foreground-child watchdog pid=' + pid + ')'
8
- if (!isNaN(pid)) {
9
- let barked = false
10
- // keepalive
11
- const interval = setInterval(() => {}, 60000)
12
- const bark = () => {
13
- clearInterval(interval)
14
- if (barked) return
15
- barked = true
16
- process.removeListener('SIGHUP', bark)
17
- setTimeout(() => {
18
- try {
19
- process.kill(pid, 'SIGKILL')
20
- setTimeout(() => process.exit(), 200)
21
- } catch (_) {}
22
- }, 500)
23
- })
24
- process.on('SIGHUP', bark)
25
- }
26
- `;
27
- /**
28
- * Pass in a ChildProcess, and this will spawn a watchdog process that
29
- * will make sure it exits if the parent does, thus preventing any
30
- * dangling detached zombie processes.
31
- *
32
- * If the child ends before the parent, then the watchdog will terminate.
33
- */
34
- export const watchdog = (child) => {
35
- let dogExited = false;
36
- const dog = spawn(process.execPath, ['-e', watchdogCode, String(child.pid)], {
37
- stdio: 'ignore',
38
- });
39
- dog.on('exit', () => (dogExited = true));
40
- child.on('exit', () => {
41
- if (!dogExited)
42
- dog.kill('SIGKILL');
43
- });
44
- return dog;
45
- };
46
- //# sourceMappingURL=watchdog.js.map
@@ -1,106 +0,0 @@
1
- {
2
- "name": "foreground-child",
3
- "version": "3.3.1",
4
- "description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.",
5
- "main": "./dist/commonjs/index.js",
6
- "types": "./dist/commonjs/index.d.ts",
7
- "exports": {
8
- "./watchdog": {
9
- "import": {
10
- "types": "./dist/esm/watchdog.d.ts",
11
- "default": "./dist/esm/watchdog.js"
12
- },
13
- "require": {
14
- "types": "./dist/commonjs/watchdog.d.ts",
15
- "default": "./dist/commonjs/watchdog.js"
16
- }
17
- },
18
- "./proxy-signals": {
19
- "import": {
20
- "types": "./dist/esm/proxy-signals.d.ts",
21
- "default": "./dist/esm/proxy-signals.js"
22
- },
23
- "require": {
24
- "types": "./dist/commonjs/proxy-signals.d.ts",
25
- "default": "./dist/commonjs/proxy-signals.js"
26
- }
27
- },
28
- "./package.json": "./package.json",
29
- ".": {
30
- "import": {
31
- "types": "./dist/esm/index.d.ts",
32
- "default": "./dist/esm/index.js"
33
- },
34
- "require": {
35
- "types": "./dist/commonjs/index.d.ts",
36
- "default": "./dist/commonjs/index.js"
37
- }
38
- }
39
- },
40
- "files": [
41
- "dist"
42
- ],
43
- "engines": {
44
- "node": ">=14"
45
- },
46
- "dependencies": {
47
- "cross-spawn": "^7.0.6",
48
- "signal-exit": "^4.0.1"
49
- },
50
- "scripts": {
51
- "preversion": "npm test",
52
- "postversion": "npm publish",
53
- "prepublishOnly": "git push origin --follow-tags",
54
- "prepare": "tshy",
55
- "pretest": "npm run prepare",
56
- "presnap": "npm run prepare",
57
- "test": "tap",
58
- "snap": "tap",
59
- "format": "prettier --write . --log-level warn",
60
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
61
- },
62
- "prettier": {
63
- "experimentalTernaries": true,
64
- "semi": false,
65
- "printWidth": 75,
66
- "tabWidth": 2,
67
- "useTabs": false,
68
- "singleQuote": true,
69
- "jsxSingleQuote": false,
70
- "bracketSameLine": true,
71
- "arrowParens": "avoid",
72
- "endOfLine": "lf"
73
- },
74
- "tap": {
75
- "typecheck": true
76
- },
77
- "repository": {
78
- "type": "git",
79
- "url": "git+https://github.com/tapjs/foreground-child.git"
80
- },
81
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
82
- "license": "ISC",
83
- "devDependencies": {
84
- "@types/cross-spawn": "^6.0.2",
85
- "@types/node": "^18.15.11",
86
- "@types/tap": "^15.0.8",
87
- "prettier": "^3.3.2",
88
- "tap": "^21.1.0",
89
- "tshy": "^3.0.2",
90
- "typedoc": "^0.24.2",
91
- "typescript": "^5.0.2"
92
- },
93
- "funding": {
94
- "url": "https://github.com/sponsors/isaacs"
95
- },
96
- "tshy": {
97
- "exports": {
98
- "./watchdog": "./src/watchdog.ts",
99
- "./proxy-signals": "./src/proxy-signals.ts",
100
- "./package.json": "./package.json",
101
- ".": "./src/index.ts"
102
- }
103
- },
104
- "type": "module",
105
- "module": "./dist/esm/index.js"
106
- }
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=bin.d.mts.map
@@ -1,346 +0,0 @@
1
- #!/usr/bin/env node
2
- import { foregroundChild } from 'foreground-child';
3
- import { existsSync } from 'fs';
4
- import { jack } from 'jackspeak';
5
- import { loadPackageJson } from 'package-json-from-dist';
6
- import { basename, join } from 'path';
7
- import { globStream } from './index.js';
8
- const { version } = loadPackageJson(import.meta.url, '../package.json');
9
- const j = jack({
10
- usage: 'glob [options] [<pattern> [<pattern> ...]]',
11
- })
12
- .description(`
13
- Glob v${version}
14
-
15
- Expand the positional glob expression arguments into any matching file
16
- system paths found.
17
- `)
18
- .opt({
19
- cmd: {
20
- short: 'c',
21
- hint: 'command',
22
- description: `Run the command provided, passing the glob expression
23
- matches as arguments.`,
24
- },
25
- })
26
- .opt({
27
- default: {
28
- short: 'p',
29
- hint: 'pattern',
30
- description: `If no positional arguments are provided, glob will use
31
- this pattern`,
32
- },
33
- })
34
- .flag({
35
- shell: {
36
- default: false,
37
- description: `Interpret the command as a shell command by passing it
38
- to the shell, with all matched filesystem paths appended,
39
- **even if this cannot be done safely**.
40
-
41
- This is **not** unsafe (and usually unnecessary) when using
42
- the known Unix shells sh, bash, zsh, and fish, as these can
43
- all be executed in such a way as to pass positional
44
- arguments safely.
45
-
46
- **Note**: THIS IS UNSAFE IF THE FILE PATHS ARE UNTRUSTED,
47
- because a path like \`'some/path/\\$\\(cmd)'\` will be
48
- executed by the shell.
49
-
50
- If you do have positional arguments that you wish to pass to
51
- the command ahead of the glob pattern matches, use the
52
- \`--cmd-arg\`/\`-g\` option instead.
53
-
54
- The next major release of glob will fully remove the ability
55
- to use this option unsafely.`,
56
- },
57
- })
58
- .optList({
59
- 'cmd-arg': {
60
- short: 'g',
61
- hint: 'arg',
62
- default: [],
63
- description: `Pass the provided values to the supplied command, ahead of
64
- the glob matches.
65
-
66
- For example, the command:
67
-
68
- glob -c echo -g"hello" -g"world" *.txt
69
-
70
- might output:
71
-
72
- hello world a.txt b.txt
73
-
74
- This is a safer (and future-proof) alternative than putting
75
- positional arguments in the \`-c\`/\`--cmd\` option.`,
76
- },
77
- })
78
- .flag({
79
- all: {
80
- short: 'A',
81
- description: `By default, the glob cli command will not expand any
82
- arguments that are an exact match to a file on disk.
83
-
84
- This prevents double-expanding, in case the shell expands
85
- an argument whose filename is a glob expression.
86
-
87
- For example, if 'app/*.ts' would match 'app/[id].ts', then
88
- on Windows powershell or cmd.exe, 'glob app/*.ts' will
89
- expand to 'app/[id].ts', as expected. However, in posix
90
- shells such as bash or zsh, the shell will first expand
91
- 'app/*.ts' to a list of filenames. Then glob will look
92
- for a file matching 'app/[id].ts' (ie, 'app/i.ts' or
93
- 'app/d.ts'), which is unexpected.
94
-
95
- Setting '--all' prevents this behavior, causing glob
96
- to treat ALL patterns as glob expressions to be expanded,
97
- even if they are an exact match to a file on disk.
98
-
99
- When setting this option, be sure to enquote arguments
100
- so that the shell will not expand them prior to passing
101
- them to the glob command process.
102
- `,
103
- },
104
- absolute: {
105
- short: 'a',
106
- description: 'Expand to absolute paths',
107
- },
108
- 'dot-relative': {
109
- short: 'd',
110
- description: `Prepend './' on relative matches`,
111
- },
112
- mark: {
113
- short: 'm',
114
- description: `Append a / on any directories matched`,
115
- },
116
- posix: {
117
- short: 'x',
118
- description: `Always resolve to posix style paths, using '/' as the
119
- directory separator, even on Windows. Drive letter
120
- absolute matches on Windows will be expanded to their
121
- full resolved UNC paths, eg instead of 'C:\\foo\\bar',
122
- it will expand to '//?/C:/foo/bar'.
123
- `,
124
- },
125
- follow: {
126
- short: 'f',
127
- description: `Follow symlinked directories when expanding '**'`,
128
- },
129
- realpath: {
130
- short: 'R',
131
- description: `Call 'fs.realpath' on all of the results. In the case
132
- of an entry that cannot be resolved, the entry is
133
- omitted. This incurs a slight performance penalty, of
134
- course, because of the added system calls.`,
135
- },
136
- stat: {
137
- short: 's',
138
- description: `Call 'fs.lstat' on all entries, whether required or not
139
- to determine if it's a valid match.`,
140
- },
141
- 'match-base': {
142
- short: 'b',
143
- description: `Perform a basename-only match if the pattern does not
144
- contain any slash characters. That is, '*.js' would be
145
- treated as equivalent to '**/*.js', matching js files
146
- in all directories.
147
- `,
148
- },
149
- dot: {
150
- description: `Allow patterns to match files/directories that start
151
- with '.', even if the pattern does not start with '.'
152
- `,
153
- },
154
- nobrace: {
155
- description: 'Do not expand {...} patterns',
156
- },
157
- nocase: {
158
- description: `Perform a case-insensitive match. This defaults to
159
- 'true' on macOS and Windows platforms, and false on
160
- all others.
161
-
162
- Note: 'nocase' should only be explicitly set when it is
163
- known that the filesystem's case sensitivity differs
164
- from the platform default. If set 'true' on
165
- case-insensitive file systems, then the walk may return
166
- more or less results than expected.
167
- `,
168
- },
169
- nodir: {
170
- description: `Do not match directories, only files.
171
-
172
- Note: to *only* match directories, append a '/' at the
173
- end of the pattern.
174
- `,
175
- },
176
- noext: {
177
- description: `Do not expand extglob patterns, such as '+(a|b)'`,
178
- },
179
- noglobstar: {
180
- description: `Do not expand '**' against multiple path portions.
181
- Ie, treat it as a normal '*' instead.`,
182
- },
183
- 'windows-path-no-escape': {
184
- description: `Use '\\' as a path separator *only*, and *never* as an
185
- escape character. If set, all '\\' characters are
186
- replaced with '/' in the pattern.`,
187
- },
188
- })
189
- .num({
190
- 'max-depth': {
191
- short: 'D',
192
- description: `Maximum depth to traverse from the current
193
- working directory`,
194
- },
195
- })
196
- .opt({
197
- cwd: {
198
- short: 'C',
199
- description: 'Current working directory to execute/match in',
200
- default: process.cwd(),
201
- },
202
- root: {
203
- short: 'r',
204
- description: `A string path resolved against the 'cwd', which is
205
- used as the starting point for absolute patterns that
206
- start with '/' (but not drive letters or UNC paths
207
- on Windows).
208
-
209
- Note that this *doesn't* necessarily limit the walk to
210
- the 'root' directory, and doesn't affect the cwd
211
- starting point for non-absolute patterns. A pattern
212
- containing '..' will still be able to traverse out of
213
- the root directory, if it is not an actual root directory
214
- on the filesystem, and any non-absolute patterns will
215
- still be matched in the 'cwd'.
216
-
217
- To start absolute and non-absolute patterns in the same
218
- path, you can use '--root=' to set it to the empty
219
- string. However, be aware that on Windows systems, a
220
- pattern like 'x:/*' or '//host/share/*' will *always*
221
- start in the 'x:/' or '//host/share/' directory,
222
- regardless of the --root setting.
223
- `,
224
- },
225
- platform: {
226
- description: `Defaults to the value of 'process.platform' if
227
- available, or 'linux' if not. Setting --platform=win32
228
- on non-Windows systems may cause strange behavior!`,
229
- validOptions: [
230
- 'aix',
231
- 'android',
232
- 'darwin',
233
- 'freebsd',
234
- 'haiku',
235
- 'linux',
236
- 'openbsd',
237
- 'sunos',
238
- 'win32',
239
- 'cygwin',
240
- 'netbsd',
241
- ],
242
- },
243
- })
244
- .optList({
245
- ignore: {
246
- short: 'i',
247
- description: `Glob patterns to ignore`,
248
- },
249
- })
250
- .flag({
251
- debug: {
252
- short: 'v',
253
- description: `Output a huge amount of noisy debug information about
254
- patterns as they are parsed and used to match files.`,
255
- },
256
- version: {
257
- short: 'V',
258
- description: `Output the version (${version})`,
259
- },
260
- help: {
261
- short: 'h',
262
- description: 'Show this usage information',
263
- },
264
- });
265
- try {
266
- const { positionals, values } = j.parse();
267
- const { cmd, shell, all, default: def, version: showVersion, help, absolute, cwd, dot, 'dot-relative': dotRelative, follow, ignore, 'match-base': matchBase, 'max-depth': maxDepth, mark, nobrace, nocase, nodir, noext, noglobstar, platform, realpath, root, stat, debug, posix, 'cmd-arg': cmdArg, } = values;
268
- if (showVersion) {
269
- console.log(version);
270
- process.exit(0);
271
- }
272
- if (help) {
273
- console.log(j.usage());
274
- process.exit(0);
275
- }
276
- //const { shell, help } = values
277
- if (positionals.length === 0 && !def)
278
- throw 'No patterns provided';
279
- if (positionals.length === 0 && def)
280
- positionals.push(def);
281
- const patterns = all ? positionals : positionals.filter(p => !existsSync(p));
282
- const matches = all ? [] : positionals.filter(p => existsSync(p)).map(p => join(p));
283
- const stream = globStream(patterns, {
284
- absolute,
285
- cwd,
286
- dot,
287
- dotRelative,
288
- follow,
289
- ignore,
290
- mark,
291
- matchBase,
292
- maxDepth,
293
- nobrace,
294
- nocase,
295
- nodir,
296
- noext,
297
- noglobstar,
298
- platform: platform,
299
- realpath,
300
- root,
301
- stat,
302
- debug,
303
- posix,
304
- });
305
- if (!cmd) {
306
- matches.forEach(m => console.log(m));
307
- stream.on('data', f => console.log(f));
308
- }
309
- else {
310
- cmdArg.push(...matches);
311
- stream.on('data', f => cmdArg.push(f));
312
- // Attempt to support commands that contain spaces and otherwise require
313
- // shell interpretation, but do NOT shell-interpret the arguments, to avoid
314
- // injections via filenames. This affordance can only be done on known Unix
315
- // shells, unfortunately.
316
- //
317
- // 'bash', ['-c', cmd + ' "$@"', 'bash', ...matches]
318
- // 'zsh', ['-c', cmd + ' "$@"', 'zsh', ...matches]
319
- // 'fish', ['-c', cmd + ' "$argv"', ...matches]
320
- const { SHELL = 'unknown' } = process.env;
321
- const shellBase = basename(SHELL);
322
- const knownShells = ['sh', 'ksh', 'zsh', 'bash', 'fish'];
323
- if ((shell || /[ "']/.test(cmd)) &&
324
- knownShells.includes(shellBase)) {
325
- const cmdWithArgs = `${cmd} "\$${shellBase === 'fish' ? 'argv' : '@'}"`;
326
- if (shellBase !== 'fish') {
327
- cmdArg.unshift(SHELL);
328
- }
329
- cmdArg.unshift('-c', cmdWithArgs);
330
- stream.on('end', () => foregroundChild(SHELL, cmdArg));
331
- }
332
- else {
333
- if (shell) {
334
- process.emitWarning('The --shell option is unsafe, and will be removed. To pass ' +
335
- 'positional arguments to the subprocess, use -g/--cmd-arg instead.', 'DeprecationWarning', 'GLOB_SHELL');
336
- }
337
- stream.on('end', () => foregroundChild(cmd, cmdArg, { shell }));
338
- }
339
- }
340
- }
341
- catch (e) {
342
- console.error(j.usage());
343
- console.error(e instanceof Error ? e.message : String(e));
344
- process.exit(1);
345
- }
346
- //# sourceMappingURL=bin.mjs.map
@@ -1,11 +0,0 @@
1
- # Please see the documentation for all configuration options:
2
- # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3
-
4
- version: 2
5
- updates:
6
- - package-ecosystem: "npm"
7
- directory: "/"
8
- schedule:
9
- interval: "daily"
10
- allow:
11
- - dependency-type: production
@@ -1,47 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <HTMLCodeStyleSettings>
4
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
5
- <option name="HTML_ENFORCE_QUOTES" value="true" />
6
- </HTMLCodeStyleSettings>
7
- <JSCodeStyleSettings version="0">
8
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
9
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
10
- <option name="FORCE_QUOTE_STYlE" value="true" />
11
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
12
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
13
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
14
- </JSCodeStyleSettings>
15
- <TypeScriptCodeStyleSettings version="0">
16
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
17
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
18
- <option name="FORCE_QUOTE_STYlE" value="true" />
19
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
20
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
21
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
22
- </TypeScriptCodeStyleSettings>
23
- <VueCodeStyleSettings>
24
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
25
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
26
- </VueCodeStyleSettings>
27
- <codeStyleSettings language="HTML">
28
- <option name="SOFT_MARGINS" value="100" />
29
- <indentOptions>
30
- <option name="CONTINUATION_INDENT_SIZE" value="4" />
31
- </indentOptions>
32
- </codeStyleSettings>
33
- <codeStyleSettings language="JavaScript">
34
- <option name="SOFT_MARGINS" value="100" />
35
- </codeStyleSettings>
36
- <codeStyleSettings language="TypeScript">
37
- <option name="SOFT_MARGINS" value="100" />
38
- </codeStyleSettings>
39
- <codeStyleSettings language="Vue">
40
- <option name="SOFT_MARGINS" value="100" />
41
- <indentOptions>
42
- <option name="INDENT_SIZE" value="4" />
43
- <option name="TAB_SIZE" value="4" />
44
- </indentOptions>
45
- </codeStyleSettings>
46
- </code_scheme>
47
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/iconv-lite.iml" filepath="$PROJECT_DIR$/.idea/iconv-lite.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,57 +0,0 @@
1
- var fs = require('fs')
2
- var core
3
- if (process.platform === 'win32' || global.TESTING_WINDOWS) {
4
- core = require('./windows.js')
5
- } else {
6
- core = require('./mode.js')
7
- }
8
-
9
- module.exports = isexe
10
- isexe.sync = sync
11
-
12
- function isexe (path, options, cb) {
13
- if (typeof options === 'function') {
14
- cb = options
15
- options = {}
16
- }
17
-
18
- if (!cb) {
19
- if (typeof Promise !== 'function') {
20
- throw new TypeError('callback not provided')
21
- }
22
-
23
- return new Promise(function (resolve, reject) {
24
- isexe(path, options || {}, function (er, is) {
25
- if (er) {
26
- reject(er)
27
- } else {
28
- resolve(is)
29
- }
30
- })
31
- })
32
- }
33
-
34
- core(path, options || {}, function (er, is) {
35
- // ignore EACCES because that just means we aren't allowed to run it
36
- if (er) {
37
- if (er.code === 'EACCES' || options && options.ignoreErrors) {
38
- er = null
39
- is = false
40
- }
41
- }
42
- cb(er, is)
43
- })
44
- }
45
-
46
- function sync (path, options) {
47
- // my kingdom for a filtered catch
48
- try {
49
- return core.sync(path, options || {})
50
- } catch (er) {
51
- if (options && options.ignoreErrors || er.code === 'EACCES') {
52
- return false
53
- } else {
54
- throw er
55
- }
56
- }
57
- }