/** A plugin scope: the package name of the app the plugins are for — `bled`, `@acme/editor`. */ export declare const SCOPE_PATTERN = "^(?:@[a-z0-9][a-z0-9._~-]*/)?[a-z0-9][a-z0-9._~-]*$"; /** Whether `name` can be a plugin scope. */ export declare function isScope(name: string): boolean; /** * The one directory everything this process installs goes under, when there * is one: `BUNDLE_ROOT`. A server's layout — `bundle --system`, which sets it * to `systemRoot()` — or any other place an image build or a test wants it. * Under it, as under nothing else: * * bin/ the commands (`BUNDLE_INSTALL_DIR` still overrides) * apps/ the archives they run * plugins/ one directory per scope * state/ what is installed, the attestation cache, the listings index * cache/ the sigstore trust root * * Without it, each of these is the user's, where the platform keeps such * things. Which policy files are read does not change: the machine's and the * user's, as always. */ export declare function bundleRoot(): string | undefined; /** * The machine's root, which `--system` installs under: `BUNDLE_SYSTEM_ROOT`, * else `/var/lib/bundle`, `/Library/Application Support/bundle` on macOS, and * `%ProgramData%\bundle` on Windows — beside the machine's policy file there. */ export declare function systemRoot(): string; /** * Where plugins are installed, one directory per scope: `BUNDLE_PLUGINS`, else * `plugins` under `BUNDLE_ROOT`, else `bundle/plugins` in the data directory. */ export declare function pluginsDir(): string; /** * The directory one scope's plugins are in. An absolute path is itself. * * A scope is found in one place, never merged from two: where `pluginsDir()` * says when that has the scope — or when `BUNDLE_PLUGINS` or `BUNDLE_ROOT` * says where to look — and otherwise the machine's (`systemRoot()`), when * the scope is there. So a service running as a user of its own loads what * `bundle --system` installed for it, with nothing to configure, and a user * who installs plugins for the same app has their own scope instead of the * machine's, never a mix of the two. `fallback: false` is where an install * puts it: this process's own place, always. */ export declare function scopeDir(scope: string, { fallback }?: { fallback?: boolean | undefined; }): string; /** Where in its scope a plugin with this package name is stored: `@alice/bled-gpio.nzip`. */ export declare function pluginFile(name: string): string; /** * Where in its scope a plugin linked for development is noted: a text file * naming the folder it is loaded from, `@alice/bled-gpio.link`. */ export declare function linkFile(name: string): string; /** * Where the name a plugin was installed as is kept: beside its archive, as * text (`@alice/bled-gpio.nzip.name`), so the loader can say it without * reading the installer's records. */ export declare function labelFile(archive: string): string; //# sourceMappingURL=scopes.d.ts.map