contentbase 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/src/cli/commands/create.ts +4 -5
- package/src/cli/index.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentbase",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"repository": "https://github.com/soederpop/contentbase",
|
|
4
5
|
"website": "https://contentbase.soederpop.com",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "./src/index.ts",
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
"typecheck": "tsc --noEmit",
|
|
16
17
|
"examples": "bun run scripts/examples/run-all.ts",
|
|
17
18
|
"compile": "bun build ./src/cli/index.ts --compile --outfile dist/cnotes --external @node-llama-cpp/*",
|
|
18
|
-
"compile:all": "bun build ./src/cli/index.ts --compile --target=bun-linux-x64 --outfile dist/cnotes-linux-x64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-linux-arm64 --outfile dist/cnotes-linux-arm64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-darwin-x64 --outfile dist/cnotes-darwin-x64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-darwin-arm64 --outfile dist/cnotes-darwin-arm64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-windows-x64 --outfile dist/cnotes-windows-x64.exe --external @node-llama-cpp/*"
|
|
19
|
+
"compile:all": "bun build ./src/cli/index.ts --compile --target=bun-linux-x64 --outfile dist/cnotes-linux-x64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-linux-arm64 --outfile dist/cnotes-linux-arm64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-darwin-x64 --outfile dist/cnotes-darwin-x64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-darwin-arm64 --outfile dist/cnotes-darwin-arm64 --external @node-llama-cpp/* && bun build ./src/cli/index.ts --compile --target=bun-windows-x64 --outfile dist/cnotes-windows-x64.exe --external @node-llama-cpp/*",
|
|
20
|
+
"release": "./scripts/release.sh"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
23
|
"@soederpop/luca": "latest",
|
|
@@ -43,12 +43,11 @@ async function handler(options: z.infer<typeof argsSchema>, context: { container
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// Parse --meta.* flags from raw argv
|
|
46
|
+
// minimist nests dotted keys: --meta.status active → { meta: { status: 'active' } }
|
|
46
47
|
const metaOverrides: Record<string, unknown> = {}
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
metaOverrides[key.slice(5)] = rawArgs[key]
|
|
51
|
-
}
|
|
48
|
+
const rawMeta = context.container.argv.meta
|
|
49
|
+
if (rawMeta && typeof rawMeta === 'object') {
|
|
50
|
+
Object.assign(metaOverrides, rawMeta)
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
// Build meta from priority layers: zod defaults < definition.defaults < template frontmatter < CLI overrides
|
package/src/cli/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { commands } from './registry.js'
|
|
3
|
+
import pkg from '../../package.json'
|
|
3
4
|
|
|
4
5
|
// Side-effect imports register all commands
|
|
5
6
|
import './commands/index.js'
|
|
@@ -14,6 +15,11 @@ async function main() {
|
|
|
14
15
|
const luca = await import('@soederpop/luca/node')
|
|
15
16
|
const container = luca.default
|
|
16
17
|
|
|
18
|
+
if (container.argv.version || container.argv.v) {
|
|
19
|
+
console.log(`cnotes ${pkg.version}\n${pkg.repository}`)
|
|
20
|
+
return
|
|
21
|
+
}
|
|
22
|
+
|
|
17
23
|
const commandName = container.argv._[0] as string | undefined
|
|
18
24
|
const wantsHelp = container.argv.help || container.argv.h
|
|
19
25
|
|