@dotpi/tools 2.9.2 → 2.9.5

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 (110) hide show
  1. package/dotpi_root/bin/dotpi_prepare_system +8 -0
  2. package/dotpi_root/dist/@dotpi/avahi-monitor-module/package.json +1 -1
  3. package/dotpi_root/dist/@dotpi/javascript/package.json +1 -1
  4. package/dotpi_root/dist/@dotpi/module/package.json +2 -2
  5. package/dotpi_root/dist/@dotpi/module-module/package.json +3 -3
  6. package/package.json +5 -5
  7. package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/index.d.ts +0 -279
  8. package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/index.js +0 -292
  9. package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/license +0 -9
  10. package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/package.json +0 -49
  11. package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/readme.md +0 -337
  12. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/LICENSE +0 -201
  13. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/README.md +0 -180
  14. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/core.js +0 -273
  15. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/main.d.ts +0 -206
  16. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/main.js +0 -70
  17. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/realtime.js +0 -16
  18. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/signals.js +0 -34
  19. package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/package.json +0 -64
  20. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/index.d.ts +0 -35
  21. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/index.js +0 -8
  22. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/license +0 -9
  23. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/package.json +0 -41
  24. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/readme.md +0 -58
  25. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/index.d.ts +0 -12
  26. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/index.js +0 -21
  27. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/license +0 -9
  28. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/package.json +0 -47
  29. package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/readme.md +0 -35
  30. package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/index.d.ts +0 -90
  31. package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/index.js +0 -55
  32. package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/license +0 -9
  33. package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/package.json +0 -52
  34. package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/readme.md +0 -104
  35. package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/index.d.ts +0 -31
  36. package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/index.js +0 -12
  37. package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/license +0 -9
  38. package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/package.json +0 -41
  39. package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/readme.md +0 -57
  40. package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/index.d.ts +0 -18
  41. package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/index.js +0 -26
  42. package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/license +0 -9
  43. package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/package.json +0 -49
  44. package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/readme.md +0 -34
  45. package/dotpi_root/dist/@dotpi/module/node_modules/figures/index.d.ts +0 -279
  46. package/dotpi_root/dist/@dotpi/module/node_modules/figures/index.js +0 -292
  47. package/dotpi_root/dist/@dotpi/module/node_modules/figures/license +0 -9
  48. package/dotpi_root/dist/@dotpi/module/node_modules/figures/package.json +0 -49
  49. package/dotpi_root/dist/@dotpi/module/node_modules/figures/readme.md +0 -337
  50. package/dotpi_root/dist/@dotpi/module/node_modules/globby/ignore.js +0 -109
  51. package/dotpi_root/dist/@dotpi/module/node_modules/globby/index.d.ts +0 -207
  52. package/dotpi_root/dist/@dotpi/module/node_modules/globby/index.js +0 -264
  53. package/dotpi_root/dist/@dotpi/module/node_modules/globby/license +0 -9
  54. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/index.d.ts +0 -44
  55. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +0 -223
  56. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/license +0 -9
  57. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/package.json +0 -49
  58. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/readme.md +0 -53
  59. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/default.js +0 -14
  60. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/index.d.ts +0 -29
  61. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/license +0 -9
  62. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/node.js +0 -7
  63. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/package.json +0 -49
  64. package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/readme.md +0 -25
  65. package/dotpi_root/dist/@dotpi/module/node_modules/globby/package.json +0 -94
  66. package/dotpi_root/dist/@dotpi/module/node_modules/globby/readme.md +0 -177
  67. package/dotpi_root/dist/@dotpi/module/node_modules/globby/utilities.js +0 -1
  68. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/LICENSE +0 -201
  69. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/README.md +0 -180
  70. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/core.js +0 -273
  71. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/main.d.ts +0 -206
  72. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/main.js +0 -70
  73. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/realtime.js +0 -16
  74. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/signals.js +0 -34
  75. package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/package.json +0 -64
  76. package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/index.d.ts +0 -35
  77. package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/index.js +0 -8
  78. package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/license +0 -9
  79. package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/package.json +0 -41
  80. package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/readme.md +0 -58
  81. package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/index.d.ts +0 -12
  82. package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/index.js +0 -21
  83. package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/license +0 -9
  84. package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/package.json +0 -47
  85. package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/readme.md +0 -35
  86. package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/index.d.ts +0 -90
  87. package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/index.js +0 -55
  88. package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/license +0 -9
  89. package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/package.json +0 -52
  90. package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/readme.md +0 -104
  91. package/dotpi_root/dist/@dotpi/module/node_modules/path-key/index.d.ts +0 -31
  92. package/dotpi_root/dist/@dotpi/module/node_modules/path-key/index.js +0 -12
  93. package/dotpi_root/dist/@dotpi/module/node_modules/path-key/license +0 -9
  94. package/dotpi_root/dist/@dotpi/module/node_modules/path-key/package.json +0 -41
  95. package/dotpi_root/dist/@dotpi/module/node_modules/path-key/readme.md +0 -57
  96. package/dotpi_root/dist/@dotpi/module/node_modules/path-type/index.d.ts +0 -51
  97. package/dotpi_root/dist/@dotpi/module/node_modules/path-type/index.js +0 -41
  98. package/dotpi_root/dist/@dotpi/module/node_modules/path-type/license +0 -9
  99. package/dotpi_root/dist/@dotpi/module/node_modules/path-type/package.json +0 -47
  100. package/dotpi_root/dist/@dotpi/module/node_modules/path-type/readme.md +0 -74
  101. package/dotpi_root/dist/@dotpi/module/node_modules/slash/index.d.ts +0 -23
  102. package/dotpi_root/dist/@dotpi/module/node_modules/slash/index.js +0 -9
  103. package/dotpi_root/dist/@dotpi/module/node_modules/slash/license +0 -9
  104. package/dotpi_root/dist/@dotpi/module/node_modules/slash/package.json +0 -39
  105. package/dotpi_root/dist/@dotpi/module/node_modules/slash/readme.md +0 -36
  106. package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/index.d.ts +0 -18
  107. package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/index.js +0 -26
  108. package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/license +0 -9
  109. package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/package.json +0 -49
  110. package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/readme.md +0 -34
@@ -1,70 +0,0 @@
1
- import{constants}from"node:os";
2
-
3
- import{SIGRTMAX}from"./realtime.js";
4
- import{getSignals}from"./signals.js";
5
-
6
-
7
-
8
- const getSignalsByName=()=>{
9
- const signals=getSignals();
10
- return Object.fromEntries(signals.map(getSignalByName))
11
- };
12
-
13
- const getSignalByName=({
14
- name,
15
- number,
16
- description,
17
- supported,
18
- action,
19
- forced,
20
- standard
21
- })=>[name,{name,number,description,supported,action,forced,standard}];
22
-
23
- export const signalsByName=getSignalsByName();
24
-
25
-
26
-
27
-
28
- const getSignalsByNumber=()=>{
29
- const signals=getSignals();
30
- const length=SIGRTMAX+1;
31
- const signalsA=Array.from({length},(value,number)=>
32
- getSignalByNumber(number,signals)
33
- );
34
- return Object.assign({},...signalsA)
35
- };
36
-
37
- const getSignalByNumber=(number,signals)=>{
38
- const signal=findSignalByNumber(number,signals);
39
-
40
- if(signal===undefined){
41
- return{}
42
- }
43
-
44
- const{name,description,supported,action,forced,standard}=signal;
45
- return{
46
- [number]:{
47
- name,
48
- number,
49
- description,
50
- supported,
51
- action,
52
- forced,
53
- standard
54
- }
55
- }
56
- };
57
-
58
-
59
-
60
- const findSignalByNumber=(number,signals)=>{
61
- const signal=signals.find(({name})=>constants.signals[name]===number);
62
-
63
- if(signal!==undefined){
64
- return signal
65
- }
66
-
67
- return signals.find((signalA)=>signalA.number===number)
68
- };
69
-
70
- export const signalsByNumber=getSignalsByNumber();
@@ -1,16 +0,0 @@
1
-
2
- export const getRealtimeSignals=()=>{
3
- const length=SIGRTMAX-SIGRTMIN+1;
4
- return Array.from({length},getRealtimeSignal)
5
- };
6
-
7
- const getRealtimeSignal=(value,index)=>({
8
- name:`SIGRT${index+1}`,
9
- number:SIGRTMIN+index,
10
- action:"terminate",
11
- description:"Application-specific signal (realtime)",
12
- standard:"posix"
13
- });
14
-
15
- const SIGRTMIN=34;
16
- export const SIGRTMAX=64;
@@ -1,34 +0,0 @@
1
- import{constants}from"node:os";
2
-
3
- import{SIGNALS}from"./core.js";
4
- import{getRealtimeSignals}from"./realtime.js";
5
-
6
-
7
-
8
- export const getSignals=()=>{
9
- const realtimeSignals=getRealtimeSignals();
10
- const signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);
11
- return signals
12
- };
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
- const normalizeSignal=({
21
- name,
22
- number:defaultNumber,
23
- description,
24
- action,
25
- forced=false,
26
- standard
27
- })=>{
28
- const{
29
- signals:{[name]:constantSignal}
30
- }=constants;
31
- const supported=constantSignal!==undefined;
32
- const number=supported?constantSignal:defaultNumber;
33
- return{name,number,description,supported,action,forced,standard}
34
- };
@@ -1,64 +0,0 @@
1
- {
2
- "name": "human-signals",
3
- "version": "8.0.0",
4
- "type": "module",
5
- "exports": {
6
- "types": "./build/src/main.d.ts",
7
- "default": "./build/src/main.js"
8
- },
9
- "main": "./build/src/main.js",
10
- "types": "./build/src/main.d.ts",
11
- "files": [
12
- "build/src/**/*.{js,json,d.ts}",
13
- "!build/src/**/*.test.js",
14
- "!build/src/{helpers,fixtures}"
15
- ],
16
- "sideEffects": false,
17
- "scripts": {
18
- "test": "gulp test"
19
- },
20
- "description": "Human-friendly process signals",
21
- "keywords": [
22
- "signal",
23
- "signals",
24
- "handlers",
25
- "error-handling",
26
- "interrupts",
27
- "sigterm",
28
- "sigint",
29
- "irq",
30
- "process",
31
- "exit",
32
- "exit-code",
33
- "status",
34
- "operating-system",
35
- "es6",
36
- "javascript",
37
- "typescript",
38
- "linux",
39
- "macos",
40
- "windows",
41
- "nodejs"
42
- ],
43
- "license": "Apache-2.0",
44
- "homepage": "https://www.github.com/ehmicky/human-signals",
45
- "repository": {
46
- "type": "git",
47
- "url": "git+https://github.com/ehmicky/human-signals.git"
48
- },
49
- "bugs": {
50
- "url": "https://github.com/ehmicky/human-signals/issues"
51
- },
52
- "author": "ehmicky <ehmicky@gmail.com> (https://github.com/ehmicky)",
53
- "directories": {
54
- "lib": "src"
55
- },
56
- "devDependencies": {
57
- "@ehmicky/dev-tasks": "^3.0.5",
58
- "ajv": "^8.17.1",
59
- "test-each": "^7.0.0"
60
- },
61
- "engines": {
62
- "node": ">=18.18.0"
63
- }
64
- }
@@ -1,35 +0,0 @@
1
- /**
2
- Check if a value is a plain object.
3
-
4
- An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
5
-
6
- @example
7
- ```
8
- import isPlainObject from 'is-plain-obj';
9
- import {runInNewContext} from 'node:vm';
10
-
11
- isPlainObject({foo: 'bar'});
12
- //=> true
13
-
14
- isPlainObject(new Object());
15
- //=> true
16
-
17
- isPlainObject(Object.create(null));
18
- //=> true
19
-
20
- // This works across realms
21
- isPlainObject(runInNewContext('({})'));
22
- //=> true
23
-
24
- isPlainObject([1, 2, 3]);
25
- //=> false
26
-
27
- class Unicorn {}
28
- isPlainObject(new Unicorn());
29
- //=> false
30
-
31
- isPlainObject(Math);
32
- //=> false
33
- ```
34
- */
35
- export default function isPlainObject<Value>(value: unknown): value is Record<PropertyKey, Value>;
@@ -1,8 +0,0 @@
1
- export default function isPlainObject(value) {
2
- if (typeof value !== 'object' || value === null) {
3
- return false;
4
- }
5
-
6
- const prototype = Object.getPrototypeOf(value);
7
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
8
- }
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,41 +0,0 @@
1
- {
2
- "name": "is-plain-obj",
3
- "version": "4.1.0",
4
- "description": "Check if a value is a plain object",
5
- "license": "MIT",
6
- "repository": "sindresorhus/is-plain-obj",
7
- "funding": "https://github.com/sponsors/sindresorhus",
8
- "author": {
9
- "name": "Sindre Sorhus",
10
- "email": "sindresorhus@gmail.com",
11
- "url": "https://sindresorhus.com"
12
- },
13
- "type": "module",
14
- "exports": "./index.js",
15
- "engines": {
16
- "node": ">=12"
17
- },
18
- "scripts": {
19
- "test": "xo && ava && tsd"
20
- },
21
- "files": [
22
- "index.js",
23
- "index.d.ts"
24
- ],
25
- "keywords": [
26
- "object",
27
- "is",
28
- "check",
29
- "test",
30
- "type",
31
- "plain",
32
- "vanilla",
33
- "pure",
34
- "simple"
35
- ],
36
- "devDependencies": {
37
- "ava": "^3.15.0",
38
- "tsd": "^0.14.0",
39
- "xo": "^0.38.2"
40
- }
41
- }
@@ -1,58 +0,0 @@
1
- # is-plain-obj
2
-
3
- > Check if a value is a plain object
4
-
5
- An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`.
6
-
7
- ## Install
8
-
9
- ```
10
- $ npm install is-plain-obj
11
- ```
12
-
13
- ## Usage
14
-
15
- ```js
16
- import isPlainObject from 'is-plain-obj';
17
- import {runInNewContext} from 'node:vm';
18
-
19
- isPlainObject({foo: 'bar'});
20
- //=> true
21
-
22
- isPlainObject(new Object());
23
- //=> true
24
-
25
- isPlainObject(Object.create(null));
26
- //=> true
27
-
28
- // This works across realms
29
- isPlainObject(runInNewContext('({})'));
30
- //=> true
31
-
32
- isPlainObject([1, 2, 3]);
33
- //=> false
34
-
35
- class Unicorn {}
36
- isPlainObject(new Unicorn());
37
- //=> false
38
-
39
- isPlainObject(Math);
40
- //=> false
41
- ```
42
-
43
- ## Related
44
-
45
- - [is-obj](https://github.com/sindresorhus/is-obj) - Check if a value is an object
46
- - [is](https://github.com/sindresorhus/is) - Type check values
47
-
48
- ---
49
-
50
- <div align="center">
51
- <b>
52
- <a href="https://tidelift.com/subscription/pkg/npm-is-plain-obj?utm_source=npm-is-plain-obj&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
53
- </b>
54
- <br>
55
- <sub>
56
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
57
- </sub>
58
- </div>
@@ -1,12 +0,0 @@
1
- /**
2
- Detect whether the terminal supports Unicode.
3
-
4
- @example
5
- ```
6
- import isUnicodeSupported from 'is-unicode-supported';
7
-
8
- isUnicodeSupported();
9
- //=> true
10
- ```
11
- */
12
- export default function isUnicodeSupported(): boolean;
@@ -1,21 +0,0 @@
1
- import process from 'node:process';
2
-
3
- export default function isUnicodeSupported() {
4
- const {env} = process;
5
- const {TERM, TERM_PROGRAM} = env;
6
-
7
- if (process.platform !== 'win32') {
8
- return TERM !== 'linux'; // Linux console (kernel)
9
- }
10
-
11
- return Boolean(env.WT_SESSION) // Windows Terminal
12
- || Boolean(env.TERMINUS_SUBLIME) // Terminus (<0.2.27)
13
- || env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
14
- || TERM_PROGRAM === 'Terminus-Sublime'
15
- || TERM_PROGRAM === 'vscode'
16
- || TERM === 'xterm-256color'
17
- || TERM === 'alacritty'
18
- || TERM === 'rxvt-unicode'
19
- || TERM === 'rxvt-unicode-256color'
20
- || env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
21
- }
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,47 +0,0 @@
1
- {
2
- "name": "is-unicode-supported",
3
- "version": "2.1.0",
4
- "description": "Detect whether the terminal supports Unicode",
5
- "license": "MIT",
6
- "repository": "sindresorhus/is-unicode-supported",
7
- "funding": "https://github.com/sponsors/sindresorhus",
8
- "author": {
9
- "name": "Sindre Sorhus",
10
- "email": "sindresorhus@gmail.com",
11
- "url": "https://sindresorhus.com"
12
- },
13
- "type": "module",
14
- "exports": {
15
- "types": "./index.d.ts",
16
- "default": "./index.js"
17
- },
18
- "sideEffects": false,
19
- "engines": {
20
- "node": ">=18"
21
- },
22
- "scripts": {
23
- "test": "xo && ava && tsd"
24
- },
25
- "files": [
26
- "index.js",
27
- "index.d.ts"
28
- ],
29
- "keywords": [
30
- "terminal",
31
- "unicode",
32
- "detect",
33
- "utf8",
34
- "console",
35
- "shell",
36
- "support",
37
- "supports",
38
- "supported",
39
- "check",
40
- "detection"
41
- ],
42
- "devDependencies": {
43
- "ava": "^6.1.3",
44
- "tsd": "^0.31.2",
45
- "xo": "^0.59.3"
46
- }
47
- }
@@ -1,35 +0,0 @@
1
- # is-unicode-supported
2
-
3
- > Detect whether the terminal supports Unicode
4
-
5
- This can be useful to decide whether to use Unicode characters or fallback ASCII characters in command-line output.
6
-
7
- Note that the check is quite naive. It just assumes all non-Windows terminals support Unicode and hard-codes which Windows terminals that do support Unicode. However, I have been using this logic in some popular packages for years without problems.
8
-
9
- ## Install
10
-
11
- ```sh
12
- npm install is-unicode-supported
13
- ```
14
-
15
- ## Usage
16
-
17
- ```js
18
- import isUnicodeSupported from 'is-unicode-supported';
19
-
20
- isUnicodeSupported();
21
- //=> true
22
- ```
23
-
24
- ## API
25
-
26
- ### isUnicodeSupported()
27
-
28
- Returns a `boolean` for whether the terminal supports Unicode.
29
-
30
- ## Related
31
-
32
- - [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive
33
- - [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
34
- - [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows fallbacks
35
- - [log-symbols](https://github.com/sindresorhus/log-symbols) - Colored symbols for various log levels
@@ -1,90 +0,0 @@
1
- type CommonOptions = {
2
- /**
3
- Working directory.
4
-
5
- @default process.cwd()
6
- */
7
- readonly cwd?: string | URL;
8
-
9
- /**
10
- The path to the current Node.js executable.
11
-
12
- This can be either an absolute path or a path relative to the `cwd` option.
13
-
14
- @default [process.execPath](https://nodejs.org/api/process.html#processexecpath)
15
- */
16
- readonly execPath?: string | URL;
17
-
18
- /**
19
- Whether to push the current Node.js executable's directory (`execPath` option) to the front of PATH.
20
-
21
- @default true
22
- */
23
- readonly addExecPath?: boolean;
24
-
25
- /**
26
- Whether to push the locally installed binaries' directory to the front of PATH.
27
-
28
- @default true
29
- */
30
- readonly preferLocal?: boolean;
31
- };
32
-
33
- export type RunPathOptions = CommonOptions & {
34
- /**
35
- PATH to be appended.
36
-
37
- Set it to an empty string to exclude the default PATH.
38
-
39
- @default [`PATH`](https://github.com/sindresorhus/path-key)
40
- */
41
- readonly path?: string;
42
- };
43
-
44
- export type ProcessEnv = Record<string, string | undefined>;
45
-
46
- export type EnvOptions = CommonOptions & {
47
- /**
48
- Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options.
49
-
50
- @default [process.env](https://nodejs.org/api/process.html#processenv)
51
- */
52
- readonly env?: ProcessEnv;
53
- };
54
-
55
- /**
56
- Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries.
57
-
58
- @returns The augmented path string.
59
-
60
- @example
61
- ```
62
- import childProcess from 'node:child_process';
63
- import {npmRunPath} from 'npm-run-path';
64
-
65
- console.log(process.env.PATH);
66
- //=> '/usr/local/bin'
67
-
68
- console.log(npmRunPath());
69
- //=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin'
70
- ```
71
- */
72
- export function npmRunPath(options?: RunPathOptions): string;
73
-
74
- /**
75
- Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries.
76
-
77
- @returns The augmented [`process.env`](https://nodejs.org/api/process.html#process_process_env) object.
78
-
79
- @example
80
- ```
81
- import childProcess from 'node:child_process';
82
- import {npmRunPathEnv} from 'npm-run-path';
83
-
84
- // `foo` is a locally installed binary
85
- childProcess.execFileSync('foo', {
86
- env: npmRunPathEnv()
87
- });
88
- ```
89
- */
90
- export function npmRunPathEnv(options?: EnvOptions): ProcessEnv;
@@ -1,55 +0,0 @@
1
- import process from 'node:process';
2
- import path from 'node:path';
3
- import pathKey from 'path-key';
4
- import {toPath, traversePathUp} from 'unicorn-magic';
5
-
6
- export const npmRunPath = ({
7
- cwd = process.cwd(),
8
- path: pathOption = process.env[pathKey()],
9
- preferLocal = true,
10
- execPath = process.execPath,
11
- addExecPath = true,
12
- } = {}) => {
13
- const cwdPath = path.resolve(toPath(cwd));
14
- const result = [];
15
- const pathParts = pathOption.split(path.delimiter);
16
-
17
- if (preferLocal) {
18
- applyPreferLocal(result, pathParts, cwdPath);
19
- }
20
-
21
- if (addExecPath) {
22
- applyExecPath(result, pathParts, execPath, cwdPath);
23
- }
24
-
25
- return pathOption === '' || pathOption === path.delimiter
26
- ? `${result.join(path.delimiter)}${pathOption}`
27
- : [...result, pathOption].join(path.delimiter);
28
- };
29
-
30
- const applyPreferLocal = (result, pathParts, cwdPath) => {
31
- for (const directory of traversePathUp(cwdPath)) {
32
- const pathPart = path.join(directory, 'node_modules/.bin');
33
- if (!pathParts.includes(pathPart)) {
34
- result.push(pathPart);
35
- }
36
- }
37
- };
38
-
39
- // Ensure the running `node` binary is used
40
- const applyExecPath = (result, pathParts, execPath, cwdPath) => {
41
- const pathPart = path.resolve(cwdPath, toPath(execPath), '..');
42
- if (!pathParts.includes(pathPart)) {
43
- result.push(pathPart);
44
- }
45
- };
46
-
47
- export const npmRunPathEnv = ({env = process.env, ...options} = {}) => {
48
- env = {...env};
49
-
50
- const pathName = pathKey({env});
51
- options.path = env[pathName];
52
- env[pathName] = npmRunPath(options);
53
-
54
- return env;
55
- };
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,52 +0,0 @@
1
- {
2
- "name": "npm-run-path",
3
- "version": "6.0.0",
4
- "description": "Get your PATH prepended with locally installed binaries",
5
- "license": "MIT",
6
- "repository": "sindresorhus/npm-run-path",
7
- "funding": "https://github.com/sponsors/sindresorhus",
8
- "author": {
9
- "name": "Sindre Sorhus",
10
- "email": "sindresorhus@gmail.com",
11
- "url": "https://sindresorhus.com"
12
- },
13
- "type": "module",
14
- "exports": {
15
- "types": "./index.d.ts",
16
- "default": "./index.js"
17
- },
18
- "sideEffects": false,
19
- "engines": {
20
- "node": ">=18"
21
- },
22
- "scripts": {
23
- "test": "xo && ava && tsd"
24
- },
25
- "files": [
26
- "index.js",
27
- "index.d.ts"
28
- ],
29
- "keywords": [
30
- "npm",
31
- "run",
32
- "path",
33
- "package",
34
- "bin",
35
- "binary",
36
- "binaries",
37
- "script",
38
- "cli",
39
- "command-line",
40
- "execute",
41
- "executable"
42
- ],
43
- "dependencies": {
44
- "path-key": "^4.0.0",
45
- "unicorn-magic": "^0.3.0"
46
- },
47
- "devDependencies": {
48
- "ava": "^6.1.3",
49
- "tsd": "^0.31.1",
50
- "xo": "^0.59.3"
51
- }
52
- }