embedlabs 0.1.0-alpha.10 → 0.1.0-alpha.101
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/README.md +2 -2
- package/bin/install-progress.js +53 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# embedlabs
|
|
2
2
|
|
|
3
|
-
Experimental npm alias for
|
|
3
|
+
Experimental npm alias for EmbedLabs CLI.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install -g embedlabs@alpha
|
|
7
7
|
embedlabs --help
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
This package forwards to `@kvell007/embed-labs-cli@0.1.0-alpha.
|
|
10
|
+
This package forwards to `@kvell007/embed-labs-cli@0.1.0-alpha.101`.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
3
|
+
import { arch, platform } from "node:os";
|
|
4
|
+
|
|
5
|
+
const phase = process.argv[2] ?? "postinstall";
|
|
6
|
+
const target = `${platform()}-${arch()}`;
|
|
7
|
+
const steps = phase === "preinstall"
|
|
8
|
+
? [
|
|
9
|
+
[5, `install: initializing (${target})`],
|
|
10
|
+
[10, "install: checking platform"],
|
|
11
|
+
[15, "install: resolving packages"],
|
|
12
|
+
[20, "install: preparing dependency graph"],
|
|
13
|
+
[25, "install: downloading packages"],
|
|
14
|
+
[30, "install: downloading packages"],
|
|
15
|
+
[35, "install: extracting packages"],
|
|
16
|
+
[40, "install: extracting packages"],
|
|
17
|
+
[45, "install: preparing CLI"],
|
|
18
|
+
[50, "install: preparing CLI"],
|
|
19
|
+
[55, "install: preparing native bridge"],
|
|
20
|
+
[60, "install: preparing native bridge"],
|
|
21
|
+
[65, "install: preparing command links"],
|
|
22
|
+
[70, "install: preparing command links"],
|
|
23
|
+
[75, "install: waiting for npm"],
|
|
24
|
+
[80, "install: waiting for npm"],
|
|
25
|
+
[84, "install: waiting for npm"]
|
|
26
|
+
]
|
|
27
|
+
: [
|
|
28
|
+
[88, "install: verifying commands"],
|
|
29
|
+
[94, "install: finalizing installation"],
|
|
30
|
+
[100, "install: complete"]
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
for (const [percent, message] of steps) {
|
|
34
|
+
writeProgress(percent, message);
|
|
35
|
+
await sleep(1000);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeProgress(percent, message) {
|
|
39
|
+
const line = `[EmbedLabs] ${String(percent).padStart(3, " ")}% ${message}\n`;
|
|
40
|
+
if (process.stdout.isTTY || process.env.EMBEDLABS_INSTALL_NO_TTY === "1") {
|
|
41
|
+
process.stdout.write(line);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
writeFileSync(platform() === "win32" ? "\\\\.\\CONOUT$" : "/dev/tty", line, { flag: "a" });
|
|
46
|
+
} catch {
|
|
47
|
+
process.stdout.write(line);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function sleep(ms) {
|
|
52
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "embedlabs",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0-alpha.101",
|
|
4
|
+
"description": "EmbedLabs CLI alias package for local-first embedded agent testing.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"embedlabs": "bin/embedlabs.js"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"preinstall": "node bin/install-progress.js preinstall",
|
|
12
|
+
"postinstall": "node bin/install-progress.js postinstall"
|
|
13
|
+
},
|
|
10
14
|
"files": [
|
|
11
15
|
"bin",
|
|
12
16
|
"README.md"
|
|
13
17
|
],
|
|
14
18
|
"dependencies": {
|
|
15
|
-
"@kvell007/embed-labs-cli": "0.1.0-alpha.
|
|
19
|
+
"@kvell007/embed-labs-cli": "0.1.0-alpha.101"
|
|
16
20
|
},
|
|
17
21
|
"publishConfig": {
|
|
18
22
|
"access": "public",
|