teamx-apps
v1.0.0
Published
AppHandler for The X Project: scans apps from C:\Users\<user>\AppData\x-project\apps (or configured path).
Downloads
98
Maintainers
Readme
\
teamx-apps
A tiny AppHandler for The X Project.
It scans a directory for apps and returns a clean registry describing what’s installed.
Default scan directory (Windows-style as requested):
C:\Users\<you>\AppData\x-project\appsBecause humans love inconsistency, it also supports common fallbacks:
%USERPROFILE%\AppData\Local\x-project\apps%USERPROFILE%\AppData\Roaming\x-project\apps
You can override everything by passing appsDir.
Install
npm i teamx-appsUsage
const { createAppHandler } = require("teamx-apps");
const apps = createAppHandler(); // uses default dir resolution
const results = await apps.scan();
console.log(results.apps);App folder format
An app is any subfolder containing one of:
app.dll.js(preferred entry)app.jsmain.jsapp.json(optional metadata)
If app.json exists, supported fields:
{
"id": "notes",
"name": "Notes",
"version": "1.0.0",
"entry": "app.js"
}API
createAppHandler(options?)
Options:
appsDir?: string(absolute or relative)preferDll?: boolean(default true)followSymlinks?: boolean(default false)
handler.scan()
Returns:
{
ok: true,
dir: "C:\\Users\\...\\AppData\\x-project\\apps",
apps: [
{ id, name, version, dir, entry, entryType, files }
],
warnings: []
}handler.resolveDefaultDir()
Returns the resolved directory that would be scanned.
