@dcl/sdk-commands 7.26.1-32239895147.commit-3c77d90 → 7.26.1-32736599590.commit-6286b33
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/commands/start/index.js +0 -17
- package/dist/commands/start/index.js.map +1 -1
- package/dist/commands/start/server/routes.js +0 -2
- package/dist/commands/start/server/routes.js.map +1 -1
- package/dist/commands/start/types.d.ts +0 -3
- package/dist/commands/start/utils.d.ts +0 -34
- package/dist/commands/start/utils.js +0 -104
- package/dist/commands/start/utils.js.map +1 -1
- package/dist/components/analytics.d.ts +1 -70
- package/dist/components/analytics.js +2 -3
- package/dist/components/analytics.js.map +1 -1
- package/dist/linker-dapp/routes.d.ts +11 -0
- package/dist/linker-dapp/routes.js +56 -34
- package/dist/linker-dapp/routes.js.map +1 -1
- package/dist/logic/bundle.js +0 -31
- package/dist/logic/bundle.js.map +1 -1
- package/dist/logic/config.d.ts +0 -1
- package/dist/logic/config.js +0 -7
- package/dist/logic/config.js.map +1 -1
- package/dist/logic/error.d.ts +1 -1
- package/dist/logic/error.js.map +1 -1
- package/dist/logic/exec.d.ts +0 -1
- package/dist/logic/exec.js +2 -2
- package/dist/logic/exec.js.map +1 -1
- package/dist/logic/lang.js +1 -1
- package/dist/logic/scene-validations.d.ts +1 -8
- package/dist/logic/scene-validations.js.map +1 -1
- package/package.json +3 -3
- package/dist/commands/sdk-server-logs/index.d.ts +0 -24
- package/dist/commands/sdk-server-logs/index.js +0 -313
- package/dist/commands/sdk-server-logs/index.js.map +0 -1
- package/dist/commands/start/hammurabi-server.d.ts +0 -19
- package/dist/commands/start/hammurabi-server.js +0 -78
- package/dist/commands/start/hammurabi-server.js.map +0 -1
- package/dist/commands/start/server/runtime-env.d.ts +0 -71
- package/dist/commands/start/server/runtime-env.js +0 -253
- package/dist/commands/start/server/runtime-env.js.map +0 -1
- package/dist/commands/start/server/storage-service.d.ts +0 -8
- package/dist/commands/start/server/storage-service.js +0 -156
- package/dist/commands/start/server/storage-service.js.map +0 -1
- package/dist/commands/storage/env.d.ts +0 -5
- package/dist/commands/storage/env.js +0 -86
- package/dist/commands/storage/env.js.map +0 -1
- package/dist/commands/storage/index.d.ts +0 -26
- package/dist/commands/storage/index.js +0 -142
- package/dist/commands/storage/index.js.map +0 -1
- package/dist/commands/storage/player.d.ts +0 -5
- package/dist/commands/storage/player.js +0 -143
- package/dist/commands/storage/player.js.map +0 -1
- package/dist/commands/storage/scene.d.ts +0 -5
- package/dist/commands/storage/scene.js +0 -105
- package/dist/commands/storage/scene.js.map +0 -1
- package/dist/commands/storage/shared.d.ts +0 -62
- package/dist/commands/storage/shared.js +0 -249
- package/dist/commands/storage/shared.js.map +0 -1
- package/dist/commands/storage/types.d.ts +0 -56
- package/dist/commands/storage/types.js +0 -23
- package/dist/commands/storage/types.js.map +0 -1
- package/dist/logic/auth-chain-headers.d.ts +0 -11
- package/dist/logic/auth-chain-headers.js +0 -25
- package/dist/logic/auth-chain-headers.js.map +0 -1
|
@@ -66,7 +66,6 @@ const beautiful_logs_1 = require("../../logic/beautiful-logs");
|
|
|
66
66
|
const project_validations_1 = require("../../logic/project-validations");
|
|
67
67
|
const explorer_alpha_1 = require("./explorer-alpha");
|
|
68
68
|
const utils_1 = require("./utils");
|
|
69
|
-
const hammurabi_server_1 = require("./hammurabi-server");
|
|
70
69
|
exports.args = (0, args_1.declareArgs)({
|
|
71
70
|
'--dir': String,
|
|
72
71
|
'--help': Boolean,
|
|
@@ -240,22 +239,6 @@ async function main(options) {
|
|
|
240
239
|
}
|
|
241
240
|
}
|
|
242
241
|
await startComponents();
|
|
243
|
-
// Start Hammurabi server if needed (stored outside components to avoid lifecycle management)
|
|
244
|
-
let hammurabiServer;
|
|
245
|
-
const project = workspace.projects[0];
|
|
246
|
-
if (project) {
|
|
247
|
-
const realm = `http://localhost:${port}`;
|
|
248
|
-
hammurabiServer = (0, hammurabi_server_1.spawnAuthServer)(components, project, realm);
|
|
249
|
-
// Register cleanup handler for hammurabi server
|
|
250
|
-
if (hammurabiServer) {
|
|
251
|
-
const cleanup = () => {
|
|
252
|
-
if (hammurabiServer && !hammurabiServer.killed) {
|
|
253
|
-
hammurabiServer.kill('SIGTERM');
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
components.signaler.programClosed.then(cleanup).catch(() => { });
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
242
|
const networkInterfaces = os.networkInterfaces();
|
|
260
243
|
const availableURLs = [];
|
|
261
244
|
(0, beautiful_logs_1.printProgressInfo)(options.components.logger, 'Preview server is now running!');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/start/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/start/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,oBAgDC;AAED,oBAoKC;AAlSD,uCAAwB;AACxB,2CAA4B;AAC5B,4DAAmC;AACnC,oDAA2B;AAG3B,oCAAqC;AACrC,2CAA8C;AAC9C,qEAA6D;AAC7D,6DAAmD;AAEnD,4DAA2E;AAC3E,kEAA6D;AAC7D,oFAAwF;AACxF,+DAAwF;AACxF,oEAA0E;AAC1E,0DAAyE;AACzE,8CAAuD;AACvD,8CAAoE;AACpE,sEAA0E;AAC1E,4CAA4C;AAC5C,oCAA+C;AAC/C,6DAA8D;AAC9D,0CAA6D;AAC7D,8DAAwE;AACxE,6EAAqE;AACrE,+DAAyG;AAEzG,yEAAkE;AAClE,qDAAmD;AACnD,mCAAmC;AAOtB,QAAA,IAAI,GAAG,IAAA,kBAAW,EAAC;IAC9B,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,MAAM;IAChB,YAAY,EAAE,OAAO;IACrB,cAAc,EAAE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C,GAAG,EAAE,CAAC;wBACT,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,YAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC,CAAA;wBACrE,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;wBACzB,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,wBAAwB,QAAQ,iBAAiB,CAAC,CAAA;oBAC1E,CAAC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;YAED,IAAI,OAAO,IAAI,WAAW,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC/D,IAAI,CAAC;oBACH,MAAM,IAAA,cAAI,EAAC,OAAO,CAAC,CAAA;gBACrB,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAA;gBACjE,CAAC;YACH,CAAC;YACD,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;QACnD,CAAC;KACF,CAAC,CAAA;IAEF,mEAAmE;IACnE,8EAA8E;IAC9E,UAAU;IACV,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAA;AACjD,CAAC"}
|
|
@@ -10,7 +10,6 @@ const http_server_1 = require("@well-known-components/http-server");
|
|
|
10
10
|
const ws_1 = require("@well-known-components/http-server/dist/ws");
|
|
11
11
|
const ws_2 = require("../data-layer/ws");
|
|
12
12
|
const endpoints_1 = require("./endpoints");
|
|
13
|
-
const storage_service_1 = require("./storage-service");
|
|
14
13
|
const realm_1 = require("./realm");
|
|
15
14
|
const utils_1 = require("../utils");
|
|
16
15
|
exports.sceneUpdateClients = new Set();
|
|
@@ -61,7 +60,6 @@ async function wireRouter(components, workspace, dataLayer) {
|
|
|
61
60
|
};
|
|
62
61
|
});
|
|
63
62
|
(0, realm_1.setupRealmAndComms)(components, router, localSceneParcels);
|
|
64
|
-
(0, storage_service_1.setupStorageEndpoints)(components, router, workspace);
|
|
65
63
|
await (0, endpoints_1.setupEcs6Endpoints)(components, router, workspace);
|
|
66
64
|
components.server.setContext(components);
|
|
67
65
|
components.server.use(router.allowedMethods());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../src/commands/start/server/routes.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../src/commands/start/server/routes.ts"],"names":[],"mappings":";;;;;;AAaA,gCA6DC;AA1ED,oDAA2B;AAC3B,oEAA2D;AAC3D,mEAAqF;AAIrF,yCAAoD;AAEpD,2CAAgD;AAChD,mCAA4C;AAC5C,oCAAoC;AAEvB,QAAA,kBAAkB,GAAG,IAAI,GAAG,EAAa,CAAA;AAC/C,KAAK,UAAU,UAAU,CAAC,UAA6B,EAAE,SAAoB,EAAE,SAAqB;IACzG,MAAM,MAAM,GAAG,IAAI,oBAAM,EAAqB,CAAA;IAE9C,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5C,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,WAAW,EAAE,CAAC;gBACvD,OAAO,IAAA,6BAAwB,EAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,sBAAiB,EAAC,UAAU,EAAE,EAAS,EAAE,SAAS,CAAC,CAAC,CAAA;YAC9F,CAAC;YAED,OAAO,IAAI,EAAE,CAAA;QACf,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAClC,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,WAAW,EAAE,CAA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I;gBACR,IAAI,EAAE;oBACJ,GAAG,EAAE,QAAQ;oBACb,EAAE,EAAE,SAAS;iBACd;aACF;SACF,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,IAAA,0BAAkB,EAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAA;IACzD,MAAM,IAAA,8BAAkB,EAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;IAEvD,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;IACxC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAA;IAC9C,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,gBAAgB,GAAG,CAAC,EAAa,EAAE,OAAuB,EAAE,EAAE;IAClE,IAAI,EAAE,CAAC,UAAU,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACjB,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;IACtC,CAAC;IACD,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;AAC1C,CAAC,CAAA"}
|
|
@@ -4,7 +4,6 @@ import { RoomComponent } from '@dcl/mini-comms/dist/adapters/rooms';
|
|
|
4
4
|
import { WebSocketComponent } from './server/ws';
|
|
5
5
|
import { CliComponents } from '../../components';
|
|
6
6
|
import { ISignalerComponent } from '../../components/exit-signal';
|
|
7
|
-
import { ChildProcess } from 'child_process';
|
|
8
7
|
export type PreviewComponents = CliComponents & {
|
|
9
8
|
logs: ILoggerComponent;
|
|
10
9
|
server: IHttpServerComponent<PreviewComponents>;
|
|
@@ -14,6 +13,4 @@ export type PreviewComponents = CliComponents & {
|
|
|
14
13
|
rooms: RoomComponent;
|
|
15
14
|
ws: WebSocketComponent;
|
|
16
15
|
signaler: ISignalerComponent;
|
|
17
|
-
/** Authoritative Server process (@dcl/hammurabi-server) */
|
|
18
|
-
hammurabiServer?: ChildProcess;
|
|
19
16
|
};
|
|
@@ -6,37 +6,3 @@ export declare function getLanIp(): string | undefined;
|
|
|
6
6
|
* Get the full LAN URL with protocol for external device access
|
|
7
7
|
*/
|
|
8
8
|
export declare function getLanUrl(port: number | string): string | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Detects if the code is running in an Electron environment
|
|
11
|
-
*/
|
|
12
|
-
export declare function isElectronEnvironment(): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Gets the spawn environment, adding ELECTRON_RUN_AS_NODE if running in Electron
|
|
15
|
-
*/
|
|
16
|
-
export declare function getSpawnEnv(): {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Gets the npm binary name (npm or npm.cmd on Windows)
|
|
21
|
-
*/
|
|
22
|
-
export declare function getNpmBin(): string;
|
|
23
|
-
/**
|
|
24
|
-
* Gets the npx binary name (npx or npx.cmd on Windows)
|
|
25
|
-
*/
|
|
26
|
-
export declare function getNpxBin(): string;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the npm-cli.js path in Electron environment, or null if not found
|
|
29
|
-
* Should only be called when isElectronEnvironment() returns true
|
|
30
|
-
*/
|
|
31
|
-
export declare function getElectronNpm(): string | null;
|
|
32
|
-
/**
|
|
33
|
-
* Attempts to find npx-cli.js on disk. Works in both regular Node.js and Electron.
|
|
34
|
-
*
|
|
35
|
-
* Tries three strategies:
|
|
36
|
-
* 1. Derive from process.execPath (standard Node.js installs, nvm, etc.)
|
|
37
|
-
* 2. Look alongside the npm binary found on PATH
|
|
38
|
-
* 3. Look inside Electron's app.asar.unpacked bundled npm (e.g. Creator Hub)
|
|
39
|
-
*
|
|
40
|
-
* Returns the absolute path to npx-cli.js, or null if not found.
|
|
41
|
-
*/
|
|
42
|
-
export declare function findNpxCliJs(): string | null;
|
|
@@ -32,24 +32,10 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
36
|
exports.getLanIp = getLanIp;
|
|
40
37
|
exports.getLanUrl = getLanUrl;
|
|
41
|
-
exports.isElectronEnvironment = isElectronEnvironment;
|
|
42
|
-
exports.getSpawnEnv = getSpawnEnv;
|
|
43
|
-
exports.getNpmBin = getNpmBin;
|
|
44
|
-
exports.getNpxBin = getNpxBin;
|
|
45
|
-
exports.getElectronNpm = getElectronNpm;
|
|
46
|
-
exports.findNpxCliJs = findNpxCliJs;
|
|
47
38
|
const os = __importStar(require("os"));
|
|
48
|
-
const fs_1 = __importDefault(require("fs"));
|
|
49
|
-
const path_1 = __importDefault(require("path"));
|
|
50
|
-
// Platform-aware binary names
|
|
51
|
-
const npmBin = /^win/.test(process.platform) ? 'npm.cmd' : 'npm';
|
|
52
|
-
const npxBin = /^win/.test(process.platform) ? 'npx.cmd' : 'npx';
|
|
53
39
|
/**
|
|
54
40
|
* Get the LAN IP address for external device access (e.g., mobile preview)
|
|
55
41
|
*/
|
|
@@ -68,94 +54,4 @@ function getLanUrl(port) {
|
|
|
68
54
|
return undefined;
|
|
69
55
|
return `http://${ip}:${port}`;
|
|
70
56
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Detects if the code is running in an Electron environment
|
|
73
|
-
*/
|
|
74
|
-
function isElectronEnvironment() {
|
|
75
|
-
return typeof process.versions !== 'undefined' && 'electron' in process.versions;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Gets the spawn environment, adding ELECTRON_RUN_AS_NODE if running in Electron
|
|
79
|
-
*/
|
|
80
|
-
function getSpawnEnv() {
|
|
81
|
-
if (isElectronEnvironment()) {
|
|
82
|
-
return {
|
|
83
|
-
...process.env,
|
|
84
|
-
ELECTRON_RUN_AS_NODE: '1'
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return process.env;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Gets the npm binary name (npm or npm.cmd on Windows)
|
|
91
|
-
*/
|
|
92
|
-
function getNpmBin() {
|
|
93
|
-
return npmBin;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Gets the npx binary name (npx or npx.cmd on Windows)
|
|
97
|
-
*/
|
|
98
|
-
function getNpxBin() {
|
|
99
|
-
return npxBin;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Gets the npm-cli.js path in Electron environment, or null if not found
|
|
103
|
-
* Should only be called when isElectronEnvironment() returns true
|
|
104
|
-
*/
|
|
105
|
-
function getElectronNpm() {
|
|
106
|
-
const npmPath = process.env.PATH?.split(path_1.default.delimiter)
|
|
107
|
-
.map((dir) => path_1.default.join(dir, npmBin))
|
|
108
|
-
.find((npm) => fs_1.default.existsSync(npm)) || npmBin;
|
|
109
|
-
if (fs_1.default.existsSync(npmPath)) {
|
|
110
|
-
const npmCliJs = path_1.default.join(path_1.default.dirname(npmPath), 'npm-cli.js');
|
|
111
|
-
if (fs_1.default.existsSync(npmCliJs)) {
|
|
112
|
-
return npmCliJs;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Attempts to find npx-cli.js on disk. Works in both regular Node.js and Electron.
|
|
119
|
-
*
|
|
120
|
-
* Tries three strategies:
|
|
121
|
-
* 1. Derive from process.execPath (standard Node.js installs, nvm, etc.)
|
|
122
|
-
* 2. Look alongside the npm binary found on PATH
|
|
123
|
-
* 3. Look inside Electron's app.asar.unpacked bundled npm (e.g. Creator Hub)
|
|
124
|
-
*
|
|
125
|
-
* Returns the absolute path to npx-cli.js, or null if not found.
|
|
126
|
-
*/
|
|
127
|
-
function findNpxCliJs() {
|
|
128
|
-
const execDir = path_1.default.dirname(process.execPath);
|
|
129
|
-
// Strategy 1: Derive from process.execPath
|
|
130
|
-
// Unix: {prefix}/bin/node -> {prefix}/lib/node_modules/npm/bin/npx-cli.js
|
|
131
|
-
// Windows: {prefix}/node.exe -> {prefix}/node_modules/npm/bin/npx-cli.js
|
|
132
|
-
const execPathCandidates = [
|
|
133
|
-
path_1.default.join(execDir, '..', 'lib', 'node_modules', 'npm', 'bin', 'npx-cli.js'),
|
|
134
|
-
path_1.default.join(execDir, 'node_modules', 'npm', 'bin', 'npx-cli.js')
|
|
135
|
-
];
|
|
136
|
-
for (const candidate of execPathCandidates) {
|
|
137
|
-
if (fs_1.default.existsSync(candidate)) {
|
|
138
|
-
return candidate;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
// Strategy 2: Find npx-cli.js next to npm on PATH
|
|
142
|
-
const npmPath = process.env.PATH?.split(path_1.default.delimiter)
|
|
143
|
-
.map((dir) => path_1.default.join(dir, npmBin))
|
|
144
|
-
.find((npm) => fs_1.default.existsSync(npm)) || npmBin;
|
|
145
|
-
if (fs_1.default.existsSync(npmPath)) {
|
|
146
|
-
const npxCliJs = path_1.default.join(path_1.default.dirname(npmPath), 'npx-cli.js');
|
|
147
|
-
if (fs_1.default.existsSync(npxCliJs)) {
|
|
148
|
-
return npxCliJs;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
// Strategy 3: Look in Electron's app.asar.unpacked bundled npm
|
|
152
|
-
const resourcesPath = process.resourcesPath;
|
|
153
|
-
if (resourcesPath) {
|
|
154
|
-
const npxCliJs = path_1.default.join(resourcesPath, 'app.asar.unpacked', 'node_modules', 'npm', 'bin', 'npx-cli.js');
|
|
155
|
-
if (fs_1.default.existsSync(npxCliJs)) {
|
|
156
|
-
return npxCliJs;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
57
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/commands/start/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/commands/start/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,4BAKC;AAKD,8BAIC;AAnBD,uCAAwB;AAExB;;GAEG;AACH,SAAgB,QAAQ;IACtB,MAAM,iBAAiB,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAA;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC;SACpC,IAAI,EAAE;SACN,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,WAAW,CAAC,EAAE,OAAO,CAAA;AACnH,CAAC;AAED;;GAEG;AACH,SAAgB,SAAS,CAAC,IAAqB;IAC7C,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IACrB,IAAI,CAAC,EAAE;QAAE,OAAO,SAAS,CAAA;IACzB,OAAO,UAAU,EAAE,IAAI,IAAI,EAAE,CAAA;AAC/B,CAAC"}
|
|
@@ -97,77 +97,8 @@ export type Events = {
|
|
|
97
97
|
code: number;
|
|
98
98
|
creatorAddress: string;
|
|
99
99
|
};
|
|
100
|
-
'Storage Env Set Success': {
|
|
101
|
-
key: string;
|
|
102
|
-
};
|
|
103
|
-
'Storage Env Set Failure': {
|
|
104
|
-
key: string;
|
|
105
|
-
};
|
|
106
|
-
'Storage Env Delete Success': {
|
|
107
|
-
key: string;
|
|
108
|
-
};
|
|
109
|
-
'Storage Env Delete Failure': {
|
|
110
|
-
key: string;
|
|
111
|
-
};
|
|
112
|
-
'Storage Env Clear Success': Record<string, never>;
|
|
113
|
-
'Storage Env Clear Failure': Record<string, never>;
|
|
114
|
-
'Storage Scene Get Success': {
|
|
115
|
-
key: string;
|
|
116
|
-
};
|
|
117
|
-
'Storage Scene Get Failure': {
|
|
118
|
-
key: string;
|
|
119
|
-
};
|
|
120
|
-
'Storage Scene Set Success': {
|
|
121
|
-
key: string;
|
|
122
|
-
};
|
|
123
|
-
'Storage Scene Set Failure': {
|
|
124
|
-
key: string;
|
|
125
|
-
};
|
|
126
|
-
'Storage Scene Delete Success': {
|
|
127
|
-
key: string;
|
|
128
|
-
};
|
|
129
|
-
'Storage Scene Delete Failure': {
|
|
130
|
-
key: string;
|
|
131
|
-
};
|
|
132
|
-
'Storage Scene Clear Success': Record<string, never>;
|
|
133
|
-
'Storage Scene Clear Failure': Record<string, never>;
|
|
134
|
-
'Storage Player Get Success': {
|
|
135
|
-
key: string;
|
|
136
|
-
address: string;
|
|
137
|
-
};
|
|
138
|
-
'Storage Player Get Failure': {
|
|
139
|
-
key: string;
|
|
140
|
-
address: string;
|
|
141
|
-
};
|
|
142
|
-
'Storage Player Set Success': {
|
|
143
|
-
key: string;
|
|
144
|
-
address: string;
|
|
145
|
-
};
|
|
146
|
-
'Storage Player Set Failure': {
|
|
147
|
-
key: string;
|
|
148
|
-
address: string;
|
|
149
|
-
};
|
|
150
|
-
'Storage Player Delete Success': {
|
|
151
|
-
key: string;
|
|
152
|
-
address: string;
|
|
153
|
-
};
|
|
154
|
-
'Storage Player Delete Failure': {
|
|
155
|
-
key: string;
|
|
156
|
-
address: string;
|
|
157
|
-
};
|
|
158
|
-
'Storage Player Clear Success': {
|
|
159
|
-
address: string;
|
|
160
|
-
};
|
|
161
|
-
'Storage Player Clear Failure': {
|
|
162
|
-
address: string;
|
|
163
|
-
};
|
|
164
|
-
'Storage Player Clear All Success': Record<string, never>;
|
|
165
|
-
'Storage Player Clear All Failure': Record<string, never>;
|
|
166
|
-
};
|
|
167
|
-
export type CreateAnalyticsOptions = {
|
|
168
|
-
writeKey?: string;
|
|
169
100
|
};
|
|
170
|
-
export declare function createAnalyticsComponent(components: Pick<CliComponents, 'config' | 'logger' | 'fs'
|
|
101
|
+
export declare function createAnalyticsComponent(components: Pick<CliComponents, 'config' | 'logger' | 'fs'>): Promise<IAnalyticsComponent | {
|
|
171
102
|
get(): Analytics;
|
|
172
103
|
track: <T extends keyof Events>(eventName: T, eventProps: Events[T]) => void;
|
|
173
104
|
stop(): Promise<void>;
|
|
@@ -10,15 +10,14 @@ const noopAnalytics = {
|
|
|
10
10
|
track() { },
|
|
11
11
|
async stop() { }
|
|
12
12
|
};
|
|
13
|
-
async function createAnalyticsComponent(components
|
|
13
|
+
async function createAnalyticsComponent(components) {
|
|
14
14
|
const analyticsEnabled = (await (0, config_1.readStringConfig)(components, 'DCL_DISABLE_ANALYTICS')) !== 'true';
|
|
15
15
|
if (!analyticsEnabled) {
|
|
16
16
|
return noopAnalytics;
|
|
17
17
|
}
|
|
18
18
|
const USER_ID = 'sdk-commands-user';
|
|
19
19
|
let anonId = await (0, config_1.readStringConfig)(components, 'DCL_ANON_ID');
|
|
20
|
-
const
|
|
21
|
-
const analytics = new analytics_node_1.Analytics({ writeKey });
|
|
20
|
+
const analytics = new analytics_node_1.Analytics({ writeKey: (0, config_2.getSegmentKey)() });
|
|
22
21
|
if (!anonId) {
|
|
23
22
|
anonId = (0, crypto_1.randomUUID)();
|
|
24
23
|
await (0, config_1.writeGlobalConfig)(components, 'DCL_ANON_ID', anonId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/components/analytics.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/components/analytics.ts"],"names":[],"mappings":";;AA+FA,4DA4EC;AA3KD,mCAAmC;AACnC,4DAAmD;AAGnD,+BAA8B;AAC9B,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AC9B,EAAE,EAAE,OAAO,CAAC,QAAQ;QACpB,WAAW,EAAE,OAAO,CAAC,OAAO;QAC5B,UAAU,EAAE,MAAM,IAAA,8BAAqB,GAAE;QACzC,IAAI,EAAE,IAAA,aAAI,GAAE;QACZ,QAAQ,EAAE,IAAA,iBAAQ,GAAE;QACpB,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,IAAI;QACnD,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,IAAI;QAC3C,GAAG,EAAE;YACH,UAAU,EAAE,MAAM;YAClB,cAAc,EAAE,UAAU;SAC3B;KACF,CAAA;IAED,SAAS,KAAK,CAAyB,SAAY,EAAE,UAAqB;QACxE,SAAS,CAAC,KAAK,CAAC;YACd,MAAM,EAAE,OAAO;YACf,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE;gBACV,GAAG,UAAU;gBACb,GAAG,uBAAuB;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;IAED,OAAO;QACL,GAAG;YACD,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,KAAK;QACL,KAAK,CAAC,IAAI;YACR,iFAAiF;YACjF,+EAA+E;YAC/E,oFAAoF;YACpF,MAAM,SAAS,CAAC,aAAa,EAAE,CAAA;QACjC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { Router } from '@well-known-components/http-server';
|
|
2
|
+
import { IHttpServerComponent } from '@well-known-components/interfaces';
|
|
2
3
|
import { ChainId } from '@dcl/schemas';
|
|
3
4
|
import { AuthChain } from '@dcl/crypto';
|
|
4
5
|
import { CliComponents } from '../components';
|
|
6
|
+
export declare function forwardedHeaders(request: IHttpServerComponent.IRequest, overrides: Record<string, string>): Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Builds the headers returned to the linker-dapp client from a proxied fetch response.
|
|
9
|
+
*
|
|
10
|
+
* undici transparently decompresses the body but leaves the upstream `content-encoding` and
|
|
11
|
+
* `content-length` in place; forwarding them would make the client re-decode an already-decoded
|
|
12
|
+
* body or truncate it at the wrong length, so both are dropped and the framing is recomputed
|
|
13
|
+
* downstream.
|
|
14
|
+
*/
|
|
15
|
+
export declare function proxiedResponseHeaders(headers: Headers): Record<string, string>;
|
|
5
16
|
/**
|
|
6
17
|
* Set common routes to use on Linker dApp
|
|
7
18
|
* @param components Server components
|
|
@@ -1,10 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forwardedHeaders = forwardedHeaders;
|
|
4
|
+
exports.proxiedResponseHeaders = proxiedResponseHeaders;
|
|
3
5
|
exports.setRoutes = setRoutes;
|
|
4
6
|
const path_1 = require("path");
|
|
5
7
|
const stream_1 = require("stream");
|
|
6
8
|
const undici_1 = require("undici");
|
|
7
9
|
const http_server_1 = require("@well-known-components/http-server");
|
|
10
|
+
const STRIPPED_REQUEST_HEADERS = new Set([
|
|
11
|
+
'connection',
|
|
12
|
+
'content-length',
|
|
13
|
+
'keep-alive',
|
|
14
|
+
'proxy-authenticate',
|
|
15
|
+
'proxy-authorization',
|
|
16
|
+
'te',
|
|
17
|
+
'trailer',
|
|
18
|
+
'transfer-encoding',
|
|
19
|
+
'upgrade'
|
|
20
|
+
]);
|
|
21
|
+
function forwardedHeaders(request, overrides) {
|
|
22
|
+
const overriddenNames = new Set(Object.keys(overrides).map((name) => name.toLowerCase()));
|
|
23
|
+
const forwarded = {};
|
|
24
|
+
for (const [key, value] of request.headers) {
|
|
25
|
+
const name = key.toLowerCase();
|
|
26
|
+
if (STRIPPED_REQUEST_HEADERS.has(name) || overriddenNames.has(name))
|
|
27
|
+
continue;
|
|
28
|
+
forwarded[name] = value;
|
|
29
|
+
}
|
|
30
|
+
return { ...forwarded, ...overrides };
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Builds the headers returned to the linker-dapp client from a proxied fetch response.
|
|
34
|
+
*
|
|
35
|
+
* undici transparently decompresses the body but leaves the upstream `content-encoding` and
|
|
36
|
+
* `content-length` in place; forwarding them would make the client re-decode an already-decoded
|
|
37
|
+
* body or truncate it at the wrong length, so both are dropped and the framing is recomputed
|
|
38
|
+
* downstream.
|
|
39
|
+
*/
|
|
40
|
+
function proxiedResponseHeaders(headers) {
|
|
41
|
+
const result = {};
|
|
42
|
+
for (const [key, value] of headers) {
|
|
43
|
+
const name = key.toLowerCase();
|
|
44
|
+
if (['content-encoding', 'content-length'].includes(name))
|
|
45
|
+
continue;
|
|
46
|
+
result[name] = value;
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
8
50
|
/**
|
|
9
51
|
* Set common routes to use on Linker dApp
|
|
10
52
|
* @param components Server components
|
|
@@ -15,8 +57,6 @@ function setRoutes(components, info, mainRoute = '/') {
|
|
|
15
57
|
const { fs } = components;
|
|
16
58
|
const router = new http_server_1.Router();
|
|
17
59
|
const linkerDapp = (0, path_1.dirname)(require.resolve('@dcl/linker-dapp/package.json'));
|
|
18
|
-
// Dispatcher used by the /auth proxy below to skip TLS verification, mirroring the
|
|
19
|
-
// previous `new https.Agent({ rejectUnauthorized: false })` behavior with native fetch.
|
|
20
60
|
const insecureDispatcher = new undici_1.Agent({ connect: { rejectUnauthorized: false } });
|
|
21
61
|
router.get(mainRoute, async () => ({
|
|
22
62
|
headers: { 'Content-Type': 'text/html' },
|
|
@@ -36,44 +76,26 @@ function setRoutes(components, info, mainRoute = '/') {
|
|
|
36
76
|
body: fs.createReadStream((0, path_1.resolve)(linkerDapp, 'assets', ctx.params.path))
|
|
37
77
|
};
|
|
38
78
|
});
|
|
39
|
-
/* This route acts as a proxy to handle the auth flow with the Decentraland auth dApp,
|
|
40
|
-
* because this latest one validates the communication be on the same domain.
|
|
41
|
-
*/
|
|
42
79
|
router.get('/auth/(.*)', async (ctx) => {
|
|
43
80
|
try {
|
|
44
81
|
const domain = 'decentraland.org';
|
|
45
82
|
const url = `https://${domain}${ctx.url.pathname}${ctx.url.search}`;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
duplex: 'half', // Required by native fetch when streaming a request body.
|
|
57
|
-
dispatcher: insecureDispatcher // Skip TLS verification.
|
|
83
|
+
const response = await components.fetch.fetch(url, {
|
|
84
|
+
method: ctx.request.method,
|
|
85
|
+
headers: forwardedHeaders(ctx.request, {
|
|
86
|
+
host: domain,
|
|
87
|
+
referer: url,
|
|
88
|
+
origin: url
|
|
89
|
+
}),
|
|
90
|
+
body: ctx.request.body,
|
|
91
|
+
duplex: 'half',
|
|
92
|
+
dispatcher: insecureDispatcher
|
|
58
93
|
});
|
|
59
|
-
|
|
60
|
-
// place; forwarding them would make the client re-decode or truncate the body.
|
|
61
|
-
// The headers on a fetch() Response are immutable (mutating them throws
|
|
62
|
-
// `TypeError: immutable`), so build a filtered copy instead of deleting in place.
|
|
63
|
-
const headers = {};
|
|
64
|
-
for (const [key, value] of resp.headers) {
|
|
65
|
-
const name = key.toLowerCase();
|
|
66
|
-
if (name === 'content-encoding' || name === 'content-length')
|
|
67
|
-
continue;
|
|
68
|
-
headers[key] = value;
|
|
69
|
-
}
|
|
70
|
-
// Return the proxied response, including body, status, and headers.
|
|
71
|
-
// `resp.body` is a web ReadableStream; convert it to a Node stream so the
|
|
72
|
-
// http-server can pipe it (it only handles Node streams / Buffers / strings).
|
|
94
|
+
const responseHeaders = proxiedResponseHeaders(response.headers);
|
|
73
95
|
return {
|
|
74
|
-
body:
|
|
75
|
-
status:
|
|
76
|
-
headers
|
|
96
|
+
body: response.body ? stream_1.Readable.fromWeb(response.body) : undefined,
|
|
97
|
+
status: response.status,
|
|
98
|
+
headers: responseHeaders
|
|
77
99
|
};
|
|
78
100
|
}
|
|
79
101
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/linker-dapp/routes.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/linker-dapp/routes.ts"],"names":[],"mappings":";;AAsBA,4CAcC;AAUD,wDAUC;AAQD,8BA0EC;AA1ID,+BAAuC;AACvC,mCAAiC;AACjC,mCAA8B;AAC9B,oEAA2D;AAO3D,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IACvC,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,oBAAoB;IACpB,qBAAqB;IACrB,IAAI;IACJ,SAAS;IACT,mBAAmB;IACnB,SAAS;CACV,CAAC,CAAA;AAEF,SAAgB,gBAAgB,CAC9B,OAAsC,EACtC,SAAiC;IAEjC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;IACzF,MAAM,SAAS,GAA2B,EAAE,CAAA;IAE5C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,EAAE,CAAA;QAC9B,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,SAAQ;QAC7E,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;IACzB,CAAC;IAED,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,SAAS,EAAE,CAAA;AACvC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,OAAgB;IACrD,MAAM,MAAM,GAA2B,EAAE,CAAA;IAEzC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO,EAAE,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AA;QACjC,KAAK,OAAO,CAAC;QACb;YACE,OAAO,YAAY,CAAA;IACvB,CAAC;AACH,CAAC"}
|
package/dist/logic/bundle.js
CHANGED
|
@@ -86,31 +86,6 @@ export * from ${safeEntrypointPath}
|
|
|
86
86
|
export * from '~sdk/script-utils'
|
|
87
87
|
`;
|
|
88
88
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Ensures a key exists in a JSON file. Supports dot-separated paths (e.g. "scripts.server-logs").
|
|
91
|
-
* Silently skips if the file can't be read/written or the key already exists.
|
|
92
|
-
*/
|
|
93
|
-
async function ensureJsonKey(components, filePath, keyPath, value) {
|
|
94
|
-
try {
|
|
95
|
-
const raw = await components.fs.readFile(filePath, 'utf-8');
|
|
96
|
-
const parsed = JSON.parse(raw);
|
|
97
|
-
const keys = keyPath.split('.');
|
|
98
|
-
const lastKey = keys.pop();
|
|
99
|
-
let target = parsed;
|
|
100
|
-
for (const key of keys) {
|
|
101
|
-
target[key] = target[key] || {};
|
|
102
|
-
target = target[key];
|
|
103
|
-
}
|
|
104
|
-
if (target[lastKey] !== undefined)
|
|
105
|
-
return;
|
|
106
|
-
target[lastKey] = value;
|
|
107
|
-
await components.fs.writeFile(filePath, JSON.stringify(parsed, null, 2));
|
|
108
|
-
(0, beautiful_logs_1.printProgressInfo)(components.logger, `Added ${log_1.colors.bold(`${keyPath}: ${JSON.stringify(value)}`)} to ${path_1.default.basename(filePath)}`);
|
|
109
|
-
}
|
|
110
|
-
catch (_) {
|
|
111
|
-
// read/write failed — skip silently
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
89
|
async function bundleProject(components, options, sceneJson) {
|
|
115
90
|
const tsconfig = path_1.default.join(options.workingDirectory, 'tsconfig.json');
|
|
116
91
|
/* istanbul ignore if */
|
|
@@ -135,12 +110,6 @@ async function bundleProject(components, options, sceneJson) {
|
|
|
135
110
|
const inputs = options.single
|
|
136
111
|
? entrypoints.map((entrypoint) => ({ entrypoint, outputFile: entrypoint.replace(/\.ts$/, '.js') }))
|
|
137
112
|
: [{ entrypoint: entrypoints[0], outputFile: sceneJson.main }];
|
|
138
|
-
// Auto-add build-time defaults for Multiplayer Auth Server scene builds
|
|
139
|
-
if (!options.single) {
|
|
140
|
-
const dir = options.workingDirectory;
|
|
141
|
-
await ensureJsonKey(components, path_1.default.join(dir, 'scene.json'), 'authoritativeMultiplayer', true);
|
|
142
|
-
await ensureJsonKey(components, path_1.default.join(dir, 'package.json'), 'scripts.server-logs', 'sdk-commands sdk-server-logs');
|
|
143
|
-
}
|
|
144
113
|
for (const input of inputs) {
|
|
145
114
|
await bundleSingleProject(components, {
|
|
146
115
|
...options,
|