Compare commits

..

No commits in common. "54f70e9bbace41826343e843a43910c7fccda6da" and "07300eb96f8e0a4b4867baf06d670452d922f528" have entirely different histories.

3 changed files with 8 additions and 13 deletions

View File

@ -2,7 +2,7 @@
Toes is a personal web server you run in your home.
Turn it on and forget about the cloud.
Set it up, turn it on, and forget about the cloud.
## quickstart

View File

@ -1,9 +1,8 @@
{
"name": "@because/toes",
"version": "0.0.2",
"description": "personal web appliance - turn it on and forget about the cloud",
"name": "toes",
"module": "src/index.ts",
"type": "module",
"private": true,
"bin": {
"toes": "src/cli/index.ts"
},

View File

@ -284,12 +284,12 @@ function getAppPackage(): { name?: string; scripts?: { toes?: string } } | null
}
}
const getAppName = () => getAppPackage()?.name || basename(process.cwd())
const isApp = () => !!getAppPackage()?.scripts?.toes
function resolveAppName(name?: string): string | undefined {
if (name) return name
if (isApp()) return getAppName()
const pkg = getAppPackage()
if (pkg?.scripts?.toes) return pkg.name || basename(process.cwd())
console.error('No app specified and current directory is not a toes app')
return undefined
}
@ -300,7 +300,7 @@ async function pushApp() {
return
}
const appName = getAppName()
const appName = basename(process.cwd())
const localManifest = generateManifest(process.cwd(), appName)
const result = await getManifest(appName)
@ -430,7 +430,7 @@ async function pullApp() {
return
}
const appName = getAppName()
const appName = basename(process.cwd())
const remoteManifest: Manifest | undefined = await get(`/api/sync/apps/${appName}/manifest`)
if (!remoteManifest) {
@ -507,7 +507,7 @@ async function syncApp() {
return
}
const appName = getAppName()
const appName = basename(process.cwd())
const gitignore = loadGitignore(process.cwd())
const localHashes = new Map<string, string>()
@ -667,10 +667,6 @@ program
},
})
program
.command('version', { hidden: true })
.action(() => console.log(program.version()))
program
.command('info')
.description('Show info for an app')