@memfork/cli 0.1.2 → 0.1.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.
@@ -56,6 +56,7 @@ async function cmdInitQuick() {
56
56
  console.log("");
57
57
  const network = await select({
58
58
  message: "Sui network",
59
+ default: "mainnet",
59
60
  choices: [
60
61
  { value: "mainnet", name: "mainnet (recommended — gas sponsored by MemForks)" },
61
62
  { value: "testnet", name: "testnet (free gas via faucet)" },
@@ -223,7 +224,7 @@ async function cmdInitManual() {
223
224
  // ── Write ──────────────────────────────────────────────────────────────────────
224
225
  writeProjectConfig({
225
226
  treeId,
226
- network: network ?? "testnet",
227
+ network: network ?? "mainnet",
227
228
  defaultBranch,
228
229
  ...(rpcUrl ? { rpcUrl } : {}),
229
230
  ...(packageId ? { packageId } : {}),
@@ -244,7 +245,7 @@ async function cmdInitManual() {
244
245
  const client = await MemForksClient.connect({
245
246
  treeId,
246
247
  signer: resolvedKey,
247
- network: network ?? "testnet",
248
+ network: network ?? "mainnet",
248
249
  ...(rpcUrl ? { rpcUrl } : {}),
249
250
  ...(packageId ? { packageId } : {}),
250
251
  });
@@ -37,7 +37,7 @@ function resolveMcpCreds() {
37
37
  const tree = creds.trees[project.treeId];
38
38
  if (!tree?.memwalAccountId || !tree?.memwalKey)
39
39
  return null;
40
- const rawNetwork = project.network ?? "testnet";
40
+ const rawNetwork = project.network ?? "mainnet";
41
41
  const network = (rawNetwork === "mainnet" ? "mainnet" : "testnet");
42
42
  const relayer = MEMWAL_CONSTANTS[network].relayer;
43
43
  return {
@@ -40,7 +40,7 @@ export async function cmdJoin() {
40
40
  process.exit(1);
41
41
  }
42
42
  const treeId = project.treeId;
43
- const network = project.network ?? "testnet";
43
+ const network = project.network ?? "mainnet";
44
44
  console.log(dim(` Found .memfork/config.json`));
45
45
  console.log(dim(` tree: ${treeId}`));
46
46
  console.log(dim(` network: ${network}`));
@@ -339,7 +339,7 @@ export async function cmdGrantMemwal(opts) {
339
339
  const { cfg } = await getClient();
340
340
  const { addDelegateKey } = await import("@mysten-incubation/memwal/account");
341
341
  const { JsonRpcHTTPTransport, SuiJsonRpcClient, getJsonRpcFullnodeUrl } = await import("@mysten/sui/jsonRpc");
342
- const network = cfg.network ?? "testnet";
342
+ const network = cfg.network ?? "mainnet";
343
343
  const consts = MEMWAL_CONSTANTS[network === "mainnet" ? "mainnet" : "testnet"];
344
344
  const rpcUrl = getJsonRpcFullnodeUrl(network);
345
345
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -45,7 +45,7 @@ async function handleApiConfig(res) {
45
45
  const project = readProjectConfig();
46
46
  const creds = readCredentials();
47
47
  const treeId = project?.treeId ?? creds.default ?? null;
48
- const network = (project?.network ?? "testnet");
48
+ const network = (project?.network ?? "mainnet");
49
49
  const stored = treeId ? creds.trees[treeId] : undefined;
50
50
  json(res, {
51
51
  treeId,
@@ -76,7 +76,7 @@ async function handleApiFacts(res, url) {
76
76
  const project = readProjectConfig();
77
77
  const creds = readCredentials();
78
78
  const treeId = project?.treeId ?? creds.default;
79
- const network = (project?.network ?? "testnet");
79
+ const network = (project?.network ?? "mainnet");
80
80
  const stored = treeId ? creds.trees[treeId] : undefined;
81
81
  if (!stored?.memwalKey || !stored?.memwalAccountId || !treeId) {
82
82
  json(res, { facts: [] });
@@ -109,7 +109,7 @@ async function handleApiHistory(res, url) {
109
109
  const project = readProjectConfig();
110
110
  const creds = readCredentials();
111
111
  const treeId = project?.treeId ?? creds.default;
112
- const network = (project?.network ?? "testnet");
112
+ const network = (project?.network ?? "mainnet");
113
113
  const stored = treeId ? creds.trees[treeId] : undefined;
114
114
  if (!stored?.memwalKey || !stored?.memwalAccountId || !treeId) {
115
115
  json(res, { commits: [] });
package/dist/config.d.ts CHANGED
@@ -37,7 +37,7 @@ export declare const MEMWAL_CONSTANTS: {
37
37
  export interface ProjectConfig {
38
38
  /** Sui MemoryTree object ID. */
39
39
  treeId?: string;
40
- /** Sui network. Default: "testnet". */
40
+ /** Sui network. Default: "mainnet". */
41
41
  network?: "testnet" | "mainnet" | "devnet" | "localnet";
42
42
  /** Default branch name. Default: "main". */
43
43
  defaultBranch?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memfork/cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "MemForks CLI — init, commit, recall, merge, install plugins",
5
5
  "type": "module",
6
6
  "bin": {