Duffer Derek

Current Path : /var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/next/dist/lib/
Upload File :
Current File : /var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/next/dist/lib/turbopack-warning.js.map

{"version":3,"sources":["../../src/lib/turbopack-warning.ts"],"sourcesContent":["import type { NextConfigComplete } from '../server/config-shared'\nimport loadConfig from '../server/config'\nimport * as Log from '../build/output/log'\n\nconst unsupportedTurbopackNextConfigOptions = [\n  // Left to be implemented (priority)\n  // 'experimental.clientRouterFilter',\n  // 'experimental.optimizePackageImports',\n  // 'compiler.emotion',\n  // 'compiler.reactRemoveProperties',\n  // 'compiler.relay',\n  // 'compiler.removeConsole',\n  // 'compiler.styledComponents',\n  'experimental.fetchCacheKeyPrefix',\n\n  // Left to be implemented\n  // 'excludeDefaultMomentLocales',\n  // 'experimental.optimizeServerReact',\n  'experimental.clientRouterFilterAllowedRate',\n  // 'experimental.serverMinification',\n  // 'experimental.serverSourceMaps',\n\n  'experimental.allowedRevalidateHeaderKeys',\n  'experimental.extensionAlias',\n  'experimental.fallbackNodePolyfills',\n\n  'experimental.swcTraceProfiling',\n\n  // Left to be implemented (Might not be needed for Turbopack)\n  'experimental.craCompat',\n  'experimental.disablePostcssPresetEnv',\n  'experimental.esmExternals',\n  // This is used to force swc-loader to run regardless of finding Babel.\n  'experimental.forceSwcTransforms',\n  'experimental.fullySpecified',\n  'experimental.urlImports',\n  'experimental.slowModuleDetection',\n]\n\n/**  */\nexport async function validateTurboNextConfig({\n  dir,\n  configPhase,\n}: {\n  dir: string\n  configPhase: Parameters<typeof loadConfig>[0]\n}) {\n  const { defaultConfig } =\n    require('../server/config-shared') as typeof import('../server/config-shared')\n  const { cyan, red, underline } =\n    require('../lib/picocolors') as typeof import('../lib/picocolors')\n  const { interopDefault } =\n    require('../lib/interop-default') as typeof import('../lib/interop-default')\n\n  let unsupportedParts = ''\n\n  let hasWebpackConfig = false\n  let hasTurboConfig = false\n\n  const unsupportedConfig: string[] = []\n  let rawNextConfig: NextConfigComplete = {} as NextConfigComplete\n\n  try {\n    rawNextConfig = interopDefault(\n      await loadConfig(configPhase, dir, {\n        rawConfig: true,\n      })\n    )\n\n    if (typeof rawNextConfig === 'function') {\n      rawNextConfig = (rawNextConfig as any)(configPhase, {\n        defaultConfig,\n      })\n    }\n    hasWebpackConfig = Boolean(rawNextConfig.webpack)\n    hasTurboConfig = Boolean(rawNextConfig.turbopack)\n\n    const flattenKeys = (obj: any, prefix: string = ''): string[] => {\n      let keys: string[] = []\n\n      for (const key in obj) {\n        const value = obj?.[key]\n        if (typeof value === 'undefined') {\n          continue\n        }\n\n        const pre = prefix.length ? `${prefix}.` : ''\n\n        if (\n          typeof value === 'object' &&\n          !Array.isArray(value) &&\n          value !== null\n        ) {\n          keys = keys.concat(flattenKeys(value, pre + key))\n        } else {\n          keys.push(pre + key)\n        }\n      }\n\n      return keys\n    }\n\n    const getDeepValue = (obj: any, keys: string | string[]): any => {\n      if (typeof keys === 'string') {\n        keys = keys.split('.')\n      }\n      if (keys.length === 1) {\n        return obj?.[keys?.[0]]\n      }\n      return getDeepValue(obj?.[keys?.[0]], keys.slice(1))\n    }\n\n    const customKeys = flattenKeys(rawNextConfig)\n\n    for (const key of customKeys) {\n      if (key.startsWith('experimental.turbo')) {\n        hasTurboConfig = true\n      }\n\n      const isUnsupported =\n        unsupportedTurbopackNextConfigOptions.some(\n          (unsupportedKey) =>\n            // Either the key matches (or is a more specific subkey) of\n            // unsupportedKey, or the key is the path to a specific subkey.\n            // | key     | unsupportedKey |\n            // |---------|----------------|\n            // | foo     | foo            |\n            // | foo.bar | foo            |\n            // | foo     | foo.bar        |\n            key.startsWith(unsupportedKey) ||\n            unsupportedKey.startsWith(`${key}.`)\n        ) &&\n        getDeepValue(rawNextConfig, key) !== getDeepValue(defaultConfig, key)\n\n      if (isUnsupported) {\n        unsupportedConfig.push(key)\n      }\n    }\n  } catch (e) {\n    Log.error('Unexpected error occurred while checking config', e)\n  }\n\n  // If the build was defaulted to Turbopack, we want to warn about possibly ignored webpack\n  // configuration. Otherwise the user explicitly picked turbopack and thus we expect that\n  // they have configured it correctly.\n  if (process.env.TURBOPACK === 'auto' && hasWebpackConfig && !hasTurboConfig) {\n    const configFile = rawNextConfig.configFileName ?? 'your Next config file'\n    Log.error(\n      `ERROR: This build is using Turbopack, with a \\`webpack\\` config and no \\`turbopack\\` config.\n   This may be a mistake.\n\n   As of Next.js 16 Turbopack is enabled by default and\n   custom webpack configurations may need to be migrated to Turbopack.\n\n   NOTE: your \\`webpack\\` config may have been added by a configuration plugin.\n\n   To configure Turbopack, see https://nextjs.org/docs/app/api-reference/next-config-js/turbopack\n\n   TIP: Many applications work fine under Turbopack with no configuration,\n   if that is the case for you, you can silence this error by passing the\n   \\`--turbopack\\` or \\`--webpack\\` flag explicitly or simply setting an \n   empty turbopack config in ${configFile} (e.g. \\`turbopack: {}\\`).`\n    )\n\n    process.exit(1)\n  }\n\n  if (unsupportedConfig.length) {\n    unsupportedParts += `\\n\\n- Unsupported Next.js configuration option(s) (${cyan(\n      'next.config.js'\n    )})\\n  Turbopack will ignore the following configuration options:\\n${unsupportedConfig\n      .map((name) => `    - ${red(name)}\\n`)\n      .join('')}`\n  }\n\n  if (unsupportedParts) {\n    Log.error(\n      `You are using configuration and/or tools that are not yet\\nsupported by Next.js with Turbopack:\\n${unsupportedParts}\\n`\n    )\n\n    Log.warn(\n      'Learn more about how to configure Turbopack with Next.js:\\n' +\n        underline(\n          'https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopack'\n        )\n    )\n  }\n\n  return rawNextConfig\n}\n"],"names":["validateTurboNextConfig","unsupportedTurbopackNextConfigOptions","dir","configPhase","defaultConfig","require","cyan","red","underline","interopDefault","unsupportedParts","hasWebpackConfig","hasTurboConfig","unsupportedConfig","rawNextConfig","loadConfig","rawConfig","Boolean","webpack","turbopack","flattenKeys","obj","prefix","keys","key","value","pre","length","Array","isArray","concat","push","getDeepValue","split","slice","customKeys","startsWith","isUnsupported","some","unsupportedKey","e","Log","error","process","env","TURBOPACK","configFile","configFileName","exit","map","name","join","warn"],"mappings":";;;;+BAwCsBA;;;eAAAA;;;+DAvCC;6DACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErB,MAAMC,wCAAwC;IAC5C,oCAAoC;IACpC,qCAAqC;IACrC,yCAAyC;IACzC,sBAAsB;IACtB,oCAAoC;IACpC,oBAAoB;IACpB,4BAA4B;IAC5B,+BAA+B;IAC/B;IAEA,yBAAyB;IACzB,iCAAiC;IACjC,sCAAsC;IACtC;IACA,qCAAqC;IACrC,mCAAmC;IAEnC;IACA;IACA;IAEA;IAEA,6DAA6D;IAC7D;IACA;IACA;IACA,uEAAuE;IACvE;IACA;IACA;IACA;CACD;AAGM,eAAeD,wBAAwB,EAC5CE,GAAG,EACHC,WAAW,EAIZ;IACC,MAAM,EAAEC,aAAa,EAAE,GACrBC,QAAQ;IACV,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,SAAS,EAAE,GAC5BH,QAAQ;IACV,MAAM,EAAEI,cAAc,EAAE,GACtBJ,QAAQ;IAEV,IAAIK,mBAAmB;IAEvB,IAAIC,mBAAmB;IACvB,IAAIC,iBAAiB;IAErB,MAAMC,oBAA8B,EAAE;IACtC,IAAIC,gBAAoC,CAAC;IAEzC,IAAI;QACFA,gBAAgBL,eACd,MAAMM,IAAAA,eAAU,EAACZ,aAAaD,KAAK;YACjCc,WAAW;QACb;QAGF,IAAI,OAAOF,kBAAkB,YAAY;YACvCA,gBAAgB,AAACA,cAAsBX,aAAa;gBAClDC;YACF;QACF;QACAO,mBAAmBM,QAAQH,cAAcI,OAAO;QAChDN,iBAAiBK,QAAQH,cAAcK,SAAS;QAEhD,MAAMC,cAAc,CAACC,KAAUC,SAAiB,EAAE;YAChD,IAAIC,OAAiB,EAAE;YAEvB,IAAK,MAAMC,OAAOH,IAAK;gBACrB,MAAMI,QAAQJ,uBAAAA,GAAK,CAACG,IAAI;gBACx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