@baseline-markets/cli 0.2.0 → 0.2.1
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/index.js +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -192,7 +192,8 @@ function trimDecimal(value) {
|
|
|
192
192
|
// src/commands/launch.ts
|
|
193
193
|
import { BaselineSDK as BaselineSDK2, serializeCalls } from "@baseline-markets/sdk";
|
|
194
194
|
import { z as z3 } from "incur";
|
|
195
|
-
import { writeFile } from "node:fs/promises";
|
|
195
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
196
|
+
import { dirname } from "node:path";
|
|
196
197
|
import {
|
|
197
198
|
createPublicClient as createPublicClient3,
|
|
198
199
|
http as http3,
|
|
@@ -302,6 +303,7 @@ var launchCommand = {
|
|
|
302
303
|
...c.options.execute ? { execution: await executeLaunchArtifact(artifact, c.options) } : {}
|
|
303
304
|
};
|
|
304
305
|
if (c.options.output) {
|
|
306
|
+
await mkdir(dirname(c.options.output), { recursive: true });
|
|
305
307
|
await writeFile(c.options.output, `${JSON.stringify(result, null, 2)}
|
|
306
308
|
`);
|
|
307
309
|
}
|
|
@@ -407,9 +409,9 @@ async function executeLaunchArtifact(artifact, options) {
|
|
|
407
409
|
|
|
408
410
|
// src/env.ts
|
|
409
411
|
import { existsSync, readFileSync } from "node:fs";
|
|
410
|
-
import { dirname, resolve } from "node:path";
|
|
412
|
+
import { dirname as dirname2, resolve } from "node:path";
|
|
411
413
|
import { fileURLToPath } from "node:url";
|
|
412
|
-
var packageRoot = resolve(
|
|
414
|
+
var packageRoot = resolve(dirname2(fileURLToPath(import.meta.url)), "..");
|
|
413
415
|
var workspaceRoot = resolve(packageRoot, "../..");
|
|
414
416
|
var skillsGlob = resolve(packageRoot, "skills/*");
|
|
415
417
|
function loadCliEnv() {
|
|
@@ -446,7 +448,7 @@ function loadEnv(path) {
|
|
|
446
448
|
// src/index.ts
|
|
447
449
|
loadCliEnv();
|
|
448
450
|
var cli = Cli.create("baseline", {
|
|
449
|
-
version: "0.
|
|
451
|
+
version: "0.2.0",
|
|
450
452
|
description: "Baseline Markets CLI",
|
|
451
453
|
sync: {
|
|
452
454
|
include: [skillsGlob],
|
|
@@ -456,9 +458,7 @@ var cli = Cli.create("baseline", {
|
|
|
456
458
|
]
|
|
457
459
|
}
|
|
458
460
|
}).command("launch", launchCommand).command("info", infoCommand);
|
|
459
|
-
|
|
460
|
-
await cli.serve();
|
|
461
|
-
}
|
|
461
|
+
await cli.serve();
|
|
462
462
|
export {
|
|
463
463
|
cli
|
|
464
464
|
};
|