@dxos/typings 0.1.58-main.bf45e8e → 0.1.58-main.c171de6

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/.eslintrc.js ADDED
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ "extends": [
3
+ "../../../.eslintrc.js"
4
+ ],
5
+ "parserOptions": {
6
+ "project": "tsconfig.json",
7
+ "tsconfigRootDir": __dirname,
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/typings",
3
- "version": "0.1.58-main.bf45e8e",
3
+ "version": "0.1.58-main.c171de6",
4
4
  "description": "Typescript defs for various base packages",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
package/project.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "options": {
20
20
  "format": "unix",
21
21
  "lintFilePatterns": [
22
- "packages/common/typings/**/*.{ts,js}"
22
+ "packages/common/typings/**/*.{ts,js}?(x)"
23
23
  ]
24
24
  },
25
25
  "outputs": [
package/src/index.d.ts CHANGED
@@ -3,7 +3,6 @@
3
3
  //
4
4
 
5
5
  import './dxos';
6
- import './forever';
7
6
  import './growing-file'
8
7
  import './hypercore';
9
8
  import './hypercore-crypto';
package/src/forever.d.ts DELETED
@@ -1,127 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- declare module 'forever' {
6
- export type Config = {
7
- root: string;
8
- };
9
-
10
- export const load: (config: Config) => void;
11
-
12
- export type MonitorOptions = {
13
- //
14
- // Basic configuration options
15
- //
16
- silent?: boolean | undefined; // Silences the output from stdout and stderr in the parent process
17
- uid?: string | undefined; // Custom uid for this forever process. (default: autogen)
18
- pidFile?: string | undefined; // Path to put pid information for the process(es) started
19
- max?: number | undefined; // Sets the maximum number of times a given script should run
20
- killTree?: boolean | undefined; // Kills the entire child process tree on `exit`
21
-
22
- //
23
- // These options control how quickly forever restarts a child process
24
- // as well as when to kill a "spinning" process
25
- //
26
- minUptime?: number | undefined; // Minimum time a child process has to be up. Forever will 'exit' otherwise.
27
- spinSleepTime?: number | undefined; // Interval between restarts if a child is spinning (i.e. alive < minUptime).
28
-
29
- //
30
- // Command to spawn as well as options and other vars
31
- // (env, cwd, etc) to pass along
32
- //
33
- command?: string | undefined; // Binary to run (default: 'node')
34
- args?: string[] | undefined; // Additional arguments to pass to the script,
35
- sourceDir?: string | undefined; // Directory that the source script is in
36
-
37
- //
38
- // Options for restarting on watched files.
39
- //
40
- watch?: boolean | undefined; // Value indicating if we should watch files.
41
- watchIgnoreDotFiles?: boolean | undefined; // Whether to ignore file starting with a '.'
42
- watchIgnorePatterns?: string[] | undefined; // Ignore patterns to use when watching files.
43
- watchDirectory?: string | undefined; // Top-level directory to watch from. You can provide multiple watchDirectory options to watch multiple directories (e.g. for cli: forever start -w='app' -w='some_other_directory' app\index.js)
44
-
45
- //
46
- // All or nothing options passed along to `child_process.spawn`.
47
- //
48
- spawnWith?: SpawnWith | undefined;
49
- //
50
- // More specific options to pass along to `child_process.spawn` which
51
- // will override anything passed to the `spawnWith` option
52
- //
53
- env?: NodeJS.ProcessEnv | undefined;
54
- cwd?: string | undefined;
55
- //
56
- // Log files and associated logging options for this instance
57
- //
58
- logFile?: string | undefined; // Path to log output from forever process (when daemonized)
59
- outFile?: string | undefined; // Path to log output from child stdout
60
- errFile?: string | undefined; // Path to log output from child stderr
61
- //
62
- // ### function parseCommand (command, args)
63
- // #### @command {String} Command string to parse
64
- // #### @args {Array} Additional default arguments
65
- //
66
- // Returns the `command` and the `args` parsed from
67
- // any command. Use this to modify the default parsing
68
- // done by 'forever-monitor' around spaces.
69
- //
70
- parser?(command: string, args: string[]): { command: string; args: string[] };
71
- };
72
-
73
- /**
74
- * Starts a script with forever as a daemon.
75
- * @param script {string} Location of the script to run.
76
- * @param options {Object} Configuration for forever instance.
77
- */
78
- export const startDaemon: (script: string, options?: MonitorOptions) => void;
79
-
80
- /**
81
- * Stops the process(es) with the specified index or script name in the list of all processes.
82
- * @param target Index or script name to stop.
83
- * @param format Indicated if we should CLI format the returned output.
84
- */
85
- export const stop: (target: string, format?: boolean) => void;
86
-
87
- /**
88
- * Restarts the process(es) with the specified index or script name in the list of all processes.
89
- * @param target Index or script name to restart.
90
- * @param format Indicated if we should CLI format the returned output.
91
- */
92
- export const restart: (target: string, format?: boolean) => void;
93
-
94
- // TODO(mykola): Get full ForeverProcess type.
95
- export type ForeverProcess = {
96
- args: string[];
97
- command: string;
98
- cwd: string;
99
- ctime: number;
100
- errFile: string;
101
- file: string;
102
- foreverPid: number;
103
- id: string;
104
- isMaster: boolean;
105
- logFile: string;
106
- outFile: string;
107
- pid: number;
108
- pidFile: string;
109
- restarts: number;
110
- running: boolean;
111
- silent: boolean;
112
- socket: string;
113
- spawnWith: string;
114
- uid: string;
115
- };
116
-
117
- /**
118
- * Returns the list of all process data managed by forever.
119
- * @param format Indicated if we should CLI format the returned output.
120
- * @param callback Continuation to respond to when complete.
121
- */
122
- export const list: (format: boolean, callback: (err: Error, processes: ForeverProcess[]) => void) => void;
123
-
124
- export const kill: (pid: number, killTree?: boolean, signal?: string, callback?: () => any) => void;
125
-
126
- export const cleanUp: (cleanUpLogs: boolean, allowManager: boolean) => void;
127
- }