diff --git a/typescript/packages/common-cli/main.ts b/typescript/packages/common-cli/main.ts index 1f547040f..d5182ff06 100644 --- a/typescript/packages/common-cli/main.ts +++ b/typescript/packages/common-cli/main.ts @@ -1,5 +1,5 @@ // Load .env file -import { parse } from "https://deno.land/std@0.224.0/flags/mod.ts"; +import { parseArgs } from "https://deno.land/std@0.224.0/cli/parse_args.ts"; import { CharmManager, compileRecipe, @@ -9,7 +9,10 @@ import { import { getEntityId, isStream } from "@commontools/runner"; import { Identity } from "@commontools/identity"; -let { space, charmId, recipeFile, cause } = parse(Deno.args); +const { space, charmId, recipeFile, cause } = parseArgs(Deno.args, { + string: ["space", "charmId", "recipeFile", "cause"], + default: {}, +}); const toolshedUrl = Deno.env.get("TOOLSHED_API_URL") ?? "https://toolshed.saga-castor.ts.net/"; @@ -18,10 +21,10 @@ storage.setRemoteStorage(new URL(toolshedUrl)); setBobbyServerUrl(toolshedUrl); async function main() { - console.log("params:", { space, charmId, recipeFile, cause }); const identity = await Identity.fromPassphrase("common-cli"); + console.log("params:", { space, identity, charmId, recipeFile, cause }); const manager = await CharmManager.open({ - space: space ?? identity.did(), + space: (space as `did:key:${string}`) ?? identity.did(), signer: identity, }); const charms = await manager.getCharms(); diff --git a/typescript/packages/common-cli/recipes/simpleValue.tsx b/typescript/packages/common-cli/recipes/simpleValue.tsx index 880cb39fd..8ab5d061c 100644 --- a/typescript/packages/common-cli/recipes/simpleValue.tsx +++ b/typescript/packages/common-cli/recipes/simpleValue.tsx @@ -1,4 +1,3 @@ -// @ts-nocheck import { h } from "@commontools/html"; import { cell, diff --git a/typescript/packages/deno.lock b/typescript/packages/deno.lock index 9219415fd..79591d860 100644 --- a/typescript/packages/deno.lock +++ b/typescript/packages/deno.lock @@ -7251,8 +7251,7 @@ ], "packageJson": { "dependencies": [ - "npm:merkle-reference@^2.0.1", - "npm:multiformats@^13.3.2" + "npm:merkle-reference@^2.0.1" ] } },