UNPKG

324 kBSource Map (JSON)View Raw
1{"version":3,"file":"main.js","sources":["/src/urlHelpers.js","/src/source-mapping-url.js","/node_modules/@jsenv/href/src/hrefToScheme/hrefToScheme.js","/node_modules/@jsenv/href/src/hrefToPathname/hrefToPathname.js","/node_modules/@jsenv/href/src/hrefToOrigin/hrefToOrigin.js","/node_modules/@jsenv/href/src/pathnameToDirname/pathnameToDirname.js","/node_modules/@jsenv/href/src/pathnameToExtension/pathnameToExtension.js","/node_modules/@jsenv/bundling/src/generateBabelPluginMapOption/import-meta-commonjs.js","/node_modules/@dmail/helper/src/firstOperationMatching.js","/node_modules/@dmail/helper/src/promiseSequence.js","/node_modules/@dmail/helper/src/fileMakeDirname.js","/node_modules/@dmail/helper/src/fileCopy.js","/node_modules/@dmail/helper/src/fileRead.js","/node_modules/@dmail/helper/src/fileStat.js","/node_modules/@dmail/helper/src/fileLStat.js","/node_modules/@dmail/helper/src/fileWrite.js","/node_modules/@dmail/helper/src/folderRead.js","/node_modules/@dmail/cancellation/src/arrayHelper.js","/node_modules/@dmail/cancellation/src/cancellation.js","/node_modules/@dmail/cancellation/src/createOperation.js","/node_modules/@dmail/cancellation/src/extra.js","/node_modules/@dmail/server/src/observable/observable.js","/node_modules/@dmail/server/src/server/start-server.js","/node_modules/@dmail/server/src/ressource/to-pathname.js","/node_modules/@dmail/server/src/ressource/to-extension.js","/node_modules/@dmail/server/src/ressource/to-content-type.js","/node_modules/@dmail/server/src/file-service/content-type-map.js","/node_modules/@jsenv/import-map/src/assertImportMap.js","/node_modules/@jsenv/import-map/src/hasScheme.js","/node_modules/@jsenv/import-map/src/resolveUrl/resolveUrl.js","/node_modules/@jsenv/import-map/src/tryUrlResolution.js","/node_modules/@jsenv/import-map/src/resolveSpecifier/resolveSpecifier.js","/node_modules/@jsenv/import-map/src/applyImportMap/applyImportMap.js","/node_modules/@jsenv/import-map/src/composeTwoImportMaps/composeTwoImportMaps.js","/node_modules/@jsenv/import-map/src/sortImportMap/sortImportMap.js","/node_modules/@jsenv/import-map/src/normalizeImportMap/normalizeImportMap.js","/node_modules/@jsenv/import-map/src/resolveImport/resolveImport.js","/node_modules/@jsenv/node-module-import-map/src/urlHelpers.js","/node_modules/@jsenv/node-module-import-map/src/generateImportMapForPackage/readPackageFile.js","/node_modules/@jsenv/node-module-import-map/src/generateImportMapForPackage/resolveNodeModule.js","/node_modules/@jsenv/node-module-import-map/src/generateImportMapForPackage/resolvePackageMain.js","/node_modules/@jsenv/node-module-import-map/src/generateImportMapForPackage/visitPackageImports.js","/node_modules/@jsenv/node-module-import-map/src/generateImportMapForPackage/visitPackageExports.js","/node_modules/@jsenv/node-module-import-map/src/generateImportMapForPackage/generateImportMapForPackage.js","/node_modules/@jsenv/logger/src/createLogger/LOG_LEVELS.js","/node_modules/@jsenv/logger/src/createLogger/createLogger.js","/src/jsenvBundlingDirectoryUrl.js","/src/generateBabelPluginMapOption/createImportMetaUrlNamedImportBabelPlugin.js","/src/generateBabelPluginMapOption/generateBabelPluginMapOption.js","/src/generateBundle/createJsenvRollupPlugin/fetchUrl.js","/src/generateBundle/createJsenvRollupPlugin/validateResponseStatusIsOk.js","/src/generateBundle/createJsenvRollupPlugin/fetchSourcemap.js","/src/generateBundle/createJsenvRollupPlugin/createJsenvRollupPlugin.js","/src/bundleToCompilationResult/bundleToCompilationResult.js","/node_modules/@jsenv/core/src/babelPluginCompatMap/babelPluginCompatMap.js","/node_modules/@jsenv/core/src/urlHelpers.js","/node_modules/@jsenv/core/src/jsenvCoreDirectoryUrl/jsenvCoreDirectoryUrl.js","/node_modules/@jsenv/core/src/babelHelperMap/babelHelperMap.js","/node_modules/@jsenv/core/src/cleanCompileCacheDirectoryIfObsolete/removeDirectory.js","/node_modules/@jsenv/core/src/semantic-versioning/valueToVersion.js","/node_modules/@jsenv/core/src/semantic-versioning/versionCompare.js","/node_modules/@jsenv/core/src/semantic-versioning/versionIsBelow.js","/node_modules/@jsenv/core/src/semantic-versioning/findHighestVersion.js","/node_modules/@jsenv/core/src/computeBabelPluginMapForPlatform/computeBabelPluginMapForPlatform.js","/node_modules/@jsenv/core/src/GROUP_ID.js","/node_modules/@jsenv/core/src/jsenvPluginCompatMap/jsenvPluginCompatMap.js","/node_modules/@jsenv/core/src/computeJsenvPluginMapForPlatform/computeJsenvPluginMapForPlatform.js","/node_modules/@jsenv/core/src/generateBabelHelper/generateBabelHelper.js","/node_modules/@jsenv/core/src/generateGroupMap/groupHaveSameRequirements.js","/node_modules/@jsenv/core/src/generateGroupMap/generatePlatformGroupArray.js","/node_modules/@jsenv/core/src/generateGroupMap/composePlatformCompatMap.js","/node_modules/@jsenv/core/src/generateGroupMap/composeGroupArray.js","/node_modules/@jsenv/core/src/generateGroupMap/generateAllPlatformGroupArray.js","/node_modules/@jsenv/core/src/generateGroupMap/platformCompatMapToScore.js","/node_modules/@jsenv/core/src/generateGroupMap/generateGroupMap.js","/node_modules/@jsenv/core/src/getOrGenerateCompiledFile/getOrGenerateCompiledFile.js","/node_modules/@jsenv/core/src/transformJs/babel-plugin-transform-modules-systemjs/index.js","/node_modules/@jsenv/core/src/transformJs/ansiToHTML.js","/node_modules/@jsenv/core/src/transformJs/ensureRegeneratorRuntimeImportBabelPlugin.js","/node_modules/@jsenv/core/src/transformJs/ensureGlobalThisImportBabelPlugin.js","/node_modules/@jsenv/core/src/transformJs/transformBabelHelperToImportBabelPlugin.js","/node_modules/@jsenv/core/src/transformJs/jsenvTransform.js","/src/generateBundle/filesystem-assertions.js","/src/generateBundle/generateBundleUsingRollup.js","/src/generateBundle/bundleOptionsToRollupParseOptions.js","/src/generateBundle/bundleOptionsToRollupGenerateOptions.js","/src/generateBundle/bundleWithoutBalancing.js","/src/generateBundle/bundleWithBalancing.js","/src/generateBundle/bundleBalancer.js","/src/generateBundle/removeDirectory.js","/src/generateBundle/isBareSpecifierForNativeNodeModule.js","/src/generateBundle/generateBundle.js","/src/generateCommonJsBundle/generateCommonJsBundle.js","/src/generateCommonJsBundleForNode/generateCommonJsBundleForNode.js","/src/generateGlobalBundle/generateGlobalBundle.js","/src/generateSystemJsBundle/generateSystemJsBundle.js"],"sourcesContent":["import { pathToFileURL, fileURLToPath } from \"url\"\nimport { resolve } from \"path\"\n\nexport const resolvePath = (specifier, basePath) => {\n return resolve(specifier, basePath)\n}\n\nexport const pathToDirectoryUrl = (path) => {\n const directoryUrl = path.startsWith(\"file://\") ? path : String(pathToFileURL(path))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const pathToFileUrl = (path) => {\n return String(pathToFileURL(path))\n}\n\nexport const fileUrlToPath = (fileUrl) => {\n return fileURLToPath(fileUrl)\n}\n\nexport const resolveDirectoryUrl = (specifier, baseUrl) => {\n const directoryUrl = String(new URL(specifier, baseUrl))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const hasScheme = (string) => {\n return /^[a-zA-Z]{2,}:/.test(string)\n}\n\nexport const fileUrlToRelativePath = (fileUrl, baseUrl) => {\n if (fileUrl.startsWith(baseUrl)) {\n return `./${fileUrl.slice(baseUrl.length)}`\n }\n return fileUrl\n}\n\nexport const resolveFileUrl = (specifier, baseUrl) => {\n return String(new URL(specifier, baseUrl))\n}\n","export const writeSourceMappingURL = (source, location) => `${source}\n${\"//#\"} sourceMappingURL=${location}`\n\nexport const updateSourceMappingURL = (source, callback) => {\n const sourceMappingUrlRegExp = /\\/\\/# ?sourceMappingURL=([^\\s'\"]+)/g\n let lastSourceMappingUrl\n let matchSourceMappingUrl\n while ((matchSourceMappingUrl = sourceMappingUrlRegExp.exec(source))) {\n lastSourceMappingUrl = matchSourceMappingUrl\n }\n if (lastSourceMappingUrl) {\n const index = lastSourceMappingUrl.index\n const before = source.slice(0, index)\n const after = source.slice(index)\n const mappedAfter = after.replace(sourceMappingUrlRegExp, (match, firstGroup) => {\n return `${\"//#\"} sourceMappingURL=${callback(firstGroup)}`\n })\n return `${before}${mappedAfter}`\n }\n return source\n}\n\nexport const readSourceMappingURL = (source) => {\n let sourceMappingURL\n updateSourceMappingURL(source, (value) => {\n sourceMappingURL = value\n })\n return sourceMappingURL\n}\n\nexport const parseSourceMappingURL = (source) => {\n const sourceMappingURL = readSourceMappingURL(source)\n\n if (!sourceMappingURL) return null\n\n const base64Prefix = \"data:application/json;charset=utf-8;base64,\"\n if (sourceMappingURL.startsWith(base64Prefix)) {\n const mapBase64Source = sourceMappingURL.slice(base64Prefix.length)\n const sourcemapString = new Buffer(mapBase64Source, \"base64\").toString(\"utf8\")\n return { sourcemapString }\n }\n\n return {\n sourcemapURL: sourceMappingURL,\n }\n}\n\nexport const writeOrUpdateSourceMappingURL = (source, location) => {\n if (readSourceMappingURL(source)) {\n return updateSourceMappingURL(source, location)\n }\n return writeSourceMappingURL(source, location)\n}\n","export const hrefToScheme = (href) => {\n const colonIndex = href.indexOf(\":\")\n if (colonIndex === -1) return \"\"\n return href.slice(0, colonIndex)\n}\n","import { hrefToScheme } from \"../hrefToScheme/hrefToScheme.js\"\n\nexport const hrefToPathname = (href) => {\n return ressourceToPathname(hrefToRessource(href))\n}\n\nconst hrefToRessource = (href) => {\n const scheme = hrefToScheme(href)\n\n if (scheme === \"file\") {\n return href.slice(\"file://\".length)\n }\n\n if (scheme === \"https\" || scheme === \"http\") {\n // remove origin\n const afterProtocol = href.slice(scheme.length + \"://\".length)\n const pathnameSlashIndex = afterProtocol.indexOf(\"/\", \"://\".length)\n return afterProtocol.slice(pathnameSlashIndex)\n }\n\n return href.slice(scheme.length + 1)\n}\n\nconst ressourceToPathname = (ressource) => {\n const searchSeparatorIndex = ressource.indexOf(\"?\")\n return searchSeparatorIndex === -1 ? ressource : ressource.slice(0, searchSeparatorIndex)\n}\n","import { hrefToScheme } from \"../hrefToScheme/hrefToScheme.js\"\n\nexport const hrefToOrigin = (href) => {\n const scheme = hrefToScheme(href)\n\n if (scheme === \"file\") {\n return \"file://\"\n }\n\n if (scheme === \"http\" || scheme === \"https\") {\n const secondProtocolSlashIndex = scheme.length + \"://\".length\n const pathnameSlashIndex = href.indexOf(\"/\", secondProtocolSlashIndex)\n\n if (pathnameSlashIndex === -1) return href\n return href.slice(0, pathnameSlashIndex)\n }\n\n return href.slice(0, scheme.length + 1)\n}\n","export const pathnameToDirname = (pathname) => {\n const slashLastIndex = pathname.lastIndexOf(\"/\")\n if (slashLastIndex === -1) return \"\"\n\n return pathname.slice(0, slashLastIndex)\n}\n","export const pathnameToExtension = (pathname) => {\n const slashLastIndex = pathname.lastIndexOf(\"/\")\n if (slashLastIndex !== -1) {\n pathname = pathname.slice(slashLastIndex + 1)\n }\n\n const dotLastIndex = pathname.lastIndexOf(\".\")\n if (dotLastIndex === -1) return \"\"\n // if (dotLastIndex === pathname.length - 1) return \"\"\n return pathname.slice(dotLastIndex)\n}\n","// eslint-disable-next-line import/no-unresolved\nimport importMap from \"/importMap.json\"\nimport { normalizeImportMap } from \"@jsenv/import-map/src/normalizeImportMap/normalizeImportMap.js\"\nimport { resolveImport } from \"@jsenv/import-map/src/resolveImport/resolveImport.js\"\n\nconst nodeRequire = require\nexport { nodeRequire as require }\n\nconst filenameContainsBackSlashes = __filename.indexOf(\"\\\\\") > -1\n\nexport const url = filenameContainsBackSlashes\n ? `file://${__filename.replace(/\\\\/g, \"/\")}`\n : `file://${__filename}`\n\nexport const resolve = (specifier) => {\n return resolveImport({\n specifier,\n importer: url,\n importMap: memoizedGetImportMap(),\n defaultExtension: false,\n })\n}\n\n// better for perf and helps rollup to tree shake this out\n// when import.meta.resolve is not used\nlet memoizedImportMap\nconst memoizedGetImportMap = () => {\n if (memoizedImportMap) return memoizedImportMap\n memoizedImportMap = normalizeImportMap(importMap, url)\n return memoizedImportMap\n}\n","// certainly needs to be moved to @dmail/cancellation\n\nexport const firstOperationMatching = ({ array, start, predicate }) => {\n if (typeof array !== \"object\") throw new TypeError(createArrayErrorMessage({ array }))\n if (typeof start !== \"function\") throw new TypeError(createStartErrorMessage({ start }))\n if (typeof predicate !== \"function\")\n throw new TypeError(createPredicateErrorMessage({ predicate }))\n\n return new Promise((resolve, reject) => {\n const visit = (index) => {\n if (index >= array.length) {\n return resolve()\n }\n const input = array[index]\n const returnValue = start(input)\n return Promise.resolve(returnValue).then((output) => {\n if (predicate(output)) {\n return resolve(output)\n }\n return visit(index + 1)\n }, reject)\n }\n\n visit(0)\n })\n}\n\nconst createArrayErrorMessage = ({ array }) => `array must be an object.\narray: ${array}`\n\nconst createStartErrorMessage = ({ start }) => `start must be a function.\nstart: ${start}`\n\nconst createPredicateErrorMessage = ({ predicate }) => `predicate must be a function.\npredicate: ${predicate}`\n","export const promiseSequence = async (callbackArray) => {\n const values = []\n const visit = async (index) => {\n if (index === callbackArray.length) return\n const callback = callbackArray[index]\n const value = await callback()\n values.push(value)\n await visit(index + 1)\n }\n await visit(0)\n return values\n}\n","import { mkdir, lstat } from \"fs\"\nimport { promiseSequence } from \"./promiseSequence.js\"\n\n// nodejs 10.12.0 https://nodejs.org/api/fs.html#fs_fs_mkdir_path_options_callback\n// export const ensureFolderLeadingTo = (file) => {\n// return new Promise((resolve, reject) => {\n// fs.mkdir(path.dirname(file), { resurcive: true }, (error) => {\n// if (error) {\n// if (error.code === \"EEXIST\") {\n// resolve()\n// return\n// }\n// reject(error)\n// return\n// }\n// resolve()\n// })\n// })\n// }\n\nexport const fileMakeDirname = (file) => {\n const fileNormalized = normalizeSeparation(file)\n // remove first / in case path starts with / (linux)\n // because it would create a \"\" entry in folders array below\n // tryig to create a folder at \"\"\n const fileStartsWithSlash = fileNormalized[0] === \"/\"\n const pathname = fileStartsWithSlash ? fileNormalized.slice(1) : fileNormalized\n const folders = pathname.split(\"/\")\n folders.pop()\n\n return promiseSequence(\n folders.map((_, index) => {\n return () => {\n const folder = folders.slice(0, index + 1).join(\"/\")\n return folderMake(`${fileStartsWithSlash ? \"/\" : \"\"}${folder}`)\n }\n }),\n )\n}\n\nconst normalizeSeparation = (file) => file.replace(/\\\\/g, \"/\")\n\nconst folderMake = (folder) =>\n new Promise((resolve, reject) => {\n mkdir(folder, async (error) => {\n if (error) {\n // au cas ou deux script essayent de crée un dossier peu importe qui y arrive c'est ok\n if (error.code === \"EEXIST\") {\n const stat = await fileLastStat(folder)\n if (stat.isDirectory()) {\n resolve()\n } else {\n reject({ status: 500, reason: \"expect a directory\" })\n }\n } else {\n reject({ status: 500, reason: error.code })\n }\n } else {\n resolve()\n }\n })\n })\n\nconst fileLastStat = (path) =>\n new Promise((resolve, reject) => {\n lstat(path, (error, lstat) => {\n if (error) {\n reject({ status: 500, reason: error.code })\n } else {\n resolve(lstat)\n }\n })\n })\n","import { promisify } from \"util\"\nimport { copyFile } from \"fs\"\nimport { fileMakeDirname } from \"./fileMakeDirname.js\"\n\nconst copyFilePromisified = promisify(copyFile)\n\nexport const fileCopy = async (source, destination) => {\n await fileMakeDirname(destination)\n return copyFilePromisified(source, destination)\n}\n","import { promisify } from \"util\"\nimport { readFile } from \"fs\"\n\nconst readFilePromisified = promisify(readFile)\n\nexport const fileRead = async (file) => {\n const buffer = await readFilePromisified(file)\n return buffer.toString()\n}\n","import { promisify } from \"util\"\nimport { stat } from \"fs\"\n\nconst statPromisified = promisify(stat)\n\nexport const fileStat = async (file) => {\n const stat = await statPromisified(file)\n return stat\n}\n","import { promisify } from \"util\"\nimport { lstat } from \"fs\"\n\nconst lstatPromisified = promisify(lstat)\n\nexport const fileLStat = async (file) => {\n const lstat = await lstatPromisified(file)\n return lstat\n}\n","import { promisify } from \"util\"\nimport { writeFile } from \"fs\"\nimport { fileMakeDirname } from \"./fileMakeDirname.js\"\n\nconst writeFilePromisified = promisify(writeFile)\n\nexport const fileWrite = async (file, content) => {\n await fileMakeDirname(file)\n return writeFilePromisified(file, content)\n}\n","import { promisify } from \"util\"\nimport { readdir } from \"fs\"\n\nconst readdirPromisified = promisify(readdir)\n\nexport const folderRead = async (folder) => {\n const ressources = await readdirPromisified(folder)\n return ressources\n}\n","// TODO: externalize this into '@dmail/helper'\n// import { arrayWithout } from '@dmail/helper'\n\nexport const arrayWithout = (array, item) => {\n const arrayWithoutItem = []\n let i = 0\n while (i < array.length) {\n const value = array[i]\n i++\n if (value === item) {\n continue\n }\n arrayWithoutItem.push(value)\n }\n return arrayWithoutItem\n}\n","// https://github.com/tc39/proposal-cancellation/tree/master/stage0\nimport { arrayWithout } from \"./arrayHelper.js\"\n\nexport const createCancelError = (reason) => {\n const cancelError = new Error(`canceled because ${reason}`)\n cancelError.name = \"CANCEL_ERROR\"\n cancelError.reason = reason\n return cancelError\n}\n\nexport const isCancelError = (value) => {\n return value && typeof value === \"object\" && value.name === \"CANCEL_ERROR\"\n}\n\nexport const errorToCancelReason = (error) => {\n if (!isCancelError(error)) return \"\"\n return error.reason\n}\n\nexport const createCancellationSource = () => {\n let requested = false\n let cancelError\n let registrationArray = []\n const cancel = (reason) => {\n if (requested) return\n requested = true\n cancelError = createCancelError(reason)\n\n const registrationArrayCopy = registrationArray.slice()\n registrationArray.length = 0\n registrationArrayCopy.forEach((registration) => {\n registration.callback(cancelError)\n // const removedDuringCall = registrationArray.indexOf(registration) === -1\n })\n }\n\n const register = (callback) => {\n if (typeof callback !== \"function\") {\n throw new Error(`callback must be a function, got ${callback}`)\n }\n\n const existingRegistration = registrationArray.find((registration) => {\n return registration.callback === callback\n })\n // don't register twice\n if (existingRegistration) {\n return existingRegistration\n }\n\n const registration = {\n callback,\n unregister: () => {\n registrationArray = arrayWithout(registrationArray, registration)\n },\n }\n registrationArray = [registration, ...registrationArray]\n\n return registration\n }\n\n const throwIfRequested = () => {\n if (requested) {\n throw cancelError\n }\n }\n\n return {\n token: {\n register,\n get cancellationRequested() {\n return requested\n },\n throwIfRequested,\n },\n cancel,\n }\n}\n\nexport const cancellationTokenCompose = (...tokens) => {\n const register = (callback) => {\n if (typeof callback !== \"function\") {\n throw new Error(`callback must be a function, got ${callback}`)\n }\n\n const registrationArray = []\n\n const visit = (i) => {\n const token = tokens[i]\n const registration = token.register(callback)\n registrationArray.push(registration)\n }\n let i = 0\n while (i < tokens.length) {\n visit(i++)\n }\n\n const compositeRegistration = {\n callback,\n unregister: () => {\n registrationArray.forEach((registration) => registration.unregister())\n registrationArray.length = 0\n },\n }\n\n return compositeRegistration\n }\n\n let requested = false\n let cancelError\n const internalRegistration = register((parentCancelError) => {\n requested = true\n cancelError = parentCancelError\n internalRegistration.unregister()\n })\n\n const throwIfRequested = () => {\n if (requested) {\n throw cancelError\n }\n }\n\n return {\n register,\n get cancellationRequested() {\n return requested\n },\n throwIfRequested,\n }\n}\n\nexport const createCancellationToken = () => {\n const register = (callback) => {\n if (typeof callback !== \"function\") {\n throw new Error(`callback must be a function, got ${callback}`)\n }\n\n return {\n callback,\n unregister: () => {},\n }\n }\n\n const throwIfRequested = () => undefined\n\n return {\n register,\n cancellationRequested: false,\n throwIfRequested,\n }\n}\n","import { createCancellationToken } from \"./cancellation.js\"\n\nexport const createOperation = ({\n cancellationToken = createCancellationToken(),\n start,\n ...rest\n}) => {\n ensureExactParameters(rest)\n cancellationToken.throwIfRequested()\n\n const promise = new Promise((resolve) => {\n resolve(start())\n })\n const cancelPromise = new Promise((resolve, reject) => {\n const cancelRegistration = cancellationToken.register((cancelError) => {\n cancelRegistration.unregister()\n reject(cancelError)\n })\n promise.then(cancelRegistration.unregister, () => {})\n })\n const operationPromise = Promise.race([promise, cancelPromise])\n\n return operationPromise\n}\n\nconst ensureExactParameters = (extraParameters) => {\n const extraParamNames = Object.keys(extraParameters)\n if (extraParamNames.length)\n throw new Error(`createOperation expect only cancellationToken, start. Got ${extraParamNames}`)\n}\n","import { isCancelError, createCancellationSource } from \"./cancellation.js\"\n\nexport const catchAsyncFunctionCancellation = (asyncFunction) => {\n return asyncFunction().catch((error) => {\n if (isCancelError(error)) return\n throw error\n })\n}\n\nexport const createProcessInterruptionCancellationToken = () => {\n const SIGINTCancelSource = createCancellationSource()\n process.on(\"SIGINT\", () => SIGINTCancelSource.cancel(\"process interruption\"))\n return SIGINTCancelSource.token\n}\n","if (\"observable\" in Symbol === false) {\n Symbol.observable = Symbol.for(\"observable\")\n}\n\nexport const createObservable = ({ subscribe }) => {\n const observable = {\n [Symbol.observable]: () => observable,\n subscribe,\n }\n return observable\n}\n\nexport const subscribe = (\n observable,\n {\n next = () => {},\n error = (value) => {\n throw value\n },\n complete = () => {},\n },\n) => {\n const { subscribe } = observable[Symbol.observable]()\n const subscription = subscribe({\n next,\n error,\n complete,\n })\n return subscription\n}\n\nexport const isObservable = (value) => {\n if (value === null) return false\n if (value === undefined) return false\n if (typeof value === \"object\") return Symbol.observable in value\n if (typeof value === \"function\") return Symbol.observable in value\n return false\n}\n","/* eslint-disable import/max-dependencies */\nimport { createServer as createNodeServer, STATUS_CODES } from \"http\"\nimport { createServer as createNodeSecureServer, Agent as SecureAgent } from \"https\"\nimport { memoizeOnce } from \"@dmail/helper\"\nimport {\n createCancellationToken,\n createOperation,\n createStoppableOperation,\n} from \"@dmail/cancellation\"\nimport {\n registerProcessInterruptCallback,\n registerUnadvisedProcessCrashCallback,\n registerUngaranteedProcessTeardown,\n} from \"@dmail/process-signals\"\nimport { hrefToOrigin } from \"@jsenv/href\"\nimport { createLogger } from \"@jsenv/logger\"\nimport { trackConnections, trackClients, trackRequestHandlers } from \"../trackers/index.js\"\nimport { nodeRequestToRequest } from \"../request/index.js\"\nimport { populateNodeResponse, composeResponseHeaders, composeResponse } from \"../response/index.js\"\nimport { colorizeResponseStatus } from \"./colorizeResponseStatus.js\"\nimport { originAsString } from \"./originAsString.js\"\nimport { listen, stopListening } from \"./listen.js\"\nimport {\n STOP_REASON_INTERNAL_ERROR,\n STOP_REASON_PROCESS_SIGINT,\n STOP_REASON_PROCESS_BEFORE_EXIT,\n STOP_REASON_PROCESS_HANGUP_OR_DEATH,\n STOP_REASON_PROCESS_DEATH,\n STOP_REASON_PROCESS_EXIT,\n STOP_REASON_NOT_SPECIFIED,\n} from \"./stop-reasons.js\"\nimport * as defaultSignature from \"./signature.js\"\n\nconst killPort = import.meta.require(\"kill-port\")\n\nconst STATUS_TEXT_INTERNAL_ERROR = \"internal error\"\n\nexport const defaultAccessControlAllowedMethods = [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"OPTIONS\"]\nexport const defaultAccessControlAllowedHeaders = [\"x-requested-with\"]\n\nexport const startServer = async ({\n cancellationToken = createCancellationToken(),\n protocol = \"http\",\n ip = \"127.0.0.1\",\n port = 0, // assign a random available port\n forcePort = false,\n // when port is https you must provide { privateKey, certificate } under signature\n signature = defaultSignature,\n stopOnSIGINT = true,\n // auto close the server when the process exits\n stopOnExit = true,\n // auto close when server respond with a 500\n stopOnInternalError = false,\n // auto close the server when an uncaughtException happens\n stopOnCrash = false,\n keepProcessAlive = true,\n requestToResponse = () => null,\n accessControlAllowedOrigins = [],\n accessControlAllowRequestOrigin = false,\n accessControlAllowedMethods = defaultAccessControlAllowedMethods,\n accessControlAllowRequestMethod = false,\n accessControlAllowedHeaders = defaultAccessControlAllowedHeaders,\n accessControlAllowRequestHeaders = false,\n accessControlAllowCredentials = false,\n // by default OPTIONS request can be cache for a long time, it's not going to change soon ?\n // we could put a lot here, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age\n accessControlMaxAge = 600,\n logLevel,\n sendInternalErrorStack = false,\n internalErrorToResponseProperties = (error) => {\n const body = error\n ? JSON.stringify({\n code: error.code || \"UNKNOWN_ERROR\",\n ...(sendInternalErrorStack ? { stack: error.stack } : {}),\n })\n : JSON.stringify({ code: \"VALUE_THROWED\", value: error })\n\n return {\n headers: {\n \"content-type\": \"application/json\",\n \"content-length\": Buffer.byteLength(body),\n },\n body,\n }\n },\n startedCallback = () => {},\n stoppedCallback = () => {},\n} = {}) => {\n if (port === 0 && forcePort) throw new Error(`no need to pass forcePort when port is 0`)\n if (protocol !== \"http\" && protocol !== \"https\")\n throw new Error(`protocol must be http or https, got ${protocol}`)\n // https://github.com/nodejs/node/issues/14900\n if (ip === \"0.0.0.0\" && process.platform === \"win32\")\n throw new Error(`listening ${ip} not available on window`)\n\n const logger = createLogger({ logLevel })\n\n if (forcePort) {\n await createOperation({\n cancellationToken,\n start: () => killPort(port),\n })\n }\n\n const { nodeServer, agent } = getNodeServerAndAgent({ protocol, signature })\n\n // https://nodejs.org/api/net.html#net_server_unref\n if (!keepProcessAlive) {\n nodeServer.unref()\n }\n\n let status = \"starting\"\n\n const { registerCleanupCallback, cleanup } = createTracker()\n\n const connectionTracker = trackConnections(nodeServer)\n // opened connection must be shutdown before the close event is emitted\n registerCleanupCallback(connectionTracker.stop)\n\n const clientTracker = trackClients(nodeServer)\n registerCleanupCallback((reason) => {\n let responseStatus\n if (reason === STOP_REASON_INTERNAL_ERROR) {\n responseStatus = 500\n // reason = 'shutdown because error'\n } else {\n responseStatus = 503\n // reason = 'unavailable because closing'\n }\n clientTracker.stop({ status: responseStatus, reason })\n })\n\n const requestHandlerTracker = trackRequestHandlers(nodeServer)\n // ensure we don't try to handle request while server is closing\n registerCleanupCallback(requestHandlerTracker.stop)\n\n let stoppedResolve\n const stoppedPromise = new Promise((resolve) => {\n stoppedResolve = resolve\n })\n const stop = memoizeOnce(async (reason = STOP_REASON_NOT_SPECIFIED) => {\n status = \"closing\"\n logger.info(`server stopped because ${reason}`)\n\n await cleanup(reason)\n await stopListening(nodeServer)\n status = \"stopped\"\n stoppedCallback({ reason })\n stoppedResolve(reason)\n })\n const startOperation = createStoppableOperation({\n cancellationToken,\n start: () => listen({ cancellationToken, server: nodeServer, port, ip }),\n stop: (_, reason) => stop(reason),\n })\n\n if (stopOnCrash) {\n const unregister = registerUnadvisedProcessCrashCallback((reason) => {\n stop(reason.value)\n })\n registerCleanupCallback(unregister)\n }\n\n if (stopOnInternalError) {\n const unregister = requestHandlerTracker.add((nodeRequest, nodeResponse) => {\n if (\n nodeResponse.statusCode === 500 &&\n nodeResponse.statusMessage === STATUS_TEXT_INTERNAL_ERROR\n ) {\n stop(STOP_REASON_INTERNAL_ERROR)\n }\n })\n registerCleanupCallback(unregister)\n }\n\n if (stopOnExit) {\n const unregister = registerUngaranteedProcessTeardown((tearDownReason) => {\n stop(\n {\n beforeExit: STOP_REASON_PROCESS_BEFORE_EXIT,\n hangupOrDeath: STOP_REASON_PROCESS_HANGUP_OR_DEATH,\n death: STOP_REASON_PROCESS_DEATH,\n exit: STOP_REASON_PROCESS_EXIT,\n }[tearDownReason],\n )\n })\n registerCleanupCallback(unregister)\n }\n\n if (stopOnSIGINT) {\n const unregister = registerProcessInterruptCallback(() => {\n stop(STOP_REASON_PROCESS_SIGINT)\n })\n registerCleanupCallback(unregister)\n }\n\n port = await startOperation\n status = \"opened\"\n const origin = originAsString({ protocol, ip, port })\n logger.info(`server started at ${origin}`)\n startedCallback({ origin })\n\n // nodeServer.on(\"upgrade\", (request, socket, head) => {\n // // when being requested using a websocket\n // // we could also answr to the request ?\n // // socket.end([data][, encoding])\n\n // console.log(\"upgrade\", { head, request })\n // console.log(\"socket\", { connecting: socket.connecting, destroyed: socket.destroyed })\n // })\n\n requestHandlerTracker.add(async (nodeRequest, nodeResponse) => {\n const { request, response, error } = await generateResponseDescription({\n nodeRequest,\n origin,\n })\n\n if (\n request.method !== \"HEAD\" &&\n response.headers[\"content-length\"] > 0 &&\n response.body === \"\"\n ) {\n logger.error(\n createContentLengthMismatchError(\n `content-length header is ${response.headers[\"content-length\"]} but body is empty`,\n ),\n )\n }\n\n logger.info(`${request.method} ${request.origin}${request.ressource}`)\n if (error) {\n logger.error(error)\n }\n logger.info(`${colorizeResponseStatus(response.status)} ${response.statusText}`)\n populateNodeResponse(nodeResponse, response, {\n ignoreBody: request.method === \"HEAD\",\n })\n })\n\n const corsEnabled = accessControlAllowRequestOrigin || accessControlAllowedOrigins.length\n // here we check access control options to throw or warn if we find strange values\n\n const generateResponseDescription = async ({ nodeRequest, origin }) => {\n const request = nodeRequestToRequest(nodeRequest, origin)\n\n nodeRequest.on(\"error\", (error) => {\n logger.error(\"error on\", request.ressource, error)\n })\n\n const responsePropertiesToResponse = ({\n status = 501,\n statusText = statusToStatusText(status),\n headers = {},\n body = \"\",\n bodyEncoding,\n }) => {\n if (corsEnabled) {\n const accessControlHeaders = generateAccessControlHeaders({\n request,\n accessControlAllowedOrigins,\n accessControlAllowRequestOrigin,\n accessControlAllowedMethods,\n accessControlAllowRequestMethod,\n accessControlAllowedHeaders,\n accessControlAllowRequestHeaders,\n accessControlAllowCredentials,\n accessControlMaxAge,\n })\n\n return {\n status,\n statusText,\n headers: composeResponseHeaders(headers, accessControlHeaders),\n body,\n bodyEncoding,\n }\n }\n\n return {\n status,\n statusText,\n headers,\n body,\n bodyEncoding,\n }\n }\n\n try {\n if (corsEnabled && request.method === \"OPTIONS\") {\n return {\n request,\n response: responsePropertiesToResponse({\n status: 200,\n headers: {\n \"content-length\": 0,\n },\n }),\n }\n }\n\n const responseProperties = await requestToResponse(request)\n return {\n request,\n response: responsePropertiesToResponse(responseProperties),\n }\n } catch (error) {\n return {\n request,\n response: composeResponse(\n responsePropertiesToResponse({\n status: 500,\n statusText: STATUS_TEXT_INTERNAL_ERROR,\n headers: {\n // ensure error are not cached\n \"cache-control\": \"no-store\",\n \"content-type\": \"text/plain\",\n },\n }),\n internalErrorToResponseProperties(error),\n ),\n error,\n }\n }\n }\n\n return {\n getStatus: () => status,\n origin,\n nodeServer,\n agent,\n stop,\n stoppedPromise,\n }\n}\n\nconst createTracker = () => {\n const callbackArray = []\n\n const registerCleanupCallback = (callback) => {\n if (typeof callback !== \"function\")\n throw new TypeError(`callback must be a function\ncallback: ${callback}`)\n callbackArray.push(callback)\n }\n\n const cleanup = async (reason) => {\n const localCallbackArray = callbackArray.slice()\n await Promise.all(localCallbackArray.map((callback) => callback(reason)))\n }\n\n return { registerCleanupCallback, cleanup }\n}\n\nconst statusToStatusText = (status) => STATUS_CODES[status] || \"not specified\"\n\nconst getNodeServerAndAgent = ({ protocol, signature }) => {\n if (protocol === \"http\") {\n return {\n nodeServer: createNodeServer(),\n agent: global.Agent,\n }\n }\n\n if (protocol === \"https\") {\n const { privateKey, certificate } = signature\n if (!privateKey || !certificate) {\n throw new Error(`missing signature for https server`)\n }\n\n return {\n nodeServer: createNodeSecureServer({\n key: privateKey,\n cert: certificate,\n }),\n agent: new SecureAgent({\n rejectUnauthorized: false, // allow self signed certificate\n }),\n }\n }\n\n throw new Error(`unsupported protocol ${protocol}`)\n}\n\nconst createContentLengthMismatchError = (message) => {\n const error = new Error(message)\n error.code = \"CONTENT_LENGTH_MISMATCH\"\n error.name = error.code\n return error\n}\n\n// https://www.w3.org/TR/cors/\n// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\nconst generateAccessControlHeaders = ({\n request: { headers },\n accessControlAllowedOrigins,\n accessControlAllowRequestOrigin,\n accessControlAllowedMethods,\n accessControlAllowRequestMethod,\n accessControlAllowedHeaders,\n accessControlAllowRequestHeaders,\n accessControlAllowCredentials,\n // by default OPTIONS request can be cache for a long time, it's not going to change soon ?\n // we could put a lot here, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age\n accessControlMaxAge = 600,\n} = {}) => {\n const vary = []\n\n const allowedOriginArray = [...accessControlAllowedOrigins]\n if (accessControlAllowRequestOrigin) {\n if (\"origin\" in headers && headers.origin !== \"null\") {\n allowedOriginArray.push(headers.origin)\n vary.push(\"origin\")\n } else if (\"referer\" in headers) {\n allowedOriginArray.push(hrefToOrigin(headers.referer))\n vary.push(\"referer\")\n } else {\n allowedOriginArray.push(\"*\")\n }\n }\n\n const allowedMethodArray = [...accessControlAllowedMethods]\n if (accessControlAllowRequestMethod && \"access-control-request-method\" in headers) {\n const requestMethodName = headers[\"access-control-request-method\"]\n if (!allowedMethodArray.includes(requestMethodName)) {\n allowedMethodArray.push(requestMethodName)\n vary.push(\"access-control-request-method\")\n }\n }\n\n const allowedHeaderArray = [...accessControlAllowedHeaders]\n if (accessControlAllowRequestHeaders && \"access-control-request-headers\" in headers) {\n const requestHeaderNameArray = headers[\"access-control-request-headers\"].split(\", \")\n requestHeaderNameArray.forEach((headerName) => {\n const headerNameLowerCase = headerName.toLowerCase()\n if (!allowedHeaderArray.includes(headerNameLowerCase)) {\n allowedHeaderArray.push(headerNameLowerCase)\n if (!vary.includes(\"access-control-request-headers\")) {\n vary.push(\"access-control-request-headers\")\n }\n }\n })\n }\n\n return {\n \"access-control-allow-origin\": allowedOriginArray.join(\", \"),\n \"access-control-allow-methods\": allowedMethodArray.join(\", \"),\n \"access-control-allow-headers\": allowedHeaderArray.join(\", \"),\n ...(accessControlAllowCredentials ? { \"access-control-allow-credentials\": true } : {}),\n \"access-control-max-age\": accessControlMaxAge,\n ...(vary.length ? { vary: vary.join(\", \") } : {}),\n }\n}\n","export const ressourceToPathname = (ressource) => {\n const searchSeparatorIndex = ressource.indexOf(\"?\")\n return searchSeparatorIndex === -1 ? ressource : ressource.slice(0, searchSeparatorIndex)\n}\n","import { extname } from \"path\"\nimport { ressourceToPathname } from \"./to-pathname.js\"\n\nexport const ressourceToExtension = (ressource) => extname(ressourceToPathname(ressource)).slice(1)\n","// https://github.com/jshttp/mime-db/blob/master/src/apache-types.json\n\nimport { ressourceToExtension } from \"./to-extension.js\"\n\nconst contentTypeDefault = \"application/octet-stream\"\n\nexport const ressourceToContentType = (ressource, contentTypeMap) => {\n if (typeof contentTypeMap !== \"object\") {\n throw new TypeError(`contentTypeMap must be an object, got ${contentTypeMap}`)\n }\n\n const extension = ressourceToExtension(ressource)\n\n const availableContentTypes = Object.keys(contentTypeMap)\n const contentTypeForExtension = availableContentTypes.find((contentTypeName) => {\n const contentType = contentTypeMap[contentTypeName]\n return contentType.extensions && contentType.extensions.indexOf(extension) > -1\n })\n\n return contentTypeForExtension || contentTypeDefault\n}\n","export const contentTypeMap = {\n \"application/javascript\": {\n extensions: [\"js\", \"mjs\", \"ts\", \"jsx\"],\n },\n \"application/json\": {\n extensions: [\"json\"],\n },\n \"application/octet-stream\": {},\n \"application/pdf\": {\n extensions: [\"pdf\"],\n },\n \"application/xml\": {\n extensions: [\"xml\"],\n },\n \"application/x-gzip\": {\n extensions: [\"gz\"],\n },\n \"application/wasm\": {\n extensions: [\"wasm\"],\n },\n \"application/zip\": {\n extensions: [\"zip\"],\n },\n \"audio/basic\": {\n extensions: [\"au\", \"snd\"],\n },\n \"audio/mpeg\": {\n extensions: [\"mpga\", \"mp2\", \"mp2a\", \"mp3\", \"m2a\", \"m3a\"],\n },\n \"audio/midi\": {\n extensions: [\"midi\", \"mid\", \"kar\", \"rmi\"],\n },\n \"audio/mp4\": {\n extensions: [\"m4a\", \"mp4a\"],\n },\n \"audio/ogg\": {\n extensions: [\"oga\", \"ogg\", \"spx\"],\n },\n \"audio/webm\": {\n extensions: [\"weba\"],\n },\n \"audio/x-wav\": {\n extensions: [\"wav\"],\n },\n \"font/ttf\": {\n extensions: [\"ttf\"],\n },\n \"font/woff\": {\n extensions: [\"woff\"],\n },\n \"font/woff2\": {\n extensions: [\"woff2\"],\n },\n \"image/png\": {\n extensions: [\"png\"],\n },\n \"image/gif\": {\n extensions: [\"gif\"],\n },\n \"image/jpeg\": {\n extensions: [\"jpg\"],\n },\n \"image/svg+xml\": {\n extensions: [\"svg\", \"svgz\"],\n },\n \"text/plain\": {\n extensions: [\"txt\"],\n },\n \"text/html\": {\n extensions: [\"html\"],\n },\n \"text/css\": {\n extensions: [\"css\"],\n },\n \"text/cache-manifest\": {\n extensions: [\"appcache\"],\n },\n \"video/mp4\": {\n extensions: [\"mp4\", \"mp4v\", \"mpg4\"],\n },\n \"video/mpeg\": {\n extensions: [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\"],\n },\n \"video/ogg\": {\n extensions: [\"ogv\"],\n },\n \"video/webm\": {\n extensions: [\"webm\"],\n },\n}\n","export const assertImportMap = (value) => {\n if (value === null) {\n throw new TypeError(`an importMap must be an object, got null`)\n }\n\n const type = typeof value\n if (type !== \"object\") {\n throw new TypeError(`an importMap must be an object, received ${value}`)\n }\n\n if (Array.isArray(value)) {\n throw new TypeError(`an importMap must be an object, received array ${value}`)\n }\n}\n","export const hasScheme = (string) => {\n return /^[a-zA-Z]{2,}:/.test(string)\n}\n","// could be useful: https://url.spec.whatwg.org/#url-miscellaneous\n\nimport { hasScheme } from \"../hasScheme.js\"\nimport { hrefToScheme } from \"@jsenv/href/src/hrefToScheme/hrefToScheme.js\"\nimport { hrefToPathname } from \"@jsenv/href/src/hrefToPathname/hrefToPathname.js\"\nimport { hrefToOrigin } from \"@jsenv/href/src/hrefToOrigin/hrefToOrigin.js\"\nimport { pathnameToDirname } from \"@jsenv/href/src/pathnameToDirname/pathnameToDirname.js\"\n\nexport const resolveUrl = (specifier, baseUrl) => {\n if (baseUrl) {\n if (typeof baseUrl !== \"string\") {\n throw new TypeError(writeBaseUrlMustBeAString({ baseUrl, specifier }))\n }\n if (!hasScheme(baseUrl)) {\n throw new Error(writeBaseUrlMustBeAbsolute({ baseUrl, specifier }))\n }\n }\n\n if (hasScheme(specifier)) {\n return specifier\n }\n\n if (!baseUrl) {\n throw new Error(writeBaseUrlRequired({ baseUrl, specifier }))\n }\n\n // scheme relative\n if (specifier.slice(0, 2) === \"//\") {\n return `${hrefToScheme(baseUrl)}:${specifier}`\n }\n\n // origin relative\n if (specifier[0] === \"/\") {\n return `${hrefToOrigin(baseUrl)}${specifier}`\n }\n\n const baseOrigin = hrefToOrigin(baseUrl)\n const basePathname = hrefToPathname(baseUrl)\n\n if (specifier === \".\") {\n const baseDirname = pathnameToDirname(basePathname)\n return `${baseOrigin}${baseDirname}/`\n }\n\n // pathname relative inside\n if (specifier.slice(0, 2) === \"./\") {\n const baseDirname = pathnameToDirname(basePathname)\n return `${baseOrigin}${baseDirname}/${specifier.slice(2)}`\n }\n\n // pathname relative outside\n if (specifier.slice(0, 3) === \"../\") {\n let unresolvedPathname = specifier\n const importerFolders = basePathname.split(\"/\")\n importerFolders.pop()\n\n while (unresolvedPathname.slice(0, 3) === \"../\") {\n unresolvedPathname = unresolvedPathname.slice(3)\n // when there is no folder left to resolved\n // we just ignore '../'\n if (importerFolders.length) {\n importerFolders.pop()\n }\n }\n\n const resolvedPathname = `${importerFolders.join(\"/\")}/${unresolvedPathname}`\n return `${baseOrigin}${resolvedPathname}`\n }\n\n // bare\n if (basePathname === \"\") {\n return `${baseOrigin}/${specifier}`\n }\n if (basePathname[basePathname.length] === \"/\") {\n return `${baseOrigin}${basePathname}${specifier}`\n }\n return `${baseOrigin}${pathnameToDirname(basePathname)}/${specifier}`\n}\n\nconst writeBaseUrlMustBeAString = ({ baseUrl, specifier }) => `baseUrl must be a string.\n--- base url ---\n${baseUrl}\n--- specifier ---\n${specifier}`\n\nconst writeBaseUrlMustBeAbsolute = ({ baseUrl, specifier }) => `baseUrl must be absolute.\n--- base url ---\n${baseUrl}\n--- specifier ---\n${specifier}`\n\nconst writeBaseUrlRequired = ({\n baseUrl,\n specifier,\n}) => `baseUrl required to resolve relative specifier.\n--- base url ---\n${baseUrl}\n--- specifier ---\n${specifier}`\n","import { hasScheme } from \"./hasScheme.js\"\nimport { resolveUrl } from \"./resolveUrl/resolveUrl.js\"\n\nexport const tryUrlResolution = (string, url) => {\n const result = resolveUrl(string, url)\n return hasScheme(result) ? result : null\n}\n","import { hasScheme } from \"../hasScheme.js\"\nimport { resolveUrl } from \"../resolveUrl/resolveUrl.js\"\n\nexport const resolveSpecifier = (specifier, importer) => {\n if (specifier[0] === \"/\" || specifier.startsWith(\"./\") || specifier.startsWith(\"../\")) {\n return resolveUrl(specifier, importer)\n }\n\n if (hasScheme(specifier)) {\n return specifier\n }\n\n return null\n}\n","import { assertImportMap } from \"../assertImportMap.js\"\nimport { hasScheme } from \"../hasScheme.js\"\nimport { tryUrlResolution } from \"../tryUrlResolution.js\"\nimport { resolveSpecifier } from \"../resolveSpecifier/resolveSpecifier.js\"\n\nexport const applyImportMap = ({ importMap, specifier, importer }) => {\n assertImportMap(importMap)\n if (typeof specifier !== \"string\") {\n throw new TypeError(writeSpecifierMustBeAString({ specifier, importer }))\n }\n if (importer) {\n if (typeof importer !== \"string\") {\n throw new TypeError(writeImporterMustBeAString({ importer, specifier }))\n }\n if (!hasScheme(importer)) {\n throw new Error(writeImporterMustBeAbsolute({ importer, specifier }))\n }\n }\n\n const specifierUrl = resolveSpecifier(specifier, importer)\n const specifierNormalized = specifierUrl || specifier\n\n const { scopes } = importMap\n if (scopes && importer) {\n const scopeKeyMatching = Object.keys(scopes).find((scopeKey) => {\n return scopeKey === importer || specifierIsPrefixOf(scopeKey, importer)\n })\n if (scopeKeyMatching) {\n const scopeValue = scopes[scopeKeyMatching]\n const remappingFromScopeImports = applyImports(specifierNormalized, scopeValue)\n if (remappingFromScopeImports !== null) {\n return remappingFromScopeImports\n }\n }\n }\n\n const { imports } = importMap\n if (imports) {\n const remappingFromImports = applyImports(specifierNormalized, imports)\n if (remappingFromImports !== null) {\n return remappingFromImports\n }\n }\n\n if (specifierUrl) {\n return specifierUrl\n }\n\n throw new Error(writeBareSpecifierMustBeRemapped({ specifier, importer }))\n}\n\nconst applyImports = (specifier, imports) => {\n const importKeyArray = Object.keys(imports)\n\n let i = 0\n while (i < importKeyArray.length) {\n const importKey = importKeyArray[i]\n i++\n if (importKey === specifier) {\n const importValue = imports[importKey]\n return importValue\n }\n if (specifierIsPrefixOf(importKey, specifier)) {\n const importValue = imports[importKey]\n const afterImportKey = specifier.slice(importKey.length)\n\n return tryUrlResolution(afterImportKey, importValue)\n }\n }\n\n return null\n}\n\nconst specifierIsPrefixOf = (specifierHref, href) => {\n return specifierHref[specifierHref.length - 1] === \"/\" && href.startsWith(specifierHref)\n}\n\nconst writeSpecifierMustBeAString = ({ specifier, importer }) => `specifier must be a string.\n--- specifier ---\n${specifier}\n--- importer ---\n${importer}`\n\nconst writeImporterMustBeAString = ({ importer, specifier }) => `importer must be a string.\n--- importer ---\n${importer}\n--- specifier ---\n${specifier}`\n\nconst writeImporterMustBeAbsolute = ({ importer, specifier }) => `importer must be an absolute url.\n--- importer ---\n${importer}\n--- specifier ---\n${specifier}`\n\nconst writeBareSpecifierMustBeRemapped = ({ specifier, importer }) => `Unmapped bare specifier.\n--- specifier ---\n${specifier}\n--- importer ---\n${importer}`\n","// https://github.com/systemjs/systemjs/blob/89391f92dfeac33919b0223bbf834a1f4eea5750/src/common.js#L136\nimport { assertImportMap } from \"../assertImportMap.js\"\n\nexport const composeTwoImportMaps = (leftImportMap, rightImportMap) => {\n assertImportMap(leftImportMap)\n assertImportMap(rightImportMap)\n\n return {\n imports: composeTwoImports(leftImportMap.imports, rightImportMap.imports),\n scopes: composeTwoScopes(leftImportMap.scopes, rightImportMap.scopes),\n }\n}\n\nconst composeTwoImports = (leftImports = {}, rightImports = {}) => {\n return { ...leftImports, ...rightImports }\n}\n\nconst composeTwoScopes = (leftScopes = {}, rightScopes = {}) => {\n const scopes = { ...leftScopes }\n Object.keys(rightScopes).forEach((scopeKey) => {\n if (scopes.hasOwnProperty(scopeKey)) {\n scopes[scopeKey] = { ...scopes[scopeKey], ...rightScopes[scopeKey] }\n } else {\n scopes[scopeKey] = { ...rightScopes[scopeKey] }\n }\n })\n return scopes\n}\n","import { assertImportMap } from \"../assertImportMap.js\"\n\nexport const sortImportMap = (importMap) => {\n assertImportMap(importMap)\n\n const { imports, scopes } = importMap\n return {\n imports: imports ? sortImports(imports) : undefined,\n scopes: scopes ? sortScopes(scopes) : undefined,\n }\n}\n\nexport const sortImports = (imports) => {\n const importsSorted = {}\n Object.keys(imports)\n .sort(compareLengthOrLocaleCompare)\n .forEach((name) => {\n importsSorted[name] = imports[name]\n })\n return importsSorted\n}\n\nexport const sortScopes = (scopes) => {\n const scopesSorted = {}\n Object.keys(scopes)\n .sort(compareLengthOrLocaleCompare)\n .forEach((scopeName) => {\n scopesSorted[scopeName] = sortImports(scopes[scopeName])\n })\n return scopesSorted\n}\n\nconst compareLengthOrLocaleCompare = (a, b) => {\n return b.length - a.length || a.localeCompare(b)\n}\n","import { assertImportMap } from \"../assertImportMap.js\"\nimport { tryUrlResolution } from \"../tryUrlResolution.js\"\nimport { resolveSpecifier } from \"../resolveSpecifier/resolveSpecifier.js\"\n\nimport { sortImports, sortScopes } from \"../sortImportMap/sortImportMap.js\"\n\nexport const normalizeImportMap = (importMap, baseUrl) => {\n assertImportMap(importMap)\n if (typeof baseUrl !== \"string\") {\n throw new TypeError(formulateBaseUrlMustBeAString({ baseUrl }))\n }\n\n const { imports, scopes } = importMap\n\n return {\n imports: imports ? normalizeImports(imports, baseUrl) : undefined,\n scopes: scopes ? normalizeScopes(scopes, baseUrl) : undefined,\n }\n}\n\nconst normalizeImports = (imports, baseUrl) => {\n const importsNormalized = {}\n Object.keys(imports).forEach((specifier) => {\n const address = imports[specifier]\n\n if (typeof address !== \"string\") {\n console.warn(\n formulateAddressMustBeAString({\n address,\n specifier,\n }),\n )\n return\n }\n\n const specifierResolved = resolveSpecifier(specifier, baseUrl) || specifier\n\n const addressUrl = tryUrlResolution(address, baseUrl)\n if (addressUrl === null) {\n console.warn(\n formulateAdressResolutionFailed({\n address,\n baseUrl,\n specifier,\n }),\n )\n return\n }\n\n if (specifier.endsWith(\"/\") && !addressUrl.endsWith(\"/\")) {\n console.warn(\n formulateAddressUrlRequiresTrailingSlash({\n addressUrl,\n address,\n specifier,\n }),\n )\n return\n }\n importsNormalized[specifierResolved] = addressUrl\n })\n return sortImports(importsNormalized)\n}\n\nconst normalizeScopes = (scopes, baseUrl) => {\n const scopesNormalized = {}\n Object.keys(scopes).forEach((scope) => {\n const scopeValue = scopes[scope]\n const scopeUrl = tryUrlResolution(scope, baseUrl)\n if (scopeUrl === null) {\n console.warn(\n formulateScopeResolutionFailed({\n scope,\n baseUrl,\n }),\n )\n return\n }\n const scopeValueNormalized = normalizeImports(scopeValue, baseUrl)\n scopesNormalized[scopeUrl] = scopeValueNormalized\n })\n return sortScopes(scopesNormalized)\n}\n\nconst formulateBaseUrlMustBeAString = ({ baseUrl }) => `baseUrl must be a string.\n--- base url ---\n${baseUrl}`\n\nconst formulateAddressMustBeAString = ({ specifier, address }) => `Address must be a string.\n--- address ---\n${address}\n--- specifier ---\n${specifier}`\n\nconst formulateAdressResolutionFailed = ({\n address,\n baseUrl,\n specifier,\n}) => `Address url resolution failed.\n--- address ---\n${address}\n--- base url ---\n${baseUrl}\n--- specifier ---\n${specifier}`\n\nconst formulateAddressUrlRequiresTrailingSlash = ({\n addressURL,\n address,\n specifier,\n}) => `Address must end with /.\n--- address url ---\n${addressURL}\n--- address ---\n${address}\n--- specifier ---\n${specifier}`\n\nconst formulateScopeResolutionFailed = ({ scope, baseUrl }) => `Scope url resolution failed.\n--- scope ---\n${scope}\n--- base url ---\n${baseUrl}`\n","// directly target the files because this code\n// will be executed either on node or browser\n// and also we don't want to pull more code than necessary\n// when this one gets bundled\nimport { hrefToPathname } from \"@jsenv/href/src/hrefToPathname/hrefToPathname.js\"\nimport { pathnameToExtension } from \"@jsenv/href/src/pathnameToExtension/pathnameToExtension.js\"\nimport { resolveUrl } from \"../resolveUrl/resolveUrl.js\"\nimport { applyImportMap } from \"../applyImportMap/applyImportMap.js\"\n\nexport const resolveImport = ({ specifier, importer, importMap, defaultExtension = true }) => {\n return applyDefaultExtension({\n url: importMap\n ? applyImportMap({ importMap, specifier, importer })\n : resolveUrl(specifier, importer),\n importer,\n defaultExtension,\n })\n}\n\nconst applyDefaultExtension = ({ url, importer, defaultExtension }) => {\n if (hrefToPathname(url) === \"/\") {\n return url\n }\n\n if (url.endsWith(\"/\")) {\n return url\n }\n\n if (typeof defaultExtension === \"string\") {\n const extension = pathnameToExtension(url)\n if (extension === \"\") {\n return `${url}${defaultExtension}`\n }\n return url\n }\n\n if (defaultExtension === true) {\n const extension = pathnameToExtension(url)\n if (extension === \"\" && importer) {\n const importerPathname = hrefToPathname(importer)\n const importerExtension = pathnameToExtension(importerPathname)\n return `${url}${importerExtension}`\n }\n }\n return url\n}\n","import { pathToFileURL, fileURLToPath } from \"url\"\n\nexport const pathToDirectoryUrl = (path) => {\n const directoryUrl = path.startsWith(\"file://\") ? path : String(pathToFileURL(path))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const pathToFileUrl = (path) => {\n return pathToFileURL(path)\n}\n\nexport const fileUrlToPath = (fileUrl) => {\n return fileURLToPath(fileUrl)\n}\n\nexport const directoryUrlToPackageFileUrl = (directoryUrl) => {\n return String(new URL(\"./package.json\", directoryUrl))\n}\n\nexport const resolveFileUrl = (specifier, baseUrl) => {\n return String(new URL(specifier, baseUrl))\n}\n\nexport const resolveDirectoryUrl = (specifier, baseUrl) => {\n const directoryUrl = String(new URL(specifier, baseUrl))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const fileUrlToDirectoryUrl = (fileUrl) => {\n const directoryUrl = String(new URL(\"./\", fileUrl))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const fileUrlToRelativePath = (fileUrl, baseUrl) => {\n if (fileUrl.startsWith(baseUrl)) {\n return `./${fileUrl.slice(baseUrl.length)}`\n }\n return fileUrl\n}\n\nexport const hasScheme = (string) => {\n return /^[a-zA-Z]{2,}:/.test(string)\n}\n","import { fileRead } from \"@dmail/helper\"\n\nexport const readPackageFile = async (path) => {\n const packageFileString = await fileRead(path)\n const packageJsonObject = JSON.parse(packageFileString)\n return packageJsonObject\n}\n","import { fileURLToPath } from \"url\"\nimport { firstOperationMatching } from \"@dmail/helper\"\nimport { fileUrlToRelativePath, fileUrlToDirectoryUrl } from \"../urlHelpers.js\"\nimport { readPackageFile } from \"./readPackageFile.js\"\n\nexport const resolveNodeModule = async ({\n logger,\n rootProjectDirectoryUrl,\n packageFileUrl,\n packageJsonObject,\n dependencyName,\n dependencyVersionPattern,\n dependencyType,\n}) => {\n const packageDirectoryUrl = fileUrlToDirectoryUrl(packageFileUrl)\n const nodeModuleCandidateArray = [\n ...computeNodeModuleCandidateArray(packageDirectoryUrl, rootProjectDirectoryUrl),\n `node_modules/`,\n ]\n\n const result = await firstOperationMatching({\n array: nodeModuleCandidateArray,\n start: async (nodeModuleCandidate) => {\n const packageFileUrl = `${rootProjectDirectoryUrl}${nodeModuleCandidate}${dependencyName}/package.json`\n const packageFilePath = fileURLToPath(packageFileUrl)\n try {\n const packageJsonObject = await readPackageFile(packageFilePath)\n return {\n packageFileUrl,\n packageJsonObject,\n }\n } catch (e) {\n if (e.code === \"ENOENT\") {\n return {}\n }\n\n if (e.name === \"SyntaxError\") {\n logger.error(`\nerror while parsing dependency package.json.\n--- parsing error message ---\n${e.message}\n--- package.json path ---\n${packageFilePath}\n`)\n return {}\n }\n\n throw e\n }\n },\n predicate: ({ packageJsonObject }) => Boolean(packageJsonObject),\n })\n\n if (!result) {\n logger.warn(`\ncannot find a ${dependencyType}.\n--- ${dependencyType} ---\n${dependencyName}@${dependencyVersionPattern}\n--- required by ---\n${packageJsonObject.name}@${packageJsonObject.version}\n--- package.json path ---\n${fileURLToPath(packageFileUrl)}\n `)\n }\n\n return result\n}\n\nconst computeNodeModuleCandidateArray = (packageDirectoryUrl, rootProjectDirectoryUrl) => {\n if (packageDirectoryUrl === rootProjectDirectoryUrl) {\n return []\n }\n\n const packageDirectoryRelativePath = fileUrlToRelativePath(\n packageDirectoryUrl,\n rootProjectDirectoryUrl,\n )\n\n const candidateArray = []\n const relativeNodeModuleDirectoryArray = packageDirectoryRelativePath.split(\"/node_modules/\")\n // remove the first empty string\n relativeNodeModuleDirectoryArray.shift()\n\n let i = relativeNodeModuleDirectoryArray.length\n while (i--) {\n candidateArray.push(\n `node_modules/${relativeNodeModuleDirectoryArray\n .slice(0, i + 1)\n .join(\"/node_modules/\")}node_modules/`,\n )\n }\n\n return candidateArray\n}\n","import { dirname, extname, basename } from \"path\"\nimport { stat } from \"fs\"\nimport { firstOperationMatching } from \"@dmail/helper\"\nimport { resolveFileUrl, fileUrlToDirectoryUrl, fileUrlToPath } from \"../urlHelpers.js\"\nimport { fileURLToPath } from \"url\"\n\nexport const resolvePackageMain = ({ logger, packageFileUrl, packageJsonObject }) => {\n if (\"module\" in packageJsonObject) {\n return resolveMainFile({\n logger,\n packageFileUrl,\n packageMainFieldName: \"module\",\n packageMainFieldValue: packageJsonObject.module,\n })\n }\n\n if (\"jsnext:main\" in packageJsonObject) {\n return resolveMainFile({\n logger,\n packageFileUrl,\n packageMainFieldName: \"jsnext:main\",\n packageMainFieldValue: packageJsonObject[\"jsnext:main\"],\n })\n }\n\n if (\"main\" in packageJsonObject) {\n return resolveMainFile({\n logger,\n packageFileUrl,\n packageMainFieldName: \"main\",\n packageMainFieldValue: packageJsonObject.main,\n })\n }\n\n return resolveMainFile({\n logger,\n packageFileUrl,\n packageMainFieldName: \"default\",\n packageMainFieldValue: \"index\",\n })\n}\n\nconst extensionCandidateArray = [\"js\", \"json\", \"node\"]\n\nconst resolveMainFile = async ({\n logger,\n packageFileUrl,\n packageMainFieldName,\n packageMainFieldValue,\n}) => {\n // main is explicitely empty meaning\n // it is assumed that we should not find a file\n if (packageMainFieldValue === \"\") {\n return null\n }\n\n const packageFilePath = fileUrlToPath(packageFileUrl)\n const packageDirectoryUrl = fileUrlToDirectoryUrl(packageFileUrl)\n const mainFileRelativePath = packageMainFieldValue.endsWith(\"/\")\n ? `${packageMainFieldValue}index`\n : packageMainFieldValue\n\n const mainFileUrlFirstCandidate = resolveFileUrl(mainFileRelativePath, packageFileUrl)\n\n if (!mainFileUrlFirstCandidate.startsWith(packageDirectoryUrl)) {\n logger.warn(\n `\n${packageMainFieldName} field in package.json must be inside package.json folder.\n--- ${packageMainFieldName} ---\n${packageMainFieldValue}\n--- package.json path ---\n${packageFilePath}\n`,\n )\n return null\n }\n\n const mainFileUrl = await findMainFileUrlOrNull(mainFileUrlFirstCandidate)\n\n if (mainFileUrl === null) {\n // we know in advance this remapping does not lead to an actual file.\n // we only warn because we have no guarantee this remapping will actually be used\n // in the codebase.\n\n // warn only if there is actually a main field\n // otherwise the package.json is missing the main field\n // it certainly means it's not important\n if (packageMainFieldName !== \"default\") {\n logger.warn(\n `\ncannot find file for package.json ${packageMainFieldName} field\n--- ${packageMainFieldName} ---\n${packageMainFieldValue}\n--- file path ---\n${fileURLToPath(mainFileUrlFirstCandidate)}\n--- package.json path ---\n${packageFilePath}\n--- extensions tried ---\n${extensionCandidateArray.join(`,`)}\n `,\n )\n }\n return mainFileUrlFirstCandidate\n }\n\n return mainFileUrl\n}\n\nconst findMainFileUrlOrNull = async (mainFileUrl) => {\n const mainFilePath = fileUrlToPath(mainFileUrl)\n const stats = await pathToStats(mainFilePath)\n\n if (stats === null) {\n const extension = extname(mainFilePath)\n\n if (extension === \"\") {\n const extensionLeadingToAFile = await findExtension(mainFilePath)\n if (extensionLeadingToAFile === null) {\n return null\n }\n return `${mainFileUrl}.${extensionLeadingToAFile}`\n }\n return null\n }\n\n if (stats.isFile()) {\n return mainFileUrl\n }\n\n if (stats.isDirectory()) {\n const indexFileUrl = resolveFileUrl(\n \"./index\",\n mainFileUrl.endsWith(\"/\") ? mainFileUrl : `${mainFileUrl}/`,\n )\n const extensionLeadingToAFile = await findExtension(fileUrlToPath(indexFileUrl))\n if (extensionLeadingToAFile === null) {\n return null\n }\n return `${indexFileUrl}.${extensionLeadingToAFile}`\n }\n\n return null\n}\n\nconst findExtension = async (path) => {\n const pathDirname = dirname(path)\n const pathBasename = basename(path)\n const extensionLeadingToFile = await firstOperationMatching({\n array: extensionCandidateArray,\n start: async (extensionCandidate) => {\n const pathCandidate = `${pathDirname}/${pathBasename}.${extensionCandidate}`\n const stats = await pathToStats(pathCandidate)\n return stats && stats.isFile() ? extensionCandidate : null\n },\n predicate: (extension) => Boolean(extension),\n })\n return extensionLeadingToFile || null\n}\n\nconst pathToStats = (path) => {\n return new Promise((resolve, reject) => {\n stat(path, (error, statObject) => {\n if (error) {\n if (error.code === \"ENOENT\") resolve(null)\n else reject(error)\n } else {\n resolve(statObject)\n }\n })\n })\n}\n","import { fileUrlToPath, hasScheme } from \"../urlHelpers.js\"\n\nexport const visitPackageImports = ({ logger, packageFileUrl, packageJsonObject }) => {\n const importsForPackageImports = {}\n const packageFilePath = fileUrlToPath(packageFileUrl)\n\n const { imports: packageImports } = packageJsonObject\n if (typeof packageImports !== \"object\" || packageImports === null) {\n logger.warn(`\nimports of package.json must be an object.\n--- package.json imports ---\n${packageImports}\n--- package.json path ---\n${packageFilePath}\n`)\n return importsForPackageImports\n }\n\n Object.keys(packageImports).forEach((specifier) => {\n if (hasScheme(specifier) || specifier.startsWith(\"//\") || specifier.startsWith(\"../\")) {\n logger.warn(`\nfound unexpected specifier in imports of package.json, it must be relative to package.json.\n--- specifier ---\n${specifier}\n--- package.json path ---\n${packageFilePath}\n`)\n return\n }\n\n const address = packageImports[specifier]\n if (typeof address !== \"string\") {\n logger.warn(`\nfound unexpected address in imports of package.json, it must be a string.\n--- address ---\n${address}\n--- specifier ---\n${specifier}\n--- package.json path ---\n${packageFilePath}\n`)\n return\n }\n if (hasScheme(address) || address.startsWith(\"//\") || address.startsWith(\"../\")) {\n logger.warn(`\nfound unexpected address in imports of package.json, it must be relative to package.json.\n--- address ---\n${address}\n--- specifier ---\n${specifier}\n--- package.json path ---\n${packageFilePath}\n`)\n return\n }\n\n let from\n if (specifier[0] === \"/\") {\n from = specifier\n } else if (specifier.startsWith(\"./\")) {\n from = specifier\n } else {\n from = specifier\n }\n\n const to = address\n\n importsForPackageImports[from] = to\n })\n\n return importsForPackageImports\n}\n","import { hasScheme, fileUrlToPath } from \"../urlHelpers.js\"\n\nexport const visitPackageExports = ({\n logger,\n packageFileUrl,\n packageName,\n packageJsonObject,\n packageInfo: { packageIsRoot, packageDirectoryRelativePath },\n}) => {\n const importsForPackageExports = {}\n\n if (packageIsRoot) {\n return importsForPackageExports\n }\n\n const packageFilePath = fileUrlToPath(packageFileUrl)\n const { exports: packageExports } = packageJsonObject\n if (typeof packageExports !== \"object\" || packageExports === null) {\n logger.warn(`\nexports of package.json must be an object.\n--- package.json exports ---\n${packageExports}\n--- package.json path ---\n${packageFilePath}\n`)\n return importsForPackageExports\n }\n\n Object.keys(packageExports).forEach((specifier) => {\n if (hasScheme(specifier) || specifier.startsWith(\"//\") || specifier.startsWith(\"../\")) {\n logger.warn(`\nfound unexpected specifier in exports of package.json, it must be relative to package.json.\n--- specifier ---\n${specifier}\n--- package.json path ---\n${packageFilePath}\n`)\n return\n }\n\n const address = packageExports[specifier]\n if (typeof address !== \"string\") {\n logger.warn(`\nfound unexpected address in exports of package.json, it must be a string.\n--- address ---\n${address}\n--- specifier ---\n${specifier}\n--- package.json path ---\n${packageFilePath}\n`)\n return\n }\n if (hasScheme(address) || address.startsWith(\"//\") || address.startsWith(\"../\")) {\n logger.warn(`\nfound unexpected address in exports of package.json, it must be relative to package.json.\n--- address ---\n${address}\n--- specifier ---\n${specifier}\n--- package.json path ---\n${packageFilePath}\n`)\n return\n }\n\n let from\n if (specifier[0] === \"/\") {\n from = specifier\n } else if (specifier.startsWith(\"./\")) {\n from = `${packageName}${specifier.slice(1)}`\n } else {\n from = `${packageName}/${specifier}`\n }\n\n let to\n if (address[0] === \"/\") {\n to = address\n } else if (address.startsWith(\"./\")) {\n to = `${packageDirectoryRelativePath}${address.slice(2)}`\n } else {\n to = `${packageDirectoryRelativePath}${address}`\n }\n\n importsForPackageExports[from] = to\n })\n\n return importsForPackageExports\n}\n","/* eslint-disable import/max-dependencies */\nimport { basename } from \"path\"\nimport { sortImportMap } from \"@jsenv/import-map\"\nimport {\n pathToDirectoryUrl,\n directoryUrlToPackageFileUrl,\n fileUrlToDirectoryUrl,\n fileUrlToPath,\n fileUrlToRelativePath,\n} from \"../urlHelpers.js\"\nimport { readPackageFile } from \"./readPackageFile.js\"\nimport { resolveNodeModule } from \"./resolveNodeModule.js\"\nimport { resolvePackageMain } from \"./resolvePackageMain.js\"\nimport { visitPackageImports } from \"./visitPackageImports.js\"\nimport { visitPackageExports } from \"./visitPackageExports.js\"\n\nexport const generateImportMapForPackage = async ({\n logger,\n projectDirectoryPath,\n rootProjectDirectoryPath = projectDirectoryPath,\n includeDevDependencies = false,\n}) => {\n const projectDirectoryUrl = pathToDirectoryUrl(projectDirectoryPath)\n const rootProjectDirectoryUrl = pathToDirectoryUrl(rootProjectDirectoryPath)\n const projectPackageFileUrl = directoryUrlToPackageFileUrl(projectDirectoryUrl)\n const rootProjectPackageFileUrl = directoryUrlToPackageFileUrl(rootProjectDirectoryUrl)\n\n const imports = {}\n const scopes = {}\n const seen = {}\n\n const markPackageAsSeen = (packageFileUrl, importerPackageFileUrl) => {\n if (packageFileUrl in seen) {\n seen[packageFileUrl].push(importerPackageFileUrl)\n } else {\n seen[packageFileUrl] = [importerPackageFileUrl]\n }\n }\n\n const packageIsSeen = (packageFileUrl, importerPackageFileUrl) => {\n return packageFileUrl in seen && seen[packageFileUrl].includes(importerPackageFileUrl)\n }\n\n const visit = async ({\n packageFileUrl,\n packageName,\n packageJsonObject,\n importerPackageFileUrl,\n includeDevDependencies,\n }) => {\n await visitPackage({\n packageFileUrl,\n packageName,\n packageJsonObject,\n importerPackageFileUrl,\n })\n await visitDependencies({\n packageFileUrl,\n packageJsonObject,\n includeDevDependencies,\n })\n }\n\n const visitPackage = async ({\n packageFileUrl,\n packageName,\n packageJsonObject,\n importerPackageFileUrl,\n }) => {\n const packageInfo = computePackageInfo({\n packageFileUrl,\n packageName,\n importerPackageFileUrl,\n })\n\n await visitPackageMain({\n packageFileUrl,\n packageName,\n packageJsonObject,\n packageInfo,\n })\n\n if (\"imports\" in packageJsonObject) {\n const importsForPackageImports = visitPackageImports({\n packageFileUrl,\n packageName,\n packageJsonObject,\n packageInfo,\n })\n\n const { packageIsRoot, packageDirectoryRelativePath } = packageInfo\n Object.keys(importsForPackageImports).forEach((from) => {\n const to = importsForPackageImports[from]\n\n if (packageIsRoot) {\n addImportMapping({ from, to })\n } else {\n const toScoped =\n to[0] === \"/\"\n ? to\n : `${packageDirectoryRelativePath}${to.startsWith(\"./\") ? to.slice(2) : to}`\n\n addScopedImportMapping({\n scope: packageDirectoryRelativePath,\n from,\n to: toScoped,\n })\n\n // when a package says './' maps to './'\n // we must add something to say if we are already inside the package\n // no need to ensure leading slash are scoped to the package\n if (from === \"./\" && to === \"./\") {\n addScopedImportMapping({\n scope: packageDirectoryRelativePath,\n from: packageDirectoryRelativePath,\n to: packageDirectoryRelativePath,\n })\n } else if (from === \"/\" && to === \"/\") {\n addScopedImportMapping({\n scope: packageDirectoryRelativePath,\n from: packageDirectoryRelativePath,\n to: packageDirectoryRelativePath,\n })\n }\n }\n })\n }\n\n if (\"exports\" in packageJsonObject) {\n const importsForPackageExports = visitPackageExports({\n packageFileUrl,\n packageName,\n packageJsonObject,\n packageInfo,\n })\n\n const {\n importerIsRoot,\n importerRelativePath,\n packageDirectoryUrl,\n packageDirectoryUrlExpected,\n } = packageInfo\n Object.keys(importsForPackageExports).forEach((from) => {\n const to = importsForPackageExports[from]\n\n if (importerIsRoot) {\n addImportMapping({ from, to })\n } else {\n addScopedImportMapping({ scope: importerRelativePath, from, to })\n }\n if (packageDirectoryUrl !== packageDirectoryUrlExpected) {\n addScopedImportMapping({\n scope: importerRelativePath,\n from,\n to,\n })\n }\n })\n }\n }\n\n const visitPackageMain = async ({\n packageFileUrl,\n packageName,\n packageJsonObject,\n packageInfo: {\n importerIsRoot,\n importerRelativePath,\n packageIsRoot,\n packageIsProject,\n packageDirectoryUrl,\n packageDirectoryUrlExpected,\n },\n }) => {\n if (packageIsRoot) return\n if (packageIsProject) return\n\n const mainFileUrl = await resolvePackageMain({\n packageFileUrl,\n packageJsonObject,\n logger,\n })\n\n // it's possible to have no main\n // like { main: \"\" } in package.json\n // or a main that does not lead to an actual file\n if (mainFileUrl === null) return\n\n const mainFileRelativePath = fileUrlToRelativePath(mainFileUrl, rootProjectDirectoryUrl)\n const from = packageName\n const to = mainFileRelativePath\n\n if (importerIsRoot) {\n addImportMapping({ from, to })\n } else {\n addScopedImportMapping({ scope: importerRelativePath, from, to })\n }\n if (packageDirectoryUrl !== packageDirectoryUrlExpected) {\n addScopedImportMapping({ scope: importerRelativePath, from, to })\n }\n }\n\n const visitDependencies = async ({\n packageFileUrl,\n packageJsonObject,\n includeDevDependencies,\n }) => {\n const dependencyMap = {}\n\n const { dependencies = {} } = packageJsonObject\n Object.keys(dependencies).forEach((dependencyName) => {\n dependencyMap[dependencyName] = {\n type: \"dependency\",\n versionPattern: dependencies[dependencyName],\n }\n })\n\n const { peerDependencies = {} } = packageJsonObject\n Object.keys(peerDependencies).forEach((dependencyName) => {\n dependencyMap[dependencyName] = {\n type: \"peerDependency\",\n versionPattern: peerDependencies[dependencyName],\n }\n })\n\n const isProjectPackage = packageFileUrl === projectPackageFileUrl\n if (includeDevDependencies && isProjectPackage) {\n const { devDependencies = {} } = packageJsonObject\n Object.keys(devDependencies).forEach((dependencyName) => {\n if (!dependencyMap.hasOwnProperty(dependencyName)) {\n dependencyMap[dependencyName] = {\n type: \"devDependency\",\n versionPattern: devDependencies[dependencyName],\n }\n }\n })\n }\n\n await Promise.all(\n Object.keys(dependencyMap).map(async (dependencyName) => {\n const dependency = dependencyMap[dependencyName]\n await visitDependency({\n packageFileUrl,\n packageJsonObject,\n dependencyName,\n dependencyType: dependency.type,\n dependencyVersionPattern: dependency.versionPattern,\n })\n }),\n )\n }\n\n const visitDependency = async ({\n packageFileUrl,\n packageJsonObject,\n dependencyName,\n dependencyType,\n dependencyVersionPattern,\n }) => {\n const dependencyData = await findDependency({\n packageFileUrl,\n packageJsonObject,\n dependencyName,\n dependencyType,\n dependencyVersionPattern,\n })\n if (!dependencyData) {\n return\n }\n\n const {\n packageFileUrl: dependencyPackageFileUrl,\n packageJsonObject: dependencyPackageJsonObject,\n } = dependencyData\n\n if (packageIsSeen(dependencyPackageFileUrl, packageFileUrl)) {\n return\n }\n markPackageAsSeen(dependencyPackageFileUrl, packageFileUrl)\n await visit({\n packageFileUrl: dependencyPackageFileUrl,\n packageName: dependencyName,\n packageJsonObject: dependencyPackageJsonObject,\n importerPackageFileUrl: packageFileUrl,\n })\n }\n\n const computePackageInfo = ({ packageFileUrl, packageName, importerPackageFileUrl }) => {\n const importerIsRoot = importerPackageFileUrl === rootProjectPackageFileUrl\n\n const importerIsProject = importerPackageFileUrl === projectPackageFileUrl\n\n const importerPackageDirectoryUrl = fileUrlToDirectoryUrl(importerPackageFileUrl)\n\n const importerRelativePath = importerIsRoot\n ? `./${basename(rootProjectDirectoryUrl)}/`\n : fileUrlToRelativePath(importerPackageDirectoryUrl, rootProjectDirectoryUrl)\n\n const packageIsRoot = packageFileUrl === rootProjectPackageFileUrl\n\n const packageIsProject = packageFileUrl === projectPackageFileUrl\n\n const packageDirectoryUrl = fileUrlToDirectoryUrl(packageFileUrl)\n\n let packageDirectoryUrlExpected\n if (packageIsProject && !packageIsRoot) {\n packageDirectoryUrlExpected = importerPackageDirectoryUrl\n } else {\n packageDirectoryUrlExpected = `${importerPackageDirectoryUrl}node_modules/${packageName}/`\n }\n\n const packageDirectoryRelativePath = fileUrlToRelativePath(\n packageDirectoryUrl,\n rootProjectDirectoryUrl,\n )\n\n return {\n importerIsRoot,\n importerIsProject,\n importerRelativePath,\n packageIsRoot,\n packageIsProject,\n packageDirectoryUrl,\n packageDirectoryUrlExpected,\n packageDirectoryRelativePath,\n }\n }\n\n const addImportMapping = ({ from, to }) => {\n // we could think it's useless to remap from with to\n // however it can be used to ensure a weaker remapping\n // does not win over this specific file or folder\n if (from === to) {\n /**\n * however remapping '/' to '/' is truly useless\n * moreover it would make wrapImportMap create something like\n * {\n * imports: {\n * \"/\": \"/.dist/best/\"\n * }\n * }\n * that would append the wrapped folder twice\n * */\n if (from === \"/\") return\n }\n\n imports[from] = to\n }\n\n const addScopedImportMapping = ({ scope, from, to }) => {\n scopes[scope] = {\n ...(scopes[scope] || {}),\n [from]: to,\n }\n }\n\n const dependenciesCache = {}\n const findDependency = ({\n packageFileUrl,\n packageJsonObject,\n dependencyName,\n dependencyType,\n dependencyVersionPattern,\n }) => {\n if (packageFileUrl in dependenciesCache === false) {\n dependenciesCache[packageFileUrl] = {}\n }\n if (dependencyName in dependenciesCache[packageFileUrl]) {\n return dependenciesCache[packageFileUrl][dependencyName]\n }\n const dependencyPromise = resolveNodeModule({\n rootProjectDirectoryUrl,\n packageFileUrl,\n packageJsonObject,\n dependencyName,\n dependencyType,\n dependencyVersionPattern,\n logger,\n })\n dependenciesCache[packageFileUrl][dependencyName] = dependencyPromise\n return dependencyPromise\n }\n\n const projectPackageJsonObject = await readPackageFile(fileUrlToPath(projectPackageFileUrl))\n\n const packageFileUrl = projectPackageFileUrl\n const importerPackageFileUrl = projectPackageFileUrl\n markPackageAsSeen(packageFileUrl, importerPackageFileUrl)\n await visit({\n packageFileUrl,\n packageName: projectPackageJsonObject.name,\n packageJsonObject: projectPackageJsonObject,\n importerPackageFileUrl,\n includeDevDependencies,\n })\n\n return sortImportMap({ imports, scopes })\n}\n","export const LOG_LEVEL_OFF = \"off\"\n\nexport const LOG_LEVEL_DEBUG = \"debug\"\n\nexport const LOG_LEVEL_INFO = \"info\"\n\nexport const LOG_LEVEL_WARN = \"warn\"\n\nexport const LOG_LEVEL_ERROR = \"error\"\n","import {\n LOG_LEVEL_DEBUG,\n LOG_LEVEL_INFO,\n LOG_LEVEL_WARN,\n LOG_LEVEL_ERROR,\n LOG_LEVEL_OFF,\n} from \"./LOG_LEVELS.js\"\n\nexport const createLogger = ({ logLevel = LOG_LEVEL_INFO } = {}) => {\n if (logLevel === LOG_LEVEL_DEBUG) {\n return {\n debug,\n info,\n warn,\n error,\n }\n }\n\n if (logLevel === LOG_LEVEL_INFO) {\n return {\n debug: debugDisabled,\n info,\n warn,\n error,\n }\n }\n\n if (logLevel === LOG_LEVEL_WARN) {\n return {\n debug: debugDisabled,\n info: infoDisabled,\n warn,\n error,\n }\n }\n\n if (logLevel === LOG_LEVEL_ERROR) {\n return {\n debug: debugDisabled,\n info: infoDisabled,\n warn: warnDisabled,\n error,\n }\n }\n\n if (logLevel === LOG_LEVEL_OFF) {\n return {\n debug: debugDisabled,\n info: infoDisabled,\n warn: warnDisabled,\n error: errorDisabled,\n }\n }\n\n throw new Error(createUnexpectedLogLevelMessage({ logLevel }))\n}\n\nconst createUnexpectedLogLevelMessage = ({ logLevel }) => `unexpected logLevel.\n--- logLevel ---\n${logLevel}\n--- allowed log levels ---\n${LOG_LEVEL_OFF}\n${LOG_LEVEL_ERROR}\n${LOG_LEVEL_WARN}\n${LOG_LEVEL_INFO}\n${LOG_LEVEL_DEBUG}\n`\n\nconst debug = console.debug\n\nconst debugDisabled = () => {}\n\nconst info = console.info\n\nconst infoDisabled = () => {}\n\nconst warn = console.warn\n\nconst warnDisabled = () => {}\n\nconst error = console.error\n\nconst errorDisabled = () => {}\n","import { pathToFileUrl, resolveDirectoryUrl } from \"./urlHelpers.js\"\n\nlet jsenvBundlingDirectoryUrl\nif (typeof __filename === \"string\") {\n jsenvBundlingDirectoryUrl = resolveDirectoryUrl(\n // get ride of dist/node/main.js\n \"../../\",\n pathToFileUrl(__filename),\n )\n} else {\n jsenvBundlingDirectoryUrl = resolveDirectoryUrl(\n // get ride of src/jsenvBundlingDirectoryUrl.js\n \"../\",\n import.meta.url,\n )\n}\n\nexport { jsenvBundlingDirectoryUrl }\n","// https://github.com/cfware/babel-plugin-bundled-import-meta/blob/master/index.js\nconst { addNamed } = import.meta.require(\"@babel/helper-module-imports\")\n\nexport const createImportMetaUrlNamedImportBabelPlugin = ({ importMetaFacadeUrl }) => {\n return () => {\n return {\n visitor: {\n Program(programPath) {\n const metaPropertyMap = {}\n\n programPath.traverse({\n MemberExpression(path) {\n const { node } = path\n const { object } = node\n if (object.type !== \"MetaProperty\") return\n\n const { property: objectProperty } = object\n if (objectProperty.name !== \"meta\") return\n\n const { property } = node\n const { name } = property\n if (name in metaPropertyMap) {\n metaPropertyMap[name].push(path)\n } else {\n metaPropertyMap[name] = [path]\n }\n },\n })\n\n Object.keys(metaPropertyMap).forEach((propertyName) => {\n const importMetaPropertyId = propertyName\n const result = addNamed(programPath, importMetaPropertyId, importMetaFacadeUrl)\n metaPropertyMap[propertyName].forEach((path) => {\n path.replaceWith(result)\n })\n })\n },\n },\n }\n }\n}\n","import { resolveFileUrl } from \"../urlHelpers.js\"\nimport { jsenvBundlingDirectoryUrl } from \"../jsenvBundlingDirectoryUrl.js\"\nimport { createImportMetaUrlNamedImportBabelPlugin } from \"./createImportMetaUrlNamedImportBabelPlugin.js\"\n\nexport const generateBabelPluginMapOption = ({\n format,\n babelPluginMap,\n babelPluginRequiredNameArray,\n}) => {\n return {\n ...generateBabelPluginMapSubset({\n babelPluginMap,\n babelPluginRequiredNameArray,\n }),\n ...generateBabelPluginMapForBundle({\n format,\n }),\n }\n}\n\nconst generateBabelPluginMapSubset = ({ babelPluginMap, babelPluginRequiredNameArray }) => {\n const babelPluginMapSubset = {}\n\n Object.keys(babelPluginMap).forEach((babelPluginName) => {\n if (babelPluginRequiredNameArray.includes(babelPluginName)) {\n babelPluginMapSubset[babelPluginName] = babelPluginMap[babelPluginName]\n }\n })\n\n return babelPluginMapSubset\n}\n\nconst generateBabelPluginMapForBundle = ({ format }) => {\n const bundleBabelPluginMap = {}\n\n if (format === \"commonjs\" || format === \"global\") {\n const importMetaFacadeUrl = resolveFileUrl(\n `./src/generateBabelPluginMapOption/import-meta-${format}.js`,\n jsenvBundlingDirectoryUrl,\n )\n\n bundleBabelPluginMap[\n \"import-meta-url-named-import\"\n ] = createImportMetaUrlNamedImportBabelPlugin({\n importMetaFacadeUrl,\n })\n }\n\n return bundleBabelPluginMap\n}\n","import { globalAgent } from \"https\"\nimport { createOperation } from \"@dmail/cancellation\"\nimport { fileRead } from \"@dmail/helper\"\nimport { ressourceToContentType, defaultContentTypeMap } from \"@dmail/server\"\nimport { hrefToPathname } from \"@jsenv/href\"\nimport { fileUrlToPath } from \"../../urlHelpers.js\"\n\nconst fetch = import.meta.require(\"node-fetch\")\nconst AbortController = import.meta.require(\"abort-controller\")\n\n// ideally we should only pass this to the fetch below\nglobalAgent.options.rejectUnauthorized = false\n\nexport const fetchUrl = async (url, { cancellationToken } = {}) => {\n // this code allow you to have http/https dependency for convenience\n // but maybe we should warn about this.\n // it could also be vastly improved using a basic in memory cache\n if (url.startsWith(\"http://\")) {\n const response = await fetchUsingHttp(url, { cancellationToken })\n return response\n }\n\n if (url.startsWith(\"https://\")) {\n const response = await fetchUsingHttp(url, { cancellationToken })\n return response\n }\n\n if (url.startsWith(\"file:///\")) {\n try {\n const path = fileUrlToPath(url)\n const code = await createOperation({\n cancellationToken,\n start: () => fileRead(path),\n })\n return {\n url,\n status: 200,\n body: code,\n headers: {\n \"content-type\": ressourceToContentType(hrefToPathname(url), defaultContentTypeMap),\n },\n }\n } catch (e) {\n if (e.code === \"ENOENT\") {\n return {\n url,\n status: 404,\n }\n }\n return {\n url,\n status: 500,\n }\n }\n }\n\n throw new Error(`unsupported url: ${url}`)\n}\n\nconst fetchUsingHttp = async (url, { cancellationToken, ...rest } = {}) => {\n if (cancellationToken) {\n // a cancelled fetch will never resolve, while cancellation api\n // expect to get a rejected promise.\n // createOperation ensure we'll get a promise rejected with a cancelError\n const response = await createOperation({\n cancellationToken,\n start: () =>\n fetch(url, {\n signal: cancellationTokenToAbortSignal(cancellationToken),\n ...rest,\n }),\n })\n return normalizeResponse(response)\n }\n\n const response = await fetch(url, rest)\n return normalizeResponse(response)\n}\n\nconst normalizeResponse = async (response) => {\n const text = await response.text()\n return {\n url: response.url,\n status: response.status,\n statusText: response.statusText,\n headers: responseToHeaderMap(response),\n body: text,\n }\n}\n\n// https://github.com/bitinn/node-fetch#request-cancellation-with-abortsignal\nconst cancellationTokenToAbortSignal = (cancellationToken) => {\n const abortController = new AbortController()\n cancellationToken.register((reason) => {\n abortController.abort(reason)\n })\n return abortController.signal\n}\n\nconst responseToHeaderMap = (response) => {\n const headerMap = {}\n response.headers.forEach((value, name) => {\n headerMap[name] = value\n })\n return headerMap\n}\n","export const validateResponseStatusIsOk = ({ status, url }) => {\n if (responseStatusIsOk(status)) {\n return { valid: true }\n }\n\n return {\n valid: false,\n message: `unexpected response status.\n--- response status ---\n${status}\n--- expected status ---\n200 to 299\n--- url ---\n${url}`,\n }\n}\n\nconst responseStatusIsOk = (responseStatus) => responseStatus >= 200 && responseStatus < 300\n","import { resolveFileUrl } from \"../../urlHelpers.js\"\nimport { parseSourceMappingURL } from \"../../source-mapping-url.js\"\nimport { fetchUrl } from \"./fetchUrl.js\"\nimport { validateResponseStatusIsOk } from \"./validateResponseStatusIsOk.js\"\n\nexport const fetchSourcemap = async ({ cancellationToken, logger, moduleUrl, moduleContent }) => {\n const sourcemapParsingResult = parseSourceMappingURL(moduleContent)\n\n if (!sourcemapParsingResult) {\n return null\n }\n\n if (sourcemapParsingResult.sourcemapString) {\n return parseSourcemapString({\n sourcemapString: sourcemapParsingResult.sourcemapString,\n sourcemapUrl: moduleUrl,\n moduleUrl,\n logger,\n })\n }\n\n const sourcemapUrl = resolveFileUrl(sourcemapParsingResult.sourcemapURL, moduleUrl)\n const sourcemapResponse = await fetchUrl(moduleUrl, { cancellationToken })\n const okValidation = validateResponseStatusIsOk(sourcemapResponse)\n\n if (!okValidation.valid) {\n logger.warn(okValidation.message)\n return null\n }\n\n // in theory we should also check response content-type\n // not really important\n\n return parseSourcemapString({\n logger,\n sourcemapString: sourcemapResponse.body,\n sourcemapUrl,\n moduleUrl,\n })\n}\n\nconst parseSourcemapString = ({ logger, sourcemapString, sourcemapUrl, moduleUrl }) => {\n try {\n return JSON.parse(sourcemapString)\n } catch (e) {\n if (e.name === \"SyntaxError\") {\n if (sourcemapUrl === moduleUrl) {\n logger.error(`syntax error while parsing inlined sourcemap.\n--- syntax error stack ---\n${e.stack}\n--- module url ---\n${moduleUrl}`)\n } else {\n logger.error(\n `syntax error while parsing remote sourcemap.\n--- syntax error stack ---\n${e.stack}\n--- sourcemap url ---\n${sourcemapUrl}\n--- module url ---\n${moduleUrl}`,\n )\n }\n\n return null\n }\n throw e\n }\n}\n","/* eslint-disable import/max-dependencies */\nimport { statSync } from \"fs\"\nimport { fileWrite } from \"@dmail/helper\"\nimport { ressourceToContentType, defaultContentTypeMap } from \"@dmail/server\"\nimport { hrefToPathname } from \"@jsenv/href\"\nimport { normalizeImportMap, composeTwoImportMaps, resolveImport } from \"@jsenv/import-map\"\nimport { generateImportMapForPackage } from \"@jsenv/node-module-import-map\"\nimport { jsenvBundlingDirectoryUrl } from \"../../jsenvBundlingDirectoryUrl.js\"\nimport {\n fileUrlToRelativePath,\n hasScheme,\n fileUrlToPath,\n pathToFileUrl,\n resolveFileUrl,\n resolveDirectoryUrl,\n} from \"../../urlHelpers.js\"\nimport { writeSourceMappingURL } from \"../../source-mapping-url.js\"\nimport { generateBabelPluginMapOption } from \"../../generateBabelPluginMapOption/generateBabelPluginMapOption.js\"\nimport { fetchUrl } from \"./fetchUrl.js\"\nimport { fetchSourcemap } from \"./fetchSourcemap.js\"\nimport { validateResponseStatusIsOk } from \"./validateResponseStatusIsOk.js\"\n\nconst {\n readProjectImportMap,\n babelHelperMap,\n generateBabelHelper,\n cleanCompileCacheDirectoryIfObsolete,\n getOrGenerateCompiledFile,\n transformJs,\n transformResultToCompilationResult,\n compilationResultToTransformResult,\n findAsyncPluginNameInBabelPluginMap,\n} = import.meta.require(\"@jsenv/core\")\nconst { minify: minifyCode } = import.meta.require(\"terser\")\n\nexport const createJsenvRollupPlugin = async ({\n cancellationToken,\n projectDirectoryUrl,\n bundleDirectoryUrl,\n importMapFileRelativePath,\n importMapForBundle,\n importDefaultExtension,\n importReplaceMap,\n importFallbackMap,\n bundleCache,\n bundleCacheDirectoryRelativePath,\n babelPluginMap,\n babelPluginRequiredNameArray,\n convertMap,\n minify,\n format,\n detectAndTransformIfNeededAsyncInsertedByRollup = format === \"global\",\n entryPointMap,\n logger,\n}) => {\n const arrayOfUrlToSkipTransform = []\n const arrayOfAbstractUrl = []\n const moduleContentMap = {}\n\n const bundleConstantAbstractSpecifier = \"/.jsenv/BUNDLE_CONSTANTS.js\"\n\n babelPluginMap = generateBabelPluginMapOption({\n format,\n babelPluginMap,\n babelPluginRequiredNameArray,\n })\n\n importFallbackMap = {\n // importMap is optionnal\n \"/importMap.json\": () => `{}`,\n ...importFallbackMap,\n }\n importFallbackMap = resolveSpecifierMap(importFallbackMap, projectDirectoryUrl)\n\n const chunkId = `${Object.keys(entryPointMap)[0]}.js`\n importReplaceMap = {\n [bundleConstantAbstractSpecifier]: () => `export const chunkId = ${JSON.stringify(chunkId)}`,\n ...importReplaceMap,\n }\n Object.keys(babelHelperMap).forEach((babelHelperName) => {\n const babelHelperPath = babelHelperMap[babelHelperName]\n if (babelHelperPath.startsWith(\"@jsenv/core\")) {\n // nothing to do\n } else {\n importReplaceMap[babelHelperPath] = () => generateBabelHelper(babelHelperName)\n }\n })\n importReplaceMap = resolveSpecifierMap(importReplaceMap, projectDirectoryUrl)\n\n const importMapForProject = await readProjectImportMap({\n logger,\n projectDirectoryUrl,\n jsenvProjectDirectoryUrl: jsenvBundlingDirectoryUrl,\n importMapFileRelativePath,\n })\n const importMap = normalizeImportMap(\n [\n await generateImportMapForPackage({\n projectDirectoryPath: fileUrlToPath(jsenvBundlingDirectoryUrl),\n rootProjectDirectoryPath: fileUrlToPath(projectDirectoryUrl),\n logger,\n }),\n ...(importMapFileRelativePath === \"./importMap.json\"\n ? []\n : [\n {\n imports: {\n \"/importMap.json\": importMapFileRelativePath,\n },\n },\n ]),\n importMapForProject,\n importMapForBundle,\n ].reduce((previous, current) => composeTwoImportMaps(previous, current), {}),\n projectDirectoryUrl,\n )\n\n const bundleCacheDirectoryUrl = resolveDirectoryUrl(\n bundleCacheDirectoryRelativePath,\n projectDirectoryUrl,\n )\n if (bundleCache) {\n const cacheMeta = {\n babelPluginRequiredNameArray,\n convertMap,\n\n // importMap,\n // importMap influences how the files are resolved\n // but not how they are compiled and cached\n\n // format,\n // not needed because derived from bundleIntoRelativePath\n\n // babelPluginMap,\n // not needed because derived from babelPluginRequiredNameArray\n\n // minify,\n // not needed, the bundle itself is not cached\n // and only the bundle is minified\n }\n await cleanCompileCacheDirectoryIfObsolete({\n cacheDirectoryUrl: bundleCacheDirectoryUrl,\n cacheMeta,\n cleanCallback: (cacheFolderPath) => {\n logger.warn(`remove cache folder ${cacheFolderPath}`)\n },\n })\n }\n\n const jsenvRollupPlugin = {\n name: \"jsenv\",\n\n resolveId: (specifier, importer = projectDirectoryUrl) => {\n if (!hasScheme(importer)) {\n importer = pathToFileUrl(importer)\n }\n\n const importUrl = resolveImport({\n specifier,\n importer,\n importMap,\n defaultExtension: importDefaultExtension,\n })\n\n // logger.debug(`resolve ${specifier} to ${importUrl}`)\n\n if (importUrl.startsWith(\"file://\")) {\n // TODO: open an issue rollup side\n // to explain the issue here\n // which is that if id is not an os path\n // sourcemap will be broken\n // (likely because they apply node.js path.resolve)\n // they could either use an other resolution system\n // or provide the ability to change how it's resolved\n // so that the sourcemap.sources does not get broken\n\n // rollup works with operating system path\n // return os path when possible\n // to ensure we can predict sourcemap.sources returned by rollup\n const importPath = fileUrlToPath(importUrl)\n if (importUrl in importReplaceMap) {\n return importPath\n }\n // file presence is optionnal\n if (importUrl in importFallbackMap) {\n return importPath\n }\n\n let stats\n try {\n stats = statSync(importPath)\n } catch (e) {\n if (e.code === \"ENOENT\") {\n throw new Error(`import file not found.\n--- path ---\n${importPath}\n--- specifier ---\n${specifier}\n--- importer ---\n${importer}`)\n }\n throw e\n }\n\n if (!stats.isFile()) {\n throw new Error(`unexpected import file stats.\n--- path ---\n${importPath}\n--- found ---\n${stats.isDirectory()} ? 'directory' : 'not-a-file'\n--- specifier ---\n${specifier}\n--- importer ---\n${importer}`)\n }\n\n return importPath\n }\n\n return importUrl\n },\n\n // https://rollupjs.org/guide/en#resolvedynamicimport\n // resolveDynamicImport: (specifier, importer) => {\n\n // },\n\n load: async (rollupId) => {\n const url = rollupIdToUrl(rollupId)\n logger.debug(`loading ${url}`)\n const { contentRaw, content, map } = await loadModule(url)\n\n moduleContentMap[url] = {\n content,\n contentRaw,\n }\n\n return { code: content, map }\n },\n\n // resolveImportMeta: () => {}\n\n transform: async (moduleContent, rollupId) => {\n const url = rollupIdToUrl(rollupId)\n\n if (arrayOfUrlToSkipTransform.includes(url)) {\n logger.debug(`skip transform for ${url}`)\n return null\n }\n\n const transform = async () => {\n const { code, map } = await transformJs({\n projectDirectoryUrl,\n code: moduleContent,\n url,\n babelPluginMap,\n convertMap,\n // false, rollup will take care to transform module into whatever format\n transformModuleIntoSystemFormat: false,\n })\n return { code, map }\n }\n\n if (!bundleCache || !url.startsWith(projectDirectoryUrl)) {\n return transform()\n }\n\n const sourceRelativePath = fileUrlToRelativePath(url, bundleCacheDirectoryUrl)\n\n const { compileResult } = await getOrGenerateCompiledFile({\n projectDirectoryUrl,\n cacheDirectoryUrl: bundleCacheDirectoryUrl,\n sourceRelativePath,\n compile: async () => {\n const transformResult = await transform()\n return transformResultToCompilationResult(transformResult, {\n source: moduleContent,\n sourceUrl: url,\n projectDirectoryUrl,\n })\n },\n })\n\n return compilationResultToTransformResult(compileResult)\n },\n\n outputOptions: (options) => {\n // we want something like ../../../../file.js to become /file.js\n // and also rollup does not expects to have http dependency in the mix\n // so we fix them too (this one is really not mandatory)\n options.sourcemapPathTransform = (relativeSpecifier) => {\n const chunkFileUrl = resolveFileUrl(`./${chunkId}`, bundleDirectoryUrl)\n const url = resolveImport({\n specifier: relativeSpecifier,\n importer: chunkFileUrl,\n })\n\n if (url.startsWith(projectDirectoryUrl)) {\n // relativise project dependencies\n const relativePath = fileUrlToRelativePath(url, projectDirectoryUrl)\n const originRelativePath = relativePath.slice(1)\n\n if (originRelativePath.startsWith(\"/http:/\")) {\n return `http://${originRelativePath.slice(`/http:/`.length)}`\n }\n if (originRelativePath.startsWith(\"/https:/\")) {\n return `https://${originRelativePath.slice(`/http:/`.length)}`\n }\n return originRelativePath\n }\n return url\n }\n return options\n },\n\n renderChunk: (source) => {\n if (!minify) return null\n\n // https://github.com/terser-js/terser#minify-options\n const minifyOptions = format === \"global\" ? { toplevel: false } : { toplevel: true }\n const result = minifyCode(source, {\n sourceMap: true,\n ...minifyOptions,\n })\n if (result.error) {\n throw result.error\n } else {\n return result\n }\n },\n\n writeBundle: async (bundle) => {\n if (detectAndTransformIfNeededAsyncInsertedByRollup) {\n await transformAsyncInsertedByRollup({\n projectDirectoryUrl,\n bundleDirectoryUrl,\n babelPluginMap,\n bundle,\n })\n }\n\n Object.keys(bundle).forEach((bundleFilename) => {\n logger.info(`-> ${bundleDirectoryUrl}${bundleFilename}`)\n })\n },\n }\n\n const markUrlAsAbstract = (url) => {\n if (!arrayOfAbstractUrl.includes(url)) {\n arrayOfAbstractUrl.push(url)\n }\n }\n\n const loadModule = async (moduleUrl) => {\n const { contentType, content, map } = await getModule(moduleUrl)\n\n if (contentType === \"application/javascript\") {\n return {\n contentRaw: content,\n content,\n map: await fetchSourcemap({\n cancellationToken,\n logger,\n moduleUrl,\n moduleContent: content,\n }),\n }\n }\n\n if (contentType === \"application/json\") {\n return {\n contentRaw: content,\n content: `export default ${content}`,\n map,\n }\n }\n\n if (contentType.startsWith(\"text/\")) {\n return {\n contentRaw: content,\n content: `export default ${JSON.stringify(content)}`,\n map,\n }\n }\n\n logger.warn(`unexpected content-type for module.\n--- content-type ---\n${contentType}\n--- expected content-types ---\n\"application/javascript\"\n\"application/json\"\n\"text/*\"\n--- module url ---\n${moduleUrl}`)\n\n return {\n contentRaw: content,\n // fallback to text\n content: `export default ${JSON.stringify(content)}`,\n map,\n }\n }\n\n const getModule = async (moduleUrl) => {\n if (moduleUrl in importReplaceMap) {\n const generateSourceForImport = importReplaceMap[moduleUrl]\n if (typeof generateSourceForImport !== \"function\") {\n throw new Error(\n `specifierAbstractMap values must be functions, found ${generateSourceForImport} for ${moduleUrl}`,\n )\n }\n\n return generateAbstractModuleForImport(moduleUrl, generateSourceForImport)\n }\n\n const response = await fetchUrl(moduleUrl, { cancellationToken })\n const okValidation = validateResponseStatusIsOk(response)\n\n if (!okValidation.valid) {\n if (response.status === 404 && moduleUrl in importFallbackMap) {\n return generateAbstractModuleForImport(moduleUrl, importFallbackMap[moduleUrl])\n }\n throw new Error(okValidation.message)\n }\n\n return {\n contentType: response.headers[\"content-type\"],\n content: response.body,\n }\n }\n\n const generateAbstractModuleForImport = async (url, generateSource) => {\n markUrlAsAbstract(url)\n\n const returnValue = await generateSource()\n const result = typeof returnValue === \"string\" ? { code: returnValue } : returnValue\n\n const { skipTransform, code, map } = result\n\n if (skipTransform) {\n arrayOfUrlToSkipTransform.push(url)\n }\n\n return {\n contentType: ressourceToContentType(hrefToPathname(url), defaultContentTypeMap),\n content: code,\n map,\n }\n }\n\n return {\n jsenvRollupPlugin,\n getExtraInfo: () => {\n return {\n arrayOfAbstractUrl,\n moduleContentMap,\n }\n },\n }\n}\n\nexport const rollupIdToUrl = (rollupId) => {\n if (hasScheme(rollupId)) {\n return rollupId\n }\n\n return pathToFileUrl(rollupId)\n}\n\nconst resolveSpecifierMap = (specifierMap, projectDirectoryUrl) => {\n const specifierMapResolved = {}\n Object.keys(specifierMap).forEach((specifier) => {\n const specifierResolved = resolveFileUrl(specifier, projectDirectoryUrl)\n specifierMapResolved[specifierResolved] = specifierMap[specifier]\n })\n return specifierMapResolved\n}\n\nconst transformAsyncInsertedByRollup = async ({\n projectDirectoryUrl,\n bundleDirectoryUrl,\n babelPluginMap,\n bundle,\n}) => {\n const asyncPluginName = findAsyncPluginNameInBabelPluginMap(babelPluginMap)\n\n if (!asyncPluginName) return\n\n // we have to do this because rollup ads\n // an async wrapper function without transpiling it\n // if your bundle contains a dynamic import\n await Promise.all(\n Object.keys(bundle).map(async (bundleFilename) => {\n const bundleInfo = bundle[bundleFilename]\n\n const { code, map } = await transformJs({\n projectDirectoryUrl,\n code: bundleInfo.code,\n url: pathToFileUrl(bundleFilename),\n map: bundleInfo.map,\n babelPluginMap: { [asyncPluginName]: babelPluginMap[asyncPluginName] },\n transformModuleIntoSystemFormat: false, // already done by rollup\n transformGenerator: false, // already done\n })\n\n const bundleFileUrl = resolveFileUrl(bundleFilename, bundleDirectoryUrl)\n\n await Promise.all([\n fileWrite(\n fileUrlToPath(bundleFileUrl),\n writeSourceMappingURL(code, `./${bundleFilename}.map`),\n ),\n fileWrite(fileUrlToPath(`${bundleFileUrl}.map`), JSON.stringify(map)),\n ])\n }),\n )\n}\n","/*\n\nbundleToCompilationResult does two things:\n\n1. Change every relative path inside rollup sourcemap to an \"absolute\" version.\nSomething like `../../importMap.json` becomes `/importMap.json`.\nIn the process // sourceMappingURL comment of the file referencing the sourcemap is updated.\n\nWe need this because vscode is configured with\n```json\n{\n \"sourceMapPathOverrides\": {\n \"/*\": \"${workspaceFolder}/*\"\n },\n```\nAnd we need to do that because I struggled to make vscode work with relative notations.\n\n2. Return { compiledSource, sources, sourcesContent, assets, assetsContent }\nIt is usefull because this object can be used to create a cache for the bundle.\nThis object is used by serveCompiledFile.\n\nOne thing to keep in mind:\nthe sourcemap.sourcesContent will contains a json file transformed to js\nwhile sourcesContent will contain the json file raw source because the corresponding\njson file etag is used to invalidate the cache\n*/\n\nimport { readFileSync } from \"fs\"\nimport { fileUrlToRelativePath, fileUrlToPath } from \"../urlHelpers.js\"\nimport { writeOrUpdateSourceMappingURL } from \"../source-mapping-url.js\"\nimport { rollupIdToUrl } from \"../generateBundle/createJsenvRollupPlugin/createJsenvRollupPlugin.js\"\n\nexport const bundleToCompilationResult = (\n { rollupBundle, arrayOfAbstractUrl, moduleContentMap },\n { projectDirectoryUrl, sourcemapPathForModule, sourcemapPathForCache },\n) => {\n if (typeof projectDirectoryUrl !== \"string\") {\n throw new TypeError(`projectDirectoryUrl must be a string, got ${projectDirectoryUrl}`)\n }\n\n const sources = []\n const sourcesContent = []\n\n const trackDependencies = (dependencyMap) => {\n Object.keys(dependencyMap).forEach((moduleUrl) => {\n // do not track abstract dependency\n if (arrayOfAbstractUrl.includes(moduleUrl)) return\n // do not track dependency outside project\n if (!moduleUrl.startsWith(projectDirectoryUrl)) return\n\n const relativePath = fileUrlToRelativePath(moduleUrl, projectDirectoryUrl).slice(2)\n if (!sources.includes(relativePath)) {\n sources.push(relativePath)\n sourcesContent.push(dependencyMap[moduleUrl].contentRaw)\n }\n })\n }\n\n const assets = []\n const assetsContent = []\n\n const mainChunk = parseRollupChunk(rollupBundle.output[0], {\n moduleContentMap,\n arrayOfAbstractUrl,\n sourcemapPathForModule,\n sourcemapPathForCache,\n })\n trackDependencies(mainChunk.dependencyMap)\n assets.push(mainChunk.sourcemapPathForCache)\n assetsContent.push(JSON.stringify(mainChunk.sourcemap, null, \" \"))\n\n rollupBundle.output.slice(1).forEach((rollupChunk) => {\n const chunkFileName = rollupChunk.fileName\n const chunk = parseRollupChunk(rollupChunk, {\n moduleContentMap,\n arrayOfAbstractUrl,\n })\n trackDependencies(chunk.dependencyMap)\n assets.push(chunkFileName)\n assetsContent.push(chunk.content)\n assets.push(chunk.sourcemapPathForCache)\n assetsContent.push(JSON.stringify(chunk.sourcemap, null, \" \"))\n })\n\n return {\n contentType: \"application/javascript\",\n compiledSource: mainChunk.content,\n sources,\n sourcesContent,\n assets,\n assetsContent,\n }\n}\n\nconst parseRollupChunk = (\n rollupChunk,\n {\n arrayOfAbstractUrl,\n moduleContentMap,\n sourcemapPathForModule = `./${rollupChunk.fileName}.map`,\n sourcemapPathForCache = `${rollupChunk.fileName}.map`,\n },\n) => {\n const dependencyMap = {}\n const moduleKeys = Object.keys(rollupChunk.modules)\n const mainModuleUrl = rollupIdToUrl(rollupChunk.facadeModuleId)\n const mainModuleSourcemap = rollupChunk.map\n\n moduleKeys.forEach((moduleId, moduleIndex) => {\n const moduleUrl = rollupIdToUrl(moduleId)\n dependencyMap[moduleUrl] = getModuleContent({\n arrayOfAbstractUrl,\n moduleContentMap,\n mainModuleUrl,\n mainModuleSourcemap,\n moduleUrl,\n moduleIndex,\n })\n })\n\n const sourcemap = rollupChunk.map\n\n const content = writeOrUpdateSourceMappingURL(rollupChunk.code, sourcemapPathForModule)\n\n return {\n url: mainModuleUrl,\n sourcemapPathForCache,\n dependencyMap,\n content,\n sourcemap,\n }\n}\n\nconst getModuleContent = ({\n arrayOfAbstractUrl,\n moduleContentMap,\n mainModuleUrl,\n mainModuleSourcemap,\n moduleUrl,\n moduleIndex,\n}) => {\n // try to get it from moduleContentMap\n if (moduleUrl in moduleContentMap) {\n return moduleContentMap[moduleUrl]\n }\n\n // otherwise try to read it from mainModuleSourcemap\n const sourcesContent = mainModuleSourcemap.sourcesContent || []\n if (moduleIndex in sourcesContent) {\n const contentFromRollupSourcemap = sourcesContent[moduleIndex]\n return {\n code: contentFromRollupSourcemap,\n raw: contentFromRollupSourcemap,\n }\n }\n\n // abstract ressource cannot be found, throw\n const isAbstract = arrayOfAbstractUrl.includes(moduleUrl)\n if (isAbstract) {\n throw new Error(`an abstract module content is missing in moduleContentMap.\n--- module url ---\n${moduleUrl}\n--- main module url ---\n${mainModuleUrl}`)\n }\n\n // try to get it from filesystem\n if (moduleUrl.startsWith(\"file:///\")) {\n const moduleFilePath = fileUrlToPath(moduleUrl)\n // this could be async but it's ok for now\n // making it async could be harder than it seems\n // because sourcesContent must be in sync with sources\n try {\n const moduleFileBuffer = readFileSync(moduleFilePath)\n const moduleFileString = String(moduleFileBuffer)\n return {\n code: moduleFileString,\n raw: moduleFileString,\n }\n } catch (e) {\n if (e && e.code === \"ENOENT\") {\n throw new Error(`a module file cannot be found.\n--- module file path ---\n${moduleFilePath}\n--- main module url ---\n${mainModuleUrl}`)\n }\n throw e\n }\n }\n\n // it's an external ressource like http, throw\n throw new Error(`a remote module content is missing in moduleContentMap.\n--- module url ---\n${moduleUrl}\n--- main module url ---\n${mainModuleUrl}`)\n}\n","// copied from\n// https://github.com/babel/babel/blob/0ee2c42b55e1893f0ae6510916405eb273587844/packages/babel-preset-env/data/plugins.json\n// Because this is an hidden implementation detail of @babel/preset-env\n// it could be deprecated or moved anytime.\n// For that reason it makes more sens to have it inlined here\n// than importing it from an undocumented location.\n// Ideally it would be documented or a separate module\n\nexport const babelPluginCompatMap = {\n \"transform-template-literals\": {\n chrome: \"41\",\n edge: \"13\",\n firefox: \"34\",\n node: \"4\",\n samsung: \"3.4\",\n opera: \"28\",\n electron: \"0.24\",\n },\n \"transform-literals\": {\n chrome: \"44\",\n edge: \"12\",\n firefox: \"53\",\n safari: \"9\",\n node: \"4\",\n ios: \"9\",\n samsung: \"4\",\n opera: \"31\",\n electron: \"0.31\",\n },\n \"transform-function-name\": {\n chrome: \"51\",\n firefox: \"53\",\n safari: \"10\",\n node: \"6.5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"38\",\n electron: \"1.2\",\n },\n \"transform-arrow-functions\": {\n chrome: \"47\",\n edge: \"13\",\n firefox: \"45\",\n safari: \"10\",\n node: \"6\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"34\",\n electron: \"0.36\",\n },\n \"transform-block-scoped-functions\": {\n chrome: \"41\",\n edge: \"12\",\n firefox: \"46\",\n safari: \"10\",\n node: \"4\",\n ie: \"11\",\n ios: \"10\",\n samsung: \"3.4\",\n opera: \"28\",\n electron: \"0.24\",\n },\n \"transform-classes\": {\n chrome: \"46\",\n edge: \"13\",\n firefox: \"45\",\n safari: \"10\",\n node: \"5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"33\",\n electron: \"0.36\",\n },\n \"transform-object-super\": {\n chrome: \"46\",\n edge: \"13\",\n firefox: \"45\",\n safari: \"10\",\n node: \"5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"33\",\n electron: \"0.36\",\n },\n \"transform-shorthand-properties\": {\n chrome: \"43\",\n edge: \"12\",\n firefox: \"33\",\n safari: \"9\",\n node: \"4\",\n ios: \"9\",\n samsung: \"4\",\n opera: \"30\",\n electron: \"0.29\",\n },\n \"transform-duplicate-keys\": {\n chrome: \"42\",\n edge: \"12\",\n firefox: \"34\",\n safari: \"9\",\n node: \"4\",\n ios: \"9\",\n samsung: \"3.4\",\n opera: \"29\",\n electron: \"0.27\",\n },\n \"transform-computed-properties\": {\n chrome: \"44\",\n edge: \"12\",\n firefox: \"34\",\n safari: \"7.1\",\n node: \"4\",\n ios: \"8\",\n samsung: \"4\",\n opera: \"31\",\n electron: \"0.31\",\n },\n \"transform-for-of\": {\n chrome: \"51\",\n edge: \"15\",\n firefox: \"53\",\n safari: \"10\",\n node: \"6.5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"38\",\n electron: \"1.2\",\n },\n \"transform-sticky-regex\": {\n chrome: \"49\",\n edge: \"13\",\n firefox: \"3\",\n safari: \"10\",\n node: \"6\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"36\",\n electron: \"1\",\n },\n \"transform-dotall-regex\": {\n chrome: \"62\",\n safari: \"11.1\",\n node: \"8.10\",\n ios: \"11.3\",\n samsung: \"8.2\",\n opera: \"49\",\n electron: \"3.1\",\n },\n \"transform-unicode-regex\": {\n chrome: \"50\",\n edge: \"13\",\n firefox: \"46\",\n safari: \"12\",\n node: \"6\",\n ios: \"12\",\n samsung: \"5\",\n opera: \"37\",\n electron: \"1.1\",\n },\n \"transform-spread\": {\n chrome: \"46\",\n edge: \"13\",\n firefox: \"36\",\n safari: \"10\",\n node: \"5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"33\",\n electron: \"0.36\",\n },\n \"transform-parameters\": {\n chrome: \"49\",\n edge: \"18\",\n firefox: \"53\",\n safari: \"10\",\n node: \"6\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"36\",\n electron: \"1\",\n },\n \"transform-destructuring\": {\n chrome: \"51\",\n edge: \"15\",\n firefox: \"53\",\n safari: \"10\",\n node: \"6.5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"38\",\n electron: \"1.2\",\n },\n \"transform-block-scoping\": {\n chrome: \"49\",\n edge: \"14\",\n firefox: \"51\",\n safari: \"11\",\n node: \"6\",\n ios: \"11\",\n samsung: \"5\",\n opera: \"36\",\n electron: \"1\",\n },\n \"transform-typeof-symbol\": {\n chrome: \"38\",\n edge: \"12\",\n firefox: \"36\",\n safari: \"9\",\n node: \"0.12\",\n ios: \"9\",\n samsung: \"3\",\n opera: \"25\",\n electron: \"0.2\",\n },\n \"transform-new-target\": {\n chrome: \"46\",\n edge: \"14\",\n firefox: \"41\",\n safari: \"10\",\n node: \"5\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"33\",\n electron: \"0.36\",\n },\n \"transform-regenerator\": {\n chrome: \"50\",\n edge: \"13\",\n firefox: \"53\",\n safari: \"10\",\n node: \"6\",\n ios: \"10\",\n samsung: \"5\",\n opera: \"37\",\n electron: \"1.1\",\n },\n \"transform-exponentiation-operator\": {\n chrome: \"52\",\n edge: \"14\",\n firefox: \"52\",\n safari: \"10.1\",\n node: \"7\",\n ios: \"10.3\",\n samsung: \"6.2\",\n opera: \"39\",\n electron: \"1.3\",\n },\n \"transform-async-to-generator\": {\n chrome: \"55\",\n edge: \"15\",\n firefox: \"52\",\n safari: \"11\",\n node: \"7.6\",\n ios: \"11\",\n samsung: \"6.2\",\n opera: \"42\",\n electron: \"1.6\",\n },\n // copy of transform-async-to-generator\n // this is not in the babel-preset-env repo\n // but we need this\n \"transform-async-to-promises\": {\n chrome: \"55\",\n edge: \"15\",\n firefox: \"52\",\n safari: \"11\",\n node: \"7.6\",\n ios: \"11\",\n samsung: \"6.2\",\n opera: \"42\",\n electron: \"1.6\",\n },\n \"proposal-async-generator-functions\": {\n chrome: \"63\",\n firefox: \"57\",\n safari: \"12\",\n node: \"10\",\n ios: \"12\",\n samsung: \"8.2\",\n opera: \"50\",\n electron: \"3.1\",\n },\n \"proposal-object-rest-spread\": {\n chrome: \"60\",\n firefox: \"55\",\n safari: \"11.1\",\n node: \"8.3\",\n ios: \"11.3\",\n samsung: \"8.2\",\n opera: \"47\",\n electron: \"2.1\",\n },\n \"proposal-optional-chaining\": {},\n \"proposal-unicode-property-regex\": {\n chrome: \"64\",\n safari: \"11.1\",\n node: \"10\",\n ios: \"11.3\",\n opera: \"51\",\n electron: \"3.1\",\n },\n \"proposal-json-strings\": {\n chrome: \"66\",\n firefox: \"62\",\n safari: \"12\",\n node: \"10\",\n ios: \"12\",\n opera: \"53\",\n electron: \"3.1\",\n },\n \"proposal-optional-catch-binding\": {\n chrome: \"66\",\n firefox: \"58\",\n safari: \"11.1\",\n node: \"10\",\n ios: \"11.3\",\n opera: \"53\",\n electron: \"3.1\",\n },\n \"transform-named-capturing-groups-regex\": {\n chrome: \"64\",\n safari: \"11.1\",\n node: \"10\",\n ios: \"11.3\",\n opera: \"51\",\n electron: \"3.1\",\n },\n \"transform-member-expression-literals\": {\n chrome: \"7\",\n opera: \"12\",\n edge: \"12\",\n firefox: \"2\",\n safari: \"5.1\",\n node: \"0.10\",\n ie: \"9\",\n android: \"4\",\n ios: \"6\",\n phantom: \"2\",\n samsung: \"2.1\",\n electron: \"5\",\n },\n \"transform-property-literals\": {\n chrome: \"7\",\n opera: \"12\",\n edge: \"12\",\n firefox: \"2\",\n safari: \"5.1\",\n node: \"0.10\",\n ie: \"9\",\n android: \"4\",\n ios: \"6\",\n phantom: \"2\",\n samsung: \"2.1\",\n electron: \"5\",\n },\n \"transform-reserved-words\": {\n chrome: \"13\",\n opera: \"10.50\",\n edge: \"12\",\n firefox: \"2\",\n safari: \"3.1\",\n node: \"0.10\",\n ie: \"9\",\n android: \"4.4\",\n ios: \"6\",\n phantom: \"2\",\n samsung: \"2.1\",\n electron: \"0.2\",\n },\n}\n","import { pathToFileURL, fileURLToPath } from \"url\"\n\nexport const pathToDirectoryUrl = (path) => {\n const directoryUrl = path.startsWith(\"file://\") ? path : String(pathToFileURL(path))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const pathToFileUrl = (path) => {\n return String(pathToFileURL(path))\n}\n\nexport const fileUrlToPath = (fileUrl) => {\n return fileURLToPath(fileUrl)\n}\n\nexport const resolveDirectoryUrl = (specifier, baseUrl) => {\n const directoryUrl = String(new URL(specifier, baseUrl))\n if (directoryUrl.endsWith(\"/\")) {\n return directoryUrl\n }\n return `${directoryUrl}/`\n}\n\nexport const hasScheme = (string) => {\n return /^[a-zA-Z]{2,}:/.test(string)\n}\n\nexport const fileUrlToRelativePath = (fileUrl, baseUrl) => {\n if (fileUrl.startsWith(baseUrl)) {\n return `./${fileUrl.slice(baseUrl.length)}`\n }\n return fileUrl\n}\n\nexport const resolveFileUrl = (specifier, baseUrl) => {\n return String(new URL(specifier, baseUrl))\n}\n","import { pathToFileUrl, resolveDirectoryUrl } from \"../urlHelpers.js\"\n\nlet jsenvCoreDirectoryUrl\nif (typeof __filename === \"string\") {\n jsenvCoreDirectoryUrl = resolveDirectoryUrl(\n // get ride of dist/node/main.js\n \"../../\",\n pathToFileUrl(__filename),\n )\n} else {\n jsenvCoreDirectoryUrl = resolveDirectoryUrl(\n // get ride of src/jsenvCoreDirectoryUrl/jsenvCoreDirectoryUrl.js\n \"../../\",\n import.meta.url,\n )\n}\n\nexport { jsenvCoreDirectoryUrl }\n","// https://github.com/babel/babel/blob/99f4f6c3b03c7f3f67cf1b9f1a21b80cfd5b0224/packages/babel-core/src/tools/build-external-helpers.js\n// the list of possible helpers:\n// https://github.com/babel/babel/blob/99f4f6c3b03c7f3f67cf1b9f1a21b80cfd5b0224/packages/babel-helpers/src/helpers.js#L13\nimport { jsenvCoreDirectoryUrl } from \"../jsenvCoreDirectoryUrl/jsenvCoreDirectoryUrl.js\"\n\nconst { list } = import.meta.require(\"@babel/helpers\")\n\nconst babelHelperNameInsideJsenvCoreArray = [\n \"applyDecoratedDescriptor\",\n \"arrayWithHoles\",\n \"arrayWithoutHoles\",\n \"assertThisInitialized\",\n \"AsyncGenerator\",\n \"asyncGeneratorDelegate\",\n \"asyncIterator\",\n \"asyncToGenerator\",\n \"awaitAsyncGenerator\",\n \"AwaitValue\",\n \"classCallCheck\",\n \"classNameTDZError\",\n \"classPrivateFieldDestructureSet\",\n \"classPrivateFieldGet\",\n \"classPrivateFieldLooseBase\",\n \"classPrivateFieldLooseKey\",\n \"classPrivateFieldSet\",\n \"classPrivateMethodGet\",\n \"classPrivateMethodSet\",\n \"classStaticPrivateFieldSpecGet\",\n \"classStaticPrivateFieldSpecSet\",\n \"classStaticPrivateMethodGet\",\n \"classStaticPrivateMethodSet\",\n \"construct\",\n \"createClass\",\n \"decorate\",\n \"defaults\",\n \"defineEnumerableProperties\",\n \"defineProperty\",\n \"extends\",\n \"get\",\n \"getPrototypeOf\",\n \"inherits\",\n \"inheritsLoose\",\n \"initializerDefineProperty\",\n \"initializerWarningHelper\",\n \"instanceof\",\n \"interopRequireDefault\",\n \"interopRequireWildcard\",\n \"isNativeFunction\",\n \"iterableToArray\",\n \"iterableToArrayLimit\",\n \"iterableToArrayLimitLoose\",\n \"jsx\",\n \"newArrowCheck\",\n \"nonIterableRest\",\n \"nonIterableSpread\",\n \"objectDestructuringEmpty\",\n \"objectSpread\",\n \"objectSpread2\",\n \"objectWithoutProperties\",\n \"objectWithoutPropertiesLoose\",\n \"possibleConstructorReturn\",\n \"readOnlyError\",\n \"set\",\n \"setPrototypeOf\",\n \"skipFirstGeneratorNext\",\n \"slicedToArray\",\n \"slicedToArrayLoose\",\n \"superPropBase\",\n \"taggedTemplateLiteral\",\n \"taggedTemplateLiteralLoose\",\n \"tdz\",\n \"temporalRef\",\n \"temporalUndefined\",\n \"toArray\",\n \"toConsumableArray\",\n \"toPrimitive\",\n \"toPropertyKey\",\n \"typeof\",\n \"wrapAsyncGenerator\",\n \"wrapNativeSuper\",\n \"wrapRegExp\",\n]\n\nconst babelHelperMap = {}\nlist.forEach((babelHelperName) => {\n if (babelHelperNameInsideJsenvCoreArray.includes(babelHelperName)) {\n babelHelperMap[\n babelHelperName\n ] = `@jsenv/core/helpers/babel/${babelHelperName}/${babelHelperName}.js`\n } else {\n babelHelperMap[babelHelperName] = `${jsenvCoreDirectoryUrl}.babel-helpers/${babelHelperName}.js`\n }\n})\nexport { babelHelperMap }\n","const rimraf = import.meta.require(\"rimraf\")\n\nexport const removeDirectory = (path) =>\n new Promise((resolve, reject) =>\n rimraf(path, (error) => {\n if (error) reject(error)\n else resolve()\n }),\n )\n","export const valueToVersion = (value) => {\n if (typeof value === \"number\") {\n return numberToVersion(value)\n }\n\n if (typeof value === \"string\") {\n return stringToVersion(value)\n }\n\n throw new TypeError(createValueErrorMessage({ version: value }))\n}\n\nconst numberToVersion = (number) => {\n return {\n major: number,\n minor: 0,\n patch: 0,\n }\n}\n\nconst stringToVersion = (string) => {\n if (string.indexOf(\".\") > -1) {\n const parts = string.split(\".\")\n return {\n major: Number(parts[0]),\n minor: parts[1] ? Number(parts[1]) : 0,\n patch: parts[2] ? Number(parts[2]) : 0,\n }\n }\n\n if (isNaN(string)) {\n return {\n major: 0,\n minor: 0,\n patch: 0,\n }\n }\n\n return {\n major: Number(string),\n minor: 0,\n patch: 0,\n }\n}\n\nconst createValueErrorMessage = ({ value }) => `value must be a number or a string.\nvalue: ${value}`\n","import { valueToVersion } from \"./valueToVersion.js\"\n\nexport const versionCompare = (versionA, versionB) => {\n const semanticVersionA = valueToVersion(versionA)\n const semanticVersionB = valueToVersion(versionB)\n\n const majorDiff = semanticVersionA.major - semanticVersionB.major\n if (majorDiff > 0) {\n return majorDiff\n }\n if (majorDiff < 0) {\n return majorDiff\n }\n\n const minorDiff = semanticVersionA.minor - semanticVersionB.minor\n if (minorDiff > 0) {\n return minorDiff\n }\n if (minorDiff < 0) {\n return minorDiff\n }\n\n const patchDiff = semanticVersionA.patch - semanticVersionB.patch\n if (patchDiff > 0) {\n return patchDiff\n }\n if (patchDiff < 0) {\n return patchDiff\n }\n\n return 0\n}\n","import { versionCompare } from \"./versionCompare.js\"\n\nexport const versionIsBelow = (versionSupposedBelow, versionSupposedAbove) => {\n return versionCompare(versionSupposedBelow, versionSupposedAbove) < 0\n}\n","import { versionIsBelow } from \"./versionIsBelow.js\"\n\nexport const findHighestVersion = (...values) => {\n if (values.length === 0) throw new Error(`missing argument`)\n\n return values.reduce((highestVersion, value) => {\n if (versionIsBelow(highestVersion, value)) {\n return value\n }\n return highestVersion\n })\n}\n","import { babelPluginCompatMap as babelPluginCompatMapFallback } from \"../babelPluginCompatMap/babelPluginCompatMap.js\"\nimport { findHighestVersion } from \"../semantic-versioning/index.js\"\n\nexport const computeBabelPluginMapForPlatform = ({\n babelPluginMap,\n babelPluginCompatMap = babelPluginCompatMapFallback,\n platformName,\n platformVersion,\n}) => {\n if (typeof babelPluginMap !== \"object\") {\n throw new TypeError(`babelPluginMap must be an object, got ${babelPluginMap}`)\n }\n if (typeof babelPluginCompatMap !== \"object\") {\n throw new TypeError(`babelPluginCompatMap must be an object, got ${babelPluginCompatMap}`)\n }\n if (typeof platformName !== \"string\") {\n throw new TypeError(`platformName must be a string, got ${platformName}`)\n }\n if (typeof platformVersion !== \"string\") {\n throw new TypeError(`platformVersion must be a string, got ${platformVersion}`)\n }\n\n const babelPluginMapForPlatform = {}\n Object.keys(babelPluginMap).forEach((key) => {\n const compatible = platformIsCompatibleWithFeature({\n platformName,\n platformVersion,\n platformCompatMap: key in babelPluginCompatMap ? babelPluginCompatMap[key] : {},\n })\n if (!compatible) {\n babelPluginMapForPlatform[key] = babelPluginMap[key]\n }\n })\n return babelPluginMapForPlatform\n}\n\nconst platformIsCompatibleWithFeature = ({ platformName, platformVersion, platformCompatMap }) => {\n const platformCompatibleVersion = computePlatformCompatibleVersion({\n platformCompatMap,\n platformName,\n })\n const highestVersion = findHighestVersion(platformVersion, platformCompatibleVersion)\n return highestVersion === platformVersion\n}\n\nconst computePlatformCompatibleVersion = ({ platformCompatMap, platformName }) => {\n return platformName in platformCompatMap ? platformCompatMap[platformName] : \"Infinity\"\n}\n","export const BEST_ID = \"best\"\n\nexport const OTHERWISE_ID = \"otherwise\"\n","// we could reuse this to get a list of polyfill\n// using https://github.com/babel/babel/blob/master/packages/babel-preset-env/data/built-ins.json#L1\n// adding a featureNameArray to every group\n// and according to that featureNameArray, add these polyfill\n// to the generated bundle\n\nexport const jsenvPluginCompatMap = {}\n","import { jsenvPluginCompatMap as jsenvPluginCompatMapFallback } from \"../jsenvPluginCompatMap/jsenvPluginCompatMap.js\"\nimport { findHighestVersion } from \"../semantic-versioning/index.js\"\n\nexport const computeJsenvPluginMapForPlatform = ({\n jsenvPluginMap,\n jsenvPluginCompatMap = jsenvPluginCompatMapFallback,\n platformName,\n platformVersion,\n}) => {\n if (typeof jsenvPluginMap !== \"object\") {\n throw new TypeError(`jsenvPluginMap must be a object, got ${jsenvPluginMap}`)\n }\n if (typeof jsenvPluginCompatMap !== \"object\") {\n throw new TypeError(`jsenvPluginCompatMap must be a string, got ${jsenvPluginCompatMap}`)\n }\n if (typeof platformName !== \"string\") {\n throw new TypeError(`platformName must be a string, got ${platformName}`)\n }\n if (typeof platformVersion !== \"string\") {\n throw new TypeError(`platformVersion must be a string, got ${platformVersion}`)\n }\n\n const jsenvPluginMapForPlatform = {}\n Object.keys(jsenvPluginMap).forEach((key) => {\n const compatible = platformIsCompatibleWithFeature({\n platformName,\n platformVersion,\n featureCompat: key in jsenvPluginCompatMap ? jsenvPluginCompatMap[key] : {},\n })\n if (!compatible) {\n jsenvPluginMapForPlatform[key] = jsenvPluginMap[key]\n }\n })\n return jsenvPluginMapForPlatform\n}\n\nconst platformIsCompatibleWithFeature = ({ platformName, platformVersion, featureCompat }) => {\n const platformCompatibleVersion = computePlatformCompatibleVersion({\n featureCompat,\n platformName,\n })\n const highestVersion = findHighestVersion(platformVersion, platformCompatibleVersion)\n return highestVersion === platformVersion\n}\n\nconst computePlatformCompatibleVersion = ({ featureCompat, platformName }) => {\n return platformName in featureCompat ? featureCompat[platformName] : \"Infinity\"\n}\n","const { buildExternalHelpers } = import.meta.require(\"@babel/core\")\nconst { getDependencies } = import.meta.require(\"@babel/helpers\")\n\nexport const generateBabelHelper = (name) => {\n const helpersToBuild = [name]\n\n /**\n * we have to ensure we generate helper dependencies too because\n * some helper contains import like\n * import \"setPrototypeOf\"\n * and babel deletes them somehow during buildExternalHelpers\n *\n * To fix that we could for instance extract babel helpers into\n * actual files like we already do for global-this\n * or regenerator-runtime\n *\n * But it means every babel update means updating thoose files too.\n * for now let's keep it like that\n */\n\n const ensureDependencies = (name) => {\n const dependencies = getDependencies(name)\n dependencies.forEach((name) => {\n if (helpersToBuild.includes(name)) {\n return\n }\n helpersToBuild.push(name)\n ensureDependencies(name)\n })\n }\n ensureDependencies(name)\n\n return buildExternalHelpers(helpersToBuild, \"module\")\n}\n","export const groupHaveSameRequirements = (leftGroup, rightGroup) => {\n return (\n leftGroup.babelPluginRequiredNameArray.join(\"\") ===\n rightGroup.babelPluginRequiredNameArray.join(\"\") &&\n leftGroup.jsenvPluginRequiredNameArray.join(\"\") ===\n rightGroup.jsenvPluginRequiredNameArray.join(\"\")\n )\n}\n","import { babelPluginCompatMap as babelPluginCompatMapFallback } from \"../babelPluginCompatMap/babelPluginCompatMap.js\"\nimport { jsenvPluginCompatMap as jsenvPluginCompatMapFallback } from \"../jsenvPluginCompatMap/jsenvPluginCompatMap.js\"\nimport { computeBabelPluginMapForPlatform } from \"../computeBabelPluginMapForPlatform/computeBabelPluginMapForPlatform.js\"\nimport { computeJsenvPluginMapForPlatform } from \"../computeJsenvPluginMapForPlatform/computeJsenvPluginMapForPlatform.js\"\nimport { findHighestVersion, versionCompare } from \"../semantic-versioning/index.js\"\nimport { groupHaveSameRequirements } from \"./groupHaveSameRequirements.js\"\n\nexport const generatePlatformGroupArray = ({\n babelPluginMap,\n jsenvPluginMap,\n babelPluginCompatMap = babelPluginCompatMapFallback,\n jsenvPluginCompatMap = jsenvPluginCompatMapFallback,\n platformName,\n}) => {\n const versionArray = []\n Object.keys(babelPluginMap).forEach((babelPluginKey) => {\n if (babelPluginKey in babelPluginCompatMap) {\n const babelPluginCompat = babelPluginCompatMap[babelPluginKey]\n if (platformName in babelPluginCompat) {\n const version = String(babelPluginCompat[platformName])\n if (!versionArray.includes(version)) {\n versionArray.push(version)\n }\n }\n }\n })\n Object.keys(jsenvPluginMap).forEach((jsenvPluginKey) => {\n if (jsenvPluginKey in jsenvPluginCompatMap) {\n const jsenvPluginCompat = jsenvPluginCompatMap[jsenvPluginKey]\n if (platformName in jsenvPluginCompat) {\n const version = String(jsenvPluginCompat[platformName])\n if (!versionArray.includes(version)) {\n versionArray.push(version)\n }\n }\n }\n })\n versionArray.push(\"0.0.0\")\n versionArray.sort(versionCompare)\n\n const platformGroupArray = []\n\n versionArray.forEach((version) => {\n const babelPluginMapForPlatform = computeBabelPluginMapForPlatform({\n babelPluginMap,\n babelPluginCompatMap,\n platformName,\n platformVersion: version,\n })\n const babelPluginRequiredNameArray = Object.keys(babelPluginMap)\n .filter((babelPluginKey) => babelPluginKey in babelPluginMapForPlatform)\n .sort()\n const jsenvPluginMapForPlatform = computeJsenvPluginMapForPlatform({\n jsenvPluginMap,\n jsenvPluginCompatMap,\n platformName,\n platformVersion: version,\n })\n const jsenvPluginRequiredNameArray = Object.keys(jsenvPluginMap)\n .filter((jsenvPluginKey) => jsenvPluginKey in jsenvPluginMapForPlatform)\n .sort()\n\n const group = {\n babelPluginRequiredNameArray,\n jsenvPluginRequiredNameArray,\n platformCompatMap: {\n [platformName]: version,\n },\n }\n\n const groupWithSameRequirements = platformGroupArray.find((platformGroupCandidate) =>\n groupHaveSameRequirements(platformGroupCandidate, group),\n )\n\n if (groupWithSameRequirements) {\n groupWithSameRequirements.platformCompatMap[platformName] = findHighestVersion(\n groupWithSameRequirements.platformCompatMap[platformName],\n version,\n )\n } else {\n platformGroupArray.push(group)\n }\n })\n\n return platformGroupArray\n}\n","import { findHighestVersion } from \"../semantic-versioning/index.js\"\n\nexport const composePlatformCompatMap = (platformCompatMap, secondPlatformCompatMap) => {\n return objectComposeValue(\n normalizePlatformCompatMapVersions(platformCompatMap),\n normalizePlatformCompatMapVersions(secondPlatformCompatMap),\n (version, secondVersion) => findHighestVersion(version, secondVersion),\n )\n}\n\nconst normalizePlatformCompatMapVersions = (platformCompatibility) => {\n return objectMapValue(platformCompatibility, (version) => String(version))\n}\n\nconst objectMapValue = (object, callback) => {\n const mapped = {}\n\n Object.keys(object).forEach((key) => {\n mapped[key] = callback(object[key], key, object)\n })\n\n return mapped\n}\n\nconst objectComposeValue = (previous, object, callback) => {\n const composed = { ...previous }\n\n Object.keys(object).forEach((key) => {\n composed[key] = key in composed ? callback(composed[key], object[key]) : object[key]\n })\n\n return composed\n}\n","import { composePlatformCompatMap } from \"./composePlatformCompatMap.js\"\nimport { groupHaveSameRequirements } from \"./groupHaveSameRequirements.js\"\n\nexport const composeGroupArray = (...arrayOfGroupArray) => {\n return arrayOfGroupArray.reduce(groupArrayReducer, [])\n}\n\nconst groupArrayReducer = (previousGroupArray, groupArray) => {\n const reducedGroupArray = []\n\n previousGroupArray.forEach((group) => {\n reducedGroupArray.push(copyGroup(group))\n })\n\n groupArray.forEach((group) => {\n const groupWithSameRequirements = reducedGroupArray.find((existingGroupCandidate) =>\n groupHaveSameRequirements(group, existingGroupCandidate),\n )\n if (groupWithSameRequirements) {\n groupWithSameRequirements.platformCompatMap = composePlatformCompatMap(\n groupWithSameRequirements.platformCompatMap,\n group.platformCompatMap,\n )\n } else {\n reducedGroupArray.push(copyGroup(group))\n }\n })\n\n return reducedGroupArray\n}\n\nconst copyGroup = ({\n babelPluginRequiredNameArray,\n jsenvPluginRequiredNameArray,\n platformCompatMap,\n}) => {\n return {\n babelPluginRequiredNameArray: babelPluginRequiredNameArray.slice(),\n jsenvPluginRequiredNameArray: jsenvPluginRequiredNameArray.slice(),\n platformCompatMap: { ...platformCompatMap },\n }\n}\n","import { generatePlatformGroupArray } from \"./generatePlatformGroupArray.js\"\nimport { composeGroupArray } from \"./composeGroupArray.js\"\n\nexport const generateAllPlatformGroupArray = ({\n babelPluginMap,\n jsenvPluginMap,\n babelPluginCompatMap,\n jsenvPluginCompatMap,\n platformNames,\n}) => {\n const arrayOfGroupArray = platformNames.map((platformName) =>\n generatePlatformGroupArray({\n babelPluginMap,\n jsenvPluginMap,\n babelPluginCompatMap,\n jsenvPluginCompatMap,\n platformName,\n }),\n )\n const groupArray = composeGroupArray(...arrayOfGroupArray)\n return groupArray\n}\n","import { versionCompare, findHighestVersion } from \"../semantic-versioning/index.js\"\n\nexport const platformCompatMapToScore = (platformCompatMap, platformScoreMap) => {\n return Object.keys(platformCompatMap).reduce((previous, platformName) => {\n const platformVersion = platformCompatMap[platformName]\n return previous + platformToScore(platformName, platformVersion, platformScoreMap)\n }, 0)\n}\n\nconst platformToScore = (platformName, platformVersion, platformScoreMap) => {\n if (platformName in platformScoreMap === false) return platformScoreMap.other || 0\n\n const versionUsageMap = platformScoreMap[platformName]\n const versionArray = Object.keys(versionUsageMap)\n if (versionArray.length === 0) return platformScoreMap.other || 0\n\n const versionArrayAscending = versionArray.sort(versionCompare)\n const highestVersion = versionArrayAscending[versionArray.length - 1]\n\n if (findHighestVersion(platformVersion, highestVersion) === platformVersion)\n return versionUsageMap[highestVersion]\n\n const closestVersion = versionArrayAscending\n .reverse()\n .find((version) => findHighestVersion(platformVersion, version) === platformVersion)\n\n if (!closestVersion) return platformScoreMap.other || 0\n\n return versionUsageMap[closestVersion]\n}\n","/*\n\n# featureCompatMap legend\n\n featureName\n │\n{ ┌──────────┴────────────┐\n \"transform-block-scoping\": {─┐\n \"chrome\": \"10\", │\n \"safari\": \"3.0\", platformCompatMap\n \"firefox\": \"5.1\" │\n}────┼─────────┼─────────────┘\n} │ └─────┐\n platformName platformVersion\n\n# group legend\n\n{\n \"best\": {\n \"babelPluginRequiredNameArray\" : [\n \"transform-block-scoping\",\n ],\n \"platformCompatMap\": {\n \"chrome\": \"10\",\n \"firefox\": \"6\"\n }\n }\n}\n\nTake chars below to update legends\n─│┌┐└┘├┤┴┬\n\n*/\n\nimport { generateAllPlatformGroupArray } from \"./generateAllPlatformGroupArray.js\"\nimport { platformCompatMapToScore } from \"./platformCompatMapToScore.js\"\nimport { OTHERWISE_ID, BEST_ID } from \"../GROUP_ID.js\"\n\nexport const generateGroupMap = ({\n babelPluginMap,\n // jsenv plugin are for later, for now, nothing is using them\n jsenvPluginMap = {},\n babelPluginCompatMap,\n jsenvPluginCompatMap,\n platformScoreMap,\n groupCount = 1,\n // pass this to true if you don't care if someone tries to run your code\n // on a platform which is not inside platformScoreMap.\n platformAlwaysInsidePlatformScoreMap = false,\n // pass this to true if you think you will always be able to detect\n // the platform or that if you fail to do so you don't care.\n platformWillAlwaysBeKnown = false,\n}) => {\n if (typeof babelPluginMap !== \"object\") {\n throw new TypeError(`babelPluginMap must be an object, got ${babelPluginMap}`)\n }\n if (typeof jsenvPluginMap !== \"object\") {\n throw new TypeError(`jsenvPluginMap must be an object, got ${jsenvPluginMap}`)\n }\n if (typeof platformScoreMap !== \"object\") {\n throw new TypeError(`platformScoreMap must be an object, got ${platformScoreMap}`)\n }\n if (typeof groupCount < 1) {\n throw new TypeError(`groupCount must be above 1, got ${groupCount}`)\n }\n\n const groupWithoutFeature = {\n babelPluginRequiredNameArray: Object.keys(babelPluginMap),\n jsenvPluginRequiredNameArray: Object.keys(jsenvPluginMap),\n platformCompatMap: {},\n }\n\n // when we create one group and we cannot ensure\n // code will be runned on a platform inside platformScoreMap\n // then we return otherwise group to be safe\n if (groupCount === 1 && !platformAlwaysInsidePlatformScoreMap) {\n return {\n [OTHERWISE_ID]: groupWithoutFeature,\n }\n }\n\n const allPlatformGroupArray = generateAllPlatformGroupArray({\n babelPluginMap,\n babelPluginCompatMap,\n jsenvPluginMap,\n jsenvPluginCompatMap,\n platformNames: arrayWithoutValue(Object.keys(platformScoreMap), \"other\"),\n })\n\n if (allPlatformGroupArray.length === 0) {\n return {\n [OTHERWISE_ID]: groupWithoutFeature,\n }\n }\n\n const groupToScore = ({ platformCompatMap }) =>\n platformCompatMapToScore(platformCompatMap, platformScoreMap)\n\n const allPlatformGroupArraySortedByScore = allPlatformGroupArray.sort(\n (a, b) => groupToScore(b) - groupToScore(a),\n )\n\n const length = allPlatformGroupArraySortedByScore.length\n\n // if we arrive here and want a single group\n // we take the worst group and consider it's our best group\n // because it's the lowest platform we want to support\n if (groupCount === 1) {\n return {\n [BEST_ID]: allPlatformGroupArraySortedByScore[length - 1],\n }\n }\n\n const addOtherwiseToBeSafe = !platformAlwaysInsidePlatformScoreMap || !platformWillAlwaysBeKnown\n\n const lastGroupIndex = addOtherwiseToBeSafe ? groupCount - 1 : groupCount\n\n const groupArray =\n length + 1 > groupCount\n ? allPlatformGroupArraySortedByScore.slice(0, lastGroupIndex)\n : allPlatformGroupArraySortedByScore\n\n const groupMap = {}\n groupArray.forEach((group, index) => {\n if (index === 0) {\n groupMap[BEST_ID] = group\n } else {\n groupMap[`intermediate-${index + 1}`] = group\n }\n })\n if (addOtherwiseToBeSafe) {\n groupMap[OTHERWISE_ID] = groupWithoutFeature\n }\n\n return groupMap\n}\n\nconst arrayWithoutValue = (array, value) =>\n array.filter((valueCandidate) => valueCandidate !== value)\n","import { fileMakeDirname } from \"@dmail/helper\"\nimport { createLogger } from \"@jsenv/logger\"\nimport { readCache } from \"./readCache.js\"\nimport { validateCache } from \"./validateCache.js\"\nimport { updateCache } from \"./updateCache.js\"\nimport { getCacheJsonFilePath, getSourceFilePath, getCompiledFilePath } from \"./locaters.js\"\nimport { createLockRegistry } from \"./createLockRegistry.js\"\n\nconst { lockForRessource } = createLockRegistry()\n\nconst lockfile = import.meta.require(\"proper-lockfile\")\n\nexport const getOrGenerateCompiledFile = async ({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath = sourceRelativePath,\n compile,\n cacheIgnored = false,\n cacheHitTracking = false,\n cacheInterProcessLocking = false,\n ifEtagMatch,\n ifModifiedSinceDate,\n logLevel,\n}) => {\n if (typeof projectDirectoryUrl !== \"string\") {\n throw new TypeError(`projectDirectoryUrl must be a string, got ${projectDirectoryUrl}`)\n }\n if (typeof cacheDirectoryUrl !== \"string\") {\n throw new TypeError(`cacheDirectoryUrl must be a string, got ${cacheDirectoryUrl}`)\n }\n if (typeof sourceRelativePath !== \"string\") {\n throw new TypeError(`sourceRelativePath must be a string, got ${sourceRelativePath}`)\n }\n if (typeof compileRelativePath !== \"string\") {\n throw new TypeError(`compileRelativePath must be a string, got ${compileRelativePath}`)\n }\n if (typeof compile !== \"function\") {\n throw new TypeError(`compile must be a function, got ${compile}`)\n }\n\n const logger = createLogger({ logLevel })\n\n return startAsap(\n async () => {\n const { cache, compileResult, compileResultStatus } = await computeCompileReport({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n compile,\n ifEtagMatch,\n ifModifiedSinceDate,\n cacheIgnored,\n logger,\n })\n\n // useless because missing source cannot invalidate cache\n // see validateSource in validateCache.js\n // some sources might not exists on the filesystem\n // keep them in the sourcemap\n // however do not mark them as dependency of the compiled version\n // const sources = []\n // const sourcesContent = []\n // await Promise.all(\n // compileResult.sources.map(async (source, index) => {\n // const path = pathnameToOperatingSystemPath(`${projectPathname}${source}`)\n // const pathLeadsToFile = await new Promise((resolve) => {\n // stat(path, (error, stats) => {\n // if (error) {\n // resolve(false)\n // } else {\n // resolve(stats.isFile())\n // }\n // })\n // })\n // if (pathLeadsToFile) {\n // sources[index] = source\n // sourcesContent[index] = compileResult.sourcesContent[index]\n // }\n // }),\n // )\n\n // const compileResultWithoutMissingSource = {\n // ...compileResult,\n // sources: sources.filter((source) => source !== undefined),\n // sourcesContent: sourcesContent.filter((sourceContent) => sourceContent !== undefined),\n // }\n\n await updateCache({\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n cacheHitTracking,\n cache,\n compileResult,\n compileResultStatus,\n logger,\n })\n\n return { cache, compileResult, compileResultStatus }\n },\n {\n cacheDirectoryUrl,\n compileRelativePath,\n cacheInterProcessLocking,\n logger,\n },\n )\n}\n\nconst computeCompileReport = async ({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n compile,\n ifEtagMatch,\n ifModifiedSinceDate,\n cacheIgnored,\n logger,\n}) => {\n const cache = cacheIgnored\n ? null\n : await readCache({\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n logger,\n })\n\n if (!cache) {\n const compileResult = await callCompile({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n compile,\n logger,\n })\n\n return {\n cache: null,\n compileResult,\n compileResultStatus: \"created\",\n }\n }\n\n const cacheValidation = await validateCache({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n compileRelativePath,\n cache,\n ifEtagMatch,\n ifModifiedSinceDate,\n logger,\n })\n if (!cacheValidation.valid) {\n const compileResult = await callCompile({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n compile,\n logger,\n })\n return { cache, compileResult, compileResultStatus: \"updated\" }\n }\n\n const { contentType, sources, assets } = cache\n const { compiledSource, sourcesContent, assetsContent } = cacheValidation.data\n return {\n cache,\n compileResult: { contentType, compiledSource, sources, sourcesContent, assets, assetsContent },\n compileResultStatus: \"cached\",\n }\n}\n\nconst callCompile = async ({\n projectDirectoryUrl,\n cacheDirectoryUrl,\n sourceRelativePath,\n compileRelativePath,\n compile,\n logger,\n}) => {\n const sourceFilePath = getSourceFilePath({\n projectDirectoryUrl,\n sourceRelativePath,\n })\n const compiledFilePath = getCompiledFilePath({\n cacheDirectoryUrl,\n compileRelativePath,\n })\n logger.debug(`compile ${sourceRelativePath}`)\n\n const {\n sources = [],\n sourcesContent = [],\n assets = [],\n assetsContent = [],\n contentType,\n compiledSource,\n ...rest\n } = await compile({\n sourceRelativePath,\n compileRelativePath,\n sourceFilePath,\n compiledFilePath,\n })\n\n if (typeof contentType !== \"string\") {\n throw new TypeError(`compile must return a contentType string, got ${contentType}`)\n }\n if (typeof compiledSource !== \"string\") {\n throw new TypeError(`compile must return a compiledSource string, got ${compiledSource}`)\n }\n\n return {\n contentType,\n compiledSource,\n sources,\n sourcesContent,\n assets,\n assetsContent,\n ...rest,\n }\n}\n\nconst startAsap = async (\n fn,\n { logger, cacheDirectoryUrl, compileRelativePath, cacheInterProcessLocking },\n) => {\n const cacheJsonFilePath = getCacheJsonFilePath({\n cacheDirectoryUrl,\n compileRelativePath,\n })\n\n logger.debug(`lock ${cacheJsonFilePath}`)\n // in case this process try to concurrently access meta we wait for previous to be done\n const unlockLocal = await lockForRessource(cacheJsonFilePath)\n\n let unlockInterProcessLock = () => {}\n if (cacheInterProcessLocking) {\n // after that we use a lock pathnameRelative to be sure we don't conflict with other process\n // trying to do the same (mapy happen when spawining multiple server for instance)\n // https://github.com/moxystudio/node-proper-lockfile/issues/69\n await fileMakeDirname(cacheJsonFilePath)\n // https://github.com/moxystudio/node-proper-lockfile#lockfile-options\n unlockInterProcessLock = await lockfile.lock(cacheJsonFilePath, {\n realpath: false,\n retries: {\n retries: 20,\n minTimeout: 20,\n maxTimeout: 500,\n },\n })\n }\n\n try {\n return await fn()\n } finally {\n // we want to unlock in case of error too\n unlockLocal()\n unlockInterProcessLock()\n logger.debug(`unlock ${cacheJsonFilePath}`)\n }\n\n // here in case of error.code === 'ELOCKED' thrown from here\n // https://github.com/moxystudio/node-proper-lockfile/blob/1a478a43a077a7a7efc46ac79fd8f713a64fd499/lib/lockfile.js#L54\n // we could give a better failure message when server tries to compile a file\n // otherwise he'll get a 500 without much more info to debug\n\n // we use two lock because the local lock is very fast, it's a sort of perf improvement\n}\n","/* eslint-disable */\n// https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-modules-systemjs\n\nconst { template, types: t } = import.meta.require(\"@babel/core\")\nconst { declare } = import.meta.require(\"@babel/helper-plugin-utils\")\nconst { default: hoistVariables } = import.meta.require(\"@babel/helper-hoist-variables\")\n\nconst buildTemplate = template(`\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE\n };\n });\n`)\n\nconst buildExportAll = template(`\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n`)\n\nfunction constructExportCall(path, exportIdent, exportNames, exportValues, exportStarTarget) {\n const statements = []\n if (exportNames.length === 1) {\n statements.push(\n t.expressionStatement(\n t.callExpression(exportIdent, [t.stringLiteral(exportNames[0]), exportValues[0]]),\n ),\n )\n // eslint-disable-next-line no-negated-condition\n } else if (!exportStarTarget) {\n const objectProperties = []\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i]\n const exportValue = exportValues[i]\n objectProperties.push(t.objectProperty(t.identifier(exportName), exportValue))\n }\n statements.push(\n t.expressionStatement(t.callExpression(exportIdent, [t.objectExpression(objectProperties)])),\n )\n } else {\n const exportObj = path.scope.generateUid(\"exportObj\")\n\n statements.push(\n t.variableDeclaration(\"var\", [\n t.variableDeclarator(t.identifier(exportObj), t.objectExpression([])),\n ]),\n )\n\n statements.push(\n buildExportAll({\n KEY: path.scope.generateUidIdentifier(\"key\"),\n EXPORT_OBJ: t.identifier(exportObj),\n TARGET: exportStarTarget,\n }),\n )\n\n for (let i = 0; i < exportNames.length; i++) {\n const exportName = exportNames[i]\n const exportValue = exportValues[i]\n\n statements.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.memberExpression(t.identifier(exportObj), t.identifier(exportName)),\n exportValue,\n ),\n ),\n )\n }\n\n statements.push(t.expressionStatement(t.callExpression(exportIdent, [t.identifier(exportObj)])))\n }\n return statements\n}\n\nconst TYPE_IMPORT = \"Import\"\n\nexport default declare((api, options) => {\n api.assertVersion(7)\n\n const { systemGlobal = \"System\" } = options\n const IGNORE_REASSIGNMENT_SYMBOL = Symbol()\n\n const reassignmentVisitor = {\n \"AssignmentExpression|UpdateExpression\"(path) {\n if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return\n path.node[IGNORE_REASSIGNMENT_SYMBOL] = true\n\n const arg = path.get(path.isAssignmentExpression() ? \"left\" : \"argument\")\n\n if (arg.isObjectPattern() || arg.isArrayPattern()) {\n const exprs = [path.node]\n for (const name of Object.keys(arg.getBindingIdentifiers())) {\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) {\n return\n }\n const exportedNames = this.exports[name]\n if (!exportedNames) return\n for (const exportedName of exportedNames) {\n exprs.push(this.buildCall(exportedName, t.identifier(name)).expression)\n }\n }\n path.replaceWith(t.sequenceExpression(exprs))\n return\n }\n\n if (!arg.isIdentifier()) return\n\n const name = arg.node.name\n\n // redeclared in this scope\n if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return\n\n const exportedNames = this.exports[name]\n if (!exportedNames) return\n\n let node = path.node\n\n // if it is a non-prefix update expression (x++ etc)\n // then we must replace with the expression (_export('x', x + 1), x++)\n // in order to ensure the same update expression value\n const isPostUpdateExpression = path.isUpdateExpression({ prefix: false })\n if (isPostUpdateExpression) {\n node = t.binaryExpression(\n node.operator[0],\n t.unaryExpression(\"+\", t.cloneNode(node.argument)),\n t.numericLiteral(1),\n )\n }\n\n for (const exportedName of exportedNames) {\n node = this.buildCall(exportedName, node).expression\n }\n\n if (isPostUpdateExpression) {\n node = t.sequenceExpression([node, path.node])\n }\n\n path.replaceWith(node)\n },\n }\n\n return {\n name: \"transform-modules-systemjs\",\n\n visitor: {\n CallExpression(path, state) {\n if (path.node.callee.type === TYPE_IMPORT) {\n path.replaceWith(\n t.callExpression(\n t.memberExpression(t.identifier(state.contextIdent), t.identifier(\"import\")),\n path.node.arguments,\n ),\n )\n }\n },\n\n MetaProperty(path, state) {\n if (path.node.meta.name === \"import\" && path.node.property.name === \"meta\") {\n path.replaceWith(\n t.memberExpression(t.identifier(state.contextIdent), t.identifier(\"meta\")),\n )\n }\n },\n\n ReferencedIdentifier(path, state) {\n if (path.node.name === \"__moduleName\" && !path.scope.hasBinding(\"__moduleName\")) {\n path.replaceWith(t.memberExpression(t.identifier(state.contextIdent), t.identifier(\"id\")))\n }\n },\n\n Program: {\n enter(path, state) {\n state.contextIdent = path.scope.generateUid(\"context\")\n },\n exit(path, state) {\n const undefinedIdent = path.scope.buildUndefinedNode()\n const exportIdent = path.scope.generateUid(\"export\")\n const contextIdent = state.contextIdent\n\n const exportMap = Object.create(null)\n const modules = []\n\n let beforeBody = []\n const setters = []\n const sources = []\n const variableIds = []\n const removedPaths = []\n\n function addExportName(key, val) {\n exportMap[key] = exportMap[key] || []\n exportMap[key].push(val)\n }\n\n function pushModule(source, key, specifiers) {\n let module\n modules.forEach(function(m) {\n if (m.key === source) {\n module = m\n }\n })\n if (!module) {\n modules.push((module = { key: source, imports: [], exports: [] }))\n }\n module[key] = module[key].concat(specifiers)\n }\n\n function buildExportCall(name, val) {\n return t.expressionStatement(\n t.callExpression(t.identifier(exportIdent), [t.stringLiteral(name), val]),\n )\n }\n\n const exportNames = []\n const exportValues = []\n\n const body = path.get(\"body\")\n for (const path of body) {\n if (path.isFunctionDeclaration()) {\n beforeBody.push(path.node)\n removedPaths.push(path)\n } else if (path.isClassDeclaration()) {\n variableIds.push(path.node.id)\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\"=\", t.cloneNode(path.node.id), t.toExpression(path.node)),\n ),\n )\n } else if (path.isImportDeclaration()) {\n const source = path.node.source.value\n pushModule(source, \"imports\", path.node.specifiers)\n for (const name of Object.keys(path.getBindingIdentifiers())) {\n path.scope.removeBinding(name)\n variableIds.push(t.identifier(name))\n }\n path.remove()\n } else if (path.isExportAllDeclaration()) {\n pushModule(path.node.source.value, \"exports\", path.node)\n path.remove()\n } else if (path.isExportDefaultDeclaration()) {\n const declar = path.get(\"declaration\")\n const id = declar.node.id\n if (declar.isClassDeclaration()) {\n if (id) {\n exportNames.push(\"default\")\n exportValues.push(undefinedIdent)\n variableIds.push(id)\n addExportName(id.name, \"default\")\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\"=\", t.cloneNode(id), t.toExpression(declar.node)),\n ),\n )\n } else {\n exportNames.push(\"default\")\n exportValues.push(t.toExpression(declar.node))\n removedPaths.push(path)\n }\n } else if (declar.isFunctionDeclaration()) {\n if (id) {\n beforeBody.push(declar.node)\n exportNames.push(\"default\")\n exportValues.push(t.cloneNode(id))\n addExportName(id.name, \"default\")\n } else {\n exportNames.push(\"default\")\n exportValues.push(t.toExpression(declar.node))\n }\n removedPaths.push(path)\n } else {\n path.replaceWith(buildExportCall(\"default\", declar.node))\n }\n } else if (path.isExportNamedDeclaration()) {\n const declar = path.get(\"declaration\")\n\n if (declar.node) {\n path.replaceWith(declar)\n\n if (path.isFunction()) {\n const node = declar.node\n const name = node.id.name\n addExportName(name, name)\n beforeBody.push(node)\n exportNames.push(name)\n exportValues.push(t.cloneNode(node.id))\n removedPaths.push(path)\n } else if (path.isClass()) {\n const name = declar.node.id.name\n exportNames.push(name)\n exportValues.push(undefinedIdent)\n variableIds.push(declar.node.id)\n path.replaceWith(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n t.cloneNode(declar.node.id),\n t.toExpression(declar.node),\n ),\n ),\n )\n addExportName(name, name)\n } else {\n for (const name of Object.keys(declar.getBindingIdentifiers())) {\n addExportName(name, name)\n }\n }\n } else {\n const specifiers = path.node.specifiers\n if (specifiers && specifiers.length) {\n if (path.node.source) {\n pushModule(path.node.source.value, \"exports\", specifiers)\n path.remove()\n } else {\n const nodes = []\n\n for (const specifier of specifiers) {\n const binding = path.scope.getBinding(specifier.local.name)\n // hoisted function export\n if (binding && t.isFunctionDeclaration(binding.path.node)) {\n exportNames.push(specifier.exported.name)\n exportValues.push(t.cloneNode(specifier.local))\n }\n // only globals also exported this way\n else if (!binding) {\n nodes.push(buildExportCall(specifier.exported.name, specifier.local))\n }\n addExportName(specifier.local.name, specifier.exported.name)\n }\n\n path.replaceWithMultiple(nodes)\n }\n }\n }\n }\n }\n\n modules.forEach(function(specifiers) {\n let setterBody = []\n const target = path.scope.generateUid(specifiers.key)\n\n for (let specifier of specifiers.imports) {\n if (t.isImportNamespaceSpecifier(specifier)) {\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\"=\", specifier.local, t.identifier(target)),\n ),\n )\n } else if (t.isImportDefaultSpecifier(specifier)) {\n specifier = t.importSpecifier(specifier.local, t.identifier(\"default\"))\n }\n\n if (t.isImportSpecifier(specifier)) {\n setterBody.push(\n t.expressionStatement(\n t.assignmentExpression(\n \"=\",\n specifier.local,\n t.memberExpression(t.identifier(target), specifier.imported),\n ),\n ),\n )\n }\n }\n\n if (specifiers.exports.length) {\n const exportNames = []\n const exportValues = []\n let hasExportStar = false\n\n for (const node of specifiers.exports) {\n if (t.isExportAllDeclaration(node)) {\n hasExportStar = true\n } else if (t.isExportSpecifier(node)) {\n exportNames.push(node.exported.name)\n exportValues.push(t.memberExpression(t.identifier(target), node.local))\n } else {\n // todo\n }\n }\n\n setterBody = setterBody.concat(\n constructExportCall(\n path,\n t.identifier(exportIdent),\n exportNames,\n exportValues,\n hasExportStar ? t.identifier(target) : null,\n ),\n )\n }\n\n sources.push(t.stringLiteral(specifiers.key))\n setters.push(\n t.functionExpression(null, [t.identifier(target)], t.blockStatement(setterBody)),\n )\n })\n\n let moduleName = this.getModuleName()\n if (moduleName) moduleName = t.stringLiteral(moduleName)\n\n hoistVariables(\n path,\n (id, name, hasInit) => {\n variableIds.push(id)\n if (!hasInit) {\n exportNames.push(name)\n exportValues.push(undefinedIdent)\n }\n },\n null,\n )\n\n if (variableIds.length) {\n beforeBody.unshift(\n t.variableDeclaration(\"var\", variableIds.map((id) => t.variableDeclarator(id))),\n )\n }\n\n if (exportNames.length) {\n beforeBody = beforeBody.concat(\n constructExportCall(path, t.identifier(exportIdent), exportNames, exportValues, null),\n )\n }\n\n path.traverse(reassignmentVisitor, {\n exports: exportMap,\n buildCall: buildExportCall,\n scope: path.scope,\n })\n\n for (const path of removedPaths) {\n path.remove()\n }\n\n path.node.body = [\n buildTemplate({\n SYSTEM_REGISTER: t.memberExpression(\n t.identifier(systemGlobal),\n t.identifier(\"register\"),\n ),\n BEFORE_BODY: beforeBody,\n MODULE_NAME: moduleName,\n SETTERS: t.arrayExpression(setters),\n SOURCES: t.arrayExpression(sources),\n EXECUTE: t.functionExpression(\n null,\n [],\n t.blockStatement(path.node.body),\n false,\n options.topLevelAwait && programUsesTopLevelAwait(path),\n ),\n EXPORT_IDENTIFIER: t.identifier(exportIdent),\n CONTEXT_IDENTIFIER: t.identifier(contextIdent),\n }),\n ]\n },\n },\n },\n }\n})\n\nconst programUsesTopLevelAwait = (path) => {\n let hasTopLevelAwait = false\n path.traverse({\n AwaitExpression(path) {\n const parent = path.getFunctionParent()\n if (!parent || parent.type === \"Program\") hasTopLevelAwait = true\n },\n })\n return hasTopLevelAwait\n}\n","// https://github.com/rburns/ansi-to-html/blob/master/src/ansi_to_html.js\n// https://github.com/drudru/ansi_up/blob/master/ansi_up.js\nconst Convert = import.meta.require(\"ansi-to-html\")\n\nexport const ansiToHTML = (ansiString) => {\n return new Convert().toHtml(ansiString)\n}\n","const { addSideEffect } = import.meta.require(\"@babel/helper-module-imports\")\n\nexport const ensureRegeneratorRuntimeImportBabelPlugin = (api, options) => {\n api.assertVersion(7)\n\n const {\n regeneratorRuntimeIdentifierName = \"regeneratorRuntime\",\n regeneratorRuntimeImportPath = \"@jsenv/core/helpers/regenerator-runtime/regenerator-runtime.js\",\n } = options\n\n return {\n visitor: {\n Identifier(path, opts) {\n const { filename } = opts\n const filepathname = filename.replace(/\\\\/g, \"/\")\n if (filepathname.endsWith(\"node_modules/regenerator-runtime/runtime.js\")) {\n return\n }\n\n const { node } = path\n if (node.name === regeneratorRuntimeIdentifierName) {\n addSideEffect(path.scope.getProgramParent().path, regeneratorRuntimeImportPath)\n }\n },\n },\n }\n}\n","const { addSideEffect } = import.meta.require(\"@babel/helper-module-imports\")\n\nexport const ensureGlobalThisImportBabelPlugin = (api, options) => {\n api.assertVersion(7)\n\n const {\n globalThisIdentifierName = \"globalThis\",\n globalThisImportPath = \"@jsenv/core/helpers/global-this/global-this.js\",\n } = options\n\n return {\n visitor: {\n Identifier(path, opts) {\n const { filename } = opts\n const filepathname = filename.replace(/\\\\/g, \"/\")\n if (filepathname.endsWith(\"/helpers/global-this/global-this.js\")) {\n return\n }\n\n const { node } = path\n if (node.name === globalThisIdentifierName) {\n addSideEffect(path.scope.getProgramParent().path, globalThisImportPath)\n }\n },\n },\n }\n}\n","import { pathToFileUrl } from \"../urlHelpers.js\"\nimport { babelHelperMap } from \"../babelHelperMap/babelHelperMap.js\"\n\n// https://github.com/babel/babel/tree/master/packages/babel-helper-module-imports\nconst { addDefault } = import.meta.require(\"@babel/helper-module-imports\")\n\n// named import approach found here:\n// https://github.com/rollup/rollup-plugin-babel/blob/18e4232a450f320f44c651aa8c495f21c74d59ac/src/helperPlugin.js#L1\n\n// for reference this is how it's done to reference\n// a global babel helper object instead of using\n// a named import\n// https://github.com/babel/babel/blob/99f4f6c3b03c7f3f67cf1b9f1a21b80cfd5b0224/packages/babel-plugin-external-helpers/src/index.js\n\nexport const transformBabelHelperToImportBabelPlugin = (api) => {\n api.assertVersion(7)\n\n return {\n pre: (file) => {\n const cachedHelpers = {}\n file.set(\"helperGenerator\", (name) => {\n // the list of possible helpers name\n // https://github.com/babel/babel/blob/99f4f6c3b03c7f3f67cf1b9f1a21b80cfd5b0224/packages/babel-helpers/src/helpers.js#L13\n\n if (!file.availableHelper(name)) {\n return undefined\n }\n\n const filePath = file.opts.filename\n const babelHelperPath = babelHelperMap[name]\n\n if (babelHelperPath.startsWith(\"file://\")) {\n const fileUrl = pathToFileUrl(filePath)\n if (fileUrl === babelHelperPath) {\n return undefined\n }\n } else if (searchPossibleBabelHelperNameInFilePath(filePath) === name) {\n return undefined\n }\n\n if (cachedHelpers[name]) {\n return cachedHelpers[name]\n }\n\n const helper = addDefault(file.path, babelHelperPath, { nameHint: `_${name}` })\n cachedHelpers[name] = helper\n return helper\n })\n },\n }\n}\n\nexport const searchPossibleBabelHelperNameInFilePath = (filePath) => {\n const fileUrl = pathToFileUrl(filePath)\n const filePathname = fileUrl.slice(\"file://\".length)\n\n const babelPathPart = \"@jsenv/core/helpers/babel/\"\n const babelPathPartIndex = filePathname.indexOf(babelPathPart)\n if (babelPathPartIndex === -1) return \"\"\n\n const after = filePathname.slice(babelPathPartIndex + babelPathPart.length)\n const helperName = after.slice(0, after.indexOf(\"/\"))\n return helperName\n}\n","import transformModulesSystemJs from \"./babel-plugin-transform-modules-systemjs/index.js\"\nimport { findAsyncPluginNameInBabelPluginMap } from \"../findAsyncPluginNameInBabelPluginMap/findAsyncPluginNameInBabelPluginMap.js\"\nimport { ansiToHTML } from \"./ansiToHTML.js\"\nimport { ensureRegeneratorRuntimeImportBabelPlugin } from \"./ensureRegeneratorRuntimeImportBabelPlugin.js\"\nimport { ensureGlobalThisImportBabelPlugin } from \"./ensureGlobalThisImportBabelPlugin.js\"\nimport {\n transformBabelHelperToImportBabelPlugin,\n searchPossibleBabelHelperNameInFilePath,\n} from \"./transformBabelHelperToImportBabelPlugin.js\"\n\nconst { transformAsync, transformFromAstAsync } = import.meta.require(\"@babel/core\")\nconst syntaxDynamicImport = import.meta.require(\"@babel/plugin-syntax-dynamic-import\")\nconst syntaxImportMeta = import.meta.require(\"@babel/plugin-syntax-import-meta\")\n\nconst defaultBabelPluginArray = [syntaxDynamicImport, syntaxImportMeta]\n\nexport const jsenvTransform = async ({\n inputCode,\n inputPath,\n inputRelativePath,\n inputAst,\n inputMap,\n babelPluginMap,\n allowTopLevelAwait,\n transformTopLevelAwait,\n transformModuleIntoSystemFormat,\n transformGenerator,\n regeneratorRuntimeImportPath,\n remap,\n}) => {\n // https://babeljs.io/docs/en/options\n const options = {\n filename: inputPath,\n filenameRelative: inputRelativePath,\n inputSourceMap: inputMap,\n configFile: false,\n babelrc: false, // trust only these options, do not read any babelrc config file\n ast: true,\n sourceMaps: remap,\n sourceFileName: inputPath,\n // https://babeljs.io/docs/en/options#parseropts\n parserOpts: {\n allowAwaitOutsideFunction: allowTopLevelAwait,\n },\n }\n\n const babelHelperName = searchPossibleBabelHelperNameInFilePath(inputPath)\n // to prevent typeof circular dependency\n if (babelHelperName === \"typeof\") {\n const babelPluginMapWithoutTransformTypeOf = {}\n Object.keys(babelPluginMap).forEach((key) => {\n if (key !== \"transform-typeof-symbol\") {\n babelPluginMapWithoutTransformTypeOf[key] = babelPluginMap[key]\n }\n })\n babelPluginMap = babelPluginMapWithoutTransformTypeOf\n }\n\n if (transformGenerator) {\n babelPluginMap = {\n ...babelPluginMap,\n \"ensure-regenerator-runtime-import\": [\n ensureRegeneratorRuntimeImportBabelPlugin,\n {\n regeneratorRuntimeImportPath,\n },\n ],\n }\n }\n\n babelPluginMap = {\n ...babelPluginMap,\n \"ensure-global-this-import\": [ensureGlobalThisImportBabelPlugin],\n \"transform-babel-helpers-to-import\": [transformBabelHelperToImportBabelPlugin],\n }\n\n const asyncPluginName = findAsyncPluginNameInBabelPluginMap(babelPluginMap)\n\n if (transformModuleIntoSystemFormat && transformTopLevelAwait && asyncPluginName) {\n const babelPluginArrayWithoutAsync = []\n Object.keys(babelPluginMap).forEach((name) => {\n if (name !== asyncPluginName) {\n babelPluginArrayWithoutAsync.push(babelPluginMap[name])\n }\n })\n\n // put body inside something like (async () => {})()\n const result = await babelTransform({\n ast: inputAst,\n code: inputCode,\n options: {\n ...options,\n plugins: [\n ...defaultBabelPluginArray,\n ...babelPluginArrayWithoutAsync,\n [transformModulesSystemJs, { topLevelAwait: transformTopLevelAwait }],\n ],\n },\n })\n\n // we need to retranspile the await keywords now wrapped\n // inside Systemjs function.\n // They are ignored, at least by transform-async-to-promises\n // see https://github.com/rpetrich/babel-plugin-transform-async-to-promises/issues/26\n\n const finalResult = await babelTransform({\n // ast: result.ast,\n code: result.code,\n options: {\n ...options,\n // about inputSourceMap see\n // https://github.com/babel/babel/blob/eac4c5bc17133c2857f2c94c1a6a8643e3b547a7/packages/babel-core/src/transformation/file/generate.js#L57\n // https://github.com/babel/babel/blob/090c364a90fe73d36a30707fc612ce037bdbbb24/packages/babel-core/src/transformation/file/merge-map.js#L6s\n inputSourceMap: result.map,\n plugins: [...defaultBabelPluginArray, babelPluginMap[asyncPluginName]],\n },\n })\n\n return {\n ...result,\n ...finalResult,\n metadata: { ...result.metadata, ...finalResult.metadata },\n }\n }\n\n const babelPluginArray = [\n ...defaultBabelPluginArray,\n ...Object.keys(babelPluginMap).map((babelPluginName) => babelPluginMap[babelPluginName]),\n ...(transformModuleIntoSystemFormat\n ? [[transformModulesSystemJs, { topLevelAwait: transformTopLevelAwait }]]\n : []),\n ]\n const result = await babelTransform({\n ast: inputAst,\n code: inputCode,\n options: {\n ...options,\n plugins: babelPluginArray,\n },\n })\n return result\n}\n\nconst babelTransform = async ({ ast, code, options }) => {\n try {\n if (ast) {\n const result = await transformFromAstAsync(ast, code, options)\n return result\n }\n return await transformAsync(code, options)\n } catch (error) {\n if (error && error.code === \"BABEL_PARSE_ERROR\") {\n const message = error.message\n throw createParseError({\n message,\n messageHTML: ansiToHTML(message),\n filename: options.filename,\n lineNumber: error.loc.line,\n columnNumber: error.loc.column,\n })\n }\n throw error\n }\n}\n\nconst createParseError = (data) => {\n const { message } = data\n const parseError = new Error(message)\n parseError.code = \"PARSE_ERROR\"\n parseError.data = data\n\n return parseError\n}\n","import { stat, statSync } from \"fs\"\n\nexport const assertFolder = async (path) => {\n const filesystemEntry = await pathToFilesystemEntry(path)\n\n if (!filesystemEntry) {\n throw new Error(`folder not found on filesystem.\npath: ${path}`)\n }\n\n const { type } = filesystemEntry\n if (type !== \"folder\") {\n throw new Error(`folder expected but found something else on filesystem.\npath: ${path}\nfound: ${type}`)\n }\n}\n\nexport const assertFile = async (path) => {\n const filesystemEntry = await pathToFilesystemEntry(path)\n\n if (!filesystemEntry) {\n throw new Error(`file not found on filesystem.\npath: ${path}`)\n }\n\n const { type } = filesystemEntry\n if (type !== \"file\") {\n throw new Error(`file expected but found something else on filesystem.\npath: ${path}\nfound: ${type}`)\n }\n}\n\nexport const assertFileSync = (path) => {\n let stats\n\n try {\n stats = statSync(path)\n } catch (e) {\n if (e.code === \"ENOENT\") {\n throw new Error(`file not found on filesystem.\npath: ${path}`)\n }\n throw e\n }\n\n const entry = statsToEntry(stats)\n if (entry !== \"file\") {\n throw new Error(`file expected but found something else on filesystem.\npath: ${path}\nfound: ${entry}`)\n }\n}\n\nconst pathToFilesystemEntry = (path) =>\n new Promise((resolve, reject) => {\n stat(path, (error, stats) => {\n if (error) {\n if (error.code === \"ENOENT\") resolve(null)\n else reject(error)\n } else {\n resolve({\n type: statsToEntry(stats),\n stats,\n })\n }\n })\n })\n\nconst statsToEntry = (stats) => {\n if (stats.isFile()) {\n return \"file\"\n }\n if (stats.isDirectory()) {\n return \"folder\"\n }\n return \"other\"\n}\n","import { createOperation } from \"@dmail/cancellation\"\n\nconst { rollup } = import.meta.require(\"rollup\")\n\nexport const generateBundleUsingRollup = async ({\n cancellationToken,\n rollupParseOptions,\n rollupGenerateOptions,\n writeOnFileSystem,\n}) => {\n const rollupBundle = await createOperation({\n cancellationToken,\n start: () =>\n rollup({\n // about cache here, we should/could reuse previous rollup call\n // to get the cache from the entryPointMap\n // as shown here: https://rollupjs.org/guide/en#cache\n // it could be passed in arguments to this function\n // however parallelism and having different rollup options per\n // call make it a bit complex\n // cache: null\n // https://rollupjs.org/guide/en#experimentaltoplevelawait\n experimentalTopLevelAwait: true,\n // if we want to ignore some warning\n // please use https://rollupjs.org/guide/en#onwarn\n // to be very clear about what we want to ignore\n onwarn: (warning, warn) => {\n if (warning.code === \"THIS_IS_UNDEFINED\") return\n warn(warning)\n },\n ...rollupParseOptions,\n }),\n })\n\n const rollupOutputArray = await createOperation({\n cancellationToken,\n start: () => {\n if (writeOnFileSystem) {\n return rollupBundle.write({\n // https://rollupjs.org/guide/en#experimentaltoplevelawait\n experimentalTopLevelAwait: true,\n // we could put prefConst to true by checking 'transform-block-scoping'\n // presence in babelPluginMap\n preferConst: false,\n ...rollupGenerateOptions,\n })\n }\n return rollupBundle.generate({\n // https://rollupjs.org/guide/en#experimentaltoplevelawait\n experimentalTopLevelAwait: true,\n // we could put prefConst to true by checking 'transform-block-scoping'\n // presence in babelPluginMap\n preferConst: false,\n ...rollupGenerateOptions,\n })\n },\n })\n\n return rollupOutputArray\n}\n","export const bundleOptionsToRollupParseOptions = ({ entryPointMap, nativeModulePredicate }) => {\n return {\n input: entryPointMap,\n external: (id) => nativeModulePredicate(id),\n }\n}\n","import { fileUrlToPath } from \"../urlHelpers.js\"\n\nexport const bundleOptionsToRollupGenerateOptions = ({\n bundleDirectoryUrl,\n format,\n formatOutputOptions,\n}) => {\n const dir = fileUrlToPath(bundleDirectoryUrl)\n\n return {\n // https://rollupjs.org/guide/en#output-dir\n dir,\n // https://rollupjs.org/guide/en#output-format\n format: formatToRollupFormat(format),\n // entryFileNames: `./[name].js`,\n // https://rollupjs.org/guide/en#output-sourcemap\n sourcemap: true,\n // we could exclude them\n // but it's better to put them directly\n // in case source files are not reachable\n // for whatever reason\n sourcemapExcludeSources: false,\n ...formatOutputOptions,\n }\n}\n\nconst formatToRollupFormat = (format) => {\n if (format === \"global\") return \"iife\"\n if (format === \"commonjs\") return \"cjs\"\n if (format === \"systemjs\") return \"system\"\n throw new Error(`unexpected format, got ${format}`)\n}\n","import { createLogger } from \"@jsenv/logger\"\nimport { createJsenvRollupPlugin } from \"./createJsenvRollupPlugin/createJsenvRollupPlugin.js\"\nimport { generateBundleUsingRollup } from \"./generateBundleUsingRollup.js\"\nimport { bundleOptionsToRollupParseOptions } from \"./bundleOptionsToRollupParseOptions.js\"\nimport { bundleOptionsToRollupGenerateOptions } from \"./bundleOptionsToRollupGenerateOptions.js\"\n\nexport const bundleWithoutBalancing = async (options) => {\n const { logLevel } = options\n const logger = createLogger({ logLevel })\n\n const { babelPluginMap } = options\n const { jsenvRollupPlugin, getExtraInfo } = await createJsenvRollupPlugin({\n ...options,\n babelPluginRequiredNameArray: Object.keys(babelPluginMap),\n logger,\n })\n\n const rollupParseOptions = {\n ...bundleOptionsToRollupParseOptions(options),\n plugins: [jsenvRollupPlugin],\n }\n const rollupGenerateOptions = bundleOptionsToRollupGenerateOptions(options)\n logger.info(createBundleWithoutBalancingMessage({ options, rollupGenerateOptions }))\n const { cancellationToken, writeOnFileSystem } = options\n const rollupBundle = await generateBundleUsingRollup({\n cancellationToken,\n writeOnFileSystem,\n rollupParseOptions,\n rollupGenerateOptions,\n })\n\n return {\n rollupBundle,\n ...getExtraInfo(),\n }\n}\n\nconst createBundleWithoutBalancingMessage = ({\n options: { format, entryPointMap },\n rollupGenerateOptions: { dir },\n}) => `\ngenerating bundle.\n--- format ---\n${format}\n--- entry point map ---\n${JSON.stringify(entryPointMap, null, \" \")}\n--- into ---\n${dir}\n`\n","import { createLogger } from \"@jsenv/logger\"\nimport { resolveDirectoryUrl, fileUrlToPath } from \"../urlHelpers.js\"\nimport { createJsenvRollupPlugin } from \"./createJsenvRollupPlugin/createJsenvRollupPlugin.js\"\nimport { generateBundleUsingRollup } from \"./generateBundleUsingRollup.js\"\nimport { bundleOptionsToRollupParseOptions } from \"./bundleOptionsToRollupParseOptions.js\"\nimport { bundleOptionsToRollupGenerateOptions } from \"./bundleOptionsToRollupGenerateOptions.js\"\n\nexport const bundleWithBalancing = async (options) => {\n const { logLevel } = options\n const logger = createLogger({ logLevel })\n\n const { bundleDirectoryUrl, compileId, groupMap } = options\n const bundleDirectoryUrlWithBalancing = resolveDirectoryUrl(compileId, bundleDirectoryUrl)\n const { jsenvRollupPlugin, getExtraInfo } = await createJsenvRollupPlugin({\n ...options,\n bundleDirectoryUrl: bundleDirectoryUrlWithBalancing,\n babelPluginRequiredNameArray: groupMap[compileId].babelPluginRequiredNameArray,\n logger,\n })\n\n const dir = fileUrlToPath(bundleDirectoryUrlWithBalancing)\n\n const rollupParseOptions = {\n ...bundleOptionsToRollupParseOptions(options),\n plugins: [jsenvRollupPlugin],\n }\n const rollupGenerateOptions = {\n ...bundleOptionsToRollupGenerateOptions(options),\n dir,\n }\n logger.info(createBundleWithBalancingMessage({ options, rollupGenerateOptions }))\n const { cancellationToken, writeOnFileSystem } = options\n const rollupBundle = await generateBundleUsingRollup({\n cancellationToken,\n writeOnFileSystem,\n rollupParseOptions,\n rollupGenerateOptions,\n })\n\n return {\n rollupBundle,\n ...getExtraInfo(),\n }\n}\n\nconst createBundleWithBalancingMessage = ({\n options: { format, entryPointMap },\n rollupGenerateOptions: { dir },\n}) => `\ngenerating bundle with balancing.\n--- format ---\n${format}\n--- entry point map ---\n${JSON.stringify(entryPointMap, null, \" \")}\n--- into ---\n${dir}\n`\n","import { createLogger } from \"@jsenv/logger\"\nimport { createJsenvRollupPlugin } from \"./createJsenvRollupPlugin/createJsenvRollupPlugin.js\"\nimport { generateBundleUsingRollup } from \"./generateBundleUsingRollup.js\"\nimport { bundleOptionsToRollupParseOptions } from \"./bundleOptionsToRollupParseOptions.js\"\nimport { bundleOptionsToRollupGenerateOptions } from \"./bundleOptionsToRollupGenerateOptions.js\"\n\nexport const bundleBalancer = async (options) => {\n const { logLevel } = options\n const logger = createLogger({ logLevel })\n\n const { balancerDataAbstractSpecifier } = options\n\n const { importReplaceMap, groupMap } = options\n const { jsenvRollupPlugin, getExtraInfo } = await createJsenvRollupPlugin({\n ...options,\n importReplaceMap: {\n ...importReplaceMap,\n [balancerDataAbstractSpecifier]: () => `export const entryPointName = ${JSON.stringify(\n Object.keys(options.entryPointMap)[0],\n )}\n export const groupMap = ${JSON.stringify(groupMap)}`,\n },\n babelPluginRequiredNameArray: groupMap.otherwise.babelPluginRequiredNameArray,\n logger,\n })\n\n const rollupParseOptions = {\n ...bundleOptionsToRollupParseOptions(options),\n plugins: [jsenvRollupPlugin],\n }\n const rollupGenerateOptions = {\n ...bundleOptionsToRollupGenerateOptions(options),\n format: \"iife\",\n sourcemapExcludeSources: true,\n }\n logger.info(createBundleBalancerMessage({ options, rollupGenerateOptions }))\n const { cancellationToken, writeOnFileSystem } = options\n const rollupBundle = await generateBundleUsingRollup({\n cancellationToken,\n writeOnFileSystem,\n rollupParseOptions,\n rollupGenerateOptions,\n })\n\n return {\n rollupBundle,\n ...getExtraInfo(),\n }\n}\n\nconst createBundleBalancerMessage = ({\n options: { format, entryPointMap },\n rollupGenerateOptions: { dir },\n}) => `\ngenerating bundle balancer file.\n--- format ---\n${format}\n--- file ---\n${dir}${Object.keys(entryPointMap)[0]}.js\n`\n","const rimraf = import.meta.require(\"rimraf\")\n\nexport const removeDirectory = (path) =>\n new Promise((resolve, reject) =>\n rimraf(path, (error) => {\n if (error) reject(error)\n else resolve()\n }),\n )\n","// https://github.com/browserify/resolve/blob/a09a2e7f16273970be4639313c83b913daea15d7/lib/core.json#L1\n// https://nodejs.org/api/modules.html#modules_module_builtinmodules\n// https://stackoverflow.com/a/35825896\n// https://github.com/browserify/resolve/blob/master/lib/core.json#L1\n\nconst NATIVE_NODE_MODULE_SPECIFIER_ARRAY = [\n \"assert\",\n \"async_hooks\",\n \"buffer_ieee754\",\n \"buffer\",\n \"child_process\",\n \"cluster\",\n \"console\",\n \"constants\",\n \"crypto\",\n \"_debugger\",\n \"dgram\",\n \"dns\",\n \"domain\",\n \"events\",\n \"freelist\",\n \"fs\",\n \"fs/promises\",\n \"_http_agent\",\n \"_http_client\",\n \"_http_common\",\n \"_http_incoming\",\n \"_http_outgoing\",\n \"_http_server\",\n \"http\",\n \"http2\",\n \"https\",\n \"inspector\",\n \"_linklist\",\n \"module\",\n \"net\",\n \"node-inspect/lib/_inspect\",\n \"node-inspect/lib/internal/inspect_client\",\n \"node-inspect/lib/internal/inspect_repl\",\n \"os\",\n \"path\",\n \"perf_hooks\",\n \"process\",\n \"punycode\",\n \"querystring\",\n \"readline\",\n \"repl\",\n \"smalloc\",\n \"_stream_duplex\",\n \"_stream_transform\",\n \"_stream_wrap\",\n \"_stream_passthrough\",\n \"_stream_readable\",\n \"_stream_writable\",\n \"stream\",\n \"string_decoder\",\n \"sys\",\n \"timers\",\n \"_tls_common\",\n \"_tls_legacy\",\n \"_tls_wrap\",\n \"tls\",\n \"trace_events\",\n \"tty\",\n \"url\",\n \"util\",\n \"v8/tools/arguments\",\n \"v8/tools/codemap\",\n \"v8/tools/consarray\",\n \"v8/tools/csvparser\",\n \"v8/tools/logreader\",\n \"v8/tools/profile_view\",\n \"v8/tools/splaytree\",\n \"v8\",\n \"vm\",\n \"worker_threads\",\n \"zlib\",\n // global is special\n \"global\",\n]\n\nexport const isBareSpecifierForNativeNodeModule = (specifier) => {\n return NATIVE_NODE_MODULE_SPECIFIER_ARRAY.includes(specifier)\n}\n","/* eslint-disable import/max-dependencies */\nimport { generateGroupMap } from \"@jsenv/core\"\nimport {\n catchAsyncFunctionCancellation,\n createProcessInterruptionCancellationToken,\n} from \"@dmail/cancellation\"\nimport { pathToDirectoryUrl, resolveDirectoryUrl, fileUrlToPath } from \"../urlHelpers.js\"\nimport { assertFile, assertFolder } from \"./filesystem-assertions.js\"\nimport { bundleWithoutBalancing } from \"./bundleWithoutBalancing.js\"\nimport { bundleWithBalancing } from \"./bundleWithBalancing.js\"\nimport { bundleBalancer } from \"./bundleBalancer.js\"\nimport { removeDirectory } from \"./removeDirectory.js\"\nimport { isBareSpecifierForNativeNodeModule } from \"./isBareSpecifierForNativeNodeModule.js\"\n\nconst { jsenvBabelPluginMap } = import.meta.require(\"@jsenv/babel-plugin-map\")\nconst { browserScoreMap, nodeVersionScoreMap } = import.meta.require(\"@jsenv/core\")\n\nexport const generateBundle = ({\n projectDirectoryPath,\n bundleDirectoryRelativePath,\n bundleDirectoryClean = false,\n bundleCache = false,\n bundleCacheDirectoryRelativePath = `${bundleDirectoryRelativePath}/.cache`,\n importMapFileRelativePath = \"./importMap.json\",\n importMapForBundle = {},\n importDefaultExtension,\n importReplaceMap = {},\n importFallbackMap = {},\n browser = false,\n node = false,\n entryPointMap = {\n main: \"./index.js\",\n },\n babelPluginMap = jsenvBabelPluginMap,\n convertMap,\n logLevel = \"info\",\n minify = false,\n writeOnFileSystem = true,\n throwUnhandled = true,\n format,\n formatOutputOptions = {},\n // balancing\n compileGroupCount = 1,\n platformAlwaysInsidePlatformScoreMap,\n platformWillAlwaysBeKnown,\n balancerTemplateFileUrl,\n balancerDataAbstractSpecifier,\n platformScoreMap = { ...browserScoreMap, node: nodeVersionScoreMap },\n}) => {\n const promise = catchAsyncFunctionCancellation(async () => {\n if (typeof projectDirectoryPath !== \"string\") {\n throw new TypeError(`projectDirectoryPath must be a string, got ${projectDirectoryPath}`)\n }\n if (typeof bundleDirectoryRelativePath !== \"string\") {\n throw new TypeError(\n `bundleDirectoryRelativePath must be a string, got ${bundleDirectoryRelativePath}`,\n )\n }\n if (typeof entryPointMap !== \"object\") {\n throw new TypeError(`entryPointMap must be an object, got ${entryPointMap}`)\n }\n if (typeof compileGroupCount !== \"number\") {\n throw new TypeError(`compileGroupCount must be a number, got ${compileGroupCount}`)\n }\n if (compileGroupCount < 1) {\n throw new Error(`compileGroupCount must be >= 1, got ${compileGroupCount}`)\n }\n const cancellationToken = createProcessInterruptionCancellationToken()\n\n await assertFolder(projectDirectoryPath)\n\n const projectDirectoryUrl = pathToDirectoryUrl(projectDirectoryPath)\n const bundleDirectoryUrl = resolveDirectoryUrl(bundleDirectoryRelativePath, projectDirectoryUrl)\n const bundleDirectoryPath = fileUrlToPath(bundleDirectoryUrl)\n\n if (bundleDirectoryClean) {\n await removeDirectory(bundleDirectoryPath)\n }\n\n const nativeModulePredicate = (specifier) => {\n if (node && isBareSpecifierForNativeNodeModule(specifier)) return true\n // for now browser have no native module\n // and we don't know how we will handle that\n if (browser) return false\n return false\n }\n\n if (compileGroupCount === 1) {\n return bundleWithoutBalancing({\n cancellationToken,\n projectDirectoryUrl,\n bundleDirectoryUrl,\n bundleCache,\n bundleCacheDirectoryRelativePath,\n importMapFileRelativePath,\n importMapForBundle,\n importDefaultExtension,\n importReplaceMap,\n importFallbackMap,\n nativeModulePredicate,\n entryPointMap,\n babelPluginMap,\n convertMap,\n minify,\n logLevel,\n format,\n formatOutputOptions,\n writeOnFileSystem,\n })\n }\n\n if (typeof balancerTemplateFileUrl === \"undefined\") {\n throw new Error(`${format} format not compatible with balancing.`)\n }\n await assertFile(fileUrlToPath(balancerTemplateFileUrl))\n\n const groupMap = generateGroupMap({\n babelPluginMap,\n platformScoreMap,\n groupCount: compileGroupCount,\n platformAlwaysInsidePlatformScoreMap,\n platformWillAlwaysBeKnown,\n })\n\n return await Promise.all([\n generateEntryPointsFolders({\n cancellationToken,\n projectDirectoryUrl,\n bundleDirectoryUrl,\n bundleCache,\n bundleCacheDirectoryRelativePath,\n importMapFileRelativePath,\n importMapForBundle,\n importDefaultExtension,\n importReplaceMap,\n importFallbackMap,\n nativeModulePredicate,\n entryPointMap,\n babelPluginMap,\n convertMap,\n minify,\n logLevel,\n writeOnFileSystem,\n format,\n formatOutputOptions,\n groupMap,\n }),\n generateEntryPointsBalancerFiles({\n cancellationToken,\n projectDirectoryUrl,\n bundleDirectoryUrl,\n bundleCache,\n bundleCacheDirectoryRelativePath,\n importMapFileRelativePath,\n importMapForBundle,\n importDefaultExtension,\n importReplaceMap,\n importFallbackMap,\n nativeModulePredicate,\n entryPointMap,\n babelPluginMap,\n convertMap,\n minify,\n logLevel,\n writeOnFileSystem,\n format,\n balancerTemplateFileUrl,\n balancerDataAbstractSpecifier,\n groupMap,\n }),\n ])\n })\n\n if (!throwUnhandled) return promise\n return promise.catch((e) => {\n setTimeout(() => {\n throw e\n })\n })\n}\n\nconst generateEntryPointsFolders = async ({ groupMap, ...rest }) =>\n Promise.all(\n Object.keys(groupMap).map(async (compileId) =>\n bundleWithBalancing({\n groupMap,\n compileId,\n ...rest,\n }),\n ),\n )\n\nconst generateEntryPointsBalancerFiles = ({ entryPointMap, balancerTemplateFileUrl, ...rest }) =>\n Promise.all(\n Object.keys(entryPointMap).map(async (entryPointName) =>\n bundleBalancer({\n entryPointMap: {\n [entryPointName]: fileUrlToPath(balancerTemplateFileUrl),\n },\n ...rest,\n }),\n ),\n )\n","import { resolveFileUrl } from \"../urlHelpers.js\"\nimport { jsenvBundlingDirectoryUrl } from \"../jsenvBundlingDirectoryUrl.js\"\nimport { generateBundle } from \"../generateBundle/generateBundle.js\"\n\nexport const generateCommonJsBundle = async ({\n bundleDirectoryRelativePath = \"./dist/commonjs\",\n node = true,\n ...rest\n}) =>\n generateBundle({\n format: \"commonjs\",\n bundleDirectoryRelativePath,\n node,\n balancerTemplateFileUrl: resolveFileUrl(\n \"./src/generateCommonJsBundle/commonjs-balancer-template.js\",\n jsenvBundlingDirectoryUrl,\n ),\n balancerDataAbstractSpecifier: \"/.jsenv/commonjs-balancer-data.js\",\n ...rest,\n })\n","import { computeBabelPluginMapForPlatform } from \"@jsenv/core\"\nimport { generateCommonJsBundle } from \"../generateCommonJsBundle/generateCommonJsBundle.js\"\n\nconst { jsenvBabelPluginMap } = import.meta.require(\"@jsenv/babel-plugin-map\")\n\nexport const generateCommonJsBundleForNode = ({\n babelPluginMap = jsenvBabelPluginMap,\n bundleDirectoryRelativePath,\n nodeMinimumVersion = decideNodeMinimumVersion(),\n ...rest\n}) => {\n const babelPluginMapForNode = computeBabelPluginMapForPlatform({\n babelPluginMap,\n platformName: \"node\",\n platformVersion: nodeMinimumVersion,\n })\n\n return generateCommonJsBundle({\n bundleDirectoryRelativePath,\n compileGroupCount: 1,\n babelPluginMap: babelPluginMapForNode,\n ...rest,\n })\n}\n\nconst decideNodeMinimumVersion = () => {\n return process.version.slice(1)\n}\n","import { generateBundle } from \"../generateBundle/generateBundle.js\"\n\nexport const generateGlobalBundle = async ({\n bundleDirectoryRelativePath = \"./dist/global\",\n globalName,\n browser = true,\n ...rest\n}) =>\n generateBundle({\n format: \"global\",\n browser,\n formatOutputOptions: globalName\n ? {\n name: globalName,\n }\n : {},\n bundleDirectoryRelativePath,\n compileGroupCount: 1,\n ...rest,\n })\n","import { resolveFileUrl } from \"../urlHelpers.js\"\nimport { jsenvBundlingDirectoryUrl } from \"../jsenvBundlingDirectoryUrl.js\"\nimport { generateBundle } from \"../generateBundle/generateBundle.js\"\n\nexport const generateSystemJsBundle = async ({\n bundleDirectoryRelativePath = \"./dist/systemjs\",\n ...rest\n}) =>\n generateBundle({\n format: \"systemjs\",\n balancerTemplateFileUrl: resolveFileUrl(\n \"./src/generateSystemJsBundle/systemjs-balancer-template.js\",\n jsenvBundlingDirectoryUrl,\n ),\n balancerDataAbstractSpecifier: \"/.jsenv/systemjs-balancer-data.js\",\n bundleDirectoryRelativePath,\n ...rest,\n })\n"],"names":["pathToDirectoryUrl","path","directoryUrl","startsWith","String","pathToFileURL","endsWith","pathToFileUrl","fileUrlToPath","fileUrl","fileURLToPath","resolveDirectoryUrl","specifier","baseUrl","URL","hasScheme","string","test","fileUrlToRelativePath","slice","length","resolveFileUrl","writeSourceMappingURL","source","location","updateSourceMappingURL","callback","sourceMappingUrlRegExp","lastSourceMappingUrl","matchSourceMappingUrl","exec","index","before","after","mappedAfter","replace","match","firstGroup","readSourceMappingURL","sourceMappingURL","value","parseSourceMappingURL","base64Prefix","mapBase64Source","sourcemapString","Buffer","toString","sourcemapURL","writeOrUpdateSourceMappingURL","hrefToScheme","href","colonIndex","indexOf","hrefToPathname","ressourceToPathname","hrefToRessource","scheme","afterProtocol","pathnameSlashIndex","ressource","searchSeparatorIndex","hrefToOrigin","secondProtocolSlashIndex","pathnameToDirname","pathname","slashLastIndex","lastIndexOf","pathnameToExtension","dotLastIndex","nodeRequire","require","filenameContainsBackSlashes","__filename","url","firstOperationMatching","array","start","predicate","TypeError","createArrayErrorMessage","createStartErrorMessage","createPredicateErrorMessage","Promise","resolve","reject","visit","input","returnValue","then","output","promiseSequence","callbackArray","values","push","fileMakeDirname","file","fileNormalized","normalizeSeparation","fileStartsWithSlash","folders","split","pop","map","_","folder","join","folderMake","mkdir","error","code","stat","fileLastStat","isDirectory","status","reason","lstat","copyFilePromisified","promisify","copyFile","readFilePromisified","readFile","fileRead","buffer","statPromisified","lstatPromisified","writeFilePromisified","writeFile","fileWrite","content","readdirPromisified","readdir","arrayWithout","item","arrayWithoutItem","i","createCancelError","cancelError","Error","name","isCancelError","createCancellationSource","requested","registrationArray","cancel","registrationArrayCopy","forEach","registration","register","existingRegistration","find","unregister","throwIfRequested","token","cancellationRequested","createCancellationToken","undefined","createOperation","cancellationToken","rest","ensureExactParameters","promise","cancelPromise","cancelRegistration","operationPromise","race","extraParameters","extraParamNames","Object","keys","catchAsyncFunctionCancellation","asyncFunction","catch","createProcessInterruptionCancellationToken","SIGINTCancelSource","process","on","Symbol","observable","for","killPort","_require","ressourceToExtension","extname","contentTypeDefault","ressourceToContentType","contentTypeMap","extension","availableContentTypes","contentTypeForExtension","contentTypeName","contentType","extensions","assertImportMap","type","Array","isArray","resolveUrl","writeBaseUrlMustBeAString","writeBaseUrlMustBeAbsolute","writeBaseUrlRequired","baseOrigin","basePathname","baseDirname","unresolvedPathname","importerFolders","resolvedPathname","tryUrlResolution","result","resolveSpecifier","importer","applyImportMap","importMap","writeSpecifierMustBeAString","writeImporterMustBeAString","writeImporterMustBeAbsolute","specifierUrl","specifierNormalized","scopes","scopeKeyMatching","scopeKey","specifierIsPrefixOf","scopeValue","remappingFromScopeImports","applyImports","imports","remappingFromImports","writeBareSpecifierMustBeRemapped","importKeyArray","importKey","importValue","afterImportKey","specifierHref","composeTwoImportMaps","leftImportMap","rightImportMap","composeTwoImports","composeTwoScopes","leftImports","rightImports","leftScopes","rightScopes","hasOwnProperty","sortImportMap","sortImports","sortScopes","importsSorted","sort","compareLengthOrLocaleCompare","scopesSorted","scopeName","a","b","localeCompare","normalizeImportMap","formulateBaseUrlMustBeAString","normalizeImports","normalizeScopes","importsNormalized","address","console","warn","formulateAddressMustBeAString","specifierResolved","addressUrl","formulateAdressResolutionFailed","formulateAddressUrlRequiresTrailingSlash","scopesNormalized","scope","scopeUrl","formulateScopeResolutionFailed","scopeValueNormalized","addressURL","resolveImport","defaultExtension","applyDefaultExtension","importerPathname","importerExtension","directoryUrlToPackageFileUrl","fileUrlToDirectoryUrl","readPackageFile","packageFileString","packageJsonObject","JSON","parse","resolveNodeModule","logger","rootProjectDirectoryUrl","packageFileUrl","dependencyName","dependencyVersionPattern","dependencyType","packageDirectoryUrl","nodeModuleCandidateArray","computeNodeModuleCandidateArray","nodeModuleCandidate","packageFilePath","e","message","Boolean","version","packageDirectoryRelativePath","candidateArray","relativeNodeModuleDirectoryArray","shift","resolvePackageMain","resolveMainFile","packageMainFieldName","packageMainFieldValue","module","main","extensionCandidateArray","mainFileRelativePath","mainFileUrlFirstCandidate","mainFileUrl","findMainFileUrlOrNull","mainFilePath","stats","pathToStats","extensionLeadingToAFile","findExtension","isFile","indexFileUrl","pathDirname","dirname","pathBasename","basename","extensionLeadingToFile","extensionCandidate","pathCandidate","statObject","visitPackageImports","importsForPackageImports","packageImports","from","to","visitPackageExports","packageName","packageInfo","packageIsRoot","importsForPackageExports","exports","packageExports","generateImportMapForPackage","projectDirectoryPath","rootProjectDirectoryPath","includeDevDependencies","projectDirectoryUrl","projectPackageFileUrl","rootProjectPackageFileUrl","seen","markPackageAsSeen","importerPackageFileUrl","packageIsSeen","includes","visitPackage","visitDependencies","computePackageInfo","visitPackageMain","addImportMapping","toScoped","addScopedImportMapping","importerIsRoot","importerRelativePath","packageDirectoryUrlExpected","packageIsProject","dependencyMap","dependencies","versionPattern","peerDependencies","isProjectPackage","devDependencies","all","dependency","visitDependency","dependencyData","findDependency","dependencyPackageFileUrl","dependencyPackageJsonObject","importerIsProject","importerPackageDirectoryUrl","dependenciesCache","dependencyPromise","projectPackageJsonObject","LOG_LEVEL_OFF","LOG_LEVEL_DEBUG","LOG_LEVEL_INFO","LOG_LEVEL_WARN","LOG_LEVEL_ERROR","createLogger","logLevel","debug","info","debugDisabled","infoDisabled","warnDisabled","errorDisabled","createUnexpectedLogLevelMessage","jsenvBundlingDirectoryUrl","addNamed","createImportMetaUrlNamedImportBabelPlugin","importMetaFacadeUrl","visitor","Program","programPath","metaPropertyMap","traverse","MemberExpression","node","object","property","objectProperty","propertyName","importMetaPropertyId","replaceWith","generateBabelPluginMapOption","format","babelPluginMap","babelPluginRequiredNameArray","generateBabelPluginMapSubset","generateBabelPluginMapForBundle","babelPluginMapSubset","babelPluginName","bundleBabelPluginMap","fetch","AbortController","globalAgent","options","rejectUnauthorized","fetchUrl","response","fetchUsingHttp","body","headers","defaultContentTypeMap","signal","cancellationTokenToAbortSignal","normalizeResponse","text","statusText","responseToHeaderMap","abortController","abort","headerMap","validateResponseStatusIsOk","responseStatusIsOk","valid","responseStatus","fetchSourcemap","moduleUrl","moduleContent","sourcemapParsingResult","parseSourcemapString","sourcemapUrl","sourcemapResponse","okValidation","stack","readProjectImportMap","babelHelperMap","generateBabelHelper","cleanCompileCacheDirectoryIfObsolete","getOrGenerateCompiledFile","transformJs","transformResultToCompilationResult","compilationResultToTransformResult","findAsyncPluginNameInBabelPluginMap","minify","minifyCode","createJsenvRollupPlugin","bundleDirectoryUrl","importMapFileRelativePath","importMapForBundle","importDefaultExtension","importReplaceMap","importFallbackMap","bundleCache","bundleCacheDirectoryRelativePath","convertMap","detectAndTransformIfNeededAsyncInsertedByRollup","entryPointMap","arrayOfUrlToSkipTransform","arrayOfAbstractUrl","moduleContentMap","bundleConstantAbstractSpecifier","resolveSpecifierMap","chunkId","stringify","babelHelperName","babelHelperPath","importMapForProject","jsenvProjectDirectoryUrl","reduce","previous","current","bundleCacheDirectoryUrl","cacheMeta","cacheDirectoryUrl","cleanCallback","cacheFolderPath","jsenvRollupPlugin","resolveId","importUrl","importPath","statSync","load","rollupId","rollupIdToUrl","contentRaw","loadModule","transform","transformModuleIntoSystemFormat","sourceRelativePath","compileResult","compile","transformResult","sourceUrl","outputOptions","sourcemapPathTransform","relativeSpecifier","chunkFileUrl","relativePath","originRelativePath","renderChunk","minifyOptions","toplevel","sourceMap","writeBundle","bundle","transformAsyncInsertedByRollup","bundleFilename","markUrlAsAbstract","getModule","generateSourceForImport","generateAbstractModuleForImport","generateSource","skipTransform","getExtraInfo","specifierMap","specifierMapResolved","asyncPluginName","bundleInfo","transformGenerator","bundleFileUrl","bundleToCompilationResult","rollupBundle","sourcemapPathForModule","sourcemapPathForCache","sources","sourcesContent","trackDependencies","assets","assetsContent","mainChunk","parseRollupChunk","sourcemap","rollupChunk","chunkFileName","fileName","chunk","compiledSource","moduleKeys","modules","mainModuleUrl","facadeModuleId","mainModuleSourcemap","moduleId","moduleIndex","getModuleContent","contentFromRollupSourcemap","raw","isAbstract","moduleFilePath","moduleFileBuffer","readFileSync","moduleFileString","babelPluginCompatMap","chrome","edge","firefox","samsung","opera","electron","safari","ios","ie","android","phantom","jsenvCoreDirectoryUrl","list","rimraf","valueToVersion","numberToVersion","stringToVersion","createValueErrorMessage","number","major","minor","patch","parts","Number","isNaN","versionCompare","versionA","versionB","semanticVersionA","semanticVersionB","majorDiff","minorDiff","patchDiff","versionIsBelow","versionSupposedBelow","versionSupposedAbove","findHighestVersion","highestVersion","computeBabelPluginMapForPlatform","babelPluginCompatMapFallback","platformName","platformVersion","babelPluginMapForPlatform","key","compatible","platformIsCompatibleWithFeature","platformCompatMap","platformCompatibleVersion","computePlatformCompatibleVersion","BEST_ID","OTHERWISE_ID","jsenvPluginCompatMap","computeJsenvPluginMapForPlatform","jsenvPluginMap","jsenvPluginCompatMapFallback","jsenvPluginMapForPlatform","featureCompat","buildExternalHelpers","getDependencies","groupHaveSameRequirements","leftGroup","rightGroup","jsenvPluginRequiredNameArray","generatePlatformGroupArray","versionArray","babelPluginKey","babelPluginCompat","jsenvPluginKey","jsenvPluginCompat","platformGroupArray","filter","group","groupWithSameRequirements","platformGroupCandidate","composePlatformCompatMap","secondPlatformCompatMap","objectComposeValue","normalizePlatformCompatMapVersions","secondVersion","platformCompatibility","objectMapValue","mapped","composed","composeGroupArray","arrayOfGroupArray","groupArrayReducer","previousGroupArray","groupArray","reducedGroupArray","copyGroup","existingGroupCandidate","generateAllPlatformGroupArray","platformNames","platformCompatMapToScore","platformScoreMap","platformToScore","other","versionUsageMap","versionArrayAscending","closestVersion","reverse","generateGroupMap","groupCount","platformAlwaysInsidePlatformScoreMap","platformWillAlwaysBeKnown","groupWithoutFeature","allPlatformGroupArray","arrayWithoutValue","groupToScore","allPlatformGroupArraySortedByScore","addOtherwiseToBeSafe","lastGroupIndex","groupMap","valueCandidate","lockfile","template","types","t","declare","default","hoistVariables","buildTemplate","buildExportAll","constructExportCall","exportIdent","exportNames","exportValues","exportStarTarget","statements","expressionStatement","callExpression","stringLiteral","objectProperties","exportName","exportValue","identifier","objectExpression","exportObj","generateUid","variableDeclaration","variableDeclarator","KEY","generateUidIdentifier","EXPORT_OBJ","TARGET","assignmentExpression","memberExpression","TYPE_IMPORT","api","assertVersion","systemGlobal","IGNORE_REASSIGNMENT_SYMBOL","reassignmentVisitor","arg","get","isAssignmentExpression","isObjectPattern","isArrayPattern","exprs","getBindingIdentifiers","getBinding","exportedNames","exportedName","buildCall","expression","sequenceExpression","isIdentifier","isPostUpdateExpression","isUpdateExpression","prefix","binaryExpression","operator","unaryExpression","cloneNode","argument","numericLiteral","CallExpression","state","callee","contextIdent","arguments","MetaProperty","meta","ReferencedIdentifier","hasBinding","enter","exit","undefinedIdent","buildUndefinedNode","exportMap","create","beforeBody","setters","variableIds","removedPaths","addExportName","val","pushModule","specifiers","m","concat","buildExportCall","isFunctionDeclaration","isClassDeclaration","id","toExpression","isImportDeclaration","removeBinding","remove","isExportAllDeclaration","isExportDefaultDeclaration","declar","isExportNamedDeclaration","isFunction","isClass","nodes","binding","local","exported","replaceWithMultiple","setterBody","target","isImportNamespaceSpecifier","isImportDefaultSpecifier","importSpecifier","isImportSpecifier","imported","hasExportStar","isExportSpecifier","functionExpression","blockStatement","moduleName","getModuleName","hasInit","unshift","SYSTEM_REGISTER","BEFORE_BODY","MODULE_NAME","SETTERS","arrayExpression","SOURCES","EXECUTE","topLevelAwait","programUsesTopLevelAwait","EXPORT_IDENTIFIER","CONTEXT_IDENTIFIER","hasTopLevelAwait","AwaitExpression","parent","getFunctionParent","Convert","addSideEffect","addDefault","transformAsync","transformFromAstAsync","syntaxDynamicImport","syntaxImportMeta","assertFolder","filesystemEntry","pathToFilesystemEntry","assertFile","statsToEntry","rollup","generateBundleUsingRollup","rollupParseOptions","rollupGenerateOptions","writeOnFileSystem","experimentalTopLevelAwait","onwarn","warning","rollupOutputArray","write","preferConst","generate","bundleOptionsToRollupParseOptions","nativeModulePredicate","external","bundleOptionsToRollupGenerateOptions","formatOutputOptions","dir","formatToRollupFormat","sourcemapExcludeSources","bundleWithoutBalancing","plugins","createBundleWithoutBalancingMessage","bundleWithBalancing","compileId","bundleDirectoryUrlWithBalancing","createBundleWithBalancingMessage","bundleBalancer","balancerDataAbstractSpecifier","otherwise","createBundleBalancerMessage","removeDirectory","NATIVE_NODE_MODULE_SPECIFIER_ARRAY","isBareSpecifierForNativeNodeModule","jsenvBabelPluginMap","browserScoreMap","nodeVersionScoreMap","generateBundle","bundleDirectoryRelativePath","bundleDirectoryClean","browser","throwUnhandled","compileGroupCount","balancerTemplateFileUrl","bundleDirectoryPath","generateEntryPointsFolders","generateEntryPointsBalancerFiles","setTimeout","entryPointName","generateCommonJsBundle","generateCommonJsBundleForNode","nodeMinimumVersion","decideNodeMinimumVersion","babelPluginMapForNode","generateGlobalBundle","globalName","generateSystemJsBundle"],"mappings":";;;;;;;;;;;;;;AAOO,MAAMA,kBAAkB,GAAIC,IAAD,IAAU;QACpCC,YAAY,GAAGD,IAAI,CAACE,UAAL,CAAgB,SAAhB,IAA6BF,IAA7B,GAAoCG,MAAM,CAACC,mBAAa,CAACJ,IAAD,CAAd,CAA/D;;MACIC,YAAY,CAACI,QAAb,CAAsB,GAAtB,CAAJ,EAAgC;WACvBJ,YAAP;;;SAEM,GAAEA,YAAa,GAAvB;CALK;AAQP,AAAO,MAAMK,aAAa,GAAIN,IAAD,IAAU;SAC9BG,MAAM,CAACC,mBAAa,CAACJ,IAAD,CAAd,CAAb;CADK;AAIP,AAAO,MAAMO,aAAa,GAAIC,OAAD,IAAa;SACjCC,mBAAa,CAACD,OAAD,CAApB;CADK;AAIP,AAAO,MAAME,mBAAmB,GAAG,CAACC,SAAD,EAAYC,OAAZ,KAAwB;QACnDX,YAAY,GAAGE,MAAM,CAAC,IAAIU,GAAJ,CAAQF,SAAR,EAAmBC,OAAnB,CAAD,CAA3B;;MACIX,YAAY,CAACI,QAAb,CAAsB,GAAtB,CAAJ,EAAgC;WACvBJ,YAAP;;;SAEM,GAAEA,YAAa,GAAvB;CALK;AAQP,AAAO,MAAMa,SAAS,GAAIC,M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