@dirwell/cli 0.0.0-stage → 0.0.1-alpha
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 +18 -2
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +28 -0
- package/dist/bin.mjs.map +1 -0
- package/dist/index.d.mts +16 -0
- package/dist/index.mjs +2 -0
- package/dist/src-7nVpwBzA.mjs +125 -0
- package/dist/src-7nVpwBzA.mjs.map +1 -0
- package/package.json +39 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dirwell 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,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @dirwell/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Unreleased alpha workspace. Install a theme separately; no default theme is selected.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @dirwell/cli@alpha @dirwell/theme-plain@alpha
|
|
7
|
+
npx dirwell build ./files --out ./generated --theme '@dirwell/theme-plain#createPlainTheme'
|
|
8
|
+
npx dirwell server ./files --theme '@dirwell/theme-plain#createPlainTheme'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`--live` enables shared SSE revision notifications in Svelte/Vue clients. Plain remains script-free.
|
|
12
|
+
|
|
13
|
+
`build` writes a dedicated static output tree. `server` renders HTML and reads listings/files live without generating a tree or using a watcher. It defaults to loopback, an ephemeral port, and safe media previews; HTML, SVG and other files download. Use `--port`, `--host` and `--mount` explicitly when needed. `PORT` is accepted for development proxies such as Portless.
|
|
14
|
+
|
|
15
|
+
A JavaScript module passed through `--config` exports `{ theme, listing, build, server }`. Build options retain core filtering, sorting, metadata, symlinks and output-name policies. Server options provide filtering, sorting, authorization and header hooks. This is executable project configuration. For theme factories, use `--theme 'package#exportName'`; the package resolves from the working project. Unsupported legacy dev/daemon commands do not silently change behavior.
|
|
16
|
+
|
|
17
|
+
`--page-size` and `--block-size` override the corresponding static policy as a pair. When only one is given, the other publication strategy is `all`. HTTP cache defaults to no-store; headers are configurable through the server config.
|
|
18
|
+
|
|
19
|
+
Server mode replaces file-data rebuild/watch loops. Editing theme source still requires its framework compiler and a server restart; this is not framework HMR. Farm is not part of this server runtime.
|
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { t as runCli } from "./src-7nVpwBzA.mjs";
|
|
3
|
+
//#region src/bin.ts
|
|
4
|
+
try {
|
|
5
|
+
const server = await runCli(process.argv.slice(2));
|
|
6
|
+
if (server !== null) {
|
|
7
|
+
let closing = false;
|
|
8
|
+
const close = async () => {
|
|
9
|
+
if (closing) return;
|
|
10
|
+
closing = true;
|
|
11
|
+
try {
|
|
12
|
+
await server.close();
|
|
13
|
+
} catch (error) {
|
|
14
|
+
console.error(error instanceof Error ? error.message : "Shutdown failed");
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
process.once("SIGINT", close);
|
|
19
|
+
process.once("SIGTERM", close);
|
|
20
|
+
}
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.error(error instanceof Error ? error.message : "Dirwell failed");
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export {};
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=bin.mjs.map
|
package/dist/bin.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runCli } from \"./index.ts\";\ntry {\n const server = await runCli(process.argv.slice(2));\n if (server !== null) {\n let closing = false;\n const close = async () => {\n if (closing) return;\n closing = true;\n try {\n await server.close();\n } catch (error) {\n console.error(error instanceof Error ? error.message : \"Shutdown failed\");\n process.exitCode = 1;\n }\n };\n process.once(\"SIGINT\", close);\n process.once(\"SIGTERM\", close);\n }\n} catch (error) {\n console.error(error instanceof Error ? error.message : \"Dirwell failed\");\n process.exitCode = 1;\n}\n"],"mappings":";;;AAEA,IAAI;CACF,MAAM,SAAS,MAAM,OAAO,QAAQ,KAAK,MAAM,CAAC,CAAC;CACjD,IAAI,WAAW,MAAM;EACnB,IAAI,UAAU;EACd,MAAM,QAAQ,YAAY;GACxB,IAAI,SAAS;GACb,UAAU;GACV,IAAI;IACF,MAAM,OAAO,MAAM;GACrB,SAAS,OAAO;IACd,QAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,iBAAiB;IACxE,QAAQ,WAAW;GACrB;EACF;EACA,QAAQ,KAAK,UAAU,KAAK;EAC5B,QAAQ,KAAK,WAAW,KAAK;CAC/B;AACF,SAAS,OAAO;CACd,QAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,gBAAgB;CACvE,QAAQ,WAAW;AACrB"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ExplorerTheme, GenerateOptions, ListingPolicy } from "@dirwell/core";
|
|
2
|
+
import { ExplorerHandlerOptions } from "@dirwell/server";
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
export interface CliConfig {
|
|
5
|
+
readonly build?: Omit<GenerateOptions, "sourceDir" | "outputDir" | "theme" | "listing">;
|
|
6
|
+
readonly theme?: ExplorerTheme;
|
|
7
|
+
readonly listing?: ListingPolicy;
|
|
8
|
+
readonly server?: Omit<ExplorerHandlerOptions, "root" | "theme" | "listing">;
|
|
9
|
+
}
|
|
10
|
+
/** Parse explicit commands; return server ownership to the caller for graceful shutdown. */
|
|
11
|
+
export declare function runCli(args: readonly string[], cwd?: string, log?: (value: string) => void): Promise<{
|
|
12
|
+
url: string;
|
|
13
|
+
close: () => Promise<void>;
|
|
14
|
+
} | null>;
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
import { resolve } from "import-meta-resolve";
|
|
4
|
+
import { parseArgs } from "node:util";
|
|
5
|
+
import { generateExplorer } from "@dirwell/core";
|
|
6
|
+
import { startExplorerServer } from "@dirwell/server/node";
|
|
7
|
+
//#region src/index.ts
|
|
8
|
+
const help = `Usage:
|
|
9
|
+
dirwell build <source> --out <output> --theme <module>#<factory>
|
|
10
|
+
dirwell server <source> --theme <module>#<factory> [--port 3000]
|
|
11
|
+
|
|
12
|
+
Install your theme separately. No theme is installed or selected implicitly.
|
|
13
|
+
Use --config <file.mjs> for a default export with theme, listing, and server hooks.
|
|
14
|
+
Build options: --mode ssg|mpa, --urls relative|base|html-base, --base <path>
|
|
15
|
+
Server options: --host <host>, --port <port>, --mount <path>, --live
|
|
16
|
+
Both modes: --page-size <n>, --block-size <n>
|
|
17
|
+
Live server reads on request. It does not build an output tree or require watch mode.
|
|
18
|
+
`;
|
|
19
|
+
const positive = (value, name) => {
|
|
20
|
+
if (value === void 0) return void 0;
|
|
21
|
+
const number = Number(value);
|
|
22
|
+
if (!Number.isSafeInteger(number) || number < 1) throw new TypeError(`${name} must be a positive integer`);
|
|
23
|
+
return number;
|
|
24
|
+
};
|
|
25
|
+
async function loadTheme(specifier, cwd) {
|
|
26
|
+
const delimiter = specifier.lastIndexOf("#"), name = delimiter < 0 ? specifier : specifier.slice(0, delimiter), exported = delimiter < 0 ? "default" : specifier.slice(delimiter + 1);
|
|
27
|
+
if (!name || !exported) throw new TypeError("Theme needs a module and export name");
|
|
28
|
+
const module = await (name.startsWith(".") || path.isAbsolute(name) ? import(pathToFileURL(path.resolve(cwd, name)).href) : import(resolve(name, pathToFileURL(path.join(cwd, "package.json")).href)));
|
|
29
|
+
const candidate = typeof module[exported] === "function" ? await module[exported]() : module[exported];
|
|
30
|
+
if (typeof candidate !== "object" || candidate === null || !("name" in candidate) || typeof candidate.name !== "string" || !("render" in candidate) || typeof candidate.render !== "function") throw new TypeError("Theme export must be a theme or theme factory");
|
|
31
|
+
return candidate;
|
|
32
|
+
}
|
|
33
|
+
/** Parse explicit commands; return server ownership to the caller for graceful shutdown. */
|
|
34
|
+
async function runCli(args, cwd = process.cwd(), log = console.log) {
|
|
35
|
+
const parsed = parseArgs({
|
|
36
|
+
args: [...args],
|
|
37
|
+
allowPositionals: true,
|
|
38
|
+
options: {
|
|
39
|
+
help: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
short: "h"
|
|
42
|
+
},
|
|
43
|
+
live: { type: "boolean" },
|
|
44
|
+
theme: { type: "string" },
|
|
45
|
+
config: { type: "string" },
|
|
46
|
+
out: { type: "string" },
|
|
47
|
+
mode: { type: "string" },
|
|
48
|
+
urls: { type: "string" },
|
|
49
|
+
base: { type: "string" },
|
|
50
|
+
host: { type: "string" },
|
|
51
|
+
port: { type: "string" },
|
|
52
|
+
mount: { type: "string" },
|
|
53
|
+
"page-size": { type: "string" },
|
|
54
|
+
"block-size": { type: "string" }
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
if (parsed.values.help) {
|
|
58
|
+
log(help);
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const [command, source] = parsed.positionals;
|
|
62
|
+
if (!["build", "server"].includes(command ?? "") || source === void 0 || parsed.positionals.length !== 2) throw new TypeError(help);
|
|
63
|
+
let config = {};
|
|
64
|
+
if (parsed.values.config) {
|
|
65
|
+
const module = await import(pathToFileURL(path.resolve(cwd, parsed.values.config)).href);
|
|
66
|
+
if (typeof module.default !== "object" || module.default === null) throw new TypeError("Config must export an object");
|
|
67
|
+
config = module.default;
|
|
68
|
+
}
|
|
69
|
+
const theme = parsed.values.theme ? await loadTheme(parsed.values.theme, cwd) : config.theme;
|
|
70
|
+
if (theme === void 0) throw new TypeError("Choose an explicit --theme or config.theme. Install the theme package separately.");
|
|
71
|
+
const pageSize = positive(parsed.values["page-size"], "page-size"), blockSize = positive(parsed.values["block-size"], "block-size");
|
|
72
|
+
const listing = pageSize !== void 0 || blockSize !== void 0 ? {
|
|
73
|
+
html: pageSize === void 0 ? { strategy: "all" } : {
|
|
74
|
+
strategy: "paged",
|
|
75
|
+
pageSize
|
|
76
|
+
},
|
|
77
|
+
data: blockSize === void 0 ? { strategy: "all" } : {
|
|
78
|
+
strategy: "blocks",
|
|
79
|
+
blockSize
|
|
80
|
+
}
|
|
81
|
+
} : config.listing;
|
|
82
|
+
const root = path.resolve(cwd, source);
|
|
83
|
+
if (command === "build") {
|
|
84
|
+
if (parsed.values.out === void 0) throw new TypeError("Build requires --out pointing to a dedicated generated output tree");
|
|
85
|
+
const mode = parsed.values.mode ?? config.build?.mode ?? "ssg", urlStrategy = parsed.values.urls ?? config.build?.urlStrategy ?? "relative";
|
|
86
|
+
if (mode !== "ssg" && mode !== "mpa") throw new TypeError("mode must be ssg or mpa");
|
|
87
|
+
if (![
|
|
88
|
+
"relative",
|
|
89
|
+
"base",
|
|
90
|
+
"html-base"
|
|
91
|
+
].includes(urlStrategy)) throw new TypeError("Unknown URL strategy");
|
|
92
|
+
await generateExplorer({
|
|
93
|
+
...config.build,
|
|
94
|
+
sourceDir: root,
|
|
95
|
+
outputDir: path.resolve(cwd, parsed.values.out),
|
|
96
|
+
theme,
|
|
97
|
+
mode,
|
|
98
|
+
urlStrategy,
|
|
99
|
+
...parsed.values.base === void 0 ? {} : { base: parsed.values.base },
|
|
100
|
+
...listing === void 0 ? {} : { listing }
|
|
101
|
+
});
|
|
102
|
+
log(`Built ${parsed.values.out}`);
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
const port = Number(parsed.values.port ?? process.env.PORT ?? "0");
|
|
106
|
+
if (!Number.isSafeInteger(port) || port < 0 || port > 65535) throw new TypeError("port must be between 0 and 65535");
|
|
107
|
+
const server = await startExplorerServer({
|
|
108
|
+
...config.server,
|
|
109
|
+
...parsed.values.live ? { live: {} } : {},
|
|
110
|
+
root,
|
|
111
|
+
theme,
|
|
112
|
+
port,
|
|
113
|
+
...listing === void 0 ? {} : { listing },
|
|
114
|
+
...pageSize === void 0 ? {} : { pageSize },
|
|
115
|
+
...blockSize === void 0 ? {} : { blockSize },
|
|
116
|
+
...parsed.values.host === void 0 ? {} : { host: parsed.values.host },
|
|
117
|
+
...parsed.values.mount === void 0 ? {} : { mountPath: parsed.values.mount }
|
|
118
|
+
});
|
|
119
|
+
log(`Dirwell server: ${server.url}${parsed.values.mount ?? config.server?.mountPath ?? ""}/browse/`);
|
|
120
|
+
return server;
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
export { runCli as t };
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=src-7nVpwBzA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-7nVpwBzA.mjs","names":["resolveModule"],"sources":["../src/index.ts"],"sourcesContent":["import path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { resolve as resolveModule } from \"import-meta-resolve\";\nimport { parseArgs } from \"node:util\";\nimport { generateExplorer } from \"@dirwell/core\";\nimport type { ExplorerTheme, ListingPolicy, GenerateOptions } from \"@dirwell/core\";\nimport { startExplorerServer } from \"@dirwell/server/node\";\nimport type { ExplorerHandlerOptions } from \"@dirwell/server\";\n\nexport interface CliConfig {\n readonly build?: Omit<GenerateOptions, \"sourceDir\" | \"outputDir\" | \"theme\" | \"listing\">;\n readonly theme?: ExplorerTheme;\n readonly listing?: ListingPolicy;\n readonly server?: Omit<ExplorerHandlerOptions, \"root\" | \"theme\" | \"listing\">;\n}\nconst help = `Usage:\n dirwell build <source> --out <output> --theme <module>#<factory>\n dirwell server <source> --theme <module>#<factory> [--port 3000]\n\nInstall your theme separately. No theme is installed or selected implicitly.\nUse --config <file.mjs> for a default export with theme, listing, and server hooks.\nBuild options: --mode ssg|mpa, --urls relative|base|html-base, --base <path>\nServer options: --host <host>, --port <port>, --mount <path>, --live\nBoth modes: --page-size <n>, --block-size <n>\nLive server reads on request. It does not build an output tree or require watch mode.\n`;\nconst positive = (value: string | undefined, name: string): number | undefined => {\n if (value === undefined) return undefined;\n const number = Number(value);\n if (!Number.isSafeInteger(number) || number < 1)\n throw new TypeError(`${name} must be a positive integer`);\n return number;\n};\nasync function loadTheme(specifier: string, cwd: string): Promise<ExplorerTheme> {\n const delimiter = specifier.lastIndexOf(\"#\"),\n name = delimiter < 0 ? specifier : specifier.slice(0, delimiter),\n exported = delimiter < 0 ? \"default\" : specifier.slice(delimiter + 1);\n if (!name || !exported) throw new TypeError(\"Theme needs a module and export name\");\n const moduleUrl =\n name.startsWith(\".\") || path.isAbsolute(name)\n ? pathToFileURL(path.resolve(cwd, name)).href\n : resolveModule(name, pathToFileURL(path.join(cwd, \"package.json\")).href);\n const module: Record<string, unknown> = await import(moduleUrl);\n const candidate =\n typeof module[exported] === \"function\" ? await module[exported]() : module[exported];\n if (\n typeof candidate !== \"object\" ||\n candidate === null ||\n !(\"name\" in candidate) ||\n typeof candidate.name !== \"string\" ||\n !(\"render\" in candidate) ||\n typeof candidate.render !== \"function\"\n )\n throw new TypeError(\"Theme export must be a theme or theme factory\");\n return candidate as ExplorerTheme;\n}\n/** Parse explicit commands; return server ownership to the caller for graceful shutdown. */\nexport async function runCli(\n args: readonly string[],\n cwd = process.cwd(),\n log: (value: string) => void = console.log,\n) {\n const parsed = parseArgs({\n args: [...args],\n allowPositionals: true,\n options: {\n help: { type: \"boolean\", short: \"h\" },\n live: { type: \"boolean\" },\n theme: { type: \"string\" },\n config: { type: \"string\" },\n out: { type: \"string\" },\n mode: { type: \"string\" },\n urls: { type: \"string\" },\n base: { type: \"string\" },\n host: { type: \"string\" },\n port: { type: \"string\" },\n mount: { type: \"string\" },\n \"page-size\": { type: \"string\" },\n \"block-size\": { type: \"string\" },\n },\n });\n if (parsed.values.help) {\n log(help);\n return null;\n }\n const [command, source] = parsed.positionals;\n if (\n ![\"build\", \"server\"].includes(command ?? \"\") ||\n source === undefined ||\n parsed.positionals.length !== 2\n )\n throw new TypeError(help);\n let config: CliConfig = {};\n if (parsed.values.config) {\n const module = await import(pathToFileURL(path.resolve(cwd, parsed.values.config)).href);\n if (typeof module.default !== \"object\" || module.default === null)\n throw new TypeError(\"Config must export an object\");\n config = module.default;\n }\n const theme = parsed.values.theme ? await loadTheme(parsed.values.theme, cwd) : config.theme;\n if (theme === undefined)\n throw new TypeError(\n \"Choose an explicit --theme or config.theme. Install the theme package separately.\",\n );\n const pageSize = positive(parsed.values[\"page-size\"], \"page-size\"),\n blockSize = positive(parsed.values[\"block-size\"], \"block-size\");\n const listing: ListingPolicy | undefined =\n pageSize !== undefined || blockSize !== undefined\n ? {\n html: pageSize === undefined ? { strategy: \"all\" } : { strategy: \"paged\", pageSize },\n data: blockSize === undefined ? { strategy: \"all\" } : { strategy: \"blocks\", blockSize },\n }\n : config.listing;\n const root = path.resolve(cwd, source);\n if (command === \"build\") {\n if (parsed.values.out === undefined)\n throw new TypeError(\"Build requires --out pointing to a dedicated generated output tree\");\n const mode = parsed.values.mode ?? config.build?.mode ?? \"ssg\",\n urlStrategy = parsed.values.urls ?? config.build?.urlStrategy ?? \"relative\";\n if (mode !== \"ssg\" && mode !== \"mpa\") throw new TypeError(\"mode must be ssg or mpa\");\n if (![\"relative\", \"base\", \"html-base\"].includes(urlStrategy))\n throw new TypeError(\"Unknown URL strategy\");\n await generateExplorer({\n ...config.build,\n sourceDir: root,\n outputDir: path.resolve(cwd, parsed.values.out),\n theme,\n mode,\n urlStrategy: urlStrategy as \"relative\" | \"base\" | \"html-base\",\n ...(parsed.values.base === undefined ? {} : { base: parsed.values.base }),\n ...(listing === undefined ? {} : { listing }),\n });\n log(`Built ${parsed.values.out}`);\n return null;\n }\n const port = Number(parsed.values.port ?? process.env.PORT ?? \"0\");\n if (!Number.isSafeInteger(port) || port < 0 || port > 65535)\n throw new TypeError(\"port must be between 0 and 65535\");\n const server = await startExplorerServer({\n ...config.server,\n ...(parsed.values.live ? { live: {} } : {}),\n root,\n theme,\n port,\n ...(listing === undefined ? {} : { listing }),\n ...(pageSize === undefined ? {} : { pageSize }),\n ...(blockSize === undefined ? {} : { blockSize }),\n ...(parsed.values.host === undefined ? {} : { host: parsed.values.host }),\n ...(parsed.values.mount === undefined ? {} : { mountPath: parsed.values.mount }),\n });\n log(\n `Dirwell server: ${server.url}${parsed.values.mount ?? config.server?.mountPath ?? \"\"}/browse/`,\n );\n return server;\n}\n"],"mappings":";;;;;;;AAeA,MAAM,OAAO;;;;;;;;;;;AAWb,MAA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vE,GAAI,OAAO,OAAO,UAAU,KAAA,IAAY,CAAC,IAAI,EAAE,WAAW,OAAO,OAAO,MAAM;CAChF,CAAC;CACD,IACE,mBAAmB,OAAO,MAAM,OAAO,OAAO,SAAS,OAAO,QAAQ,aAAa,GAAG,SACxF;CACA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dirwell/cli",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.1-alpha",
|
|
4
|
+
"description": "Explicit-theme build and live-server commands for Dirwell.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/vp-tw/dirwell.git",
|
|
9
|
+
"directory": "packages/cli"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"dirwell": "./dist/bin.mjs"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.mts",
|
|
23
|
+
"import": "./dist/index.mjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"provenance": true,
|
|
29
|
+
"tag": "alpha"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@dirwell/core": "0.0.1-alpha",
|
|
33
|
+
"@dirwell/server": "0.0.1-alpha",
|
|
34
|
+
"import-meta-resolve": "4.2.0"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=22.12.0"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "vp pack"
|
|
41
|
+
}
|
|
6
42
|
}
|