@rigour-labs/cli 2.13.0 → 2.14.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/dist/commands/studio.js +16 -0
- package/package.json +2 -2
- package/studio-dist/assets/index-0AYcNXhp.js +264 -0
- package/studio-dist/assets/index-CKXEiNN1.css +1 -0
- package/studio-dist/index.html +2 -2
- package/studio-dist/assets/index-CSj2lLc7.css +0 -1
- package/studio-dist/assets/index-CmJzYc99.js +0 -259
package/dist/commands/studio.js
CHANGED
|
@@ -144,6 +144,22 @@ async function setupApiAndLaunch(apiPort, studioPort, eventsPath, cwd, studioPro
|
|
|
144
144
|
res.end('Not found');
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
+
else if (url.pathname === '/api/info') {
|
|
148
|
+
try {
|
|
149
|
+
const pkgPath = path.join(cwd, 'package.json');
|
|
150
|
+
const pkg = await fs.pathExists(pkgPath) ? await fs.readJson(pkgPath) : {};
|
|
151
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
152
|
+
res.end(JSON.stringify({
|
|
153
|
+
name: pkg.name || path.basename(cwd),
|
|
154
|
+
path: cwd,
|
|
155
|
+
version: pkg.version || '0.0.0'
|
|
156
|
+
}));
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
res.writeHead(500);
|
|
160
|
+
res.end(e.message);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
147
163
|
else if (url.pathname === '/api/tree') {
|
|
148
164
|
try {
|
|
149
165
|
const getTree = async (dir) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigour-labs/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"rigour": "dist/cli.js"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"inquirer": "9.2.16",
|
|
29
29
|
"ora": "^8.0.1",
|
|
30
30
|
"yaml": "^2.8.2",
|
|
31
|
-
"@rigour-labs/core": "2.
|
|
31
|
+
"@rigour-labs/core": "2.14.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/fs-extra": "^11.0.4",
|