Skip to main content

Editor.PackageMetadata

Class

Metadata information about a package.

Index

Example

// PackageMetadata is returned by IPackageRegistry.packageMetadata().
const registry = this.pluginSystem.findInterface(
Editor.IPackageRegistry.interfaceId
) as Editor.IPackageRegistry;

const libPaths = registry.getLibraryPaths();
if (libPaths.length > 0) {
const meta = registry.packageMetadata(libPaths[0]);
console.log('Package name:', meta.name);
console.log('Package assetId:', meta.assetId);
console.log('Version:', `${meta.versionMajor}.${meta.versionMinor}.${meta.versionPatch}`);
console.log('File count:', meta.filePaths.length);
console.log('Tags:', meta.tags.join(', '));
}

Properties

assetId

assetId: string

Asset identifier string for the package.


filePaths

filePaths: string[]

List of file paths included in the package.


name

name: string

Display name of the package.


tags

tags: string[]

Tags associated with the package for categorization or search.


uid

uid: Uuid

Unique identifier (UUID) for the package.


versionMajor

versionMajor: number

Major version number of the package.


versionMinor

versionMinor: number

Minor version number of the package.


versionPatch

versionPatch: number

Patch version number of the package.