@geml/geml 1.0.0 → 1.1.1
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/LICENSE +21 -21
- package/README.md +79 -72
- package/codemap/adapters/crg.mjs +109 -0
- package/codemap/adapters/joern.mjs +131 -0
- package/codemap/adapters/scip.mjs +229 -0
- package/codemap/browser-stub.mjs +24 -0
- package/codemap/build.mjs +354 -0
- package/codemap/detect.mjs +185 -0
- package/codemap/emit.mjs +361 -0
- package/codemap/exclude.mjs +52 -0
- package/codemap/joern-export.sc +83 -0
- package/codemap/mcp-server.mjs +143 -0
- package/codemap/normalize.mjs +0 -0
- package/codemap/refresh.mjs +160 -0
- package/codemap/render-all.mjs +64 -0
- package/codemap/serve.mjs +378 -0
- package/codemap/verify.mjs +126 -0
- package/dist/geml.d.ts +5 -0
- package/dist/geml.js +390 -14
- package/dist/history.d.ts +30 -0
- package/dist/history.js +153 -13
- package/dist/render.d.ts +59 -0
- package/dist/render.js +1685 -11
- package/dist/to-md.js +1 -3
- package/package.json +9 -5
package/dist/to-md.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// This is a *lossy* export: Markdown has no typed-block primitive, so each GEML
|
|
4
4
|
// construct is projected to the nearest GFM shape — headings, fenced code,
|
|
5
|
-
// blockquotes (note
|
|
5
|
+
// blockquotes (note), GFM tables (from the computed table model), `$$`
|
|
6
6
|
// math, mermaid fences, YAML frontmatter (meta), footnote definitions. Things
|
|
7
7
|
// GFM cannot express (geml-chart, `{hidden}` blocks, block ids/classes) are
|
|
8
8
|
// dropped or degraded, and each such loss is reported in `notes` so a caller
|
|
@@ -126,8 +126,6 @@ function typedToMd(b, notes) {
|
|
|
126
126
|
const text = (b.children ?? []).map((c) => block(c, notes)).join(" ").replace(/\n+/g, " ").trim();
|
|
127
127
|
return `[^${b.id}]: ${text}`;
|
|
128
128
|
}
|
|
129
|
-
if (b.type === "aside")
|
|
130
|
-
notes.add("`aside` block(s) projected to blockquote (Markdown has no aside)");
|
|
131
129
|
const inner = (b.children ?? []).map((c) => block(c, notes)).filter(Boolean).join("\n\n");
|
|
132
130
|
return inner.split("\n").map((l) => (l ? `> ${l}` : ">")).join("\n");
|
|
133
131
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geml/geml",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"types": "dist/geml.d.ts",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
|
+
"codemap",
|
|
16
17
|
"README.md",
|
|
17
18
|
"LICENSE"
|
|
18
19
|
],
|
|
@@ -32,23 +33,26 @@
|
|
|
32
33
|
],
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/
|
|
36
|
+
"url": "git+https://github.com/geml-spec/geml.git",
|
|
36
37
|
"directory": "geml-parser"
|
|
37
38
|
},
|
|
38
|
-
"homepage": "https://github.com/
|
|
39
|
+
"homepage": "https://github.com/geml-spec/geml#readme",
|
|
39
40
|
"bugs": {
|
|
40
|
-
"url": "https://github.com/
|
|
41
|
+
"url": "https://github.com/geml-spec/geml/issues"
|
|
41
42
|
},
|
|
42
43
|
"scripts": {
|
|
43
44
|
"build": "tsc",
|
|
44
|
-
"test": "tsc && node test/m2.test.mjs && node test/m3.test.mjs && node test/m4.test.mjs && node test/convert.test.mjs && node test/fixtures.test.mjs && node test/features.test.mjs && node test/render.test.mjs && node test/conformance.test.mjs && node test/second-impl.test.mjs && node test/roundtrip.test.mjs && node test/to-md.test.mjs && node test/cli.test.mjs",
|
|
45
|
+
"test": "tsc && node test/m2.test.mjs && node test/m3.test.mjs && node test/m4.test.mjs && node test/convert.test.mjs && node test/fixtures.test.mjs && node test/features.test.mjs && node test/render.test.mjs && node test/conformance.test.mjs && node test/second-impl.test.mjs && node test/roundtrip.test.mjs && node test/to-md.test.mjs && node test/history.test.mjs && node test/render-html.test.mjs && node test/codemap.test.mjs && node test/cli.test.mjs && node test/get-set.test.mjs && node test/revert.test.mjs",
|
|
45
46
|
"convert": "node dist/geml.js convert",
|
|
46
47
|
"parse": "node dist/geml.js",
|
|
48
|
+
"coverage": "c8 --all --include=dist/**/*.js --reporter=text --reporter=text-summary npm test",
|
|
49
|
+
"coverage:check": "c8 --all --include=dist/**/*.js --check-coverage --lines 90 --statements 90 --functions 92 --branches 80 npm test",
|
|
47
50
|
"prepublishOnly": "npm run build"
|
|
48
51
|
},
|
|
49
52
|
"license": "MIT",
|
|
50
53
|
"devDependencies": {
|
|
51
54
|
"@types/node": "^22.19.21",
|
|
55
|
+
"c8": "^10.1.3",
|
|
52
56
|
"typescript": "^5.9.3"
|
|
53
57
|
}
|
|
54
58
|
}
|