dcentraland 3.21.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +201 -0
- package/README.md +56 -0
- package/abi/EstateRegistry.json +1226 -0
- package/abi/LANDRegistry.json +1372 -0
- package/abi/MANAToken.json +410 -0
- package/dist/commands/build.d.ts +3 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +108 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/coords.d.ts +3 -0
- package/dist/commands/coords.d.ts.map +1 -0
- package/dist/commands/coords.js +122 -0
- package/dist/commands/coords.js.map +1 -0
- package/dist/commands/deploy.d.ts +4 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +280 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +20 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +19 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/info.d.ts +3 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +186 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init/help.d.ts +12 -0
- package/dist/commands/init/help.d.ts.map +1 -0
- package/dist/commands/init/help.js +41 -0
- package/dist/commands/init/help.js.map +1 -0
- package/dist/commands/init/index.d.ts +3 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/init/index.js +96 -0
- package/dist/commands/init/index.js.map +1 -0
- package/dist/commands/init/library.d.ts +1 -0
- package/dist/commands/init/library.d.ts.map +1 -0
- package/dist/commands/init/library.js +2 -0
- package/dist/commands/init/library.js.map +1 -0
- package/dist/commands/init/repositories.d.ts +11 -0
- package/dist/commands/init/repositories.d.ts.map +1 -0
- package/dist/commands/init/repositories.js +40 -0
- package/dist/commands/init/repositories.js.map +1 -0
- package/dist/commands/init/scene.d.ts +3 -0
- package/dist/commands/init/scene.d.ts.map +1 -0
- package/dist/commands/init/scene.js +56 -0
- package/dist/commands/init/scene.js.map +1 -0
- package/dist/commands/init/types.d.ts +22 -0
- package/dist/commands/init/types.d.ts.map +1 -0
- package/dist/commands/init/types.js +3 -0
- package/dist/commands/init/types.js.map +1 -0
- package/dist/commands/init/utils.d.ts +6 -0
- package/dist/commands/init/utils.d.ts.map +1 -0
- package/dist/commands/init/utils.js +76 -0
- package/dist/commands/init/utils.js.map +1 -0
- package/dist/commands/install.d.ts +3 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +92 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/pack.d.ts +3 -0
- package/dist/commands/pack.d.ts.map +1 -0
- package/dist/commands/pack.js +102 -0
- package/dist/commands/pack.js.map +1 -0
- package/dist/commands/start.d.ts +3 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +235 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +80 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/workspace.d.ts +3 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +81 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/commands/world-acl.d.ts +22 -0
- package/dist/commands/world-acl.d.ts.map +1 -0
- package/dist/commands/world-acl.js +262 -0
- package/dist/commands/world-acl.js.map +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +128 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/API.d.ts +23 -0
- package/dist/lib/API.d.ts.map +1 -0
- package/dist/lib/API.js +175 -0
- package/dist/lib/API.js.map +1 -0
- package/dist/lib/Decentraland.d.ts +75 -0
- package/dist/lib/Decentraland.d.ts.map +1 -0
- package/dist/lib/Decentraland.js +227 -0
- package/dist/lib/Decentraland.js.map +1 -0
- package/dist/lib/Ethereum.d.ts +52 -0
- package/dist/lib/Ethereum.d.ts.map +1 -0
- package/dist/lib/Ethereum.js +245 -0
- package/dist/lib/Ethereum.js.map +1 -0
- package/dist/lib/IEthereumDataProvider.d.ts +17 -0
- package/dist/lib/IEthereumDataProvider.d.ts.map +1 -0
- package/dist/lib/IEthereumDataProvider.js +3 -0
- package/dist/lib/IEthereumDataProvider.js.map +1 -0
- package/dist/lib/LinkerAPI.d.ts +28 -0
- package/dist/lib/LinkerAPI.d.ts.map +1 -0
- package/dist/lib/LinkerAPI.js +151 -0
- package/dist/lib/LinkerAPI.js.map +1 -0
- package/dist/lib/Preview.d.ts +17 -0
- package/dist/lib/Preview.d.ts.map +1 -0
- package/dist/lib/Preview.js +113 -0
- package/dist/lib/Preview.js.map +1 -0
- package/dist/lib/Project.d.ts +152 -0
- package/dist/lib/Project.d.ts.map +1 -0
- package/dist/lib/Project.js +446 -0
- package/dist/lib/Project.js.map +1 -0
- package/dist/lib/Workspace.d.ts +21 -0
- package/dist/lib/Workspace.d.ts.map +1 -0
- package/dist/lib/Workspace.js +140 -0
- package/dist/lib/Workspace.js.map +1 -0
- package/dist/lib/WorldsContentServer.d.ts +27 -0
- package/dist/lib/WorldsContentServer.d.ts.map +1 -0
- package/dist/lib/WorldsContentServer.js +79 -0
- package/dist/lib/WorldsContentServer.js.map +1 -0
- package/dist/lib/WorldsContentServerLinkerAPI.d.ts +21 -0
- package/dist/lib/WorldsContentServerLinkerAPI.d.ts.map +1 -0
- package/dist/lib/WorldsContentServerLinkerAPI.js +105 -0
- package/dist/lib/WorldsContentServerLinkerAPI.js.map +1 -0
- package/dist/lib/adapters/proto/broker.d.ts +2 -0
- package/dist/lib/adapters/proto/broker.d.ts.map +1 -0
- package/dist/lib/adapters/proto/broker.js +2189 -0
- package/dist/lib/adapters/proto/broker.js.map +1 -0
- package/dist/lib/adapters/proto/comms.d.ts +2 -0
- package/dist/lib/adapters/proto/comms.d.ts.map +1 -0
- package/dist/lib/adapters/proto/comms.js +965 -0
- package/dist/lib/adapters/proto/comms.js.map +1 -0
- package/dist/lib/adapters/ws.d.ts +12 -0
- package/dist/lib/adapters/ws.d.ts.map +1 -0
- package/dist/lib/adapters/ws.js +20 -0
- package/dist/lib/adapters/ws.js.map +1 -0
- package/dist/lib/content/ContentService.d.ts +27 -0
- package/dist/lib/content/ContentService.d.ts.map +1 -0
- package/dist/lib/content/ContentService.js +60 -0
- package/dist/lib/content/ContentService.js.map +1 -0
- package/dist/lib/content/types.d.ts +12 -0
- package/dist/lib/content/types.d.ts.map +1 -0
- package/dist/lib/content/types.js +3 -0
- package/dist/lib/content/types.js.map +1 -0
- package/dist/lib/controllers/bff.d.ts +8 -0
- package/dist/lib/controllers/bff.d.ts.map +1 -0
- package/dist/lib/controllers/bff.js +58 -0
- package/dist/lib/controllers/bff.js.map +1 -0
- package/dist/lib/controllers/debugger.d.ts +4 -0
- package/dist/lib/controllers/debugger.d.ts.map +1 -0
- package/dist/lib/controllers/debugger.js +42 -0
- package/dist/lib/controllers/debugger.js.map +1 -0
- package/dist/lib/controllers/ecs6-endpoints.d.ts +11 -0
- package/dist/lib/controllers/ecs6-endpoints.d.ts.map +1 -0
- package/dist/lib/controllers/ecs6-endpoints.js +543 -0
- package/dist/lib/controllers/ecs6-endpoints.js.map +1 -0
- package/dist/lib/controllers/legacy-comms-v1.d.ts +7 -0
- package/dist/lib/controllers/legacy-comms-v1.d.ts.map +1 -0
- package/dist/lib/controllers/legacy-comms-v1.js +98 -0
- package/dist/lib/controllers/legacy-comms-v1.js.map +1 -0
- package/dist/lib/smartItems/buildSmartItem.d.ts +2 -0
- package/dist/lib/smartItems/buildSmartItem.d.ts.map +1 -0
- package/dist/lib/smartItems/buildSmartItem.js +18 -0
- package/dist/lib/smartItems/buildSmartItem.js.map +1 -0
- package/dist/lib/smartItems/packProject.d.ts +2 -0
- package/dist/lib/smartItems/packProject.d.ts.map +1 -0
- package/dist/lib/smartItems/packProject.js +31 -0
- package/dist/lib/smartItems/packProject.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +151 -0
- package/dist/main.js.map +1 -0
- package/dist/project/installDependencies.d.ts +2 -0
- package/dist/project/installDependencies.d.ts.map +1 -0
- package/dist/project/installDependencies.js +57 -0
- package/dist/project/installDependencies.js.map +1 -0
- package/dist/project/isTypescriptProject.d.ts +2 -0
- package/dist/project/isTypescriptProject.d.ts.map +1 -0
- package/dist/project/isTypescriptProject.js +14 -0
- package/dist/project/isTypescriptProject.js.map +1 -0
- package/dist/project/projectInfo.d.ts +8 -0
- package/dist/project/projectInfo.d.ts.map +1 -0
- package/dist/project/projectInfo.js +89 -0
- package/dist/project/projectInfo.js.map +1 -0
- package/dist/project/updateBundleDependenciesField.d.ts +4 -0
- package/dist/project/updateBundleDependenciesField.d.ts.map +1 -0
- package/dist/project/updateBundleDependenciesField.js +67 -0
- package/dist/project/updateBundleDependenciesField.js.map +1 -0
- package/dist/sceneJson/index.d.ts +4 -0
- package/dist/sceneJson/index.d.ts.map +1 -0
- package/dist/sceneJson/index.js +24 -0
- package/dist/sceneJson/index.js.map +1 -0
- package/dist/sceneJson/lintSceneFile.d.ts +2 -0
- package/dist/sceneJson/lintSceneFile.d.ts.map +1 -0
- package/dist/sceneJson/lintSceneFile.js +13 -0
- package/dist/sceneJson/lintSceneFile.js.map +1 -0
- package/dist/sceneJson/utils.d.ts +3 -0
- package/dist/sceneJson/utils.d.ts.map +1 -0
- package/dist/sceneJson/utils.js +66 -0
- package/dist/sceneJson/utils.js.map +1 -0
- package/dist/utils/analytics.d.ts +42 -0
- package/dist/utils/analytics.d.ts.map +1 -0
- package/dist/utils/analytics.js +111 -0
- package/dist/utils/analytics.js.map +1 -0
- package/dist/utils/buildProject.d.ts +2 -0
- package/dist/utils/buildProject.d.ts.map +1 -0
- package/dist/utils/buildProject.js +26 -0
- package/dist/utils/buildProject.js.map +1 -0
- package/dist/utils/catalystPointers.d.ts +20 -0
- package/dist/utils/catalystPointers.d.ts.map +1 -0
- package/dist/utils/catalystPointers.js +51 -0
- package/dist/utils/catalystPointers.js.map +1 -0
- package/dist/utils/coordinateHelpers.d.ts +65 -0
- package/dist/utils/coordinateHelpers.d.ts.map +1 -0
- package/dist/utils/coordinateHelpers.js +126 -0
- package/dist/utils/coordinateHelpers.js.map +1 -0
- package/dist/utils/download.d.ts +3 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/download.js +42 -0
- package/dist/utils/download.js.map +1 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +31 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +18 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +27 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/filesystem.d.ts +41 -0
- package/dist/utils/filesystem.d.ts.map +1 -0
- package/dist/utils/filesystem.js +84 -0
- package/dist/utils/filesystem.js.map +1 -0
- package/dist/utils/getDummyMappings.d.ts +3 -0
- package/dist/utils/getDummyMappings.d.ts.map +1 -0
- package/dist/utils/getDummyMappings.js +19 -0
- package/dist/utils/getDummyMappings.js.map +1 -0
- package/dist/utils/getProjectFilePaths.d.ts +2 -0
- package/dist/utils/getProjectFilePaths.d.ts.map +1 -0
- package/dist/utils/getProjectFilePaths.js +40 -0
- package/dist/utils/getProjectFilePaths.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +33 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/installedDependencies.d.ts +6 -0
- package/dist/utils/installedDependencies.d.ts.map +1 -0
- package/dist/utils/installedDependencies.js +44 -0
- package/dist/utils/installedDependencies.js.map +1 -0
- package/dist/utils/land.d.ts +4 -0
- package/dist/utils/land.d.ts.map +1 -0
- package/dist/utils/land.js +35 -0
- package/dist/utils/land.js.map +1 -0
- package/dist/utils/logging.d.ts +19 -0
- package/dist/utils/logging.d.ts.map +1 -0
- package/dist/utils/logging.js +97 -0
- package/dist/utils/logging.js.map +1 -0
- package/dist/utils/moduleHelpers.d.ts +22 -0
- package/dist/utils/moduleHelpers.d.ts.map +1 -0
- package/dist/utils/moduleHelpers.js +163 -0
- package/dist/utils/moduleHelpers.js.map +1 -0
- package/dist/utils/nodeAndNpmVersion.d.ts +5 -0
- package/dist/utils/nodeAndNpmVersion.d.ts.map +1 -0
- package/dist/utils/nodeAndNpmVersion.js +64 -0
- package/dist/utils/nodeAndNpmVersion.js.map +1 -0
- package/dist/utils/pathsExistOnDir.d.ts +2 -0
- package/dist/utils/pathsExistOnDir.d.ts.map +1 -0
- package/dist/utils/pathsExistOnDir.js +12 -0
- package/dist/utils/pathsExistOnDir.js.map +1 -0
- package/dist/utils/project.d.ts +29 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/dist/utils/project.js +48 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/utils/shellCommands.d.ts +19 -0
- package/dist/utils/shellCommands.d.ts.map +1 -0
- package/dist/utils/shellCommands.js +73 -0
- package/dist/utils/shellCommands.js.map +1 -0
- package/dist/utils/spinner.d.ts +6 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +58 -0
- package/dist/utils/spinner.js.map +1 -0
- package/package.json +115 -0
- package/raim7jnk.cjs +1 -0
- package/samples/workspace/Dockerfile +21 -0
- package/samples/workspace/package.json +16 -0
@@ -0,0 +1,235 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.main = exports.help = void 0;
|
30
|
+
const os_1 = __importDefault(require("os"));
|
31
|
+
const arg_1 = __importDefault(require("arg"));
|
32
|
+
const chalk_1 = __importDefault(require("chalk"));
|
33
|
+
const opn_1 = __importDefault(require("opn"));
|
34
|
+
const Decentraland_1 = require("../lib/Decentraland");
|
35
|
+
const moduleHelpers_1 = require("../utils/moduleHelpers");
|
36
|
+
const analytics_1 = require("../utils/analytics");
|
37
|
+
const logging_1 = require("../utils/logging");
|
38
|
+
const env_1 = require("../utils/env");
|
39
|
+
const spinner = __importStar(require("../utils/spinner"));
|
40
|
+
const installDependencies_1 = __importDefault(require("../project/installDependencies"));
|
41
|
+
const lintSceneFile_1 = require("../sceneJson/lintSceneFile");
|
42
|
+
const updateBundleDependenciesField_1 = __importDefault(require("../project/updateBundleDependenciesField"));
|
43
|
+
const help = () => `
|
44
|
+
Usage: ${chalk_1.default.bold('dcl start [options]')}
|
45
|
+
|
46
|
+
${chalk_1.default.dim('Options:')}
|
47
|
+
|
48
|
+
-h, --help Displays complete help
|
49
|
+
-p, --port [port] Select a custom port for the development server
|
50
|
+
-d, --no-debug Disable debugging panel
|
51
|
+
-b, --no-browser Do not open a new browser window
|
52
|
+
-w, --no-watch Do not open watch for filesystem changes
|
53
|
+
-c, --ci Run the parcel previewer on a remote unix server
|
54
|
+
--web3 Connects preview to browser wallet to use the associated avatar and account
|
55
|
+
--skip-version-checks Skip the ECS and CLI version checks, avoid the warning message and launch anyway
|
56
|
+
--skip-build Skip build and only serve the files in preview mode
|
57
|
+
--skip-install Skip installing dependencies
|
58
|
+
--desktop-client Show URL to launch preview in the desktop client (BETA)
|
59
|
+
|
60
|
+
${chalk_1.default.dim('Examples:')}
|
61
|
+
|
62
|
+
- Start a local development server for a Decentraland Scene at port 3500
|
63
|
+
|
64
|
+
${chalk_1.default.green('$ dcl start -p 3500')}
|
65
|
+
|
66
|
+
- Start a local development server for a Decentraland Scene at a docker container
|
67
|
+
|
68
|
+
${chalk_1.default.green('$ dcl start --ci')}
|
69
|
+
`;
|
70
|
+
exports.help = help;
|
71
|
+
async function main() {
|
72
|
+
const args = (0, arg_1.default)({
|
73
|
+
'--help': Boolean,
|
74
|
+
'--port': String,
|
75
|
+
'--no-debug': Boolean,
|
76
|
+
'--no-browser': Boolean,
|
77
|
+
'--no-watch': Boolean,
|
78
|
+
'--ci': Boolean,
|
79
|
+
'--skip-version-checks': Boolean,
|
80
|
+
'--skip-install': Boolean,
|
81
|
+
'--web3': Boolean,
|
82
|
+
'-h': '--help',
|
83
|
+
'-p': '--port',
|
84
|
+
'-d': '--no-debug',
|
85
|
+
'-b': '--no-browser',
|
86
|
+
'-w': '--no-watch',
|
87
|
+
'-c': '--ci',
|
88
|
+
'--skip-build': Boolean,
|
89
|
+
'--desktop-client': Boolean,
|
90
|
+
// temp and hidden property to add `&explorer-branch=dev`
|
91
|
+
'--sdk7-next': Boolean
|
92
|
+
});
|
93
|
+
const isCi = args['--ci'] || (0, env_1.isEnvCi)();
|
94
|
+
const debug = !args['--no-debug'] && !isCi;
|
95
|
+
const openBrowser = !args['--no-browser'] && !isCi;
|
96
|
+
const skipBuild = args['--skip-build'];
|
97
|
+
const watch = !args['--no-watch'] && !isCi && !skipBuild;
|
98
|
+
const workingDir = process.cwd();
|
99
|
+
const skipVersionCheck = args['--skip-version-checks'];
|
100
|
+
const skipInstall = args['--skip-install'];
|
101
|
+
const dcl = new Decentraland_1.Decentraland({
|
102
|
+
previewPort: parseInt(args['--port'], 10),
|
103
|
+
watch,
|
104
|
+
workingDir
|
105
|
+
});
|
106
|
+
const enableWeb3 = args['--web3'];
|
107
|
+
const baseCoords = await dcl.workspace.getBaseCoords();
|
108
|
+
const hasPortableExperience = dcl.workspace.hasPortableExperience();
|
109
|
+
const online = await (0, moduleHelpers_1.isOnline)();
|
110
|
+
const ecsVersions = new Set();
|
111
|
+
for (const project of dcl.workspace.getAllProjects()) {
|
112
|
+
if (!skipBuild) {
|
113
|
+
spinner.create(`Checking if SDK is installed in project`);
|
114
|
+
const needDependencies = await project.needsDependencies();
|
115
|
+
if (needDependencies && !skipInstall) {
|
116
|
+
if (online) {
|
117
|
+
await (0, installDependencies_1.default)(project.getProjectWorkingDir(), false /* silent */);
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
spinner.fail('This project can not start as you are offline and dependencies need to be installed.');
|
121
|
+
}
|
122
|
+
}
|
123
|
+
const ecsVersion = project.getEcsVersion();
|
124
|
+
if (ecsVersion === 'unknown') {
|
125
|
+
// This should only happen when we are offline and we don't have the SDK installed.
|
126
|
+
spinner.fail('SDK not found. This project can not start.');
|
127
|
+
}
|
128
|
+
ecsVersions.add(ecsVersion);
|
129
|
+
const sdkOutdated = await (0, moduleHelpers_1.getOutdatedEcs)(project.getProjectWorkingDir());
|
130
|
+
if (sdkOutdated) {
|
131
|
+
spinner.warn(`SDK is outdated, to upgrade to the latest version run the command:
|
132
|
+
${chalk_1.default.bold('npm install decentraland-ecs@latest')}
|
133
|
+
In the folder ${project.getProjectWorkingDir()}
|
134
|
+
`);
|
135
|
+
console.log(chalk_1.default.bold((0, logging_1.error)((0, logging_1.formatOutdatedMessage)(sdkOutdated))));
|
136
|
+
}
|
137
|
+
else {
|
138
|
+
spinner.succeed('Latest SDK installation found.');
|
139
|
+
}
|
140
|
+
if (!skipVersionCheck) {
|
141
|
+
await project.checkCLIandECSCompatibility();
|
142
|
+
}
|
143
|
+
try {
|
144
|
+
await (0, updateBundleDependenciesField_1.default)({
|
145
|
+
workDir: project.getProjectWorkingDir()
|
146
|
+
});
|
147
|
+
}
|
148
|
+
catch (err) {
|
149
|
+
console.warn(`Unable to update bundle dependencies field.`, err);
|
150
|
+
}
|
151
|
+
if (await project.isTypescriptProject()) {
|
152
|
+
await (0, moduleHelpers_1.buildTypescript)({
|
153
|
+
workingDir: project.getProjectWorkingDir(),
|
154
|
+
watch: true,
|
155
|
+
production: false
|
156
|
+
});
|
157
|
+
}
|
158
|
+
}
|
159
|
+
await (0, lintSceneFile_1.lintSceneFile)(project.getProjectWorkingDir());
|
160
|
+
}
|
161
|
+
if (dcl.workspace.isSingleProject()) {
|
162
|
+
analytics_1.Analytics.startPreview({
|
163
|
+
projectHash: dcl.getProjectHash(),
|
164
|
+
ecs: await dcl.workspace.getSingleProject().getEcsPackageVersion(),
|
165
|
+
coords: baseCoords,
|
166
|
+
isWorkspace: false
|
167
|
+
});
|
168
|
+
}
|
169
|
+
else {
|
170
|
+
analytics_1.Analytics.startPreview({
|
171
|
+
projectHash: dcl.getProjectHash(),
|
172
|
+
isWorkspace: true
|
173
|
+
});
|
174
|
+
}
|
175
|
+
if ((enableWeb3 || hasPortableExperience) && (await (0, moduleHelpers_1.isECSVersionLower)(workingDir, '6.10.0')) && !skipVersionCheck) {
|
176
|
+
throw new Error('Web3 is not currently working with `decentraland-ecs` version lower than 6.10.0. You can update it with running `npm i decentraland-ecs@latest`.');
|
177
|
+
}
|
178
|
+
dcl.on('preview:ready', (port) => {
|
179
|
+
const ifaces = os_1.default.networkInterfaces();
|
180
|
+
const availableURLs = [];
|
181
|
+
console.log(''); // line break
|
182
|
+
console.log(`Preview server is now running`);
|
183
|
+
console.log(chalk_1.default.bold('\n Available on:\n'));
|
184
|
+
Object.keys(ifaces).forEach((dev) => {
|
185
|
+
;
|
186
|
+
(ifaces[dev] || []).forEach((details) => {
|
187
|
+
const oldBackpack = 'DISABLE_backpack_editor_v2=&ENABLE_backpack_editor_v1';
|
188
|
+
if (details.family === 'IPv4') {
|
189
|
+
let addr = `http://${details.address}:${port}?position=${baseCoords.x}%2C${baseCoords.y}&${oldBackpack}`;
|
190
|
+
if (debug) {
|
191
|
+
addr = `${addr}&SCENE_DEBUG_PANEL`;
|
192
|
+
}
|
193
|
+
if (enableWeb3 || hasPortableExperience) {
|
194
|
+
addr = `${addr}&ENABLE_WEB3`;
|
195
|
+
}
|
196
|
+
if (ecsVersions.has('ecs7')) {
|
197
|
+
if (!!args['--sdk7-next']) {
|
198
|
+
addr = `${addr}&ENABLE_ECS7&explorer-branch=dev`;
|
199
|
+
}
|
200
|
+
else {
|
201
|
+
addr = `${addr}&ENABLE_ECS7`;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
availableURLs.push(addr);
|
205
|
+
}
|
206
|
+
});
|
207
|
+
});
|
208
|
+
// Push localhost and 127.0.0.1 at top
|
209
|
+
const sortedURLs = availableURLs.sort((a, _b) => {
|
210
|
+
return a.toLowerCase().includes('localhost') || a.includes('127.0.0.1') || a.includes('0.0.0.0') ? -1 : 1;
|
211
|
+
});
|
212
|
+
for (const addr of sortedURLs) {
|
213
|
+
console.log(` ${addr}`);
|
214
|
+
}
|
215
|
+
if (args['--desktop-client']) {
|
216
|
+
console.log(chalk_1.default.bold('\n Desktop client:\n'));
|
217
|
+
for (const addr of sortedURLs) {
|
218
|
+
const searchParams = new URLSearchParams();
|
219
|
+
searchParams.append('PREVIEW-MODE', addr);
|
220
|
+
console.log(` dcl://${searchParams.toString()}&`);
|
221
|
+
}
|
222
|
+
}
|
223
|
+
console.log(chalk_1.default.bold('\n Details:\n'));
|
224
|
+
console.log(chalk_1.default.grey('\nPress CTRL+C to exit\n'));
|
225
|
+
// Open preferably localhost/127.0.0.1
|
226
|
+
if (openBrowser && sortedURLs.length && !args['--desktop-client']) {
|
227
|
+
(0, opn_1.default)(sortedURLs[0]).catch(() => {
|
228
|
+
console.log('Unable to open browser automatically.');
|
229
|
+
});
|
230
|
+
}
|
231
|
+
});
|
232
|
+
await dcl.preview();
|
233
|
+
}
|
234
|
+
exports.main = main;
|
235
|
+
//# sourceMappingURL=start.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/commands/start.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmB;AACnB,8CAAqB;AACrB,kDAAyB;AACzB,8CAAqB;AAErB,sDAAkD;AAClD,0DAAqG;AACrG,kDAA8C;AAC9C,8CAA+D;AAC/D,sCAAsC;AACtC,0DAA2C;AAC3C,yFAAgE;AAChE,8DAA0D;AAC1D,6GAAoF;AAG7E,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;WACf,eAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC;;MAEtC,eAAK,CAAC,GAAG,CAAC,UAAU,CAAC;;;;;;;;;;;;;;MAcrB,eAAK,CAAC,GAAG,CAAC,WAAW,CAAC;;;;QAIpB,eAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC;;;;QAIlC,eAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC;CACtC,CAAA;AA1BY,QAAA,IAAI,QA0BhB;AAEM,KAAK,UAAU,IAAI;IACxB,MAAM,IAAI,GAAG,IAAA,aAAG,EAAC;QACf,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,MAAM;QAChB,YAAY,EAAE,OAAO;QACrB,cAAc,EAAE,OAAO;QACvB,YAAY,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CAAA;YACtD,CAAC,CAAC,CAAA;SACH;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;AACrB,CAAC;AA9LD,oBA8LC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,IAAI,cAkBhB,CAAA;AAED,wBAAsB,IAAI,kBAsCzB"}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.main = exports.help = void 0;
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
8
|
+
const arg_1 = __importDefault(require("arg"));
|
9
|
+
const Decentraland_1 = require("../lib/Decentraland");
|
10
|
+
const logging_1 = require("../utils/logging");
|
11
|
+
const analytics_1 = require("../utils/analytics");
|
12
|
+
const coordinateHelpers_1 = require("../utils/coordinateHelpers");
|
13
|
+
const errors_1 = require("../utils/errors");
|
14
|
+
const land_1 = require("../utils/land");
|
15
|
+
const help = () => `
|
16
|
+
Usage: ${chalk_1.default.bold('dcl status [target] [options]')}
|
17
|
+
|
18
|
+
${chalk_1.default.dim('Options:')}
|
19
|
+
|
20
|
+
-h, --help Displays complete help
|
21
|
+
-n, --network Choose between ${chalk_1.default.bold('mainnet')} and ${chalk_1.default.bold('sepolia')} (default 'mainnet')
|
22
|
+
|
23
|
+
|
24
|
+
${chalk_1.default.dim('Examples:')}
|
25
|
+
|
26
|
+
- Get Decentraland Scene information of the current project"
|
27
|
+
|
28
|
+
${chalk_1.default.green('$ dcl status')}
|
29
|
+
|
30
|
+
- Get Decentraland Scene information of the parcel ${chalk_1.default.bold('-12, 40')}"
|
31
|
+
|
32
|
+
${chalk_1.default.green('$ dcl status -12,40')}
|
33
|
+
`;
|
34
|
+
exports.help = help;
|
35
|
+
async function main() {
|
36
|
+
const args = (0, arg_1.default)({
|
37
|
+
'--help': Boolean,
|
38
|
+
'--network': String,
|
39
|
+
'-h': '--help',
|
40
|
+
'-n': '--network'
|
41
|
+
}, { permissive: true });
|
42
|
+
const dcl = new Decentraland_1.Decentraland({ workingDir: process.cwd() });
|
43
|
+
const target = (0, land_1.parseTarget)(args._);
|
44
|
+
let coords;
|
45
|
+
if (target) {
|
46
|
+
if (!(0, coordinateHelpers_1.isValid)(target)) {
|
47
|
+
(0, errors_1.fail)(errors_1.ErrorType.STATUS_ERROR, `Invalid target "${chalk_1.default.bold(target)}"`);
|
48
|
+
}
|
49
|
+
coords = (0, coordinateHelpers_1.getObject)(target);
|
50
|
+
}
|
51
|
+
const project = dcl.workspace.getSingleProject();
|
52
|
+
if (!coords && project) {
|
53
|
+
await project.validateExistingProject();
|
54
|
+
coords = await project.getParcelCoordinates();
|
55
|
+
}
|
56
|
+
if (!coords) {
|
57
|
+
(0, errors_1.fail)(errors_1.ErrorType.STATUS_ERROR, `Cannot get the coords`);
|
58
|
+
return;
|
59
|
+
}
|
60
|
+
else {
|
61
|
+
const { cid, files } = await dcl.getParcelStatus(coords.x, coords.y);
|
62
|
+
analytics_1.Analytics.statusCmd({ type: 'coordinates', target: coords });
|
63
|
+
logStatus(files, cid, `${coords.x},${coords.y}`);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
exports.main = main;
|
67
|
+
function logStatus(files, cid, coords) {
|
68
|
+
const serializedList = (0, logging_1.formatList)(files, { spacing: 2, padding: 2 });
|
69
|
+
if (files.length === 0) {
|
70
|
+
console.log(chalk_1.default.italic('\n No information available'));
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
console.log(`\n Deployment status for ${coords}:`);
|
74
|
+
if (cid) {
|
75
|
+
console.log(`\n Project CID: ${cid}`);
|
76
|
+
}
|
77
|
+
console.log(serializedList);
|
78
|
+
}
|
79
|
+
}
|
80
|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AG,EAAE;YACP,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,EAAE,CAAC,CAAA;SACzC;QACD,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;KAC5B;AACH,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/commands/workspace.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI,cAYhB,CAAA;AA4CD,wBAAsB,IAAI,kBAoBzB"}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.main = exports.help = void 0;
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
8
|
+
const analytics_1 = require("../utils/analytics");
|
9
|
+
const logging_1 = require("../utils/logging");
|
10
|
+
const errors_1 = require("../utils/errors");
|
11
|
+
const Workspace_1 = require("../lib/Workspace");
|
12
|
+
const help = () => `
|
13
|
+
Usage: ${chalk_1.default.bold('dcl workspace SUBCOMMAND [options]')}
|
14
|
+
|
15
|
+
${chalk_1.default.dim('Sub commands:')}
|
16
|
+
|
17
|
+
init Create a workspace looking for subfolder Decentraland projects.
|
18
|
+
ls List all projects in the current workspace
|
19
|
+
add Add a project in the current workspace.
|
20
|
+
|
21
|
+
${chalk_1.default.dim('Options:')}
|
22
|
+
|
23
|
+
-h, --help Displays complete help
|
24
|
+
`;
|
25
|
+
exports.help = help;
|
26
|
+
async function init() {
|
27
|
+
try {
|
28
|
+
await (0, Workspace_1.initializeWorkspace)(process.cwd());
|
29
|
+
console.log(chalk_1.default.green(`\nSuccess! Run 'dcl start' to preview your workspace.\n`));
|
30
|
+
}
|
31
|
+
catch (err) {
|
32
|
+
(0, errors_1.fail)(errors_1.ErrorType.WORKSPACE_ERROR, err.message);
|
33
|
+
}
|
34
|
+
analytics_1.Analytics.sceneCreated({ projectType: 'workspace' });
|
35
|
+
}
|
36
|
+
async function listProjects() {
|
37
|
+
const workingDir = process.cwd();
|
38
|
+
const workspace = (0, Workspace_1.createWorkspace)({ workingDir });
|
39
|
+
if (workspace.isSingleProject()) {
|
40
|
+
(0, errors_1.fail)(errors_1.ErrorType.WORKSPACE_ERROR, `There is no a workspace in the current directory.`);
|
41
|
+
}
|
42
|
+
console.log(`\nWorkspace in folder ${workingDir}`);
|
43
|
+
for (const [index, project] of workspace.getAllProjects().entries()) {
|
44
|
+
const projectPath = project.getProjectWorkingDir().replace(`${workingDir}\\`, '').replace(`${workingDir}/`, '');
|
45
|
+
console.log(`> Project ${index + 1} in: ${projectPath}`);
|
46
|
+
}
|
47
|
+
console.log('');
|
48
|
+
}
|
49
|
+
async function addProject() {
|
50
|
+
if (process.argv.length <= 4) {
|
51
|
+
(0, errors_1.fail)(errors_1.ErrorType.WORKSPACE_ERROR, `Missing folder of new project.`);
|
52
|
+
}
|
53
|
+
const newProjectPath = process.argv[4];
|
54
|
+
const workspace = (0, Workspace_1.createWorkspace)({ workingDir: process.cwd() });
|
55
|
+
if (workspace.isSingleProject()) {
|
56
|
+
(0, errors_1.fail)(errors_1.ErrorType.WORKSPACE_ERROR, `There is no a workspace in the current directory.`);
|
57
|
+
}
|
58
|
+
await workspace.addProject(newProjectPath);
|
59
|
+
console.log(chalk_1.default.green(`\nSuccess! Run 'dcl start' to preview your workspace and see the new project added.\n`));
|
60
|
+
}
|
61
|
+
async function main() {
|
62
|
+
if (process.argv.length <= 3) {
|
63
|
+
(0, errors_1.fail)(errors_1.ErrorType.WORKSPACE_ERROR, `The subcommand is not recognized`);
|
64
|
+
}
|
65
|
+
const subcommandList = {
|
66
|
+
init,
|
67
|
+
ls: listProjects,
|
68
|
+
help: async () => console.log((0, exports.help)()),
|
69
|
+
add: addProject
|
70
|
+
};
|
71
|
+
const subcommand = process.argv[3].toLowerCase();
|
72
|
+
(0, logging_1.warning)(`(Beta)`);
|
73
|
+
if (subcommand in subcommandList) {
|
74
|
+
await subcommandList[subcommand]();
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
(0, errors_1.fail)(errors_1.ErrorType.WORKSPACE_ERROR, `The subcommand ${subcommand} is not recognized`);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
exports.main = main;
|
81
|
+
//# sourceMappingURL=workspace.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/commands/workspace.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,kDAA8C;AAC9C,8CAA0C;AAC1C,4CAAiD;AAEjD,gDAAuE;AAEhE,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC;WACf,eAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC;;IAEvD,eAAK,CAAC,GAAG,CAAC,eAAe,CAAC;;;;;;IAM1B,eAAK,CAAC,GAAG,CAAC,UAAU,CAAC;;;CAGxB,CAAA;AAZY,QAAA,IAAI,QAYhB;AAED,KAAK,UAAU,IAAI;IACjB,IAAI;QACF,MAAM,IAAA,+BAAmB,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACxC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC,CAAA;KACpF;IAAC,OAAO,GAAQ,EAAE;QACjB,IAAA,aAAI,EAAC,kBAAS,CAAC,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;KAC7C;IAED,qBAAS,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAAA;AACtD,CAAC;AAED,KAAK,UAAU,YAAY;IACzB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;IAChC,MAAM,SAAS,GAAG,IAAA,2BAAe,EAAC,EAAE,UAAU,EAAE,CAAC,CAAA;IAEjD,IAAI,SAAS,CAAC,eAAe,EAAE,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AC,EAAE;QAC5B,IAAA,aAAI,EAAC,kBAAS,CAAC,eAAe,EAAE,kCAAkC,CAAC,CAAA;KACpE;IAED,MAAM,cAAc,GAAwC;QAC1D,IAAI;QACJ,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,YAAI,GAAE,CAAC;QACrC,GAAG,EAAE,UAAU;KAChB,CAAA;IACD,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;IAEhD,IAAA,iBAAO,EAAC,QAAQ,CAAC,CAAA;IAEjB,IAAI,UAAU,IAAI,cAAc,EAAE;QAChC,MAAM,cAAc,CAAC,UAAU,CAAC,EAAE,CAAA;KACnC;SAAM;QACL,IAAA,aAAI,EAAC,kBAAS,CAAC,eAAe,EAAE,kBAAkB,UAAU,oBAAoB,CAAC,CAAA;KAClF;AACH,CAAC;AApBD,oBAoBC"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { AuthChain } from '@dcl/schemas';
|
2
|
+
export declare function help(): string;
|
3
|
+
export declare function main(): Promise<void>;
|
4
|
+
export declare enum WorldPermissionType {
|
5
|
+
Unrestricted = "unrestricted",
|
6
|
+
AllowList = "allow-list"
|
7
|
+
}
|
8
|
+
export declare type AllowListPermissionSetting = {
|
9
|
+
type: WorldPermissionType.AllowList;
|
10
|
+
wallets: string[];
|
11
|
+
};
|
12
|
+
export declare type WorldPermissions = {
|
13
|
+
deployment: AllowListPermissionSetting;
|
14
|
+
};
|
15
|
+
export declare type WorldPermissionsResponse = {
|
16
|
+
permissions: WorldPermissions;
|
17
|
+
};
|
18
|
+
export declare const AUTH_CHAIN_HEADER_PREFIX = "x-identity-auth-chain-";
|
19
|
+
export declare const AUTH_TIMESTAMP_HEADER = "x-identity-timestamp";
|
20
|
+
export declare const AUTH_METADATA_HEADER = "x-identity-metadata";
|
21
|
+
export declare function getAuthHeaders(authChain: AuthChain, timestamp: string): Record<string, string>;
|
22
|
+
//# sourceMappingURL=world-acl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"world-acl.d.ts","sourceRoot":"","sources":["../../src/commands/world-acl.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAc,MAAM,cAAc,CAAA;AAkBpD,wBAAgB,IAAI,WA0BnB;AAED,wBAAsB,IAAI,kBA2BzB;AAiBD,oBAAY,mBAAmB;IAC7B,YAAY,iBAAiB;IAC7B,SAAS,eAAe;CACzB;AAED,oBAAY,0BAA0B,GAAG;IACvC,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAA;IACnC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,oBAAY,gBAAgB,GAAG;IAC7B,UAAU,EAAE,0BAA0B,CAAA;CACvC,CAAA;AAED,oBAAY,wBAAwB,GAAG;IACrC,WAAW,EAAE,gBAAgB,CAAA;CAC9B,CAAA;AAkKD,eAAO,MAAM,wBAAwB,2BAA2B,CAAA;AAChE,eAAO,MAAM,qBAAqB,yBAAyB,CAAA;AAC3D,eAAO,MAAM,oBAAoB,wBAAwB,CAAA;AAEzD,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAWrE"}
|