@vue-macros/api
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -5,3 +5,3 @@ import { MagicString, SFC } from '@vue-macros/common'; | ||
import { TSFile, TSResolvedType } from './ts.js'; | ||
export { ResolveTSFileIdImpl, TSDeclaration, TSExports, TSFile, TSProperties, TSResolvedType, TSScope, exportsSymbol, getTSFile, isTSDeclaration, isTSExports, mergeTSProperties, resolveTSEntityName, resolveTSExports, resolveTSFileId, resolveTSFileIdNode, resolveTSProperties, resolveTSReferencedType, resolveTSScope, resolveTypeElements, setResolveTSFileIdImpl, tsFileCache, tsFileExportsCache } from './ts.js'; | ||
export { ResolveTSFileIdImpl, TSDeclaration, TSExports, TSProperties, TSScope, exportsSymbol, getTSFile, isTSDeclaration, isTSExports, mergeTSProperties, resolveTSEntityName, resolveTSExports, resolveTSFileId, resolveTSFileIdNode, resolveTSProperties, resolveTSReferencedType, resolveTSScope, resolveTypeElements, setResolveTSFileIdImpl, tsFileCache, tsFileExportsCache } from './ts.js'; | ||
export { keyToString } from './utils.js'; | ||
@@ -179,2 +179,2 @@ | ||
export { ASTDefinition, AnalyzeResult, DefaultsASTRaw, DefineEmitsStatement, DefinePropsStatement, DefinitionKind, Emits, EmitsBase, Props, PropsBase, RuntimePropDefinition, TSEmits, TSProps, TSPropsMethod, TSPropsProperty, analyzeSFC, attachNodeLoc, handleTSEmitsDefinition, handleTSPropsDefinition, inferRuntimeType }; | ||
export { ASTDefinition, AnalyzeResult, DefaultsASTRaw, DefineEmitsStatement, DefinePropsStatement, DefinitionKind, Emits, EmitsBase, Props, PropsBase, RuntimePropDefinition, TSEmits, TSFile, TSProps, TSPropsMethod, TSPropsProperty, TSResolvedType, analyzeSFC, attachNodeLoc, handleTSEmitsDefinition, handleTSPropsDefinition, inferRuntimeType }; |
@@ -18,3 +18,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunk6EAABA32js = require('./chunk-6EAABA32.js'); | ||
var _chunkMZOSLWYAjs = require('./chunk-MZOSLWYA.js'); | ||
@@ -122,7 +122,7 @@ | ||
node.type.types.map(async (subType) => { | ||
const resolved = await _chunk6EAABA32js.resolveTSReferencedType.call(void 0, { | ||
const resolved = await _chunkMZOSLWYAjs.resolveTSReferencedType.call(void 0, { | ||
scope: node.scope, | ||
type: subType | ||
}); | ||
return resolved && !_chunk6EAABA32js.isTSExports.call(void 0, resolved) ? inferRuntimeType(resolved) : void 0; | ||
return resolved && !_chunkMZOSLWYAjs.isTSExports.call(void 0, resolved) ? inferRuntimeType(resolved) : void 0; | ||
}) | ||
@@ -322,4 +322,4 @@ )).filter((t) => !!t).flat(1); | ||
async function resolveDefinitions(typeDeclRaw2) { | ||
const resolved = await _chunk6EAABA32js.resolveTSReferencedType.call(void 0, typeDeclRaw2); | ||
if (!resolved || _chunk6EAABA32js.isTSExports.call(void 0, resolved)) | ||
const resolved = await _chunkMZOSLWYAjs.resolveTSReferencedType.call(void 0, typeDeclRaw2); | ||
if (!resolved || _chunkMZOSLWYAjs.isTSExports.call(void 0, resolved)) | ||
throw new SyntaxError(`Cannot resolve TS definition.`); | ||
@@ -329,3 +329,3 @@ const { type: definitionsAst2, scope } = resolved; | ||
throw new SyntaxError(`Cannot resolve TS definition.`); | ||
const properties = await _chunk6EAABA32js.resolveTSProperties.call(void 0, { | ||
const properties = await _chunkMZOSLWYAjs.resolveTSProperties.call(void 0, { | ||
scope, | ||
@@ -342,7 +342,7 @@ type: definitionsAst2 | ||
for (const [key, value] of Object.entries(properties.properties)) { | ||
const referenced = value.value ? await _chunk6EAABA32js.resolveTSReferencedType.call(void 0, value.value) : void 0; | ||
const referenced = value.value ? await _chunkMZOSLWYAjs.resolveTSReferencedType.call(void 0, value.value) : void 0; | ||
definitions2[key] = { | ||
type: "property", | ||
addByAPI: false, | ||
value: referenced && !_chunk6EAABA32js.isTSExports.call(void 0, referenced) ? buildDefinition(referenced) : void 0, | ||
value: referenced && !_chunkMZOSLWYAjs.isTSExports.call(void 0, referenced) ? buildDefinition(referenced) : void 0, | ||
optional: value.optional, | ||
@@ -380,3 +380,3 @@ signature: buildDefinition(value.signature) | ||
return { | ||
code: _chunk6EAABA32js.resolveTSScope.call(void 0, scope).file.content.slice(type.start, type.end), | ||
code: _chunkMZOSLWYAjs.resolveTSScope.call(void 0, scope).file.content.slice(type.start, type.end), | ||
ast: type, | ||
@@ -468,4 +468,4 @@ scope | ||
var _a; | ||
const resolved = await _chunk6EAABA32js.resolveTSReferencedType.call(void 0, typeDeclRaw2); | ||
if (!resolved || _chunk6EAABA32js.isTSExports.call(void 0, resolved)) | ||
const resolved = await _chunkMZOSLWYAjs.resolveTSReferencedType.call(void 0, typeDeclRaw2); | ||
if (!resolved || _chunkMZOSLWYAjs.isTSExports.call(void 0, resolved)) | ||
throw new SyntaxError(`Cannot resolve TS definition.`); | ||
@@ -475,3 +475,3 @@ const { type: definitionsAst2, scope } = resolved; | ||
throw new SyntaxError(`Cannot resolve TS definition.`); | ||
const properties = await _chunk6EAABA32js.resolveTSProperties.call(void 0, { | ||
const properties = await _chunkMZOSLWYAjs.resolveTSProperties.call(void 0, { | ||
scope, | ||
@@ -485,7 +485,7 @@ type: definitionsAst2 | ||
continue; | ||
const evtType = await _chunk6EAABA32js.resolveTSReferencedType.call(void 0, { | ||
const evtType = await _chunkMZOSLWYAjs.resolveTSReferencedType.call(void 0, { | ||
type: evtArg.typeAnnotation.typeAnnotation, | ||
scope: signature.scope | ||
}); | ||
if (_chunk6EAABA32js.isTSExports.call(void 0, evtType) || (evtType == null ? void 0 : evtType.type.type) !== "TSLiteralType") | ||
if (_chunkMZOSLWYAjs.isTSExports.call(void 0, evtType) || (evtType == null ? void 0 : evtType.type.type) !== "TSLiteralType") | ||
continue; | ||
@@ -512,3 +512,3 @@ const literal = evtType.type.literal; | ||
return { | ||
code: _chunk6EAABA32js.resolveTSScope.call(void 0, scope).file.content.slice(type.start, type.end), | ||
code: _chunkMZOSLWYAjs.resolveTSScope.call(void 0, scope).file.content.slice(type.start, type.end), | ||
ast: type, | ||
@@ -682,2 +682,2 @@ scope | ||
exports.DefinitionKind = DefinitionKind; exports.MagicString = _common.MagicString; exports.analyzeSFC = analyzeSFC; exports.attachNodeLoc = attachNodeLoc; exports.exportsSymbol = _chunk6EAABA32js.exportsSymbol; exports.getTSFile = _chunk6EAABA32js.getTSFile; exports.handleTSEmitsDefinition = handleTSEmitsDefinition; exports.handleTSPropsDefinition = handleTSPropsDefinition; exports.inferRuntimeType = inferRuntimeType; exports.isTSDeclaration = _chunk6EAABA32js.isTSDeclaration; exports.isTSExports = _chunk6EAABA32js.isTSExports; exports.keyToString = _chunkNTLGGEMNjs.keyToString; exports.mergeTSProperties = _chunk6EAABA32js.mergeTSProperties; exports.parseSFC = _common.parseSFC; exports.resolveTSEntityName = _chunk6EAABA32js.resolveTSEntityName; exports.resolveTSExports = _chunk6EAABA32js.resolveTSExports; exports.resolveTSFileId = _chunk6EAABA32js.resolveTSFileId; exports.resolveTSFileIdNode = _chunk6EAABA32js.resolveTSFileIdNode; exports.resolveTSProperties = _chunk6EAABA32js.resolveTSProperties; exports.resolveTSReferencedType = _chunk6EAABA32js.resolveTSReferencedType; exports.resolveTSScope = _chunk6EAABA32js.resolveTSScope; exports.resolveTypeElements = _chunk6EAABA32js.resolveTypeElements; exports.setResolveTSFileIdImpl = _chunk6EAABA32js.setResolveTSFileIdImpl; exports.tsFileCache = _chunk6EAABA32js.tsFileCache; exports.tsFileExportsCache = _chunk6EAABA32js.tsFileExportsCache; | ||
exports.DefinitionKind = DefinitionKind; exports.MagicString = _common.MagicString; exports.analyzeSFC = analyzeSFC; exports.attachNodeLoc = attachNodeLoc; exports.exportsSymbol = _chunkMZOSLWYAjs.exportsSymbol; exports.getTSFile = _chunkMZOSLWYAjs.getTSFile; exports.handleTSEmitsDefinition = handleTSEmitsDefinition; exports.handleTSPropsDefinition = handleTSPropsDefinition; exports.inferRuntimeType = inferRuntimeType; exports.isTSDeclaration = _chunkMZOSLWYAjs.isTSDeclaration; exports.isTSExports = _chunkMZOSLWYAjs.isTSExports; exports.keyToString = _chunkNTLGGEMNjs.keyToString; exports.mergeTSProperties = _chunkMZOSLWYAjs.mergeTSProperties; exports.parseSFC = _common.parseSFC; exports.resolveTSEntityName = _chunkMZOSLWYAjs.resolveTSEntityName; exports.resolveTSExports = _chunkMZOSLWYAjs.resolveTSExports; exports.resolveTSFileId = _chunkMZOSLWYAjs.resolveTSFileId; exports.resolveTSFileIdNode = _chunkMZOSLWYAjs.resolveTSFileIdNode; exports.resolveTSProperties = _chunkMZOSLWYAjs.resolveTSProperties; exports.resolveTSReferencedType = _chunkMZOSLWYAjs.resolveTSReferencedType; exports.resolveTSScope = _chunkMZOSLWYAjs.resolveTSScope; exports.resolveTypeElements = _chunkMZOSLWYAjs.resolveTypeElements; exports.setResolveTSFileIdImpl = _chunkMZOSLWYAjs.setResolveTSFileIdImpl; exports.tsFileCache = _chunkMZOSLWYAjs.tsFileCache; exports.tsFileExportsCache = _chunkMZOSLWYAjs.tsFileExportsCache; |
@@ -18,3 +18,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunk6EAABA32js = require('./chunk-6EAABA32.js'); | ||
var _chunkMZOSLWYAjs = require('./chunk-MZOSLWYA.js'); | ||
@@ -37,3 +37,3 @@ | ||
exports.exportsSymbol = _chunk6EAABA32js.exportsSymbol; exports.getTSFile = _chunk6EAABA32js.getTSFile; exports.isTSDeclaration = _chunk6EAABA32js.isTSDeclaration; exports.isTSExports = _chunk6EAABA32js.isTSExports; exports.mergeTSProperties = _chunk6EAABA32js.mergeTSProperties; exports.resolveTSEntityName = _chunk6EAABA32js.resolveTSEntityName; exports.resolveTSExports = _chunk6EAABA32js.resolveTSExports; exports.resolveTSFileId = _chunk6EAABA32js.resolveTSFileId; exports.resolveTSFileIdNode = _chunk6EAABA32js.resolveTSFileIdNode; exports.resolveTSProperties = _chunk6EAABA32js.resolveTSProperties; exports.resolveTSReferencedType = _chunk6EAABA32js.resolveTSReferencedType; exports.resolveTSScope = _chunk6EAABA32js.resolveTSScope; exports.resolveTypeElements = _chunk6EAABA32js.resolveTypeElements; exports.setResolveTSFileIdImpl = _chunk6EAABA32js.setResolveTSFileIdImpl; exports.tsFileCache = _chunk6EAABA32js.tsFileCache; exports.tsFileExportsCache = _chunk6EAABA32js.tsFileExportsCache; | ||
exports.exportsSymbol = _chunkMZOSLWYAjs.exportsSymbol; exports.getTSFile = _chunkMZOSLWYAjs.getTSFile; exports.isTSDeclaration = _chunkMZOSLWYAjs.isTSDeclaration; exports.isTSExports = _chunkMZOSLWYAjs.isTSExports; exports.mergeTSProperties = _chunkMZOSLWYAjs.mergeTSProperties; exports.resolveTSEntityName = _chunkMZOSLWYAjs.resolveTSEntityName; exports.resolveTSExports = _chunkMZOSLWYAjs.resolveTSExports; exports.resolveTSFileId = _chunkMZOSLWYAjs.resolveTSFileId; exports.resolveTSFileIdNode = _chunkMZOSLWYAjs.resolveTSFileIdNode; exports.resolveTSProperties = _chunkMZOSLWYAjs.resolveTSProperties; exports.resolveTSReferencedType = _chunkMZOSLWYAjs.resolveTSReferencedType; exports.resolveTSScope = _chunkMZOSLWYAjs.resolveTSScope; exports.resolveTypeElements = _chunkMZOSLWYAjs.resolveTypeElements; exports.setResolveTSFileIdImpl = _chunkMZOSLWYAjs.setResolveTSFileIdImpl; exports.tsFileCache = _chunkMZOSLWYAjs.tsFileCache; exports.tsFileExportsCache = _chunkMZOSLWYAjs.tsFileExportsCache; | ||
exports.default = module.exports; |
{ | ||
"name": "@vue-macros/api", | ||
"version": "0.2.1", | ||
"packageManager": "pnpm@7.18.1", | ||
"version": "0.2.2", | ||
"packageManager": "pnpm@7.20.0", | ||
"license": "MIT", | ||
@@ -29,3 +29,3 @@ "homepage": "https://github.com/sxzz/unplugin-vue-macros#readme", | ||
"dependencies": { | ||
"@babel/types": "^7.20.5", | ||
"@babel/types": "^7.20.7", | ||
"@vue-macros/common": "~0.13.5" | ||
@@ -32,0 +32,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74907
Updated@babel/types@^7.20.7