@dotpi/tools 2.9.0 → 2.9.4
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/dotpi-tools.js +14 -4
- package/dotpi_root/dist/@dotpi/avahi-monitor-module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/avahi-monitor-module/package.json +3 -2
- package/dotpi_root/dist/@dotpi/javascript/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/javascript/package.json +3 -2
- package/dotpi_root/dist/@dotpi/module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module/package.json +4 -3
- package/dotpi_root/dist/@dotpi/module-module/LICENSE +28 -0
- package/dotpi_root/dist/@dotpi/module-module/package.json +5 -4
- package/package.json +6 -5
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/index.d.ts +0 -279
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/index.js +0 -292
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/package.json +0 -49
- package/dotpi_root/dist/@dotpi/javascript/node_modules/figures/readme.md +0 -337
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/LICENSE +0 -201
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/README.md +0 -180
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/core.js +0 -273
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/main.d.ts +0 -206
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/main.js +0 -70
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/realtime.js +0 -16
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/build/src/signals.js +0 -34
- package/dotpi_root/dist/@dotpi/javascript/node_modules/human-signals/package.json +0 -64
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/index.d.ts +0 -35
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/index.js +0 -8
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/package.json +0 -41
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-plain-obj/readme.md +0 -58
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/index.d.ts +0 -12
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/index.js +0 -21
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/package.json +0 -47
- package/dotpi_root/dist/@dotpi/javascript/node_modules/is-unicode-supported/readme.md +0 -35
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/index.d.ts +0 -90
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/index.js +0 -55
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/package.json +0 -52
- package/dotpi_root/dist/@dotpi/javascript/node_modules/npm-run-path/readme.md +0 -104
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/index.d.ts +0 -31
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/index.js +0 -12
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/package.json +0 -41
- package/dotpi_root/dist/@dotpi/javascript/node_modules/path-key/readme.md +0 -57
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/index.d.ts +0 -18
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/index.js +0 -26
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/license +0 -9
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/package.json +0 -49
- package/dotpi_root/dist/@dotpi/javascript/node_modules/strip-final-newline/readme.md +0 -34
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/index.d.ts +0 -279
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/index.js +0 -292
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/figures/readme.md +0 -337
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/ignore.js +0 -109
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/index.d.ts +0 -207
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/index.js +0 -264
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/index.d.ts +0 -44
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +0 -223
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/@sindresorhus/merge-streams/readme.md +0 -53
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/default.js +0 -14
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/index.d.ts +0 -29
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/node.js +0 -7
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/node_modules/unicorn-magic/readme.md +0 -25
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/package.json +0 -94
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/readme.md +0 -177
- package/dotpi_root/dist/@dotpi/module/node_modules/globby/utilities.js +0 -1
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/LICENSE +0 -201
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/README.md +0 -180
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/core.js +0 -273
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/main.d.ts +0 -206
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/main.js +0 -70
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/realtime.js +0 -16
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/build/src/signals.js +0 -34
- package/dotpi_root/dist/@dotpi/module/node_modules/human-signals/package.json +0 -64
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/index.d.ts +0 -35
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/index.js +0 -8
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/package.json +0 -41
- package/dotpi_root/dist/@dotpi/module/node_modules/is-plain-obj/readme.md +0 -58
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/index.d.ts +0 -12
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/index.js +0 -21
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/package.json +0 -47
- package/dotpi_root/dist/@dotpi/module/node_modules/is-unicode-supported/readme.md +0 -35
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/index.d.ts +0 -90
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/index.js +0 -55
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/package.json +0 -52
- package/dotpi_root/dist/@dotpi/module/node_modules/npm-run-path/readme.md +0 -104
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/index.d.ts +0 -31
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/index.js +0 -12
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/package.json +0 -41
- package/dotpi_root/dist/@dotpi/module/node_modules/path-key/readme.md +0 -57
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/index.d.ts +0 -51
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/index.js +0 -41
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/package.json +0 -47
- package/dotpi_root/dist/@dotpi/module/node_modules/path-type/readme.md +0 -74
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/index.d.ts +0 -23
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/index.js +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/package.json +0 -39
- package/dotpi_root/dist/@dotpi/module/node_modules/slash/readme.md +0 -36
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/index.d.ts +0 -18
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/index.js +0 -26
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/license +0 -9
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/package.json +0 -49
- package/dotpi_root/dist/@dotpi/module/node_modules/strip-final-newline/readme.md +0 -34
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What is the default action for this signal when it is not handled.
|
|
3
|
-
*/
|
|
4
|
-
export type SignalAction = 'terminate' | 'core' | 'ignore' | 'pause' | 'unpause'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Which standard defined that signal.
|
|
8
|
-
*/
|
|
9
|
-
export type SignalStandard = 'ansi' | 'posix' | 'bsd' | 'systemv' | 'other'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Standard name of the signal, for example 'SIGINT'.
|
|
13
|
-
*/
|
|
14
|
-
export type SignalName =
|
|
15
|
-
| 'SIGHUP'
|
|
16
|
-
| 'SIGINT'
|
|
17
|
-
| 'SIGQUIT'
|
|
18
|
-
| 'SIGILL'
|
|
19
|
-
| 'SIGTRAP'
|
|
20
|
-
| 'SIGABRT'
|
|
21
|
-
| 'SIGIOT'
|
|
22
|
-
| 'SIGBUS'
|
|
23
|
-
| 'SIGEMT'
|
|
24
|
-
| 'SIGFPE'
|
|
25
|
-
| 'SIGKILL'
|
|
26
|
-
| 'SIGUSR1'
|
|
27
|
-
| 'SIGSEGV'
|
|
28
|
-
| 'SIGUSR2'
|
|
29
|
-
| 'SIGPIPE'
|
|
30
|
-
| 'SIGALRM'
|
|
31
|
-
| 'SIGTERM'
|
|
32
|
-
| 'SIGSTKFLT'
|
|
33
|
-
| 'SIGCHLD'
|
|
34
|
-
| 'SIGCLD'
|
|
35
|
-
| 'SIGCONT'
|
|
36
|
-
| 'SIGSTOP'
|
|
37
|
-
| 'SIGTSTP'
|
|
38
|
-
| 'SIGTTIN'
|
|
39
|
-
| 'SIGBREAK'
|
|
40
|
-
| 'SIGTTOU'
|
|
41
|
-
| 'SIGURG'
|
|
42
|
-
| 'SIGXCPU'
|
|
43
|
-
| 'SIGXFSZ'
|
|
44
|
-
| 'SIGVTALRM'
|
|
45
|
-
| 'SIGPROF'
|
|
46
|
-
| 'SIGWINCH'
|
|
47
|
-
| 'SIGIO'
|
|
48
|
-
| 'SIGPOLL'
|
|
49
|
-
| 'SIGINFO'
|
|
50
|
-
| 'SIGPWR'
|
|
51
|
-
| 'SIGSYS'
|
|
52
|
-
| 'SIGUNUSED'
|
|
53
|
-
| 'SIGRT1'
|
|
54
|
-
| 'SIGRT2'
|
|
55
|
-
| 'SIGRT3'
|
|
56
|
-
| 'SIGRT4'
|
|
57
|
-
| 'SIGRT5'
|
|
58
|
-
| 'SIGRT6'
|
|
59
|
-
| 'SIGRT7'
|
|
60
|
-
| 'SIGRT8'
|
|
61
|
-
| 'SIGRT9'
|
|
62
|
-
| 'SIGRT10'
|
|
63
|
-
| 'SIGRT11'
|
|
64
|
-
| 'SIGRT12'
|
|
65
|
-
| 'SIGRT13'
|
|
66
|
-
| 'SIGRT14'
|
|
67
|
-
| 'SIGRT15'
|
|
68
|
-
| 'SIGRT16'
|
|
69
|
-
| 'SIGRT17'
|
|
70
|
-
| 'SIGRT18'
|
|
71
|
-
| 'SIGRT19'
|
|
72
|
-
| 'SIGRT20'
|
|
73
|
-
| 'SIGRT21'
|
|
74
|
-
| 'SIGRT22'
|
|
75
|
-
| 'SIGRT23'
|
|
76
|
-
| 'SIGRT24'
|
|
77
|
-
| 'SIGRT25'
|
|
78
|
-
| 'SIGRT26'
|
|
79
|
-
| 'SIGRT27'
|
|
80
|
-
| 'SIGRT28'
|
|
81
|
-
| 'SIGRT29'
|
|
82
|
-
| 'SIGRT30'
|
|
83
|
-
| 'SIGRT31'
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Code number of the signal, for example 2.
|
|
87
|
-
* While most number are cross-platform, some are different between different
|
|
88
|
-
* OS.
|
|
89
|
-
*/
|
|
90
|
-
export type SignalNumber =
|
|
91
|
-
| 1
|
|
92
|
-
| 2
|
|
93
|
-
| 3
|
|
94
|
-
| 4
|
|
95
|
-
| 5
|
|
96
|
-
| 6
|
|
97
|
-
| 7
|
|
98
|
-
| 8
|
|
99
|
-
| 9
|
|
100
|
-
| 10
|
|
101
|
-
| 11
|
|
102
|
-
| 12
|
|
103
|
-
| 13
|
|
104
|
-
| 14
|
|
105
|
-
| 15
|
|
106
|
-
| 16
|
|
107
|
-
| 17
|
|
108
|
-
| 18
|
|
109
|
-
| 19
|
|
110
|
-
| 20
|
|
111
|
-
| 21
|
|
112
|
-
| 22
|
|
113
|
-
| 23
|
|
114
|
-
| 24
|
|
115
|
-
| 25
|
|
116
|
-
| 26
|
|
117
|
-
| 27
|
|
118
|
-
| 28
|
|
119
|
-
| 29
|
|
120
|
-
| 30
|
|
121
|
-
| 31
|
|
122
|
-
| 34
|
|
123
|
-
| 35
|
|
124
|
-
| 36
|
|
125
|
-
| 37
|
|
126
|
-
| 38
|
|
127
|
-
| 39
|
|
128
|
-
| 40
|
|
129
|
-
| 41
|
|
130
|
-
| 42
|
|
131
|
-
| 43
|
|
132
|
-
| 44
|
|
133
|
-
| 45
|
|
134
|
-
| 46
|
|
135
|
-
| 47
|
|
136
|
-
| 48
|
|
137
|
-
| 49
|
|
138
|
-
| 50
|
|
139
|
-
| 51
|
|
140
|
-
| 52
|
|
141
|
-
| 53
|
|
142
|
-
| 54
|
|
143
|
-
| 55
|
|
144
|
-
| 56
|
|
145
|
-
| 57
|
|
146
|
-
| 58
|
|
147
|
-
| 59
|
|
148
|
-
| 60
|
|
149
|
-
| 61
|
|
150
|
-
| 62
|
|
151
|
-
| 63
|
|
152
|
-
| 64
|
|
153
|
-
|
|
154
|
-
export interface Signal {
|
|
155
|
-
/**
|
|
156
|
-
* Standard name of the signal, for example 'SIGINT'.
|
|
157
|
-
*/
|
|
158
|
-
name: SignalName
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Code number of the signal, for example 2.
|
|
162
|
-
* While most number are cross-platform, some are different between different
|
|
163
|
-
* OS.
|
|
164
|
-
*/
|
|
165
|
-
number: SignalNumber
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Human-friendly description for the signal, for example
|
|
169
|
-
* 'User interruption with CTRL-C'.
|
|
170
|
-
*/
|
|
171
|
-
description: string
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Whether the current OS can handle this signal in Node.js using
|
|
175
|
-
* `process.on(name, handler)`. The list of supported signals is OS-specific.
|
|
176
|
-
*/
|
|
177
|
-
supported: boolean
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* What is the default action for this signal when it is not handled.
|
|
181
|
-
*/
|
|
182
|
-
action: SignalAction
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Whether the signal's default action cannot be prevented.
|
|
186
|
-
* This is true for SIGTERM, SIGKILL and SIGSTOP.
|
|
187
|
-
*/
|
|
188
|
-
forced: boolean
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Which standard defined that signal.
|
|
192
|
-
*/
|
|
193
|
-
standard: SignalStandard
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Object whose keys are signal names and values are signal objects.
|
|
198
|
-
*/
|
|
199
|
-
export declare const signalsByName: { [SignalNameType in SignalName]: Signal }
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Object whose keys are signal numbers and values are signal objects.
|
|
203
|
-
*/
|
|
204
|
-
export declare const signalsByNumber: {
|
|
205
|
-
[SignalNumberType in SignalNumber]: Signal
|
|
206
|
-
}
|
|
@@ -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,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
|