nopy: add create-cube command scaffolding a cube from bundled templates
Publish snapshot / snapshot (push) Successful in 1m17s
Publish snapshot / snapshot (push) Successful in 1m17s
Gathers id, name and directory from flags or prompts (only what the flags do not supply), then writes manifest.mjs + deploy.py from templates under src/templates/cube. Templates are named *.example.* so the template directory itself can never match the loader's manifest+deploy pair rule. The scaffold refuses a directory that already holds cube files by the loader's own patterns, checks the id against the loaded cube set (best effort, exempting the target directory so --force re-scaffolds work), and warns when the target lands outside every configured cube directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ApuW1MMGK2pUQ9mTVRTxc5
This commit is contained in:
co-authored by
Claude Fable 5
parent
568d4c83ff
commit
8973ff7113
@@ -0,0 +1,15 @@
|
||||
import { Manifest } from '@bitsquare/nopy-cubes';
|
||||
import { z } from 'zod';
|
||||
|
||||
export default Manifest({
|
||||
id: '__CUBE_ID__',
|
||||
name: '__CUBE_NAME__',
|
||||
// dependencies: () => ['apt:essentials'], // cubes to deploy first
|
||||
// secrets: ['API_TOKEN'], // schema keys to mask and never persist
|
||||
schema: z.object({
|
||||
GREETING: z
|
||||
.string()
|
||||
.describe('Message the deploy prints on the host')
|
||||
.default('hello from __CUBE_ID__'),
|
||||
}),
|
||||
});
|
||||
Reference in New Issue
Block a user