12345678910111213141516171819202122232425262728293031323334353637383940 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.createProcess = createProcess;
- const maybeReturnProcess = () => {
- if (typeof process !== 'undefined') {
- return process;
- }
- try {
- return require('process');
- }
- catch (_a) {
- return undefined;
- }
- };
- function createProcess() {
- const p = maybeReturnProcess() || {};
- if (!p.cwd)
- p.cwd = () => '/';
- if (!p.emitWarning)
- p.emitWarning = (message, type) => {
-
- console.warn(`${type}${type ? ': ' : ''}${message}`);
- };
- if (!p.env)
- p.env = {};
- return p;
- }
- exports.default = createProcess();
|