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

@expo-harmony/expo-manifests

v57.0.2-harmony.1

Published

HarmonyOS port of expo-manifests

Readme

@expo-harmony/expo-manifests

GitHub 仓库 | 官方文档

为 HarmonyOS 上的 React Native 应用提供 Expo Manifests 的原生实现,与官方 expo-manifests 配套使用。

安装

本包适配 Expo SDK 57。

引入本包前,需要确保应用使用的 HarmonyOS SDK 至少为 API 12(HarmonyOS 5.0.0)。

npm install @expo-harmony/expo-manifests

API 对照表

Methods

Manifest.fromManifestJson(value)

参数 value 为 JSON 清单对象;返回 ExpoUpdatesManifest 或 EmbeddedManifest。存在 metadata 字段时按远程更新清单读取,否则按内置清单读取。根值无效或包含 releaseId 时会抛出 ExpoManifestError;其他必需字段和字段类型在对应方法读取时检查,错误码为 ERR_MANIFEST_INVALID。

  • 带有 releaseId 字段的旧格式清单不受支持,调用会抛出 ExpoManifestError。

Manifest.getRawJson()

返回原始 JSON 清单对象,类型为 object。

Manifest.toString()

返回 JSON 清单的字符串表示,类型为 string。

Manifest.getID()

返回必需的清单 ID(id),类型为 string。

Manifest.getLegacyID()

返回 getID() 的结果,类型为 string。

Manifest.getMetadata()

返回 metadata 对象,类型为 object | null;字段不存在时返回 null。

Manifest.getAssets()

返回 assets 数组,类型为 unknown[] | null;字段不存在时返回 null。

Manifest.isVerified()

返回 isVerified 布尔值;字段不存在时返回 false。

Manifest.getStableLegacyID()

远程更新清单返回 null;内置清单返回 originalFullName,缺少该字段时返回清单 ID。

Manifest.getScopeKey()

远程更新清单从 extra.scopeKey 返回必需的项目隔离标识;内置清单返回 scopeKey,缺少时使用稳定旧 ID。

Manifest.getEASProjectID()

远程更新清单读取 extra.eas.projectId,内置清单读取 projectId。字段缺失时返回 null。

Manifest.getBundleURL()

远程更新清单返回 launchAsset.url;内置清单返回必需的 bundleUrl。

Manifest.getExpoGoSDKVersion()

远程更新清单从 Expo 客户端配置读取 sdkVersion;内置清单读取根字段 sdkVersion。字段缺失时返回 null。

Manifest.getExpoGoConfigRootObject()

远程更新清单返回 extra.expoGo 对象,缺失时返回 null;内置清单返回根清单对象。

Manifest.getExpoClientConfigRootObject()

远程更新清单返回 extra.expoClient 对象,缺失时返回 null;内置清单返回根清单对象。

Manifest.getSlug()

内置清单读取根字段 slug,远程更新清单读取 extra.expoClient.slug。字段缺失时返回 null。

Manifest.getAppKey()

内置清单读取根字段 appKey,远程更新清单读取 extra.expoClient.appKey。字段缺失时返回 null。

Manifest.isDevelopmentMode()

仅当 Expo Go 配置中 developer 为对象且 packagerOpts.dev 为 true 时返回 true。其他情况返回 false。

Manifest.isDevelopmentSilentLaunch()

当 Expo Go 配置中的 developmentClient.silentLaunch 为 true 时返回 true;字段缺失时返回 false。

Manifest.isUsingDeveloperTool()

当 Expo Go 配置中的 developer.tool 为字符串时返回 true,否则返回 false。

Manifest.getRevisionId()

返回 Expo 客户端配置中的必需字符串 revisionId。

Manifest.getDebuggerHost()

返回 Expo Go 配置中的必需字符串 debuggerHost。

Manifest.getMainModuleName()

Expo Go 配置不存在时返回 main;配置存在时返回其中的必需字符串 mainModuleName。

Manifest.getHostUri()

返回 Expo 客户端配置中的 hostUri,类型为 string | null;字段缺失时返回 null。

Manifest.getExpoGoUsername()

返回 Expo Go 配置中的 username,类型为 string | null;字段缺失时返回 null。

Manifest.getName()

返回 Expo 客户端配置中的 name,类型为 string | null;字段缺失时返回 null。

Manifest.getVersion()

返回 Expo 客户端配置中的 version,类型为 string | null;字段缺失时返回 null。

Manifest.getUpdatesInfo()

返回 Expo 客户端配置中的 updates 对象,类型为 object | null;字段缺失时返回 null。

Manifest.getPrimaryColor()

返回 Expo 客户端配置中的 primaryColor,类型为 string | null;字段缺失时返回 null。

Manifest.getOrientation()

返回 Expo 客户端配置中的 orientation,类型为 string | null;字段缺失时返回 null。

Manifest.getIconUrl()

返回 Expo 客户端配置中的 iconUrl,类型为 string | null;字段缺失时返回 null。

Manifest.getFacebookAppId()

返回 Expo 客户端配置中的必需字符串 facebookAppId。

Manifest.getFacebookApplicationName()

返回 Expo 客户端配置中的必需字符串 facebookDisplayName。

Manifest.getFacebookAutoInitEnabled()

返回 Expo 客户端配置中的必需布尔值 facebookAutoInitEnabled。

Manifest.getPlatformConfig()

返回 Expo 客户端配置中的 harmony 对象,类型为 object | null;字段缺失时返回 null。

Manifest.getUserInterfaceStyle()

优先返回 harmony.userInterfaceStyle 字符串,再读取 Expo 客户端配置中的 userInterfaceStyle 字符串;没有有效字符串时返回 null。

Manifest.getBackgroundColor()

优先返回 harmony.backgroundColor 字符串,再读取 Expo 客户端配置中的 backgroundColor 字符串;没有有效字符串时返回 null。

Manifest.getPluginProperties(name)

参数 name 为插件名称。返回匹配插件配置的属性对象,类型为 object | null;没有匹配项或未提供属性时返回 null。插件配置格式无效时会抛出 ExpoManifestError。

ExpoUpdatesManifest.getRuntimeVersion()

返回远程更新清单中的必需字符串 runtimeVersion。

ExpoUpdatesManifest.getCreatedAt()

返回远程更新清单中的必需字符串 createdAt。

ExpoUpdatesManifest.getLaunchAsset()

返回远程更新清单中的 launchAsset 对象。

EmbeddedManifest.getCommitTimeLong()

返回内置清单的 commitTime 整数。小数部分会截去;超出安全整数范围或无法转换为整数时会抛出 ExpoManifestError。

Types

ManifestAsset

清单资源,包含必需的 url: string。

ExpoClientConfig

Expo 应用配置,另含可选的 hostUri: string。

ClientScopingConfig

可选的 scopeKey: string,用于标识项目。

EASConfig

可选的 projectId: string。

ManifestExtra

包含 ClientScopingConfig 字段,以及可选的 expoClient、expoGo 和 eas 配置。

ExpoGoConfig

Expo Go 配置,包含可选的 mainModuleName、debuggerHost、developer 和 packagerOpts 字段。

ExpoGoPackagerOpts

打包器配置,包含可选的 hostType、dev、strict、minify、urlType、urlRandomness 和 lanType 字段。

ExpoUpdatesManifest

远程更新清单类型,包含 id、createdAt、runtimeVersion、launchAsset、assets 和 metadata;extra 可选。

EmbeddedManifest

内置清单类型,包含 id、commitTime 和 assets。

NewManifest

ExpoUpdatesManifest 的旧别名,已废弃。

BareManifest

EmbeddedManifest 的旧别名,已废弃。

ExpoManifestError

清单读取失败时抛出的错误,继承自 Error;name 为 ExpoManifestError,code 为 ERR_MANIFEST_INVALID。

Error codes

| 错误码 | 触发条件 | | --- | --- | | ERR_MANIFEST_INVALID | 清单对象无效、必需字段缺失或字段类型不符、旧格式清单不受支持,或内置清单的 commitTime 无效。 |

Author

expo-harmony © Baoshuo, Released under the MIT License. Authored and maintained by Baoshuo with help from contributors.

Personal Website · Blog · GitHub @renbaoshuo · Twitter @renbaoshuo