Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@weapp-vite/ast

Latest version: v7.13.0-dev.20261127.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: icebreaker
525 Stars
33 Forks
58 Versions
31.4K Downloads
TypeScript Repo language

Scan summary

@weapp-vite/ast was last scanned on 27 Nov 2026 at version 7.13.0-dev.20261127.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 58 versions; the latest 5 were published within 5 days (23–27 Nov 2026).
  • Findings: No rules fired in version 7.13.0-dev.20261127.1.
  • Downloads: 31,435 downloads.

Versions

58 versions published
Versions and the rules that fired in each
VersionPublishedStatus
7.13.0-dev.20261127.1 LATEST 27 Nov 2026 No rules fired
7.12.2 25 Nov 2026 No rules fired
7.12.2-dev.20261124.1 24 Nov 2026 No rules fired
7.12.1 23 Nov 2026 Not shown
7.12.0-dev.20261123.1 23 Nov 2026 Not shown

No rules fired in 7.13.0-dev.20261127.1

Findings

Findings for v7.13.0-dev.20261127.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 7.13.0-dev.20261127.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@weapp-vite/ast

简介

@weapp-vite/ast 提供 weapp-vite 体系内可复用的 AST 解析与静态分析能力,统一封装 Babel 与 Oxc 两套后端,并抽出跨包共享的分析操作,供 weapp-vite、wevu、@wevu/compiler 等包复用。

特性

  • 统一的 Babel / Oxc 解析入口
  • JS / TS / JSX / TSX 源码解析
  • 平台 API、require、script setup import 等轻量分析
  • 组件 props、特性标记、JSX 自动组件等共享分析操作
  • 面向业务包的可参数化分析器,避免重复实现

安装

pnpm add @weapp-vite/ast

使用

解析源码:

import { parseJsLikeWithEngine } from '@weapp-vite/ast'

const babelAst = parseJsLikeWithEngine('export const value = 1')
const oxcAst = parseJsLikeWithEngine('export const value = 1', {
  engine: 'oxc',
  filename: 'inline.ts',
})

收集通用特性标记:

import { collectFeatureFlagsFromCode } from '@weapp-vite/ast'

const flags = collectFeatureFlagsFromCode(code, {
  astEngine: 'oxc',
  moduleId: 'wevu',
  hookToFeature: {
    onLoad: 'enableShare',
    onShow: 'enableShow',
  },
})

收集 JSX 自动组件:

import { collectJsxAutoComponentsFromCode } from '@weapp-vite/ast'

const result = collectJsxAutoComponentsFromCode(code, {
  astEngine: 'babel',
  isCollectableTag(tag) {
    return !['view', 'text'].includes(tag)
  },
  isDefineComponentSource(source) {
    return source === 'vue' || source === 'wevu'
  },
})

需要区分“没有组件导入”和“解析失败”时,使用带状态的分析结果:

import { analyzeScriptSetupImportsFromCode } from '@weapp-vite/ast'

const result = analyzeScriptSetupImportsFromCode(code, new Set(['MyButton']))
if (result.status === 'complete') {
  console.log(result.imports)
}

complete 可以返回空导入列表;failed 表示本次解析失败,调用方不应将它作为成功结果缓存。原有 collectScriptSetupImportsFromCode 继续返回导入数组。

稳定 API

建议优先从根入口导入稳定 API:

  • parseJsLikeWithEngine
  • collectComponentPropsFromCode
  • collectFeatureFlagsFromCode
  • collectJsxAutoComponentsFromCode
  • collectJsxImportedComponentsAndDefaultExportFromBabelAst
  • collectJsxTemplateTagsFromBabelExpression
  • mayContainPlatformApiAccess
  • collectRequireTokens
  • collectScriptSetupImportsFromCode
  • analyzeScriptSetupImportsFromCode
  • unwrapTypeScriptExpression
  • getObjectPropertyByKey
  • getRenderPropertyFromComponentOptions
  • resolveRenderExpressionFromComponentOptions

子路径导出

如果需要更细粒度地按能力引用,也可以使用这些子路径导出:

  • @weapp-vite/ast/babel
  • @weapp-vite/ast/babelNodes
  • @weapp-vite/ast/engine
  • @weapp-vite/ast/types
  • @weapp-vite/ast/operations/componentProps
  • @weapp-vite/ast/operations/featureFlags
  • @weapp-vite/ast/operations/jsxAutoComponents
  • @weapp-vite/ast/operations/platformApi
  • @weapp-vite/ast/operations/require
  • @weapp-vite/ast/operations/scriptSetupImports

默认建议:

  • 业务侧优先使用根入口
  • 只有在需要低层 helper 或做更细粒度 tree-shaking 时,再使用子路径导入

发布校验

包内可直接运行以下命令做独立校验:

pnpm build
pnpm test
pnpm run check:release

相关链接

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @weapp-vite/ast

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229