npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@spectie/adapter-xcode

v1.1.0

Published

spectie static Xcode project adapter

Readme

Xcode 静态工程适配包 1.1.0

当前接入使用协议 1:spectie adapter add @spectie/[email protected],自动注册并精确选择。共享运行时、依赖声明及完整流程见 扩展说明。

rf.xcode 是公共协议 1 的独立工程环境包。Python 3.11+,本版锁定 macOS 27.0.1 的 /usr/bin/plutil。使用系统已有解析器从 stdin 解析已核验配置字节,不读取项目路径,不调用 xcodebuild、xcrun、simctl、SwiftPM、脚本、签名或网络服务;无需安装/初始化 Xcode 组件。系统解析器由 macOS 提供,本包不重新分发它。

安装与使用

按 扩展操作,使用 spectie 1.1.0 执行 spectie adapter add @spectie/[email protected] @spectie/[email protected],Swift 解析器会自动构建。Xcode 包自身使用系统 plutil,无需依赖安装脚本。

npm 包名为 @spectie/[email protected]。源码根目录执行 npm run package:adapters,由临时打包目录展开共享 Python 运行时后调用 npm pack,生成 output/npm/spectie-adapter-xcode-1.1.0.tgz;不要直接对源码目录 npm pack,以免遗漏符号链接运行时。项目选择示例:

{"schema_version":"1","adapters":[{"adapter_id":"rf.swift","version":"1.1.0"},{"adapter_id":"rf.xcode","version":"1.1.0"}],"config":{}}

Swift 包负责语言观察,Xcode 包可单独使用。明确捕获 .xcodeproj/project.pbxproj、源文件、Info.plist、entitlements、xcconfig、资源目录及需要验证的资源文件,然后显式 analyze;跨范围缺文件保持 unknown。沿用真实返回的记录修订,不在业务项目执行构建来补齐未知。

支持范围

  • PBXProject/PBXNativeTarget、普通 PBXGroup/PBXFileReference、相对 group 与 SOURCE_ROOT 路径、VariantGroup 本地化成员。
  • 各 build phase 中显式 PBXBuildFile/fileRef 的来源关系;文件夹/asset catalog 仅展开本次捕获目录中的文件,标 directory_member,不能据此推断完整资源或实际打包结果。
  • PBXShellScriptBuildPhase 的显式 inputPaths → 已捕获文件,以及 outputPaths 中位于 $(TARGET_BUILD_DIR)/$(WRAPPER_NAME)/ 下的静态 bundle 相对路径;也接受 BUILT_PRODUCTS_DIR、FULL_PRODUCT_NAME 和 ${…} 拼写。输出保留工程、目标和阶段身份,不假设输入输出逐项对应,不解析 shellScript;file lists 和其他动态路径披露 unknown。
  • 构建配置的 baseConfigurationReference、字面的 INFOPLIST_FILE/CODE_SIGN_ENTITLEMENTS;仅支持路径前缀 SRCROOT/PROJECT_DIR,不计算其他变量、继承或条件。build setting 仅记录键名、配置名和目标,不输出设置值。
  • xcconfig 的静态 #include / #include?、UTF-8 plist/entitlements 顶层键名,以及 xcassets Contents.json 的 images/data filename → 已捕获资源文件。

工程事实以对象 ID 与配置原文件位置为来源;OpenStep 工程采用对象赋值头的原字节位置,其他形式或聚合配置采用完整文件跨度,data 保留目标/配置身份。事实表达声明的静态成员关系,不表示构建成功或代码调用关系。

循环或多路径 group、绝对/越界路径、动态设置、缺文件、外部包/产品、脚本执行语义、同步文件系统组及其例外均披露 unknown。完整分析带 xcode_build_semantics_unknown;二进制 plist 在本版来源位置协议下未支持。只在本机 macOS 工程及有限反例验证,未宣称 iOS、其他 macOS 版本或 Xcode 工程格式的完整兼容。

验证:python3 -B -m unittest discover -s tests -p test_v4_local.py;Swift 联合关联回归:python3 -B -m unittest discover -s tests -p test_swift_bundle.py。本包源码使用 MIT,系统 plutil 的许可随 macOS 提供。

嵌套 group 支持 SRCROOT/PROJECT_DIR 基目录,忽略 xcconfig 注释中的 include。工程根前缀仅在 pbxproj 的明确工程上下文解析;xcconfig include 中的根变量缺少所属工程上下文,保持 unknown,普通相对 include 继续支持。