github-pages-deploy-action/node_modules/eslint-plugin-jsdoc/dist/exportParser.js.map
2020-03-31 08:40:00 -04:00

1 line
25 KiB
Plaintext

{"version":3,"sources":["../src/exportParser.js"],"names":["debug","createNode","props","getSymbolValue","symbol","type","value","getIdentifier","node","globals","scope","opts","simpleIdentifier","identifierLiteral","name","block","createSymbol","getSymbol","opt","obj","object","propertySymbol","property","computed","propertyValue","val","prototype","left","right","body","forEach","method","key","properties","prop","includes","propVal","createBlockSymbol","isGlobal","window","special","id","valueSymbol","initVariables","childNode","expression","declarations","declaration","initWindow","kind","mapVariables","isExport","ancestorsOnly","init","exported","ANONYMOUS_DEFAULT","specifiers","specifier","local","findNode","cache","blockCache","slice","push","Object","hasOwnProperty","call","propval","findExportedNode","isNodeExported","initModuleExports","module","exports","esm","parseRecursive","globalVars","parent","parse","ast","isExported","parseResult"],"mappings":";;;;;;;AAAA;;;;AAEA,MAAMA,KAAK,GAAG,oBAAY,oBAAZ,CAAd;;AAEA,MAAMC,UAAU,GAAG,SAAbA,UAAa,GAAY;AAC7B,SAAO;AACLC,IAAAA,KAAK,EAAE;AADF,GAAP;AAGD,CAJD;;AAMA,MAAMC,cAAc,GAAG,SAAjBA,cAAiB,CAAUC,MAAV,EAAkB;AACvC;AACA,MAAI,CAACA,MAAL,EAAa;AACX;AACA,WAAO,IAAP;AACD;AACD;;;AACA,MAAIA,MAAM,CAACC,IAAP,KAAgB,SAApB,EAA+B;AAC7B,WAAOD,MAAM,CAACE,KAAP,CAAaA,KAApB;AACD;AAED;;;AACA,SAAO,IAAP;AACD,CAbD;;AAeA,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAUC,IAAV,EAAgBC,OAAhB,EAAyBC,KAAzB,EAAgCC,IAAhC,EAAsC;AAC1D,MAAIA,IAAI,CAACC,gBAAT,EAA2B;AACzB;AACA,UAAMC,iBAAiB,GAAGZ,UAAU,EAApC;AACAY,IAAAA,iBAAiB,CAACR,IAAlB,GAAyB,SAAzB;AACAQ,IAAAA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IAAAA,UAAU,CAACzE,KAAX,CAAiBqC,MAAjB,CAAwBC,OAAxB,GAAkC,IAAlC;AACD;;AAED,MAAI7B,IAAI,CAACyC,aAAT,EAAwB;AACtBsB,IAAAA,cAAc,CAAClE,IAAD,EAAOmE,UAAP,EAAmBhE,IAAnB,CAAd;AACD,GAFD,MAEO;AACLgC,IAAAA,aAAa,CAACmC,GAAD,EAAMH,UAAN,EAAkBhE,IAAlB,CAAb;AACAuC,IAAAA,YAAY,CAAC4B,GAAD,EAAMH,UAAN,EAAkBhE,IAAlB,CAAZ;AACD;;AAED,SAAO;AACLgE,IAAAA;AADK,GAAP;AAGD,CA9BD;;AAgCA,MAAMI,UAAU,GAAG,SAAbA,UAAa,CAAUvE,IAAV,EAAgBwE,WAAhB,EAA6B9D,GAA7B,EAAkC;AACnD,SAAOmD,cAAc,CAAC7D,IAAD,EAAOwE,WAAW,CAACL,UAAnB,EAA+BzD,GAA/B,CAArB;AACD,CAFD;;eAIe;AACb6D,EAAAA,UADa;AAEbF,EAAAA;AAFa,C","sourcesContent":["import debugModule from 'debug';\n\nconst debug = debugModule('requireExportJsdoc');\n\nconst createNode = function () {\n return {\n props: {},\n };\n};\n\nconst getSymbolValue = function (symbol) {\n /* istanbul ignore next */\n if (!symbol) {\n /* istanbul ignore next */\n return null;\n }\n /* istanbul ignore next */\n if (symbol.type === 'literal') {\n return symbol.value.value;\n }\n\n /* istanbul ignore next */\n return null;\n};\n\nconst getIdentifier = function (node, globals, scope, opts) {\n if (opts.simpleIdentifier) {\n // Type is Identier for noncomputed properties\n const identifierLiteral = createNode();\n identifierLiteral.type = 'literal';\n identifierLiteral.value = {value: node.name};\n\n return identifierLiteral;\n }\n\n /* istanbul ignore next */\n const block = scope || globals;\n\n // As scopes are not currently supported, they are not traversed upwards recursively\n if (block.props[node.name]) {\n return block.props[node.name];\n }\n\n // Seems this will only be entered once scopes added and entered\n /* istanbul ignore next */\n if (globals.props[node.name]) {\n return globals.props[node.name];\n }\n\n return null;\n};\n\nlet createSymbol = null;\nconst getSymbol = function (node, globals, scope, opt) {\n const opts = opt || {};\n switch (node.type) {\n case 'Identifier': {\n return getIdentifier(node, globals, scope, opts);\n } case 'MemberExpression': {\n const obj = getSymbol(node.object, globals, scope, opts);\n const propertySymbol = getSymbol(node.property, globals, scope, {simpleIdentifier: !node.computed});\n const propertyValue = getSymbolValue(propertySymbol);\n\n /* istanbul ignore next */\n if (obj && propertyValue && obj.props[propertyValue]) {\n const block = obj.props[propertyValue];\n\n return block;\n }\n\n /*\n if (opts.createMissingProps && propertyValue) {\n obj.props[propertyValue] = createNode();\n\n return obj.props[propertyValue];\n }\n */\n /* istanbul ignore next */\n debug(`MemberExpression: Missing property ${node.property.name}`);\n\n /* istanbul ignore next */\n return null;\n } case 'ClassDeclaration': case 'ClassExpression': case 'FunctionExpression': case 'FunctionDeclaration': case 'ArrowFunctionExpression': {\n const val = createNode();\n val.props.prototype = createNode();\n val.props.prototype.type = 'object';\n val.type = 'object';\n val.value = node;\n\n return val;\n } case 'AssignmentExpression': {\n return createSymbol(node.left, globals, node.right, scope, opts);\n } case 'ClassBody': {\n const val = createNode();\n node.body.forEach((method) => {\n val.props[method.key.name] = createNode();\n val.props[method.key.name].type = 'object';\n val.props[method.key.name].value = method.value;\n });\n val.type = 'object';\n val.value = node;\n\n return val;\n } case 'ObjectExpression': {\n const val = createNode();\n val.type = 'object';\n node.properties.forEach((prop) => {\n if ([\n // @typescript-eslint/parser, espree, acorn, etc.\n 'SpreadElement',\n\n // babel-eslint\n 'ExperimentalSpreadProperty',\n ].includes(prop.type)) {\n return;\n }\n const propVal = getSymbol(prop.value, globals, scope, opts);\n /* istanbul ignore next */\n if (propVal) {\n val.props[prop.key.name] = propVal;\n }\n });\n\n return val;\n } case 'Literal': {\n const val = createNode();\n val.type = 'literal';\n val.value = node;\n\n return val;\n }\n }\n\n /* istanbul ignore next */\n return null;\n};\n\nconst createBlockSymbol = function (block, name, value, globals, isGlobal) {\n block.props[name] = value;\n if (isGlobal && globals.props.window && globals.props.window.special) {\n globals.props.window.props[name] = value;\n }\n};\n\ncreateSymbol = function (node, globals, value, scope, isGlobal) {\n const block = scope || globals;\n let symbol;\n switch (node.type) {\n case 'FunctionDeclaration':\n\n // Fallthrough\n case 'ClassDeclaration': {\n if (node.id && node.id.type === 'Identifier') {\n return createSymbol(node.id, globals, node, globals);\n }\n break;\n } case 'Identifier': {\n if (value) {\n const valueSymbol = getSymbol(value, globals, block);\n /* istanbul ignore next */\n if (valueSymbol) {\n createBlockSymbol(block, node.name, valueSymbol, globals, isGlobal);\n\n return block.props[node.name];\n }\n /* istanbul ignore next */\n debug('Identifier: Missing value symbol for %s', node.name);\n } else {\n createBlockSymbol(block, node.name, createNode(), globals, isGlobal);\n\n return block.props[node.name];\n }\n /* istanbul ignore next */\n break;\n } case 'MemberExpression': {\n symbol = getSymbol(node.object, globals, block);\n\n const propertySymbol = getSymbol(node.property, globals, block, {simpleIdentifier: !node.computed});\n const propertyValue = getSymbolValue(propertySymbol);\n if (symbol && propertyValue) {\n createBlockSymbol(symbol, propertyValue, getSymbol(value, globals, block), globals, isGlobal);\n\n return symbol.props[propertyValue];\n }\n /* istanbul ignore next */\n debug('MemberExpression: Missing symbol: %s', node.property.name);\n break;\n }\n }\n\n return null;\n};\n\n// Creates variables from variable definitions\nconst initVariables = function (node, globals, opts) {\n switch (node.type) {\n case 'Program': {\n node.body.forEach((childNode) => {\n initVariables(childNode, globals, opts);\n });\n break;\n } case 'ExpressionStatement': {\n initVariables(node.expression, globals, opts);\n break;\n } case 'VariableDeclaration': {\n node.declarations.forEach((declaration) => {\n // let and const\n const symbol = createSymbol(declaration.id, globals, null, globals);\n if (opts.initWindow && node.kind === 'var' && globals.props.window) {\n // If var, also add to window\n globals.props.window.props[declaration.id.name] = symbol;\n }\n });\n break;\n } case 'ExportNamedDeclaration': {\n if (node.declaration) {\n initVariables(node.declaration, globals, opts);\n }\n break;\n }\n }\n};\n\n// Populates variable maps using AST\nconst mapVariables = function (node, globals, opt, isExport) {\n /* istanbul ignore next */\n const opts = opt || {};\n /* istanbul ignore next */\n switch (node.type) {\n case 'Program': {\n if (opts.ancestorsOnly) {\n return false;\n }\n node.body.forEach((childNode) => {\n mapVariables(childNode, globals, opts);\n });\n break;\n } case 'ExpressionStatement': {\n mapVariables(node.expression, globals, opts);\n break;\n } case 'AssignmentExpression': {\n createSymbol(node.left, globals, node.right);\n break;\n } case 'VariableDeclaration': {\n node.declarations.forEach((declaration) => {\n const isGlobal = opts.initWindow && node.kind === 'var' && globals.props.window;\n const symbol = createSymbol(declaration.id, globals, declaration.init, globals, isGlobal);\n if (symbol && isExport) {\n symbol.exported = true;\n }\n });\n break;\n } case 'FunctionDeclaration': {\n /* istanbul ignore next */\n if (node.id.type === 'Identifier') {\n createSymbol(node.id, globals, node, globals, true);\n }\n break;\n } case 'ExportDefaultDeclaration': {\n const symbol = createSymbol(node.declaration, globals, node.declaration);\n if (symbol) {\n symbol.exported = true;\n } else if (!node.id) {\n globals.ANONYMOUS_DEFAULT = node.declaration;\n }\n break;\n } case 'ExportNamedDeclaration': {\n if (node.declaration) {\n if (node.declaration.type === 'VariableDeclaration') {\n mapVariables(node.declaration, globals, opts, true);\n } else {\n const symbol = createSymbol(node.declaration, globals, node.declaration);\n /* istanbul ignore next */\n if (symbol) {\n symbol.exported = true;\n }\n }\n }\n node.specifiers.forEach((specifier) => {\n mapVariables(specifier, globals, opts);\n });\n break;\n } case 'ExportSpecifier': {\n const symbol = getSymbol(node.local, globals, globals);\n /* istanbul ignore next */\n if (symbol) {\n symbol.exported = true;\n }\n break;\n } case 'ClassDeclaration': {\n createSymbol(node.id, globals, node.body, globals);\n break;\n } default: {\n /* istanbul ignore next */\n return false;\n }\n }\n\n return true;\n};\n\nconst findNode = function (node, block, cache) {\n let blockCache = cache || [];\n /* istanbul ignore next */\n if (!block || blockCache.includes(block)) {\n return false;\n }\n blockCache = blockCache.slice();\n blockCache.push(block);\n\n if (block.type === 'object') {\n if (block.value === node) {\n return true;\n }\n }\n\n const {props} = block;\n for (const prop in props) {\n /* istanbul ignore next */\n if (Object.prototype.hasOwnProperty.call(props, prop)) {\n const propval = props[prop];\n\n // Only check node if it had resolvable value\n if (propval && findNode(node, propval, blockCache)) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nconst findExportedNode = function (block, node, cache) {\n if (block.ANONYMOUS_DEFAULT === node) {\n return true;\n }\n /* istanbul ignore next */\n if (block === null) {\n return false;\n }\n const blockCache = cache || [];\n const {props} = block;\n for (const key in props) {\n /* istanbul ignore next */\n if (Object.prototype.hasOwnProperty.call(props, key)) {\n blockCache.push(props[key]);\n if (props[key].exported) {\n if (node === props[key].value || findNode(node, props[key].value)) {\n return true;\n }\n }\n\n // No need to check `props[key]` for exported nodes as ESM\n // exports are only global\n }\n }\n\n return false;\n};\n\nconst isNodeExported = function (node, globals, opt) {\n if (opt.initModuleExports && globals.props.module && globals.props.module.props.exports) {\n if (findNode(node, globals.props.module.props.exports)) {\n return true;\n }\n }\n\n if (opt.initWindow && globals.props.window) {\n if (findNode(node, globals.props.window)) {\n return true;\n }\n }\n\n if (opt.esm && findExportedNode(globals, node)) {\n return true;\n }\n\n return false;\n};\n\nconst parseRecursive = function (node, globalVars, opts) {\n // Iterate from top using recursion - stop at first processed node from top\n if (node.parent) {\n if (parseRecursive(node.parent, globalVars, opts)) {\n return true;\n }\n }\n\n return mapVariables(node, globalVars, opts);\n};\n\nconst parse = function (ast, node, opt) {\n /* istanbul ignore next */\n const opts = opt || {\n ancestorsOnly: false,\n esm: true,\n initModuleExports: true,\n initWindow: true,\n };\n\n const globalVars = createNode();\n if (opts.initModuleExports) {\n globalVars.props.module = createNode();\n globalVars.props.module.props.exports = createNode();\n globalVars.props.exports = globalVars.props.module.props.exports;\n }\n if (opts.initWindow) {\n globalVars.props.window = createNode();\n globalVars.props.window.special = true;\n }\n\n if (opts.ancestorsOnly) {\n parseRecursive(node, globalVars, opts);\n } else {\n initVariables(ast, globalVars, opts);\n mapVariables(ast, globalVars, opts);\n }\n\n return {\n globalVars,\n };\n};\n\nconst isExported = function (node, parseResult, opt) {\n return isNodeExported(node, parseResult.globalVars, opt);\n};\n\nexport default {\n isExported,\n parse,\n};\n"],"file":"exportParser.js"}