@symbo.ls/mermaid 3.14.5 → 3.14.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @symbo.ls/mermaid
2
2
 
3
+ ## 3.14.6
4
+
5
+ ### Patch Changes
6
+
7
+ - b49b982: bin entries now point at dist/esm/bin/\* so external installs from npm
8
+ include the full bin tree, not just the entry. The dist-only files
9
+ filter excluded the source bin/ siblings, breaking ERR_MODULE_NOT_FOUND
10
+ in workspace deploy + agent-runner Docker on `npm install -g @symbo.ls/cli`.
11
+
3
12
  ## 3.14.4
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/mermaid",
3
- "version": "3.14.5",
3
+ "version": "3.14.6",
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "description": "Self-sustaining server runner for Symbols projects from JSON. Renders DOMQL projects to HTML with optional brender SSR.",
@@ -65,12 +65,12 @@
65
65
  ],
66
66
  "scripts": {
67
67
  "start": "node bin/start.js",
68
- "build:esm": "esbuild $(find . -type f -name \"*.js\" -not -path \"*/dist/*\" -not -path \"*/node_modules/*\" -not -path \"*/__tests__/*\" -not -path \"*/test/*\" -not -name \"*.test.js\") --target=es2022 --format=esm --outbase=. --outdir=dist/esm --minify --log-level=warning",
68
+ "build:esm": "esbuild $(find . -type f -name \"*.js\" -not -path \"*/dist/*\" -not -path \"*/node_modules/*\" -not -path \"*/__tests__/*\" -not -path \"*/test/*\" -not -path \"*/demo/*\" -not -path \"*/demos/*\" -not -path \"*/examples/*\" -not -path \"*/fixtures/*\" -not -name \"*.test.js\") --target=es2022 --format=esm --outbase=. --outdir=dist/esm --minify --log-level=warning",
69
69
  "build": "rimraf dist && npm run build:esm",
70
70
  "prepublishOnly": "npm run build"
71
71
  },
72
72
  "bin": {
73
- "mermaid": "./bin/start.js"
73
+ "mermaid": "./dist/esm/bin/start.js"
74
74
  },
75
75
  "dependencies": {
76
76
  "@symbo.ls/utils": "^3.14.2",
package/bin/start.js DELETED
@@ -1,60 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * mermaid CLI — start a standalone Symbols project server from a JSON file.
4
- *
5
- * mermaid # serve ./app.json on :3333
6
- * mermaid --json ./project-data.json # custom JSON path
7
- * mermaid --port 4000 # custom port
8
- * mermaid --appkey demo/site # force a specific appkey
9
- *
10
- * Env:
11
- * PORT, JSON_PATH, APPKEY, NODE_ENV, LOG_LEVEL
12
- */
13
-
14
- import { createMermaidApp, loadJsonData } from '../src/server.js';
15
- import log from '../src/utils/logger.js';
16
-
17
- const args = process.argv.slice(2);
18
- function arg(name, fallback) {
19
- const i = args.indexOf(`--${name}`);
20
- return i !== -1 ? args[i + 1] : fallback;
21
- }
22
-
23
- const PORT = parseInt(arg('port', process.env.PORT || '3333'), 10);
24
- const JSON_PATH = arg('json', process.env.JSON_PATH || './app.json');
25
- const APPKEY = arg('appkey', process.env.APPKEY || null);
26
- const NODE_ENV = process.env.NODE_ENV || 'development';
27
- const LOG_LEVEL = process.env.LOG_LEVEL || (NODE_ENV === 'production' ? 'info' : 'debug');
28
-
29
- log.level = LOG_LEVEL;
30
-
31
- log.info(`[MERMAID] Starting standalone runner...`);
32
- log.info(`[MERMAID] Environment: ${NODE_ENV}`);
33
- log.info(`[MERMAID] JSON: ${JSON_PATH}`);
34
- if (APPKEY) log.info(`[MERMAID] Locked to appkey: ${APPKEY}`);
35
-
36
- try {
37
- // Validate JSON exists up front
38
- loadJsonData(JSON_PATH);
39
- } catch (err) {
40
- log.error(`[MERMAID] ${err.message}`);
41
- process.exit(1);
42
- }
43
-
44
- const app = createMermaidApp({
45
- jsonPath: JSON_PATH,
46
- appkeyOverride: APPKEY,
47
- channel: NODE_ENV === 'production' ? 'production' : 'development',
48
- });
49
-
50
- const server = app.listen(PORT, () => {
51
- log.info(`[MERMAID] Running on http://localhost:${PORT}`);
52
- });
53
-
54
- const shutdown = (signal) => {
55
- log.info(`[MERMAID] ${signal} received, shutting down...`);
56
- server.close();
57
- process.exit(0);
58
- };
59
- process.on('SIGTERM', () => shutdown('SIGTERM'));
60
- process.on('SIGINT', () => shutdown('SIGINT'));