{
	"name": "Scribunto",
	"author": [
		"Victor Vasiliev",
		"Tim Starling",
		"Brad Jorsch"
	],
	"url": "https://www.mediawiki.org/wiki/Extension:Scribunto",
	"descriptionmsg": "scribunto-desc",
	"license-name": "GPL-2.0-or-later AND MIT",
	"type": "parserhook",
	"requires": {
		"MediaWiki": ">= 1.47.0"
	},
	"APIModules": {
		"scribunto-console": {
			"class": "MediaWiki\\Extension\\Scribunto\\ApiScribuntoConsole",
			"services": [
				"ObjectCacheFactory",
				"ParserFactory",
				"Scribunto.EngineFactory"
			]
		}
	},
	"ContentHandlers": {
		"Scribunto": {
			"class": "MediaWiki\\Extension\\Scribunto\\ScribuntoContentHandler",
			"services": [
				"ParserFactory",
				"Scribunto.EngineFactory",
				"TitleFactory",
				"TrackingCategories",
				"CodeHighlighter"
			]
		}
	},
	"TrackingCategories": [
		"scribunto-common-error-category",
		"scribunto-module-with-errors-category"
	],
	"MessagesDirs": {
		"Scribunto": [
			"i18n",
			"i18n/api"
		]
	},
	"ExtensionMessagesFiles": {
		"ScribuntoMagic": "Scribunto.magic.php",
		"ScribuntoNamespaces": "Scribunto.namespaces.php"
	},
	"AutoloadNamespaces": {
		"MediaWiki\\Extension\\Scribunto\\": "includes/"
	},
	"TestAutoloadNamespaces": {
		"MediaWiki\\Extension\\Scribunto\\Tests\\": "tests/phpunit/"
	},
	"ServiceWiringFiles": [
		"includes/ServiceWiring.php"
	],
	"ResourceModules": {
		"ext.scribunto.errors": {
			"scripts": "ext.scribunto.errors.js",
			"styles": "ext.scribunto.errors.css",
			"dependencies": [
				"oojs-ui-widgets"
			],
			"messages": [
				"scribunto-parser-dialog-title"
			]
		},
		"ext.scribunto.logs": {
			"styles": "ext.scribunto.logs.css"
		},
		"ext.scribunto.edit": {
			"scripts": "ext.scribunto.edit.js",
			"styles": "ext.scribunto.edit.less",
			"dependencies": [
				"mediawiki.api",
				"jquery.spinner"
			],
			"messages": [
				"scribunto-console-title",
				"scribunto-console-intro",
				"scribunto-console-clear",
				"scribunto-console-cleared",
				"scribunto-console-cleared-session-lost"
			]
		}
	},
	"ResourceFileModulePaths": {
		"localBasePath": "modules",
		"remoteExtPath": "Scribunto/modules"
	},
	"Hooks": {
		"SoftwareInfo": "main",
		"ParserFirstCallInit": "main",
		"ParserLimitReportPrepare": "main",
		"ParserLimitReportFormat": "main",
		"ParserClearState": "main",
		"CodeEditorGetPageLanguage": "codeeditor",
		"CodeMirrorGetMode": "codemirror",
		"EditPage::showStandardInputs:options": "main",
		"EditPage::showReadOnlyForm:initial": "main",
		"EditPageBeforeEditButtons": "main",
		"EditFilterMergedContent": "main",
		"ArticleViewHeader": "main",
		"ContentHandlerDefaultModelFor": "main",
		"ProduntoPlatformVersions": "produnto"
	},
	"HookHandlers": {
		"main": {
			"class": "MediaWiki\\Extension\\Scribunto\\Hooks",
			"services": [
				"MainConfig",
				"ContentHandlerFactory",
				"ObjectCacheFactory",
				"StatsFactory",
				"Scribunto.EngineFactory"
			]
		},
		"codeeditor": {
			"class": "MediaWiki\\Extension\\Scribunto\\CodeEditorHooks",
			"services": [
				"MainConfig",
				"Scribunto.EngineFactory"
			]
		},
		"codemirror": {
			"class": "MediaWiki\\Extension\\Scribunto\\CodeMirrorHooks",
			"services": [
				"MainConfig",
				"Scribunto.EngineFactory"
			]
		},
		"produnto": {
			"class": "MediaWiki\\Extension\\Scribunto\\ProduntoHooks",
			"services": [
				"Scribunto.EngineFactory"
			]
		}
	},
	"namespaces": [
		{
			"id": 828,
			"constant": "NS_MODULE",
			"name": "Module",
			"subpages": true
		},
		{
			"id": 829,
			"constant": "NS_MODULE_TALK",
			"name": "Module_talk",
			"subpages": true
		}
	],
	"callback": "MediaWiki\\Extension\\Scribunto\\Hooks::onRegistration",
	"config": {
		"ScribuntoDefaultEngine": {
			"description": "The name of the default script engine",
			"value": "luaautodetect"
		},
		"ScribuntoEngineConf": {
			"description": [
				"Configuration for each script engine. Parameters:",
				" * profilerPeriod - The profiler sample period, or false to disable the profiler",
				" * allowEnvFuncs - Set this to true to allow setfenv() and getfenv() in user code. Native on Lua 5.1; on Lua 5.2+, where the language removed them, the LuaSandbox engine reimplements both on top of the function's _ENV upvalue, with two narrow differences from native Lua 5.1: setfenv(0, ...) and setfenv() on a function with no global references both raise an error instead of silently succeeding",
				" * maxLangCacheSize - The maximum number of languages about which data can be requested. The cost is about 1.5MB of memory usage per language on default installations (during recache), but if recaching is disabled with `$wgLocalisationCacheConf['manualRecache'] = false;` then memory usage is perhaps 10x smaller",
				" * errorFile - A filename to act as the destination for stderr from the Lua binary. This may provide useful error information if Lua fails to run. Set this to null to discard stderr output",
				" * luaPath - The location of the Lua binary, or null to use the bundled binary",
				" * useBubblewrap - Set this to true to run the Lua binary inside a bubblewrap (bwrap) sandbox, without network, environment or access to files outside /usr and Scribunto's includes directory. Linux only, requires bwrap and unprivileged user namespaces",
				" * shareInvocationEnv - Set this to false to give each module invocation its own separate global environment. If true, all module invocations share the same global environment, which improves performance but may cause conflicts"
			],
			"value": {
				"luasandbox": {
					"class": "MediaWiki\\Extension\\Scribunto\\Engines\\LuaSandbox\\LuaSandboxEngine",
					"memoryLimit": 52428800,
					"cpuLimit": 7,
					"profilerPeriod": 0.02,
					"allowEnvFuncs": false,
					"maxLangCacheSize": 30,
					"shareInvocationEnv": false
				},
				"luastandalone": {
					"class": "MediaWiki\\Extension\\Scribunto\\Engines\\LuaStandalone\\LuaStandaloneEngine",
					"errorFile": null,
					"luaPath": null,
					"useBubblewrap": false,
					"memoryLimit": 52428800,
					"cpuLimit": 7,
					"allowEnvFuncs": false,
					"maxLangCacheSize": 30,
					"shareInvocationEnv": false
				},
				"luaautodetect": {
					"implementation": "autodetect"
				}
			},
			"merge_strategy": "array_plus_2d"
		},
		"ScribuntoUseCodeEditor": {
			"description": "Set to true to enable the CodeEditor extension integration",
			"value": false
		},
		"ScribuntoUseCodeMirror": {
			"description": "Set to true to enable the CodeMirror extension integration",
			"value": true
		},
		"ScribuntoGatherFunctionStats": {
			"description": "Set to true to enable gathering and reporting of performance data for slow function invocations.",
			"value": false
		},
		"ScribuntoSlowFunctionThreshold": {
			"description": "If $wgScribuntoGatherFunctionStats is true, this variable specifies the percentile threshold for slow function invocations. Should be a value between 0 and 1 (exclusive).",
			"value": 0.9
		},
		"ScribuntoLuaExtraTitleAttributes": {
			"description": "Extra attributes added to Lua mw.title objects. Keys are the name of the attributes, and values are the ObjectFactory specification for resolving the attribute.",
			"value": {}
		}
	},
	"attributes": {
		"CodeMirror": {
			"ParserFunctionNsIds": {
				"invoke": 828
			}
		},
		"TemplateSandbox": {
			"EditNamespaces": [
				828
			]
		},
		"TemplateStyles": {
			"Namespaces": [
				828
			]
		}
	},
	"manifest_version": 2
}
