This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
admin-panel/graphql-types/node_modules/@ardatan/aggregate-error/index.esm.js.map

1 line
11 KiB
Plaintext
Raw Normal View History

2021-03-09 18:44:13 +00:00
{"version":3,"file":"index.esm.js","sources":["../src/cleanInternalStack.ts","../src/escapeStringRegexp.ts","../src/cleanStack.ts","../src/indentString.ts","../src/AggregateError.ts"],"sourcesContent":["export const cleanInternalStack = (stack: string): string => stack.replace(/\\s+at .*aggregate-error\\/index.js:\\d+:\\d+\\)?/g, '');\n\n","/**\nEscape RegExp special characters.\nYou can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.\n@example\n```\nimport escapeStringRegexp = require('escape-string-regexp');\nconst escapedString = escapeStringRegexp('How much $ for a 🦄?');\n//=> 'How much \\\\$ for a 🦄\\\\?'\nnew RegExp(escapedString);\n```\n*/\nexport const escapeStringRegexp = (string: string): string => {\n if (typeof string !== 'string') {\n throw new TypeError('Expected a string');\n }\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when its always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns stricter grammar.\n return string\n .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n .replace(/-/g, '\\\\x2d');\n};\n\n","import { escapeStringRegexp } from \"./escapeStringRegexp\";\n\nconst extractPathRegex = /\\s+at.*[(\\s](.*)\\)?/;\nconst pathRegex = /^(?:(?:(?:node|(?:internal\\/[\\w/]*|.*node_modules\\/(?:babel-polyfill|pirates)\\/.*)?\\w+)\\.js:\\d+:\\d+)|native)/;\n\n/**\nClean up error stack traces. Removes the mostly unhelpful internal Node.js entries.\n@param stack - The `stack` property of an `Error`.\n@example\n```\nimport cleanStack = require('clean-stack');\nconst error = new Error('Missing unicorn');\nconsole.log(error.stack);\n// Error: Missing unicorn\n// at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)\n// at Module._compile (module.js:409:26)\n// at Object.Module._extensions..js (module.js:416:10)\n// at Module.load (module.js:343:32)\n// at Function.Module._load (module.js:300:12)\n// at Function.Module.runMain (module.js:441:10)\n// at startup (node.js:139:18)\nconsole.log(cleanStack(error.stack));\n// Error: Missing unicorn\n// at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)\n```\n*/\nexport const cleanStack = (stack: string, basePath?: string): string => {\n const basePathRegex = basePath && new RegExp(`(at | \\\\()${escapeStringRegexp(basePath)}`, 'g');\n return stack.replace(/\\\\/g, '/')\n .split('\\n')\n .filter(line => {\n const pathMatches = line.match(extractPathRegex);\n if (pathMatches === null || !pathMatches[1]) {\n return true;\n }\n const match = pathMatches[1];\n // Electron\n if (match.includes('.app/Contents/Resources/electron.asar') ||\n match.includes('.app/Contents/Resources/default_app.asar')) {\n return false;\n }\n return !pathRegex.test(match);\n })\n .filter(line => line.trim() !== '')\n .map(line => {\n if (basePathRegex) {\n line = line.replace(basePathRegex, '$1');\n }\n return line;\n })\n .join('\\n');\n};\n","interface Options {\n /**\n The string to use for the indent.\n @default ' '\n */\n readonly indent?: string;\n /**\n Also indent empty lines.\n @default false\n */\n readonly includeEmptyLines?: boolean;\n}\n/**\nIndent each line in a string.\n@param string - The string to indent.\n@param count - How many times you want `options.indent` repeated. Default: `1`.\n@example\n```\nimport indentString = require('indent-string');\nindentString('Unicorns\\nRainbows', 4);\n//=> ' Unicorns\\n Rainbows'\nindentString('Unicorns\\nRainbows', 4, {indent: '♥'});\n//=> '♥♥♥♥Unicorns\\n♥♥♥♥Rainbows'\n```\n*/\nexport const indentString = (string: string, count = 1, options?: Options): st