All Superinterfaces:
JSBundleObject
All Known Subinterfaces:
ModifiableJSPackage

@ProviderType public interface JSPackage extends JSBundleObject
Represents an NPM package inside a JSBundle.

JSModules belong to a JSPackage and JSPackages belong to a JSBundle.

  • Method Details

    • getJSBundle

      JSBundle getJSBundle()
      Returns the NPM package's bundle.
      Returns:
      the NPM package's bundle
    • getJSModule

      JSModule getJSModule(String packagePath)
    • getJSModuleAliases

      Collection<JSModuleAlias> getJSModuleAliases()
    • getJSModules

      Collection<JSModule> getJSModules()
      Returns the NPM modules contained inside the NPM package.
      Returns:
      the NPM modules
    • getJSPackageDependencies

      Collection<JSPackageDependency> getJSPackageDependencies()
      Returns the dependencies (i.e., other NPM packages) declared by the NPM package.
      Returns:
      the NPM package dependencies
    • getJSPackageDependency

      JSPackageDependency getJSPackageDependency(String packageName)
      Returns the NPM package's dependency (i.e., another NPM package) with the package name.
      Parameters:
      packageName - the package name
      Returns:
      the package dependency or null if no dependency with the name exists
    • getMainModuleName

      String getMainModuleName()
      Returns the default module's name declared by the NPM package.
      Returns:
      the default module's name
    • getResolvedId

      String getResolvedId()
    • getResourceURL

      @Deprecated URL getResourceURL(String location)
      Deprecated.
      As of Athanasius (7.3.x), with no direct replacement
      Returns the resource's URL residing in the NPM package.
      Parameters:
      location - the resource's path
      Returns:
      the resource's URL
    • getVersion

      String getVersion()
      Returns the package's NPM version.
      Returns:
      the package's NPM version