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.nextTick)
|
31 | p.nextTick = require('./setImmediate').default;
|
32 | if (!p.emitWarning)
|
33 | p.emitWarning = (message, type) => {
|
34 |
|
35 | console.warn(`${type}${type ? ': ' : ''}${message}`);
|
36 | };
|
37 | if (!p.env)
|
38 | p.env = {};
|
39 | return p;
|
40 | }
|
41 | exports.createProcess = createProcess;
|
42 | exports.default = createProcess();
|
43 |
|
\ | No newline at end of file |