Skip to content

Commit 1f0177a

Browse files
authored
fix: linter warnings, including removing deprecated parse (#511)
* fix linter warnings, including removing deprecated parse * also type case to (so far unenforced) did shape for spaces
1 parent ad6de1e commit 1f0177a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

typescript/packages/common-cli/main.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Load .env file
2-
import { parse } from "https://deno.land/std@0.224.0/flags/mod.ts";
2+
import { parseArgs } from "https://deno.land/std@0.224.0/cli/parse_args.ts";
33
import {
44
CharmManager,
55
compileRecipe,
@@ -9,7 +9,10 @@ import {
99
import { getEntityId, isStream } from "@commontools/runner";
1010
import { Identity } from "@commontools/identity";
1111

12-
let { space, charmId, recipeFile, cause } = parse(Deno.args);
12+
const { space, charmId, recipeFile, cause } = parseArgs(Deno.args, {
13+
string: ["space", "charmId", "recipeFile", "cause"],
14+
default: {},
15+
});
1316

1417
const toolshedUrl = Deno.env.get("TOOLSHED_API_URL") ??
1518
"https://toolshed.saga-castor.ts.net/";
@@ -18,10 +21,10 @@ storage.setRemoteStorage(new URL(toolshedUrl));
1821
setBobbyServerUrl(toolshedUrl);
1922

2023
async function main() {
21-
console.log("params:", { space, charmId, recipeFile, cause });
2224
const identity = await Identity.fromPassphrase("common-cli");
25+
console.log("params:", { space, identity, charmId, recipeFile, cause });
2326
const manager = await CharmManager.open({
24-
space: space ?? identity.did(),
27+
space: (space as `did:key:${string}`) ?? identity.did(),
2528
signer: identity,
2629
});
2730
const charms = await manager.getCharms();

typescript/packages/common-cli/recipes/simpleValue.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import { h } from "@commontools/html";
32
import {
43
cell,

typescript/packages/deno.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)