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

@joptimus/allspark

v1.0.1

Published

Programmatic API for modifying iOS and Android mobile project configuration files

Readme

@joptimus/allspark

Programmatic API for modifying iOS and Android mobile project configuration files. Fork of @trapezedev/project.

Installation

npm install @joptimus/allspark

Quick Start

import { MobileProject } from '@joptimus/allspark';

const project = new MobileProject('/path/to/your/app', {
  ios: { path: 'ios' },
  android: { path: 'android' },
});

await project.load();

// iOS: set bundle ID
project.ios?.setBundleId(null, null, 'com.example.myapp');

// Android: set version code
project.android?.setVersionCode(42);

// Write all changes to disk
await project.commit();

MobileProject

new MobileProject(projectRoot: string, config?: MobileProjectConfig)

Config shape:

{
  ios?: { path: string },       // relative path to iOS project dir
  android?: { path: string },   // relative path to Android project dir
  enableIos?: boolean,          // default: true
  enableAndroid?: boolean,      // default: true
}

| Method | Description | |--------|-------------| | load() | Detect framework and load iOS/Android sub-projects | | commit() | Write all pending changes to disk | | copyFile(src, dest) | Copy a file into the project root | | detectFramework() | Returns detected framework (Capacitor, Cordova, Flutter, React Native, .NET MAUI, NativeScript, Native iOS, Native Android) |

IosProject (project.ios)

| Method | Signature | Description | |--------|-----------|-------------| | getTargets | () => IosTarget[] \| null | All targets in the Xcode project | | getTarget | (name: string) => IosTarget \| null | Target by name | | getAppTarget | () => IosTarget \| null | Main app target | | getAppTargetName | () => string \| null | Name of the main app target | | getBundleId | (target, build?) => string \| null | Get PRODUCT_BUNDLE_IDENTIFIER | | setBundleId | (target, build, bundleId) | Set PRODUCT_BUNDLE_IDENTIFIER | | getBuildConfigurations | (target) => IosTargetBuildConfiguration[] | All build configs for a target | | getBuildConfigurationNames | (target) => string[] | Config names (Debug, Release, etc.) | | getProductName | (target?) => string \| null | Get PRODUCT_NAME | | setProductName | (target, name) | Set PRODUCT_NAME | | getBuild | (target, build?) => Promise<any> | Get CURRENT_PROJECT_VERSION | | setBuild | (target, build, number) | Set CURRENT_PROJECT_VERSION | | incrementBuild | (target?, build?) | Increment build number | | getVersion | (target, build) => string | Get MARKETING_VERSION | | setVersion | (target, build, version) | Set MARKETING_VERSION | | getBuildProperty | (target, build, key) => string \| null | Get any Xcode build property | | setBuildProperty | (target, build, key, value) | Set any Xcode build property | | addFramework | (target, framework, opts?) | Add a framework to a target | | getFrameworks | (target) => IosFramework[] | Frameworks for a target | | getEntitlementsFile | (target, build?) => string \| null | Path to entitlements file | | getEntitlements | (target, build?) => Promise<any> | Parsed entitlements plist | | addEntitlements | (target, build, entries) | Merge entitlements | | setEntitlements | (target, build, entries) | Replace entitlements | | getInfoPlist | (target, build?) => Promise<string> | Relative path to Info.plist | | getInfoPlistFilename | (target, build?) => Promise<string \| null> | Full path to Info.plist | | updateInfoPlist | (target, build, entries, mergeMode?) | Merge/replace Info.plist entries | | getDisplayName | (target, build?) => Promise<string \| null> | Get CFBundleDisplayName | | setDisplayName | (target, build, name) | Set CFBundleDisplayName | | addFile | (path) => Promise<void> | Add a source file to the Xcode project | | copyFile | (src, dest) => Promise<void> | Copy a file into the iOS project | | getPbxProject | () => IosPbxProject \| null | Raw pbxproject object | | getProjectFile | (path, create) => T \| null | Get or create a VFS file container | | getXmlFile | (path) => XmlFile \| null | Get an XML file container | | getPlistFile | (path) => PlistFile \| null | Get a plist file container | | xcodeprojName | () => Promise<string> | Name of the .xcodeproj directory | | pbxprojName | () => Promise<string> | Name of the .pbxproj file |

Target/Build parameters

  • target: pass null to use the main app target automatically
  • build: pass null to apply to all build configurations (Debug + Release)

AndroidProject (project.android)

| Method | Signature | Description | |--------|-----------|-------------| | getBuildGradle | () => GradleFile \| null | Root build.gradle | | getAppBuildGradle | () => GradleFile \| null | app/build.gradle | | getAndroidManifest | () => XmlFile | AndroidManifest.xml | | getPackageName | () => Promise<string \| undefined> | Current package/namespace | | setPackageName | (name) => Promise<void> | Rename package in manifest, gradle, and Java source | | getVersionCode | () => Promise<number \| null> | versionCode | | setVersionCode | (code: number) | Set versionCode | | incrementVersionCode | () => Promise<void> | Increment versionCode by 1 | | getVersionName | () => Promise<string \| null> | versionName | | setVersionName | (name: string) | Set versionName | | getVersionNameSuffix | () => Promise<string \| null> | versionNameSuffix | | setVersionNameSuffix | (suffix: string) | Set versionNameSuffix | | setAppName | (name: string) => Promise<void> | Set app display name | | getGradlePluginVersion | () => Promise<string \| null> | Android Gradle plugin version | | getGradleFile | (path: string) => Promise<GradleFile \| null> | Load a Gradle file by relative path | | getXmlFile | (path: string) => XmlFile \| null | Get an XML file container | | getResourceXmlFile | (resourcePath: string) => XmlFile \| null | Get an XML file from res/ | | getPropertiesFile | (path: string) => PropertiesFile \| null | Get a .properties file container | | getResource | (resDir, file, options?) => Promise<Buffer> | Read a resource file | | addResource | (resDir, file, contents) => Promise<void> | Write a file to res/<resDir>/ | | copyFile | (src, dest) => Promise<void> | Copy a file into the Android project | | copyToResources | (resDir, file, source) => Promise<void> | Copy a file into res/ | | getMainActivityFilename | () => string | Name of the main activity Java file | | getMainActivityPath | () => Promise<string> | Relative path to the main activity | | getResourcesPath | () => string | Relative path to res/ | | getResourcesRoot | () => string \| null | Absolute path to res/ | | getProjectFile | (path, create) => T \| null | Get or create a VFS file container |

License

MIT