@hitslop/cli 0.1.0 → 0.1.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/dist/cli.js +6 -6
- package/package.json +30 -38
package/dist/cli.js
CHANGED
|
@@ -21,17 +21,17 @@ import { manifestSchemaURL, parseManifest } from "@hitslop/schema";
|
|
|
21
21
|
// package.json
|
|
22
22
|
var package_default = {
|
|
23
23
|
name: "@hitslop/cli",
|
|
24
|
-
version: "0.1.
|
|
24
|
+
version: "0.1.2",
|
|
25
25
|
description: "Create, develop, build, register, and publish hitSlop apps.",
|
|
26
26
|
license: "MIT",
|
|
27
27
|
repository: { type: "git", url: "git+https://github.com/hitslop/hitslop.git", directory: "packages/cli" },
|
|
28
|
-
homepage: "https://hitslop.
|
|
28
|
+
homepage: "https://hitslop.com",
|
|
29
29
|
bugs: { url: "https://github.com/hitslop/hitslop/issues" },
|
|
30
30
|
keywords: ["hitslop", "cli", "local-first", "mini-apps"],
|
|
31
31
|
publishConfig: { access: "public" },
|
|
32
32
|
type: "module",
|
|
33
33
|
bin: {
|
|
34
|
-
slop: "
|
|
34
|
+
slop: "dist/cli.js"
|
|
35
35
|
},
|
|
36
36
|
files: ["dist", "templates"],
|
|
37
37
|
scripts: {
|
|
@@ -41,7 +41,7 @@ var package_default = {
|
|
|
41
41
|
},
|
|
42
42
|
dependencies: {
|
|
43
43
|
"@crustjs/core": "^0.0.19",
|
|
44
|
-
"@hitslop/schema": "
|
|
44
|
+
"@hitslop/schema": "^0.1.2",
|
|
45
45
|
"@noble/ed25519": "^3.2.0",
|
|
46
46
|
"fast-png": "^8.0.0",
|
|
47
47
|
fflate: "^0.8.3",
|
|
@@ -1149,7 +1149,7 @@ async function publishSlop(root, flags) {
|
|
|
1149
1149
|
form.set("envelope", JSON.stringify(envelope));
|
|
1150
1150
|
form.set("signature", signature);
|
|
1151
1151
|
form.set("artifact", new Blob([blobPart(packed.bytes)], { type: "application/zip" }), `${built.manifest.slug}.slop.zip`);
|
|
1152
|
-
const endpoint = flags.registry ?? process.env.HITSLOP_REGISTRY_URL ?? "https://hitslop.
|
|
1152
|
+
const endpoint = flags.registry ?? process.env.HITSLOP_REGISTRY_URL ?? "https://api.hitslop.com/api/publish";
|
|
1153
1153
|
const response = await fetch(endpoint, { method: "POST", body: form });
|
|
1154
1154
|
const body = await response.text();
|
|
1155
1155
|
if (!response.ok)
|
|
@@ -1235,7 +1235,7 @@ app = app.command("register", (command) => command.meta({ description: "Build an
|
|
|
1235
1235
|
const result = await installTemplate(args.path, { force: flags.force ?? false, ...flags.preview ? { preview: flags.preview } : {}, ...flags.icon ? { icon: flags.icon } : {}, confirmOverwrite: confirmReplacement });
|
|
1236
1236
|
console.log(`${result.replaced ? "Updated" : "Installed"} ${result.manifest.title} at ${result.directory}`);
|
|
1237
1237
|
}));
|
|
1238
|
-
app = app.command("publish", (command) => command.args([{ name: "path", type: "path", default: "." }]).flags({ registry: { type: "string", description: "Catalog publish endpoint. Defaults to https://hitslop.
|
|
1238
|
+
app = app.command("publish", (command) => command.args([{ name: "path", type: "path", default: "." }]).flags({ registry: { type: "string", description: "Catalog publish endpoint. Defaults to https://api.hitslop.com/api/publish. Set HITSLOP_REGISTRY_URL=http://localhost:3000/api/publish for a local catalog." }, preview: { type: "path" }, icon: { type: "path", description: "Use this 512x512 PNG as the catalog and Finder icon." } }).run(async ({ args, flags }) => {
|
|
1239
1239
|
console.log(await publishSlop(args.path, { ...flags.registry ? { registry: flags.registry } : {}, ...flags.preview ? { preview: flags.preview } : {}, ...flags.icon ? { icon: flags.icon } : {} }));
|
|
1240
1240
|
}));
|
|
1241
1241
|
app = app.command("export", (command) => command.meta({ description: "Export a built .slop document as a full-height PNG or PDF." }).args([{ name: "path", type: "path", default: "." }]).flags({
|
package/package.json
CHANGED
|
@@ -1,43 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitslop/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Create, develop, build, register, and publish hitSlop apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
7
|
-
"
|
|
8
|
-
"url": "
|
|
9
|
-
"
|
|
10
|
-
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"postcss": "^8.5.6",
|
|
36
|
-
"vite": "^8.2.2",
|
|
37
|
-
"zod": "^4.5.2"
|
|
38
|
-
},
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"@types/bun": "latest",
|
|
41
|
-
"typescript": "^7.0.2"
|
|
42
|
-
}
|
|
6
|
+
"repository": { "type": "git", "url": "git+https://github.com/hitslop/hitslop.git", "directory": "packages/cli" },
|
|
7
|
+
"homepage": "https://hitslop.com",
|
|
8
|
+
"bugs": { "url": "https://github.com/hitslop/hitslop/issues" },
|
|
9
|
+
"keywords": ["hitslop", "cli", "local-first", "mini-apps"],
|
|
10
|
+
"publishConfig": { "access": "public" },
|
|
11
|
+
"type": "module",
|
|
12
|
+
"bin": {
|
|
13
|
+
"slop": "dist/cli.js"
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist", "templates"],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "bun ../../scripts/clean-dist.ts && bun build src/cli.ts --target bun --format esm --packages external --outfile dist/cli.js && /bin/chmod +x dist/cli.js",
|
|
18
|
+
"check": "tsc -p tsconfig.json",
|
|
19
|
+
"test": "bun run --cwd ../schema build && bun test"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@crustjs/core": "^0.0.19",
|
|
23
|
+
"@hitslop/schema": "^0.1.2",
|
|
24
|
+
"@noble/ed25519": "^3.2.0",
|
|
25
|
+
"fast-png": "^8.0.0",
|
|
26
|
+
"fflate": "^0.8.3",
|
|
27
|
+
"postcss": "^8.5.6",
|
|
28
|
+
"vite": "^8.2.2",
|
|
29
|
+
"zod": "^4.5.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/bun": "latest",
|
|
33
|
+
"typescript": "^7.0.2"
|
|
34
|
+
}
|
|
43
35
|
}
|