hollware 0.0.0 → 0.0.2
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/LICENSE +21 -0
- package/README.md +23 -1
- package/dist/index.d.mts +11 -0
- package/dist/index.mjs +81 -0
- package/package.json +38 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Sergio Azócar and Hollware contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
1
|
# hollware
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command line of [Hollware](https://github.com/hollware/hollware), an open-source headless
|
|
4
|
+
CMS for the agent era, native to Cloudflare Workers.
|
|
5
|
+
|
|
6
|
+
> **Status: pre-alpha, not usable yet.** The binary answers `--help` and `--version`; every
|
|
7
|
+
> command prints "not implemented yet" and exits with code 1.
|
|
8
|
+
|
|
9
|
+
## What it will be
|
|
10
|
+
|
|
11
|
+
The `hollware` command, with these planned commands:
|
|
12
|
+
|
|
13
|
+
| Command | Purpose |
|
|
14
|
+
| --------- | ------------------------------------- |
|
|
15
|
+
| `init` | Set up Hollware in a project |
|
|
16
|
+
| `migrate` | Apply D1 migrations |
|
|
17
|
+
| `token` | Create, list and revoke access tokens |
|
|
18
|
+
| `import` | Import Markdown files over MCP |
|
|
19
|
+
| `export` | Export entries as Markdown files |
|
|
20
|
+
|
|
21
|
+
## Links
|
|
22
|
+
|
|
23
|
+
- Repository: <https://github.com/hollware/hollware>
|
|
24
|
+
- Issues: <https://github.com/hollware/hollware/issues>
|
|
25
|
+
- License: MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Runs the CLI and returns its exit code. Each call to `io.out` or `io.err` is one
|
|
4
|
+
* message; whoever owns the streams adds the trailing newline. Only the first
|
|
5
|
+
* argument is looked at.
|
|
6
|
+
*/
|
|
7
|
+
export declare function main(argv: string[], io: {
|
|
8
|
+
out: (s: string) => void;
|
|
9
|
+
err: (s: string) => void;
|
|
10
|
+
}): number;
|
|
11
|
+
//#endregion
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
const COMMANDS = [
|
|
6
|
+
{
|
|
7
|
+
name: "init",
|
|
8
|
+
summary: "Set up Hollware in a project"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: "migrate",
|
|
12
|
+
summary: "Apply D1 migrations"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: "token",
|
|
16
|
+
summary: "Create, list and revoke access tokens"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "import",
|
|
20
|
+
summary: "Import Markdown files over MCP"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "export",
|
|
24
|
+
summary: "Export entries as Markdown files"
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
const NAME_WIDTH = Math.max(...COMMANDS.map((command) => command.name.length));
|
|
28
|
+
const USAGE = [
|
|
29
|
+
"Usage: hollware <command>",
|
|
30
|
+
"",
|
|
31
|
+
"Pre-alpha: no command is implemented yet.",
|
|
32
|
+
"",
|
|
33
|
+
"Commands:",
|
|
34
|
+
...COMMANDS.map(({ name, summary }) => ` ${name.padEnd(NAME_WIDTH)} ${summary} (not implemented yet)`),
|
|
35
|
+
"",
|
|
36
|
+
"Options:",
|
|
37
|
+
" --help Show this help",
|
|
38
|
+
" --version Print the version"
|
|
39
|
+
].join("\n");
|
|
40
|
+
function readVersion() {
|
|
41
|
+
const manifest = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
42
|
+
if (typeof manifest.version !== "string") throw new Error("package.json has no version");
|
|
43
|
+
return manifest.version;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Runs the CLI and returns its exit code. Each call to `io.out` or `io.err` is one
|
|
47
|
+
* message; whoever owns the streams adds the trailing newline. Only the first
|
|
48
|
+
* argument is looked at.
|
|
49
|
+
*/
|
|
50
|
+
function main(argv, io) {
|
|
51
|
+
const [first] = argv;
|
|
52
|
+
if (first === void 0 || first === "--help") {
|
|
53
|
+
io.out(USAGE);
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
if (first === "--version") {
|
|
57
|
+
io.out(`hollware ${readVersion()}`);
|
|
58
|
+
return 0;
|
|
59
|
+
}
|
|
60
|
+
if (COMMANDS.some((command) => command.name === first)) {
|
|
61
|
+
io.err(`hollware ${first}: not implemented yet`);
|
|
62
|
+
return 1;
|
|
63
|
+
}
|
|
64
|
+
io.err(`hollware: unknown command or flag "${first}"\n\n${USAGE}`);
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
function isEntryPoint() {
|
|
68
|
+
const entry = process.argv[1];
|
|
69
|
+
if (entry === void 0) return false;
|
|
70
|
+
try {
|
|
71
|
+
return pathToFileURL(realpathSync(entry)).href === import.meta.url;
|
|
72
|
+
} catch {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (isEntryPoint()) process.exitCode = main(process.argv.slice(2), {
|
|
77
|
+
out: (s) => process.stdout.write(`${s}\n`),
|
|
78
|
+
err: (s) => process.stderr.write(`${s}\n`)
|
|
79
|
+
});
|
|
80
|
+
//#endregion
|
|
81
|
+
export { main };
|
package/package.json
CHANGED
|
@@ -1,15 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hollware",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "The Hollware CLI: init, migrate, token, import and export.",
|
|
6
5
|
"homepage": "https://hollware.com",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/hollware/hollware/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
7
10
|
"repository": {
|
|
8
11
|
"type": "git",
|
|
9
12
|
"url": "git+https://github.com/hollware/hollware.git",
|
|
10
13
|
"directory": "packages/cli"
|
|
11
14
|
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"hollware": "./dist/index.mjs"
|
|
17
|
+
},
|
|
12
18
|
"files": [
|
|
13
|
-
"
|
|
14
|
-
]
|
|
15
|
-
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.mts",
|
|
25
|
+
"default": "./dist/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "24.19.2",
|
|
35
|
+
"publint": "0.3.25",
|
|
36
|
+
"typescript": "7.0.2",
|
|
37
|
+
"vite-plus": "1.1.0"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=24.11.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "vp pack",
|
|
44
|
+
"test": "vp test",
|
|
45
|
+
"publint": "publint --strict"
|
|
46
|
+
}
|
|
47
|
+
}
|