%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/SiteVacivitta/vacivitta/node_modules/@babel/core/lib/transformation/
Upload File :
Create Path :
Current File : /home/vacivi36/SiteVacivitta/vacivitta/node_modules/@babel/core/lib/transformation/index.js.map

{"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  }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQA,IAAAE,WAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAGA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAiBO,UAAUQ,GAAGA,CAClBC,MAAsB,EACtBC,IAAY,EACZC,GAA+B,EACV;EACrB,MAAMC,IAAI,GAAG,OAAO,IAAAC,sBAAa,EAC/BJ,MAAM,CAACK,MAAM,EACb,IAAAC,sBAAgB,EAACN,MAAM,CAAC,EACxBC,IAAI,EACJC,GACF,CAAC;EAED,MAAMK,IAAI,GAAGJ,IAAI,CAACI,IAAI;EACtB,IAAI;IACF,OAAOC,aAAa,CAACL,IAAI,EAAEH,MAAM,CAACK,MAAM,CAAC;EAC3C,CAAC,CAAC,OAAOI,CAAC,EAAE;IAAA,IAAAC,cAAA;IACVD,CAAC,CAACE,OAAO,GAAG,IAAAD,cAAA,GAAGH,IAAI,CAACK,QAAQ,YAAAF,cAAA,GAAI,cAAc,KAAKD,CAAC,CAACE,OAAO,EAAE;IAC9D,IAAI,CAACF,CAAC,CAACR,IAAI,EAAE;MACXQ,CAAC,CAACR,IAAI,GAAG,uBAAuB;IAClC;IACA,MAAMQ,CAAC;EACT;EAEA,I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