Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions typescript/packages/common-cli/main.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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/";
Expand All @@ -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();
Expand Down
1 change: 0 additions & 1 deletion typescript/packages/common-cli/recipes/simpleValue.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-nocheck
import { h } from "@commontools/html";
import {
cell,
Expand Down
3 changes: 1 addition & 2 deletions typescript/packages/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading