eventmodeler 0.6.0 → 0.6.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 (73) hide show
  1. package/dist/index.js +7133 -34
  2. package/package.json +5 -4
  3. package/dist/api/client-config.js +0 -10
  4. package/dist/api/generated/client/client.gen.js +0 -235
  5. package/dist/api/generated/client/index.js +0 -6
  6. package/dist/api/generated/client/types.gen.js +0 -2
  7. package/dist/api/generated/client/utils.gen.js +0 -228
  8. package/dist/api/generated/client.gen.js +0 -4
  9. package/dist/api/generated/core/auth.gen.js +0 -14
  10. package/dist/api/generated/core/bodySerializer.gen.js +0 -57
  11. package/dist/api/generated/core/params.gen.js +0 -100
  12. package/dist/api/generated/core/pathSerializer.gen.js +0 -106
  13. package/dist/api/generated/core/queryKeySerializer.gen.js +0 -92
  14. package/dist/api/generated/core/serverSentEvents.gen.js +0 -133
  15. package/dist/api/generated/core/types.gen.js +0 -2
  16. package/dist/api/generated/core/utils.gen.js +0 -87
  17. package/dist/api/generated/index.js +0 -2
  18. package/dist/api/generated/sdk.gen.js +0 -4222
  19. package/dist/api/generated/types.gen.js +0 -2
  20. package/dist/api/generated/zod.gen.js +0 -7217
  21. package/dist/commands/add.js +0 -315
  22. package/dist/commands/auth.js +0 -14
  23. package/dist/commands/create.js +0 -192
  24. package/dist/commands/design.js +0 -108
  25. package/dist/commands/guide.js +0 -15
  26. package/dist/commands/init.js +0 -21
  27. package/dist/commands/list-schemas.js +0 -177
  28. package/dist/commands/list.js +0 -39
  29. package/dist/commands/loop.js +0 -101
  30. package/dist/commands/map.js +0 -40
  31. package/dist/commands/mark.js +0 -27
  32. package/dist/commands/move.js +0 -35
  33. package/dist/commands/remove.js +0 -170
  34. package/dist/commands/rename.js +0 -53
  35. package/dist/commands/resize.js +0 -30
  36. package/dist/commands/search.js +0 -14
  37. package/dist/commands/set.js +0 -199
  38. package/dist/commands/show-schemas.js +0 -259
  39. package/dist/commands/show.js +0 -56
  40. package/dist/commands/summary.js +0 -13
  41. package/dist/commands/update.js +0 -240
  42. package/dist/lib/auth.js +0 -331
  43. package/dist/lib/config.js +0 -80
  44. package/dist/lib/excalidraw-schema.js +0 -66
  45. package/dist/lib/globals.js +0 -8
  46. package/dist/lib/model.js +0 -11
  47. package/dist/lib/project-config.js +0 -103
  48. package/dist/lib/resolve.js +0 -59
  49. package/dist/lib/scenario.js +0 -15
  50. package/dist/slices/add-scenario/index.js +0 -103
  51. package/dist/slices/guide/guides/codegen.js +0 -339
  52. package/dist/slices/guide/guides/connect-slices.js +0 -202
  53. package/dist/slices/guide/guides/create-slices.js +0 -273
  54. package/dist/slices/guide/guides/explore.js +0 -238
  55. package/dist/slices/guide/guides/information-flow.js +0 -304
  56. package/dist/slices/guide/guides/scenarios.js +0 -214
  57. package/dist/slices/guide/index.js +0 -40
  58. package/dist/slices/help/index.js +0 -96
  59. package/dist/slices/help/topics/build-codegen.js +0 -109
  60. package/dist/slices/help/topics/build-slice.js +0 -147
  61. package/dist/slices/help/topics/check-completeness.js +0 -57
  62. package/dist/slices/help/topics/connect-slices.js +0 -99
  63. package/dist/slices/help/topics/explore-model.js +0 -112
  64. package/dist/slices/help/topics/json-reference.js +0 -188
  65. package/dist/slices/help/topics/linked-copies.js +0 -89
  66. package/dist/slices/help/topics/manipulate-canvas.js +0 -150
  67. package/dist/slices/help/topics/write-scenarios.js +0 -162
  68. package/dist/slices/init/index.js +0 -86
  69. package/dist/slices/init/loop.js +0 -60
  70. package/dist/slices/login/index.js +0 -20
  71. package/dist/slices/logout/index.js +0 -14
  72. package/dist/slices/open-app/index.js +0 -36
  73. package/dist/slices/whoami/index.js +0 -19
@@ -1,60 +0,0 @@
1
- import * as fs from 'node:fs';
2
- import * as path from 'node:path';
3
- import { findProjectConfigPath, getProjectRoot } from '../../lib/project-config';
4
- const SAMPLE_SCRIPT = `#!/usr/bin/env bash
5
- set -e
6
-
7
- SLICE="$1"
8
- if [ -z "$SLICE" ]; then
9
- echo "usage: $0 <slice-name>" >&2
10
- exit 1
11
- fi
12
-
13
- # 1. Claim the slice so the next poll skips it.
14
- eventmodeler mark "$SLICE" in-progress
15
-
16
- # 2. Export the slice spec. Schema: eventmodeler show slice --help
17
- eventmodeler show slice "$SLICE" > /tmp/slice.json
18
-
19
- # 3. Do the work. Replace with your codegen, AI agent, test runner, etc.
20
- # If this block fails, the trap below marks the slice "blocked".
21
- trap 'eventmodeler mark "$SLICE" blocked; exit 1' ERR
22
-
23
- echo "Processing $SLICE..."
24
- # ./render-templates.sh /tmp/slice.json
25
- # claude -p "implement this slice: $(cat /tmp/slice.json)"
26
-
27
- # 4. Mark done on success.
28
- eventmodeler mark "$SLICE" done
29
- `;
30
- export function initLoop() {
31
- const configPath = findProjectConfigPath();
32
- if (!configPath) {
33
- console.error('No .eventmodeler.json found. Run "eventmodeler init" first.');
34
- process.exit(1);
35
- }
36
- const raw = fs.readFileSync(configPath, 'utf-8');
37
- const config = JSON.parse(raw);
38
- if (config.loop) {
39
- console.log(`Loop config already present in ${configPath}. Skipping config write.`);
40
- }
41
- else {
42
- config.loop = { command: './generate.sh', interval: 30 };
43
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
44
- console.log(`Added loop config to ${configPath}`);
45
- }
46
- const scriptPath = path.join(getProjectRoot(), 'generate.sh');
47
- if (fs.existsSync(scriptPath)) {
48
- console.log(`${scriptPath} already exists. Skipping script write.`);
49
- }
50
- else {
51
- fs.writeFileSync(scriptPath, SAMPLE_SCRIPT);
52
- fs.chmodSync(scriptPath, 0o755);
53
- console.log(`Created ${scriptPath}`);
54
- }
55
- console.log('');
56
- console.log('Next steps:');
57
- console.log(' 1. Edit generate.sh to invoke your codegen or AI agent.');
58
- console.log(' 2. Mark a slice "planned" in the canvas.');
59
- console.log(' 3. Run: eventmodeler loop');
60
- }
@@ -1,20 +0,0 @@
1
- import { startAuthFlow } from '../../lib/auth';
2
- import { isAuthenticated, getAuthTokens } from '../../lib/config';
3
- export async function login() {
4
- // Check if already authenticated
5
- if (isAuthenticated()) {
6
- const tokens = getAuthTokens();
7
- console.log(`Already logged in as ${tokens?.email}`);
8
- console.log('Run "eventmodeler logout" to sign out first.');
9
- process.exit(0);
10
- }
11
- const result = await startAuthFlow();
12
- if (result.success && result.tokens) {
13
- console.log(`\nSuccessfully logged in as ${result.tokens.email}`);
14
- process.exit(0);
15
- }
16
- else {
17
- console.error(`\nAuthentication failed: ${result.error}`);
18
- process.exit(1);
19
- }
20
- }
@@ -1,14 +0,0 @@
1
- import { logout as clearAuth } from '../../lib/auth';
2
- import { isAuthenticated, getAuthTokens } from '../../lib/config';
3
- export function logout() {
4
- if (!isAuthenticated()) {
5
- const tokens = getAuthTokens();
6
- if (!tokens) {
7
- console.log('Not logged in.');
8
- return;
9
- }
10
- }
11
- const tokens = getAuthTokens();
12
- clearAuth();
13
- console.log(`Logged out${tokens?.email ? ` from ${tokens.email}` : ''}.`);
14
- }
@@ -1,36 +0,0 @@
1
- import { exec } from 'node:child_process';
2
- import { platform } from 'node:os';
3
- import * as fs from 'node:fs';
4
- import * as path from 'node:path';
5
- const APP_URL = 'https://www.eventmodeler.com';
6
- function getOpenCommand() {
7
- switch (platform()) {
8
- case 'darwin':
9
- return 'open';
10
- case 'win32':
11
- return 'start';
12
- default:
13
- return 'xdg-open';
14
- }
15
- }
16
- function findLocalEventModel() {
17
- const files = fs.readdirSync(process.cwd());
18
- const eventModelFiles = files.filter(f => f.endsWith('.eventmodel'));
19
- if (eventModelFiles.length === 1) {
20
- return path.join(process.cwd(), eventModelFiles[0]);
21
- }
22
- return null;
23
- }
24
- export function openApp() {
25
- const command = getOpenCommand();
26
- const localFile = findLocalEventModel();
27
- console.log(`Opening ${APP_URL}...`);
28
- if (localFile) {
29
- console.log(`Then open: ${localFile}`);
30
- }
31
- exec(`${command} ${APP_URL}`, (error) => {
32
- if (error) {
33
- console.error(`Could not open browser. Please visit: ${APP_URL}`);
34
- }
35
- });
36
- }
@@ -1,19 +0,0 @@
1
- import { isAuthenticated, getAuthTokens, getBackendUrl, getKeycloakUrl } from '../../lib/config';
2
- export function whoami() {
3
- const tokens = getAuthTokens();
4
- const backendUrl = getBackendUrl();
5
- const keycloakUrl = getKeycloakUrl();
6
- if (!tokens) {
7
- console.log(JSON.stringify({ authenticated: false, backendUrl, keycloakUrl }, null, 2));
8
- return;
9
- }
10
- const isValid = isAuthenticated();
11
- console.log(JSON.stringify({
12
- authenticated: isValid,
13
- email: tokens.email,
14
- userId: tokens.userId,
15
- backendUrl,
16
- keycloakUrl,
17
- expiresAt: new Date(tokens.expiresAt).toISOString(),
18
- }, null, 2));
19
- }