{"size": 540, "ext": "js", "max_stars_repo_path": "test/configCases/trusted-types/web-worker/importingWorker.js", "max_stars_repo_name": "fourstash/webpack", "max_stars_repo_stars_event_min_datetime": "2015-01-01T02:28:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T23:46:51.000Z", "max_issues_repo_path": "test/configCases/trusted-types/web-worker/importingWorker.js", "max_issues_repo_name": "fourstash/webpack", "max_issues_repo_issues_event_min_datetime": "2015-01-01T21:00:12.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T23:59:55.000Z", "max_forks_repo_path": "test/configCases/trusted-types/web-worker/importingWorker.js", "max_forks_repo_name": "fourstash/webpack", "max_forks_repo_forks_event_min_datetime": "2015-01-01T02:28:31.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T19:47:10.000Z"}
{"max_stars_count": 66493, "max_issues_count": 14141, "max_forks_count": 11585, "avg_line_length": 20.7692307692, "max_line_length": 97, "alphanum_fraction": 0.6740740741}
// Mock Trusted Types to test if the import (rewritten as importScripts) goes through TT as well.

let policyName = "none";
let scriptURL = "none";

self.trustedTypes = {
	createPolicy: (name, rules) => {
		policyName = name;
		const createScriptURL = rules.createScriptURL;
		rules.createScriptURL = url => {
			scriptURL = url;
			return createScriptURL(url);
		};
		return rules;
	}
};

onmessage = async event => {
	const { upper } = await import("./module");
	postMessage({
		data: upper(event.data),
		policyName,
		scriptURL
	});
};
