@codeyam-editor/codeyam-editor 0.1.0 → 0.1.2

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.
Files changed (47) hide show
  1. package/npm/cli.js +5 -2
  2. package/npm/cloud-branch-switch.js +442 -0
  3. package/npm/cloud.js +1521 -0
  4. package/npm/container.js +28 -5
  5. package/npm/editor-dev.js +378 -0
  6. package/npm/editor.js +199 -12
  7. package/npm/empty-project-dir.js +33 -0
  8. package/npm/fleet-auth.js +111 -0
  9. package/npm/fleet-cleanup.js +124 -0
  10. package/npm/fleet-env.js +125 -0
  11. package/npm/fleet-memory.js +127 -0
  12. package/npm/fleet-pool-policy.js +78 -0
  13. package/npm/fleet-pool.js +401 -0
  14. package/npm/fleet-queue.js +40 -0
  15. package/npm/fleet-reconcile.js +36 -0
  16. package/npm/fleet-reset.js +144 -0
  17. package/npm/fleet-roster.js +81 -0
  18. package/npm/launch-config.js +544 -0
  19. package/npm/preflight-guidance.js +68 -0
  20. package/npm/scenario-check.js +355 -290
  21. package/npm/scenario-handlers.js +82 -0
  22. package/npm/scenario-interactivity.js +199 -0
  23. package/npm/scenario-issues.js +35 -0
  24. package/npm/scenario-metrics.js +108 -0
  25. package/npm/scenario-mocks.js +107 -0
  26. package/npm/scenario-playwright.js +355 -0
  27. package/npm/utils.js +548 -22
  28. package/npm/vm-urls.js +117 -0
  29. package/package.json +13 -6
  30. package/ui/dist/assets/ContainerInspector-C8EkH4PP.js +2 -0
  31. package/ui/dist/assets/EditorShell-DWaeBxgj.js +186 -0
  32. package/ui/dist/assets/Markdown-BHBqz-Mj.js +1 -0
  33. package/ui/dist/assets/ScenarioDataPanel-DYP7pi_n.css +32 -0
  34. package/ui/dist/assets/ScenarioDataPanel-zJSXtXL4.js +5 -0
  35. package/ui/dist/assets/ScenarioDataPanelFullPage-C0YHQB-T.js +1 -0
  36. package/ui/dist/assets/ScenarioRenderer-CgDxuigm.js +1 -0
  37. package/ui/dist/assets/StepsSimulator-CRtmlyNZ.js +1 -0
  38. package/ui/dist/assets/index-BUYNFqKK.js +27 -0
  39. package/ui/dist/assets/index-DVr5rY2d.css +1 -0
  40. package/ui/dist/assets/markdown-v0F0UEt3.js +37 -0
  41. package/ui/dist/assets/react-CSS0HapR.js +28 -0
  42. package/ui/dist/assets/useEvents-DggWrtHe.js +1 -0
  43. package/ui/dist/assets/xterm--24IGk-x.js +9 -0
  44. package/ui/dist/favicon.ico +0 -0
  45. package/ui/dist/favicon.png +0 -0
  46. package/ui/dist/index.html +16 -0
  47. package/npm/postinstall.js +0 -95
Binary file
Binary file
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>CodeYam</title>
7
+ <link rel="icon" type="image/x-icon" href="/favicon.ico" />
8
+ <script type="module" crossorigin src="/assets/index-BUYNFqKK.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/react-CSS0HapR.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/markdown-v0F0UEt3.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/index-DVr5rY2d.css">
12
+ </head>
13
+ <body>
14
+ <div id="root"></div>
15
+ </body>
16
+ </html>
@@ -1,95 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Post-install script for @codeyam-editor/codeyam-editor.
5
- *
6
- * Downloads the pre-built platform binary and UI assets from GitHub Releases.
7
- * Skipped when running in local development (cargo builds from source instead).
8
- */
9
-
10
- const fs = require("fs");
11
- const path = require("path");
12
- const { execSync } = require("child_process");
13
-
14
- const rootDir = path.resolve(__dirname, "..");
15
-
16
- const PLATFORM_MAP = {
17
- "darwin-arm64": "codeyam-editor-darwin-arm64",
18
- "darwin-x64": "codeyam-editor-darwin-x64",
19
- "linux-x64": "codeyam-editor-linux-x64",
20
- };
21
-
22
- function getArtifactName() {
23
- const key = `${process.platform}-${process.arch}`;
24
- const name = PLATFORM_MAP[key];
25
- if (!name) {
26
- console.error(
27
- `codeyam-editor: unsupported platform ${process.platform} ${process.arch}`
28
- );
29
- console.error("Supported: macOS (arm64, x64), Linux (x64)");
30
- process.exit(0); // Don't fail the install — user may be building from source
31
- }
32
- return name;
33
- }
34
-
35
- /**
36
- * Determine the GitHub release tag from the installed package version.
37
- *
38
- * - "0.1.0-staging.abc1234" -> "staging"
39
- * - "0.1.2" -> "latest"
40
- */
41
- function getReleaseTag() {
42
- const pkg = JSON.parse(
43
- fs.readFileSync(path.join(rootDir, "package.json"), "utf8")
44
- );
45
- const version = pkg.version || "0.1.0";
46
- if (version.includes("-staging")) return "staging";
47
- return "latest";
48
- }
49
-
50
- function download() {
51
- // Skip if a binary already exists (e.g. local dev with cargo build)
52
- const binPath = path.join(rootDir, "bin", "codeyam-editor");
53
- if (fs.existsSync(binPath)) {
54
- return;
55
- }
56
-
57
- // Skip if we're in a dev checkout (has Cargo.toml at root)
58
- if (fs.existsSync(path.join(rootDir, "Cargo.toml"))) {
59
- return;
60
- }
61
-
62
- const artifactName = getArtifactName();
63
- const tag = getReleaseTag();
64
- const url = `https://github.com/codeyam-ai/codeyam-editor/releases/download/${tag}/${artifactName}.tar.gz`;
65
-
66
- console.error(`Downloading codeyam-editor binary (${artifactName})...`);
67
-
68
- const binDir = path.join(rootDir, "bin");
69
- const uiDir = path.join(rootDir, "ui");
70
- fs.mkdirSync(binDir, { recursive: true });
71
- fs.mkdirSync(uiDir, { recursive: true });
72
-
73
- try {
74
- // Download and extract in one step using curl + tar
75
- execSync(
76
- `curl -fsSL "${url}" | tar xz -C "${rootDir}"`,
77
- { stdio: ["ignore", "inherit", "inherit"], timeout: 120000 }
78
- );
79
-
80
- // Ensure binary is executable
81
- if (fs.existsSync(binPath)) {
82
- fs.chmodSync(binPath, 0o755);
83
- }
84
-
85
- console.error("codeyam-editor installed successfully!");
86
- } catch (err) {
87
- console.error(`Failed to download codeyam-editor binary from ${url}`);
88
- console.error(
89
- "You can build from source instead: cargo build --release"
90
- );
91
- // Don't fail the install — user may want to build from source
92
- }
93
- }
94
-
95
- download();