Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

Location:
imaps-frontend/node_modules/@babel/core
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/@babel/core/cjs-proxy.cjs

    rd565449 r0c6b92a  
    3030for (const name of functionNames) {
    3131  exports[name] = function (...args) {
     32    if (
     33      process.env.BABEL_8_BREAKING &&
     34      typeof args[args.length - 1] !== "function"
     35    ) {
     36      throw new Error(
     37        `Starting from Babel 8.0.0, the '${name}' function expects a callback. If you need to call it synchronously, please use '${name}Sync'.`
     38      );
     39    }
     40
    3241    babelP.then(babel => {
    3342      babel[name](...args);
  • imaps-frontend/node_modules/@babel/core/lib/config/files/configuration.js

    rd565449 r0c6b92a  
    5353var fs = require("../../gensync-utils/fs.js");
    5454var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js");
     55var _async = require("../../gensync-utils/async.js");
    5556const debug = _debug()("babel:config:loading:files:configuration");
    5657const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"];
     
    6667function* readConfigCode(filepath, data) {
    6768  if (!_fs().existsSync(filepath)) return null;
    68   let options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
     69  let options = yield* (0, _moduleTypes.default)(filepath, (yield* (0, _async.isAsync)()) ? "auto" : "require", "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", "You appear to be using a configuration file that contains top-level " + "await, which is only supported when running Babel asynchronously.");
    6970  let cacheNeedsConfiguration = false;
    7071  if (typeof options === "function") {
     
    103104const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => {
    104105  const babel = file.options["babel"];
    105   if (typeof babel === "undefined") return null;
     106  if (babel === undefined) return null;
    106107  if (typeof babel !== "object" || Array.isArray(babel) || babel === null) {
    107108    throw new _configError.default(`.babel property must be an object`, file.filepath);
     
    136137const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => {
    137138  const ignoreDir = _path().dirname(filepath);
    138   const ignorePatterns = content.split("\n").map(line => line.replace(/#.*$/, "").trim()).filter(line => !!line);
     139  const ignorePatterns = content.split("\n").map(line => line.replace(/#.*$/, "").trim()).filter(Boolean);
    139140  for (const pattern of ignorePatterns) {
    140141    if (pattern[0] === "!") {
  • imaps-frontend/node_modules/@babel/core/lib/config/files/configuration.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_debug","data","require","_fs","_path","_json","_gensync","_caching","_configApi","_utils","_moduleTypes","_patternToRegex","_configError","fs","_rewriteStackTrace","debug","buildDebug","ROOT_CONFIG_FILENAMES","exports","RELATIVE_CONFIG_FILENAMES","BABELIGNORE_FILENAME","runConfig","makeWeakCache","options","cache","endHiddenCallStack","makeConfigAPI","cacheNeedsConfiguration","configured","readConfigCode","filepath","nodeFs","existsSync","loadCodeDefault","Array","isArray","ConfigError","then","catch","throwConfigError","buildConfigFileObject","cfboaf","WeakMap","configFilesByFilepath","get","set","Map","configFile","dirname","path","packageToBabelConfig","makeWeakCacheSync","file","babel","readConfigJSON5","makeStaticFileCache","content","json5","parse","err","message","readIgnoreConfig","ignoreDir","ignorePatterns","split","map","line","replace","trim","filter","pattern","ignore","pathPatternToRegex","findConfigUpwards","rootDir","filename","join","nextDir","findRelativeConfig","packageData","envName","caller","config","loc","directories","_packageData$pkg","loadOneConfig","pkg","ignoreLoc","findRootConfig","names","previousConfig","configs","gensync","all","readConfig","reduce","basename","loadConfig","name","v","w","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","code","conf","ext","extname","resolveShowConfigPath","targetPath","env","BABEL_SHOW_CONFIG_FOR","absolutePath","stats","stat","isFile"],"sources":["../../../src/config/files/configuration.ts"],"sourcesContent":["import buildDebug from \"debug\";\nimport nodeFs from \"fs\";\nimport path from \"path\";\nimport json5 from \"json5\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport { makeWeakCache, makeWeakCacheSync } from \"../caching.ts\";\nimport type { CacheConfigurator } from \"../caching.ts\";\nimport { makeConfigAPI } from \"../helpers/config-api.ts\";\nimport type { ConfigAPI } from \"../helpers/config-api.ts\";\nimport { makeStaticFileCache } from \"./utils.ts\";\nimport loadCodeDefault from \"./module-types.ts\";\nimport pathPatternToRegex from \"../pattern-to-regex.ts\";\nimport type { FilePackageData, RelativeConfig, ConfigFile } from \"./types.ts\";\nimport type { CallerMetadata, InputOptions } from \"../validation/options.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport * as fs from \"../../gensync-utils/fs.ts\";\n\nimport { createRequire } from \"module\";\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:configuration\");\n\nexport const ROOT_CONFIG_FILENAMES = [\n  \"babel.config.js\",\n  \"babel.config.cjs\",\n  \"babel.config.mjs\",\n  \"babel.config.json\",\n  \"babel.config.cts\",\n];\nconst RELATIVE_CONFIG_FILENAMES = [\n  \".babelrc\",\n  \".babelrc.js\",\n  \".babelrc.cjs\",\n  \".babelrc.mjs\",\n  \".babelrc.json\",\n  \".babelrc.cts\",\n];\n\nconst BABELIGNORE_FILENAME = \".babelignore\";\n\ntype ConfigCacheData = {\n  envName: string;\n  caller: CallerMetadata | undefined;\n};\n\nconst runConfig = makeWeakCache(function* runConfig(\n  options: Function,\n  cache: CacheConfigurator<ConfigCacheData>,\n): Handler<{\n  options: InputOptions | null;\n  cacheNeedsConfiguration: boolean;\n}> {\n  // @ts-expect-error - if we want to make it possible to use async configs\n  yield* [];\n\n  return {\n    options: endHiddenCallStack(options as any as (api: ConfigAPI) => unknown)(\n      makeConfigAPI(cache),\n    ),\n    cacheNeedsConfiguration: !cache.configured(),\n  };\n});\n\nfunction* readConfigCode(\n  filepath: string,\n  data: ConfigCacheData,\n): Handler<ConfigFile | null> {\n  if (!nodeFs.existsSync(filepath)) return null;\n\n  let options = yield* loadCodeDefault(\n    filepath,\n    \"You appear to be using a native ECMAScript module configuration \" +\n      \"file, which is only supported when running Babel asynchronously.\",\n  );\n\n  let cacheNeedsConfiguration = false;\n  if (typeof options === \"function\") {\n    ({ options, cacheNeedsConfiguration } = yield* runConfig(options, data));\n  }\n\n  if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n    throw new ConfigError(\n      `Configuration should be an exported JavaScript object.`,\n      filepath,\n    );\n  }\n\n  // @ts-expect-error todo(flow->ts)\n  if (typeof options.then === \"function\") {\n    // @ts-expect-error We use ?. in case options is a thenable but not a promise\n    options.catch?.(() => {});\n\n    throw new ConfigError(\n      `You appear to be using an async configuration, ` +\n        `which your current version of Babel does not support. ` +\n        `We may add support for this in the future, ` +\n        `but if you're on the most recent version of @babel/core and still ` +\n        `seeing this error, then you'll need to synchronously return your config.`,\n      filepath,\n    );\n  }\n\n  if (cacheNeedsConfiguration) throwConfigError(filepath);\n\n  return buildConfigFileObject(options, filepath);\n}\n\n// We cache the generated ConfigFile object rather than creating a new one\n// every time, so that it can be used as a cache key in other functions.\nconst cfboaf /* configFilesByOptionsAndFilepath */ = new WeakMap<\n  InputOptions,\n  Map<string, ConfigFile>\n>();\nfunction buildConfigFileObject(\n  options: InputOptions,\n  filepath: string,\n): ConfigFile {\n  let configFilesByFilepath = cfboaf.get(options);\n  if (!configFilesByFilepath) {\n    cfboaf.set(options, (configFilesByFilepath = new Map()));\n  }\n\n  let configFile = configFilesByFilepath.get(filepath);\n  if (!configFile) {\n    configFile = {\n      filepath,\n      dirname: path.dirname(filepath),\n      options,\n    };\n    configFilesByFilepath.set(filepath, configFile);\n  }\n\n  return configFile;\n}\n\nconst packageToBabelConfig = makeWeakCacheSync(\n  (file: ConfigFile): ConfigFile | null => {\n    const babel: unknown = file.options[\"babel\"];\n\n    if (typeof babel === \"undefined\") return null;\n\n    if (typeof babel !== \"object\" || Array.isArray(babel) || babel === null) {\n      throw new ConfigError(`.babel property must be an object`, file.filepath);\n    }\n\n    return {\n      filepath: file.filepath,\n      dirname: file.dirname,\n      options: babel,\n    };\n  },\n);\n\nconst readConfigJSON5 = makeStaticFileCache((filepath, content): ConfigFile => {\n  let options;\n  try {\n    options = json5.parse(content);\n  } catch (err) {\n    throw new ConfigError(\n      `Error while parsing config - ${err.message}`,\n      filepath,\n    );\n  }\n\n  if (!options) throw new ConfigError(`No config detected`, filepath);\n\n  if (typeof options !== \"object\") {\n    throw new ConfigError(`Config returned typeof ${typeof options}`, filepath);\n  }\n  if (Array.isArray(options)) {\n    throw new ConfigError(`Expected config object but found array`, filepath);\n  }\n\n  delete options[\"$schema\"];\n\n  return {\n    filepath,\n    dirname: path.dirname(filepath),\n    options,\n  };\n});\n\nconst readIgnoreConfig = makeStaticFileCache((filepath, content) => {\n  const ignoreDir = path.dirname(filepath);\n  const ignorePatterns = content\n    .split(\"\\n\")\n    .map<string>(line => line.replace(/#.*$/, \"\").trim())\n    .filter(line => !!line);\n\n  for (const pattern of ignorePatterns) {\n    if (pattern[0] === \"!\") {\n      throw new ConfigError(\n        `Negation of file paths is not supported.`,\n        filepath,\n      );\n    }\n  }\n\n  return {\n    filepath,\n    dirname: path.dirname(filepath),\n    ignore: ignorePatterns.map(pattern =>\n      pathPatternToRegex(pattern, ignoreDir),\n    ),\n  };\n});\n\nexport function findConfigUpwards(rootDir: string): string | null {\n  let dirname = rootDir;\n  for (;;) {\n    for (const filename of ROOT_CONFIG_FILENAMES) {\n      if (nodeFs.existsSync(path.join(dirname, filename))) {\n        return dirname;\n      }\n    }\n\n    const nextDir = path.dirname(dirname);\n    if (dirname === nextDir) break;\n    dirname = nextDir;\n  }\n\n  return null;\n}\n\nexport function* findRelativeConfig(\n  packageData: FilePackageData,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n  let config = null;\n  let ignore = null;\n\n  const dirname = path.dirname(packageData.filepath);\n\n  for (const loc of packageData.directories) {\n    if (!config) {\n      config = yield* loadOneConfig(\n        RELATIVE_CONFIG_FILENAMES,\n        loc,\n        envName,\n        caller,\n        packageData.pkg?.dirname === loc\n          ? packageToBabelConfig(packageData.pkg)\n          : null,\n      );\n    }\n\n    if (!ignore) {\n      const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME);\n      ignore = yield* readIgnoreConfig(ignoreLoc);\n\n      if (ignore) {\n        debug(\"Found ignore %o from %o.\", ignore.filepath, dirname);\n      }\n    }\n  }\n\n  return { config, ignore };\n}\n\nexport function findRootConfig(\n  dirname: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n  return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);\n}\n\nfunction* loadOneConfig(\n  names: string[],\n  dirname: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n  previousConfig: ConfigFile | null = null,\n): Handler<ConfigFile | null> {\n  const configs = yield* gensync.all(\n    names.map(filename =>\n      readConfig(path.join(dirname, filename), envName, caller),\n    ),\n  );\n  const config = configs.reduce((previousConfig: ConfigFile | null, config) => {\n    if (config && previousConfig) {\n      throw new ConfigError(\n        `Multiple configuration files found. Please remove one:\\n` +\n          ` - ${path.basename(previousConfig.filepath)}\\n` +\n          ` - ${config.filepath}\\n` +\n          `from ${dirname}`,\n      );\n    }\n\n    return config || previousConfig;\n  }, previousConfig);\n\n  if (config) {\n    debug(\"Found configuration %o from %o.\", config.filepath, dirname);\n  }\n  return config;\n}\n\nexport function* loadConfig(\n  name: string,\n  dirname: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n  const filepath = require.resolve(name, { paths: [dirname] });\n\n  const conf = yield* readConfig(filepath, envName, caller);\n  if (!conf) {\n    throw new ConfigError(\n      `Config file contains no configuration data`,\n      filepath,\n    );\n  }\n\n  debug(\"Loaded config %o from %o.\", name, dirname);\n  return conf;\n}\n\n/**\n * Read the given config file, returning the result. Returns null if no config was found, but will\n * throw if there are parsing errors while loading a config.\n */\nfunction readConfig(\n  filepath: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n  const ext = path.extname(filepath);\n  switch (ext) {\n    case \".js\":\n    case \".cjs\":\n    case \".mjs\":\n    case \".cts\":\n      return readConfigCode(filepath, { envName, caller });\n    default:\n      return readConfigJSON5(filepath);\n  }\n}\n\nexport function* resolveShowConfigPath(\n  dirname: string,\n): Handler<string | null> {\n  const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;\n  if (targetPath != null) {\n    const absolutePath = path.resolve(dirname, targetPath);\n    const stats = yield* fs.stat(absolutePath);\n    if (!stats.isFile()) {\n      throw new Error(\n        `${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`,\n      );\n    }\n    return absolutePath;\n  }\n  return null;\n}\n\nfunction throwConfigError(filepath: string): never {\n  throw new ConfigError(\n    `\\\nCaching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n  // The API exposes the following:\n\n  // Cache the returned value forever and don't call this function again.\n  api.cache(true);\n\n  // Don't cache at all. Not recommended because it will be very slow.\n  api.cache(false);\n\n  // Cached based on the value of some function. If this function returns a value different from\n  // a previously-encountered value, the plugins will re-evaluate.\n  var env = api.cache(() => process.env.NODE_ENV);\n\n  // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n  // any possible NODE_ENV value that might come up during plugin execution.\n  var isProd = api.cache(() => process.env.NODE_ENV === \"production\");\n\n  // .cache(fn) will perform a linear search though instances to find the matching plugin based\n  // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n  // previous instance whenever something changes, you may use:\n  var isProd = api.cache.invalidate(() => process.env.NODE_ENV === \"production\");\n\n  // Note, we also expose the following more-verbose versions of the above examples:\n  api.cache.forever(); // api.cache(true)\n  api.cache.never();   // api.cache(false)\n  api.cache.using(fn); // api.cache(fn)\n\n  // Return the value that will be cached.\n  return { };\n};`,\n    filepath,\n  );\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,IAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,MAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,KAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAM,QAAA,GAAAL,OAAA;AAEA,IAAAM,UAAA,GAAAN,OAAA;AAEA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AAGA,IAAAU,YAAA,GAAAV,OAAA;AAEA,IAAAW,EAAA,GAAAX,OAAA;AAGA,IAAAY,kBAAA,GAAAZ,OAAA;AAGA,MAAMa,KAAK,GAAGC,OAASA,CAAC,CAAC,0CAA0C,CAAC;AAE7D,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,CACnC,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,CACnB;AACD,MAAME,yBAAyB,GA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AACA;AACA;AACA;AACA;AACA;AACA,GAAG,EACCN,QACF,CAAC;AACH;AAAC","ignoreList":[]}
     1{"version":3,"names":["_debug","data","require","_fs","_path","_json","_gensync","_caching","_configApi","_utils","_moduleTypes","_patternToRegex","_configError","fs","_rewriteStackTrace","_async","debug","buildDebug","ROOT_CONFIG_FILENAMES","exports","RELATIVE_CONFIG_FILENAMES","BABELIGNORE_FILENAME","runConfig","makeWeakCache","options","cache","endHiddenCallStack","makeConfigAPI","cacheNeedsConfiguration","configured","readConfigCode","filepath","nodeFs","existsSync","loadCodeDefault","isAsync","Array","isArray","ConfigError","then","catch","throwConfigError","buildConfigFileObject","cfboaf","WeakMap","configFilesByFilepath","get","set","Map","configFile","dirname","path","packageToBabelConfig","makeWeakCacheSync","file","babel","undefined","readConfigJSON5","makeStaticFileCache","content","json5","parse","err","message","readIgnoreConfig","ignoreDir","ignorePatterns","split","map","line","replace","trim","filter","Boolean","pattern","ignore","pathPatternToRegex","findConfigUpwards","rootDir","filename","join","nextDir","findRelativeConfig","packageData","envName","caller","config","loc","directories","_packageData$pkg","loadOneConfig","pkg","ignoreLoc","findRootConfig","names","previousConfig","configs","gensync","all","readConfig","reduce","basename","loadConfig","name","v","w","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","code","conf","ext","extname","resolveShowConfigPath","targetPath","env","BABEL_SHOW_CONFIG_FOR","absolutePath","stats","stat","isFile"],"sources":["../../../src/config/files/configuration.ts"],"sourcesContent":["import buildDebug from \"debug\";\nimport nodeFs from \"fs\";\nimport path from \"path\";\nimport json5 from \"json5\";\nimport gensync from \"gensync\";\nimport type { Handler } from \"gensync\";\nimport { makeWeakCache, makeWeakCacheSync } from \"../caching.ts\";\nimport type { CacheConfigurator } from \"../caching.ts\";\nimport { makeConfigAPI } from \"../helpers/config-api.ts\";\nimport type { ConfigAPI } from \"../helpers/config-api.ts\";\nimport { makeStaticFileCache } from \"./utils.ts\";\nimport loadCodeDefault from \"./module-types.ts\";\nimport pathPatternToRegex from \"../pattern-to-regex.ts\";\nimport type { FilePackageData, RelativeConfig, ConfigFile } from \"./types.ts\";\nimport type { CallerMetadata, InputOptions } from \"../validation/options.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport * as fs from \"../../gensync-utils/fs.ts\";\n\nimport { createRequire } from \"module\";\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nimport { isAsync } from \"../../gensync-utils/async.ts\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:configuration\");\n\nexport const ROOT_CONFIG_FILENAMES = [\n  \"babel.config.js\",\n  \"babel.config.cjs\",\n  \"babel.config.mjs\",\n  \"babel.config.json\",\n  \"babel.config.cts\",\n];\nconst RELATIVE_CONFIG_FILENAMES = [\n  \".babelrc\",\n  \".babelrc.js\",\n  \".babelrc.cjs\",\n  \".babelrc.mjs\",\n  \".babelrc.json\",\n  \".babelrc.cts\",\n];\n\nconst BABELIGNORE_FILENAME = \".babelignore\";\n\ntype ConfigCacheData = {\n  envName: string;\n  caller: CallerMetadata | undefined;\n};\n\nconst runConfig = makeWeakCache(function* runConfig(\n  options: Function,\n  cache: CacheConfigurator<ConfigCacheData>,\n): Handler<{\n  options: InputOptions | null;\n  cacheNeedsConfiguration: boolean;\n}> {\n  // if we want to make it possible to use async configs\n  yield* [];\n\n  return {\n    options: endHiddenCallStack(options as any as (api: ConfigAPI) => unknown)(\n      makeConfigAPI(cache),\n    ),\n    cacheNeedsConfiguration: !cache.configured(),\n  };\n});\n\nfunction* readConfigCode(\n  filepath: string,\n  data: ConfigCacheData,\n): Handler<ConfigFile | null> {\n  if (!nodeFs.existsSync(filepath)) return null;\n\n  let options = yield* loadCodeDefault(\n    filepath,\n    (yield* isAsync()) ? \"auto\" : \"require\",\n    \"You appear to be using a native ECMAScript module configuration \" +\n      \"file, which is only supported when running Babel asynchronously \" +\n      \"or when using the Node.js `--experimental-require-module` flag.\",\n    \"You appear to be using a configuration file that contains top-level \" +\n      \"await, which is only supported when running Babel asynchronously.\",\n  );\n\n  let cacheNeedsConfiguration = false;\n  if (typeof options === \"function\") {\n    ({ options, cacheNeedsConfiguration } = yield* runConfig(options, data));\n  }\n\n  if (!options || typeof options !== \"object\" || Array.isArray(options)) {\n    throw new ConfigError(\n      `Configuration should be an exported JavaScript object.`,\n      filepath,\n    );\n  }\n\n  // @ts-expect-error todo(flow->ts)\n  if (typeof options.then === \"function\") {\n    // @ts-expect-error We use ?. in case options is a thenable but not a promise\n    options.catch?.(() => {});\n    throw new ConfigError(\n      `You appear to be using an async configuration, ` +\n        `which your current version of Babel does not support. ` +\n        `We may add support for this in the future, ` +\n        `but if you're on the most recent version of @babel/core and still ` +\n        `seeing this error, then you'll need to synchronously return your config.`,\n      filepath,\n    );\n  }\n\n  if (cacheNeedsConfiguration) throwConfigError(filepath);\n\n  return buildConfigFileObject(options, filepath);\n}\n\n// We cache the generated ConfigFile object rather than creating a new one\n// every time, so that it can be used as a cache key in other functions.\nconst cfboaf /* configFilesByOptionsAndFilepath */ = new WeakMap<\n  InputOptions,\n  Map<string, ConfigFile>\n>();\nfunction buildConfigFileObject(\n  options: InputOptions,\n  filepath: string,\n): ConfigFile {\n  let configFilesByFilepath = cfboaf.get(options);\n  if (!configFilesByFilepath) {\n    cfboaf.set(options, (configFilesByFilepath = new Map()));\n  }\n\n  let configFile = configFilesByFilepath.get(filepath);\n  if (!configFile) {\n    configFile = {\n      filepath,\n      dirname: path.dirname(filepath),\n      options,\n    };\n    configFilesByFilepath.set(filepath, configFile);\n  }\n\n  return configFile;\n}\n\nconst packageToBabelConfig = makeWeakCacheSync(\n  (file: ConfigFile): ConfigFile | null => {\n    const babel: unknown = file.options[\"babel\"];\n\n    if (babel === undefined) return null;\n\n    if (typeof babel !== \"object\" || Array.isArray(babel) || babel === null) {\n      throw new ConfigError(`.babel property must be an object`, file.filepath);\n    }\n\n    return {\n      filepath: file.filepath,\n      dirname: file.dirname,\n      options: babel,\n    };\n  },\n);\n\nconst readConfigJSON5 = makeStaticFileCache((filepath, content): ConfigFile => {\n  let options;\n  try {\n    options = json5.parse(content);\n  } catch (err) {\n    throw new ConfigError(\n      `Error while parsing config - ${err.message}`,\n      filepath,\n    );\n  }\n\n  if (!options) throw new ConfigError(`No config detected`, filepath);\n\n  if (typeof options !== \"object\") {\n    throw new ConfigError(`Config returned typeof ${typeof options}`, filepath);\n  }\n  if (Array.isArray(options)) {\n    throw new ConfigError(`Expected config object but found array`, filepath);\n  }\n\n  delete options[\"$schema\"];\n\n  return {\n    filepath,\n    dirname: path.dirname(filepath),\n    options,\n  };\n});\n\nconst readIgnoreConfig = makeStaticFileCache((filepath, content) => {\n  const ignoreDir = path.dirname(filepath);\n  const ignorePatterns = content\n    .split(\"\\n\")\n    .map(line =>\n      line.replace(process.env.BABEL_8_BREAKING ? /^#.*$/ : /#.*$/, \"\").trim(),\n    )\n    .filter(Boolean);\n\n  for (const pattern of ignorePatterns) {\n    if (pattern[0] === \"!\") {\n      throw new ConfigError(\n        `Negation of file paths is not supported.`,\n        filepath,\n      );\n    }\n  }\n\n  return {\n    filepath,\n    dirname: path.dirname(filepath),\n    ignore: ignorePatterns.map(pattern =>\n      pathPatternToRegex(pattern, ignoreDir),\n    ),\n  };\n});\n\nexport function findConfigUpwards(rootDir: string): string | null {\n  let dirname = rootDir;\n  for (;;) {\n    for (const filename of ROOT_CONFIG_FILENAMES) {\n      if (nodeFs.existsSync(path.join(dirname, filename))) {\n        return dirname;\n      }\n    }\n\n    const nextDir = path.dirname(dirname);\n    if (dirname === nextDir) break;\n    dirname = nextDir;\n  }\n\n  return null;\n}\n\nexport function* findRelativeConfig(\n  packageData: FilePackageData,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n  let config = null;\n  let ignore = null;\n\n  const dirname = path.dirname(packageData.filepath);\n\n  for (const loc of packageData.directories) {\n    if (!config) {\n      config = yield* loadOneConfig(\n        RELATIVE_CONFIG_FILENAMES,\n        loc,\n        envName,\n        caller,\n        packageData.pkg?.dirname === loc\n          ? packageToBabelConfig(packageData.pkg)\n          : null,\n      );\n    }\n\n    if (!ignore) {\n      const ignoreLoc = path.join(loc, BABELIGNORE_FILENAME);\n      ignore = yield* readIgnoreConfig(ignoreLoc);\n\n      if (ignore) {\n        debug(\"Found ignore %o from %o.\", ignore.filepath, dirname);\n      }\n    }\n  }\n\n  return { config, ignore };\n}\n\nexport function findRootConfig(\n  dirname: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n  return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);\n}\n\nfunction* loadOneConfig(\n  names: string[],\n  dirname: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n  previousConfig: ConfigFile | null = null,\n): Handler<ConfigFile | null> {\n  const configs = yield* gensync.all(\n    names.map(filename =>\n      readConfig(path.join(dirname, filename), envName, caller),\n    ),\n  );\n  const config = configs.reduce((previousConfig: ConfigFile | null, config) => {\n    if (config && previousConfig) {\n      throw new ConfigError(\n        `Multiple configuration files found. Please remove one:\\n` +\n          ` - ${path.basename(previousConfig.filepath)}\\n` +\n          ` - ${config.filepath}\\n` +\n          `from ${dirname}`,\n      );\n    }\n\n    return config || previousConfig;\n  }, previousConfig);\n\n  if (config) {\n    debug(\"Found configuration %o from %o.\", config.filepath, dirname);\n  }\n  return config;\n}\n\nexport function* loadConfig(\n  name: string,\n  dirname: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n  const filepath = require.resolve(name, { paths: [dirname] });\n\n  const conf = yield* readConfig(filepath, envName, caller);\n  if (!conf) {\n    throw new ConfigError(\n      `Config file contains no configuration data`,\n      filepath,\n    );\n  }\n\n  debug(\"Loaded config %o from %o.\", name, dirname);\n  return conf;\n}\n\n/**\n * Read the given config file, returning the result. Returns null if no config was found, but will\n * throw if there are parsing errors while loading a config.\n */\nfunction readConfig(\n  filepath: string,\n  envName: string,\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n  const ext = path.extname(filepath);\n  switch (ext) {\n    case \".js\":\n    case \".cjs\":\n    case \".mjs\":\n    case \".cts\":\n      return readConfigCode(filepath, { envName, caller });\n    default:\n      return readConfigJSON5(filepath);\n  }\n}\n\nexport function* resolveShowConfigPath(\n  dirname: string,\n): Handler<string | null> {\n  const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;\n  if (targetPath != null) {\n    const absolutePath = path.resolve(dirname, targetPath);\n    const stats = yield* fs.stat(absolutePath);\n    if (!stats.isFile()) {\n      throw new Error(\n        `${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`,\n      );\n    }\n    return absolutePath;\n  }\n  return null;\n}\n\nfunction throwConfigError(filepath: string): never {\n  throw new ConfigError(\n    `\\\nCaching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n  // The API exposes the following:\n\n  // Cache the returned value forever and don't call this function again.\n  api.cache(true);\n\n  // Don't cache at all. Not recommended because it will be very slow.\n  api.cache(false);\n\n  // Cached based on the value of some function. If this function returns a value different from\n  // a previously-encountered value, the plugins will re-evaluate.\n  var env = api.cache(() => process.env.NODE_ENV);\n\n  // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n  // any possible NODE_ENV value that might come up during plugin execution.\n  var isProd = api.cache(() => process.env.NODE_ENV === \"production\");\n\n  // .cache(fn) will perform a linear search though instances to find the matching plugin based\n  // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n  // previous instance whenever something changes, you may use:\n  var isProd = api.cache.invalidate(() => process.env.NODE_ENV === \"production\");\n\n  // Note, we also expose the following more-verbose versions of the above examples:\n  api.cache.forever(); // api.cache(true)\n  api.cache.never();   // api.cache(false)\n  api.cache.using(fn); // api.cache(fn)\n\n  // Return the value that will be cached.\n  return { };\n};`,\n    filepath,\n  );\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,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AACA;AACA;AACA;AACA,GAAG,EACCP,QACF,CAAC;AACH;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/files/index-browser.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n  ConfigFile,\n  IgnoreFile,\n  RelativeConfig,\n  FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  rootDir: string,\n): string | null {\n  return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n  return {\n    filepath,\n    directories: [],\n    pkg: null,\n    isPackage: false,\n  };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  pkgData: FilePackageData,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  envName: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n  return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dirname: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  envName: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n  return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n  name: string,\n  dirname: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  envName: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n  throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dirname: string,\n): Handler<string | null> {\n  return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): string | null {\n  return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): string | null {\n  return null;\n}\n\nexport function loadPlugin(\n  name: string,\n  dirname: string,\n): Handler<{\n  filepath: string;\n  value: unknown;\n}> {\n  throw new Error(\n    `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n  );\n}\n\nexport function loadPreset(\n  name: string,\n  dirname: string,\n): Handler<{\n  filepath: string;\n  value: unknown;\n}> {\n  throw new Error(\n    `Cannot load preset ${name} relative to ${dirname} in a browser`,\n  );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAC,eAAeD,IAAI,gBAAgBF,OAAO,eAAe,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAAC,OAAA,CAAAD,qBAAA,GAAG,EAAE;AAG1C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAiB;EAC1E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAAC","ignoreList":[]}
     1{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\n\nimport type {\n  ConfigFile,\n  IgnoreFile,\n  RelativeConfig,\n  FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  rootDir: string,\n): string | null {\n  return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n  return {\n    filepath,\n    directories: [],\n    pkg: null,\n    isPackage: false,\n  };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  pkgData: FilePackageData,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  envName: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n  return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dirname: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  envName: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n  return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n  name: string,\n  dirname: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  envName: string,\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n  throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  dirname: string,\n): Handler<string | null> {\n  return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\ntype Resolved =\n  | { loader: \"require\"; filepath: string }\n  | { loader: \"import\"; filepath: string };\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): Resolved | null {\n  return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): Resolved | null {\n  return null;\n}\n\nexport function loadPlugin(\n  name: string,\n  dirname: string,\n): Handler<{\n  filepath: string;\n  value: unknown;\n}> {\n  throw new Error(\n    `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n  );\n}\n\nexport function loadPreset(\n  name: string,\n  dirname: string,\n): Handler<{\n  filepath: string;\n  value: unknown;\n}> {\n  throw new Error(\n    `Cannot load preset ${name} relative to ${dirname} in a browser`,\n  );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAaO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAC,eAAeD,IAAI,gBAAgBF,OAAO,eAAe,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAAC,OAAA,CAAAD,qBAAA,GAAG,EAAE;AAO1C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAmB;EAC5E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAmB;EAC5E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/files/module-types.js

    rd565449 r0c6b92a  
    66exports.default = loadCodeDefault;
    77exports.supportsESM = void 0;
    8 var _async = require("../../gensync-utils/async.js");
     8var _async3 = require("../../gensync-utils/async.js");
    99function _path() {
    1010  const data = require("path");
     
    3838var _configError = require("../../errors/config-error.js");
    3939var _transformFile = require("../../transform-file.js");
    40 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
    41 function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
     40function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
     41function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
    4242const debug = _debug()("babel:config:loading:files:module-types");
    4343{
     
    6161  }
    6262  {
    63     var _module;
    64     return (_module = module) != null && _module.__esModule ? module.default || (arguments[1] ? module : undefined) : module;
     63    return module != null && (module.__esModule || module[Symbol.toStringTag] === "Module") ? module.default || (arguments[1] ? module : undefined) : module;
    6564  }
    6665}
    67 const loadMjsDefault = (0, _rewriteStackTrace.endHiddenCallStack)(function () {
    68   var _loadMjsDefault = _asyncToGenerator(function* (filepath) {
    69     const url = (0, _url().pathToFileURL)(filepath).toString();
     66const loadMjsFromPath = (0, _rewriteStackTrace.endHiddenCallStack)(function () {
     67  var _loadMjsFromPath = _asyncToGenerator(function* (filepath) {
     68    const url = (0, _url().pathToFileURL)(filepath).toString() + "?import";
    7069    {
    7170      if (!import_) {
    7271        throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n", filepath);
    7372      }
    74       return (yield import_(url)).default;
     73      return yield import_(url);
    7574    }
    7675  });
    77   function loadMjsDefault(_x) {
    78     return _loadMjsDefault.apply(this, arguments);
     76  function loadMjsFromPath(_x) {
     77    return _loadMjsFromPath.apply(this, arguments);
    7978  }
    80   return loadMjsDefault;
     79  return loadMjsFromPath;
    8180}());
    82 function* loadCodeDefault(filepath, asyncError) {
    83   switch (_path().extname(filepath)) {
    84     case ".cjs":
     81const SUPPORTED_EXTENSIONS = new Set([".js", ".mjs", ".cjs", ".cts"]);
     82const asyncModules = new Set();
     83function* loadCodeDefault(filepath, loader, esmError, tlaError) {
     84  var _async2;
     85  let async;
     86  let ext = _path().extname(filepath);
     87  if (!SUPPORTED_EXTENSIONS.has(ext)) ext = ".js";
     88  const pattern = `${loader} ${ext}`;
     89  switch (pattern) {
     90    case "require .cjs":
     91    case "auto .cjs":
    8592      {
    8693        return loadCjsDefault(filepath, arguments[2]);
    8794      }
    88     case ".mjs":
    89       break;
    90     case ".cts":
     95    case "require .cts":
     96    case "auto .cts":
    9197      return loadCtsDefault(filepath);
    92     default:
     98    case "auto .js":
     99    case "require .js":
     100    case "require .mjs":
    93101      try {
    94102        {
     
    96104        }
    97105      } catch (e) {
    98         if (e.code !== "ERR_REQUIRE_ESM") throw e;
     106        if (e.code === "ERR_REQUIRE_ASYNC_MODULE" || e.code === "ERR_REQUIRE_CYCLE_MODULE" && asyncModules.has(filepath)) {
     107          var _async;
     108          asyncModules.add(filepath);
     109          if (!((_async = async) != null ? _async : async = yield* (0, _async3.isAsync)())) {
     110            throw new _configError.default(tlaError, filepath);
     111          }
     112        } else if (e.code === "ERR_REQUIRE_ESM" || ext === ".mjs") {} else {
     113          throw e;
     114        }
    99115      }
     116    case "auto .mjs":
     117      if ((_async2 = async) != null ? _async2 : async = yield* (0, _async3.isAsync)()) {
     118        return (yield* (0, _async3.waitFor)(loadMjsFromPath(filepath))).default;
     119      }
     120      throw new _configError.default(esmError, filepath);
     121    default:
     122      throw new Error("Internal Babel error: unreachable code.");
    100123  }
    101   if (yield* (0, _async.isAsync)()) {
    102     return yield* (0, _async.waitFor)(loadMjsDefault(filepath));
    103   }
    104   throw new _configError.default(asyncError, filepath);
    105124}
    106125function loadCtsDefault(filepath) {
  • imaps-frontend/node_modules/@babel/core/lib/config/files/module-types.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_async","require","_path","data","_url","_semver","_debug","_rewriteStackTrace","_configError","_transformFile","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","debug","buildDebug","import_","_unused","supportsESM","exports","semver","satisfies","process","versions","node","LOADING_CJS_FILES","Set","loadCjsDefault","filepath","has","module","add","endHiddenCallStack","delete","_module","__esModule","default","loadMjsDefault","_loadMjsDefault","url","pathToFileURL","toString","ConfigError","_x","loadCodeDefault","asyncError","path","extname","loadCtsDefault","e","code","isAsync","waitFor","ext","hasTsSupport","extensions","handler","opts","babelrc","configFile","sourceType","sourceMaps","sourceFileName","basename","presets","getTSPreset","Object","assign","onlyRemoveTypeImports","optimizeConstEnums","allowDeclareFields","m","filename","endsWith","_compile","transformFileSync","packageJson","lt","version","console","message","pnp"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async.ts\";\nimport type { Handler } from \"gensync\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { createRequire } from \"module\";\nimport semver from \"semver\";\nimport buildDebug from \"debug\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport type { InputOptions } from \"../index.ts\";\nimport { transformFileSync } from \"../../transform-file.ts\";\n\nconst debug = buildDebug(\"babel:config:loading:files:module-types\");\n\nconst require = createRequire(import.meta.url);\n\nif (!process.env.BABEL_8_BREAKING) {\n  try {\n    // Old Node.js versions don't support import() syntax.\n    // eslint-disable-next-line no-var\n    var import_:\n      | ((specifier: string | URL) => any)\n      | undefined = require(\"./import.cjs\");\n  } catch {}\n}\n\nexport const supportsESM = semver.satisfies(\n  process.versions.node,\n  // older versions, starting from 10, support the dynamic\n  // import syntax but always return a rejected promise.\n  \"^12.17 || >=13.2\",\n);\n\nconst LOADING_CJS_FILES = new Set();\n\nfunction loadCjsDefault(filepath: string) {\n  // The `require()` call below can make this code reentrant if a require hook\n  // like @babel/register has been loaded into the system. That would cause\n  // Babel to attempt to compile the `.babelrc.js` file as it loads below. To\n  // cover this case, we auto-ignore re-entrant config processing. ESM loaders\n  // do not have this problem, because loaders do not apply to themselves.\n  if (LOADING_CJS_FILES.has(filepath)) {\n    debug(\"Auto-ignoring usage of config %o.\", filepath);\n    return {};\n  }\n\n  let module;\n  try {\n    LOADING_CJS_FILES.add(filepath);\n    module = endHiddenCallStack(require)(filepath);\n  } finally {\n    LOADING_CJS_FILES.delete(filepath);\n  }\n\n  if (process.env.BABEL_8_BREAKING) {\n    return module?.__esModule ? module.default : module;\n  } else {\n    return module?.__esModule\n      ? module.default ||\n          /* fallbackToTranspiledModule */ (arguments[1] ? module : undefined)\n      : module;\n  }\n}\n\nconst loadMjsDefault = endHiddenCallStack(async function loadMjsDefault(\n  filepath: string,\n) {\n  const url = pathToFileURL(filepath).toString();\n\n  if (process.env.BABEL_8_BREAKING) {\n    return (await import(url)).default;\n  } else {\n    if (!import_) {\n      throw new ConfigError(\n        \"Internal error: Native ECMAScript modules aren't supported by this platform.\\n\",\n        filepath,\n      );\n    }\n\n    return (await import_(url)).default;\n  }\n});\n\nexport default function* loadCodeDefault(\n  filepath: string,\n  asyncError: string,\n): Handler<unknown> {\n  switch (path.extname(filepath)) {\n    case \".cjs\":\n      if (process.env.BABEL_8_BREAKING) {\n        return loadCjsDefault(filepath);\n      } else {\n        return loadCjsDefault(\n          filepath,\n          // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n          /* fallbackToTranspiledModule */ arguments[2],\n        );\n      }\n    case \".mjs\":\n      break;\n    case \".cts\":\n      return loadCtsDefault(filepath);\n    default:\n      try {\n        if (process.env.BABEL_8_BREAKING) {\n          return loadCjsDefault(filepath);\n        } else {\n          return loadCjsDefault(\n            filepath,\n            // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n            /* fallbackToTranspiledModule */ arguments[2],\n          );\n        }\n      } catch (e) {\n        if (e.code !== \"ERR_REQUIRE_ESM\") throw e;\n      }\n  }\n  if (yield* isAsync()) {\n    return yield* waitFor(loadMjsDefault(filepath));\n  }\n  throw new ConfigError(asyncError, filepath);\n}\n\nfunction loadCtsDefault(filepath: string) {\n  const ext = \".cts\";\n  const hasTsSupport = !!(\n    require.extensions[\".ts\"] ||\n    require.extensions[\".cts\"] ||\n    require.extensions[\".mts\"]\n  );\n\n  let handler: NodeJS.RequireExtensions[\"\"];\n\n  if (!hasTsSupport) {\n    const opts: InputOptions = {\n      babelrc: false,\n      configFile: false,\n      sourceType: \"unambiguous\",\n      sourceMaps: \"inline\",\n      sourceFileName: path.basename(filepath),\n      presets: [\n        [\n          getTSPreset(filepath),\n          {\n            onlyRemoveTypeImports: true,\n            optimizeConstEnums: true,\n            ...(process.env.BABEL_8_BREAKING\n              ? {}\n              : { allowDeclareFields: true }),\n          },\n        ],\n      ],\n    };\n\n    handler = function (m, filename) {\n      // If we want to support `.ts`, `.d.ts` must be handled specially.\n      if (handler && filename.endsWith(ext)) {\n        try {\n          // @ts-expect-error Undocumented API\n          return m._compile(\n            transformFileSync(filename, {\n              ...opts,\n              filename,\n            }).code,\n            filename,\n          );\n        } catch (error) {\n          if (!hasTsSupport) {\n            // TODO(Babel 8): Add this as an optional peer dependency\n            // eslint-disable-next-line import/no-extraneous-dependencies\n            const packageJson = require(\"@babel/preset-typescript/package.json\");\n            if (semver.lt(packageJson.version, \"7.21.4\")) {\n              console.error(\n                \"`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.\",\n              );\n            }\n          }\n          throw error;\n        }\n      }\n      return require.extensions[\".js\"](m, filename);\n    };\n    require.extensions[ext] = handler;\n  }\n  try {\n    return loadCjsDefault(filepath);\n  } finally {\n    if (!hasTsSupport) {\n      if (require.extensions[ext] === handler) delete require.extensions[ext];\n      handler = undefined;\n    }\n  }\n}\n\nfunction getTSPreset(filepath: string) {\n  try {\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    return require(\"@babel/preset-typescript\");\n  } catch (error) {\n    if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n    let message =\n      \"You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!\";\n\n    if (!process.env.BABEL_8_BREAKING) {\n      if (process.versions.pnp) {\n        // Using Yarn PnP, which doesn't allow requiring packages that are not\n        // explicitly specified as dependencies.\n        message += `\nIf you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:\n\npackageExtensions:\n\\t\"@babel/core@*\":\n\\t\\tpeerDependencies:\n\\t\\t\\t\"@babel/preset-typescript\": \"*\"\n`;\n      }\n    }\n\n    throw new ConfigError(message, filepath);\n  }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,SAAAC,MAAA;EAAA,MAAAC,IAAA,GAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAC,KAAA;EAAA,MAAAD,IAAA,GAAAF,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAD,IAAA;EAAA;EAAA,OAAAA,IAAA;A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AACwE,UAAU,CAACF,GAAG,CAAC,KAAKG,OAAO,EAAE,OAAOzE,OAAO,CAACwE,UAAU,CAACF,GAAG,CAAC;MACvEG,OAAO,GAAG3C,SAAS;IACrB;EACF;AACF;AAEA,SAASoD,WAAWA,CAACrC,QAAgB,EAAE;EACrC,IAAI;IAEF,OAAO7C,OAAO,CAAC,0BAA0B,CAAC;EAC5C,CAAC,CAAC,OAAOmB,KAAK,EAAE;IACd,IAAIA,KAAK,CAACgD,IAAI,KAAK,kBAAkB,EAAE,MAAMhD,KAAK;IAElD,IAAI8E,OAAO,GACT,yIAAyI;IAExG;MACjC,IAAI1D,OAAO,CAACC,QAAQ,CAAC0D,GAAG,EAAE;QAGxBD,OAAO,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;MACK;IACF;IAEA,MAAM,IAAItC,oBAAW,CAACsC,OAAO,EAAEpD,QAAQ,CAAC;EAC1C;AACF;AAAC","ignoreList":[]}
     1{"version":3,"names":["_async3","require","_path","data","_url","_semver","_debug","_rewriteStackTrace","_configError","_transformFile","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","debug","buildDebug","import_","_unused","supportsESM","exports","semver","satisfies","process","versions","node","LOADING_CJS_FILES","Set","loadCjsDefault","filepath","has","module","add","endHiddenCallStack","delete","__esModule","Symbol","toStringTag","default","undefined","loadMjsFromPath","_loadMjsFromPath","url","pathToFileURL","toString","ConfigError","_x","SUPPORTED_EXTENSIONS","asyncModules","loadCodeDefault","loader","esmError","tlaError","_async2","async","ext","path","extname","pattern","loadCtsDefault","code","_async","isAsync","waitFor","Error","hasTsSupport","extensions","handler","opts","babelrc","configFile","sourceType","sourceMaps","sourceFileName","basename","presets","getTSPreset","Object","assign","onlyRemoveTypeImports","optimizeConstEnums","allowDeclareFields","m","filename","endsWith","_compile","transformFileSync","error","packageJson","lt","version","console","message","pnp"],"sources":["../../../src/config/files/module-types.ts"],"sourcesContent":["import { isAsync, waitFor } from \"../../gensync-utils/async.ts\";\nimport type { Handler } from \"gensync\";\nimport path from \"path\";\nimport { pathToFileURL } from \"url\";\nimport { createRequire } from \"module\";\nimport semver from \"semver\";\nimport buildDebug from \"debug\";\n\nimport { endHiddenCallStack } from \"../../errors/rewrite-stack-trace.ts\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nimport type { InputOptions } from \"../index.ts\";\nimport { transformFileSync } from \"../../transform-file.ts\";\n\nconst debug = buildDebug(\"babel:config:loading:files:module-types\");\n\nconst require = createRequire(import.meta.url);\n\nif (!process.env.BABEL_8_BREAKING) {\n  try {\n    // Old Node.js versions don't support import() syntax.\n    // eslint-disable-next-line no-var\n    var import_:\n      | ((specifier: string | URL) => any)\n      | undefined = require(\"./import.cjs\");\n  } catch {}\n}\n\nexport const supportsESM = semver.satisfies(\n  process.versions.node,\n  // older versions, starting from 10, support the dynamic\n  // import syntax but always return a rejected promise.\n  \"^12.17 || >=13.2\",\n);\n\nconst LOADING_CJS_FILES = new Set();\n\nfunction loadCjsDefault(filepath: string) {\n  // The `require()` call below can make this code reentrant if a require hook\n  // like @babel/register has been loaded into the system. That would cause\n  // Babel to attempt to compile the `.babelrc.js` file as it loads below. To\n  // cover this case, we auto-ignore re-entrant config processing. ESM loaders\n  // do not have this problem, because loaders do not apply to themselves.\n  if (LOADING_CJS_FILES.has(filepath)) {\n    debug(\"Auto-ignoring usage of config %o.\", filepath);\n    return {};\n  }\n\n  let module;\n  try {\n    LOADING_CJS_FILES.add(filepath);\n    module = endHiddenCallStack(require)(filepath);\n  } finally {\n    LOADING_CJS_FILES.delete(filepath);\n  }\n\n  if (process.env.BABEL_8_BREAKING) {\n    return module != null &&\n      (module.__esModule || module[Symbol.toStringTag] === \"Module\")\n      ? module.default\n      : module;\n  } else {\n    return module != null &&\n      (module.__esModule || module[Symbol.toStringTag] === \"Module\")\n      ? module.default ||\n          /* fallbackToTranspiledModule */ (arguments[1] ? module : undefined)\n      : module;\n  }\n}\n\nconst loadMjsFromPath = endHiddenCallStack(async function loadMjsFromPath(\n  filepath: string,\n) {\n  // Add ?import as a workaround for https://github.com/nodejs/node/issues/55500\n  const url = pathToFileURL(filepath).toString() + \"?import\";\n\n  if (process.env.BABEL_8_BREAKING) {\n    return await import(url);\n  } else {\n    if (!import_) {\n      throw new ConfigError(\n        \"Internal error: Native ECMAScript modules aren't supported by this platform.\\n\",\n        filepath,\n      );\n    }\n\n    return await import_(url);\n  }\n});\n\nconst SUPPORTED_EXTENSIONS = new Set([\".js\", \".mjs\", \".cjs\", \".cts\"] as const);\ntype SetValue<T extends Set<unknown>> = T extends Set<infer U> ? U : never;\n\nconst asyncModules = new Set();\n\nexport default function* loadCodeDefault(\n  filepath: string,\n  loader: \"require\" | \"auto\",\n  esmError: string,\n  tlaError: string,\n): Handler<unknown> {\n  let async;\n\n  let ext = path.extname(filepath);\n  if (!SUPPORTED_EXTENSIONS.has(ext as any)) ext = \".js\";\n\n  const pattern =\n    `${loader} ${ext}` as `${typeof loader} ${SetValue<typeof SUPPORTED_EXTENSIONS>}`;\n  switch (pattern) {\n    case \"require .cjs\":\n    case \"auto .cjs\":\n      if (process.env.BABEL_8_BREAKING) {\n        return loadCjsDefault(filepath);\n      } else {\n        return loadCjsDefault(\n          filepath,\n          // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n          /* fallbackToTranspiledModule */ arguments[2],\n        );\n      }\n    case \"require .cts\":\n    case \"auto .cts\":\n      return loadCtsDefault(filepath);\n    case \"auto .js\":\n    case \"require .js\":\n    case \"require .mjs\": // Some versions of Node.js support require(esm):\n      try {\n        if (process.env.BABEL_8_BREAKING) {\n          return loadCjsDefault(filepath);\n        } else {\n          return loadCjsDefault(\n            filepath,\n            // @ts-ignore(Babel 7 vs Babel 8) Removed in Babel 8\n            /* fallbackToTranspiledModule */ arguments[2],\n          );\n        }\n      } catch (e) {\n        if (\n          e.code === \"ERR_REQUIRE_ASYNC_MODULE\" ||\n          // Node.js 13.0.0 throws ERR_REQUIRE_CYCLE_MODULE instead of\n          // ERR_REQUIRE_ASYNC_MODULE when requiring a module a second time\n          // https://github.com/nodejs/node/issues/55516\n          // This `asyncModules` won't catch all of such cases, but it will\n          // at least catch those caused by Babel trying to load a module twice.\n          (e.code === \"ERR_REQUIRE_CYCLE_MODULE\" && asyncModules.has(filepath))\n        ) {\n          asyncModules.add(filepath);\n          if (!(async ??= yield* isAsync())) {\n            throw new ConfigError(tlaError, filepath);\n          }\n          // fall through: require() failed due to TLA\n        } else if (\n          e.code === \"ERR_REQUIRE_ESM\" ||\n          (!process.env.BABEL_8_BREAKING && ext === \".mjs\")\n        ) {\n          // fall through: require() failed due to ESM\n        } else {\n          throw e;\n        }\n      }\n    // fall through: require() failed due to ESM or TLA, try import()\n    case \"auto .mjs\":\n      if ((async ??= yield* isAsync())) {\n        return (yield* waitFor(loadMjsFromPath(filepath))).default;\n      }\n      throw new ConfigError(esmError, filepath);\n    default:\n      throw new Error(\"Internal Babel error: unreachable code.\");\n  }\n}\n\nfunction loadCtsDefault(filepath: string) {\n  const ext = \".cts\";\n  const hasTsSupport = !!(\n    require.extensions[\".ts\"] ||\n    require.extensions[\".cts\"] ||\n    require.extensions[\".mts\"]\n  );\n\n  let handler: NodeJS.RequireExtensions[\"\"];\n\n  if (!hasTsSupport) {\n    const opts: InputOptions = {\n      babelrc: false,\n      configFile: false,\n      sourceType: \"unambiguous\",\n      sourceMaps: \"inline\",\n      sourceFileName: path.basename(filepath),\n      presets: [\n        [\n          getTSPreset(filepath),\n          {\n            onlyRemoveTypeImports: true,\n            optimizeConstEnums: true,\n            ...(process.env.BABEL_8_BREAKING\n              ? {}\n              : { allowDeclareFields: true }),\n          },\n        ],\n      ],\n    };\n\n    handler = function (m, filename) {\n      // If we want to support `.ts`, `.d.ts` must be handled specially.\n      if (handler && filename.endsWith(ext)) {\n        try {\n          // @ts-expect-error Undocumented API\n          return m._compile(\n            transformFileSync(filename, {\n              ...opts,\n              filename,\n            }).code,\n            filename,\n          );\n        } catch (error) {\n          if (!hasTsSupport) {\n            // TODO(Babel 8): Add this as an optional peer dependency\n            // eslint-disable-next-line import/no-extraneous-dependencies\n            const packageJson = require(\"@babel/preset-typescript/package.json\");\n            if (semver.lt(packageJson.version, \"7.21.4\")) {\n              console.error(\n                \"`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`.\",\n              );\n            }\n          }\n          throw error;\n        }\n      }\n      return require.extensions[\".js\"](m, filename);\n    };\n    require.extensions[ext] = handler;\n  }\n  try {\n    return loadCjsDefault(filepath);\n  } finally {\n    if (!hasTsSupport) {\n      if (require.extensions[ext] === handler) delete require.extensions[ext];\n      handler = undefined;\n    }\n  }\n}\n\nfunction getTSPreset(filepath: string) {\n  try {\n    // eslint-disable-next-line import/no-extraneous-dependencies\n    return require(\"@babel/preset-typescript\");\n  } catch (error) {\n    if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n    let message =\n      \"You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!\";\n\n    if (!process.env.BABEL_8_BREAKING) {\n      if (process.versions.pnp) {\n        // Using Yarn PnP, which doesn't allow requiring packages that are not\n        // explicitly specified as dependencies.\n        message += `\nIf you are using Yarn Plug'n'Play, you may also need to add the following configuration to your .yarnrc.yml file:\n\npackageExtensions:\n\\t\"@babel/core@*\":\n\\t\\tpeerDependencies:\n\\t\\t\\t\"@babel/preset-typescript\": \"*\"\n`;\n      }\n    }\n\n    throw new ConfigError(message, filepath);\n  }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,SAAAC,MAAA;EAAA,MAAAC,IAAA,GAAAF,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAC,KAAA;EAAA,MAAAD,IAAA,GAAAF,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAD,IAAA;EAAA;EAAA,OAAAA,IAAA;A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F;AACF;AAEA,SAASqC,WAAWA,CAAC/C,QAAgB,EAAE;EACrC,IAAI;IAEF,OAAO3C,OAAO,CAAC,0BAA0B,CAAC;EAC5C,CAAC,CAAC,OAAOqG,KAAK,EAAE;IACd,IAAIA,KAAK,CAAC3B,IAAI,KAAK,kBAAkB,EAAE,MAAM2B,KAAK;IAElD,IAAIK,OAAO,GACT,yIAAyI;IAExG;MACjC,IAAIrE,OAAO,CAACC,QAAQ,CAACqE,GAAG,EAAE;QAGxBD,OAAO,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;MACK;IACF;IAEA,MAAM,IAAI/C,oBAAW,CAAC+C,OAAO,EAAE/D,QAAQ,CAAC;EAC1C;AACF;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/files/plugins.js

    rd565449 r0c6b92a  
    5050const resolvePreset = exports.resolvePreset = resolveStandardizedName.bind(null, "preset");
    5151function* loadPlugin(name, dirname) {
    52   const filepath = resolvePlugin(name, dirname, yield* (0, _async.isAsync)());
    53   const value = yield* requireModule("plugin", filepath);
     52  const {
     53    filepath,
     54    loader
     55  } = resolvePlugin(name, dirname, yield* (0, _async.isAsync)());
     56  const value = yield* requireModule("plugin", loader, filepath);
    5457  debug("Loaded plugin %o from %o.", name, dirname);
    5558  return {
     
    5962}
    6063function* loadPreset(name, dirname) {
    61   const filepath = resolvePreset(name, dirname, yield* (0, _async.isAsync)());
    62   const value = yield* requireModule("preset", filepath);
     64  const {
     65    filepath,
     66    loader
     67  } = resolvePreset(name, dirname, yield* (0, _async.isAsync)());
     68  const value = yield* requireModule("preset", loader, filepath);
    6369  debug("Loaded preset %o from %o.", name, dirname);
    6470  return {
     
    155161    res = it.next(tryRequireResolve(res.value, dirname));
    156162  }
    157   return res.value;
     163  return {
     164    loader: "require",
     165    filepath: res.value
     166  };
    158167}
    159168function resolveStandardizedNameForImport(type, name, dirname) {
     
    164173    res = it.next(tryImportMetaResolve(res.value, parentUrl));
    165174  }
    166   return (0, _url().fileURLToPath)(res.value);
    167 }
    168 function resolveStandardizedName(type, name, dirname, resolveESM) {
    169   if (!_moduleTypes.supportsESM || !resolveESM) {
     175  return {
     176    loader: "auto",
     177    filepath: (0, _url().fileURLToPath)(res.value)
     178  };
     179}
     180function resolveStandardizedName(type, name, dirname, allowAsync) {
     181  if (!_moduleTypes.supportsESM || !allowAsync) {
    170182    return resolveStandardizedNameForRequire(type, name, dirname);
    171183  }
    172184  try {
    173185    const resolved = resolveStandardizedNameForImport(type, name, dirname);
    174     if (!(0, _fs().existsSync)(resolved)) {
     186    if (!(0, _fs().existsSync)(resolved.filepath)) {
    175187      throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`), {
    176188        type: "MODULE_NOT_FOUND"
     
    191203  var LOADING_MODULES = new Set();
    192204}
    193 function* requireModule(type, name) {
     205function* requireModule(type, loader, name) {
    194206  {
    195207    if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name)) {
     
    202214    }
    203215    {
    204       return yield* (0, _moduleTypes.default)(name, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously.", true);
     216      return yield* (0, _moduleTypes.default)(name, loader, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously " + "or when using the Node.js `--experimental-require-module` flag.", `You appear to be using a ${type} that contains top-level await, ` + "which is only supported when running Babel asynchronously.", true);
    205217    }
    206218  } catch (err) {
  • imaps-frontend/node_modules/@babel/core/lib/config/files/plugins.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_debug","data","require","_path","_async","_moduleTypes","_url","_importMetaResolve","_fs","debug","buildDebug","EXACT_RE","BABEL_PLUGIN_PREFIX_RE","BABEL_PRESET_PREFIX_RE","BABEL_PLUGIN_ORG_RE","BABEL_PRESET_ORG_RE","OTHER_PLUGIN_ORG_RE","OTHER_PRESET_ORG_RE","OTHER_ORG_DEFAULT_RE","resolvePlugin","exports","resolveStandardizedName","bind","resolvePreset","loadPlugin","name","dirname","filepath","isAsync","value","requireModule","loadPreset","standardizeName","type","path","isAbsolute","isPreset","replace","resolveAlternativesHelper","standardizedName","error","code","message","oppositeType","transformName","tryRequireResolve","id","v","w","split","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","tryImportMetaResolve","options","importMetaResolve","resolveStandardizedNameForRequire","it","res","next","done","resolveStandardizedNameForImport","parentUrl","pathToFileURL","join","href","fileURLToPath","resolveESM","supportsESM","resolved","existsSync","Object","assign","e","e2","LOADING_MODULES","Set","has","add","loadCodeDefault","err","delete"],"sources":["../../../src/config/files/plugins.ts"],"sourcesContent":["/**\n * This file handles all logic for converting string-based configuration references into loaded objects.\n */\n\nimport buildDebug from \"debug\";\nimport path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { isAsync } from \"../../gensync-utils/async.ts\";\nimport loadCodeDefault, { supportsESM } from \"./module-types.ts\";\nimport { fileURLToPath, pathToFileURL } from \"url\";\n\nimport { resolve as importMetaResolve } from \"../../vendor/import-meta-resolve.js\";\n\nimport { createRequire } from \"module\";\nimport { existsSync } from \"fs\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:plugins\");\n\nconst EXACT_RE = /^module:/;\nconst BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-plugin-)/;\nconst BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-preset-)/;\nconst BABEL_PLUGIN_ORG_RE = /^(@babel\\/)(?!plugin-|[^/]+\\/)/;\nconst BABEL_PRESET_ORG_RE = /^(@babel\\/)(?!preset-|[^/]+\\/)/;\nconst OTHER_PLUGIN_ORG_RE =\n  /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-plugin(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_PRESET_ORG_RE =\n  /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-preset(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;\n\nexport const resolvePlugin = resolveStandardizedName.bind(null, \"plugin\");\nexport const resolvePreset = resolveStandardizedName.bind(null, \"preset\");\n\nexport function* loadPlugin(\n  name: string,\n  dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n  const filepath = resolvePlugin(name, dirname, yield* isAsync());\n\n  const value = yield* requireModule(\"plugin\", filepath);\n  debug(\"Loaded plugin %o from %o.\", name, dirname);\n\n  return { filepath, value };\n}\n\nexport function* loadPreset(\n  name: string,\n  dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n  const filepath = resolvePreset(name, dirname, yield* isAsync());\n\n  const value = yield* requireModule(\"preset\", filepath);\n\n  debug(\"Loaded preset %o from %o.\", name, dirname);\n\n  return { filepath, value };\n}\n\nfunction standardizeName(type: \"plugin\" | \"preset\", name: string) {\n  // Let absolute and relative paths through.\n  if (path.isAbsolute(name)) return name;\n\n  const isPreset = type === \"preset\";\n\n  return (\n    name\n      // foo -> babel-preset-foo\n      .replace(\n        isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE,\n        `babel-${type}-`,\n      )\n      // @babel/es2015 -> @babel/preset-es2015\n      .replace(\n        isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE,\n        `$1${type}-`,\n      )\n      // @foo/mypreset -> @foo/babel-preset-mypreset\n      .replace(\n        isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE,\n        `$1babel-${type}-`,\n      )\n      // @foo -> @foo/babel-preset\n      .replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)\n      // module:mypreset -> mypreset\n      .replace(EXACT_RE, \"\")\n  );\n}\n\ntype Result<T> = { error: Error; value: null } | { error: null; value: T };\n\nfunction* resolveAlternativesHelper(\n  type: \"plugin\" | \"preset\",\n  name: string,\n): Iterator<string, string, Result<string>> {\n  const standardizedName = standardizeName(type, name);\n  const { error, value } = yield standardizedName;\n  if (!error) return value;\n\n  // @ts-expect-error code may not index error\n  if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n  if (standardizedName !== name && !(yield name).error) {\n    error.message += `\\n- If you want to resolve \"${name}\", use \"module:${name}\"`;\n  }\n\n  if (!(yield standardizeName(type, \"@babel/\" + name)).error) {\n    error.message += `\\n- Did you mean \"@babel/${name}\"?`;\n  }\n\n  const oppositeType = type === \"preset\" ? \"plugin\" : \"preset\";\n  if (!(yield standardizeName(oppositeType, name)).error) {\n    error.message += `\\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;\n  }\n\n  if (type === \"plugin\") {\n    const transformName = standardizedName.replace(\"-proposal-\", \"-transform-\");\n    if (transformName !== standardizedName && !(yield transformName).error) {\n      error.message += `\\n- Did you mean \"${transformName}\"?`;\n    }\n  }\n\n  error.message += `\\n\nMake sure that all the Babel plugins and presets you are using\nare defined as dependencies or devDependencies in your package.json\nfile. It's possible that the missing plugin is loaded by a preset\nyou are using that forgot to add the plugin to its dependencies: you\ncan workaround this problem by explicitly adding the missing package\nto your top-level package.json.\n`;\n\n  throw error;\n}\n\nfunction tryRequireResolve(\n  id: string,\n  dirname: string | undefined,\n): Result<string> {\n  try {\n    if (dirname) {\n      return { error: null, value: require.resolve(id, { paths: [dirname] }) };\n    } else {\n      return { error: null, value: require.resolve(id) };\n    }\n  } catch (error) {\n    return { error, value: null };\n  }\n}\n\nfunction tryImportMetaResolve(\n  id: Parameters<typeof importMetaResolve>[0],\n  options: Parameters<typeof importMetaResolve>[1],\n): Result<string> {\n  try {\n    return { error: null, value: importMetaResolve(id, options) };\n  } catch (error) {\n    return { error, value: null };\n  }\n}\n\nfunction resolveStandardizedNameForRequire(\n  type: \"plugin\" | \"preset\",\n  name: string,\n  dirname: string,\n) {\n  const it = resolveAlternativesHelper(type, name);\n  let res = it.next();\n  while (!res.done) {\n    res = it.next(tryRequireResolve(res.value, dirname));\n  }\n  return res.value;\n}\nfunction resolveStandardizedNameForImport(\n  type: \"plugin\" | \"preset\",\n  name: string,\n  dirname: string,\n) {\n  const parentUrl = pathToFileURL(\n    path.join(dirname, \"./babel-virtual-resolve-base.js\"),\n  ).href;\n\n  const it = resolveAlternativesHelper(type, name);\n  let res = it.next();\n  while (!res.done) {\n    res = it.next(tryImportMetaResolve(res.value, parentUrl));\n  }\n  return fileURLToPath(res.value);\n}\n\nfunction resolveStandardizedName(\n  type: \"plugin\" | \"preset\",\n  name: string,\n  dirname: string,\n  resolveESM: boolean,\n) {\n  if (!supportsESM || !resolveESM) {\n    return resolveStandardizedNameForRequire(type, name, dirname);\n  }\n\n  try {\n    const resolved = resolveStandardizedNameForImport(type, name, dirname);\n    // import-meta-resolve 4.0 does not throw if the module is not found.\n    if (!existsSync(resolved)) {\n      throw Object.assign(\n        new Error(`Could not resolve \"${name}\" in file ${dirname}.`),\n        { type: \"MODULE_NOT_FOUND\" },\n      );\n    }\n    return resolved;\n  } catch (e) {\n    try {\n      return resolveStandardizedNameForRequire(type, name, dirname);\n    } catch (e2) {\n      if (e.type === \"MODULE_NOT_FOUND\") throw e;\n      if (e2.type === \"MODULE_NOT_FOUND\") throw e2;\n      throw e;\n    }\n  }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n  // eslint-disable-next-line no-var\n  var LOADING_MODULES = new Set();\n}\nfunction* requireModule(type: string, name: string): Handler<unknown> {\n  if (!process.env.BABEL_8_BREAKING) {\n    if (!(yield* isAsync()) && LOADING_MODULES.has(name)) {\n      throw new Error(\n        `Reentrant ${type} detected trying to load \"${name}\". This module is not ignored ` +\n          \"and is trying to load itself while compiling itself, leading to a dependency cycle. \" +\n          'We recommend adding it to your \"ignore\" list in your babelrc, or to a .babelignore.',\n      );\n    }\n  }\n\n  try {\n    if (!process.env.BABEL_8_BREAKING) {\n      LOADING_MODULES.add(name);\n    }\n\n    if (process.env.BABEL_8_BREAKING) {\n      return yield* loadCodeDefault(\n        name,\n        `You appear to be using a native ECMAScript module ${type}, ` +\n          \"which is only supported when running Babel asynchronously.\",\n      );\n    } else {\n      return yield* loadCodeDefault(\n        name,\n        `You appear to be using a native ECMAScript module ${type}, ` +\n          \"which is only supported when running Babel asynchronously.\",\n        // For backward compatibility, we need to support malformed presets\n        // defined as separate named exports rather than a single default\n        // export.\n        // See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js\n        // @ts-ignore(Babel 7 vs Babel 8) This param has been removed\n        true,\n      );\n    }\n  } catch (err) {\n    err.message = `[BABEL]: ${err.message} (While processing: ${name})`;\n    throw err;\n  } finally {\n    if (!process.env.BABEL_8_BREAKING) {\n      LOADING_MODULES.delete(name);\n    }\n  }\n}\n"],"mappings":";;;;;;;;AAIA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,SAAAI,KAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAM,kBAAA,GAAAL,OAAA;AAGA,SAAAM,IAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,GAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,MAAMQ,KAAK,GAAGC,OAASA,CAAC,CAAC,oCAAoC,CAAC;AAE9D,MAAMC,QAAQ,GAAG,UAAU;AAC3B,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,mBAAmB,GAAG,gCAAgC;AAC5D,MAAMC,mBAAmB,G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;MACpD,MAAM,IAAIqC,KAAK,CACb,aAAa7B,IAAI,6BAA6BR,IAAI,gCAAgC,GAChF,sFAAsF,GACtF,qFACJ,CAAC;IACH;EACF;EAEA,IAAI;IACiC;MACjC4D,eAAe,CAACG,GAAG,CAAC/D,IAAI,CAAC;IAC3B;IAQO;MACL,OAAO,OAAO,IAAAgE,oBAAe,EAC3BhE,IAAI,EACJ,qDAAqDQ,IAAI,IAAI,GAC3D,4DAA4D,EAM9D,IACF,CAAC;IACH;EACF,CAAC,CAAC,OAAOyD,GAAG,EAAE;IACZA,GAAG,CAAChD,OAAO,GAAG,YAAYgD,GAAG,CAAChD,OAAO,uBAAuBjB,IAAI,GAAG;IACnE,MAAMiE,GAAG;EACX,CAAC,SAAS;IAC2B;MACjCL,eAAe,CAACM,MAAM,CAAClE,IAAI,CAAC;IAC9B;EACF;AACF;AAAC","ignoreList":[]}
     1{"version":3,"names":["_debug","data","require","_path","_async","_moduleTypes","_url","_importMetaResolve","_fs","debug","buildDebug","EXACT_RE","BABEL_PLUGIN_PREFIX_RE","BABEL_PRESET_PREFIX_RE","BABEL_PLUGIN_ORG_RE","BABEL_PRESET_ORG_RE","OTHER_PLUGIN_ORG_RE","OTHER_PRESET_ORG_RE","OTHER_ORG_DEFAULT_RE","resolvePlugin","exports","resolveStandardizedName","bind","resolvePreset","loadPlugin","name","dirname","filepath","loader","isAsync","value","requireModule","loadPreset","standardizeName","type","path","isAbsolute","isPreset","replace","resolveAlternativesHelper","standardizedName","error","code","message","oppositeType","transformName","tryRequireResolve","id","v","w","split","process","versions","node","resolve","r","paths","b","M","f","_findPath","_nodeModulePaths","concat","Error","tryImportMetaResolve","options","importMetaResolve","resolveStandardizedNameForRequire","it","res","next","done","resolveStandardizedNameForImport","parentUrl","pathToFileURL","join","href","fileURLToPath","allowAsync","supportsESM","resolved","existsSync","Object","assign","e","e2","LOADING_MODULES","Set","has","add","loadCodeDefault","err","delete"],"sources":["../../../src/config/files/plugins.ts"],"sourcesContent":["/**\n * This file handles all logic for converting string-based configuration references into loaded objects.\n */\n\nimport buildDebug from \"debug\";\nimport path from \"path\";\nimport type { Handler } from \"gensync\";\nimport { isAsync } from \"../../gensync-utils/async.ts\";\nimport loadCodeDefault, { supportsESM } from \"./module-types.ts\";\nimport { fileURLToPath, pathToFileURL } from \"url\";\n\nimport { resolve as importMetaResolve } from \"../../vendor/import-meta-resolve.js\";\n\nimport { createRequire } from \"module\";\nimport { existsSync } from \"fs\";\nconst require = createRequire(import.meta.url);\n\nconst debug = buildDebug(\"babel:config:loading:files:plugins\");\n\nconst EXACT_RE = /^module:/;\nconst BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-plugin-)/;\nconst BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\\/|babel-preset-)/;\nconst BABEL_PLUGIN_ORG_RE = /^(@babel\\/)(?!plugin-|[^/]+\\/)/;\nconst BABEL_PRESET_ORG_RE = /^(@babel\\/)(?!preset-|[^/]+\\/)/;\nconst OTHER_PLUGIN_ORG_RE =\n  /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-plugin(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_PRESET_ORG_RE =\n  /^(@(?!babel\\/)[^/]+\\/)(?![^/]*babel-preset(?:-|\\/|$)|[^/]+\\/)/;\nconst OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;\n\nexport const resolvePlugin = resolveStandardizedName.bind(null, \"plugin\");\nexport const resolvePreset = resolveStandardizedName.bind(null, \"preset\");\n\nexport function* loadPlugin(\n  name: string,\n  dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n  const { filepath, loader } = resolvePlugin(name, dirname, yield* isAsync());\n\n  const value = yield* requireModule(\"plugin\", loader, filepath);\n  debug(\"Loaded plugin %o from %o.\", name, dirname);\n\n  return { filepath, value };\n}\n\nexport function* loadPreset(\n  name: string,\n  dirname: string,\n): Handler<{ filepath: string; value: unknown }> {\n  const { filepath, loader } = resolvePreset(name, dirname, yield* isAsync());\n\n  const value = yield* requireModule(\"preset\", loader, filepath);\n\n  debug(\"Loaded preset %o from %o.\", name, dirname);\n\n  return { filepath, value };\n}\n\nfunction standardizeName(type: \"plugin\" | \"preset\", name: string) {\n  // Let absolute and relative paths through.\n  if (path.isAbsolute(name)) return name;\n\n  const isPreset = type === \"preset\";\n\n  return (\n    name\n      // foo -> babel-preset-foo\n      .replace(\n        isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE,\n        `babel-${type}-`,\n      )\n      // @babel/es2015 -> @babel/preset-es2015\n      .replace(\n        isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE,\n        `$1${type}-`,\n      )\n      // @foo/mypreset -> @foo/babel-preset-mypreset\n      .replace(\n        isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE,\n        `$1babel-${type}-`,\n      )\n      // @foo -> @foo/babel-preset\n      .replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`)\n      // module:mypreset -> mypreset\n      .replace(EXACT_RE, \"\")\n  );\n}\n\ntype Result<T> = { error: Error; value: null } | { error: null; value: T };\n\nfunction* resolveAlternativesHelper(\n  type: \"plugin\" | \"preset\",\n  name: string,\n): Iterator<string, string, Result<string>> {\n  const standardizedName = standardizeName(type, name);\n  const { error, value } = yield standardizedName;\n  if (!error) return value;\n\n  // @ts-expect-error code may not index error\n  if (error.code !== \"MODULE_NOT_FOUND\") throw error;\n\n  if (standardizedName !== name && !(yield name).error) {\n    error.message += `\\n- If you want to resolve \"${name}\", use \"module:${name}\"`;\n  }\n\n  if (!(yield standardizeName(type, \"@babel/\" + name)).error) {\n    error.message += `\\n- Did you mean \"@babel/${name}\"?`;\n  }\n\n  const oppositeType = type === \"preset\" ? \"plugin\" : \"preset\";\n  if (!(yield standardizeName(oppositeType, name)).error) {\n    error.message += `\\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;\n  }\n\n  if (type === \"plugin\") {\n    const transformName = standardizedName.replace(\"-proposal-\", \"-transform-\");\n    if (transformName !== standardizedName && !(yield transformName).error) {\n      error.message += `\\n- Did you mean \"${transformName}\"?`;\n    }\n  }\n\n  error.message += `\\n\nMake sure that all the Babel plugins and presets you are using\nare defined as dependencies or devDependencies in your package.json\nfile. It's possible that the missing plugin is loaded by a preset\nyou are using that forgot to add the plugin to its dependencies: you\ncan workaround this problem by explicitly adding the missing package\nto your top-level package.json.\n`;\n\n  throw error;\n}\n\nfunction tryRequireResolve(\n  id: string,\n  dirname: string | undefined,\n): Result<string> {\n  try {\n    if (dirname) {\n      return { error: null, value: require.resolve(id, { paths: [dirname] }) };\n    } else {\n      return { error: null, value: require.resolve(id) };\n    }\n  } catch (error) {\n    return { error, value: null };\n  }\n}\n\nfunction tryImportMetaResolve(\n  id: Parameters<typeof importMetaResolve>[0],\n  options: Parameters<typeof importMetaResolve>[1],\n): Result<string> {\n  try {\n    return { error: null, value: importMetaResolve(id, options) };\n  } catch (error) {\n    return { error, value: null };\n  }\n}\n\nfunction resolveStandardizedNameForRequire(\n  type: \"plugin\" | \"preset\",\n  name: string,\n  dirname: string,\n) {\n  const it = resolveAlternativesHelper(type, name);\n  let res = it.next();\n  while (!res.done) {\n    res = it.next(tryRequireResolve(res.value, dirname));\n  }\n  return { loader: \"require\" as const, filepath: res.value };\n}\nfunction resolveStandardizedNameForImport(\n  type: \"plugin\" | \"preset\",\n  name: string,\n  dirname: string,\n) {\n  const parentUrl = pathToFileURL(\n    path.join(dirname, \"./babel-virtual-resolve-base.js\"),\n  ).href;\n\n  const it = resolveAlternativesHelper(type, name);\n  let res = it.next();\n  while (!res.done) {\n    res = it.next(tryImportMetaResolve(res.value, parentUrl));\n  }\n  return { loader: \"auto\" as const, filepath: fileURLToPath(res.value) };\n}\n\nfunction resolveStandardizedName(\n  type: \"plugin\" | \"preset\",\n  name: string,\n  dirname: string,\n  allowAsync: boolean,\n) {\n  if (!supportsESM || !allowAsync) {\n    return resolveStandardizedNameForRequire(type, name, dirname);\n  }\n\n  try {\n    const resolved = resolveStandardizedNameForImport(type, name, dirname);\n    // import-meta-resolve 4.0 does not throw if the module is not found.\n    if (!existsSync(resolved.filepath)) {\n      throw Object.assign(\n        new Error(`Could not resolve \"${name}\" in file ${dirname}.`),\n        { type: \"MODULE_NOT_FOUND\" },\n      );\n    }\n    return resolved;\n  } catch (e) {\n    try {\n      return resolveStandardizedNameForRequire(type, name, dirname);\n    } catch (e2) {\n      if (e.type === \"MODULE_NOT_FOUND\") throw e;\n      if (e2.type === \"MODULE_NOT_FOUND\") throw e2;\n      throw e;\n    }\n  }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n  // eslint-disable-next-line no-var\n  var LOADING_MODULES = new Set();\n}\nfunction* requireModule(\n  type: string,\n  loader: \"require\" | \"auto\",\n  name: string,\n): Handler<unknown> {\n  if (!process.env.BABEL_8_BREAKING) {\n    if (!(yield* isAsync()) && LOADING_MODULES.has(name)) {\n      throw new Error(\n        `Reentrant ${type} detected trying to load \"${name}\". This module is not ignored ` +\n          \"and is trying to load itself while compiling itself, leading to a dependency cycle. \" +\n          'We recommend adding it to your \"ignore\" list in your babelrc, or to a .babelignore.',\n      );\n    }\n  }\n\n  try {\n    if (!process.env.BABEL_8_BREAKING) {\n      LOADING_MODULES.add(name);\n    }\n\n    if (process.env.BABEL_8_BREAKING) {\n      return yield* loadCodeDefault(\n        name,\n        loader,\n        `You appear to be using a native ECMAScript module ${type}, ` +\n          \"which is only supported when running Babel asynchronously \" +\n          \"or when using the Node.js `--experimental-require-module` flag.\",\n        `You appear to be using a ${type} that contains top-level await, ` +\n          \"which is only supported when running Babel asynchronously.\",\n      );\n    } else {\n      return yield* loadCodeDefault(\n        name,\n        loader,\n        `You appear to be using a native ECMAScript module ${type}, ` +\n          \"which is only supported when running Babel asynchronously \" +\n          \"or when using the Node.js `--experimental-require-module` flag.\",\n        `You appear to be using a ${type} that contains top-level await, ` +\n          \"which is only supported when running Babel asynchronously.\",\n        // For backward compatibility, we need to support malformed presets\n        // defined as separate named exports rather than a single default\n        // export.\n        // See packages/babel-core/test/fixtures/option-manager/presets/es2015_named.js\n        // @ts-ignore(Babel 7 vs Babel 8) This param has been removed\n        true,\n      );\n    }\n  } catch (err) {\n    err.message = `[BABEL]: ${err.message} (While processing: ${name})`;\n    throw err;\n  } finally {\n    if (!process.env.BABEL_8_BREAKING) {\n      LOADING_MODULES.delete(name);\n    }\n  }\n}\n"],"mappings":";;;;;;;;AAIA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAG,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,SAAAI,KAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,IAAAM,kBAAA,GAAAL,OAAA;AAGA,SAAAM,IAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,GAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,MAAMQ,KAAK,GAAGC,OAASA,CAAC,CAAC,oCAAoC,CAAC;AAE9D,MAAMC,QAAQ,GAAG,UAAU;AAC3B,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,sBAAsB,GAAG,sCAAsC;AACrE,MAAMC,mBAAmB,GAAG,gCAAgC;AAC5D,MAAMC,mBAAmB,GAAG,gCAAgC;AAC5D,MAAMC,mBAAmB,GACvB,+DAA+D;AACjE,MAAMC,mBAAmB,GACvB,+DAA+D;AACjE,M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C1BH,IAAY,EACM;EACiB;IACjC,IAAI,EAAE,OAAO,IAAAI,cAAO,EAAC,CAAC,CAAC,IAAIyD,eAAe,CAACE,GAAG,CAAC/D,IAAI,CAAC,EAAE;MACpD,MAAM,IAAIsC,KAAK,CACb,aAAa7B,IAAI,6BAA6BT,IAAI,gCAAgC,GAChF,sFAAsF,GACtF,qFACJ,CAAC;IACH;EACF;EAEA,IAAI;IACiC;MACjC6D,eAAe,CAACG,GAAG,CAAChE,IAAI,CAAC;IAC3B;IAYO;MACL,OAAO,OAAO,IAAAiE,oBAAe,EAC3BjE,IAAI,EACJG,MAAM,EACN,qDAAqDM,IAAI,IAAI,GAC3D,4DAA4D,GAC5D,iEAAiE,EACnE,4BAA4BA,IAAI,kCAAkC,GAChE,4DAA4D,EAM9D,IACF,CAAC;IACH;EACF,CAAC,CAAC,OAAOyD,GAAG,EAAE;IACZA,GAAG,CAAChD,OAAO,GAAG,YAAYgD,GAAG,CAAChD,OAAO,uBAAuBlB,IAAI,GAAG;IACnE,MAAMkE,GAAG;EACX,CAAC,SAAS;IAC2B;MACjCL,eAAe,CAACM,MAAM,CAACnE,IAAI,CAAC;IAC9B;EACF;AACF;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/full.js

    rd565449 r0c6b92a  
    236236      return cache.invalidate(data => run(inheritsDescriptor, data));
    237237    });
    238     plugin.pre = chain(inherits.pre, plugin.pre);
    239     plugin.post = chain(inherits.post, plugin.post);
    240     plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions);
     238    plugin.pre = chainMaybeAsync(inherits.pre, plugin.pre);
     239    plugin.post = chainMaybeAsync(inherits.post, plugin.post);
     240    plugin.manipulateOptions = chainMaybeAsync(inherits.manipulateOptions, plugin.manipulateOptions);
    241241    plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]);
    242242    if (inherits.externalDependencies.length > 0) {
     
    297297  };
    298298}
    299 function chain(a, b) {
    300   const fns = [a, b].filter(Boolean);
    301   if (fns.length <= 1) return fns[0];
     299function chainMaybeAsync(a, b) {
     300  if (!a) return b;
     301  if (!b) return a;
    302302  return function (...args) {
    303     for (const fn of fns) {
    304       fn.apply(this, args);
    305     }
     303    const res = a.apply(this, args);
     304    if (res && typeof res.then === "function") {
     305      return res.then(() => b.apply(this, args));
     306    }
     307    return b.apply(this, args);
    306308  };
    307309}
  • imaps-frontend/node_modules/@babel/core/lib/config/full.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_gensync","data","require","_async","_util","context","_plugin","_item","_configChain","_deepArray","_traverse","_caching","_options","_plugins","_configApi","_partial","_configError","_default","exports","default","gensync","loadFullConfig","inputOpts","_opts$assumptions","result","loadPrivatePartialConfig","options","fileHandling","optionDefaults","plugins","presets","Error","presetContext","Object","assign","targets","toDescriptor","item","desc","getItemDescriptor","presetsDescriptors","map","initialPluginsDescriptors","pluginDescriptorsByPass","passes","externalDependencies","ignored","enhanceError","recursePresetDescriptors","rawPresets","pluginDescriptorsPass","i","length","descriptor","preset","loadPresetDescriptor","e","code","checkNoUnwrappedItemOptionPairs","push","ownPass","chain","pass","unshift","splice","o","filter","p","forEach","opts","mergeOptions","pluginContext","assumptions","loadPluginDescriptors","descs","plugin","loadPluginDescriptor","slice","passPerPreset","freezeDeepArray","fn","arg1","arg2","test","message","_context$filename","filename","makeDescriptorLoader","apiFactory","makeWeakCache","value","dirname","alias","cache","factory","maybeAsync","api","JSON","stringify","isThenable","configured","mode","error","pluginDescriptorLoader","makePluginAPI","presetDescriptorLoader","makePresetAPI","instantiatePlugin","pluginObj","validatePluginObject","visitor","traverse","explode","inherits","inheritsDescriptor","name","undefined","forwardAsync","run","invalidate","pre","post","manipulateOptions","visitors","merge","Plugin","needsFilename","val","validateIfOptionNeedsFilename","include","exclude","formattedPresetName","ConfigError","join","validatePreset","_options$overrides","overrides","overrideOptions","instantiatePreset","makeWeakCacheSync","validate","buildPresetChain","a","b","fns","Boolean","args","apply"],"sources":["../../src/config/full.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport {\n  forwardAsync,\n  maybeAsync,\n  isThenable,\n} from \"../gensync-utils/async.ts\";\n\nimport { mergeOptions } from \"./util.ts\";\nimport * as context from \"../index.ts\";\nimport Plugin from \"./plugin.ts\";\nimport { getItemDescriptor } from \"./item.ts\";\nimport { buildPresetChain } from \"./config-chain.ts\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array.ts\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type {\n  ConfigContext,\n  ConfigChain,\n  PresetInstance,\n} from \"./config-chain.ts\";\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\nimport {\n  validate,\n  checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options.ts\";\nimport type { PluginItem } from \"./validation/options.ts\";\nimport { validatePluginObject } from \"./validation/plugins.ts\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nimport loadPrivatePartialConfig from \"./partial.ts\";\nimport type { ValidatedOptions } from \"./validation/options.ts\";\n\nimport type * as Context from \"./cache-contexts.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\n\ntype LoadedDescriptor = {\n  value: any;\n  options: object;\n  dirname: string;\n  alias: string;\n  externalDependencies: ReadonlyDeepArray<string>;\n};\n\nexport type { InputOptions } from \"./validation/options.ts\";\n\nexport type ResolvedConfig = {\n  options: any;\n  passes: PluginPasses;\n  externalDependencies: ReadonlyDeepArray<string>;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array<Plugin>;\nexport type PluginPasses = Array<PluginPassList>;\n\nexport default gensync(function* loadFullConfig(\n  inputOpts: unknown,\n): Handler<ResolvedConfig | null> {\n  const result = yield* loadPrivatePartialConfig(inputOpts);\n  if (!result) {\n    return null;\n  }\n  const { options, context, fileHandling } = result;\n\n  if (fileHandling === \"ignored\") {\n    return null;\n  }\n\n  const optionDefaults = {};\n\n  const { plugins, presets } = options;\n\n  if (!plugins || !presets) {\n    throw new Error(\"Assertion failure - plugins and presets exist\");\n  }\n\n  const presetContext: Context.FullPreset = {\n    ...context,\n    targets: options.targets,\n  };\n\n  const toDescriptor = (item: PluginItem) => {\n    const desc = getItemDescriptor(item);\n    if (!desc) {\n      throw new Error(\"Assertion failure - must be config item\");\n    }\n\n    return desc;\n  };\n\n  const presetsDescriptors = presets.map(toDescriptor);\n  const initialPluginsDescriptors = plugins.map(toDescriptor);\n  const pluginDescriptorsByPass: Array<Array<UnloadedDescriptor<PluginAPI>>> = [\n    [],\n  ];\n  const passes: Array<Array<Plugin>> = [];\n\n  const externalDependencies: DeepArray<string> = [];\n\n  const ignored = yield* enhanceError(\n    context,\n    function* recursePresetDescriptors(\n      rawPresets: Array<UnloadedDescriptor<PresetAPI>>,\n      pluginDescriptorsPass: Array<UnloadedDescriptor<PluginAPI>>,\n    ): Handler<true | void> {\n      const presets: Array<{\n        preset: ConfigChain | null;\n        pass: Array<UnloadedDescriptor<PluginAPI>>;\n      }> = [];\n\n      for (let i = 0; i < rawPresets.length; i++) {\n        const descriptor = rawPresets[i];\n        if (descriptor.options !== false) {\n          try {\n            // eslint-disable-next-line no-var\n            var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n          } catch (e) {\n            if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n              checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n            }\n            throw e;\n          }\n\n          externalDependencies.push(preset.externalDependencies);\n\n          // Presets normally run in reverse order, but if they\n          // have their own pass they run after the presets\n          // in the previous pass.\n          if (descriptor.ownPass) {\n            presets.push({ preset: preset.chain, pass: [] });\n          } else {\n            presets.unshift({\n              preset: preset.chain,\n              pass: pluginDescriptorsPass,\n            });\n          }\n        }\n      }\n\n      // resolve presets\n      if (presets.length > 0) {\n        // The passes are created in the same order as the preset list, but are inserted before any\n        // existing additional passes.\n        pluginDescriptorsByPass.splice(\n          1,\n          0,\n          ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n        );\n\n        for (const { preset, pass } of presets) {\n          if (!preset) return true;\n\n          pass.push(...preset.plugins);\n\n          const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n          if (ignored) return true;\n\n          preset.options.forEach(opts => {\n            mergeOptions(optionDefaults, opts);\n          });\n        }\n      }\n    },\n  )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n  if (ignored) return null;\n\n  const opts: any = optionDefaults;\n  mergeOptions(opts, options);\n\n  const pluginContext: Context.FullPlugin = {\n    ...presetContext,\n    assumptions: opts.assumptions ?? {},\n  };\n\n  yield* enhanceError(context, function* loadPluginDescriptors() {\n    pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n    for (const descs of pluginDescriptorsByPass) {\n      const pass: Plugin[] = [];\n      passes.push(pass);\n\n      for (let i = 0; i < descs.length; i++) {\n        const descriptor = descs[i];\n        if (descriptor.options !== false) {\n          try {\n            // eslint-disable-next-line no-var\n            var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n          } catch (e) {\n            if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n              // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n              checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n            }\n            throw e;\n          }\n          pass.push(plugin);\n\n          externalDependencies.push(plugin.externalDependencies);\n        }\n      }\n    }\n  })();\n\n  opts.plugins = passes[0];\n  opts.presets = passes\n    .slice(1)\n    .filter(plugins => plugins.length > 0)\n    .map(plugins => ({ plugins }));\n  opts.passPerPreset = opts.presets.length > 0;\n\n  return {\n    options: opts,\n    passes: passes,\n    externalDependencies: freezeDeepArray(externalDependencies),\n  };\n});\n\nfunction enhanceError<T extends Function>(context: ConfigContext, fn: T): T {\n  return function* (arg1: unknown, arg2: unknown) {\n    try {\n      return yield* fn(arg1, arg2);\n    } catch (e) {\n      // There are a few case where thrown errors will try to annotate themselves multiple times, so\n      // to keep things simple we just bail out if re-wrapping the message.\n      if (!/^\\[BABEL\\]/.test(e.message)) {\n        e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n          e.message\n        }`;\n      }\n\n      throw e;\n    }\n  } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = <Context, API>(\n  apiFactory: (\n    cache: CacheConfigurator<Context>,\n    externalDependencies: Array<string>,\n  ) => API,\n) =>\n  makeWeakCache(function* (\n    { value, options, dirname, alias }: UnloadedDescriptor<API>,\n    cache: CacheConfigurator<Context>,\n  ): Handler<LoadedDescriptor> {\n    // Disabled presets should already have been filtered out\n    if (options === false) throw new Error(\"Assertion failure\");\n\n    options = options || {};\n\n    const externalDependencies: Array<string> = [];\n\n    let item: unknown = value;\n    if (typeof value === \"function\") {\n      const factory = maybeAsync(\n        value as (api: API, options: object, dirname: string) => unknown,\n        `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n      );\n\n      const api = {\n        ...context,\n        ...apiFactory(cache, externalDependencies),\n      };\n      try {\n        item = yield* factory(api, options, dirname);\n      } catch (e) {\n        if (alias) {\n          e.message += ` (While processing: ${JSON.stringify(alias)})`;\n        }\n        throw e;\n      }\n    }\n\n    if (!item || typeof item !== \"object\") {\n      throw new Error(\"Plugin/Preset did not return an object.\");\n    }\n\n    if (isThenable(item)) {\n      // @ts-expect-error - if we want to support async plugins\n      yield* [];\n\n      throw new Error(\n        `You appear to be using a promise as a plugin, ` +\n          `which your current version of Babel does not support. ` +\n          `If you're using a published plugin, ` +\n          `you may need to upgrade your @babel/core version. ` +\n          `As an alternative, you can prefix the promise with \"await\". ` +\n          `(While processing: ${JSON.stringify(alias)})`,\n      );\n    }\n\n    if (\n      externalDependencies.length > 0 &&\n      (!cache.configured() || cache.mode() === \"forever\")\n    ) {\n      let error =\n        `A plugin/preset has external untracked dependencies ` +\n        `(${externalDependencies[0]}), but the cache `;\n      if (!cache.configured()) {\n        error += `has not been configured to be invalidated when the external dependencies change. `;\n      } else {\n        error += ` has been configured to never be invalidated. `;\n      }\n      error +=\n        `Plugins/presets should configure their cache to be invalidated when the external ` +\n        `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n        `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n        `(While processing: ${JSON.stringify(alias)})`;\n\n      throw new Error(error);\n    }\n\n    return {\n      value: item,\n      options,\n      dirname,\n      alias,\n      externalDependencies: freezeDeepArray(externalDependencies),\n    };\n  });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n  Context.SimplePlugin,\n  PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n  Context.SimplePreset,\n  PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n  { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n  cache: CacheConfigurator<Context.SimplePlugin>,\n): Handler<Plugin> {\n  const pluginObj = validatePluginObject(value);\n\n  const plugin = {\n    ...pluginObj,\n  };\n  if (plugin.visitor) {\n    plugin.visitor = traverse.explode({\n      ...plugin.visitor,\n    });\n  }\n\n  if (plugin.inherits) {\n    const inheritsDescriptor: UnloadedDescriptor<PluginAPI> = {\n      name: undefined,\n      alias: `${alias}$inherits`,\n      value: plugin.inherits,\n      options,\n      dirname,\n    };\n\n    const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n      // If the inherited plugin changes, reinstantiate this plugin.\n      return cache.invalidate(data => run(inheritsDescriptor, data));\n    });\n\n    plugin.pre = chain(inherits.pre, plugin.pre);\n    plugin.post = chain(inherits.post, plugin.post);\n    plugin.manipulateOptions = chain(\n      inherits.manipulateOptions,\n      plugin.manipulateOptions,\n    );\n    plugin.visitor = traverse.visitors.merge([\n      inherits.visitor || {},\n      plugin.visitor || {},\n    ]);\n\n    if (inherits.externalDependencies.length > 0) {\n      if (externalDependencies.length === 0) {\n        externalDependencies = inherits.externalDependencies;\n      } else {\n        externalDependencies = freezeDeepArray([\n          externalDependencies,\n          inherits.externalDependencies,\n        ]);\n      }\n    }\n  }\n\n  return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n  descriptor: UnloadedDescriptor<PluginAPI>,\n  context: Context.SimplePlugin,\n): Handler<Plugin> {\n  if (descriptor.value instanceof Plugin) {\n    if (descriptor.options) {\n      throw new Error(\n        \"Passed options to an existing Plugin instance will not work.\",\n      );\n    }\n\n    return descriptor.value;\n  }\n\n  return yield* instantiatePlugin(\n    yield* pluginDescriptorLoader(descriptor, context),\n    context,\n  );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n  options: ValidatedOptions,\n  descriptor: UnloadedDescriptor<PresetAPI>,\n): void => {\n  if (\n    needsFilename(options.test) ||\n    needsFilename(options.include) ||\n    needsFilename(options.exclude)\n  ) {\n    const formattedPresetName = descriptor.name\n      ? `\"${descriptor.name}\"`\n      : \"/* your preset */\";\n    throw new ConfigError(\n      [\n        `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n        `\\`\\`\\``,\n        `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n        `\\`\\`\\``,\n        `See https://babeljs.io/docs/en/options#filename for more information.`,\n      ].join(\"\\n\"),\n    );\n  }\n};\n\nconst validatePreset = (\n  preset: PresetInstance,\n  context: ConfigContext,\n  descriptor: UnloadedDescriptor<PresetAPI>,\n): void => {\n  if (!context.filename) {\n    const { options } = preset;\n    validateIfOptionNeedsFilename(options, descriptor);\n    options.overrides?.forEach(overrideOptions =>\n      validateIfOptionNeedsFilename(overrideOptions, descriptor),\n    );\n  }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n  ({\n    value,\n    dirname,\n    alias,\n    externalDependencies,\n  }: LoadedDescriptor): PresetInstance => {\n    return {\n      options: validate(\"preset\", value),\n      alias,\n      dirname,\n      externalDependencies,\n    };\n  },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n  descriptor: UnloadedDescriptor<PresetAPI>,\n  context: Context.FullPreset,\n): Handler<{\n  chain: ConfigChain | null;\n  externalDependencies: ReadonlyDeepArray<string>;\n}> {\n  const preset = instantiatePreset(\n    yield* presetDescriptorLoader(descriptor, context),\n  );\n  validatePreset(preset, context, descriptor);\n  return {\n    chain: yield* buildPresetChain(preset, context),\n    externalDependencies: preset.externalDependencies,\n  };\n}\n\nfunction chain<Args extends any[]>(\n  a: undefined | ((...args: Args) => void),\n  b: undefined | ((...args: Args) => void),\n) {\n  const fns = [a, b].filter(Boolean);\n  if (fns.length <= 1) return fns[0];\n\n  return function (this: unknown, ...args: unknown[]) {\n    for (const fn of fns) {\n      fn.apply(this, args);\n    }\n  };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,MAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAQA,SAAAQ,UAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,SAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAU,QAAA,GAAAT,OAAA;AAEA,IAAAU,QAAA,GAAAV,OAAA;AAKA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY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7E,MAAM,CAAC+E,OAAO,CAAC;EAClC,IAAID,GAAG,CAAC5F,MAAM,IAAI,CAAC,EAAE,OAAO4F,GAAG,CAAC,CAAC,CAAC;EAElC,OAAO,UAAyB,GAAGE,IAAe,EAAE;IAClD,KAAK,MAAMlE,EAAE,IAAIgE,GAAG,EAAE;MACpBhE,EAAE,CAACmE,KAAK,CAAC,IAAI,EAAED,IAAI,CAAC;IACtB;EACF,CAAC;AACH;AAAC","ignoreList":[]}
     1{"version":3,"names":["_gensync","data","require","_async","_util","context","_plugin","_item","_configChain","_deepArray","_traverse","_caching","_options","_plugins","_configApi","_partial","_configError","_default","exports","default","gensync","loadFullConfig","inputOpts","_opts$assumptions","result","loadPrivatePartialConfig","options","fileHandling","optionDefaults","plugins","presets","Error","presetContext","Object","assign","targets","toDescriptor","item","desc","getItemDescriptor","presetsDescriptors","map","initialPluginsDescriptors","pluginDescriptorsByPass","passes","externalDependencies","ignored","enhanceError","recursePresetDescriptors","rawPresets","pluginDescriptorsPass","i","length","descriptor","preset","loadPresetDescriptor","e","code","checkNoUnwrappedItemOptionPairs","push","ownPass","chain","pass","unshift","splice","o","filter","p","forEach","opts","mergeOptions","pluginContext","assumptions","loadPluginDescriptors","descs","plugin","loadPluginDescriptor","slice","passPerPreset","freezeDeepArray","fn","arg1","arg2","test","message","_context$filename","filename","makeDescriptorLoader","apiFactory","makeWeakCache","value","dirname","alias","cache","factory","maybeAsync","api","JSON","stringify","isThenable","configured","mode","error","pluginDescriptorLoader","makePluginAPI","presetDescriptorLoader","makePresetAPI","instantiatePlugin","pluginObj","validatePluginObject","visitor","traverse","explode","inherits","inheritsDescriptor","name","undefined","forwardAsync","run","invalidate","pre","chainMaybeAsync","post","manipulateOptions","visitors","merge","Plugin","needsFilename","val","validateIfOptionNeedsFilename","include","exclude","formattedPresetName","ConfigError","join","validatePreset","_options$overrides","overrides","overrideOptions","instantiatePreset","makeWeakCacheSync","validate","buildPresetChain","a","b","args","res","apply","then"],"sources":["../../src/config/full.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\nimport {\n  forwardAsync,\n  maybeAsync,\n  isThenable,\n} from \"../gensync-utils/async.ts\";\n\nimport { mergeOptions } from \"./util.ts\";\nimport * as context from \"../index.ts\";\nimport Plugin from \"./plugin.ts\";\nimport { getItemDescriptor } from \"./item.ts\";\nimport { buildPresetChain } from \"./config-chain.ts\";\nimport { finalize as freezeDeepArray } from \"./helpers/deep-array.ts\";\nimport type { DeepArray, ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type {\n  ConfigContext,\n  ConfigChain,\n  PresetInstance,\n} from \"./config-chain.ts\";\nimport type { UnloadedDescriptor } from \"./config-descriptors.ts\";\nimport traverse from \"@babel/traverse\";\nimport { makeWeakCache, makeWeakCacheSync } from \"./caching.ts\";\nimport type { CacheConfigurator } from \"./caching.ts\";\nimport {\n  validate,\n  checkNoUnwrappedItemOptionPairs,\n} from \"./validation/options.ts\";\nimport type { InputOptions, PluginItem } from \"./validation/options.ts\";\nimport { validatePluginObject } from \"./validation/plugins.ts\";\nimport { makePluginAPI, makePresetAPI } from \"./helpers/config-api.ts\";\nimport type { PluginAPI, PresetAPI } from \"./helpers/config-api.ts\";\n\nimport loadPrivatePartialConfig from \"./partial.ts\";\nimport type { ValidatedOptions } from \"./validation/options.ts\";\n\nimport type * as Context from \"./cache-contexts.ts\";\nimport ConfigError from \"../errors/config-error.ts\";\n\ntype LoadedDescriptor = {\n  value: any;\n  options: object;\n  dirname: string;\n  alias: string;\n  externalDependencies: ReadonlyDeepArray<string>;\n};\n\nexport type { InputOptions } from \"./validation/options.ts\";\n\nexport type ResolvedConfig = {\n  options: any;\n  passes: PluginPasses;\n  externalDependencies: ReadonlyDeepArray<string>;\n};\n\nexport type { Plugin };\nexport type PluginPassList = Array<Plugin>;\nexport type PluginPasses = Array<PluginPassList>;\n\nexport default gensync(function* loadFullConfig(\n  inputOpts: InputOptions,\n): Handler<ResolvedConfig | null> {\n  const result = yield* loadPrivatePartialConfig(inputOpts);\n  if (!result) {\n    return null;\n  }\n  const { options, context, fileHandling } = result;\n\n  if (fileHandling === \"ignored\") {\n    return null;\n  }\n\n  const optionDefaults: ValidatedOptions = {};\n\n  const { plugins, presets } = options;\n\n  if (!plugins || !presets) {\n    throw new Error(\"Assertion failure - plugins and presets exist\");\n  }\n\n  const presetContext: Context.FullPreset = {\n    ...context,\n    targets: options.targets,\n  };\n\n  const toDescriptor = (item: PluginItem) => {\n    const desc = getItemDescriptor(item);\n    if (!desc) {\n      throw new Error(\"Assertion failure - must be config item\");\n    }\n\n    return desc;\n  };\n\n  const presetsDescriptors = presets.map(toDescriptor);\n  const initialPluginsDescriptors = plugins.map(toDescriptor);\n  const pluginDescriptorsByPass: Array<Array<UnloadedDescriptor<PluginAPI>>> = [\n    [],\n  ];\n  const passes: Array<Array<Plugin>> = [];\n\n  const externalDependencies: DeepArray<string> = [];\n\n  const ignored = yield* enhanceError(\n    context,\n    function* recursePresetDescriptors(\n      rawPresets: Array<UnloadedDescriptor<PresetAPI>>,\n      pluginDescriptorsPass: Array<UnloadedDescriptor<PluginAPI>>,\n    ): Handler<true | void> {\n      const presets: Array<{\n        preset: ConfigChain | null;\n        pass: Array<UnloadedDescriptor<PluginAPI>>;\n      }> = [];\n\n      for (let i = 0; i < rawPresets.length; i++) {\n        const descriptor = rawPresets[i];\n        if (descriptor.options !== false) {\n          try {\n            // eslint-disable-next-line no-var\n            var preset = yield* loadPresetDescriptor(descriptor, presetContext);\n          } catch (e) {\n            if (e.code === \"BABEL_UNKNOWN_OPTION\") {\n              checkNoUnwrappedItemOptionPairs(rawPresets, i, \"preset\", e);\n            }\n            throw e;\n          }\n\n          externalDependencies.push(preset.externalDependencies);\n\n          // Presets normally run in reverse order, but if they\n          // have their own pass they run after the presets\n          // in the previous pass.\n          if (descriptor.ownPass) {\n            presets.push({ preset: preset.chain, pass: [] });\n          } else {\n            presets.unshift({\n              preset: preset.chain,\n              pass: pluginDescriptorsPass,\n            });\n          }\n        }\n      }\n\n      // resolve presets\n      if (presets.length > 0) {\n        // The passes are created in the same order as the preset list, but are inserted before any\n        // existing additional passes.\n        pluginDescriptorsByPass.splice(\n          1,\n          0,\n          ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass),\n        );\n\n        for (const { preset, pass } of presets) {\n          if (!preset) return true;\n\n          pass.push(...preset.plugins);\n\n          const ignored = yield* recursePresetDescriptors(preset.presets, pass);\n          if (ignored) return true;\n\n          preset.options.forEach(opts => {\n            mergeOptions(optionDefaults, opts);\n          });\n        }\n      }\n    },\n  )(presetsDescriptors, pluginDescriptorsByPass[0]);\n\n  if (ignored) return null;\n\n  const opts: ValidatedOptions = optionDefaults;\n  mergeOptions(opts, options);\n\n  const pluginContext: Context.FullPlugin = {\n    ...presetContext,\n    assumptions: opts.assumptions ?? {},\n  };\n\n  yield* enhanceError(context, function* loadPluginDescriptors() {\n    pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);\n\n    for (const descs of pluginDescriptorsByPass) {\n      const pass: Plugin[] = [];\n      passes.push(pass);\n\n      for (let i = 0; i < descs.length; i++) {\n        const descriptor = descs[i];\n        if (descriptor.options !== false) {\n          try {\n            // eslint-disable-next-line no-var\n            var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);\n          } catch (e) {\n            if (e.code === \"BABEL_UNKNOWN_PLUGIN_PROPERTY\") {\n              // print special message for `plugins: [\"@babel/foo\", { foo: \"option\" }]`\n              checkNoUnwrappedItemOptionPairs(descs, i, \"plugin\", e);\n            }\n            throw e;\n          }\n          pass.push(plugin);\n\n          externalDependencies.push(plugin.externalDependencies);\n        }\n      }\n    }\n  })();\n\n  opts.plugins = passes[0];\n  opts.presets = passes\n    .slice(1)\n    .filter(plugins => plugins.length > 0)\n    .map(plugins => ({ plugins }));\n  opts.passPerPreset = opts.presets.length > 0;\n\n  return {\n    options: opts,\n    passes: passes,\n    externalDependencies: freezeDeepArray(externalDependencies),\n  };\n});\n\nfunction enhanceError<T extends Function>(context: ConfigContext, fn: T): T {\n  return function* (arg1: unknown, arg2: unknown) {\n    try {\n      return yield* fn(arg1, arg2);\n    } catch (e) {\n      // There are a few case where thrown errors will try to annotate themselves multiple times, so\n      // to keep things simple we just bail out if re-wrapping the message.\n      if (!/^\\[BABEL\\]/.test(e.message)) {\n        e.message = `[BABEL] ${context.filename ?? \"unknown file\"}: ${\n          e.message\n        }`;\n      }\n\n      throw e;\n    }\n  } as any;\n}\n\n/**\n * Load a generic plugin/preset from the given descriptor loaded from the config object.\n */\nconst makeDescriptorLoader = <Context, API>(\n  apiFactory: (\n    cache: CacheConfigurator<Context>,\n    externalDependencies: Array<string>,\n  ) => API,\n) =>\n  makeWeakCache(function* (\n    { value, options, dirname, alias }: UnloadedDescriptor<API>,\n    cache: CacheConfigurator<Context>,\n  ): Handler<LoadedDescriptor> {\n    // Disabled presets should already have been filtered out\n    if (options === false) throw new Error(\"Assertion failure\");\n\n    options = options || {};\n\n    const externalDependencies: Array<string> = [];\n\n    let item: unknown = value;\n    if (typeof value === \"function\") {\n      const factory = maybeAsync(\n        value as (api: API, options: object, dirname: string) => unknown,\n        `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n      );\n\n      const api = {\n        ...context,\n        ...apiFactory(cache, externalDependencies),\n      };\n      try {\n        item = yield* factory(api, options, dirname);\n      } catch (e) {\n        if (alias) {\n          e.message += ` (While processing: ${JSON.stringify(alias)})`;\n        }\n        throw e;\n      }\n    }\n\n    if (!item || typeof item !== \"object\") {\n      throw new Error(\"Plugin/Preset did not return an object.\");\n    }\n\n    if (isThenable(item)) {\n      // if we want to support async plugins\n      yield* [];\n\n      throw new Error(\n        `You appear to be using a promise as a plugin, ` +\n          `which your current version of Babel does not support. ` +\n          `If you're using a published plugin, ` +\n          `you may need to upgrade your @babel/core version. ` +\n          `As an alternative, you can prefix the promise with \"await\". ` +\n          `(While processing: ${JSON.stringify(alias)})`,\n      );\n    }\n\n    if (\n      externalDependencies.length > 0 &&\n      (!cache.configured() || cache.mode() === \"forever\")\n    ) {\n      let error =\n        `A plugin/preset has external untracked dependencies ` +\n        `(${externalDependencies[0]}), but the cache `;\n      if (!cache.configured()) {\n        error += `has not been configured to be invalidated when the external dependencies change. `;\n      } else {\n        error += ` has been configured to never be invalidated. `;\n      }\n      error +=\n        `Plugins/presets should configure their cache to be invalidated when the external ` +\n        `dependencies change, for example using \\`api.cache.invalidate(() => ` +\n        `statSync(filepath).mtimeMs)\\` or \\`api.cache.never()\\`\\n` +\n        `(While processing: ${JSON.stringify(alias)})`;\n\n      throw new Error(error);\n    }\n\n    return {\n      value: item,\n      options,\n      dirname,\n      alias,\n      externalDependencies: freezeDeepArray(externalDependencies),\n    };\n  });\n\nconst pluginDescriptorLoader = makeDescriptorLoader<\n  Context.SimplePlugin,\n  PluginAPI\n>(makePluginAPI);\nconst presetDescriptorLoader = makeDescriptorLoader<\n  Context.SimplePreset,\n  PresetAPI\n>(makePresetAPI);\n\nconst instantiatePlugin = makeWeakCache(function* (\n  { value, options, dirname, alias, externalDependencies }: LoadedDescriptor,\n  cache: CacheConfigurator<Context.SimplePlugin>,\n): Handler<Plugin> {\n  const pluginObj = validatePluginObject(value);\n\n  const plugin = {\n    ...pluginObj,\n  };\n  if (plugin.visitor) {\n    plugin.visitor = traverse.explode({\n      ...plugin.visitor,\n    });\n  }\n\n  if (plugin.inherits) {\n    const inheritsDescriptor: UnloadedDescriptor<PluginAPI> = {\n      name: undefined,\n      alias: `${alias}$inherits`,\n      value: plugin.inherits,\n      options,\n      dirname,\n    };\n\n    const inherits = yield* forwardAsync(loadPluginDescriptor, run => {\n      // If the inherited plugin changes, reinstantiate this plugin.\n      return cache.invalidate(data => run(inheritsDescriptor, data));\n    });\n\n    plugin.pre = chainMaybeAsync(inherits.pre, plugin.pre);\n    plugin.post = chainMaybeAsync(inherits.post, plugin.post);\n    plugin.manipulateOptions = chainMaybeAsync(\n      inherits.manipulateOptions,\n      plugin.manipulateOptions,\n    );\n    plugin.visitor = traverse.visitors.merge([\n      inherits.visitor || {},\n      plugin.visitor || {},\n    ]);\n\n    if (inherits.externalDependencies.length > 0) {\n      if (externalDependencies.length === 0) {\n        externalDependencies = inherits.externalDependencies;\n      } else {\n        externalDependencies = freezeDeepArray([\n          externalDependencies,\n          inherits.externalDependencies,\n        ]);\n      }\n    }\n  }\n\n  return new Plugin(plugin, options, alias, externalDependencies);\n});\n\n/**\n * Instantiate a plugin for the given descriptor, returning the plugin/options pair.\n */\nfunction* loadPluginDescriptor(\n  descriptor: UnloadedDescriptor<PluginAPI>,\n  context: Context.SimplePlugin,\n): Handler<Plugin> {\n  if (descriptor.value instanceof Plugin) {\n    if (descriptor.options) {\n      throw new Error(\n        \"Passed options to an existing Plugin instance will not work.\",\n      );\n    }\n\n    return descriptor.value;\n  }\n\n  return yield* instantiatePlugin(\n    yield* pluginDescriptorLoader(descriptor, context),\n    context,\n  );\n}\n\nconst needsFilename = (val: unknown) => val && typeof val !== \"function\";\n\nconst validateIfOptionNeedsFilename = (\n  options: ValidatedOptions,\n  descriptor: UnloadedDescriptor<PresetAPI>,\n): void => {\n  if (\n    needsFilename(options.test) ||\n    needsFilename(options.include) ||\n    needsFilename(options.exclude)\n  ) {\n    const formattedPresetName = descriptor.name\n      ? `\"${descriptor.name}\"`\n      : \"/* your preset */\";\n    throw new ConfigError(\n      [\n        `Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,\n        `\\`\\`\\``,\n        `babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,\n        `\\`\\`\\``,\n        `See https://babeljs.io/docs/en/options#filename for more information.`,\n      ].join(\"\\n\"),\n    );\n  }\n};\n\nconst validatePreset = (\n  preset: PresetInstance,\n  context: ConfigContext,\n  descriptor: UnloadedDescriptor<PresetAPI>,\n): void => {\n  if (!context.filename) {\n    const { options } = preset;\n    validateIfOptionNeedsFilename(options, descriptor);\n    options.overrides?.forEach(overrideOptions =>\n      validateIfOptionNeedsFilename(overrideOptions, descriptor),\n    );\n  }\n};\n\nconst instantiatePreset = makeWeakCacheSync(\n  ({\n    value,\n    dirname,\n    alias,\n    externalDependencies,\n  }: LoadedDescriptor): PresetInstance => {\n    return {\n      options: validate(\"preset\", value),\n      alias,\n      dirname,\n      externalDependencies,\n    };\n  },\n);\n\n/**\n * Generate a config object that will act as the root of a new nested config.\n */\nfunction* loadPresetDescriptor(\n  descriptor: UnloadedDescriptor<PresetAPI>,\n  context: Context.FullPreset,\n): Handler<{\n  chain: ConfigChain | null;\n  externalDependencies: ReadonlyDeepArray<string>;\n}> {\n  const preset = instantiatePreset(\n    yield* presetDescriptorLoader(descriptor, context),\n  );\n  validatePreset(preset, context, descriptor);\n  return {\n    chain: yield* buildPresetChain(preset, context),\n    externalDependencies: preset.externalDependencies,\n  };\n}\n\nfunction chainMaybeAsync<Args extends any[], R extends void | Promise<void>>(\n  a: undefined | ((...args: Args) => R),\n  b: undefined | ((...args: Args) => R),\n): (...args: Args) => R {\n  if (!a) return b;\n  if (!b) return a;\n\n  return function (this: unknown, ...args: Args) {\n    const res = a.apply(this, args);\n    if (res && typeof res.then === \"function\") {\n      return res.then(() => b.apply(this, args));\n    }\n    return b.apply(this, args);\n  } as (...args: Args) => R;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAE,MAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAQA,SAAAQ,UAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,SAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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eA,CACtBsB,CAAqC,EACrCC,CAAqC,EACf;EACtB,IAAI,CAACD,CAAC,EAAE,OAAOC,CAAC;EAChB,IAAI,CAACA,CAAC,EAAE,OAAOD,CAAC;EAEhB,OAAO,UAAyB,GAAGE,IAAU,EAAE;IAC7C,MAAMC,GAAG,GAAGH,CAAC,CAACI,KAAK,CAAC,IAAI,EAAEF,IAAI,CAAC;IAC/B,IAAIC,GAAG,IAAI,OAAOA,GAAG,CAACE,IAAI,KAAK,UAAU,EAAE;MACzC,OAAOF,GAAG,CAACE,IAAI,CAAC,MAAMJ,CAAC,CAACG,KAAK,CAAC,IAAI,EAAEF,IAAI,CAAC,CAAC;IAC5C;IACA,OAAOD,CAAC,CAACG,KAAK,CAAC,IAAI,EAAEF,IAAI,CAAC;EAC5B,CAAC;AACH;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/helpers/config-api.js

    rd565449 r0c6b92a  
    1818function makeConfigAPI(cache) {
    1919  const env = value => cache.using(data => {
    20     if (typeof value === "undefined") return data.envName;
     20    if (value === undefined) return data.envName;
    2121    if (typeof value === "function") {
    2222      return (0, _caching.assertSimpleType)(value(data.envName));
  • imaps-frontend/node_modules/@babel/core/lib/config/helpers/config-api.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_semver","data","require","_index","_caching","makeConfigAPI","cache","env","value","using","envName","assertSimpleType","Array","isArray","some","entry","Error","caller","cb","version","coreVersion","simple","async","assertVersion","makePresetAPI","externalDependencies","targets","JSON","parse","stringify","addExternalDependency","ref","push","Object","assign","makePluginAPI","assumption","name","assumptions","range","Number","isInteger","semver","satisfies","limit","stackTraceLimit","err","code"],"sources":["../../../src/config/helpers/config-api.ts"],"sourcesContent":["import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../index.ts\";\nimport { assertSimpleType } from \"../caching.ts\";\nimport type {\n  CacheConfigurator,\n  SimpleCacheConfigurator,\n  SimpleType,\n} from \"../caching.ts\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options.ts\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n  (): string;\n  <T>(extractor: (babelEnv: string) => T): T;\n  (envVar: string): boolean;\n  (envVars: Array<string>): boolean;\n};\n\ntype CallerFactory = {\n  <T extends SimpleType>(\n    extractor: (callerMetadata: CallerMetadata | undefined) => T,\n  ): T;\n  (\n    extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n  ): SimpleType;\n};\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n  version: string;\n  cache: SimpleCacheConfigurator;\n  env: EnvFunction;\n  async: () => boolean;\n  assertVersion: typeof assertVersion;\n  caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n  targets: TargetsFunction;\n  addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n  assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI<SideChannel extends Context.SimpleConfig>(\n  cache: CacheConfigurator<SideChannel>,\n): ConfigAPI {\n  // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n  // and the `as any` type cast, TypeScript crashes in an infinite\n  // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n  // PR, we should check if it still crashes and report it to the TS team.\n  const env: EnvFunction = ((\n    value: string | string[] | (<T>(babelEnv: string) => T),\n  ) =>\n    cache.using(data => {\n      if (typeof value === \"undefined\") return data.envName;\n      if (typeof value === \"function\") {\n        return assertSimpleType(value(data.envName));\n      }\n      return (Array.isArray(value) ? value : [value]).some(entry => {\n        if (typeof entry !== \"string\") {\n          throw new Error(\"Unexpected non-string value\");\n        }\n        return entry === data.envName;\n      });\n    })) as any;\n\n  const caller = (\n    cb: (CallerMetadata: CallerMetadata | undefined) => SimpleType,\n  ) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n  return {\n    version: coreVersion,\n    cache: cache.simple(),\n    // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n    env,\n    async: () => false,\n    caller,\n    assertVersion,\n  };\n}\n\nexport function makePresetAPI<SideChannel extends Context.SimplePreset>(\n  cache: CacheConfigurator<SideChannel>,\n  externalDependencies: Array<string>,\n): PresetAPI {\n  const targets = () =>\n    // We are using JSON.parse/JSON.stringify because it's only possible to cache\n    // primitive values. We can safely stringify the targets object because it\n    // only contains strings as its properties.\n    // Please make the Record and Tuple proposal happen!\n    JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n  const addExternalDependency = (ref: string) => {\n    externalDependencies.push(ref);\n  };\n\n  return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI<SideChannel extends Context.SimplePlugin>(\n  cache: CacheConfigurator<SideChannel>,\n  externalDependencies: Array<string>,\n): PluginAPI {\n  const assumption = (name: string) =>\n    cache.using(data => data.assumptions[name]);\n\n  return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n  if (typeof range === \"number\") {\n    if (!Number.isInteger(range)) {\n      throw new Error(\"Expected string or integer value.\");\n    }\n    range = `^${range}.0.0-0`;\n  }\n  if (typeof range !== \"string\") {\n    throw new Error(\"Expected string or integer value.\");\n  }\n\n  // We want \"*\" to also allow any pre-release, but we do not pass\n  // the includePrerelease option to semver.satisfies because we\n  // do not want ^7.0.0 to match 8.0.0-alpha.1.\n  if (range === \"*\" || semver.satisfies(coreVersion, range)) return;\n\n  const limit = Error.stackTraceLimit;\n\n  if (typeof limit === \"number\" && limit < 25) {\n    // Bump up the limit if needed so that users are more likely\n    // to be able to see what is calling Babel.\n    Error.stackTraceLimit = 25;\n  }\n\n  const err = new Error(\n    `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n      `If you are sure you have a compatible version of @babel/core, ` +\n      `it is likely that something in your build process is loading the ` +\n      `wrong version. Inspect the stack trace of this error to look for ` +\n      `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n      `to see what is calling Babel.`,\n  );\n\n  if (typeof limit === \"number\") {\n    Error.stackTraceLimit = limit;\n  }\n\n  throw Object.assign(err, {\n    code: \"BABEL_VERSION_UNSUPPORTED\",\n    version: coreVersion,\n    range,\n  });\n}\n"],"mappings":";;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,IAAAE,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AA+CO,SAASG,aAAaA,CAC3BC,KAAqC,EAC1B;EAKX,MAAMC,GAAgB,GACpBC,KAAuD,IAEvDF,KAAK,CAACG,KAAK,CAACR,IAAI,IAAI;IAClB,IAAI,OAAOO,KAAK,KAAK,WAAW,EAAE,OAAOP,IAAI,CAACS,OAAO;IACrD,IAAI,OAAOF,KAAK,KAAK,UAAU,EAAE;MAC/B,OAAO,IAAAG,yBAAgB,EAACH,KAAK,CAACP,IAAI,CAACS,OAAO,CAAC,CAAC;IAC9C;IACA,OAAO,CAACE,KAAK,CAACC,OAAO,CAACL,KAAK,CAAC,GAAGA,KAAK,GAAG,CAACA,KAAK,CAAC,EAAEM,IAAI,CAACC,KAAK,IAAI;MAC5D,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;QAC7B,MAAM,IAAIC,KAAK,CAAC,6BAA6B,CAAC;MAChD;MACA,OAAOD,KAAK,KAAKd,IAAI,CAACS,OAAO;IAC/B,CAAC,CAAC;EACJ,CAAC,CAAS;EAEZ,MAAMO,MAAM,GACVC,EAA8D,IAC3DZ,KAAK,CAACG,KAAK,CAACR,IAAI,IAAI,IAAAU,yBAAgB,EAACO,EAAE,CAACjB,IAAI,CAACgB,MAAM,CAAC,CAAC,CAAC;EAE3D,OAAO;IACLE,OAAO,EAAEC,cAAW;IACpBd,KAAK,EAAEA,KAAK,CAACe,MAAM,CAAC,C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AAK,CAAC,EAAE;EAE3D,MAAMK,KAAK,GAAG5B,KAAK,CAAC6B,eAAe;EAEnC,IAAI,OAAOD,KAAK,KAAK,QAAQ,IAAIA,KAAK,GAAG,EAAE,EAAE;IAG3C5B,KAAK,CAAC6B,eAAe,GAAG,EAAE;EAC5B;EAEA,MAAMC,GAAG,GAAG,IAAI9B,KAAK,CACnB,mBAAmBuB,KAAK,2BAA2BnB,cAAW,KAAK,GACjE,gEAAgE,GAChE,mEAAmE,GACnE,mEAAmE,GACnE,qEAAqE,GACrE,+BACJ,CAAC;EAED,IAAI,OAAOwB,KAAK,KAAK,QAAQ,EAAE;IAC7B5B,KAAK,CAAC6B,eAAe,GAAGD,KAAK;EAC/B;EAEA,MAAMX,MAAM,CAACC,MAAM,CAACY,GAAG,EAAE;IACvBC,IAAI,EAAE,2BAA2B;IACjC5B,OAAO,EAAEC,cAAW;IACpBmB;EACF,CAAC,CAAC;AACJ;AAAC","ignoreList":[]}
     1{"version":3,"names":["_semver","data","require","_index","_caching","makeConfigAPI","cache","env","value","using","undefined","envName","assertSimpleType","Array","isArray","some","entry","Error","caller","cb","version","coreVersion","simple","async","assertVersion","makePresetAPI","externalDependencies","targets","JSON","parse","stringify","addExternalDependency","ref","push","Object","assign","makePluginAPI","assumption","name","assumptions","range","Number","isInteger","semver","satisfies","limit","stackTraceLimit","err","code"],"sources":["../../../src/config/helpers/config-api.ts"],"sourcesContent":["import semver from \"semver\";\nimport type { Targets } from \"@babel/helper-compilation-targets\";\n\nimport { version as coreVersion } from \"../../index.ts\";\nimport { assertSimpleType } from \"../caching.ts\";\nimport type {\n  CacheConfigurator,\n  SimpleCacheConfigurator,\n  SimpleType,\n} from \"../caching.ts\";\n\nimport type { AssumptionName, CallerMetadata } from \"../validation/options.ts\";\n\nimport type * as Context from \"../cache-contexts\";\n\ntype EnvFunction = {\n  (): string;\n  <T>(extractor: (babelEnv: string) => T): T;\n  (envVar: string): boolean;\n  (envVars: Array<string>): boolean;\n};\n\ntype CallerFactory = {\n  <T extends SimpleType>(\n    extractor: (callerMetadata: CallerMetadata | undefined) => T,\n  ): T;\n  (\n    extractor: (callerMetadata: CallerMetadata | undefined) => unknown,\n  ): SimpleType;\n};\ntype TargetsFunction = () => Targets;\ntype AssumptionFunction = (name: AssumptionName) => boolean | undefined;\n\nexport type ConfigAPI = {\n  version: string;\n  cache: SimpleCacheConfigurator;\n  env: EnvFunction;\n  async: () => boolean;\n  assertVersion: typeof assertVersion;\n  caller?: CallerFactory;\n};\n\nexport type PresetAPI = {\n  targets: TargetsFunction;\n  addExternalDependency: (ref: string) => void;\n} & ConfigAPI;\n\nexport type PluginAPI = {\n  assumption: AssumptionFunction;\n} & PresetAPI;\n\nexport function makeConfigAPI<SideChannel extends Context.SimpleConfig>(\n  cache: CacheConfigurator<SideChannel>,\n): ConfigAPI {\n  // TODO(@nicolo-ribaudo): If we remove the explicit type from `value`\n  // and the `as any` type cast, TypeScript crashes in an infinite\n  // recursion. After upgrading to TS4.7 and finishing the noImplicitAny\n  // PR, we should check if it still crashes and report it to the TS team.\n  const env: EnvFunction = ((\n    value: string | string[] | (<T>(babelEnv: string) => T),\n  ) =>\n    cache.using(data => {\n      if (value === undefined) return data.envName;\n      if (typeof value === \"function\") {\n        return assertSimpleType(value(data.envName));\n      }\n      return (Array.isArray(value) ? value : [value]).some(entry => {\n        if (typeof entry !== \"string\") {\n          throw new Error(\"Unexpected non-string value\");\n        }\n        return entry === data.envName;\n      });\n    })) as any;\n\n  const caller = (\n    cb: (CallerMetadata: CallerMetadata | undefined) => SimpleType,\n  ) => cache.using(data => assertSimpleType(cb(data.caller)));\n\n  return {\n    version: coreVersion,\n    cache: cache.simple(),\n    // Expose \".env()\" so people can easily get the same env that we expose using the \"env\" key.\n    env,\n    async: () => false,\n    caller,\n    assertVersion,\n  };\n}\n\nexport function makePresetAPI<SideChannel extends Context.SimplePreset>(\n  cache: CacheConfigurator<SideChannel>,\n  externalDependencies: Array<string>,\n): PresetAPI {\n  const targets = () =>\n    // We are using JSON.parse/JSON.stringify because it's only possible to cache\n    // primitive values. We can safely stringify the targets object because it\n    // only contains strings as its properties.\n    // Please make the Record and Tuple proposal happen!\n    JSON.parse(cache.using(data => JSON.stringify(data.targets)));\n\n  const addExternalDependency = (ref: string) => {\n    externalDependencies.push(ref);\n  };\n\n  return { ...makeConfigAPI(cache), targets, addExternalDependency };\n}\n\nexport function makePluginAPI<SideChannel extends Context.SimplePlugin>(\n  cache: CacheConfigurator<SideChannel>,\n  externalDependencies: Array<string>,\n): PluginAPI {\n  const assumption = (name: string) =>\n    cache.using(data => data.assumptions[name]);\n\n  return { ...makePresetAPI(cache, externalDependencies), assumption };\n}\n\nfunction assertVersion(range: string | number): void {\n  if (typeof range === \"number\") {\n    if (!Number.isInteger(range)) {\n      throw new Error(\"Expected string or integer value.\");\n    }\n    range = `^${range}.0.0-0`;\n  }\n  if (typeof range !== \"string\") {\n    throw new Error(\"Expected string or integer value.\");\n  }\n\n  // We want \"*\" to also allow any pre-release, but we do not pass\n  // the includePrerelease option to semver.satisfies because we\n  // do not want ^7.0.0 to match 8.0.0-alpha.1.\n  if (range === \"*\" || semver.satisfies(coreVersion, range)) return;\n\n  const limit = Error.stackTraceLimit;\n\n  if (typeof limit === \"number\" && limit < 25) {\n    // Bump up the limit if needed so that users are more likely\n    // to be able to see what is calling Babel.\n    Error.stackTraceLimit = 25;\n  }\n\n  const err = new Error(\n    `Requires Babel \"${range}\", but was loaded with \"${coreVersion}\". ` +\n      `If you are sure you have a compatible version of @babel/core, ` +\n      `it is likely that something in your build process is loading the ` +\n      `wrong version. Inspect the stack trace of this error to look for ` +\n      `the first entry that doesn't mention \"@babel/core\" or \"babel-core\" ` +\n      `to see what is calling Babel.`,\n  );\n\n  if (typeof limit === \"number\") {\n    Error.stackTraceLimit = limit;\n  }\n\n  throw Object.assign(err, {\n    code: \"BABEL_VERSION_UNSUPPORTED\",\n    version: coreVersion,\n    range,\n  });\n}\n"],"mappings":";;;;;;;;AAAA,SAA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AAMC,GAAG,GAAG,IAAI9B,KAAK,CACnB,mBAAmBuB,KAAK,2BAA2BnB,cAAW,KAAK,GACjE,gEAAgE,GAChE,mEAAmE,GACnE,mEAAmE,GACnE,qEAAqE,GACrE,+BACJ,CAAC;EAED,IAAI,OAAOwB,KAAK,KAAK,QAAQ,EAAE;IAC7B5B,KAAK,CAAC6B,eAAe,GAAGD,KAAK;EAC/B;EAEA,MAAMX,MAAM,CAACC,MAAM,CAACY,GAAG,EAAE;IACvBC,IAAI,EAAE,2BAA2B;IACjC5B,OAAO,EAAEC,cAAW;IACpBmB;EACF,CAAC,CAAC;AACJ;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/index.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_gensync","data","require","_full","_partial","_item","_rewriteStackTrace","loadPartialConfigRunner","gensync","loadPartialConfigImpl","loadPartialConfigAsync","args","beginHiddenCallStack","async","loadPartialConfigSync","sync","loadPartialConfig","opts","callback","undefined","errback","loadOptionsImpl","_config$options","config","loadFullConfig","options","loadOptionsRunner","loadOptionsAsync","loadOptionsSync","loadOptions","createConfigItemRunner","createConfigItemImpl","createConfigItemAsync","createConfigItemSync","createConfigItem","target"],"sources":["../../src/config/index.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nexport type {\n  ResolvedConfig,\n  InputOptions,\n  PluginPasses,\n  Plugin,\n} from \"./full.ts\";\n\nimport type { PluginTarget } from \"./validation/options.ts\";\n\nimport type {\n  PluginAPI as basePluginAPI,\n  PresetAPI as basePresetAPI,\n} from \"./helpers/config-api.ts\";\nexport type { PluginObject } from \"./validation/plugins.ts\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n  CallerMetadata,\n  ValidatedOptions as PresetObject,\n} from \"./validation/options.ts\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full.ts\";\nimport {\n  type PartialConfig,\n  loadPartialConfig as loadPartialConfigImpl,\n} from \"./partial.ts\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial.ts\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item.ts\";\nimport type { ConfigItem } from \"./item.ts\";\nexport type { ConfigItem };\n\nimport { beginHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\n\nconst loadPartialConfigRunner = gensync(loadPartialConfigImpl);\nexport function loadPartialConfigAsync(\n  ...args: Parameters<typeof loadPartialConfigRunner.async>\n) {\n  return beginHiddenCallStack(loadPartialConfigRunner.async)(...args);\n}\nexport function loadPartialConfigSync(\n  ...args: Parameters<typeof loadPartialConfigRunner.sync>\n) {\n  return beginHiddenCallStack(loadPartialConfigRunner.sync)(...args);\n}\nexport function loadPartialConfig(\n  opts: Parameters<typeof loadPartialConfigImpl>[0],\n  callback?: (err: Error, val: PartialConfig | null) => void,\n) {\n  if (callback !== undefined) {\n    beginHiddenCallStack(loadPartialConfigRunner.errback)(opts, callback);\n  } else if (typeof opts === \"function\") {\n    beginHiddenCallStack(loadPartialConfigRunner.errback)(\n      undefined,\n      opts as (err: Error, val: PartialConfig | null) => void,\n    );\n  } else {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"Starting from Babel 8.0.0, the 'loadPartialConfig' function expects a callback. If you need to call it synchronously, please use 'loadPartialConfigSync'.\",\n      );\n    } else {\n      return loadPartialConfigSync(opts);\n    }\n  }\n}\n\nfunction* loadOptionsImpl(opts: unknown): Handler<ResolvedConfig | null> {\n  const config = yield* loadFullConfig(opts);\n  // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n  return config?.options ?? null;\n}\nconst loadOptionsRunner = gensync(loadOptionsImpl);\nexport function loadOptionsAsync(\n  ...args: Parameters<typeof loadOptionsRunner.async>\n) {\n  return beginHiddenCallStack(loadOptionsRunner.async)(...args);\n}\nexport function loadOptionsSync(\n  ...args: Parameters<typeof loadOptionsRunner.sync>\n) {\n  return beginHiddenCallStack(loadOptionsRunner.sync)(...args);\n}\nexport function loadOptions(\n  opts: Parameters<typeof loadOptionsImpl>[0],\n  callback?: (err: Error, val: ResolvedConfig | null) => void,\n) {\n  if (callback !== undefined) {\n    beginHiddenCallStack(loadOptionsRunner.errback)(opts, callback);\n  } else if (typeof opts === \"function\") {\n    beginHiddenCallStack(loadOptionsRunner.errback)(\n      undefined,\n      opts as (err: Error, val: ResolvedConfig | null) => void,\n    );\n  } else {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"Starting from Babel 8.0.0, the 'loadOptions' function expects a callback. If you need to call it synchronously, please use 'loadOptionsSync'.\",\n      );\n    } else {\n      return loadOptionsSync(opts);\n    }\n  }\n}\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\nexport function createConfigItemAsync(\n  ...args: Parameters<typeof createConfigItemRunner.async>\n) {\n  return beginHiddenCallStack(createConfigItemRunner.async)(...args);\n}\nexport function createConfigItemSync(\n  ...args: Parameters<typeof createConfigItemRunner.sync>\n) {\n  return beginHiddenCallStack(createConfigItemRunner.sync)(...args);\n}\nexport function createConfigItem(\n  target: PluginTarget,\n  options: Parameters<typeof createConfigItemImpl>[1],\n  callback?: (err: Error, val: ConfigItem<PluginAPI> | null) => void,\n) {\n  if (callback !== undefined) {\n    beginHiddenCallStack(createConfigItemRunner.errback)(\n      target,\n      options,\n      callback,\n    );\n  } else if (typeof options === \"function\") {\n    beginHiddenCallStack(createConfigItemRunner.errback)(\n      target,\n      undefined,\n      callback,\n    );\n  } else {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"Starting from Babel 8.0.0, the 'createConfigItem' function expects a callback. If you need to call it synchronously, please use 'createConfigItemSync'.\",\n      );\n    } else {\n      return createConfigItemSync(target, options);\n    }\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAA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CAAC;EACH,CAAC,MAAM,IAAI,OAAOO,OAAO,KAAK,UAAU,EAAE;IACxC,IAAAb,uCAAoB,EAACkB,sBAAsB,CAACV,OAAO,CAAC,CAClDe,MAAM,EACNhB,SAAS,EACTD,QACF,CAAC;EACH,CAAC,MAAM;IAKE;MACL,OAAOe,oBAAoB,CAACE,MAAM,EAAEV,OAAO,CAAC;IAC9C;EACF;AACF;AAAC","ignoreList":[]}
     1{"version":3,"names":["_gensync","data","require","_full","_partial","_item","_rewriteStackTrace","loadPartialConfigRunner","gensync","loadPartialConfigImpl","loadPartialConfigAsync","args","beginHiddenCallStack","async","loadPartialConfigSync","sync","loadPartialConfig","opts","callback","undefined","errback","loadOptionsImpl","_config$options","config","loadFullConfig","options","loadOptionsRunner","loadOptionsAsync","loadOptionsSync","loadOptions","createConfigItemRunner","createConfigItemImpl","createConfigItemAsync","createConfigItemSync","createConfigItem","target"],"sources":["../../src/config/index.ts"],"sourcesContent":["import gensync, { type Handler } from \"gensync\";\n\nexport type {\n  ResolvedConfig,\n  InputOptions,\n  PluginPasses,\n  Plugin,\n} from \"./full.ts\";\n\nimport type { InputOptions, PluginTarget } from \"./validation/options.ts\";\n\nimport type {\n  PluginAPI as basePluginAPI,\n  PresetAPI as basePresetAPI,\n} from \"./helpers/config-api.ts\";\nexport type { PluginObject } from \"./validation/plugins.ts\";\ntype PluginAPI = basePluginAPI & typeof import(\"..\");\ntype PresetAPI = basePresetAPI & typeof import(\"..\");\nexport type { PluginAPI, PresetAPI };\n// todo: may need to refine PresetObject to be a subset of ValidatedOptions\nexport type {\n  CallerMetadata,\n  ValidatedOptions as PresetObject,\n} from \"./validation/options.ts\";\n\nimport loadFullConfig, { type ResolvedConfig } from \"./full.ts\";\nimport {\n  type PartialConfig,\n  loadPartialConfig as loadPartialConfigImpl,\n} from \"./partial.ts\";\n\nexport { loadFullConfig as default };\nexport type { PartialConfig } from \"./partial.ts\";\n\nimport { createConfigItem as createConfigItemImpl } from \"./item.ts\";\nimport type { ConfigItem } from \"./item.ts\";\nexport type { ConfigItem };\n\nimport { beginHiddenCallStack } from \"../errors/rewrite-stack-trace.ts\";\n\nconst loadPartialConfigRunner = gensync(loadPartialConfigImpl);\nexport function loadPartialConfigAsync(\n  ...args: Parameters<typeof loadPartialConfigRunner.async>\n) {\n  return beginHiddenCallStack(loadPartialConfigRunner.async)(...args);\n}\nexport function loadPartialConfigSync(\n  ...args: Parameters<typeof loadPartialConfigRunner.sync>\n) {\n  return beginHiddenCallStack(loadPartialConfigRunner.sync)(...args);\n}\nexport function loadPartialConfig(\n  opts: Parameters<typeof loadPartialConfigImpl>[0],\n  callback?: (err: Error, val: PartialConfig | null) => void,\n) {\n  if (callback !== undefined) {\n    beginHiddenCallStack(loadPartialConfigRunner.errback)(opts, callback);\n  } else if (typeof opts === \"function\") {\n    beginHiddenCallStack(loadPartialConfigRunner.errback)(\n      undefined,\n      opts as (err: Error, val: PartialConfig | null) => void,\n    );\n  } else {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"Starting from Babel 8.0.0, the 'loadPartialConfig' function expects a callback. If you need to call it synchronously, please use 'loadPartialConfigSync'.\",\n      );\n    } else {\n      return loadPartialConfigSync(opts);\n    }\n  }\n}\n\nfunction* loadOptionsImpl(opts: InputOptions): Handler<ResolvedConfig | null> {\n  const config = yield* loadFullConfig(opts);\n  // NOTE: We want to return \"null\" explicitly, while ?. alone returns undefined\n  return config?.options ?? null;\n}\nconst loadOptionsRunner = gensync(loadOptionsImpl);\nexport function loadOptionsAsync(\n  ...args: Parameters<typeof loadOptionsRunner.async>\n) {\n  return beginHiddenCallStack(loadOptionsRunner.async)(...args);\n}\nexport function loadOptionsSync(\n  ...args: Parameters<typeof loadOptionsRunner.sync>\n) {\n  return beginHiddenCallStack(loadOptionsRunner.sync)(...args);\n}\nexport function loadOptions(\n  opts: Parameters<typeof loadOptionsImpl>[0],\n  callback?: (err: Error, val: ResolvedConfig | null) => void,\n) {\n  if (callback !== undefined) {\n    beginHiddenCallStack(loadOptionsRunner.errback)(opts, callback);\n  } else if (typeof opts === \"function\") {\n    beginHiddenCallStack(loadOptionsRunner.errback)(\n      undefined,\n      opts as (err: Error, val: ResolvedConfig | null) => void,\n    );\n  } else {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"Starting from Babel 8.0.0, the 'loadOptions' function expects a callback. If you need to call it synchronously, please use 'loadOptionsSync'.\",\n      );\n    } else {\n      return loadOptionsSync(opts);\n    }\n  }\n}\n\nconst createConfigItemRunner = gensync(createConfigItemImpl);\nexport function createConfigItemAsync(\n  ...args: Parameters<typeof createConfigItemRunner.async>\n) {\n  return beginHiddenCallStack(createConfigItemRunner.async)(...args);\n}\nexport function createConfigItemSync(\n  ...args: Parameters<typeof createConfigItemRunner.sync>\n) {\n  return beginHiddenCallStack(createConfigItemRunner.sync)(...args);\n}\nexport function createConfigItem(\n  target: PluginTarget,\n  options: Parameters<typeof createConfigItemImpl>[1],\n  callback?: (err: Error, val: ConfigItem<PluginAPI> | null) => void,\n) {\n  if (callback !== undefined) {\n    beginHiddenCallStack(createConfigItemRunner.errback)(\n      target,\n      options,\n      callback,\n    );\n  } else if (typeof options === \"function\") {\n    beginHiddenCallStack(createConfigItemRunner.errback)(\n      target,\n      undefined,\n      callback,\n    );\n  } else {\n    if (process.env.BABEL_8_BREAKING) {\n      throw new Error(\n        \"Starting from Babel 8.0.0, the 'createConfigItem' function expects a callback. If you need to call it synchronously, please use 'createConfigItemSync'.\",\n      );\n    } else {\n      return createConfigItemSync(target, options);\n    }\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAyBA,IAAAE,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAQA,IAAAG,KAAA,GAAAH,OAAA;AAIA,I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MACL,OAAOe,oBAAoB,CAACE,MAAM,EAAEV,OAAO,CAAC;IAC9C;EACF;AACF;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/partial.js

    rd565449 r0c6b92a  
    2222var _resolveTargets = require("./resolve-targets.js");
    2323const _excluded = ["showIgnoredFiles"];
    24 function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
     24function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
    2525function resolveRootMode(rootDir, rootMode) {
    2626  switch (rootMode) {
  • imaps-frontend/node_modules/@babel/core/lib/config/partial.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_path","data","require","_plugin","_util","_item","_configChain","_environment","_options","_index","_resolveTargets","_excluded","_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","Object","keys","key","i","length","indexOf","resolveRootMode","rootDir","rootMode","upwardRootDir","findConfigUpwards","assign","Error","ROOT_CONFIG_FILENAMES","join","code","dirname","loadPrivatePartialConfig","inputOpts","Array","isArray","args","validate","envName","getEnv","cwd","root","caller","cloneInputAst","absoluteCwd","path","resolve","absoluteRootDir","filename","undefined","showConfigPath","resolveShowConfigPath","context","showConfig","configChain","buildRootChain","merged","assumptions","options","forEach","opts","mergeOptions","targets","resolveTargets","babelrc","configFile","browserslistConfigFile","passPerPreset","plugins","map","descriptor","createItemFromDescriptor","presets","fileHandling","ignore","config","files","loadPartialConfig","showIgnoredFiles","_opts","result","item","value","Plugin","PartialConfig","filepath","constructor","babelignore","freeze","hasFilesystemConfig","prototype"],"sources":["../../src/config/partial.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin.ts\";\nimport { mergeOptions } from \"./util.ts\";\nimport { createItemFromDescriptor } from \"./item.ts\";\nimport { buildRootChain } from \"./config-chain.ts\";\nimport type { ConfigContext, FileHandling } from \"./config-chain.ts\";\nimport { getEnv } from \"./helpers/environment.ts\";\nimport { validate } from \"./validation/options.ts\";\n\nimport type {\n  ValidatedOptions,\n  NormalizedOptions,\n  RootMode,\n} from \"./validation/options.ts\";\n\nimport {\n  findConfigUpwards,\n  resolveShowConfigPath,\n  ROOT_CONFIG_FILENAMES,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile } from \"./files/index.ts\";\nimport { resolveTargets } from \"./resolve-targets.ts\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n  switch (rootMode) {\n    case \"root\":\n      return rootDir;\n\n    case \"upward-optional\": {\n      const upwardRootDir = findConfigUpwards(rootDir);\n      return upwardRootDir === null ? rootDir : upwardRootDir;\n    }\n\n    case \"upward\": {\n      const upwardRootDir = findConfigUpwards(rootDir);\n      if (upwardRootDir !== null) return upwardRootDir;\n\n      throw Object.assign(\n        new Error(\n          `Babel was run with rootMode:\"upward\" but a root could not ` +\n            `be found when searching upward from \"${rootDir}\".\\n` +\n            `One of the following config files must be in the directory tree: ` +\n            `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n        ) as any,\n        {\n          code: \"BABEL_ROOT_NOT_FOUND\",\n          dirname: rootDir,\n        },\n      );\n    }\n    default:\n      throw new Error(`Assertion failure - unknown rootMode value.`);\n  }\n}\n\ntype PrivPartialConfig = {\n  options: NormalizedOptions;\n  context: ConfigContext;\n  fileHandling: FileHandling;\n  ignore: IgnoreFile | void;\n  babelrc: ConfigFile | void;\n  config: ConfigFile | void;\n  files: Set<string>;\n};\n\nexport default function* loadPrivatePartialConfig(\n  inputOpts: unknown,\n): Handler<PrivPartialConfig | null> {\n  if (\n    inputOpts != null &&\n    (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n  ) {\n    throw new Error(\"Babel options must be an object, null, or undefined\");\n  }\n\n  const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n  const {\n    envName = getEnv(),\n    cwd = \".\",\n    root: rootDir = \".\",\n    rootMode = \"root\",\n    caller,\n    cloneInputAst = true,\n  } = args;\n  const absoluteCwd = path.resolve(cwd);\n  const absoluteRootDir = resolveRootMode(\n    path.resolve(absoluteCwd, rootDir),\n    rootMode,\n  );\n\n  const filename =\n    typeof args.filename === \"string\"\n      ? path.resolve(cwd, args.filename)\n      : undefined;\n\n  const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n  const context: ConfigContext = {\n    filename,\n    cwd: absoluteCwd,\n    root: absoluteRootDir,\n    envName,\n    caller,\n    showConfig: showConfigPath === filename,\n  };\n\n  const configChain = yield* buildRootChain(args, context);\n  if (!configChain) return null;\n\n  const merged: ValidatedOptions = {\n    assumptions: {},\n  };\n  configChain.options.forEach(opts => {\n    mergeOptions(merged as any, opts);\n  });\n\n  const options: NormalizedOptions = {\n    ...merged,\n    targets: resolveTargets(merged, absoluteRootDir),\n\n    // Tack the passes onto the object itself so that, if this object is\n    // passed back to Babel a second time, it will be in the right structure\n    // to not change behavior.\n    cloneInputAst,\n    babelrc: false,\n    configFile: false,\n    browserslistConfigFile: false,\n    passPerPreset: false,\n    envName: context.envName,\n    cwd: context.cwd,\n    root: context.root,\n    rootMode: \"root\",\n    filename:\n      typeof context.filename === \"string\" ? context.filename : undefined,\n\n    plugins: configChain.plugins.map(descriptor =>\n      createItemFromDescriptor(descriptor),\n    ),\n    presets: configChain.presets.map(descriptor =>\n      createItemFromDescriptor(descriptor),\n    ),\n  };\n\n  return {\n    options,\n    context,\n    fileHandling: configChain.fileHandling,\n    ignore: configChain.ignore,\n    babelrc: configChain.babelrc,\n    config: configChain.config,\n    files: configChain.files,\n  };\n}\n\ntype LoadPartialConfigOpts = {\n  showIgnoredFiles?: boolean;\n};\n\nexport function* loadPartialConfig(\n  opts?: LoadPartialConfigOpts,\n): Handler<PartialConfig | null> {\n  let showIgnoredFiles = false;\n  // We only extract showIgnoredFiles if opts is an object, so that\n  // loadPrivatePartialConfig can throw the appropriate error if it's not.\n  if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n    ({ showIgnoredFiles, ...opts } = opts);\n  }\n\n  const result: PrivPartialConfig | undefined | null =\n    yield* loadPrivatePartialConfig(opts);\n  if (!result) return null;\n\n  const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n  if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n    return null;\n  }\n\n  (options.plugins || []).forEach(item => {\n    // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n    if (item.value instanceof Plugin) {\n      throw new Error(\n        \"Passing cached plugin instances is not supported in \" +\n          \"babel.loadPartialConfig()\",\n      );\n    }\n  });\n\n  return new PartialConfig(\n    options,\n    babelrc ? babelrc.filepath : undefined,\n    ignore ? ignore.filepath : undefined,\n    config ? config.filepath : undefined,\n    fileHandling,\n    files,\n  );\n}\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n  /**\n   * These properties are public, so any changes to them should be considered\n   * a breaking change to Babel's API.\n   */\n  options: NormalizedOptions;\n  babelrc: string | void;\n  babelignore: string | void;\n  config: string | void;\n  fileHandling: FileHandling;\n  files: Set<string>;\n\n  constructor(\n    options: NormalizedOptions,\n    babelrc: string | void,\n    ignore: string | void,\n    config: string | void,\n    fileHandling: FileHandling,\n    files: Set<string>,\n  ) {\n    this.options = options;\n    this.babelignore = ignore;\n    this.babelrc = babelrc;\n    this.config = config;\n    this.fileHandling = fileHandling;\n    this.files = files;\n\n    // Freeze since this is a public API and it should be extremely obvious that\n    // reassigning properties on here does nothing.\n    Object.freeze(this);\n  }\n\n  /**\n   * Returns true if there is a config file in the filesystem for this config.\n   */\n  hasFilesystemConfig(): boolean {\n    return this.babelrc !== undefined || this.config !== undefined;\n  }\n}\nObject.freeze(PartialConfig.prototype);\n"],"mappings":";;;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA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A,MAAMQ,aAAa,CAAC;EAYlBE,WAAWA,CACT5B,OAA0B,EAC1BM,OAAsB,EACtBU,MAAqB,EACrBC,MAAqB,EACrBF,YAA0B,EAC1BG,KAAkB,EAClB;IAAA,KAdFlB,OAAO;IAAA,KACPM,OAAO;IAAA,KACPuB,WAAW;IAAA,KACXZ,MAAM;IAAA,KACNF,YAAY;IAAA,KACZG,KAAK;IAUH,IAAI,CAAClB,OAAO,GAAGA,OAAO;IACtB,IAAI,CAAC6B,WAAW,GAAGb,MAAM;IACzB,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACW,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACF,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACG,KAAK,GAAGA,KAAK;IAIlB7D,MAAM,CAACyE,MAAM,CAAC,IAAI,CAAC;EACrB;EAKAC,mBAAmBA,CAAA,EAAY;IAC7B,OAAO,IAAI,CAACzB,OAAO,KAAKf,SAAS,IAAI,IAAI,CAAC0B,MAAM,KAAK1B,SAAS;EAChE;AACF;AACAlC,MAAM,CAACyE,MAAM,CAACJ,aAAa,CAACM,SAAS,CAAC;AAAC","ignoreList":[]}
     1{"version":3,"names":["_path","data","require","_plugin","_util","_item","_configChain","_environment","_options","_index","_resolveTargets","_excluded","_objectWithoutPropertiesLoose","r","e","t","n","hasOwnProperty","call","includes","resolveRootMode","rootDir","rootMode","upwardRootDir","findConfigUpwards","Object","assign","Error","ROOT_CONFIG_FILENAMES","join","code","dirname","loadPrivatePartialConfig","inputOpts","Array","isArray","args","validate","envName","getEnv","cwd","root","caller","cloneInputAst","absoluteCwd","path","resolve","absoluteRootDir","filename","undefined","showConfigPath","resolveShowConfigPath","context","showConfig","configChain","buildRootChain","merged","assumptions","options","forEach","opts","mergeOptions","targets","resolveTargets","babelrc","configFile","browserslistConfigFile","passPerPreset","plugins","map","descriptor","createItemFromDescriptor","presets","fileHandling","ignore","config","files","loadPartialConfig","showIgnoredFiles","_opts","result","item","value","Plugin","PartialConfig","filepath","constructor","babelignore","freeze","hasFilesystemConfig","prototype"],"sources":["../../src/config/partial.ts"],"sourcesContent":["import path from \"path\";\nimport type { Handler } from \"gensync\";\nimport Plugin from \"./plugin.ts\";\nimport { mergeOptions } from \"./util.ts\";\nimport { createItemFromDescriptor } from \"./item.ts\";\nimport { buildRootChain } from \"./config-chain.ts\";\nimport type { ConfigContext, FileHandling } from \"./config-chain.ts\";\nimport { getEnv } from \"./helpers/environment.ts\";\nimport { validate } from \"./validation/options.ts\";\n\nimport type {\n  ValidatedOptions,\n  NormalizedOptions,\n  RootMode,\n  InputOptions,\n} from \"./validation/options.ts\";\n\nimport {\n  findConfigUpwards,\n  resolveShowConfigPath,\n  ROOT_CONFIG_FILENAMES,\n} from \"./files/index.ts\";\nimport type { ConfigFile, IgnoreFile } from \"./files/index.ts\";\nimport { resolveTargets } from \"./resolve-targets.ts\";\n\nfunction resolveRootMode(rootDir: string, rootMode: RootMode): string {\n  switch (rootMode) {\n    case \"root\":\n      return rootDir;\n\n    case \"upward-optional\": {\n      const upwardRootDir = findConfigUpwards(rootDir);\n      return upwardRootDir === null ? rootDir : upwardRootDir;\n    }\n\n    case \"upward\": {\n      const upwardRootDir = findConfigUpwards(rootDir);\n      if (upwardRootDir !== null) return upwardRootDir;\n\n      throw Object.assign(\n        new Error(\n          `Babel was run with rootMode:\"upward\" but a root could not ` +\n            `be found when searching upward from \"${rootDir}\".\\n` +\n            `One of the following config files must be in the directory tree: ` +\n            `\"${ROOT_CONFIG_FILENAMES.join(\", \")}\".`,\n        ) as any,\n        {\n          code: \"BABEL_ROOT_NOT_FOUND\",\n          dirname: rootDir,\n        },\n      );\n    }\n    default:\n      throw new Error(`Assertion failure - unknown rootMode value.`);\n  }\n}\n\nexport type PrivPartialConfig = {\n  showIgnoredFiles?: boolean;\n  options: NormalizedOptions;\n  context: ConfigContext;\n  babelrc: ConfigFile | void;\n  config: ConfigFile | void;\n  ignore: IgnoreFile | void;\n  fileHandling: FileHandling;\n  files: Set<string>;\n};\n\nexport default function* loadPrivatePartialConfig(\n  inputOpts: InputOptions,\n): Handler<PrivPartialConfig | null> {\n  if (\n    inputOpts != null &&\n    (typeof inputOpts !== \"object\" || Array.isArray(inputOpts))\n  ) {\n    throw new Error(\"Babel options must be an object, null, or undefined\");\n  }\n\n  const args = inputOpts ? validate(\"arguments\", inputOpts) : {};\n\n  const {\n    envName = getEnv(),\n    cwd = \".\",\n    root: rootDir = \".\",\n    rootMode = \"root\",\n    caller,\n    cloneInputAst = true,\n  } = args;\n  const absoluteCwd = path.resolve(cwd);\n  const absoluteRootDir = resolveRootMode(\n    path.resolve(absoluteCwd, rootDir),\n    rootMode,\n  );\n\n  const filename =\n    typeof args.filename === \"string\"\n      ? path.resolve(cwd, args.filename)\n      : undefined;\n\n  const showConfigPath = yield* resolveShowConfigPath(absoluteCwd);\n\n  const context: ConfigContext = {\n    filename,\n    cwd: absoluteCwd,\n    root: absoluteRootDir,\n    envName,\n    caller,\n    showConfig: showConfigPath === filename,\n  };\n\n  const configChain = yield* buildRootChain(args, context);\n  if (!configChain) return null;\n\n  const merged: ValidatedOptions = {\n    assumptions: {},\n  };\n  configChain.options.forEach(opts => {\n    mergeOptions(merged as any, opts);\n  });\n\n  const options: NormalizedOptions = {\n    ...merged,\n    targets: resolveTargets(merged, absoluteRootDir),\n\n    // Tack the passes onto the object itself so that, if this object is\n    // passed back to Babel a second time, it will be in the right structure\n    // to not change behavior.\n    cloneInputAst,\n    babelrc: false,\n    configFile: false,\n    browserslistConfigFile: false,\n    passPerPreset: false,\n    envName: context.envName,\n    cwd: context.cwd,\n    root: context.root,\n    rootMode: \"root\",\n    filename:\n      typeof context.filename === \"string\" ? context.filename : undefined,\n\n    plugins: configChain.plugins.map(descriptor =>\n      createItemFromDescriptor(descriptor),\n    ),\n    presets: configChain.presets.map(descriptor =>\n      createItemFromDescriptor(descriptor),\n    ),\n  };\n\n  return {\n    options,\n    context,\n    fileHandling: configChain.fileHandling,\n    ignore: configChain.ignore,\n    babelrc: configChain.babelrc,\n    config: configChain.config,\n    files: configChain.files,\n  };\n}\n\nexport function* loadPartialConfig(\n  opts?: InputOptions,\n): Handler<PartialConfig | null> {\n  let showIgnoredFiles = false;\n  // We only extract showIgnoredFiles if opts is an object, so that\n  // loadPrivatePartialConfig can throw the appropriate error if it's not.\n  if (typeof opts === \"object\" && opts !== null && !Array.isArray(opts)) {\n    ({ showIgnoredFiles, ...opts } = opts);\n  }\n\n  const result: PrivPartialConfig | undefined | null =\n    yield* loadPrivatePartialConfig(opts);\n  if (!result) return null;\n\n  const { options, babelrc, ignore, config, fileHandling, files } = result;\n\n  if (fileHandling === \"ignored\" && !showIgnoredFiles) {\n    return null;\n  }\n\n  (options.plugins || []).forEach(item => {\n    // @ts-expect-error todo(flow->ts): better type annotation for `item.value`\n    if (item.value instanceof Plugin) {\n      throw new Error(\n        \"Passing cached plugin instances is not supported in \" +\n          \"babel.loadPartialConfig()\",\n      );\n    }\n  });\n\n  return new PartialConfig(\n    options,\n    babelrc ? babelrc.filepath : undefined,\n    ignore ? ignore.filepath : undefined,\n    config ? config.filepath : undefined,\n    fileHandling,\n    files,\n  );\n}\n\nexport type { PartialConfig };\n\nclass PartialConfig {\n  /**\n   * These properties are public, so any changes to them should be considered\n   * a breaking change to Babel's API.\n   */\n  options: NormalizedOptions;\n  babelrc: string | void;\n  babelignore: string | void;\n  config: string | void;\n  fileHandling: FileHandling;\n  files: Set<string>;\n\n  constructor(\n    options: NormalizedOptions,\n    babelrc: string | void,\n    ignore: string | void,\n    config: string | void,\n    fileHandling: FileHandling,\n    files: Set<string>,\n  ) {\n    this.options = options;\n    this.babelignore = ignore;\n    this.babelrc = babelrc;\n    this.config = config;\n    this.fileHandling = fileHandling;\n    this.files = files;\n\n    // Freeze since this is a public API and it should be extremely obvious that\n    // reassigning properties on here does nothing.\n    Object.freeze(this);\n  }\n\n  /**\n   * Returns true if there is a config file in the filesystem for this config.\n   */\n  hasFilesystemConfig(): boolean {\n    return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A,MAAMQ,aAAa,CAAC;EAYlBE,WAAWA,CACT5B,OAA0B,EAC1BM,OAAsB,EACtBU,MAAqB,EACrBC,MAAqB,EACrBF,YAA0B,EAC1BG,KAAkB,EAClB;IAAA,KAdFlB,OAAO;IAAA,KACPM,OAAO;IAAA,KACPuB,WAAW;IAAA,KACXZ,MAAM;IAAA,KACNF,YAAY;IAAA,KACZG,KAAK;IAUH,IAAI,CAAClB,OAAO,GAAGA,OAAO;IACtB,IAAI,CAAC6B,WAAW,GAAGb,MAAM;IACzB,IAAI,CAACV,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACW,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACF,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACG,KAAK,GAAGA,KAAK;IAIlBnD,MAAM,CAAC+D,MAAM,CAAC,IAAI,CAAC;EACrB;EAKAC,mBAAmBA,CAAA,EAAY;IAC7B,OAAO,IAAI,CAACzB,OAAO,KAAKf,SAAS,IAAI,IAAI,CAAC0B,MAAM,KAAK1B,SAAS;EAChE;AACF;AACAxB,MAAM,CAAC+D,MAAM,CAACJ,aAAa,CAACM,SAAS,CAAC;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/validation/options.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_removed","require","_optionAssertions","_configError","ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","exports","Set","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","hasOwnProperty","call","value","obj","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item.ts\";\nimport type Plugin from \"../plugin.ts\";\n\nimport removed from \"./removed.ts\";\nimport {\n  msg,\n  access,\n  assertString,\n  assertBoolean,\n  assertObject,\n  assertArray,\n  assertCallerMetadata,\n  assertInputSourceMap,\n  assertIgnoreList,\n  assertPluginList,\n  assertConfigApplicableTest,\n  assertConfigFileSearch,\n  assertBabelrcSearch,\n  assertFunction,\n  assertRootMode,\n  assertSourceMaps,\n  assertCompact,\n  assertSourceType,\n  assertTargets,\n  assertAssumptions,\n} from \"./option-assertions.ts\";\nimport type {\n  ValidatorSet,\n  Validator,\n  OptionPath,\n} from \"./option-assertions.ts\";\nimport type { UnloadedDescriptor } from \"../config-descriptors.ts\";\nimport type { PluginAPI } from \"../helpers/config-api.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n  cwd: assertString as Validator<ValidatedOptions[\"cwd\"]>,\n  root: assertString as Validator<ValidatedOptions[\"root\"]>,\n  rootMode: assertRootMode as Validator<ValidatedOptions[\"rootMode\"]>,\n  configFile: assertConfigFileSearch as Validator<\n    ValidatedOptions[\"configFile\"]\n  >,\n\n  caller: assertCallerMetadata as Validator<ValidatedOptions[\"caller\"]>,\n  filename: assertString as Validator<ValidatedOptions[\"filename\"]>,\n  filenameRelative: assertString as Validator<\n    ValidatedOptions[\"filenameRelative\"]\n  >,\n  code: assertBoolean as Validator<ValidatedOptions[\"code\"]>,\n  ast: assertBoolean as Validator<ValidatedOptions[\"ast\"]>,\n\n  cloneInputAst: assertBoolean as Validator<ValidatedOptions[\"cloneInputAst\"]>,\n\n  envName: assertString as Validator<ValidatedOptions[\"envName\"]>,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n  babelrc: assertBoolean as Validator<ValidatedOptions[\"babelrc\"]>,\n  babelrcRoots: assertBabelrcSearch as Validator<\n    ValidatedOptions[\"babelrcRoots\"]\n  >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n  extends: assertString as Validator<ValidatedOptions[\"extends\"]>,\n  ignore: assertIgnoreList as Validator<ValidatedOptions[\"ignore\"]>,\n  only: assertIgnoreList as Validator<ValidatedOptions[\"only\"]>,\n\n  targets: assertTargets as Validator<ValidatedOptions[\"targets\"]>,\n  browserslistConfigFile: assertConfigFileSearch as Validator<\n    ValidatedOptions[\"browserslistConfigFile\"]\n  >,\n  browserslistEnv: assertString as Validator<\n    ValidatedOptions[\"browserslistEnv\"]\n  >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n  // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n  // We may want a boolean-only version to be a common option, with the\n  // object only allowed as a root config argument.\n  inputSourceMap: assertInputSourceMap as Validator<\n    ValidatedOptions[\"inputSourceMap\"]\n  >,\n  presets: assertPluginList as Validator<ValidatedOptions[\"presets\"]>,\n  plugins: assertPluginList as Validator<ValidatedOptions[\"plugins\"]>,\n  passPerPreset: assertBoolean as Validator<ValidatedOptions[\"passPerPreset\"]>,\n  assumptions: assertAssumptions as Validator<ValidatedOptions[\"assumptions\"]>,\n\n  env: assertEnvSet as Validator<ValidatedOptions[\"env\"]>,\n  overrides: assertOverridesList as Validator<ValidatedOptions[\"overrides\"]>,\n\n  // We could limit these to 'overrides' blocks, but it's not clear why we'd\n  // bother, when the ability to limit a config to a specific set of files\n  // is a fairly general useful feature.\n  test: assertConfigApplicableTest as Validator<ValidatedOptions[\"test\"]>,\n  include: assertConfigApplicableTest as Validator<ValidatedOptions[\"include\"]>,\n  exclude: assertConfigApplicableTest as Validator<ValidatedOptions[\"exclude\"]>,\n\n  retainLines: assertBoolean as Validator<ValidatedOptions[\"retainLines\"]>,\n  comments: assertBoolean as Validator<ValidatedOptions[\"comments\"]>,\n  shouldPrintComment: assertFunction as Validator<\n    ValidatedOptions[\"shouldPrintComment\"]\n  >,\n  compact: assertCompact as Validator<ValidatedOptions[\"compact\"]>,\n  minified: assertBoolean as Validator<ValidatedOptions[\"minified\"]>,\n  auxiliaryCommentBefore: assertString as Validator<\n    ValidatedOptions[\"auxiliaryCommentBefore\"]\n  >,\n  auxiliaryCommentAfter: assertString as Validator<\n    ValidatedOptions[\"auxiliaryCommentAfter\"]\n  >,\n  sourceType: assertSourceType as Validator<ValidatedOptions[\"sourceType\"]>,\n  wrapPluginVisitorMethod: assertFunction as Validator<\n    ValidatedOptions[\"wrapPluginVisitorMethod\"]\n  >,\n  highlightCode: assertBoolean as Validator<ValidatedOptions[\"highlightCode\"]>,\n  sourceMaps: assertSourceMaps as Validator<ValidatedOptions[\"sourceMaps\"]>,\n  sourceMap: assertSourceMaps as Validator<ValidatedOptions[\"sourceMap\"]>,\n  sourceFileName: assertString as Validator<ValidatedOptions[\"sourceFileName\"]>,\n  sourceRoot: assertString as Validator<ValidatedOptions[\"sourceRoot\"]>,\n  parserOpts: assertObject as Validator<ValidatedOptions[\"parserOpts\"]>,\n  generatorOpts: assertObject as Validator<ValidatedOptions[\"generatorOpts\"]>,\n};\nif (!process.env.BABEL_8_BREAKING) {\n  Object.assign(COMMON_VALIDATORS, {\n    getModuleId: assertFunction,\n    moduleRoot: assertString,\n    moduleIds: assertBoolean,\n    moduleId: assertString,\n  });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n  cwd?: string;\n  filename?: string;\n  filenameRelative?: string;\n  babelrc?: boolean;\n  babelrcRoots?: BabelrcSearch;\n  configFile?: ConfigFileSearch;\n  root?: string;\n  rootMode?: RootMode;\n  code?: boolean;\n  ast?: boolean;\n  cloneInputAst?: boolean;\n  inputSourceMap?: RootInputSourceMapOption;\n  envName?: string;\n  caller?: CallerMetadata;\n  extends?: string;\n  env?: EnvSet<ValidatedOptions>;\n  ignore?: IgnoreList;\n  only?: IgnoreList;\n  overrides?: OverridesList;\n  // Generally verify if a given config object should be applied to the given file.\n  test?: ConfigApplicableTest;\n  include?: ConfigApplicableTest;\n  exclude?: ConfigApplicableTest;\n  presets?: PluginList;\n  plugins?: PluginList;\n  passPerPreset?: boolean;\n  assumptions?: {\n    [name: string]: boolean;\n  };\n  // browserslists-related options\n  targets?: TargetsListOrObject;\n  browserslistConfigFile?: ConfigFileSearch;\n  browserslistEnv?: string;\n  // Options for @babel/generator\n  retainLines?: boolean;\n  comments?: boolean;\n  shouldPrintComment?: Function;\n  compact?: CompactOption;\n  minified?: boolean;\n  auxiliaryCommentBefore?: string;\n  auxiliaryCommentAfter?: string;\n  // Parser\n  sourceType?: SourceTypeOption;\n  wrapPluginVisitorMethod?: Function;\n  highlightCode?: boolean;\n  // Sourcemap generation options.\n  sourceMaps?: SourceMapsOption;\n  sourceMap?: SourceMapsOption;\n  sourceFileName?: string;\n  sourceRoot?: string;\n  // Deprecate top level parserOpts\n  parserOpts?: ParserOptions;\n  // Deprecate top level generatorOpts\n  generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n  readonly targets: Targets;\n} & Omit<ValidatedOptions, \"targets\">;\n\nexport type CallerMetadata = {\n  // If 'caller' is specified, require that the name is given for debugging\n  // messages.\n  name: string;\n};\nexport type EnvSet<T> = {\n  [x: string]: T;\n};\nexport type IgnoreItem =\n  | string\n  | RegExp\n  | ((\n      path: string | undefined,\n      context: { dirname: string; caller: CallerMetadata; envName: string },\n    ) => unknown);\nexport type IgnoreList = ReadonlyArray<IgnoreItem>;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n  | ConfigItem<PluginAPI>\n  | Plugin\n  | PluginTarget\n  | [PluginTarget, PluginOptions]\n  | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray<PluginItem>;\n\nexport type OverridesList = Array<ValidatedOptions>;\nexport type ConfigApplicableTest = IgnoreItem | Array<IgnoreItem>;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = object | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n  | Targets\n  | InputTargets\n  | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n  | \"arguments\"\n  | \"configfile\"\n  | \"babelrcfile\"\n  | \"extendsfile\"\n  | \"preset\"\n  | \"plugin\";\n\nexport type RootPath = Readonly<{\n  type: \"root\";\n  source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n  type: \"overrides\";\n  index: number;\n  parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n  type: \"env\";\n  name: string;\n  parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n  \"arrayLikeIsIterable\",\n  \"constantReexports\",\n  \"constantSuper\",\n  \"enumerableModuleMeta\",\n  \"ignoreFunctionLength\",\n  \"ignoreToPrimitiveHint\",\n  \"iterableIsArray\",\n  \"mutableTemplateObject\",\n  \"noClassCalls\",\n  \"noDocumentAll\",\n  \"noIncompleteNsImportDetection\",\n  \"noNewArrows\",\n  \"noUninitializedPrivateFieldAccess\",\n  \"objectRestNoSymbols\",\n  \"privateFieldsAsSymbols\",\n  \"privateFieldsAsProperties\",\n  \"pureGetters\",\n  \"setClassMethods\",\n  \"setComputedProperties\",\n  \"setPublicClassFields\",\n  \"setSpreadProperties\",\n  \"skipForOfIteratorClosing\",\n  \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = (typeof knownAssumptions)[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n  return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n  type: OptionsSource,\n  opts: any,\n  filename?: string,\n): ValidatedOptions {\n  try {\n    return validateNested(\n      {\n        type: \"root\",\n        source: type,\n      },\n      opts,\n    );\n  } catch (error) {\n    const configError = new ConfigError(error.message, filename);\n    // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n    if (error.code) configError.code = error.code;\n    throw configError;\n  }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n  const type = getSource(loc);\n\n  assertNoDuplicateSourcemap(opts);\n\n  Object.keys(opts).forEach((key: string) => {\n    const optLoc = {\n      type: \"option\",\n      name: key,\n      parent: loc,\n    } as const;\n\n    if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n      throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n    }\n    if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n      throw new Error(\n        `${msg(optLoc)} is only allowed in root programmatic options`,\n      );\n    }\n    if (\n      type !== \"arguments\" &&\n      type !== \"configfile\" &&\n      BABELRC_VALIDATORS[key]\n    ) {\n      if (type === \"babelrcfile\" || type === \"extendsfile\") {\n        throw new Error(\n          `${msg(\n            optLoc,\n          )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n            `or babel.config.js/config file options`,\n        );\n      }\n\n      throw new Error(\n        `${msg(\n          optLoc,\n        )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n      );\n    }\n\n    const validator =\n      COMMON_VALIDATORS[key] ||\n      NONPRESET_VALIDATORS[key] ||\n      BABELRC_VALIDATORS[key] ||\n      ROOT_VALIDATORS[key] ||\n      (throwUnknownError as Validator<void>);\n\n    validator(optLoc, opts[key]);\n  });\n\n  return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n  const key = loc.name;\n\n  if (removed[key]) {\n    const { message, version = 5 } = removed[key];\n\n    throw new Error(\n      `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n    );\n  } else {\n    const unknownOptErr = new Error(\n      `Unknown option: ${msg(\n        loc,\n      )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n    );\n    // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n    unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n    throw unknownOptErr;\n  }\n}\n\nfunction assertNoDuplicateSourcemap(opts: any): void {\n  if (Object.hasOwn(opts, \"sourceMap\") && Object.hasOwn(opts, \"sourceMaps\")) {\n    throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n  }\n}\n\nfunction assertEnvSet(\n  loc: OptionPath,\n  value: unknown,\n): void | EnvSet<ValidatedOptions> {\n  if (loc.parent.type === \"env\") {\n    throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n  }\n  const parent: RootPath | OverridesPath = loc.parent;\n\n  const obj = assertObject(loc, value);\n  if (obj) {\n    // Validate but don't copy the .env object in order to preserve\n    // object identity for use during config chain processing.\n    for (const envName of Object.keys(obj)) {\n      const env = assertObject(access(loc, envName), obj[envName]);\n      if (!env) continue;\n\n      const envLoc = {\n        type: \"env\",\n        name: envName,\n        parent,\n      } as const;\n      validateNested(envLoc, env);\n    }\n  }\n  return obj;\n}\n\nfunction assertOverridesList(\n  loc: OptionPath,\n  value: unknown[],\n): undefined | OverridesList {\n  if (loc.parent.type === \"env\") {\n    throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n  }\n  if (loc.parent.type === \"overrides\") {\n    throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n  }\n  const parent: RootPath = loc.parent;\n\n  const arr = assertArray(loc, value);\n  if (arr) {\n    for (const [index, item] of arr.entries()) {\n      const objLoc = access(loc, index);\n      const env = assertObject(objLoc, item);\n      if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n      const overridesLoc = {\n        type: \"overrides\",\n        index,\n        parent,\n      } as const;\n      validateNested(overridesLoc, env);\n    }\n  }\n  return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs<API>(\n  items: Array<UnloadedDescriptor<API>>,\n  index: number,\n  type: \"plugin\" | \"preset\",\n  e: Error,\n): void {\n  if (index === 0) return;\n\n  const lastItem = items[index - 1];\n  const thisItem = items[index];\n\n  if (\n    lastItem.file &&\n    lastItem.options === undefined &&\n    typeof thisItem.value === \"object\"\n  ) {\n    e.message +=\n      `\\n- Maybe you meant to use\\n` +\n      `\"${type}s\": [\\n  [\"${lastItem.file.request}\", ${JSON.stringify(\n        thisItem.value,\n        undefined,\n        2,\n      )}]\\n]\\n` +\n      `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n  }\n}\n"],"mappings":";;;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AA+BA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,eAA6B,GAAG;EACpCC,GAAG,EAAEC,8BAAkD;EACvDC,IAAI,EAAED,8BAAmD;EACzDE,QAAQ,EAAEC,gCAAyD;EACnEC,UAAU,EAAEC,wCAEX;EAEDC,MAAM,EAAEC,sCAA6D;EACrEC,QAAQ,EAAER,8BAAuD;EACjES,gBAAgB,EAAET,8BAEjB;EACDU,IAAI,EAAEC,+BAAoD;EAC1DC,GAAG,EAAED,+BAAmD;EAExDE,aAAa,EAAEF,+BAA6D;EAE5EG,OAAO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C;EACF;EACA,OAAOsE,GAAG;AACZ;AAEO,SAASO,+BAA+BA,CAC7CC,KAAqC,EACrCN,KAAa,EACb/B,IAAyB,EACzBsC,CAAQ,EACF;EACN,IAAIP,KAAK,KAAK,CAAC,EAAE;EAEjB,MAAMQ,QAAQ,GAAGF,KAAK,CAACN,KAAK,GAAG,CAAC,CAAC;EACjC,MAAMS,QAAQ,GAAGH,KAAK,CAACN,KAAK,CAAC;EAE7B,IACEQ,QAAQ,CAACE,IAAI,IACbF,QAAQ,CAACG,OAAO,KAAKC,SAAS,IAC9B,OAAOH,QAAQ,CAACf,KAAK,KAAK,QAAQ,EAClC;IACAa,CAAC,CAAC7B,OAAO,IACP,8BAA8B,GAC9B,IAAIT,IAAI,cAAcuC,QAAQ,CAACE,IAAI,CAACG,OAAO,MAAMC,IAAI,CAACC,SAAS,CAC7DN,QAAQ,CAACf,KAAK,EACdkB,SAAS,EACT,CACF,CAAC,QAAQ,GACT,iBAAiB3C,IAAI,gEAAgE;EACzF;AACF;AAAC","ignoreList":[]}
     1{"version":3,"names":["_removed","require","_optionAssertions","_configError","ROOT_VALIDATORS","cwd","assertString","root","rootMode","assertRootMode","configFile","assertConfigFileSearch","caller","assertCallerMetadata","filename","filenameRelative","code","assertBoolean","ast","cloneInputAst","envName","BABELRC_VALIDATORS","babelrc","babelrcRoots","assertBabelrcSearch","NONPRESET_VALIDATORS","extends","ignore","assertIgnoreList","only","targets","assertTargets","browserslistConfigFile","browserslistEnv","COMMON_VALIDATORS","inputSourceMap","assertInputSourceMap","presets","assertPluginList","plugins","passPerPreset","assumptions","assertAssumptions","env","assertEnvSet","overrides","assertOverridesList","test","assertConfigApplicableTest","include","exclude","retainLines","comments","shouldPrintComment","assertFunction","compact","assertCompact","minified","auxiliaryCommentBefore","auxiliaryCommentAfter","sourceType","assertSourceType","wrapPluginVisitorMethod","highlightCode","sourceMaps","assertSourceMaps","sourceMap","sourceFileName","sourceRoot","parserOpts","assertObject","generatorOpts","Object","assign","getModuleId","moduleRoot","moduleIds","moduleId","knownAssumptions","assumptionsNames","exports","Set","getSource","loc","type","source","parent","validate","opts","validateNested","error","configError","ConfigError","message","assertNoDuplicateSourcemap","keys","forEach","key","optLoc","name","Error","msg","validator","throwUnknownError","removed","version","unknownOptErr","hasOwnProperty","call","value","obj","access","envLoc","arr","assertArray","index","item","entries","objLoc","overridesLoc","checkNoUnwrappedItemOptionPairs","items","e","lastItem","thisItem","file","options","undefined","request","JSON","stringify"],"sources":["../../../src/config/validation/options.ts"],"sourcesContent":["import type { InputTargets, Targets } from \"@babel/helper-compilation-targets\";\n\nimport type { ConfigItem } from \"../item.ts\";\nimport type Plugin from \"../plugin.ts\";\n\nimport removed from \"./removed.ts\";\nimport {\n  msg,\n  access,\n  assertString,\n  assertBoolean,\n  assertObject,\n  assertArray,\n  assertCallerMetadata,\n  assertInputSourceMap,\n  assertIgnoreList,\n  assertPluginList,\n  assertConfigApplicableTest,\n  assertConfigFileSearch,\n  assertBabelrcSearch,\n  assertFunction,\n  assertRootMode,\n  assertSourceMaps,\n  assertCompact,\n  assertSourceType,\n  assertTargets,\n  assertAssumptions,\n} from \"./option-assertions.ts\";\nimport type {\n  ValidatorSet,\n  Validator,\n  OptionPath,\n} from \"./option-assertions.ts\";\nimport type { UnloadedDescriptor } from \"../config-descriptors.ts\";\nimport type { PluginAPI } from \"../helpers/config-api.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { GeneratorOptions } from \"@babel/generator\";\nimport ConfigError from \"../../errors/config-error.ts\";\n\nconst ROOT_VALIDATORS: ValidatorSet = {\n  cwd: assertString as Validator<ValidatedOptions[\"cwd\"]>,\n  root: assertString as Validator<ValidatedOptions[\"root\"]>,\n  rootMode: assertRootMode as Validator<ValidatedOptions[\"rootMode\"]>,\n  configFile: assertConfigFileSearch as Validator<\n    ValidatedOptions[\"configFile\"]\n  >,\n\n  caller: assertCallerMetadata as Validator<ValidatedOptions[\"caller\"]>,\n  filename: assertString as Validator<ValidatedOptions[\"filename\"]>,\n  filenameRelative: assertString as Validator<\n    ValidatedOptions[\"filenameRelative\"]\n  >,\n  code: assertBoolean as Validator<ValidatedOptions[\"code\"]>,\n  ast: assertBoolean as Validator<ValidatedOptions[\"ast\"]>,\n\n  cloneInputAst: assertBoolean as Validator<ValidatedOptions[\"cloneInputAst\"]>,\n\n  envName: assertString as Validator<ValidatedOptions[\"envName\"]>,\n};\n\nconst BABELRC_VALIDATORS: ValidatorSet = {\n  babelrc: assertBoolean as Validator<ValidatedOptions[\"babelrc\"]>,\n  babelrcRoots: assertBabelrcSearch as Validator<\n    ValidatedOptions[\"babelrcRoots\"]\n  >,\n};\n\nconst NONPRESET_VALIDATORS: ValidatorSet = {\n  extends: assertString as Validator<ValidatedOptions[\"extends\"]>,\n  ignore: assertIgnoreList as Validator<ValidatedOptions[\"ignore\"]>,\n  only: assertIgnoreList as Validator<ValidatedOptions[\"only\"]>,\n\n  targets: assertTargets as Validator<ValidatedOptions[\"targets\"]>,\n  browserslistConfigFile: assertConfigFileSearch as Validator<\n    ValidatedOptions[\"browserslistConfigFile\"]\n  >,\n  browserslistEnv: assertString as Validator<\n    ValidatedOptions[\"browserslistEnv\"]\n  >,\n};\n\nconst COMMON_VALIDATORS: ValidatorSet = {\n  // TODO: Should 'inputSourceMap' be moved to be a root-only option?\n  // We may want a boolean-only version to be a common option, with the\n  // object only allowed as a root config argument.\n  inputSourceMap: assertInputSourceMap as Validator<\n    ValidatedOptions[\"inputSourceMap\"]\n  >,\n  presets: assertPluginList as Validator<ValidatedOptions[\"presets\"]>,\n  plugins: assertPluginList as Validator<ValidatedOptions[\"plugins\"]>,\n  passPerPreset: assertBoolean as Validator<ValidatedOptions[\"passPerPreset\"]>,\n  assumptions: assertAssumptions as Validator<ValidatedOptions[\"assumptions\"]>,\n\n  env: assertEnvSet as Validator<ValidatedOptions[\"env\"]>,\n  overrides: assertOverridesList as Validator<ValidatedOptions[\"overrides\"]>,\n\n  // We could limit these to 'overrides' blocks, but it's not clear why we'd\n  // bother, when the ability to limit a config to a specific set of files\n  // is a fairly general useful feature.\n  test: assertConfigApplicableTest as Validator<ValidatedOptions[\"test\"]>,\n  include: assertConfigApplicableTest as Validator<ValidatedOptions[\"include\"]>,\n  exclude: assertConfigApplicableTest as Validator<ValidatedOptions[\"exclude\"]>,\n\n  retainLines: assertBoolean as Validator<ValidatedOptions[\"retainLines\"]>,\n  comments: assertBoolean as Validator<ValidatedOptions[\"comments\"]>,\n  shouldPrintComment: assertFunction as Validator<\n    ValidatedOptions[\"shouldPrintComment\"]\n  >,\n  compact: assertCompact as Validator<ValidatedOptions[\"compact\"]>,\n  minified: assertBoolean as Validator<ValidatedOptions[\"minified\"]>,\n  auxiliaryCommentBefore: assertString as Validator<\n    ValidatedOptions[\"auxiliaryCommentBefore\"]\n  >,\n  auxiliaryCommentAfter: assertString as Validator<\n    ValidatedOptions[\"auxiliaryCommentAfter\"]\n  >,\n  sourceType: assertSourceType as Validator<ValidatedOptions[\"sourceType\"]>,\n  wrapPluginVisitorMethod: assertFunction as Validator<\n    ValidatedOptions[\"wrapPluginVisitorMethod\"]\n  >,\n  highlightCode: assertBoolean as Validator<ValidatedOptions[\"highlightCode\"]>,\n  sourceMaps: assertSourceMaps as Validator<ValidatedOptions[\"sourceMaps\"]>,\n  sourceMap: assertSourceMaps as Validator<ValidatedOptions[\"sourceMap\"]>,\n  sourceFileName: assertString as Validator<ValidatedOptions[\"sourceFileName\"]>,\n  sourceRoot: assertString as Validator<ValidatedOptions[\"sourceRoot\"]>,\n  parserOpts: assertObject as Validator<ValidatedOptions[\"parserOpts\"]>,\n  generatorOpts: assertObject as Validator<ValidatedOptions[\"generatorOpts\"]>,\n};\nif (!process.env.BABEL_8_BREAKING) {\n  Object.assign(COMMON_VALIDATORS, {\n    getModuleId: assertFunction,\n    moduleRoot: assertString,\n    moduleIds: assertBoolean,\n    moduleId: assertString,\n  });\n}\n\nexport type InputOptions = ValidatedOptions;\n\nexport type ValidatedOptions = {\n  cwd?: string;\n  filename?: string;\n  filenameRelative?: string;\n  babelrc?: boolean;\n  babelrcRoots?: BabelrcSearch;\n  configFile?: ConfigFileSearch;\n  root?: string;\n  rootMode?: RootMode;\n  code?: boolean;\n  ast?: boolean;\n  cloneInputAst?: boolean;\n  inputSourceMap?: RootInputSourceMapOption;\n  envName?: string;\n  caller?: CallerMetadata;\n  extends?: string;\n  env?: EnvSet<ValidatedOptions>;\n  ignore?: IgnoreList;\n  only?: IgnoreList;\n  overrides?: OverridesList;\n  showIgnoredFiles?: boolean;\n  // Generally verify if a given config object should be applied to the given file.\n  test?: ConfigApplicableTest;\n  include?: ConfigApplicableTest;\n  exclude?: ConfigApplicableTest;\n  presets?: PluginList;\n  plugins?: PluginList;\n  passPerPreset?: boolean;\n  assumptions?: {\n    [name: string]: boolean;\n  };\n  // browserslists-related options\n  targets?: TargetsListOrObject;\n  browserslistConfigFile?: ConfigFileSearch;\n  browserslistEnv?: string;\n  // Options for @babel/generator\n  retainLines?: boolean;\n  comments?: boolean;\n  shouldPrintComment?: Function;\n  compact?: CompactOption;\n  minified?: boolean;\n  auxiliaryCommentBefore?: string;\n  auxiliaryCommentAfter?: string;\n  // Parser\n  sourceType?: SourceTypeOption;\n  wrapPluginVisitorMethod?: Function;\n  highlightCode?: boolean;\n  // Sourcemap generation options.\n  sourceMaps?: SourceMapsOption;\n  sourceMap?: SourceMapsOption;\n  sourceFileName?: string;\n  sourceRoot?: string;\n  // Deprecate top level parserOpts\n  parserOpts?: ParserOptions;\n  // Deprecate top level generatorOpts\n  generatorOpts?: GeneratorOptions;\n};\n\nexport type NormalizedOptions = {\n  readonly targets: Targets;\n} & Omit<ValidatedOptions, \"targets\">;\n\nexport type CallerMetadata = {\n  // If 'caller' is specified, require that the name is given for debugging\n  // messages.\n  name: string;\n};\nexport type EnvSet<T> = {\n  [x: string]: T;\n};\nexport type IgnoreItem =\n  | string\n  | RegExp\n  | ((\n      path: string | undefined,\n      context: { dirname: string; caller: CallerMetadata; envName: string },\n    ) => unknown);\nexport type IgnoreList = ReadonlyArray<IgnoreItem>;\n\nexport type PluginOptions = object | void | false;\nexport type PluginTarget = string | object | Function;\nexport type PluginItem =\n  | ConfigItem<PluginAPI>\n  | Plugin\n  | PluginTarget\n  | [PluginTarget, PluginOptions]\n  | [PluginTarget, PluginOptions, string | void];\nexport type PluginList = ReadonlyArray<PluginItem>;\n\nexport type OverridesList = Array<ValidatedOptions>;\nexport type ConfigApplicableTest = IgnoreItem | Array<IgnoreItem>;\n\nexport type ConfigFileSearch = string | boolean;\nexport type BabelrcSearch = boolean | IgnoreItem | IgnoreList;\nexport type SourceMapsOption = boolean | \"inline\" | \"both\";\nexport type SourceTypeOption = \"module\" | \"script\" | \"unambiguous\";\nexport type CompactOption = boolean | \"auto\";\nexport type RootInputSourceMapOption = object | boolean;\nexport type RootMode = \"root\" | \"upward\" | \"upward-optional\";\n\nexport type TargetsListOrObject =\n  | Targets\n  | InputTargets\n  | InputTargets[\"browsers\"];\n\nexport type OptionsSource =\n  | \"arguments\"\n  | \"configfile\"\n  | \"babelrcfile\"\n  | \"extendsfile\"\n  | \"preset\"\n  | \"plugin\";\n\nexport type RootPath = Readonly<{\n  type: \"root\";\n  source: OptionsSource;\n}>;\n\ntype OverridesPath = Readonly<{\n  type: \"overrides\";\n  index: number;\n  parent: RootPath;\n}>;\n\ntype EnvPath = Readonly<{\n  type: \"env\";\n  name: string;\n  parent: RootPath | OverridesPath;\n}>;\n\nexport type NestingPath = RootPath | OverridesPath | EnvPath;\n\nconst knownAssumptions = [\n  \"arrayLikeIsIterable\",\n  \"constantReexports\",\n  \"constantSuper\",\n  \"enumerableModuleMeta\",\n  \"ignoreFunctionLength\",\n  \"ignoreToPrimitiveHint\",\n  \"iterableIsArray\",\n  \"mutableTemplateObject\",\n  \"noClassCalls\",\n  \"noDocumentAll\",\n  \"noIncompleteNsImportDetection\",\n  \"noNewArrows\",\n  \"noUninitializedPrivateFieldAccess\",\n  \"objectRestNoSymbols\",\n  \"privateFieldsAsSymbols\",\n  \"privateFieldsAsProperties\",\n  \"pureGetters\",\n  \"setClassMethods\",\n  \"setComputedProperties\",\n  \"setPublicClassFields\",\n  \"setSpreadProperties\",\n  \"skipForOfIteratorClosing\",\n  \"superIsCallableConstructor\",\n] as const;\nexport type AssumptionName = (typeof knownAssumptions)[number];\nexport const assumptionsNames = new Set(knownAssumptions);\n\nfunction getSource(loc: NestingPath): OptionsSource {\n  return loc.type === \"root\" ? loc.source : getSource(loc.parent);\n}\n\nexport function validate(\n  type: OptionsSource,\n  opts: any,\n  filename?: string,\n): ValidatedOptions {\n  try {\n    return validateNested(\n      {\n        type: \"root\",\n        source: type,\n      },\n      opts,\n    );\n  } catch (error) {\n    const configError = new ConfigError(error.message, filename);\n    // @ts-expect-error TODO: .code is not defined on ConfigError or Error\n    if (error.code) configError.code = error.code;\n    throw configError;\n  }\n}\n\nfunction validateNested(loc: NestingPath, opts: { [key: string]: unknown }) {\n  const type = getSource(loc);\n\n  assertNoDuplicateSourcemap(opts);\n\n  Object.keys(opts).forEach((key: string) => {\n    const optLoc = {\n      type: \"option\",\n      name: key,\n      parent: loc,\n    } as const;\n\n    if (type === \"preset\" && NONPRESET_VALIDATORS[key]) {\n      throw new Error(`${msg(optLoc)} is not allowed in preset options`);\n    }\n    if (type !== \"arguments\" && ROOT_VALIDATORS[key]) {\n      throw new Error(\n        `${msg(optLoc)} is only allowed in root programmatic options`,\n      );\n    }\n    if (\n      type !== \"arguments\" &&\n      type !== \"configfile\" &&\n      BABELRC_VALIDATORS[key]\n    ) {\n      if (type === \"babelrcfile\" || type === \"extendsfile\") {\n        throw new Error(\n          `${msg(\n            optLoc,\n          )} is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, ` +\n            `or babel.config.js/config file options`,\n        );\n      }\n\n      throw new Error(\n        `${msg(\n          optLoc,\n        )} is only allowed in root programmatic options, or babel.config.js/config file options`,\n      );\n    }\n\n    const validator =\n      COMMON_VALIDATORS[key] ||\n      NONPRESET_VALIDATORS[key] ||\n      BABELRC_VALIDATORS[key] ||\n      ROOT_VALIDATORS[key] ||\n      (throwUnknownError as Validator<void>);\n\n    validator(optLoc, opts[key]);\n  });\n\n  return opts;\n}\n\nfunction throwUnknownError(loc: OptionPath) {\n  const key = loc.name;\n\n  if (removed[key]) {\n    const { message, version = 5 } = removed[key];\n\n    throw new Error(\n      `Using removed Babel ${version} option: ${msg(loc)} - ${message}`,\n    );\n  } else {\n    const unknownOptErr = new Error(\n      `Unknown option: ${msg(\n        loc,\n      )}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`,\n    );\n    // @ts-expect-error todo(flow->ts): consider creating something like BabelConfigError with code field in it\n    unknownOptErr.code = \"BABEL_UNKNOWN_OPTION\";\n\n    throw unknownOptErr;\n  }\n}\n\nfunction assertNoDuplicateSourcemap(opts: any): void {\n  if (Object.hasOwn(opts, \"sourceMap\") && Object.hasOwn(opts, \"sourceMaps\")) {\n    throw new Error(\".sourceMap is an alias for .sourceMaps, cannot use both\");\n  }\n}\n\nfunction assertEnvSet(\n  loc: OptionPath,\n  value: unknown,\n): void | EnvSet<ValidatedOptions> {\n  if (loc.parent.type === \"env\") {\n    throw new Error(`${msg(loc)} is not allowed inside of another .env block`);\n  }\n  const parent: RootPath | OverridesPath = loc.parent;\n\n  const obj = assertObject(loc, value);\n  if (obj) {\n    // Validate but don't copy the .env object in order to preserve\n    // object identity for use during config chain processing.\n    for (const envName of Object.keys(obj)) {\n      const env = assertObject(access(loc, envName), obj[envName]);\n      if (!env) continue;\n\n      const envLoc = {\n        type: \"env\",\n        name: envName,\n        parent,\n      } as const;\n      validateNested(envLoc, env);\n    }\n  }\n  return obj;\n}\n\nfunction assertOverridesList(\n  loc: OptionPath,\n  value: unknown[],\n): undefined | OverridesList {\n  if (loc.parent.type === \"env\") {\n    throw new Error(`${msg(loc)} is not allowed inside an .env block`);\n  }\n  if (loc.parent.type === \"overrides\") {\n    throw new Error(`${msg(loc)} is not allowed inside an .overrides block`);\n  }\n  const parent: RootPath = loc.parent;\n\n  const arr = assertArray(loc, value);\n  if (arr) {\n    for (const [index, item] of arr.entries()) {\n      const objLoc = access(loc, index);\n      const env = assertObject(objLoc, item);\n      if (!env) throw new Error(`${msg(objLoc)} must be an object`);\n\n      const overridesLoc = {\n        type: \"overrides\",\n        index,\n        parent,\n      } as const;\n      validateNested(overridesLoc, env);\n    }\n  }\n  return arr as OverridesList;\n}\n\nexport function checkNoUnwrappedItemOptionPairs<API>(\n  items: Array<UnloadedDescriptor<API>>,\n  index: number,\n  type: \"plugin\" | \"preset\",\n  e: Error,\n): void {\n  if (index === 0) return;\n\n  const lastItem = items[index - 1];\n  const thisItem = items[index];\n\n  if (\n    lastItem.file &&\n    lastItem.options === undefined &&\n    typeof thisItem.value === \"object\"\n  ) {\n    e.message +=\n      `\\n- Maybe you meant to use\\n` +\n      `\"${type}s\": [\\n  [\"${lastItem.file.request}\", ${JSON.stringify(\n        thisItem.value,\n        undefined,\n        2,\n      )}]\\n]\\n` +\n      `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;\n  }\n}\n"],"mappings":";;;;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AA+BA,IAAAE,YAAA,GAAAF,OAAA;AAEA,MAAMG,eAA6B,GAAG;EACpCC,GAAG,EAAEC,8BAAkD;EACvDC,IAAI,EAAED,8BAAmD;EACzDE,QAAQ,EAAEC,gCAAyD;EACnEC,UAAU,EAAEC,wCAEX;EAEDC,MAAM,EAAEC,sCAA6D;EACrEC,QAAQ,EAAER,8BAAuD;EACjES,gBAAgB,EAAET,8BAEjB;EACDU,IAAI,EAAEC,+BAAoD;EAC1DC,GAAG,EAAED,+BAAmD;EAExDE,aAAa,EAAEF,+BAA6D;EAE5EG,OAAO,EAAEd;AACX,CAAC;AAED,MAAMe,kBAAgC,GAAG;EACvCC,OAAO,EAAEL,+BAAuD;EAChEM,YAAY,EAAEC;AAGhB,CAAC;AAED,MAAMC,oBAAk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IP,KAAK,KAAK,CAAC,EAAE;EAEjB,MAAMQ,QAAQ,GAAGF,KAAK,CAACN,KAAK,GAAG,CAAC,CAAC;EACjC,MAAMS,QAAQ,GAAGH,KAAK,CAACN,KAAK,CAAC;EAE7B,IACEQ,QAAQ,CAACE,IAAI,IACbF,QAAQ,CAACG,OAAO,KAAKC,SAAS,IAC9B,OAAOH,QAAQ,CAACf,KAAK,KAAK,QAAQ,EAClC;IACAa,CAAC,CAAC7B,OAAO,IACP,8BAA8B,GAC9B,IAAIT,IAAI,cAAcuC,QAAQ,CAACE,IAAI,CAACG,OAAO,MAAMC,IAAI,CAACC,SAAS,CAC7DN,QAAQ,CAACf,KAAK,EACdkB,SAAS,EACT,CACF,CAAC,QAAQ,GACT,iBAAiB3C,IAAI,gEAAgE;EACzF;AACF;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/config/validation/plugins.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_optionAssertions","require","VALIDATORS","name","assertString","manipulateOptions","assertFunction","pre","post","inherits","visitor","assertVisitorMap","parserOverride","generatorOverride","loc","value","obj","assertObject","Object","keys","forEach","prop","assertVisitorHandler","enter","exit","Error","msg","key","handler","validatePluginObject","rootPath","type","source","validator","optLoc","parent","invalidPluginPropertyError","code"],"sources":["../../../src/config/validation/plugins.ts"],"sourcesContent":["import {\n  assertString,\n  assertFunction,\n  assertObject,\n  msg,\n} from \"./option-assertions.ts\";\n\nimport type {\n  ValidatorSet,\n  Validator,\n  OptionPath,\n  RootPath,\n} from \"./option-assertions.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options.ts\";\nimport type { File, PluginAPI, PluginPass } from \"../../index.ts\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n  name: assertString as Validator<PluginObject[\"name\"]>,\n  manipulateOptions: assertFunction as Validator<\n    PluginObject[\"manipulateOptions\"]\n  >,\n  pre: assertFunction as Validator<PluginObject[\"pre\"]>,\n  post: assertFunction as Validator<PluginObject[\"post\"]>,\n  inherits: assertFunction as Validator<PluginObject[\"inherits\"]>,\n  visitor: assertVisitorMap as Validator<PluginObject[\"visitor\"]>,\n\n  parserOverride: assertFunction as Validator<PluginObject[\"parserOverride\"]>,\n  generatorOverride: assertFunction as Validator<\n    PluginObject[\"generatorOverride\"]\n  >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n  const obj = assertObject(loc, value);\n  if (obj) {\n    Object.keys(obj).forEach(prop => {\n      if (prop !== \"_exploded\" && prop !== \"_verified\") {\n        assertVisitorHandler(prop, obj[prop]);\n      }\n    });\n\n    if (obj.enter || obj.exit) {\n      throw new Error(\n        `${msg(\n          loc,\n        )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n      );\n    }\n  }\n  return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n  key: string,\n  value: unknown,\n): asserts value is VisitorHandler {\n  if (value && typeof value === \"object\") {\n    Object.keys(value).forEach((handler: string) => {\n      if (handler !== \"enter\" && handler !== \"exit\") {\n        throw new Error(\n          `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n        );\n      }\n    });\n  } else if (typeof value !== \"function\") {\n    throw new Error(`.visitor[\"${key}\"] must be a function`);\n  }\n}\n\ntype VisitorHandler =\n  | Function\n  | {\n      enter?: Function;\n      exit?: Function;\n    };\n\nexport type PluginObject<S extends PluginPass = PluginPass> = {\n  name?: string;\n  manipulateOptions?: (\n    options: ValidatedOptions,\n    parserOpts: ParserOptions,\n  ) => void;\n  pre?: (this: S, file: File) => void;\n  post?: (this: S, file: File) => void;\n  inherits?: (\n    api: PluginAPI,\n    options: unknown,\n    dirname: string,\n  ) => PluginObject;\n  visitor?: Visitor<S>;\n  parserOverride?: Function;\n  generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n  [key: string]: unknown;\n}): PluginObject {\n  const rootPath: RootPath = {\n    type: \"root\",\n    source: \"plugin\",\n  };\n  Object.keys(obj).forEach((key: string) => {\n    const validator = VALIDATORS[key];\n\n    if (validator) {\n      const optLoc: OptionPath = {\n        type: \"option\",\n        name: key,\n        parent: rootPath,\n      };\n      validator(optLoc, obj[key]);\n    } else {\n      const invalidPluginPropertyError = new Error(\n        `.${key} is not a valid Plugin property`,\n      );\n      // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n      invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n      throw invalidPluginPropertyError;\n    }\n  });\n\n  return obj as any;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAqBA,MAAMC,UAAwB,GAAG;EAC/BC,IAAI,EAAEC,8BAA+C;EACrDC,iBAAiB,EAAEC,gCAElB;EACDC,GAAG,EAAED,gCAAgD;EACrDE,IAAI,EAAEF,gCAAiD;EACvDG,QAAQ,EAAEH,gCAAqD;EAC/DI,OAAO,EAAEC,gBAAsD;EAE/DC,cAAc,EAAEN,gCAA2D;EAC3EO,iBAAiB,EAAEP;AAGrB,CAAC;AAED,SAASK,gBAAgBA,CAACG,GAAe,EAAEC,KAAc,EAAW;EAClE,MAAMC,GAAG,GAAG,IAAAC,8BAAY,EAACH,GAAG,EAAEC,KAAK,CAAC;EACpC,IAAIC,GAAG,EAAE;IACPE,MAAM,CAACC,IAAI,CAACH,GAAG,CAAC,CAACI,OAAO,CAACC,IAAI,IAAI;MAC/B,IAAIA,IAAI,KAAK,WAAW,IAAIA,IAAI,KAAK,WAAW,EAAE;QAChDC,oBAAoB,CAACD,IAAI,EAAEL,GAAG,CAACK,IAAI,CAAC,CAAC;MACvC;IACF,CAAC,CAAC;IAEF,IAAIL,GAAG,CAACO,KAAK,IAAIP,GAAG,CAACQ,IAAI,EAAE;MACzB,MAAM,IAAIC,KAAK,CACb,GAAG,IAAAC,qBAAG,E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assertString","manipulateOptions","assertFunction","pre","post","inherits","visitor","assertVisitorMap","parserOverride","generatorOverride","loc","value","obj","assertObject","Object","keys","forEach","prop","assertVisitorHandler","enter","exit","Error","msg","key","handler","validatePluginObject","rootPath","type","source","validator","optLoc","parent","invalidPluginPropertyError","code"],"sources":["../../../src/config/validation/plugins.ts"],"sourcesContent":["import {\n  assertString,\n  assertFunction,\n  assertObject,\n  msg,\n} from \"./option-assertions.ts\";\n\nimport type {\n  ValidatorSet,\n  Validator,\n  OptionPath,\n  RootPath,\n} from \"./option-assertions.ts\";\nimport type { ParserOptions } from \"@babel/parser\";\nimport type { Visitor } from \"@babel/traverse\";\nimport type { ValidatedOptions } from \"./options.ts\";\nimport type { File, PluginAPI, PluginPass } from \"../../index.ts\";\n\n// Note: The casts here are just meant to be static assertions to make sure\n// that the assertion functions actually assert that the value's type matches\n// the declared types.\nconst VALIDATORS: ValidatorSet = {\n  name: assertString as Validator<PluginObject[\"name\"]>,\n  manipulateOptions: assertFunction as Validator<\n    PluginObject[\"manipulateOptions\"]\n  >,\n  pre: assertFunction as Validator<PluginObject[\"pre\"]>,\n  post: assertFunction as Validator<PluginObject[\"post\"]>,\n  inherits: assertFunction as Validator<PluginObject[\"inherits\"]>,\n  visitor: assertVisitorMap as Validator<PluginObject[\"visitor\"]>,\n\n  parserOverride: assertFunction as Validator<PluginObject[\"parserOverride\"]>,\n  generatorOverride: assertFunction as Validator<\n    PluginObject[\"generatorOverride\"]\n  >,\n};\n\nfunction assertVisitorMap(loc: OptionPath, value: unknown): Visitor {\n  const obj = assertObject(loc, value);\n  if (obj) {\n    Object.keys(obj).forEach(prop => {\n      if (prop !== \"_exploded\" && prop !== \"_verified\") {\n        assertVisitorHandler(prop, obj[prop]);\n      }\n    });\n\n    if (obj.enter || obj.exit) {\n      throw new Error(\n        `${msg(\n          loc,\n        )} cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.`,\n      );\n    }\n  }\n  return obj as Visitor;\n}\n\nfunction assertVisitorHandler(\n  key: string,\n  value: unknown,\n): asserts value is VisitorHandler {\n  if (value && typeof value === \"object\") {\n    Object.keys(value).forEach((handler: string) => {\n      if (handler !== \"enter\" && handler !== \"exit\") {\n        throw new Error(\n          `.visitor[\"${key}\"] may only have .enter and/or .exit handlers.`,\n        );\n      }\n    });\n  } else if (typeof value !== \"function\") {\n    throw new Error(`.visitor[\"${key}\"] must be a function`);\n  }\n}\n\ntype VisitorHandler =\n  | Function\n  | {\n      enter?: Function;\n      exit?: Function;\n    };\n\nexport type PluginObject<S extends PluginPass = PluginPass> = {\n  name?: string;\n  manipulateOptions?: (\n    options: ValidatedOptions,\n    parserOpts: ParserOptions,\n  ) => void;\n  pre?: (this: S, file: File) => void | Promise<void>;\n  post?: (this: S, file: File) => void | Promise<void>;\n  inherits?: (\n    api: PluginAPI,\n    options: unknown,\n    dirname: string,\n  ) => PluginObject;\n  visitor?: Visitor<S>;\n  parserOverride?: Function;\n  generatorOverride?: Function;\n};\n\nexport function validatePluginObject(obj: {\n  [key: string]: unknown;\n}): PluginObject {\n  const rootPath: RootPath = {\n    type: \"root\",\n    source: \"plugin\",\n  };\n  Object.keys(obj).forEach((key: string) => {\n    const validator = VALIDATORS[key];\n\n    if (validator) {\n      const optLoc: OptionPath = {\n        type: \"option\",\n        name: key,\n        parent: rootPath,\n      };\n      validator(optLoc, obj[key]);\n    } else {\n      const invalidPluginPropertyError = new Error(\n        `.${key} is not a valid Plugin property`,\n      );\n      // @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field\n      invalidPluginPropertyError.code = \"BABEL_UNKNOWN_PLUGIN_PROPERTY\";\n      throw invalidPluginPropertyError;\n    }\n  });\n\n  return obj as any;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAqBA,MAAMC,UAAwB,GAAG;EAC/BC,IAAI,EAAEC,8BAA+C;EACrDC,iBAAiB,EAAEC,gCAElB;EACDC,GAAG,EAAED,gCAAgD;EACrDE,IAAI,EA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,EAAE,MAAM;IACZC,MAAM,EAAE;EACV,CAAC;EACDd,MAAM,CAACC,IAAI,CAACH,GAAG,CAAC,CAACI,OAAO,CAAEO,GAAW,IAAK;IACxC,MAAMM,SAAS,GAAG/B,UAAU,CAACyB,GAAG,CAAC;IAEjC,IAAIM,SAAS,EAAE;MACb,MAAMC,MAAkB,GAAG;QACzBH,IAAI,EAAE,QAAQ;QACd5B,IAAI,EAAEwB,GAAG;QACTQ,MAAM,EAAEL;MACV,CAAC;MACDG,SAAS,CAACC,MAAM,EAAElB,GAAG,CAACW,GAAG,CAAC,CAAC;IAC7B,CAAC,MAAM;MACL,MAAMS,0BAA0B,GAAG,IAAIX,KAAK,CAC1C,IAAIE,GAAG,iCACT,CAAC;MAEDS,0BAA0B,CAACC,IAAI,GAAG,+BAA+B;MACjE,MAAMD,0BAA0B;IAClC;EACF,CAAC,CAAC;EAEF,OAAOpB,GAAG;AACZ;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/gensync-utils/async.js

    rd565449 r0c6b92a  
    1616  return data;
    1717}
    18 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
    19 function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
     18function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
     19function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
    2020const runGenerator = _gensync()(function* (item) {
    2121  return yield* item;
  • imaps-frontend/node_modules/@babel/core/lib/gensync-utils/async.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_gensync","data","require","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","runGenerator","gensync","item","isAsync","exports","sync","errback","cb","maybeAsync","message","result","isThenable","Error","async","withKind","_ref","_x","forwardAsync","action","g","kind","adapted","onFirstPause","name","arity","firstPause","completed","waitFor","x","_ref2","_x2","val"],"sources":["../../src/gensync-utils/async.ts"],"sourcesContent":["import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise<T> = T | Promise<T>;\n\nconst runGenerator: {\n  sync<Return>(gen: Handler<Return>): Return;\n  async<Return>(gen: Handler<Return>): Promise<Return>;\n  errback<Return>(gen: Handler<Return>, cb: Callback<Return>): void;\n} = gensync(function* (item: Handler<any>): Handler<any> {\n  return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n  sync: () => false,\n  errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync<Args extends unknown[], Return>(\n  fn: (...args: Args) => Return,\n  message: string,\n): Gensync<Args, Return> {\n  return gensync({\n    sync(...args) {\n      const result = fn.apply(this, args);\n      if (isThenable(result)) throw new Error(message);\n      return result;\n    },\n    async(...args) {\n      return Promise.resolve(fn.apply(this, args));\n    },\n  });\n}\n\nconst withKind = gensync({\n  sync: cb => cb(\"sync\"),\n  async: async cb => cb(\"async\"),\n}) as <T>(cb: (kind: \"sync\" | \"async\") => MaybePromise<T>) => Handler<T>;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n//     yield* forwardAsync(gensyncFn, wrappedFn =>\n//       cache.using(x => {\n//         // Here we don't know about gensync. wrappedFn is a\n//         // normal sync or async function\n//         return wrappedFn(x);\n//       })\n//     )\nexport function forwardAsync<Args extends unknown[], Return>(\n  action: (...args: Args) => Handler<Return>,\n  cb: (\n    adapted: (...args: Args) => MaybePromise<Return>,\n  ) => MaybePromise<Return>,\n): Handler<Return> {\n  const g = gensync(action);\n  return withKind(kind => {\n    const adapted = g[kind];\n    return cb(adapted);\n  });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n  [gen: Handler<unknown>, firstPause: () => void],\n  unknown\n>({\n  name: \"onFirstPause\",\n  arity: 2,\n  sync: function (item) {\n    return runGenerator.sync(item);\n  },\n  errback: function (item, firstPause, cb) {\n    let completed = false;\n\n    runGenerator.errback(item, (err, value) => {\n      completed = true;\n      cb(err, value);\n    });\n\n    if (!completed) {\n      firstPause();\n    }\n  },\n}) as <T>(gen: Handler<T>, firstPause: () => void) => Handler<T>;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n  sync: x => x,\n  async: async x => x,\n}) as <T>(p: T | Promise<T>) => Handler<T>;\n\nexport function isThenable<T = any>(val: any): val is PromiseLike<T> {\n  return (\n    !!val &&\n    (typeof val === \"object\" || typeof val === \"function\") &&\n    !!val.then &&\n    typeof val.then === \"function\"\n  );\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;A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AAEuB,UAAU,EAAElB,EAAE,EAAE;IACvC,IAAImB,SAAS,GAAG,KAAK;IAErB1B,YAAY,CAACM,OAAO,CAACJ,IAAI,EAAE,CAACJ,GAAG,EAAEX,KAAK,KAAK;MACzCuC,SAAS,GAAG,IAAI;MAChBnB,EAAE,CAACT,GAAG,EAAEX,KAAK,CAAC;IAChB,CAAC,CAAC;IAEF,IAAI,CAACuC,SAAS,EAAE;MACdD,UAAU,CAAC,CAAC;IACd;EACF;AACF,CAAC,CAA+D;AAGzD,MAAME,OAAO,GAAAvB,OAAA,CAAAuB,OAAA,GAAG1B,SAAMA,CAAC,CAAC;EAC7BI,IAAI,EAAEuB,CAAC,IAAIA,CAAC;EACZf,KAAK;IAAA,IAAAgB,KAAA,GAAArC,iBAAA,CAAE,WAAMoC,CAAC;MAAA,OAAIA,CAAC;IAAA;IAAA,gBAAAf,MAAAiB,GAAA;MAAA,OAAAD,KAAA,CAAAhC,KAAA,OAAAD,SAAA;IAAA;EAAA;AACrB,CAAC,CAAyC;AAEnC,SAASe,UAAUA,CAAUoB,GAAQ,EAAyB;EACnE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACxC,IAAI,IACV,OAAOwC,GAAG,CAACxC,IAAI,KAAK,UAAU;AAElC;AAAC","ignoreList":[]}
     1{"version":3,"names":["_gensync","data","require","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","runGenerator","gensync","item","isAsync","exports","sync","errback","cb","maybeAsync","fn","message","args","result","isThenable","Error","async","withKind","_ref","_x","forwardAsync","action","g","kind","adapted","onFirstPause","name","arity","firstPause","completed","err","waitFor","x","_ref2","_x2","val"],"sources":["../../src/gensync-utils/async.ts"],"sourcesContent":["import gensync, { type Gensync, type Handler, type Callback } from \"gensync\";\n\ntype MaybePromise<T> = T | Promise<T>;\n\nconst runGenerator: {\n  sync<Return>(gen: Handler<Return>): Return;\n  async<Return>(gen: Handler<Return>): Promise<Return>;\n  errback<Return>(gen: Handler<Return>, cb: Callback<Return>): void;\n} = gensync(function* (item: Handler<any>): Handler<any> {\n  return yield* item;\n});\n\n// This Gensync returns true if the current execution context is\n// asynchronous, otherwise it returns false.\nexport const isAsync = gensync({\n  sync: () => false,\n  errback: cb => cb(null, true),\n});\n\n// This function wraps any functions (which could be either synchronous or\n// asynchronous) with a Gensync. If the wrapped function returns a promise\n// but the current execution context is synchronous, it will throw the\n// provided error.\n// This is used to handle user-provided functions which could be asynchronous.\nexport function maybeAsync<Args extends unknown[], Return>(\n  fn: (...args: Args) => Return,\n  message: string,\n): Gensync<Args, Return> {\n  return gensync({\n    sync(...args) {\n      const result = fn.apply(this, args);\n      if (isThenable(result)) throw new Error(message);\n      return result;\n    },\n    async(...args) {\n      return Promise.resolve(fn.apply(this, args));\n    },\n  });\n}\n\nconst withKind = gensync({\n  sync: cb => cb(\"sync\"),\n  async: async cb => cb(\"async\"),\n}) as <T>(cb: (kind: \"sync\" | \"async\") => MaybePromise<T>) => Handler<T>;\n\n// This function wraps a generator (or a Gensync) into another function which,\n// when called, will run the provided generator in a sync or async way, depending\n// on the execution context where this forwardAsync function is called.\n// This is useful, for example, when passing a callback to a function which isn't\n// aware of gensync, but it only knows about synchronous and asynchronous functions.\n// An example is cache.using, which being exposed to the user must be as simple as\n// possible:\n//     yield* forwardAsync(gensyncFn, wrappedFn =>\n//       cache.using(x => {\n//         // Here we don't know about gensync. wrappedFn is a\n//         // normal sync or async function\n//         return wrappedFn(x);\n//       })\n//     )\nexport function forwardAsync<Args extends unknown[], Return>(\n  action: (...args: Args) => Handler<Return>,\n  cb: (\n    adapted: (...args: Args) => MaybePromise<Return>,\n  ) => MaybePromise<Return>,\n): Handler<Return> {\n  const g = gensync(action);\n  return withKind(kind => {\n    const adapted = g[kind];\n    return cb(adapted);\n  });\n}\n\n// If the given generator is executed asynchronously, the first time that it\n// is paused (i.e. When it yields a gensync generator which can't be run\n// synchronously), call the \"firstPause\" callback.\nexport const onFirstPause = gensync<\n  [gen: Handler<unknown>, firstPause: () => void],\n  unknown\n>({\n  name: \"onFirstPause\",\n  arity: 2,\n  sync: function (item) {\n    return runGenerator.sync(item);\n  },\n  errback: function (item, firstPause, cb) {\n    let completed = false;\n\n    runGenerator.errback(item, (err, value) => {\n      completed = true;\n      cb(err, value);\n    });\n\n    if (!completed) {\n      firstPause();\n    }\n  },\n}) as <T>(gen: Handler<T>, firstPause: () => void) => Handler<T>;\n\n// Wait for the given promise to be resolved\nexport const waitFor = gensync({\n  sync: x => x,\n  async: async x => x,\n}) as <T>(p: T | Promise<T>) => Handler<T>;\n\nexport function isThenable<T = any>(val: any): val is PromiseLike<T> {\n  return (\n    !!val &&\n    (typeof val === \"object\" || typeof val === \"function\") &&\n    !!val.then &&\n    typeof val.then === \"function\"\n  );\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,SAAAE,mBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,cAAAC,CAAA,GAAAP,CAAA,CAAAK,CAAA,EAAAC,CAAA,GAAAE,CAAA,GAAAD,CAAA,CAAAE,KAAA,WAAAT,CAAA,gBAAAE,CAAA,CAAAF,CAAA,KAAAO,CAAA,CAAAG,IAAA,GAAAT,CAAA,CAAAO,CAAA,IAAAG,OAAA,CAAAC,OAAA,CAAAJ,CAAA,EAAAK,IAAA,CAAAV,CAAA,EAAAC,CAAA;AAAA,SAAAU,kBAAAd,CAAA,6BAAAC,CAAA,SAAAC,CAAA,GAAAa,SAAA,aAAAJ,OAAA,WAAAR,CAAA,EAAAC,CAAA,QAAAC,CA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WAAMoC,CAAC;MAAA,OAAIA,CAAC;IAAA;IAAA,gBAAnBhB,KAAKA,CAAAkB,GAAA;MAAA,OAAAD,KAAA,CAAAnC,KAAA,OAAAD,SAAA;IAAA;EAAA;AACP,CAAC,CAAyC;AAEnC,SAASiB,UAAUA,CAAUqB,GAAQ,EAAyB;EACnE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACxC,IAAI,IACV,OAAOwC,GAAG,CAACxC,IAAI,KAAK,UAAU;AAElC;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/index.js

    rd565449 r0c6b92a  
    9595  }
    9696});
    97 Object.defineProperty(exports, "resolvePlugin", {
    98   enumerable: true,
    99   get: function () {
    100     return _index.resolvePlugin;
    101   }
    102 });
    103 Object.defineProperty(exports, "resolvePreset", {
    104   enumerable: true,
    105   get: function () {
    106     return _index.resolvePreset;
    107   }
    108 });
     97exports.resolvePreset = exports.resolvePlugin = void 0;
    10998Object.defineProperty((0, exports), "template", {
    11099  enumerable: true,
     
    182171var _file = require("./transformation/file/file.js");
    183172var _buildExternalHelpers = require("./tools/build-external-helpers.js");
    184 var _index = require("./config/files/index.js");
     173var resolvers = require("./config/files/index.js");
    185174var _environment = require("./config/helpers/environment.js");
    186175function _types() {
     
    225214var thisFile = require("./index.js");
    226215;
    227 const version = exports.version = "7.25.2";
     216const version = exports.version = "7.26.0";
     217const resolvePlugin = (name, dirname) => resolvers.resolvePlugin(name, dirname, false).filepath;
     218exports.resolvePlugin = resolvePlugin;
     219const resolvePreset = (name, dirname) => resolvers.resolvePreset(name, dirname, false).filepath;
     220exports.resolvePreset = resolvePreset;
    228221const DEFAULT_EXTENSIONS = exports.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
    229222;
  • imaps-frontend/node_modules/@babel/core/lib/index.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_file","require","_buildExternalHelpers","_index","_environment","_types","data","Object","defineProperty","exports","enumerable","get","_parser","_traverse","_template","_index2","_transform","_transformFile","_transformAst","_parse","thisFile","version","DEFAULT_EXTENSIONS","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error","types","traverse","tokTypes","template"],"sources":["../src/index.ts"],"sourcesContent":["if (!process.env.IS_PUBLISH && !USE_ESM && process.env.BABEL_8_BREAKING) {\n  throw new Error(\n    \"BABEL_8_BREAKING is only supported in ESM. Please run `make use-esm`.\",\n  );\n}\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file.ts\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass.ts\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers.ts\";\nexport { resolvePlugin, resolvePreset } from \"./config/files/index.ts\";\n\nexport { getEnv } from \"./config/helpers/environment.ts\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\n// rollup-plugin-dts assumes that all re-exported types are also valid values\n// Visitor is only a type, so we need to use this workaround to prevent\n// rollup-plugin-dts from breaking it.\n// TODO: Figure out how to fix this upstream.\nexport type { NodePath, Scope } from \"@babel/traverse\";\nexport type Visitor<S = unknown> = import(\"@babel/traverse\").Visitor<S>;\n\nexport {\n  createConfigItem,\n  createConfigItemSync,\n  createConfigItemAsync,\n} from \"./config/index.ts\";\n\nexport {\n  loadPartialConfig,\n  loadPartialConfigSync,\n  loadPartialConfigAsync,\n  loadOptions,\n  loadOptionsAsync,\n} from \"./config/index.ts\";\nimport { loadOptionsSync } from \"./config/index.ts\";\nexport { loadOptionsSync };\n\nexport type {\n  CallerMetadata,\n  InputOptions,\n  PluginAPI,\n  PluginObject,\n  PresetAPI,\n  PresetObject,\n  ConfigItem,\n} from \"./config/index.ts\";\n\nexport {\n  transform,\n  transformSync,\n  transformAsync,\n  type FileResult,\n} from \"./transform.ts\";\nexport {\n  transformFile,\n  transformFileSync,\n  transformFileAsync,\n} from \"./transform-file.ts\";\nexport {\n  transformFromAst,\n  transformFromAstSync,\n  transformFromAstAsync,\n} from \"./transform-ast.ts\";\nexport { parse, parseSync, parseAsync } from \"./parse.ts\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n  \".js\",\n  \".jsx\",\n  \".es6\",\n  \".es\",\n  \".mjs\",\n  \".cjs\",\n] as const);\n\nimport Module from \"module\";\nimport * as thisFile from \"./index.ts\";\nif (USE_ESM && !IS_STANDALONE) {\n  // Pass this module to the CJS proxy, so that it can be synchronously accessed.\n  const cjsProxy = Module.createRequire(import.meta.url)(\"../cjs-proxy.cjs\");\n  cjsProxy[\"__ initialize @babel/core cjs proxy __\"] = thisFile;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n  // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n  // eslint-disable-next-line no-restricted-globals\n  exports.OptionManager = class OptionManager {\n    init(opts: unknown) {\n      return loadOptionsSync(opts);\n    }\n  };\n\n  // eslint-disable-next-line no-restricted-globals\n  exports.Plugin = function Plugin(alias: string) {\n    throw new Error(\n      `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n    );\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,KAAA,GA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C;IAC1CC,IAAIA,CAACC,IAAa,EAAE;MAClB,OAAO,IAAAC,uBAAe,EAACD,IAAI,CAAC;IAC9B;EACF,CAAC;EAGDjB,OAAO,CAACmB,MAAM,GAAG,SAASA,MAAMA,CAACC,KAAa,EAAE;IAC9C,MAAM,IAAIC,KAAK,CACb,QAAQD,KAAK,kEACf,CAAC;EACH,CAAC;AACH;AAAC,MAAApB,OAAA,CAAAsB,KAAA,GAAAtB,OAAA,CAAAuB,QAAA,GAAAvB,OAAA,CAAAwB,QAAA,GAAAxB,OAAA,CAAAyB,QAAA","ignoreList":[]}
     1{"version":3,"names":["_file","require","_buildExternalHelpers","resolvers","_environment","_types","data","Object","defineProperty","exports","enumerable","get","_parser","_traverse","_template","_index2","_transform","_transformFile","_transformAst","_parse","thisFile","version","resolvePlugin","name","dirname","filepath","resolvePreset","DEFAULT_EXTENSIONS","freeze","OptionManager","init","opts","loadOptionsSync","Plugin","alias","Error","types","traverse","tokTypes","template"],"sources":["../src/index.ts"],"sourcesContent":["if (!process.env.IS_PUBLISH && !USE_ESM && process.env.BABEL_8_BREAKING) {\n  throw new Error(\n    \"BABEL_8_BREAKING is only supported in ESM. Please run `make use-esm`.\",\n  );\n}\n\nexport const version = PACKAGE_JSON.version;\n\nexport { default as File } from \"./transformation/file/file.ts\";\nexport type { default as PluginPass } from \"./transformation/plugin-pass.ts\";\nexport { default as buildExternalHelpers } from \"./tools/build-external-helpers.ts\";\n\nimport * as resolvers from \"./config/files/index.ts\";\n// For backwards-compatibility, we expose the resolvers\n// with the old API.\nexport const resolvePlugin = (name: string, dirname: string) =>\n  resolvers.resolvePlugin(name, dirname, false).filepath;\nexport const resolvePreset = (name: string, dirname: string) =>\n  resolvers.resolvePreset(name, dirname, false).filepath;\n\nexport { getEnv } from \"./config/helpers/environment.ts\";\n\n// NOTE: Lazy re-exports aren't detected by the Node.js CJS-ESM interop.\n// These are handled by pluginInjectNodeReexportsHints in our babel.config.js\n// so that they can work well.\nexport * as types from \"@babel/types\";\nexport { tokTypes } from \"@babel/parser\";\nexport { default as traverse } from \"@babel/traverse\";\nexport { default as template } from \"@babel/template\";\n\n// rollup-plugin-dts assumes that all re-exported types are also valid values\n// Visitor is only a type, so we need to use this workaround to prevent\n// rollup-plugin-dts from breaking it.\n// TODO: Figure out how to fix this upstream.\nexport type { NodePath, Scope } from \"@babel/traverse\";\nexport type Visitor<S = unknown> = import(\"@babel/traverse\").Visitor<S>;\n\nexport {\n  createConfigItem,\n  createConfigItemAsync,\n  createConfigItemSync,\n} from \"./config/index.ts\";\n\nexport {\n  loadOptions,\n  loadOptionsAsync,\n  loadPartialConfig,\n  loadPartialConfigAsync,\n  loadPartialConfigSync,\n} from \"./config/index.ts\";\nimport { loadOptionsSync } from \"./config/index.ts\";\nexport { loadOptionsSync };\n\nexport type {\n  CallerMetadata,\n  ConfigItem,\n  InputOptions,\n  PluginAPI,\n  PluginObject,\n  PresetAPI,\n  PresetObject,\n} from \"./config/index.ts\";\n\nexport {\n  type FileResult,\n  transform,\n  transformAsync,\n  transformSync,\n} from \"./transform.ts\";\nexport {\n  transformFile,\n  transformFileAsync,\n  transformFileSync,\n} from \"./transform-file.ts\";\nexport {\n  transformFromAst,\n  transformFromAstAsync,\n  transformFromAstSync,\n} from \"./transform-ast.ts\";\nexport { parse, parseAsync, parseSync } from \"./parse.ts\";\n\n/**\n * Recommended set of compilable extensions. Not used in @babel/core directly, but meant as\n * as an easy source for tooling making use of @babel/core.\n */\nexport const DEFAULT_EXTENSIONS = Object.freeze([\n  \".js\",\n  \".jsx\",\n  \".es6\",\n  \".es\",\n  \".mjs\",\n  \".cjs\",\n] as const);\n\nimport Module from \"module\";\nimport * as thisFile from \"./index.ts\";\nif (USE_ESM && !IS_STANDALONE) {\n  // Pass this module to the CJS proxy, so that it can be synchronously accessed.\n  const cjsProxy = Module.createRequire(import.meta.url)(\"../cjs-proxy.cjs\");\n  cjsProxy[\"__ initialize @babel/core cjs proxy __\"] = thisFile;\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n  // For easier backward-compatibility, provide an API like the one we exposed in Babel 6.\n  // eslint-disable-next-line no-restricted-globals\n  exports.OptionManager = class OptionManager {\n    init(opts: any) {\n      return loadOptionsSync(opts);\n    }\n  };\n\n  // eslint-disable-next-line no-restricted-globals\n  exports.Plugin = function Plugin(alias: string) {\n    throw new Error(\n      `The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`,\n    );\n  };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAQA,IAAAG,YAAA,GAAAH,OAAA;AAAyD,SAAAI,OAAA;EAAA,MAAAC,IAAA,GAAAL,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAAC,MAAA,CAAAC,cAAA,KAAAC,OAAA;EAAAC,UAAA;EAAAC,GAAA,WAAAA,CAAA;IAAA,OAAAN,MAAA;EAAA;AAAA;AAMzD,SAAAO,QAAA;EAAA,MAAAN,IAAA,GAAAL,OAAA;EAAAW,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAL,OAAA;EAAAY,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,UAAA;EAAA,MAAAR,IAAA,GAAAL,OAAA;EAAAa,SAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAA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ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/parser/index.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse, type File as ParseResult } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper.ts\";\nimport type { PluginPasses } from \"../config/index.ts\";\n\nexport type { ParseResult };\n\nexport default function* parser(\n  pluginPasses: PluginPasses,\n  { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n  code: string,\n): Handler<ParseResult> {\n  try {\n    const results = [];\n    for (const plugins of pluginPasses) {\n      for (const plugin of plugins) {\n        const { parserOverride } = plugin;\n        if (parserOverride) {\n          const ast = parserOverride(code, parserOpts, parse);\n\n          if (ast !== undefined) results.push(ast);\n        }\n      }\n    }\n\n    if (results.length === 0) {\n      return parse(code, parserOpts);\n    } else if (results.length === 1) {\n      // @ts-expect-error - If we want to allow async parsers\n      yield* [];\n      if (typeof results[0].then === \"function\") {\n        throw new Error(\n          `You appear to be using an async parser plugin, ` +\n            `which your current version of Babel does not support. ` +\n            `If you're using a published plugin, you may need to upgrade ` +\n            `your @babel/core version.`,\n        );\n      }\n      return results[0];\n    }\n    // TODO: Add an error code\n    throw new Error(\"More than one plugin attempted to override parsing.\");\n  } catch (err) {\n    if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n      err.message +=\n        \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n        \"or sourceType:unambiguous in your Babel config for this file.\";\n      // err.code will be changed to BABEL_PARSE_ERROR later.\n    }\n\n    const { loc, missingPlugin } = err;\n    if (loc) {\n      const codeFrame = codeFrameColumns(\n        code,\n        {\n          start: {\n            line: loc.line,\n            column: loc.column + 1,\n          },\n        },\n        {\n          highlightCode,\n        },\n      );\n      if (missingPlugin) {\n        err.message =\n          `${filename}: ` +\n          generateMissingPluginMessage(\n            missingPlugin[0],\n            loc,\n            codeFrame,\n            filename,\n          );\n      } else {\n        err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n      }\n      err.code = \"BABEL_PARSE_ERROR\";\n    }\n    throw err;\n  }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAG,oBAAA,GAAAF,OAAA;AAKe,UAAUG,MAAMA,CAC7BC,YAA0B,EAC1B;EAAEC,UAAU;EAAEC,aAAa,GAAG,IAAI;EAAEC,QAAQ,GAAG;AAAe,CAAC,EAC/DC,IAAY,EACU;EACtB,IAAI;IACF,MAAMC,OAAO,GAAG,EAAE;IAClB,KAAK,MAAMC,OAAO,IAAIN,YAAY,EAAE;MAClC,KAAK,MAAMO,MAAM,IAAID,OAAO,EAAE;QAC5B,MAAM;UAAEE;QAAe,CAAC,GAAGD,MAAM;QACjC,IAAIC,cAAc,EAAE;UAClB,MAAMC,GAAG,GAAGD,cAAc,CAACJ,IAAI,EAAEH,UAAU,EAAES,eAAK,CAAC;UAEnD,IAAID,GAAG,KAAKE,SAAS,EAAEN,OAAO,CAACO,IAAI,CAACH,GAAG,CAAC;QAC1C;MACF;IACF;IAEA,IAAIJ,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MACxB,OAAO,IAAAH,eAAK,EAACN,IAAI,EAAEH,UAAU,CAAC;IAChC,CAAC,MAAM,IAAII,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MAE/B,OAAO,EAAE;MACT,IAAI,OAAOR,OAAO,CAAC,CAAC,CAAC,CAACS,IAAI,KAAK,UAAU,EAAE;QACzC,MAAM,IAAIC,KAAK,CACb,iDAAiD,GAC/C,wDAAwD,GACxD,8DAA8D,GAC9D,2BACJ,CAAC;MACH;MACA,OAAOV,OAAO,CAAC,CAAC,CAAC;IACnB;IAEA,MAAM,IAAIU,KAAK,CAAC,qDAAqD,CAAC;EACxE,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACZ,IAAI,KAAK,yCAAyC,EAAE;MAC1DY,GAAG,CAACC,OAAO,IACT,uEAAuE,GACvE,+DAA+D;IAEnE;IAEA,MAAM;MAAEC,GAAG;MAAEC;IAAc,CAAC,GAAGH,GAAG;IAClC,IAAIE,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCjB,IAAI,EACJ;QACEkB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEtB;MACF,CACF,CAAC;MACD,IAAIiB,aAAa,EAAE;QACjBH,GAAG,CAACC,OAAO,GACT,GAAGd,QAAQ,IAAI,GACf,IAAAsB,4BAA4B,EAC1BN,aAAa,CAAC,CAAC,CAAC,EAChBD,GAAG,EACHE,SAAS,EACTjB,QACF,CAAC;MACL,CAAC,MAAM;QACLa,GAAG,CAACC,OAAO,GAAG,GAAGd,QAAQ,KAAKa,GAAG,CAACC,OAAO,MAAM,GAAGG,SAAS;MAC7D;MACAJ,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC","ignoreList":[]}
     1{"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse, type File as ParseResult } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper.ts\";\nimport type { PluginPasses } from \"../config/index.ts\";\n\nexport type { ParseResult };\n\nexport default function* parser(\n  pluginPasses: PluginPasses,\n  { parserOpts, highlightCode = true, filename = \"unknown\" }: any,\n  code: string,\n): Handler<ParseResult> {\n  try {\n    const results = [];\n    for (const plugins of pluginPasses) {\n      for (const plugin of plugins) {\n        const { parserOverride } = plugin;\n        if (parserOverride) {\n          const ast = parserOverride(code, parserOpts, parse);\n\n          if (ast !== undefined) results.push(ast);\n        }\n      }\n    }\n\n    if (results.length === 0) {\n      return parse(code, parserOpts);\n    } else if (results.length === 1) {\n      // If we want to allow async parsers\n      yield* [];\n      if (typeof results[0].then === \"function\") {\n        throw new Error(\n          `You appear to be using an async parser plugin, ` +\n            `which your current version of Babel does not support. ` +\n            `If you're using a published plugin, you may need to upgrade ` +\n            `your @babel/core version.`,\n        );\n      }\n      return results[0];\n    }\n    // TODO: Add an error code\n    throw new Error(\"More than one plugin attempted to override parsing.\");\n  } catch (err) {\n    if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n      err.message +=\n        \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n        \"or sourceType:unambiguous in your Babel config for this file.\";\n      // err.code will be changed to BABEL_PARSE_ERROR later.\n    }\n\n    const { loc, missingPlugin } = err;\n    if (loc) {\n      const codeFrame = codeFrameColumns(\n        code,\n        {\n          start: {\n            line: loc.line,\n            column: loc.column + 1,\n          },\n        },\n        {\n          highlightCode,\n        },\n      );\n      if (missingPlugin) {\n        err.message =\n          `${filename}: ` +\n          generateMissingPluginMessage(\n            missingPlugin[0],\n            loc,\n            codeFrame,\n            filename,\n          );\n      } else {\n        err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n      }\n      err.code = \"BABEL_PARSE_ERROR\";\n    }\n    throw err;\n  }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAG,oBAAA,GAAAF,OAAA;AAKe,UAAUG,MAAMA,CAC7BC,YAA0B,EAC1B;EAAEC,UAAU;EAAEC,aAAa,GAAG,IAAI;EAAEC,QAAQ,GAAG;AAAe,CAAC,EAC/DC,IAAY,EACU;EACtB,IAAI;IACF,MAAMC,OAAO,GAAG,EAAE;IAClB,KAAK,MAAMC,OAAO,IAAIN,YAAY,EAAE;MAClC,KAAK,MAAMO,MAAM,IAAID,OAAO,EAAE;QAC5B,MAAM;UAAEE;QAAe,CAAC,GAAGD,MAAM;QACjC,IAAIC,cAAc,EAAE;UAClB,MAAMC,GAAG,GAAGD,cAAc,CAACJ,IAAI,EAAEH,UAAU,EAAES,eAAK,CAAC;UAEnD,IAAID,GAAG,KAAKE,SAAS,EAAEN,OAAO,CAACO,IAAI,CAACH,GAAG,CAAC;QAC1C;MACF;IACF;IAEA,IAAIJ,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MACxB,OAAO,IAAAH,eAAK,EAACN,IAAI,EAAEH,UAAU,CAAC;IAChC,CAAC,MAAM,IAAII,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MAE/B,OAAO,EAAE;MACT,IAAI,OAAOR,OAAO,CAAC,CAAC,CAAC,CAACS,IAAI,KAAK,UAAU,EAAE;QACzC,MAAM,IAAIC,KAAK,CACb,iDAAiD,GAC/C,wDAAwD,GACxD,8DAA8D,GAC9D,2BACJ,CAAC;MACH;MACA,OAAOV,OAAO,CAAC,CAAC,CAAC;IACnB;IAEA,MAAM,IAAIU,KAAK,CAAC,qDAAqD,CAAC;EACxE,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACZ,IAAI,KAAK,yCAAyC,EAAE;MAC1DY,GAAG,CAACC,OAAO,IACT,uEAAuE,GACvE,+DAA+D;IAEnE;IAEA,MAAM;MAAEC,GAAG;MAAEC;IAAc,CAAC,GAAGH,GAAG;IAClC,IAAIE,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCjB,IAAI,EACJ;QACEkB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEtB;MACF,CACF,CAAC;MACD,IAAIiB,aAAa,EAAE;QACjBH,GAAG,CAACC,OAAO,GACT,GAAGd,QAAQ,IAAI,GACf,IAAAsB,4BAA4B,EAC1BN,aAAa,CAAC,CAAC,CAAC,EAChBD,GAAG,EACHE,SAAS,EACTjB,QACF,CAAC;MACL,CAAC,MAAM;QACLa,GAAG,CAACC,OAAO,GAAG,GAAGd,QAAQ,KAAKa,GAAG,CAACC,OAAO,MAAM,GAAGG,SAAS;MAC7D;MACAJ,GAAG,CAACZ,IAAI,GAAG,mBAAmB;IAChC;IACA,MAAMY,GAAG;EACX;AACF;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js

    rd565449 r0c6b92a  
    8888    }
    8989  },
    90   importAttributes: {
    91     syntax: {
    92       name: "@babel/plugin-syntax-import-attributes",
    93       url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes"
    94     }
    95   },
    9690  pipelineOperator: {
    9791    syntax: {
     
    203197        name: "@babel/plugin-syntax-import-assertions",
    204198        url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions"
     199      }
     200    },
     201    importAttributes: {
     202      syntax: {
     203        name: "@babel/plugin-syntax-import-attributes",
     204        url: "https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes"
    205205      }
    206206    },
  • imaps-frontend/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["pluginNameMap","asyncDoExpressions","syntax","name","url","decimal","decorators","transform","doExpressions","exportDefaultFrom","flow","functionBind","functionSent","jsx","importAttributes","pipelineOperator","recordAndTuple","throwExpressions","typescript","Object","assign","asyncGenerators","classProperties","classPrivateProperties","classPrivateMethods","classStaticBlock","dynamicImport","exportNamespaceFrom","importAssertions","importMeta","logicalAssignment","moduleStringNames","numericSeparator","nullishCoalescingOperator","objectRestSpread","optionalCatchBinding","optionalChaining","privateIn","regexpUnicodeSets","getNameURLCombination","generateMissingPluginMessage","missingPluginName","loc","codeFrame","filename","helpMessage","line","column","pluginInfo","syntaxPlugin","transformPlugin","syntaxPluginInfo","transformPluginInfo","sectionType","startsWith","msgFilename"],"sources":["../../../src/parser/util/missing-plugin-helper.ts"],"sourcesContent":["const pluginNameMap: Record<\n  string,\n  Partial<Record<\"syntax\" | \"transform\", Record<\"name\" | \"url\", string>>>\n> = {\n  asyncDoExpressions: {\n    syntax: {\n      name: \"@babel/plugin-syntax-async-do-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n    },\n  },\n  decimal: {\n    syntax: {\n      name: \"@babel/plugin-syntax-decimal\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n    },\n  },\n  decorators: {\n    syntax: {\n      name: \"@babel/plugin-syntax-decorators\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-decorators\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n    },\n  },\n  doExpressions: {\n    syntax: {\n      name: \"@babel/plugin-syntax-do-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-do-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n    },\n  },\n  exportDefaultFrom: {\n    syntax: {\n      name: \"@babel/plugin-syntax-export-default-from\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-export-default-from\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n    },\n  },\n  flow: {\n    syntax: {\n      name: \"@babel/plugin-syntax-flow\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n    },\n    transform: {\n      name: \"@babel/preset-flow\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n    },\n  },\n  functionBind: {\n    syntax: {\n      name: \"@babel/plugin-syntax-function-bind\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-function-bind\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n    },\n  },\n  functionSent: {\n    syntax: {\n      name: \"@babel/plugin-syntax-function-sent\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-function-sent\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n    },\n  },\n  jsx: {\n    syntax: {\n      name: \"@babel/plugin-syntax-jsx\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n    },\n    transform: {\n      name: \"@babel/preset-react\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n    },\n  },\n  importAttributes: {\n    syntax: {\n      name: \"@babel/plugin-syntax-import-attributes\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes\",\n    },\n  },\n  pipelineOperator: {\n    syntax: {\n      name: \"@babel/plugin-syntax-pipeline-operator\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-pipeline-operator\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n    },\n  },\n  recordAndTuple: {\n    syntax: {\n      name: \"@babel/plugin-syntax-record-and-tuple\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n    },\n  },\n  throwExpressions: {\n    syntax: {\n      name: \"@babel/plugin-syntax-throw-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-throw-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n    },\n  },\n  typescript: {\n    syntax: {\n      name: \"@babel/plugin-syntax-typescript\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n    },\n    transform: {\n      name: \"@babel/preset-typescript\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n    },\n  },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n  // TODO: This plugins are now supported by default by @babel/parser.\n  Object.assign(pluginNameMap, {\n    asyncGenerators: {\n      syntax: {\n        name: \"@babel/plugin-syntax-async-generators\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-async-generator-functions\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions\",\n      },\n    },\n    classProperties: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n      },\n    },\n    classPrivateProperties: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n      },\n    },\n    classPrivateMethods: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-private-methods\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods\",\n      },\n    },\n    classStaticBlock: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-static-block\",\n        url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-class-static-block\",\n        url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block\",\n      },\n    },\n    dynamicImport: {\n      syntax: {\n        name: \"@babel/plugin-syntax-dynamic-import\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n      },\n    },\n    exportNamespaceFrom: {\n      syntax: {\n        name: \"@babel/plugin-syntax-export-namespace-from\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-export-namespace-from\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from\",\n      },\n    },\n    // Will be removed\n    importAssertions: {\n      syntax: {\n        name: \"@babel/plugin-syntax-import-assertions\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n      },\n    },\n    importMeta: {\n      syntax: {\n        name: \"@babel/plugin-syntax-import-meta\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n      },\n    },\n    logicalAssignment: {\n      syntax: {\n        name: \"@babel/plugin-syntax-logical-assignment-operators\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-logical-assignment-operators\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators\",\n      },\n    },\n    moduleStringNames: {\n      syntax: {\n        name: \"@babel/plugin-syntax-module-string-names\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n      },\n    },\n    numericSeparator: {\n      syntax: {\n        name: \"@babel/plugin-syntax-numeric-separator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-numeric-separator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator\",\n      },\n    },\n    nullishCoalescingOperator: {\n      syntax: {\n        name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-nullish-coalescing-operator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n      },\n    },\n    objectRestSpread: {\n      syntax: {\n        name: \"@babel/plugin-syntax-object-rest-spread\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-object-rest-spread\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread\",\n      },\n    },\n    optionalCatchBinding: {\n      syntax: {\n        name: \"@babel/plugin-syntax-optional-catch-binding\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-optional-catch-binding\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding\",\n      },\n    },\n    optionalChaining: {\n      syntax: {\n        name: \"@babel/plugin-syntax-optional-chaining\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-optional-chaining\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining\",\n      },\n    },\n    privateIn: {\n      syntax: {\n        name: \"@babel/plugin-syntax-private-property-in-object\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-private-property-in-object\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object\",\n      },\n    },\n    regexpUnicodeSets: {\n      syntax: {\n        name: \"@babel/plugin-syntax-unicode-sets-regex\",\n        url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-unicode-sets-regex\",\n        url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n      },\n    },\n  });\n}\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n  `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n  missingPluginName: string,\n  loc: {\n    line: number;\n    column: number;\n  },\n  codeFrame: string,\n  filename: string,\n): string {\n  let helpMessage =\n    `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n    `(${loc.line}:${loc.column + 1}):\\n\\n` +\n    codeFrame;\n  const pluginInfo = pluginNameMap[missingPluginName];\n  if (pluginInfo) {\n    const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n    if (syntaxPlugin) {\n      const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n      if (transformPlugin) {\n        const transformPluginInfo = getNameURLCombination(transformPlugin);\n        const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n          ? \"plugins\"\n          : \"presets\";\n        helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n      } else {\n        helpMessage +=\n          `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n          `to enable parsing.`;\n      }\n    }\n  }\n\n  const msgFilename =\n    filename === \"unknown\" ? \"<name of the input file>\" : filename;\n  helpMessage += `\n\nIf you already added the plugin for this syntax to your config, it's possible that your config \\\nisn't being loaded.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} <your build command>\nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.\n`;\n  return helpMessage;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAGL,GAAG;EACFC,kBAAkB,EAAE;IAClBC,MAAM,EAAE;MACNC,IAAI,EAAE,2CAA2C;MACjDC,GAAG,EAAE;IACP;EACF,CAAC;EACDC,OAAO,EAAE;IACPH,MAAM,EAAE;MACNC,IAAI,EAAE,8BAA8B;MACpCC,GAAG,EAAE;IACP;EACF,CAAC;EACDE,UAAU,EAAE;IACVJ,MAAM,EAAE;MACNC,IAAI,EAAE,iCAAiC;MACvCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE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,GAAGD,IAAI,KAAKC,GAAG,GAAG;AAWL,SAASoC,4BAA4BA,CAClDC,iBAAyB,EACzBC,GAGC,EACDC,SAAiB,EACjBC,QAAgB,EACR;EACR,IAAIC,WAAW,GACb,wCAAwCJ,iBAAiB,4BAA4B,GACrF,IAAIC,GAAG,CAACI,IAAI,IAAIJ,GAAG,CAACK,MAAM,GAAG,CAAC,QAAQ,GACtCJ,SAAS;EACX,MAAMK,UAAU,GAAGhD,aAAa,CAACyC,iBAAiB,CAAC;EACnD,IAAIO,UAAU,EAAE;IACd,MAAM;MAAE9C,MAAM,EAAE+C,YAAY;MAAE1C,SAAS,EAAE2C;IAAgB,CAAC,GAAGF,UAAU;IACvE,IAAIC,YAAY,EAAE;MAChB,MAAME,gBAAgB,GAAGZ,qBAAqB,CAACU,YAAY,CAAC;MAC5D,IAAIC,eAAe,EAAE;QACnB,MAAME,mBAAmB,GAAGb,qBAAqB,CAACW,eAAe,CAAC;QAClE,MAAMG,WAAW,GAAGH,eAAe,CAAC/C,IAAI,CAACmD,UAAU,CAAC,eAAe,CAAC,GAChE,SAAS,GACT,SAAS;QACbT,WAAW,IAAI,WAAWO,mBAAmB,YAAYC,WAAW;AAC5E,qCAAqCF,gBAAgB,8CAA8C;MAC7F,CAAC,MAAM;QACLN,WAAW,IACT,WAAWM,gBAAgB,iDAAiD,GAC5E,oBAAoB;MACxB;IACF;EACF;EAEA,MAAMI,WAAW,GACfX,QAAQ,KAAK,SAAS,GAAG,0BAA0B,GAAGA,QAAQ;EAChEC,WAAW,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA,wCAAwCU,WAAW;AACnD;AACA,CAAC;EACC,OAAOV,WAAW;AACpB;AAAC","ignoreList":[]}
     1{"version":3,"names":["pluginNameMap","asyncDoExpressions","syntax","name","url","decimal","decorators","transform","doExpressions","exportDefaultFrom","flow","functionBind","functionSent","jsx","pipelineOperator","recordAndTuple","throwExpressions","typescript","Object","assign","asyncGenerators","classProperties","classPrivateProperties","classPrivateMethods","classStaticBlock","dynamicImport","exportNamespaceFrom","importAssertions","importAttributes","importMeta","logicalAssignment","moduleStringNames","numericSeparator","nullishCoalescingOperator","objectRestSpread","optionalCatchBinding","optionalChaining","privateIn","regexpUnicodeSets","getNameURLCombination","generateMissingPluginMessage","missingPluginName","loc","codeFrame","filename","helpMessage","line","column","pluginInfo","syntaxPlugin","transformPlugin","syntaxPluginInfo","transformPluginInfo","sectionType","startsWith","msgFilename"],"sources":["../../../src/parser/util/missing-plugin-helper.ts"],"sourcesContent":["const pluginNameMap: Record<\n  string,\n  Partial<Record<\"syntax\" | \"transform\", Record<\"name\" | \"url\", string>>>\n> = {\n  asyncDoExpressions: {\n    syntax: {\n      name: \"@babel/plugin-syntax-async-do-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions\",\n    },\n  },\n  decimal: {\n    syntax: {\n      name: \"@babel/plugin-syntax-decimal\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal\",\n    },\n  },\n  decorators: {\n    syntax: {\n      name: \"@babel/plugin-syntax-decorators\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-decorators\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators\",\n    },\n  },\n  doExpressions: {\n    syntax: {\n      name: \"@babel/plugin-syntax-do-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-do-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions\",\n    },\n  },\n  exportDefaultFrom: {\n    syntax: {\n      name: \"@babel/plugin-syntax-export-default-from\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-export-default-from\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from\",\n    },\n  },\n  flow: {\n    syntax: {\n      name: \"@babel/plugin-syntax-flow\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow\",\n    },\n    transform: {\n      name: \"@babel/preset-flow\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-flow\",\n    },\n  },\n  functionBind: {\n    syntax: {\n      name: \"@babel/plugin-syntax-function-bind\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-function-bind\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind\",\n    },\n  },\n  functionSent: {\n    syntax: {\n      name: \"@babel/plugin-syntax-function-sent\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-function-sent\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent\",\n    },\n  },\n  jsx: {\n    syntax: {\n      name: \"@babel/plugin-syntax-jsx\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx\",\n    },\n    transform: {\n      name: \"@babel/preset-react\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-react\",\n    },\n  },\n  pipelineOperator: {\n    syntax: {\n      name: \"@babel/plugin-syntax-pipeline-operator\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-pipeline-operator\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator\",\n    },\n  },\n  recordAndTuple: {\n    syntax: {\n      name: \"@babel/plugin-syntax-record-and-tuple\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple\",\n    },\n  },\n  throwExpressions: {\n    syntax: {\n      name: \"@babel/plugin-syntax-throw-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions\",\n    },\n    transform: {\n      name: \"@babel/plugin-proposal-throw-expressions\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions\",\n    },\n  },\n  typescript: {\n    syntax: {\n      name: \"@babel/plugin-syntax-typescript\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript\",\n    },\n    transform: {\n      name: \"@babel/preset-typescript\",\n      url: \"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript\",\n    },\n  },\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n  // TODO: This plugins are now supported by default by @babel/parser.\n  Object.assign(pluginNameMap, {\n    asyncGenerators: {\n      syntax: {\n        name: \"@babel/plugin-syntax-async-generators\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-async-generator-functions\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions\",\n      },\n    },\n    classProperties: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n      },\n    },\n    classPrivateProperties: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties\",\n      },\n    },\n    classPrivateMethods: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-properties\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-private-methods\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods\",\n      },\n    },\n    classStaticBlock: {\n      syntax: {\n        name: \"@babel/plugin-syntax-class-static-block\",\n        url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-class-static-block\",\n        url: \"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block\",\n      },\n    },\n    dynamicImport: {\n      syntax: {\n        name: \"@babel/plugin-syntax-dynamic-import\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import\",\n      },\n    },\n    exportNamespaceFrom: {\n      syntax: {\n        name: \"@babel/plugin-syntax-export-namespace-from\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-export-namespace-from\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from\",\n      },\n    },\n    // Will be removed\n    importAssertions: {\n      syntax: {\n        name: \"@babel/plugin-syntax-import-assertions\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions\",\n      },\n    },\n    importAttributes: {\n      syntax: {\n        name: \"@babel/plugin-syntax-import-attributes\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes\",\n      },\n    },\n    importMeta: {\n      syntax: {\n        name: \"@babel/plugin-syntax-import-meta\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta\",\n      },\n    },\n    logicalAssignment: {\n      syntax: {\n        name: \"@babel/plugin-syntax-logical-assignment-operators\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-logical-assignment-operators\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators\",\n      },\n    },\n    moduleStringNames: {\n      syntax: {\n        name: \"@babel/plugin-syntax-module-string-names\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names\",\n      },\n    },\n    numericSeparator: {\n      syntax: {\n        name: \"@babel/plugin-syntax-numeric-separator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-numeric-separator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator\",\n      },\n    },\n    nullishCoalescingOperator: {\n      syntax: {\n        name: \"@babel/plugin-syntax-nullish-coalescing-operator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-nullish-coalescing-operator\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator\",\n      },\n    },\n    objectRestSpread: {\n      syntax: {\n        name: \"@babel/plugin-syntax-object-rest-spread\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-object-rest-spread\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread\",\n      },\n    },\n    optionalCatchBinding: {\n      syntax: {\n        name: \"@babel/plugin-syntax-optional-catch-binding\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-optional-catch-binding\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding\",\n      },\n    },\n    optionalChaining: {\n      syntax: {\n        name: \"@babel/plugin-syntax-optional-chaining\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-optional-chaining\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining\",\n      },\n    },\n    privateIn: {\n      syntax: {\n        name: \"@babel/plugin-syntax-private-property-in-object\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-private-property-in-object\",\n        url: \"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object\",\n      },\n    },\n    regexpUnicodeSets: {\n      syntax: {\n        name: \"@babel/plugin-syntax-unicode-sets-regex\",\n        url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md\",\n      },\n      transform: {\n        name: \"@babel/plugin-transform-unicode-sets-regex\",\n        url: \"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md\",\n      },\n    },\n  });\n}\n\nconst getNameURLCombination = ({ name, url }: { name: string; url: string }) =>\n  `${name} (${url})`;\n\n/*\nReturns a string of the format:\nSupport for the experimental syntax [@babel/parser plugin name] isn't currently enabled ([loc]):\n\n[code frame]\n\nAdd [npm package name] ([url]) to the 'plugins' section of your Babel config\nto enable [parsing|transformation].\n*/\nexport default function generateMissingPluginMessage(\n  missingPluginName: string,\n  loc: {\n    line: number;\n    column: number;\n  },\n  codeFrame: string,\n  filename: string,\n): string {\n  let helpMessage =\n    `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` +\n    `(${loc.line}:${loc.column + 1}):\\n\\n` +\n    codeFrame;\n  const pluginInfo = pluginNameMap[missingPluginName];\n  if (pluginInfo) {\n    const { syntax: syntaxPlugin, transform: transformPlugin } = pluginInfo;\n    if (syntaxPlugin) {\n      const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);\n      if (transformPlugin) {\n        const transformPluginInfo = getNameURLCombination(transformPlugin);\n        const sectionType = transformPlugin.name.startsWith(\"@babel/plugin\")\n          ? \"plugins\"\n          : \"presets\";\n        helpMessage += `\\n\\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;\n      } else {\n        helpMessage +=\n          `\\n\\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` +\n          `to enable parsing.`;\n      }\n    }\n  }\n\n  const msgFilename =\n    filename === \"unknown\" ? \"<name of the input file>\" : filename;\n  helpMessage += `\n\nIf you already added the plugin for this syntax to your config, it's possible that your config \\\nisn't being loaded.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded \\\nconfiguration:\n\\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${msgFilename} <your build command>\nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.\n`;\n  return helpMessage;\n}\n"],"mappings":";;;;;;AAAA,MAAMA,aAGL,GAAG;EACFC,kBAAkB,EAAE;IAClBC,MAAM,EAAE;MACNC,IAAI,EAAE,2CAA2C;MACjDC,GAAG,EAAE;IACP;EACF,CAAC;EACDC,OAAO,EAAE;IACPH,MAAM,EAAE;MACNC,IAAI,EAAE,8BAA8B;MACpCC,GAAG,EAAE;IACP;EACF,CAAC;EACDE,UAAU,EAAE;IACVJ,MAAM,EAAE;MACNC,IAAI,EAAE,iCAAiC;MACvCC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,mCAAmC;MACzCC,GAAG,EAAE;IACP;EACF,CAAC;EACDI,aAAa,EAAE;IACbN,MAAM,EAAE;MACNC,IAAI,EAAE,qCAAqC;MAC3CC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,uCAAuC;MAC7CC,GAAG,EAAE;IACP;EACF,CAAC;EACDK,iBAAiB,EAAE;IACjBP,MAAM,EAAE;MACNC,IAAI,EAAE,0CAA0C;MAChDC,GAAG,EAAE;IACP,CAAC;IACDG,SAAS,EAAE;MACTJ,IAAI,EAAE,4CAA4C;MAClDC,GAAG,EAAE;IACP;EACF,CAAC;EACDM,IAAI,EAAE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,IAAIC,YAAY,EAAE;MAChB,MAAME,gBAAgB,GAAGZ,qBAAqB,CAACU,YAAY,CAAC;MAC5D,IAAIC,eAAe,EAAE;QACnB,MAAME,mBAAmB,GAAGb,qBAAqB,CAACW,eAAe,CAAC;QAClE,MAAMG,WAAW,GAAGH,eAAe,CAAC/C,IAAI,CAACmD,UAAU,CAAC,eAAe,CAAC,GAChE,SAAS,GACT,SAAS;QACbT,WAAW,IAAI,WAAWO,mBAAmB,YAAYC,WAAW;AAC5E,qCAAqCF,gBAAgB,8CAA8C;MAC7F,CAAC,MAAM;QACLN,WAAW,IACT,WAAWM,gBAAgB,iDAAiD,GAC5E,oBAAoB;MACxB;IACF;EACF;EAEA,MAAMI,WAAW,GACfX,QAAQ,KAAK,SAAS,GAAG,0BAA0B,GAAGA,QAAQ;EAChEC,WAAW,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA,wCAAwCU,WAAW;AACnD;AACA,CAAC;EACC,OAAOV,WAAW;AACpB;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/transformation/index.js

    rd565449 r0c6b92a  
    1818var _generate = require("./file/generate.js");
    1919var _deepArray = require("../config/helpers/deep-array.js");
     20var _async = require("../gensync-utils/async.js");
    2021function* run(config, code, ast) {
    2122  const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast);
     
    5859}
    5960function* transformFile(file, pluginPasses) {
     61  const async = yield* (0, _async.isAsync)();
    6062  for (const pluginPairs of pluginPasses) {
    6163    const passPairs = [];
     
    6365    const visitors = [];
    6466    for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) {
    65       const pass = new _pluginPass.default(file, plugin.key, plugin.options);
     67      const pass = new _pluginPass.default(file, plugin.key, plugin.options, async);
    6668      passPairs.push([plugin, pass]);
    6769      passes.push(pass);
     
    6971    }
    7072    for (const [plugin, pass] of passPairs) {
    71       const fn = plugin.pre;
    72       if (fn) {
    73         const result = fn.call(pass, file);
    74         yield* [];
    75         if (isThenable(result)) {
    76           throw new Error(`You appear to be using an plugin with an async .pre, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
    77         }
     73      if (plugin.pre) {
     74        const fn = (0, _async.maybeAsync)(plugin.pre, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
     75        yield* fn.call(pass, file);
    7876      }
    7977    }
     
    8381    }
    8482    for (const [plugin, pass] of passPairs) {
    85       const fn = plugin.post;
    86       if (fn) {
    87         const result = fn.call(pass, file);
    88         yield* [];
    89         if (isThenable(result)) {
    90           throw new Error(`You appear to be using an plugin with an async .post, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
    91         }
     83      if (plugin.post) {
     84        const fn = (0, _async.maybeAsync)(plugin.post, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
     85        yield* fn.call(pass, file);
    9286      }
    9387    }
    9488  }
    9589}
    96 function isThenable(val) {
    97   return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
    98 }
    99900 && 0;
    10091
  • imaps-frontend/node_modules/@babel/core/lib/transformation/index.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["_traverse","data","require","_pluginPass","_blockHoistPlugin","_normalizeOpts","_normalizeFile","_generate","_deepArray","run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","_opts$filename","message","filename","outputCode","outputMap","generateCode","_opts$filename2","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","fn","pre","result","call","isThenable","Error","traverse","merge","wrapPluginVisitorMethod","scope","post","val","then"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\nimport type { GeneratorResult } from \"@babel/generator\";\n\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config/index.ts\";\n\nimport PluginPass from \"./plugin-pass.ts\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin.ts\";\nimport normalizeOptions from \"./normalize-opts.ts\";\nimport normalizeFile from \"./normalize-file.ts\";\n\nimport generateCode from \"./file/generate.ts\";\nimport type File from \"./file/file.ts\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array.ts\";\n\nexport type FileResultCallback = {\n  (err: Error, file: null): void;\n  (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n  metadata: { [key: string]: any };\n  options: { [key: string]: any };\n  ast: t.File | null;\n  code: string | null;\n  map: GeneratorResult[\"map\"] | null;\n  sourceType: \"script\" | \"module\";\n  externalDependencies: Set<string>;\n};\n\nexport function* run(\n  config: ResolvedConfig,\n  code: string,\n  ast?: t.File | t.Program | null,\n): Handler<FileResult> {\n  const file = yield* normalizeFile(\n    config.passes,\n    normalizeOptions(config),\n    code,\n    ast,\n  );\n\n  const opts = file.opts;\n  try {\n    yield* transformFile(file, config.passes);\n  } catch (e) {\n    e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n    if (!e.code) {\n      e.code = \"BABEL_TRANSFORM_ERROR\";\n    }\n    throw e;\n  }\n\n  let outputCode, outputMap;\n  try {\n    if (opts.code !== false) {\n      ({ outputCode, outputMap } = generateCode(config.passes, file));\n    }\n  } catch (e) {\n    e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n    if (!e.code) {\n      e.code = \"BABEL_GENERATE_ERROR\";\n    }\n    throw e;\n  }\n\n  return {\n    metadata: file.metadata,\n    options: opts,\n    ast: opts.ast === true ? file.ast : null,\n    code: outputCode === undefined ? null : outputCode,\n    map: outputMap === undefined ? null : outputMap,\n    sourceType: file.ast.program.sourceType,\n    externalDependencies: flattenToSet(config.externalDependencies),\n  };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler<void> {\n  for (const pluginPairs of pluginPasses) {\n    const passPairs: [Plugin, PluginPass][] = [];\n    const passes = [];\n    const visitors = [];\n\n    for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n      const pass = new PluginPass(file, plugin.key, plugin.options);\n\n      passPairs.push([plugin, pass]);\n      passes.push(pass);\n      visitors.push(plugin.visitor);\n    }\n\n    for (const [plugin, pass] of passPairs) {\n      const fn = plugin.pre;\n      if (fn) {\n        // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n        const result = fn.call(pass, file);\n\n        // @ts-expect-error - If we want to support async .pre\n        yield* [];\n\n        if (isThenable(result)) {\n          throw new Error(\n            `You appear to be using an plugin with an async .pre, ` +\n              `which your current version of Babel does not support. ` +\n              `If you're using a published plugin, you may need to upgrade ` +\n              `your @babel/core version.`,\n          );\n        }\n      }\n    }\n\n    // merge all plugin visitors into a single visitor\n    const visitor = traverse.visitors.merge(\n      visitors,\n      passes,\n      file.opts.wrapPluginVisitorMethod,\n    );\n    if (process.env.BABEL_8_BREAKING) {\n      traverse(file.ast.program, visitor, file.scope, null, file.path, true);\n    } else {\n      traverse(file.ast, visitor, file.scope);\n    }\n\n    for (const [plugin, pass] of passPairs) {\n      const fn = plugin.post;\n      if (fn) {\n        // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression\n        const result = fn.call(pass, file);\n\n        // @ts-expect-error - If we want to support async .post\n        yield* [];\n\n        if (isThenable(result)) {\n          throw new Error(\n            `You appear to be using an plugin with an async .post, ` +\n              `which your current version of Babel does not support. ` +\n              `If you're using a published plugin, you may need to upgrade ` +\n              `your @babel/core version.`,\n          );\n        }\n      }\n    }\n  }\n}\n\nfunction isThenable<T extends PromiseLike<any>>(val: any): val is T {\n  return (\n    !!val &&\n    (typeof val === \"object\" || typeof val === \"function\") &&\n    !!val.then &&\n    typeof val.then === \"function\"\n  );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,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U,EAAE,GAAGR,MAAM,CAACS,GAAG;MACrB,IAAID,EAAE,EAAE;QAEN,MAAME,MAAM,GAAGF,EAAE,CAACG,IAAI,CAACR,IAAI,EAAE7B,IAAI,CAAC;QAGlC,OAAO,EAAE;QAET,IAAIsC,UAAU,CAACF,MAAM,CAAC,EAAE;UACtB,MAAM,IAAIG,KAAK,CACb,uDAAuD,GACrD,wDAAwD,GACxD,8DAA8D,GAC9D,2BACJ,CAAC;QACH;MACF;IACF;IAGA,MAAMN,OAAO,GAAGO,mBAAQ,CAACf,QAAQ,CAACgB,KAAK,CACrChB,QAAQ,EACRvB,MAAM,EACNF,IAAI,CAACI,IAAI,CAACsC,uBACZ,CAAC;IAGM;MACL,IAAAF,mBAAQ,EAACxC,IAAI,CAACD,GAAG,EAAEkC,OAAO,EAAEjC,IAAI,CAAC2C,KAAK,CAAC;IACzC;IAEA,KAAK,MAAM,CAACjB,MAAM,EAAEG,IAAI,CAAC,IAAIL,SAAS,EAAE;MACtC,MAAMU,EAAE,GAAGR,MAAM,CAACkB,IAAI;MACtB,IAAIV,EAAE,EAAE;QAEN,MAAME,MAAM,GAAGF,EAAE,CAACG,IAAI,CAACR,IAAI,EAAE7B,IAAI,CAAC;QAGlC,OAAO,EAAE;QAET,IAAIsC,UAAU,CAACF,MAAM,CAAC,EAAE;UACtB,MAAM,IAAIG,KAAK,CACb,wDAAwD,GACtD,wDAAwD,GACxD,8DAA8D,GAC9D,2BACJ,CAAC;QACH;MACF;IACF;EACF;AACF;AAEA,SAASD,UAAUA,CAA6BO,GAAQ,EAAY;EAClE,OACE,CAAC,CAACA,GAAG,KACJ,OAAOA,GAAG,KAAK,QAAQ,IAAI,OAAOA,GAAG,KAAK,UAAU,CAAC,IACtD,CAAC,CAACA,GAAG,CAACC,IAAI,IACV,OAAOD,GAAG,CAACC,IAAI,KAAK,UAAU;AAElC;AAAC","ignoreList":[]}
     1{"version":3,"names":["_traverse","data","require","_pluginPass","_blockHoistPlugin","_normalizeOpts","_normalizeFile","_generate","_deepArray","_async","run","config","code","ast","file","normalizeFile","passes","normalizeOptions","opts","transformFile","e","_opts$filename","message","filename","outputCode","outputMap","generateCode","_opts$filename2","metadata","options","undefined","map","sourceType","program","externalDependencies","flattenToSet","pluginPasses","async","isAsync","pluginPairs","passPairs","visitors","plugin","concat","loadBlockHoistPlugin","pass","PluginPass","key","push","visitor","pre","fn","maybeAsync","call","traverse","merge","wrapPluginVisitorMethod","scope","post"],"sources":["../../src/transformation/index.ts"],"sourcesContent":["import traverse from \"@babel/traverse\";\nimport type * as t from \"@babel/types\";\nimport type { GeneratorResult } from \"@babel/generator\";\n\nimport type { Handler } from \"gensync\";\n\nimport type { ResolvedConfig, Plugin, PluginPasses } from \"../config/index.ts\";\n\nimport PluginPass from \"./plugin-pass.ts\";\nimport loadBlockHoistPlugin from \"./block-hoist-plugin.ts\";\nimport normalizeOptions from \"./normalize-opts.ts\";\nimport normalizeFile from \"./normalize-file.ts\";\n\nimport generateCode from \"./file/generate.ts\";\nimport type File from \"./file/file.ts\";\n\nimport { flattenToSet } from \"../config/helpers/deep-array.ts\";\nimport { isAsync, maybeAsync } from \"../gensync-utils/async.ts\";\n\nexport type FileResultCallback = {\n  (err: Error, file: null): void;\n  (err: null, file: FileResult | null): void;\n};\n\nexport type FileResult = {\n  metadata: { [key: string]: any };\n  options: { [key: string]: any };\n  ast: t.File | null;\n  code: string | null;\n  map: GeneratorResult[\"map\"] | null;\n  sourceType: \"script\" | \"module\";\n  externalDependencies: Set<string>;\n};\n\nexport function* run(\n  config: ResolvedConfig,\n  code: string,\n  ast?: t.File | t.Program | null,\n): Handler<FileResult> {\n  const file = yield* normalizeFile(\n    config.passes,\n    normalizeOptions(config),\n    code,\n    ast,\n  );\n\n  const opts = file.opts;\n  try {\n    yield* transformFile(file, config.passes);\n  } catch (e) {\n    e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n    if (!e.code) {\n      e.code = \"BABEL_TRANSFORM_ERROR\";\n    }\n    throw e;\n  }\n\n  let outputCode, outputMap;\n  try {\n    if (opts.code !== false) {\n      ({ outputCode, outputMap } = generateCode(config.passes, file));\n    }\n  } catch (e) {\n    e.message = `${opts.filename ?? \"unknown file\"}: ${e.message}`;\n    if (!e.code) {\n      e.code = \"BABEL_GENERATE_ERROR\";\n    }\n    throw e;\n  }\n\n  return {\n    metadata: file.metadata,\n    options: opts,\n    ast: opts.ast === true ? file.ast : null,\n    code: outputCode === undefined ? null : outputCode,\n    map: outputMap === undefined ? null : outputMap,\n    sourceType: file.ast.program.sourceType,\n    externalDependencies: flattenToSet(config.externalDependencies),\n  };\n}\n\nfunction* transformFile(file: File, pluginPasses: PluginPasses): Handler<void> {\n  const async = yield* isAsync();\n\n  for (const pluginPairs of pluginPasses) {\n    const passPairs: [Plugin, PluginPass][] = [];\n    const passes = [];\n    const visitors = [];\n\n    for (const plugin of pluginPairs.concat([loadBlockHoistPlugin()])) {\n      const pass = new PluginPass(file, plugin.key, plugin.options, async);\n\n      passPairs.push([plugin, pass]);\n      passes.push(pass);\n      visitors.push(plugin.visitor);\n    }\n\n    for (const [plugin, pass] of passPairs) {\n      if (plugin.pre) {\n        const fn = maybeAsync(\n          plugin.pre,\n          `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n        );\n\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        yield* fn.call(pass, file);\n      }\n    }\n\n    // merge all plugin visitors into a single visitor\n    const visitor = traverse.visitors.merge(\n      visitors,\n      passes,\n      file.opts.wrapPluginVisitorMethod,\n    );\n    if (process.env.BABEL_8_BREAKING) {\n      traverse(file.ast.program, visitor, file.scope, null, file.path, true);\n    } else {\n      traverse(file.ast, visitor, file.scope);\n    }\n\n    for (const [plugin, pass] of passPairs) {\n      if (plugin.post) {\n        const fn = maybeAsync(\n          plugin.post,\n          `You appear to be using an async plugin/preset, but Babel has been called synchronously`,\n        );\n\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        yield* fn.call(pass, file);\n      }\n    }\n  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I,CAAC,CAACN,MAAM,EAAEG,IAAI,CAAC,CAAC;MAC9B7B,MAAM,CAACgC,IAAI,CAACH,IAAI,CAAC;MACjBJ,QAAQ,CAACO,IAAI,CAACN,MAAM,CAACO,OAAO,CAAC;IAC/B;IAEA,KAAK,MAAM,CAACP,MAAM,EAAEG,IAAI,CAAC,IAAIL,SAAS,EAAE;MACtC,IAAIE,MAAM,CAACQ,GAAG,EAAE;QACd,MAAMC,EAAE,GAAG,IAAAC,iBAAU,EACnBV,MAAM,CAACQ,GAAG,EACV,wFACF,CAAC;QAGD,OAAOC,EAAE,CAACE,IAAI,CAACR,IAAI,EAAE/B,IAAI,CAAC;MAC5B;IACF;IAGA,MAAMmC,OAAO,GAAGK,mBAAQ,CAACb,QAAQ,CAACc,KAAK,CACrCd,QAAQ,EACRzB,MAAM,EACNF,IAAI,CAACI,IAAI,CAACsC,uBACZ,CAAC;IAGM;MACL,IAAAF,mBAAQ,EAACxC,IAAI,CAACD,GAAG,EAAEoC,OAAO,EAAEnC,IAAI,CAAC2C,KAAK,CAAC;IACzC;IAEA,KAAK,MAAM,CAACf,MAAM,EAAEG,IAAI,CAAC,IAAIL,SAAS,EAAE;MACtC,IAAIE,MAAM,CAACgB,IAAI,EAAE;QACf,MAAMP,EAAE,GAAG,IAAAC,iBAAU,EACnBV,MAAM,CAACgB,IAAI,EACX,wFACF,CAAC;QAGD,OAAOP,EAAE,CAACE,IAAI,CAACR,IAAI,EAAE/B,IAAI,CAAC;MAC5B;IACF;EACF;AACF;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/lib/transformation/plugin-pass.js

    rd565449 r0c6b92a  
    66exports.default = void 0;
    77class PluginPass {
    8   constructor(file, key, options) {
     8  constructor(file, key, options, isAsync) {
    99    this._map = new Map();
    1010    this.key = void 0;
     
    1313    this.cwd = void 0;
    1414    this.filename = void 0;
     15    this.isAsync = void 0;
    1516    this.key = key;
    1617    this.file = file;
     
    1819    this.cwd = file.opts.cwd;
    1920    this.filename = file.opts.filename;
     21    this.isAsync = isAsync;
    2022  }
    2123  set(key, val) {
  • imaps-frontend/node_modules/@babel/core/lib/transformation/plugin-pass.js.map

    rd565449 r0c6b92a  
    1 {"version":3,"names":["PluginPass","constructor","file","key","options","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass<Options = object> {\n  _map: Map<unknown, unknown> = new Map();\n  key: string | undefined | null;\n  file: File;\n  opts: Partial<Options>;\n\n  // The working directory that Babel's programmatic options are loaded\n  // relative to.\n  cwd: string;\n\n  // The absolute path of the file being compiled.\n  filename: string | void;\n\n  constructor(file: File, key?: string | null, options?: Options) {\n    this.key = key;\n    this.file = file;\n    this.opts = options || {};\n    this.cwd = file.opts.cwd;\n    this.filename = file.opts.filename;\n  }\n\n  set(key: unknown, val: unknown) {\n    this._map.set(key, val);\n  }\n\n  get(key: unknown): any {\n    return this._map.get(key);\n  }\n\n  availableHelper(name: string, versionRange?: string | null) {\n    return this.file.availableHelper(name, versionRange);\n  }\n\n  addHelper(name: string) {\n    return this.file.addHelper(name);\n  }\n\n  buildCodeFrameError(\n    node: t.Node | undefined | null,\n    msg: string,\n    _Error?: typeof Error,\n  ) {\n    return this.file.buildCodeFrameError(node, msg, _Error);\n  }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n  (PluginPass as any).prototype.getModuleName = function getModuleName(\n    this: PluginPass,\n  ): string | undefined {\n    // @ts-expect-error only exists in Babel 7\n    return this.file.getModuleName();\n  };\n  (PluginPass as any).prototype.addImport = function addImport(\n    this: PluginPass,\n  ): void {\n    // @ts-expect-error only exists in Babel 7\n    this.file.addImport();\n  };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAmB;EAahDC,WAAWA,CAACC,IAAU,EAAEC,G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AC;EACAxB,UAAU,CAASuB,SAAS,CAACE,SAAS,GAAG,SAASA,SAASA,CAAA,EAEpD;IAEN,IAAI,CAACvB,IAAI,CAACuB,SAAS,CAAC,CAAC;EACvB,CAAC;AACH;AAAC","ignoreList":[]}
     1{"version":3,"names":["PluginPass","constructor","file","key","options","isAsync","_map","Map","opts","cwd","filename","set","val","get","availableHelper","name","versionRange","addHelper","buildCodeFrameError","node","msg","_Error","exports","default","prototype","getModuleName","addImport"],"sources":["../../src/transformation/plugin-pass.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type File from \"./file/file.ts\";\n\nexport default class PluginPass<Options = object> {\n  _map: Map<unknown, unknown> = new Map();\n  key: string | undefined | null;\n  file: File;\n  opts: Partial<Options>;\n\n  /**\n   * The working directory that Babel's programmatic options are loaded\n   * relative to.\n   */\n  cwd: string;\n\n  /** The absolute path of the file being compiled. */\n  filename: string | void;\n\n  /**\n   * Is Babel executed in async mode or not.\n   */\n  isAsync: boolean;\n\n  constructor(\n    file: File,\n    key: string | null,\n    options: Options | undefined,\n    isAsync: boolean,\n  ) {\n    this.key = key;\n    this.file = file;\n    this.opts = options || {};\n    this.cwd = file.opts.cwd;\n    this.filename = file.opts.filename;\n    this.isAsync = isAsync;\n  }\n\n  set(key: unknown, val: unknown) {\n    this._map.set(key, val);\n  }\n\n  get(key: unknown): any {\n    return this._map.get(key);\n  }\n\n  availableHelper(name: string, versionRange?: string | null) {\n    return this.file.availableHelper(name, versionRange);\n  }\n\n  addHelper(name: string) {\n    return this.file.addHelper(name);\n  }\n\n  buildCodeFrameError(\n    node: t.Node | undefined | null,\n    msg: string,\n    _Error?: typeof Error,\n  ) {\n    return this.file.buildCodeFrameError(node, msg, _Error);\n  }\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n  (PluginPass as any).prototype.getModuleName = function getModuleName(\n    this: PluginPass,\n  ): string | undefined {\n    // @ts-expect-error only exists in Babel 7\n    return this.file.getModuleName();\n  };\n  (PluginPass as any).prototype.addImport = function addImport(\n    this: PluginPass,\n  ): void {\n    // @ts-expect-error only exists in Babel 7\n    this.file.addImport();\n  };\n}\n"],"mappings":";;;;;;AAGe,MAAMA,UAAU,CAAmB;EAoBhDC,WAAWA,CACTC,IAAU,EACVC,GAAkB,EAClBC,OAA4B,EAC5BC,OAAgB,EAChB;IAAA,KAxBFC,IAAI,GAA0B,IAAIC,GAAG,CAAC,CAAC;IAAA,KACvCJ,GAAG;IAAA,KACHD,IAAI;IAAA,KACJM,IAAI;IAAA,KAMJC,GAAG;IAAA,KAGHC,QAAQ;IAAA,KAKRL,OAAO;IAQL,IAAI,CAACF,GAAG,GAAGA,GAAG;IACd,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACM,IAAI,GAAGJ,OAAO,IAAI,CAAC,CAAC;IACzB,IAAI,CAACK,GAAG,GAAGP,IAAI,CAACM,IAAI,CAACC,GAAG;IACxB,IAAI,CAACC,QAAQ,GAAGR,IAAI,CAACM,IAAI,CAACE,QAAQ;IAClC,IAAI,CAACL,OAAO,GAAGA,OAAO;EACxB;EAEAM,GAAGA,CAACR,GAAY,EAAES,GAAY,EAAE;IAC9B,IAAI,CAACN,IAAI,CAACK,GAAG,CAACR,GAAG,EAAES,GAAG,CAAC;EACzB;EAEAC,GAAGA,CAACV,GAAY,EAAO;IACrB,OAAO,IAAI,CAACG,IAAI,CAACO,GAAG,CAACV,GAAG,CAAC;EAC3B;EAEAW,eAAeA,CAACC,IAAY,EAAEC,YAA4B,EAAE;IAC1D,OAAO,IAAI,CAACd,IAAI,CAACY,eAAe,CAACC,IAAI,EAAEC,YAAY,CAAC;EACtD;EAEAC,SAASA,CAACF,IAAY,EAAE;IACtB,OAAO,IAAI,CAACb,IAAI,CAACe,SAAS,CAACF,IAAI,CAAC;EAClC;EAEAG,mBAAmBA,CACjBC,IAA+B,EAC/BC,GAAW,EACXC,MAAqB,EACrB;IACA,OAAO,IAAI,CAACnB,IAAI,CAACgB,mBAAmB,CAACC,IAAI,EAAEC,GAAG,EAAEC,MAAM,CAAC;EACzD;AACF;AAACC,OAAA,CAAAC,OAAA,GAAAvB,UAAA;AAEkC;EAChCA,UAAU,CAASwB,SAAS,CAACC,aAAa,GAAG,SAASA,aAAaA,CAAA,EAE9C;IAEpB,OAAO,IAAI,CAACvB,IAAI,CAACuB,aAAa,CAAC,CAAC;EAClC,CAAC;EACAzB,UAAU,CAASwB,SAAS,CAACE,SAAS,GAAG,SAASA,SAASA,CAAA,EAEpD;IAEN,IAAI,CAACxB,IAAI,CAACwB,SAAS,CAAC,CAAC;EACvB,CAAC;AACH;AAAC","ignoreList":[]}
  • imaps-frontend/node_modules/@babel/core/package.json

    rd565449 r0c6b92a  
    11{
    22  "name": "@babel/core",
    3   "version": "7.25.2",
     3  "version": "7.26.0",
    44  "description": "Babel compiler core.",
    55  "main": "./lib/index.js",
     
    4848  "dependencies": {
    4949    "@ampproject/remapping": "^2.2.0",
    50     "@babel/code-frame": "^7.24.7",
    51     "@babel/generator": "^7.25.0",
    52     "@babel/helper-compilation-targets": "^7.25.2",
    53     "@babel/helper-module-transforms": "^7.25.2",
    54     "@babel/helpers": "^7.25.0",
    55     "@babel/parser": "^7.25.0",
    56     "@babel/template": "^7.25.0",
    57     "@babel/traverse": "^7.25.2",
    58     "@babel/types": "^7.25.2",
     50    "@babel/code-frame": "^7.26.0",
     51    "@babel/generator": "^7.26.0",
     52    "@babel/helper-compilation-targets": "^7.25.9",
     53    "@babel/helper-module-transforms": "^7.26.0",
     54    "@babel/helpers": "^7.26.0",
     55    "@babel/parser": "^7.26.0",
     56    "@babel/template": "^7.25.9",
     57    "@babel/traverse": "^7.25.9",
     58    "@babel/types": "^7.26.0",
    5959    "convert-source-map": "^2.0.0",
    6060    "debug": "^4.1.0",
     
    6464  },
    6565  "devDependencies": {
    66     "@babel/helper-transform-fixture-test-runner": "^7.25.2",
    67     "@babel/plugin-syntax-flow": "^7.24.7",
    68     "@babel/plugin-transform-flow-strip-types": "^7.25.2",
    69     "@babel/plugin-transform-modules-commonjs": "^7.24.8",
    70     "@babel/preset-env": "^7.25.2",
    71     "@babel/preset-typescript": "^7.24.7",
     66    "@babel/helper-transform-fixture-test-runner": "^7.26.0",
     67    "@babel/plugin-syntax-flow": "^7.26.0",
     68    "@babel/plugin-transform-flow-strip-types": "^7.25.9",
     69    "@babel/plugin-transform-modules-commonjs": "^7.25.9",
     70    "@babel/preset-env": "^7.26.0",
     71    "@babel/preset-typescript": "^7.26.0",
    7272    "@jridgewell/trace-mapping": "^0.3.25",
    7373    "@types/convert-source-map": "^2.0.0",
  • imaps-frontend/node_modules/@babel/core/src/config/files/index-browser.ts

    rd565449 r0c6b92a  
    7575export const ROOT_CONFIG_FILENAMES: string[] = [];
    7676
     77type Resolved =
     78  | { loader: "require"; filepath: string }
     79  | { loader: "import"; filepath: string };
     80
    7781// eslint-disable-next-line @typescript-eslint/no-unused-vars
    78 export function resolvePlugin(name: string, dirname: string): string | null {
     82export function resolvePlugin(name: string, dirname: string): Resolved | null {
    7983  return null;
    8084}
    8185
    8286// eslint-disable-next-line @typescript-eslint/no-unused-vars
    83 export function resolvePreset(name: string, dirname: string): string | null {
     87export function resolvePreset(name: string, dirname: string): Resolved | null {
    8488  return null;
    8589}
Note: See TracChangeset for help on using the changeset viewer.