1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.createProcess = void 0;
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | const maybeReturnProcess = () => {
|
16 | if (typeof process !== 'undefined') {
|
17 | return process;
|
18 | }
|
19 | try {
|
20 | return require('process');
|
21 | }
|
22 | catch (_a) {
|
23 | return undefined;
|
24 | }
|
25 | };
|
26 | function createProcess() {
|
27 | const p = maybeReturnProcess() || {};
|
28 | if (!p.cwd)
|
29 | p.cwd = () => '/';
|
30 | if (!p.emitWarning)
|
31 | p.emitWarning = (message, type) => {
|
32 |
|
33 | console.warn(`${type}${type ? ': ' : ''}${message}`);
|
34 | };
|
35 | if (!p.env)
|
36 | p.env = {};
|
37 | return p;
|
38 | }
|
39 | exports.createProcess = createProcess;
|
40 | exports.default = createProcess();
|
41 |
|
\ | No newline at end of file |