@dcl-regenesislabs/opendcl 0.1.5-23161709858.commit-828c176 → 0.1.5-23162014502.commit-785daa6
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/extensions/dcl-deploy.ts
CHANGED
|
@@ -13,15 +13,28 @@ import { join } from "node:path";
|
|
|
13
13
|
import { fileExists, findSceneRoot } from "./scene-utils.js";
|
|
14
14
|
|
|
15
15
|
const WORLDS_CONTENT_SERVER = "https://worlds-content-server.decentraland.org";
|
|
16
|
+
const BEVY_BASE = "https://decentraland.zone/bevy-web";
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
interface SceneDeployInfo {
|
|
19
|
+
/** World name (e.g. "boedo.dcl.eth") — presence means it's a World deploy */
|
|
20
|
+
worldName?: string;
|
|
21
|
+
/** Base parcel (e.g. "30,30") for Genesis City */
|
|
22
|
+
baseParcel?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function getSceneDeployInfo(sceneRoot: string): Promise<SceneDeployInfo> {
|
|
18
26
|
try {
|
|
19
27
|
let content = await readFile(join(sceneRoot, "scene.json"), "utf-8");
|
|
20
28
|
if (content.charCodeAt(0) === 0xfeff) content = content.slice(1);
|
|
21
29
|
const sceneJson = JSON.parse(content);
|
|
22
|
-
|
|
30
|
+
const worldName = sceneJson.worldConfiguration?.name;
|
|
31
|
+
if (worldName) {
|
|
32
|
+
return { worldName };
|
|
33
|
+
}
|
|
34
|
+
const baseParcel = sceneJson.scene?.base;
|
|
35
|
+
return { baseParcel };
|
|
23
36
|
} catch {
|
|
24
|
-
return
|
|
37
|
+
return {};
|
|
25
38
|
}
|
|
26
39
|
}
|
|
27
40
|
|
|
@@ -39,13 +52,14 @@ async function deployScene(
|
|
|
39
52
|
return { message: "node_modules not found. Run 'npm install' first.", isError: true };
|
|
40
53
|
}
|
|
41
54
|
|
|
42
|
-
const
|
|
55
|
+
const deployInfo = await getSceneDeployInfo(sceneRoot);
|
|
56
|
+
const isWorld = Boolean(deployInfo.worldName);
|
|
43
57
|
const deployArgs = ["@dcl/sdk-commands", "deploy"];
|
|
44
|
-
if (
|
|
58
|
+
if (isWorld) {
|
|
45
59
|
deployArgs.push("--target-content", WORLDS_CONTENT_SERVER);
|
|
46
60
|
}
|
|
47
61
|
|
|
48
|
-
const targetLabel =
|
|
62
|
+
const targetLabel = isWorld ? "World" : "Genesis City";
|
|
49
63
|
|
|
50
64
|
try {
|
|
51
65
|
const result = await pi.exec("npx", deployArgs, {
|
|
@@ -54,7 +68,14 @@ async function deployScene(
|
|
|
54
68
|
});
|
|
55
69
|
|
|
56
70
|
if (result.code === 0) {
|
|
57
|
-
|
|
71
|
+
let visitUrl: string | undefined;
|
|
72
|
+
if (deployInfo.worldName) {
|
|
73
|
+
visitUrl = `${BEVY_BASE}?realm=${deployInfo.worldName}`;
|
|
74
|
+
} else if (deployInfo.baseParcel) {
|
|
75
|
+
visitUrl = `${BEVY_BASE}?position=${deployInfo.baseParcel}`;
|
|
76
|
+
}
|
|
77
|
+
const urlLine = visitUrl ? `\nVisit: ${visitUrl}` : "";
|
|
78
|
+
return { message: `Scene deployed to ${targetLabel} successfully!${urlLine}` };
|
|
58
79
|
} else {
|
|
59
80
|
return { message: `Deploy failed (exit code ${result.code}): ${result.stderr || result.stdout}`, isError: true };
|
|
60
81
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl-regenesislabs/opendcl",
|
|
3
|
-
"version": "0.1.5-
|
|
3
|
+
"version": "0.1.5-23162014502.commit-785daa6",
|
|
4
4
|
"description": "AI coding assistant for Decentraland SDK7 scene development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"prompts/",
|
|
68
68
|
"context/"
|
|
69
69
|
],
|
|
70
|
-
"commit": "
|
|
70
|
+
"commit": "785daa6a3e74d9b2c4dfcfdd9bdda32c7ca96880"
|
|
71
71
|
}
|
|
@@ -65,14 +65,12 @@ This will prompt the user to sign the deployment with their wallet. Validations
|
|
|
65
65
|
|
|
66
66
|
## 3. Access the World
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
After a successful deploy, the `/deploy` command outputs a visit URL automatically. The World is also accessible at:
|
|
69
69
|
|
|
70
70
|
```
|
|
71
|
-
decentraland
|
|
71
|
+
https://decentraland.zone/bevy-web?realm=NAME.dcl.eth
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Replace `NAME` with the Decentraland NAME or ENS domain used for deployment.
|
|
75
|
-
|
|
76
74
|
From inside Decentraland, use the chatbox command:
|
|
77
75
|
```
|
|
78
76
|
/goto NAME.dcl.eth
|