@rune-cli/rune 0.0.2 → 0.0.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/dist/cli.mjs +42 -26
- package/dist/{index-B-_q5V0A.d.mts → index-BF5_G9J2.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/runtime.d.mts +1 -1
- package/dist/test.d.mts +1 -1
- package/package.json +1 -2
package/dist/cli.mjs
CHANGED
|
@@ -313,6 +313,21 @@ async function writeBuiltRuntimeFiles(distDirectory, manifest) {
|
|
|
313
313
|
await mkdir(distDirectory, { recursive: true });
|
|
314
314
|
await writeFile(path.join(distDirectory, BUILD_MANIFEST_FILENAME), serializeCommandManifest(manifest));
|
|
315
315
|
}
|
|
316
|
+
function renderRuneBuildHelp() {
|
|
317
|
+
return `\
|
|
318
|
+
Build a Rune project into a distributable CLI.
|
|
319
|
+
|
|
320
|
+
Usage: rune build [options]
|
|
321
|
+
|
|
322
|
+
Options:
|
|
323
|
+
--project <path> Path to the Rune project root (default: current directory)
|
|
324
|
+
-h, --help Show this help message
|
|
325
|
+
|
|
326
|
+
Examples:
|
|
327
|
+
rune build
|
|
328
|
+
rune build --project ./my-app
|
|
329
|
+
`;
|
|
330
|
+
}
|
|
316
331
|
async function runBuildCommand(options) {
|
|
317
332
|
let projectRoot = "";
|
|
318
333
|
try {
|
|
@@ -340,14 +355,6 @@ async function runBuildCommand(options) {
|
|
|
340
355
|
return failureResult(error instanceof Error ? error.message : "Failed to run rune build");
|
|
341
356
|
}
|
|
342
357
|
}
|
|
343
|
-
function renderRuneBuildHelp() {
|
|
344
|
-
return [
|
|
345
|
-
"Usage: rune build [--project <path>]",
|
|
346
|
-
"",
|
|
347
|
-
"Build a Rune project into a distributable CLI.",
|
|
348
|
-
""
|
|
349
|
-
].join("\n");
|
|
350
|
-
}
|
|
351
358
|
//#endregion
|
|
352
359
|
//#region src/cli/dev-command.ts
|
|
353
360
|
const DEV_MANIFEST_DIRECTORY_PATH = ".rune";
|
|
@@ -358,6 +365,21 @@ async function writeDevManifest(projectRoot, manifestContents) {
|
|
|
358
365
|
await mkdir(manifestDirectory, { recursive: true });
|
|
359
366
|
await writeFile(manifestPath, manifestContents);
|
|
360
367
|
}
|
|
368
|
+
function renderRuneDevHelp() {
|
|
369
|
+
return `\
|
|
370
|
+
Run a Rune project in development mode.
|
|
371
|
+
|
|
372
|
+
Usage: rune dev [options] [command...]
|
|
373
|
+
|
|
374
|
+
Options:
|
|
375
|
+
--project <path> Path to the Rune project root (default: current directory)
|
|
376
|
+
-h, --help Show this help message
|
|
377
|
+
|
|
378
|
+
Examples:
|
|
379
|
+
rune dev hello
|
|
380
|
+
rune dev --project ./my-app hello
|
|
381
|
+
`;
|
|
382
|
+
}
|
|
361
383
|
async function runDevCommand(options) {
|
|
362
384
|
try {
|
|
363
385
|
const projectRoot = resolveProjectPath(options);
|
|
@@ -375,24 +397,6 @@ async function runDevCommand(options) {
|
|
|
375
397
|
return failureResult(error instanceof Error ? error.message : "Failed to run rune dev");
|
|
376
398
|
}
|
|
377
399
|
}
|
|
378
|
-
function renderRuneDevHelp() {
|
|
379
|
-
return [
|
|
380
|
-
"Usage: rune dev [--project <path>] [--] [command...]",
|
|
381
|
-
"",
|
|
382
|
-
"Run a Rune project in development mode.",
|
|
383
|
-
""
|
|
384
|
-
].join("\n");
|
|
385
|
-
}
|
|
386
|
-
function renderRuneCliHelp() {
|
|
387
|
-
return [
|
|
388
|
-
"Usage: rune <command>",
|
|
389
|
-
"",
|
|
390
|
-
"Commands:",
|
|
391
|
-
" build Build a Rune project into a distributable CLI",
|
|
392
|
-
" dev Run a Rune project in development mode",
|
|
393
|
-
""
|
|
394
|
-
].join("\n");
|
|
395
|
-
}
|
|
396
400
|
//#endregion
|
|
397
401
|
//#region src/cli/rune-cli.ts
|
|
398
402
|
function tryParseProjectOption(argv, index) {
|
|
@@ -460,6 +464,18 @@ function parseBuildArgs(argv) {
|
|
|
460
464
|
}
|
|
461
465
|
return { projectPath };
|
|
462
466
|
}
|
|
467
|
+
function renderRuneCliHelp() {
|
|
468
|
+
return `\
|
|
469
|
+
Usage: rune <command>
|
|
470
|
+
|
|
471
|
+
Commands:
|
|
472
|
+
build Build a Rune project into a distributable CLI
|
|
473
|
+
dev Run a Rune project in development mode
|
|
474
|
+
|
|
475
|
+
Options:
|
|
476
|
+
-h, --help Show this help message
|
|
477
|
+
`;
|
|
478
|
+
}
|
|
463
479
|
async function runRuneCli(options) {
|
|
464
480
|
const [subcommand, ...restArgs] = options.argv;
|
|
465
481
|
if (!subcommand || isHelpFlag(subcommand)) return successResult(renderRuneCliHelp());
|
|
@@ -283,4 +283,4 @@ interface CommandExecutionResult {
|
|
|
283
283
|
readonly stderr: string;
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
|
-
export {
|
|
286
|
+
export { DefinedCommand as a, PrimitiveArgField as c, SchemaArgField as d, SchemaOptionField as f, CommandOptionField as i, PrimitiveFieldType as l, CommandContext as n, ExecuteCommandInput as o, defineCommand as p, CommandExecutionResult as r, InferExecutionFields as s, CommandArgField as t, PrimitiveOptionField as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { defineCommand };
|
|
1
|
+
import { a as DefinedCommand, c as PrimitiveArgField, d as SchemaArgField, f as SchemaOptionField, i as CommandOptionField, l as PrimitiveFieldType, n as CommandContext, o as ExecuteCommandInput, p as defineCommand, r as CommandExecutionResult, s as InferExecutionFields, t as CommandArgField, u as PrimitiveOptionField } from "./index-BF5_G9J2.mjs";
|
|
2
|
+
export { type CommandArgField, type CommandContext, type CommandExecutionResult, type CommandOptionField, type DefinedCommand, type ExecuteCommandInput, type InferExecutionFields, type PrimitiveArgField, type PrimitiveFieldType, type PrimitiveOptionField, type SchemaArgField, type SchemaOptionField, defineCommand };
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as DefinedCommand, i as CommandOptionField, r as CommandExecutionResult, t as CommandArgField } from "./index-BF5_G9J2.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/manifest/manifest-types.d.ts
|
|
4
4
|
type CommandManifestPath = readonly string[];
|
package/dist/test.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as DefinedCommand, i as CommandOptionField, o as ExecuteCommandInput, r as CommandExecutionResult, s as InferExecutionFields, t as CommandArgField } from "./index-BF5_G9J2.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/test.d.ts
|
|
4
4
|
type RunCommandOptions<TOptions, TArgs> = ExecuteCommandInput<TOptions, TArgs>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rune-cli/rune",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Rune is a CLI framework built around the concept of file-based command routing.",
|
|
5
5
|
"homepage": "https://github.com/morinokami/rune#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "24.12.0",
|
|
46
46
|
"@typescript/native-preview": "7.0.0-dev.20260317.1",
|
|
47
|
-
"bumpp": "11.0.1",
|
|
48
47
|
"typescript": "5.9.3",
|
|
49
48
|
"vite-plus": "v0.1.13",
|
|
50
49
|
"@rune-cli/core": "0.0.0"
|