Toolkit for packaging and distributing Lens Studio projects.
Example
// The LensStudio:Spk module provides packaging utilities used when // exporting a Lens Studio project as a signed .spk package. The module // exposes ensureDebugKey(), which creates (or returns the existing) debug // signing key inside a project directory — this is the first step in // packaging a lens for local testing. const { ensureDebugKey } = awaitimport('LensStudio:Spk');
// Resolve the current project directory via IModel. constmodel = this.pluginSystem.findInterface( Editor.Model.IModel.interfaceId ) asunknownasEditor.Model.IModel;
if (Editor.isNull(model)) { console.log('IModel not available — cannot package'); return; }
// ensureDebugKey() writes (or reuses) a debug signing key under the // project directory and returns its path. The returned key path is what // the packaging pipeline (SpkPacker) would sign the built .spk with. constkeyPath = ensureDebugKey(projectDir); console.log('Debug signing key ready at:', keyPath.toString());
Toolkit for packaging and distributing Lens Studio projects.
Example