@unisphere/cli 1.52.3 → 1.53.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unisphere/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"unisphere": "./src/cli.js"
|
|
6
6
|
},
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"express": "5.1.0",
|
|
66
66
|
"archiver": "5.3.2",
|
|
67
67
|
"fast-glob": "3.2.12",
|
|
68
|
+
"watchpack": "2.4.0",
|
|
68
69
|
"@aws-sdk/client-s3": "3.216.0",
|
|
69
70
|
"@aws-sdk/client-sts": "3.216.0",
|
|
70
71
|
"axios": "1.2.0",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
export declare const createServeCommand: (
|
|
2
|
+
export declare const createServeCommand: (parent: Command) => Command;
|
|
@@ -11,12 +11,70 @@ const prompts_1 = require("../../utils/prompts/prompts");
|
|
|
11
11
|
const build_unisphere_elements_1 = require("../../utils/unisphere/build-unisphere-elements");
|
|
12
12
|
const serve_languages_1 = require("../../utils/serve-languages");
|
|
13
13
|
const path = require("path");
|
|
14
|
+
const Watchpack = require("watchpack");
|
|
15
|
+
const promises_1 = require("fs/promises");
|
|
16
|
+
const fs = require("fs");
|
|
14
17
|
const debug = (0, debug_1.default)('unisphere:runtime:serve');
|
|
15
|
-
const BUILD_TIMEOUT = 300000;
|
|
16
|
-
const KILL_TIMEOUT = 5000;
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const BUILD_TIMEOUT = 300000;
|
|
19
|
+
const KILL_TIMEOUT = 5000;
|
|
20
|
+
const DEBOUNCE_MS = 300;
|
|
21
|
+
const changedFiles = new Set();
|
|
22
|
+
let debounceTimeout = null;
|
|
23
|
+
let currentBuildProcess = null;
|
|
24
|
+
function wait(ms) {
|
|
25
|
+
return new Promise((r) => setTimeout(r, ms));
|
|
26
|
+
}
|
|
27
|
+
function waitForBuildLockRelease(dir_1) {
|
|
28
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (dir, maxWaitMs = 60000) {
|
|
29
|
+
const lock = path.join(dir, '.runtime-build.lock');
|
|
30
|
+
console.log('[unisphere] waiting for build lock release', lock);
|
|
31
|
+
while (fs.existsSync(lock)) {
|
|
32
|
+
try {
|
|
33
|
+
const content = fs.readFileSync(lock, 'utf-8');
|
|
34
|
+
const timestamp = parseInt(content.trim(), 10);
|
|
35
|
+
if (!isNaN(timestamp)) {
|
|
36
|
+
const age = Date.now() - timestamp;
|
|
37
|
+
if (age > maxWaitMs) {
|
|
38
|
+
throw new Error(`Timeout waiting for build lock release (age: ${age}ms)`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
console.warn('[unisphere] failed to read lock file', err);
|
|
44
|
+
// Continue loop and check again
|
|
45
|
+
}
|
|
46
|
+
yield wait(100);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function acquireBuildLock(dir) {
|
|
51
|
+
const lock = path.join(dir, '.runtime-build.lock');
|
|
52
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
53
|
+
try {
|
|
54
|
+
const fd = fs.openSync(lock, 'wx'); // 'wx' = fail if file exists
|
|
55
|
+
fs.writeSync(fd, String(Date.now()));
|
|
56
|
+
fs.closeSync(fd);
|
|
57
|
+
console.log('[unisphere] build lock acquired', lock);
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
if (err.code === 'EEXIST') {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
throw err;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function releaseBuildLock(dir) {
|
|
70
|
+
const file = path.join(dir, '.runtime-build.lock');
|
|
71
|
+
if (fs.existsSync(file))
|
|
72
|
+
fs.unlinkSync(file);
|
|
73
|
+
console.log('[unisphere] build lock released', file);
|
|
74
|
+
}
|
|
75
|
+
const createServeCommand = (parent) => {
|
|
76
|
+
return parent
|
|
77
|
+
.command('serve')
|
|
20
78
|
.description('serve a unisphere runtime element')
|
|
21
79
|
.option('--verbose', 'output debug logs', false)
|
|
22
80
|
.addArgument(new commander_1.Argument('runtime', 'the runtime to serve'))
|
|
@@ -27,101 +85,65 @@ const createServeCommand = (parentCommand) => {
|
|
|
27
85
|
.option('--port <port>', 'the port to serve the runtime on')
|
|
28
86
|
.hook('preAction', utils_1.printVerboseHook)
|
|
29
87
|
.action((runtime, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
30
|
-
|
|
31
|
-
const { verbose, cwd, port, watch, languageServer } = options;
|
|
88
|
+
const { verbose, cwd, port, watch, languageServer, https } = options;
|
|
32
89
|
const workingDirectory = cwd || process.cwd();
|
|
33
90
|
const servePort = port || '8300';
|
|
34
91
|
try {
|
|
35
|
-
console.log(`Starting runtime server for runtime: ${runtime}`);
|
|
36
|
-
debug(`Working directory: ${workingDirectory}`);
|
|
37
|
-
debug(`Port: ${servePort}`);
|
|
38
92
|
const workspace = yield (0, workspace_1.getUnisphereWorkspace)(workingDirectory, {
|
|
39
93
|
suspendRecursion: true,
|
|
40
94
|
});
|
|
41
|
-
if (!workspace)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const runtimeNxProjectName = runtime === 'loader'
|
|
46
|
-
? workspace.config.elements.loader.nxProjectName
|
|
95
|
+
if (!workspace)
|
|
96
|
+
throw new Error(`No .unisphere file found in ${workingDirectory}`);
|
|
97
|
+
const runtimeConfig = runtime === 'loader'
|
|
98
|
+
? workspace.config.elements.loader
|
|
47
99
|
: runtime === 'workspace'
|
|
48
|
-
? workspace.config.elements.workspace
|
|
49
|
-
:
|
|
50
|
-
const distFolder =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
proc.kill('SIGTERM');
|
|
65
|
-
yield new Promise((resolve) => setTimeout(resolve, KILL_TIMEOUT));
|
|
66
|
-
if (!proc.killed)
|
|
67
|
-
proc.kill('SIGKILL');
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const loaderProcess = execa('npx', [
|
|
71
|
-
'nx',
|
|
72
|
-
'run',
|
|
73
|
-
`${runtimeNxProjectName}:build`,
|
|
74
|
-
'--skip-nx-cache',
|
|
75
|
-
verbose ? '--verbose' : '',
|
|
76
|
-
watch ? '--watch' : '',
|
|
77
|
-
].filter(Boolean), {
|
|
78
|
-
cwd: workingDirectory,
|
|
79
|
-
env: (0, build_unisphere_elements_1.getUnisphereEnv)(false, 'runtime'),
|
|
80
|
-
stdio: 'pipe',
|
|
81
|
-
});
|
|
82
|
-
// Pipe both stdout and stderr
|
|
83
|
-
if (loaderProcess.stdout) {
|
|
84
|
-
loaderProcess.stdout.pipe(process.stdout);
|
|
85
|
-
}
|
|
86
|
-
if (loaderProcess.stderr) {
|
|
87
|
-
loaderProcess.stderr.pipe(process.stderr);
|
|
88
|
-
}
|
|
89
|
-
// Wait for initial build with timeout
|
|
90
|
-
yield Promise.race([
|
|
91
|
-
new Promise((resolve, reject) => {
|
|
92
|
-
let buildStarted = false;
|
|
93
|
-
const timeoutId = setTimeout(() => {
|
|
94
|
-
reject(new Error(`Build timed out after ${BUILD_TIMEOUT / 1000} seconds`));
|
|
95
|
-
}, BUILD_TIMEOUT);
|
|
96
|
-
const onStdout = (data) => {
|
|
97
|
-
var _a;
|
|
98
|
-
const dataString = data.toString().trim();
|
|
99
|
-
if (!buildStarted && /Starting compilation/.test(dataString)) {
|
|
100
|
-
buildStarted = true;
|
|
101
|
-
console.log('Build started...');
|
|
102
|
-
}
|
|
103
|
-
if (/index\.dev\.esm\.js/.test(dataString)) {
|
|
104
|
-
clearTimeout(timeoutId);
|
|
105
|
-
(_a = loaderProcess.stdout) === null || _a === void 0 ? void 0 : _a.off('data', onStdout);
|
|
106
|
-
resolve();
|
|
100
|
+
? workspace.config.elements.workspace
|
|
101
|
+
: workspace.config.elements.runtimes[runtime];
|
|
102
|
+
const { nxProjectName, distFolder } = runtimeConfig;
|
|
103
|
+
if (!nxProjectName || !distFolder)
|
|
104
|
+
throw new Error(`Invalid runtime config for ${runtime}`);
|
|
105
|
+
const lockFolder = path.resolve(workspace.repository.repositoryRootPath, 'dist');
|
|
106
|
+
function buildRuntime(throwError) {
|
|
107
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
try {
|
|
110
|
+
const start = Date.now();
|
|
111
|
+
while (!acquireBuildLock(lockFolder)) {
|
|
112
|
+
if (Date.now() - start > 60000) {
|
|
113
|
+
throw new Error('Timeout acquiring build lock');
|
|
114
|
+
}
|
|
115
|
+
yield wait(100 + Math.random() * 200); // jittered retry
|
|
107
116
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
currentBuildProcess = execa('npx', [
|
|
118
|
+
'nx',
|
|
119
|
+
'run',
|
|
120
|
+
`${nxProjectName}:build`,
|
|
121
|
+
verbose ? '--verbose' : '',
|
|
122
|
+
].filter(Boolean), {
|
|
123
|
+
cwd: workingDirectory,
|
|
124
|
+
env: (0, build_unisphere_elements_1.getUnisphereEnv)(false, 'runtime'),
|
|
125
|
+
stdio: 'pipe',
|
|
126
|
+
});
|
|
127
|
+
(_a = currentBuildProcess.stdout) === null || _a === void 0 ? void 0 : _a.pipe(process.stdout);
|
|
128
|
+
(_b = currentBuildProcess.stderr) === null || _b === void 0 ? void 0 : _b.pipe(process.stderr);
|
|
129
|
+
yield currentBuildProcess;
|
|
130
|
+
console.log('✅ Build completed.');
|
|
111
131
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
132
|
+
catch (err) {
|
|
133
|
+
if (throwError)
|
|
134
|
+
throw err;
|
|
135
|
+
if (err.isCanceled)
|
|
136
|
+
console.log('⚠️ Build canceled.');
|
|
137
|
+
else
|
|
138
|
+
console.error('❌ Build failed:', err.shortMessage || err.message);
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
releaseBuildLock(lockFolder);
|
|
142
|
+
currentBuildProcess = null;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
yield buildRuntime(true);
|
|
125
147
|
const serverProcess = execa('npx', [
|
|
126
148
|
'local-web-server',
|
|
127
149
|
'-d',
|
|
@@ -129,63 +151,71 @@ const createServeCommand = (parentCommand) => {
|
|
|
129
151
|
'-p',
|
|
130
152
|
servePort,
|
|
131
153
|
verbose ? '--verbose' : null,
|
|
132
|
-
|
|
154
|
+
https ? '--https' : null,
|
|
133
155
|
].filter(Boolean), {
|
|
134
|
-
cwd: path.resolve(__dirname, '../../../../'),
|
|
156
|
+
cwd: path.resolve(__dirname, '../../../../'),
|
|
135
157
|
stdio: 'inherit',
|
|
136
158
|
});
|
|
137
159
|
if (!languageServer) {
|
|
138
|
-
(0, serve_languages_1.serveLanguages)({
|
|
139
|
-
verbose,
|
|
140
|
-
cwd: workingDirectory,
|
|
141
|
-
port: '8900',
|
|
142
|
-
});
|
|
160
|
+
(0, serve_languages_1.serveLanguages)({ verbose, cwd: workingDirectory, port: '8900' });
|
|
143
161
|
}
|
|
144
162
|
else {
|
|
145
|
-
console.log('Language server disabled
|
|
163
|
+
console.log('Language server disabled. Use --language-server to enable.');
|
|
146
164
|
}
|
|
147
|
-
const processes = [
|
|
148
|
-
|
|
149
|
-
|
|
165
|
+
const processes = [serverProcess];
|
|
166
|
+
const cleanup = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
167
|
+
for (const p of processes) {
|
|
168
|
+
if (!p.killed) {
|
|
169
|
+
p.kill('SIGTERM');
|
|
170
|
+
yield wait(KILL_TIMEOUT);
|
|
171
|
+
if (!p.killed)
|
|
172
|
+
p.kill('SIGKILL');
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
});
|
|
150
176
|
process.on('SIGINT', cleanup);
|
|
151
177
|
process.on('SIGTERM', cleanup);
|
|
152
|
-
// Handle process errors
|
|
153
|
-
serverProcess.on('error', (error) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
154
|
-
console.error('Server process error:', error);
|
|
155
|
-
yield cleanup();
|
|
156
|
-
process.exit(1);
|
|
157
|
-
}));
|
|
158
|
-
loaderProcess.on('error', (error) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
159
|
-
console.error('Build process error:', error);
|
|
160
|
-
yield cleanup();
|
|
161
|
-
process.exit(1);
|
|
162
|
-
}));
|
|
163
178
|
if (watch) {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
179
|
+
const watchpack = new Watchpack({
|
|
180
|
+
aggregateTimeout: 300,
|
|
181
|
+
poll: false,
|
|
182
|
+
});
|
|
183
|
+
const packagesDir = path.resolve(workingDirectory, 'unisphere/packages');
|
|
184
|
+
const srcDirs = (yield (0, promises_1.readdir)(packagesDir))
|
|
185
|
+
.map((pkg) => path.join(packagesDir, pkg, 'src'))
|
|
186
|
+
.filter((p) => fs.existsSync(p));
|
|
187
|
+
console.log('[watchpack] Watching src dirs:', srcDirs);
|
|
188
|
+
watchpack.watch([], srcDirs, Date.now());
|
|
189
|
+
watchpack.on('change', (filePath) => {
|
|
190
|
+
if (/\.(ts|tsx|js|jsx)$/.test(filePath)) {
|
|
191
|
+
changedFiles.add(filePath);
|
|
192
|
+
if (debounceTimeout)
|
|
193
|
+
clearTimeout(debounceTimeout);
|
|
194
|
+
if (currentBuildProcess) {
|
|
195
|
+
console.log('🛑 Killing previous build...');
|
|
196
|
+
currentBuildProcess.kill('SIGTERM', {
|
|
197
|
+
forceKillAfterTimeout: 2000,
|
|
198
|
+
});
|
|
199
|
+
currentBuildProcess = null;
|
|
200
|
+
}
|
|
201
|
+
debounceTimeout = setTimeout(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
202
|
+
const files = [...changedFiles].map((absPath) => path.relative(workingDirectory, absPath));
|
|
203
|
+
changedFiles.clear();
|
|
204
|
+
console.log(`🌀 Detected ${files.length} file changes. Running nx affected...`, { files });
|
|
205
|
+
yield buildRuntime(false);
|
|
206
|
+
}), DEBOUNCE_MS);
|
|
169
207
|
}
|
|
170
|
-
})
|
|
208
|
+
});
|
|
209
|
+
process.on('SIGINT', () => watchpack.close());
|
|
210
|
+
process.on('SIGTERM', () => watchpack.close());
|
|
171
211
|
}
|
|
172
|
-
yield
|
|
173
|
-
Promise.all(processes),
|
|
174
|
-
new Promise((_, reject) => {
|
|
175
|
-
serverProcess.on('exit', (code) => {
|
|
176
|
-
if (code !== 0) {
|
|
177
|
-
reject(new Error(`Server exited with code ${code}`));
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}),
|
|
181
|
-
]);
|
|
212
|
+
yield serverProcess;
|
|
182
213
|
}
|
|
183
214
|
catch (error) {
|
|
184
|
-
debug('
|
|
215
|
+
debug('Serve error:', error);
|
|
185
216
|
(0, prompts_1.logErrorAndRethrow)(`Failed to serve runtime ${runtime}: ${error.message}`);
|
|
186
217
|
}
|
|
187
218
|
}));
|
|
188
|
-
return command;
|
|
189
219
|
};
|
|
190
220
|
exports.createServeCommand = createServeCommand;
|
|
191
221
|
//# sourceMappingURL=serve-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime/serve-command.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"serve-command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime/serve-command.ts"],"names":[],"mappings":";;;;AAAA,yCAA8C;AAC9C,iCAA0B;AAC1B,6CAAqD;AACrD,+BAA+B;AAC/B,+DAAwE;AACxE,yDAAiE;AACjE,6FAAiF;AACjF,iEAA6D;AAC7D,6BAA6B;AAC7B,uCAAuC;AACvC,0CAA4C;AAC5C,yBAAyB;AAEzB,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,yBAAyB,CAAC,CAAC;AAC/C,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;AACvC,IAAI,eAAe,GAA0B,IAAI,CAAC;AAClD,IAAI,mBAAmB,GAAmC,IAAI,CAAC;AAE/D,SAAS,IAAI,CAAC,EAAU;IACtB,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAe,uBAAuB;iEAAC,GAAW,EAAE,SAAS,GAAG,KAAK;QACnE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,IAAI,CAAC,CAAC;QAEhE,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;gBAC/C,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EA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