@noldova/context.processes 0.0.14 → 0.0.16

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/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  Ends a process and every process it started, and returns only once they are
4
4
  gone. A process is named by its id and its start time, so an id the system has
5
- since given to another process is never ended.
5
+ since given to another process is never ended. It also lists the machine's
6
+ processes, for ending processes you didn't start.
6
7
 
7
8
  ## Install
8
9
 
@@ -50,9 +51,25 @@ if (!Object.isUndefined(own))
50
51
  await ProcessTree.endDescendantsAsync(own);
51
52
  ```
52
53
 
54
+ `Processes.listAsync` lists every process on the machine, each with its id,
55
+ parent's id, group's id (`null` on Windows), whether it waits for its parent to
56
+ collect it, and its start time, so you can pick processes you never owned and
57
+ end each through its identity:
58
+
59
+ ```ts
60
+ const processes = await Processes.listAsync();
61
+ const leftovers = processes.where(t => t.groupId === group && !t.isZombie);
62
+
63
+ for (const leftover of leftovers)
64
+ await ProcessTree.endAsync(leftover.identity);
65
+ ```
66
+
67
+ A `ProcessEntry` can be constructed, so code that takes its listing through a
68
+ type of its own can be tested with entries instead of real processes.
69
+
53
70
  The processes are listed through one lister process, started on the first call
54
71
  and kept for the rest of the process's life. The limit starts once it is ready,
55
- so the first call in a process may first wait up to 60 seconds for it, which a
72
+ so the first call in a process may first wait up to 45 seconds for it, which a
56
73
  fresh Windows machine can take; a lister not ready by then throws
57
74
  `ProcessesException`.
58
75
 
package/api/index.d.ts CHANGED
@@ -97,6 +97,59 @@ export declare class ProcessIdentity {
97
97
  public static readAsync(processId: number): Promise<ProcessIdentity | undefined>;
98
98
  }
99
99
 
100
+ /**
101
+ * A process as `Processes.listAsync` lists it.
102
+ *
103
+ * @remarks
104
+ * The start time is in the units of `ProcessIdentity.startTime`, so `identity` can be passed to
105
+ * `ProcessTree.endAsync`. Construct an entry to stand in for a listed process, such as in a test.
106
+ */
107
+ export declare class ProcessEntry {
108
+ /**
109
+ * The process id.
110
+ */
111
+ public readonly processId: number;
112
+
113
+ /**
114
+ * The id of the process's parent, or 0 when it has none.
115
+ */
116
+ public readonly parentId: number;
117
+
118
+ /**
119
+ * The id of the process's group on Linux and macOS, or `null` on Windows, which has no groups.
120
+ */
121
+ public readonly groupId: number | null;
122
+
123
+ /**
124
+ * Whether the process has ended and waits for its parent to collect it.
125
+ */
126
+ public readonly isZombie: boolean;
127
+
128
+ /**
129
+ * When the process started, in milliseconds since the epoch.
130
+ */
131
+ public readonly startTime: number;
132
+
133
+ /**
134
+ * Initializes the entry.
135
+ *
136
+ * @param processId The process id, an integer from 0.
137
+ * @param parentId The parent's id, an integer from 0.
138
+ * @param groupId The group's id, an integer from 0, or `null` on Windows.
139
+ * @param isZombie Whether the process has ended and waits for its parent to collect it.
140
+ * @param startTime When the process started, in milliseconds since the epoch, an integer from 0.
141
+ * @throws ArgumentOutOfRangeException When an id or the start time is not an integer from 0.
142
+ */
143
+ public constructor(processId: number, parentId: number, groupId: number | null, isZombie: boolean, startTime: number);
144
+
145
+ /**
146
+ * The process's identity, for `ProcessTree.endAsync`.
147
+ *
148
+ * @throws ArgumentOutOfRangeException When the process id is 0, which no listed process has.
149
+ */
150
+ public get identity(): ProcessIdentity;
151
+ }
152
+
100
153
  /**
101
154
  * How `ProcessTree.endAsync` and `ProcessTree.endDescendantsAsync` end a tree.
102
155
  */
@@ -109,7 +162,7 @@ export declare class ProcessTreeEndOptions {
109
162
 
110
163
  /**
111
164
  * How long the end may take once the process lister is ready, in milliseconds; `10000` by
112
- * default. The first end in a process first waits up to 60 seconds for its lister to start.
165
+ * default. The first end in a process first waits up to 45 seconds for its lister to start.
113
166
  */
114
167
  public readonly limitMilliseconds: number;
115
168
 
@@ -141,7 +194,7 @@ export declare class ProcessTreeEndOptions {
141
194
  * process's children.
142
195
  *
143
196
  * The processes are listed through one lister process, started on the first call and kept for
144
- * the rest of the process's life; it may take up to 60 seconds to start, and the call's limit
197
+ * the rest of the process's life; it may take up to 45 seconds to start, and the call's limit
145
198
  * starts once it is ready.
146
199
  *
147
200
  * On Linux and macOS each process is stopped with `SIGSTOP` before it is ended, and the tree is
@@ -170,7 +223,7 @@ export declare class ProcessTree {
170
223
  * @throws ProcessTreeEndException When processes of the tree are still listed when the limit
171
224
  * passes.
172
225
  * @throws ProcessesException When processes can't be listed on this system, the process lister
173
- * is not ready within 60 seconds, ends before it answers, which it does when it takes 5 seconds
226
+ * is not ready within 45 seconds, ends before it answers, which it does when it takes 5 seconds
174
227
  * past the limit, or answers a line that is not a process.
175
228
  * @example
176
229
  * ```ts
@@ -198,7 +251,7 @@ export declare class ProcessTree {
198
251
  * @throws ProcessTreeEndException When descendants of the root are still listed when the limit
199
252
  * passes.
200
253
  * @throws ProcessesException When processes can't be listed on this system, the process lister
201
- * is not ready within 60 seconds, ends before it answers, which it does when it takes 5 seconds
254
+ * is not ready within 45 seconds, ends before it answers, which it does when it takes 5 seconds
202
255
  * past the limit, or answers a line that is not a process.
203
256
  * @example
204
257
  * ```ts
@@ -212,3 +265,32 @@ export declare class ProcessTree {
212
265
  */
213
266
  public static endDescendantsAsync(root: ProcessIdentity, options?: ProcessTreeEndOptions): Promise<IReadOnlyList<ProcessIdentity>>;
214
267
  }
268
+
269
+ /**
270
+ * Lists the machine's processes.
271
+ *
272
+ * @remarks
273
+ * The listing goes through the same kept lister process as `ProcessTree`, so a call after the
274
+ * first is cheap and can be repeated to poll. It is read within 10 seconds once the lister is
275
+ * ready. Id 0, which Windows and macOS give to the system's idle or kernel task, isn't listed.
276
+ */
277
+ export declare class Processes {
278
+ /**
279
+ * Lists every process on the machine, other than the lister itself.
280
+ *
281
+ * @returns The processes, in the order the system reports them.
282
+ * @throws ProcessesException When processes can't be listed on this system, the process lister
283
+ * is not ready within its limit, ends before it answers, or answers a line that is not a
284
+ * process.
285
+ * @example
286
+ * ```ts
287
+ * import { Processes, ProcessTree } from "@noldova/context.processes";
288
+ *
289
+ * const processes = await Processes.listAsync();
290
+ * const children = processes.where(t => t.parentId === process.pid && !t.isZombie);
291
+ * for (const child of children)
292
+ * await ProcessTree.endAsync(child.identity);
293
+ * ```
294
+ */
295
+ public static listAsync(): Promise<IReadOnlyList<ProcessEntry>>;
296
+ }
package/api/index.js CHANGED
@@ -7,7 +7,9 @@
7
7
  */
8
8
  export { ProcessTreeEndException } from "../exceptions/process-tree-end.exception.js";
9
9
  export { ProcessesException } from "../exceptions/processes.exception.js";
10
+ export { ProcessEntry } from "../models/process-entry.js";
10
11
  export { ProcessIdentity } from "../models/process-identity.js";
11
12
  export { ProcessTreeEndOptions } from "../models/process-tree-end-options.js";
12
13
  export { ProcessTree } from "../services/process-tree.js";
14
+ export { Processes } from "../services/processes.js";
13
15
  //# sourceMappingURL=index.js.map
package/api/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/noldova.context.processes/src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/noldova.context.processes/src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
@@ -5,6 +5,7 @@
5
5
  * This source code is licensed under the license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
+ import { ArgumentOutOfRangeException } from "@noldova/context.exceptions";
8
9
  import { ProcessesException } from "../exceptions/processes.exception.js";
9
10
  import { Resources } from "../resources.js";
10
11
  import { ProcessIdentity } from "./process-identity.js";
@@ -15,6 +16,11 @@ export class ProcessEntry {
15
16
  isZombie;
16
17
  startTime;
17
18
  constructor(processId, parentId, groupId, isZombie, startTime) {
19
+ ProcessEntry.throwIfNotId(processId, Resources.processIdParameterName);
20
+ ProcessEntry.throwIfNotId(parentId, Resources.parentIdParameterName);
21
+ if (!Object.isNull(groupId))
22
+ ProcessEntry.throwIfNotId(groupId, Resources.groupIdParameterName);
23
+ ProcessEntry.throwIfNotId(startTime, Resources.startTimeParameterName);
18
24
  this.processId = processId;
19
25
  this.parentId = parentId;
20
26
  this.groupId = groupId;
@@ -28,7 +34,12 @@ export class ProcessEntry {
28
34
  const fields = Resources.entryPattern.exec(line)?.groups;
29
35
  if (Object.isUndefined(fields))
30
36
  throw new ProcessesException(Resources.formatEntryInvalid(line));
31
- return new ProcessEntry(Number(fields[Resources.processIdGroup]), Number(fields[Resources.parentIdGroup]), Number(fields[Resources.groupIdGroup]), String(fields[Resources.stateGroup]).startsWith(Resources.zombieState), Number(fields[Resources.startTimeGroup]));
37
+ const groupId = String(fields[Resources.groupIdGroup]);
38
+ return new ProcessEntry(Number(fields[Resources.processIdGroup]), Number(fields[Resources.parentIdGroup]), groupId === Resources.noGroup ? null : Number(groupId), String(fields[Resources.stateGroup]).startsWith(Resources.zombieState), Number(fields[Resources.startTimeGroup]));
39
+ }
40
+ static throwIfNotId(value, parameterName) {
41
+ ArgumentOutOfRangeException.throwIfNotInteger(value, parameterName);
42
+ ArgumentOutOfRangeException.throwIfNegative(value, parameterName);
32
43
  }
33
44
  }
34
45
  //# sourceMappingURL=process-entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"process-entry.js","sourceRoot":"","sources":["../../../../src/noldova.context.processes/src/models/process-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,OAAO,YAAY;IACP,SAAS,CAAS;IAClB,QAAQ,CAAS;IACjB,OAAO,CAAS;IAChB,QAAQ,CAAU;IAClB,SAAS,CAAS;IAElC,YAAoB,SAAiB,EAAE,QAAgB,EAAE,OAAe,EAAE,QAAiB,EAAE,SAAiB;QAC5G,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAY;QAC9B,MAAM,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACzD,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;YAC5B,MAAM,IAAI,kBAAkB,CAAC,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;QAEnE,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,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F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noldova/context.processes",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "main": "api/index.js",
6
6
  "types": "api/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "registry": "https://registry.npmjs.org/"
20
20
  },
21
21
  "peerDependencies": {
22
- "@noldova/context.collections": ">=0.0.14 <0.1.0",
23
- "@noldova/context.core": ">=0.0.14 <0.1.0",
24
- "@noldova/context.exceptions": ">=0.0.14 <0.1.0"
22
+ "@noldova/context.collections": ">=0.0.16 <0.1.0",
23
+ "@noldova/context.core": ">=0.0.16 <0.1.0",
24
+ "@noldova/context.exceptions": ">=0.0.16 <0.1.0"
25
25
  },
26
- "gitHead": "d6670c582cf942a35496df9bed0170c854f63d29"
26
+ "gitHead": "65ac5a1991cb82bc8a73cd256818195c0172abbb"
27
27
  }
package/resources.js CHANGED
@@ -12,10 +12,11 @@ export class Resources {
12
12
  static endLine = "end";
13
13
  static refusedPrefix = "refused ";
14
14
  static lineSeparator = "\n";
15
- static entryPattern = /^(?<processId>\d+)\s+(?<parentId>\d+)\s+(?<groupId>\d+)\s+(?<state>\S+)\s+(?<startTime>\d+)$/u;
15
+ static entryPattern = /^(?<processId>\d+)\s+(?<parentId>\d+)\s+(?<groupId>\d+|-)\s+(?<state>\S+)\s+(?<startTime>\d+)$/u;
16
16
  static processIdGroup = "processId";
17
17
  static parentIdGroup = "parentId";
18
18
  static groupIdGroup = "groupId";
19
+ static noGroup = "-";
19
20
  static stateGroup = "state";
20
21
  static startTimeGroup = "startTime";
21
22
  static zombieState = "Z";
@@ -31,10 +32,12 @@ export class Resources {
31
32
  static defaultLimitMilliseconds = 10_000;
32
33
  static readLimitMilliseconds = 10_000;
33
34
  static listerMarginMilliseconds = 5_000;
34
- static listerReadyMilliseconds = 60_000;
35
+ static listerReadyMilliseconds = 45_000;
35
36
  static listingTries = 3;
36
37
  static processIdParameterName = "processId";
37
38
  static startTimeParameterName = "startTime";
39
+ static parentIdParameterName = "parentId";
40
+ static groupIdParameterName = "groupId";
38
41
  static graceMillisecondsParameterName = "graceMilliseconds";
39
42
  static limitMillisecondsParameterName = "limitMilliseconds";
40
43
  static listingEnvironment = { LC_ALL: "C", TZ: "UTC0" };
@@ -80,7 +83,7 @@ export class Resources {
80
83
  " if ([IntPtr]::Size -eq 8) { $id = [BitConverter]::ToInt64($bytes, $offset + 80); $parent = [BitConverter]::ToInt64($bytes, $offset + 88) }",
81
84
  " else { $id = [BitConverter]::ToInt32($bytes, $offset + 68); $parent = [BitConverter]::ToInt32($bytes, $offset + 72) }",
82
85
  " $start = if ($created -eq 0) { 0 } else { [Math]::DivRem($created - 116444736000000000, [long] 10000, [ref] $remainder) }",
83
- " $null = $lines.Append($id).Append(' ').Append($parent).Append(' 0 R ').Append($start).Append(\"`n\")",
86
+ " $null = $lines.Append($id).Append(' ').Append($parent).Append(' - R ').Append($start).Append(\"`n\")",
84
87
  " $next = [BitConverter]::ToInt32($bytes, $offset)",
85
88
  " if ($next -eq 0) { return $lines.ToString() }",
86
89
  " }",
@@ -101,8 +104,8 @@ export class Resources {
101
104
  static formatListerEnded(file) {
102
105
  return `The process lister "${file}" ended before it answered.`;
103
106
  }
104
- static formatListerNotReady(file, limitMilliseconds) {
105
- return `The process lister "${file}" was not ready within ${limitMilliseconds} ms.`;
107
+ static formatListerNotReady(file, limitMilliseconds, waitedMilliseconds) {
108
+ return `The process lister "${file}" was not ready within its ${limitMilliseconds} ms limit; it was waited for ${waitedMilliseconds} ms.`;
106
109
  }
107
110
  static formatListerRefused(file, reason) {
108
111
  return `The process lister "${file}" could not set up its listing, as the machine refused it: ${reason}`;
package/resources.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/noldova.context.processes/src/resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAgD,YAAY,EAAE,MAA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AAE,uBAAuB,iBAAiB,qBAAqB,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC;IAC1K,CAAC;IAEM,MAAM,CAAC,cAAc,CAAC,SAAiB,EAAE,SAAiB;QAC/D,OAAO,GAAG,SAAS,eAAe,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;IACxE,CAAC;CACF"}
@@ -73,11 +73,12 @@ export class ListerProcess {
73
73
  this.child.kill();
74
74
  }
75
75
  async waitReadyAsync() {
76
+ const started = performance.now();
76
77
  const late = Promise.withResolvers();
77
78
  const timer = setTimeout(() => late.resolve(false), this.listing.readyMilliseconds);
78
79
  const isReady = await Promise.race([this.waitAsync().then(() => true), late.promise]).finally(() => clearTimeout(timer));
79
80
  if (!isReady)
80
- throw new ProcessesException(Resources.formatListerNotReady(this.listing.file, this.listing.readyMilliseconds));
81
+ throw new ProcessesException(Resources.formatListerNotReady(this.listing.file, this.listing.readyMilliseconds, Math.round(performance.now() - started)));
81
82
  }
82
83
  async listOnceAsync() {
83
84
  this.answer = Promise.withResolvers();
@@ -1 +1 @@
1
- {"version":3,"file":"lister-process.js","sourceRoot":"","sources":["../../../../src/noldova.context.processes/src/services/lister-process.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iEAAiE;AAEjE,OAAO,EAA4B,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,uBAA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GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF"}
1
+ {"version":3,"file":"lister-process.js","sourceRoot":"","sources":["../../../../src/noldova.context.processes/src/services/lister-process.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,iEAAiE;AAEjE,OAAO,EAA4B,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAsB,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,aAAa;IACP,OAAO,CAAiB;IACxB,KAAK,CAAgD;IACrD,KAAK,CAAiB;IAC/B,MAAM,CAA0C;IAChD,KAAK,CAAW;IAChB,IAAI,CAAmB;IAE/B,YAAoB,KAAoD,EAAE,OAAuB,EAAE,OAAmB;QACpH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,EAAqB,CAAC;QACzD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,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AC;IAEO,SAAS;QACf,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC;IAEO,OAAO,CAAC,IAAY;QAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,CAAC;YAC7C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,kBAAkB,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YACzI,OAAO;QACT,CAAC;QAED,IAAI,IAAI,KAAK,SAAS,CAAC,OAAO,EAAE,CAAC;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) Noldova.
4
+ *
5
+ * This source code is licensed under the license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ import { Resources } from "../resources.js";
9
+ import { ProcessLister } from "./process-lister.js";
10
+ export class Processes {
11
+ static async listAsync() {
12
+ const entries = await ProcessLister.useAsync(Resources.readLimitMilliseconds, t => t.listAsync());
13
+ return entries.where(t => t.processId > 0).toList();
14
+ }
15
+ }
16
+ //# sourceMappingURL=processes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processes.js","sourceRoot":"","sources":["../../../../src/noldova.context.processes/src/services/processes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,SAAS;IACb,MAAM,CAAC,KAAK,CAAC,SAAS;QAC3B,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,qBAAqB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;QAClG,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtD,CAAC;CACF"}