|
f7eb47b…
|
lmata
|
1 |
"use strict"; |
|
f7eb47b…
|
lmata
|
2 |
var __create = Object.create; |
|
f7eb47b…
|
lmata
|
3 |
var __defProp = Object.defineProperty; |
|
f7eb47b…
|
lmata
|
4 |
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
|
f7eb47b…
|
lmata
|
5 |
var __getOwnPropNames = Object.getOwnPropertyNames; |
|
f7eb47b…
|
lmata
|
6 |
var __getProtoOf = Object.getPrototypeOf; |
|
f7eb47b…
|
lmata
|
7 |
var __hasOwnProp = Object.prototype.hasOwnProperty; |
|
f7eb47b…
|
lmata
|
8 |
var __export = (target, all) => { |
|
f7eb47b…
|
lmata
|
9 |
for (var name in all) |
|
f7eb47b…
|
lmata
|
10 |
__defProp(target, name, { get: all[name], enumerable: true }); |
|
f7eb47b…
|
lmata
|
11 |
}; |
|
f7eb47b…
|
lmata
|
12 |
var __copyProps = (to, from, except, desc) => { |
|
f7eb47b…
|
lmata
|
13 |
if (from && typeof from === "object" || typeof from === "function") { |
|
f7eb47b…
|
lmata
|
14 |
for (let key of __getOwnPropNames(from)) |
|
f7eb47b…
|
lmata
|
15 |
if (!__hasOwnProp.call(to, key) && key !== except) |
|
f7eb47b…
|
lmata
|
16 |
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
|
f7eb47b…
|
lmata
|
17 |
} |
|
f7eb47b…
|
lmata
|
18 |
return to; |
|
f7eb47b…
|
lmata
|
19 |
}; |
|
f7eb47b…
|
lmata
|
20 |
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( |
|
f7eb47b…
|
lmata
|
21 |
// If the importer is in node compatibility mode or this is not an ESM |
|
f7eb47b…
|
lmata
|
22 |
// file that has been converted to a CommonJS file using a Babel- |
|
f7eb47b…
|
lmata
|
23 |
// compatible transform (i.e. "__esModule" has not been set), then set |
|
f7eb47b…
|
lmata
|
24 |
// "default" to the CommonJS "module.exports" for node compatibility. |
|
f7eb47b…
|
lmata
|
25 |
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, |
|
f7eb47b…
|
lmata
|
26 |
mod |
|
f7eb47b…
|
lmata
|
27 |
)); |
|
f7eb47b…
|
lmata
|
28 |
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); |
|
f7eb47b…
|
lmata
|
29 |
var ipc_exports = {}; |
|
f7eb47b…
|
lmata
|
30 |
__export(ipc_exports, { |
|
f7eb47b…
|
lmata
|
31 |
serializeConfig: () => serializeConfig, |
|
f7eb47b…
|
lmata
|
32 |
stdioChunkToParams: () => stdioChunkToParams |
|
f7eb47b…
|
lmata
|
33 |
}); |
|
f7eb47b…
|
lmata
|
34 |
module.exports = __toCommonJS(ipc_exports); |
|
f7eb47b…
|
lmata
|
35 |
var import_util = __toESM(require("util")); |
|
f7eb47b…
|
lmata
|
36 |
var import_compilationCache = require("../transform/compilationCache"); |
|
f7eb47b…
|
lmata
|
37 |
function serializeConfig(config, passCompilationCache) { |
|
f7eb47b…
|
lmata
|
38 |
const result = { |
|
f7eb47b…
|
lmata
|
39 |
location: { configDir: config.configDir, resolvedConfigFile: config.config.configFile }, |
|
f7eb47b…
|
lmata
|
40 |
configCLIOverrides: config.configCLIOverrides, |
|
f7eb47b…
|
lmata
|
41 |
compilationCache: passCompilationCache ? (0, import_compilationCache.serializeCompilationCache)() : void 0 |
|
f7eb47b…
|
lmata
|
42 |
}; |
|
f7eb47b…
|
lmata
|
43 |
try { |
|
f7eb47b…
|
lmata
|
44 |
result.metadata = JSON.stringify(config.config.metadata); |
|
f7eb47b…
|
lmata
|
45 |
} catch (error) { |
|
f7eb47b…
|
lmata
|
46 |
} |
|
f7eb47b…
|
lmata
|
47 |
return result; |
|
f7eb47b…
|
lmata
|
48 |
} |
|
f7eb47b…
|
lmata
|
49 |
function stdioChunkToParams(chunk) { |
|
f7eb47b…
|
lmata
|
50 |
if (chunk instanceof Uint8Array) |
|
f7eb47b…
|
lmata
|
51 |
return { buffer: Buffer.from(chunk).toString("base64") }; |
|
f7eb47b…
|
lmata
|
52 |
if (typeof chunk !== "string") |
|
f7eb47b…
|
lmata
|
53 |
return { text: import_util.default.inspect(chunk) }; |
|
f7eb47b…
|
lmata
|
54 |
return { text: chunk }; |
|
f7eb47b…
|
lmata
|
55 |
} |
|
f7eb47b…
|
lmata
|
56 |
// Annotate the CommonJS export names for ESM import in node: |
|
f7eb47b…
|
lmata
|
57 |
0 && (module.exports = { |
|
f7eb47b…
|
lmata
|
58 |
serializeConfig, |
|
f7eb47b…
|
lmata
|
59 |
stdioChunkToParams |
|
f7eb47b…
|
lmata
|
60 |
}); |