@moltium/world-cli 0.1.3 → 0.1.5
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 +12 -56
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -395,7 +395,7 @@ var initCommand = new Command("init").description("Initialize a new world projec
|
|
|
395
395
|
"deploy:contracts": "moltium-world deploy"
|
|
396
396
|
},
|
|
397
397
|
dependencies: {
|
|
398
|
-
"@moltium/world-core": "^0.1.
|
|
398
|
+
"@moltium/world-core": "^0.1.5",
|
|
399
399
|
dotenv: "^16.4.0"
|
|
400
400
|
},
|
|
401
401
|
devDependencies: {
|
|
@@ -596,35 +596,13 @@ tokenCommand.command("deploy").description("Deploy custom ERC20 token").option("
|
|
|
596
596
|
TOKEN_DECIMALS: tokenConfig.decimals?.toString() || "18"
|
|
597
597
|
};
|
|
598
598
|
const worldCorePath = path3.join(process.cwd(), "node_modules", "@moltium", "world-core");
|
|
599
|
-
const libPath = path3.join(worldCorePath, "lib");
|
|
600
599
|
try {
|
|
601
|
-
await fs3.access(
|
|
600
|
+
await fs3.access(worldCorePath);
|
|
602
601
|
} catch {
|
|
603
|
-
deploySpinner.
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
cwd: worldCorePath,
|
|
608
|
-
stdio: "pipe"
|
|
609
|
-
});
|
|
610
|
-
} catch {
|
|
611
|
-
execSync("git init", {
|
|
612
|
-
cwd: worldCorePath,
|
|
613
|
-
stdio: "pipe"
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
execSync("forge install --no-commit", {
|
|
617
|
-
cwd: worldCorePath,
|
|
618
|
-
stdio: "pipe"
|
|
619
|
-
});
|
|
620
|
-
deploySpinner.text = "Deploying token contract...";
|
|
621
|
-
} catch (error) {
|
|
622
|
-
deploySpinner.fail();
|
|
623
|
-
console.error(chalk2.red("\\n\u274C Failed to install Foundry dependencies"));
|
|
624
|
-
console.log(chalk2.yellow("\\nPlease ensure Foundry is installed: https://getfoundry.sh/"));
|
|
625
|
-
console.log(chalk2.gray(`\\nThen run manually: cd ${worldCorePath} && git init && forge install\\n`));
|
|
626
|
-
process.exit(1);
|
|
627
|
-
}
|
|
602
|
+
deploySpinner.fail();
|
|
603
|
+
console.error(chalk2.red("\\n\u274C @moltium/world-core package not found"));
|
|
604
|
+
console.log(chalk2.yellow("\\nPlease install it: npm install @moltium/world-core\\n"));
|
|
605
|
+
process.exit(1);
|
|
628
606
|
}
|
|
629
607
|
const command = `forge script script/DeployToken.s.sol:DeployTokenScript --rpc-url monad --broadcast -vvv`;
|
|
630
608
|
const output = execSync(command, {
|
|
@@ -770,36 +748,14 @@ var deployCommand = new Command4("deploy").description("Deploy smart contracts t
|
|
|
770
748
|
const deploySpinner = ora4("Deploying AgentRegistry...").start();
|
|
771
749
|
try {
|
|
772
750
|
const worldCorePath = path4.join(process.cwd(), "node_modules", "@moltium", "world-core");
|
|
773
|
-
const libPath = path4.join(worldCorePath, "lib");
|
|
774
751
|
const fs4 = await import("fs/promises");
|
|
775
752
|
try {
|
|
776
|
-
await fs4.access(
|
|
753
|
+
await fs4.access(worldCorePath);
|
|
777
754
|
} catch {
|
|
778
|
-
deploySpinner.
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
cwd: worldCorePath,
|
|
783
|
-
stdio: "pipe"
|
|
784
|
-
});
|
|
785
|
-
} catch {
|
|
786
|
-
execSync3("git init", {
|
|
787
|
-
cwd: worldCorePath,
|
|
788
|
-
stdio: "pipe"
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
execSync3("forge install --no-commit", {
|
|
792
|
-
cwd: worldCorePath,
|
|
793
|
-
stdio: "pipe"
|
|
794
|
-
});
|
|
795
|
-
deploySpinner.text = "Deploying AgentRegistry...";
|
|
796
|
-
} catch (error) {
|
|
797
|
-
deploySpinner.fail();
|
|
798
|
-
console.error(chalk4.red("\\n\u274C Failed to install Foundry dependencies"));
|
|
799
|
-
console.log(chalk4.yellow("\\nPlease ensure Foundry is installed: https://getfoundry.sh/"));
|
|
800
|
-
console.log(chalk4.gray(`\\nThen run manually: cd ${worldCorePath} && git init && forge install\\n`));
|
|
801
|
-
process.exit(1);
|
|
802
|
-
}
|
|
755
|
+
deploySpinner.fail();
|
|
756
|
+
console.error(chalk4.red("\\n\u274C @moltium/world-core package not found"));
|
|
757
|
+
console.log(chalk4.yellow("\\nPlease install it: npm install @moltium/world-core\\n"));
|
|
758
|
+
process.exit(1);
|
|
803
759
|
}
|
|
804
760
|
const env = {
|
|
805
761
|
...process.env,
|
|
@@ -852,7 +808,7 @@ var deployCommand = new Command4("deploy").description("Deploy smart contracts t
|
|
|
852
808
|
|
|
853
809
|
// src/index.ts
|
|
854
810
|
var program = new Command5();
|
|
855
|
-
program.name("moltium-world").description("CLI tool for creating and managing Moltium World SDK projects").version("0.1.
|
|
811
|
+
program.name("moltium-world").description("CLI tool for creating and managing Moltium World SDK projects").version("0.1.5");
|
|
856
812
|
program.addCommand(initCommand);
|
|
857
813
|
program.addCommand(tokenCommand);
|
|
858
814
|
program.addCommand(startCommand);
|