| 
									
										
										
										
											2018-01-24 06:09:26 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 	MIT License http://www.opensource.org/licenses/mit-license.php
 | 
					
						
							|  |  |  | 	Author Tobias Koppers @sokra | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2018-07-30 23:08:51 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-24 06:09:26 +08:00
										 |  |  | "use strict"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-15 17:46:28 +08:00
										 |  |  | const { RawSource } = require("webpack-sources"); | 
					
						
							|  |  |  | const ConcatenationScope = require("../ConcatenationScope"); | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | const { UsageState } = require("../ExportsInfo"); | 
					
						
							| 
									
										
										
										
											2019-10-11 21:46:57 +08:00
										 |  |  | const Generator = require("../Generator"); | 
					
						
							| 
									
										
										
										
											2024-11-01 04:19:07 +08:00
										 |  |  | const { JS_TYPES } = require("../ModuleSourceTypesConstants"); | 
					
						
							| 
									
										
										
										
											2019-10-11 21:46:57 +08:00
										 |  |  | const RuntimeGlobals = require("../RuntimeGlobals"); | 
					
						
							| 
									
										
										
										
											2018-08-07 01:39:43 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** @typedef {import("webpack-sources").Source} Source */ | 
					
						
							| 
									
										
										
										
											2025-03-13 22:24:10 +08:00
										 |  |  | /** @typedef {import("../../declarations/WebpackOptions").JsonGeneratorOptions} JsonGeneratorOptions */ | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | /** @typedef {import("../ExportsInfo")} ExportsInfo */ | 
					
						
							| 
									
										
										
										
											2019-10-11 21:46:57 +08:00
										 |  |  | /** @typedef {import("../Generator").GenerateContext} GenerateContext */ | 
					
						
							| 
									
										
										
										
											2020-09-15 17:46:28 +08:00
										 |  |  | /** @typedef {import("../Module").ConcatenationBailoutReasonContext} ConcatenationBailoutReasonContext */ | 
					
						
							| 
									
										
										
										
											2024-11-01 04:19:07 +08:00
										 |  |  | /** @typedef {import("../Module").SourceTypes} SourceTypes */ | 
					
						
							| 
									
										
										
										
											2019-10-11 21:46:57 +08:00
										 |  |  | /** @typedef {import("../NormalModule")} NormalModule */ | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | /** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */ | 
					
						
							| 
									
										
										
										
											2025-09-10 19:38:19 +08:00
										 |  |  | /** @typedef {import("../util/fs").JsonArray} JsonArray */ | 
					
						
							|  |  |  | /** @typedef {import("../util/fs").JsonObject} JsonObject */ | 
					
						
							|  |  |  | /** @typedef {import("../util/fs").JsonValue} JsonValue */ | 
					
						
							| 
									
										
										
										
											2018-01-24 06:09:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-29 02:03:16 +08:00
										 |  |  | /** | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  |  * @param {JsonValue} data Raw JSON data | 
					
						
							| 
									
										
										
										
											2023-04-29 02:03:16 +08:00
										 |  |  |  * @returns {undefined|string} stringified data | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2025-07-17 00:13:14 +08:00
										 |  |  | const stringifySafe = (data) => { | 
					
						
							| 
									
										
										
										
											2018-04-25 06:35:58 +08:00
										 |  |  | 	const stringified = JSON.stringify(data); | 
					
						
							|  |  |  | 	if (!stringified) { | 
					
						
							| 
									
										
										
										
											2024-08-02 02:36:27 +08:00
										 |  |  | 		return; // Invalid JSON
 | 
					
						
							| 
									
										
										
										
											2018-04-25 06:35:58 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-17 00:13:14 +08:00
										 |  |  | 	return stringified.replace(/\u2028|\u2029/g, (str) => | 
					
						
							| 
									
										
										
										
											2019-02-05 17:06:32 +08:00
										 |  |  | 		str === "\u2029" ? "\\u2029" : "\\u2028" | 
					
						
							| 
									
										
										
										
											2018-02-25 09:00:20 +08:00
										 |  |  | 	); // invalid in JavaScript but valid JSON
 | 
					
						
							| 
									
										
										
										
											2018-04-25 06:35:58 +08:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2018-01-24 06:09:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | /** | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  |  * @param {JsonObject | JsonArray} data Raw JSON data (always an object or array) | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  |  * @param {ExportsInfo} exportsInfo exports info | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  |  * @param {RuntimeSpec} runtime the runtime | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  |  * @returns {JsonObject | JsonArray} reduced data | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | const createObjectForExportsInfo = (data, exportsInfo, runtime) => { | 
					
						
							| 
									
										
										
										
											2025-07-02 20:10:54 +08:00
										 |  |  | 	if (exportsInfo.otherExportsInfo.getUsed(runtime) !== UsageState.Unused) { | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | 		return data; | 
					
						
							| 
									
										
										
										
											2025-07-02 20:10:54 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 	const isArray = Array.isArray(data); | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 	/** @type {JsonObject | JsonArray} */ | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 	const reducedData = isArray ? [] : {}; | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 	for (const key of Object.keys(data)) { | 
					
						
							|  |  |  | 		const exportInfo = exportsInfo.getReadOnlyExportInfo(key); | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | 		const used = exportInfo.getUsed(runtime); | 
					
						
							|  |  |  | 		if (used === UsageState.Unused) continue; | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 		// The real type is `JsonObject | JsonArray`, but typescript doesn't work `Object.keys(['string', 'other-string', 'etc'])` properly
 | 
					
						
							|  |  |  | 		const newData = /** @type {JsonObject} */ (data)[key]; | 
					
						
							| 
									
										
										
										
											2024-08-02 02:36:27 +08:00
										 |  |  | 		const value = | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 			used === UsageState.OnlyPropertiesUsed && | 
					
						
							|  |  |  | 			exportInfo.exportsInfo && | 
					
						
							|  |  |  | 			typeof newData === "object" && | 
					
						
							|  |  |  | 			newData | 
					
						
							|  |  |  | 				? createObjectForExportsInfo(newData, exportInfo.exportsInfo, runtime) | 
					
						
							|  |  |  | 				: newData; | 
					
						
							| 
									
										
										
										
											2023-05-25 06:09:00 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		const name = /** @type {string} */ (exportInfo.getUsedName(key, runtime)); | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 		/** @type {JsonObject} */ | 
					
						
							|  |  |  | 		(reducedData)[name] = value; | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 	if (isArray) { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:09:42 +08:00
										 |  |  | 		const arrayLengthWhenUsed = | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 			exportsInfo.getReadOnlyExportInfo("length").getUsed(runtime) !== | 
					
						
							|  |  |  | 			UsageState.Unused | 
					
						
							|  |  |  | 				? data.length | 
					
						
							|  |  |  | 				: undefined; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 		let sizeObjectMinusArray = 0; | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 		const reducedDataLength = | 
					
						
							|  |  |  | 			/** @type {JsonArray} */ | 
					
						
							|  |  |  | 			(reducedData).length; | 
					
						
							|  |  |  | 		for (let i = 0; i < reducedDataLength; i++) { | 
					
						
							|  |  |  | 			if (/** @type {JsonArray} */ (reducedData)[i] === undefined) { | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 				sizeObjectMinusArray -= 2; | 
					
						
							|  |  |  | 			} else { | 
					
						
							|  |  |  | 				sizeObjectMinusArray += `${i}`.length + 3; | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 		if (arrayLengthWhenUsed !== undefined) { | 
					
						
							|  |  |  | 			sizeObjectMinusArray += | 
					
						
							|  |  |  | 				`${arrayLengthWhenUsed}`.length + | 
					
						
							|  |  |  | 				8 - | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 				(arrayLengthWhenUsed - reducedDataLength) * 2; | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2025-07-02 20:10:54 +08:00
										 |  |  | 		if (sizeObjectMinusArray < 0) { | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 			return Object.assign( | 
					
						
							|  |  |  | 				arrayLengthWhenUsed === undefined | 
					
						
							|  |  |  | 					? {} | 
					
						
							|  |  |  | 					: { length: arrayLengthWhenUsed }, | 
					
						
							|  |  |  | 				reducedData | 
					
						
							|  |  |  | 			); | 
					
						
							| 
									
										
										
										
											2025-07-02 20:10:54 +08:00
										 |  |  | 		} | 
					
						
							| 
									
										
										
										
											2023-04-29 02:09:46 +08:00
										 |  |  | 		/** @type {number} */ | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 		const generatedLength = | 
					
						
							|  |  |  | 			arrayLengthWhenUsed !== undefined | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 				? Math.max(arrayLengthWhenUsed, reducedDataLength) | 
					
						
							|  |  |  | 				: reducedDataLength; | 
					
						
							| 
									
										
										
										
											2021-02-07 23:35:04 +08:00
										 |  |  | 		for (let i = 0; i < generatedLength; i++) { | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 			if (/** @type {JsonArray} */ (reducedData)[i] === undefined) { | 
					
						
							|  |  |  | 				/** @type {JsonArray} */ | 
					
						
							|  |  |  | 				(reducedData)[i] = 0; | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return reducedData; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-07 01:39:43 +08:00
										 |  |  | class JsonGenerator extends Generator { | 
					
						
							| 
									
										
										
										
											2025-03-13 22:24:10 +08:00
										 |  |  | 	/** | 
					
						
							|  |  |  | 	 * @param {JsonGeneratorOptions} options options | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	constructor(options) { | 
					
						
							|  |  |  | 		super(); | 
					
						
							|  |  |  | 		this.options = options; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-03 22:00:32 +08:00
										 |  |  | 	/** | 
					
						
							| 
									
										
										
										
											2019-11-18 21:29:19 +08:00
										 |  |  | 	 * @param {NormalModule} module fresh module | 
					
						
							| 
									
										
										
										
											2024-11-01 04:19:07 +08:00
										 |  |  | 	 * @returns {SourceTypes} available types (do not mutate) | 
					
						
							| 
									
										
										
										
											2018-12-03 22:00:32 +08:00
										 |  |  | 	 */ | 
					
						
							| 
									
										
										
										
											2019-11-18 21:29:19 +08:00
										 |  |  | 	getTypes(module) { | 
					
						
							| 
									
										
										
										
											2024-11-01 04:19:07 +08:00
										 |  |  | 		return JS_TYPES; | 
					
						
							| 
									
										
										
										
											2018-12-03 22:00:32 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-04 18:23:40 +08:00
										 |  |  | 	/** | 
					
						
							|  |  |  | 	 * @param {NormalModule} module the module | 
					
						
							|  |  |  | 	 * @param {string=} type source type | 
					
						
							|  |  |  | 	 * @returns {number} estimate size of the module | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	getSize(module, type) { | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 		/** @type {JsonValue | undefined} */ | 
					
						
							| 
									
										
										
										
											2023-04-29 02:03:16 +08:00
										 |  |  | 		const data = | 
					
						
							| 
									
										
										
										
											2021-07-06 16:14:22 +08:00
										 |  |  | 			module.buildInfo && | 
					
						
							|  |  |  | 			module.buildInfo.jsonData && | 
					
						
							|  |  |  | 			module.buildInfo.jsonData.get(); | 
					
						
							| 
									
										
										
										
											2018-12-04 18:23:40 +08:00
										 |  |  | 		if (!data) return 0; | 
					
						
							| 
									
										
										
										
											2023-05-25 06:09:00 +08:00
										 |  |  | 		return /** @type {string} */ (stringifySafe(data)).length + 10; | 
					
						
							| 
									
										
										
										
											2018-12-04 18:23:40 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-15 17:46:28 +08:00
										 |  |  | 	/** | 
					
						
							|  |  |  | 	 * @param {NormalModule} module module for which the bailout reason should be determined | 
					
						
							|  |  |  | 	 * @param {ConcatenationBailoutReasonContext} context context | 
					
						
							|  |  |  | 	 * @returns {string | undefined} reason why this module can't be concatenated, undefined when it can be concatenated | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	getConcatenationBailoutReason(module, context) { | 
					
						
							|  |  |  | 		return undefined; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-07 01:39:43 +08:00
										 |  |  | 	/** | 
					
						
							|  |  |  | 	 * @param {NormalModule} module module for which the code should be generated | 
					
						
							|  |  |  | 	 * @param {GenerateContext} generateContext context for generate | 
					
						
							| 
									
										
										
										
											2024-10-24 04:30:31 +08:00
										 |  |  | 	 * @returns {Source | null} generated code | 
					
						
							| 
									
										
										
										
											2018-08-07 01:39:43 +08:00
										 |  |  | 	 */ | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | 	generate( | 
					
						
							|  |  |  | 		module, | 
					
						
							| 
									
										
										
										
											2020-09-15 17:46:28 +08:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			moduleGraph, | 
					
						
							|  |  |  | 			runtimeTemplate, | 
					
						
							|  |  |  | 			runtimeRequirements, | 
					
						
							|  |  |  | 			runtime, | 
					
						
							|  |  |  | 			concatenationScope | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | 	) { | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 		/** @type {JsonValue | undefined} */ | 
					
						
							| 
									
										
										
										
											2021-07-06 16:14:22 +08:00
										 |  |  | 		const data = | 
					
						
							|  |  |  | 			module.buildInfo && | 
					
						
							|  |  |  | 			module.buildInfo.jsonData && | 
					
						
							|  |  |  | 			module.buildInfo.jsonData.get(); | 
					
						
							| 
									
										
										
										
											2018-06-26 00:41:29 +08:00
										 |  |  | 		if (data === undefined) { | 
					
						
							|  |  |  | 			return new RawSource( | 
					
						
							|  |  |  | 				runtimeTemplate.missingModuleStatement({ | 
					
						
							|  |  |  | 					request: module.rawRequest | 
					
						
							|  |  |  | 				}) | 
					
						
							|  |  |  | 			); | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 		const exportsInfo = moduleGraph.getExportsInfo(module); | 
					
						
							| 
									
										
										
										
											2025-04-04 21:38:51 +08:00
										 |  |  | 		/** @type {JsonValue} */ | 
					
						
							| 
									
										
										
										
											2024-07-31 04:09:42 +08:00
										 |  |  | 		const finalJson = | 
					
						
							| 
									
										
										
										
											2019-11-05 04:05:17 +08:00
										 |  |  | 			typeof data === "object" && | 
					
						
							|  |  |  | 			data && | 
					
						
							| 
									
										
										
										
											2020-07-28 00:09:48 +08:00
										 |  |  | 			exportsInfo.otherExportsInfo.getUsed(runtime) === UsageState.Unused | 
					
						
							|  |  |  | 				? createObjectForExportsInfo(data, exportsInfo, runtime) | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 				: data; | 
					
						
							| 
									
										
										
										
											2019-07-02 17:17:52 +08:00
										 |  |  | 		// Use JSON because JSON.parse() is much faster than JavaScript evaluation
 | 
					
						
							| 
									
										
										
										
											2023-05-25 06:09:00 +08:00
										 |  |  | 		const jsonStr = /** @type {string} */ (stringifySafe(finalJson)); | 
					
						
							| 
									
										
										
										
											2019-10-31 06:24:13 +08:00
										 |  |  | 		const jsonExpr = | 
					
						
							| 
									
										
										
										
											2025-03-13 22:24:10 +08:00
										 |  |  | 			this.options.JSONParse && | 
					
						
							|  |  |  | 			jsonStr.length > 20 && | 
					
						
							|  |  |  | 			typeof finalJson === "object" | 
					
						
							| 
									
										
										
										
											2023-08-26 17:57:23 +08:00
										 |  |  | 				? `/*#__PURE__*/JSON.parse('${jsonStr.replace(/[\\']/g, "\\$&")}')` | 
					
						
							| 
									
										
										
										
											2025-02-15 04:57:39 +08:00
										 |  |  | 				: jsonStr.replace(/"__proto__":/g, '["__proto__"]:'); | 
					
						
							| 
									
										
										
										
											2023-04-29 02:03:16 +08:00
										 |  |  | 		/** @type {string} */ | 
					
						
							| 
									
										
										
										
											2020-09-15 17:46:28 +08:00
										 |  |  | 		let content; | 
					
						
							|  |  |  | 		if (concatenationScope) { | 
					
						
							| 
									
										
										
										
											2025-09-10 03:11:56 +08:00
										 |  |  | 			content = `${runtimeTemplate.renderConst()} ${ | 
					
						
							| 
									
										
										
										
											2020-09-15 17:46:28 +08:00
										 |  |  | 				ConcatenationScope.NAMESPACE_OBJECT_EXPORT | 
					
						
							|  |  |  | 			} = ${jsonExpr};`;
 | 
					
						
							|  |  |  | 			concatenationScope.registerNamespaceExport( | 
					
						
							|  |  |  | 				ConcatenationScope.NAMESPACE_OBJECT_EXPORT | 
					
						
							|  |  |  | 			); | 
					
						
							|  |  |  | 		} else { | 
					
						
							|  |  |  | 			runtimeRequirements.add(RuntimeGlobals.module); | 
					
						
							|  |  |  | 			content = `${module.moduleArgument}.exports = ${jsonExpr};`; | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		return new RawSource(content); | 
					
						
							| 
									
										
										
										
											2018-01-24 06:09:26 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2025-04-05 22:37:35 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * @param {Error} error the error | 
					
						
							|  |  |  | 	 * @param {NormalModule} module module for which the code should be generated | 
					
						
							|  |  |  | 	 * @param {GenerateContext} generateContext context for generate | 
					
						
							|  |  |  | 	 * @returns {Source | null} generated code | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	generateError(error, module, generateContext) { | 
					
						
							|  |  |  | 		return new RawSource(`throw new Error(${JSON.stringify(error.message)});`); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2018-01-24 06:09:26 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = JsonGenerator; |