@yalehwang/archguard 0.1.6 → 0.1.8
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 +90 -58
- package/dist/cli/analyze/normalize-to-diagrams.d.ts +5 -0
- package/dist/cli/analyze/normalize-to-diagrams.d.ts.map +1 -0
- package/dist/cli/analyze/normalize-to-diagrams.js +94 -0
- package/dist/cli/analyze/normalize-to-diagrams.js.map +1 -0
- package/dist/cli/analyze/run-analysis.d.ts +20 -0
- package/dist/cli/analyze/run-analysis.d.ts.map +1 -0
- package/dist/cli/analyze/run-analysis.js +150 -0
- package/dist/cli/analyze/run-analysis.js.map +1 -0
- package/dist/cli/cache/arch-json-disk-cache.d.ts.map +1 -1
- package/dist/cli/cache/arch-json-disk-cache.js +2 -1
- package/dist/cli/cache/arch-json-disk-cache.js.map +1 -1
- package/dist/cli/cache/diagram-manifest.d.ts +13 -0
- package/dist/cli/cache/diagram-manifest.d.ts.map +1 -0
- package/dist/cli/cache/diagram-manifest.js +60 -0
- package/dist/cli/cache/diagram-manifest.js.map +1 -0
- package/dist/cli/cache/render-hash-cache.d.ts +13 -0
- package/dist/cli/cache/render-hash-cache.d.ts.map +1 -0
- package/dist/cli/cache/render-hash-cache.js +39 -0
- package/dist/cli/cache/render-hash-cache.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +1 -4
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +26 -143
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/cache.d.ts.map +1 -1
- package/dist/cli/commands/cache.js +7 -0
- package/dist/cli/commands/cache.js.map +1 -1
- package/dist/cli/commands/mcp.d.ts +3 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- package/dist/cli/commands/mcp.js +17 -0
- package/dist/cli/commands/mcp.js.map +1 -0
- package/dist/cli/commands/query.d.ts +3 -0
- package/dist/cli/commands/query.d.ts.map +1 -0
- package/dist/cli/commands/query.js +227 -0
- package/dist/cli/commands/query.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp/analyze-tool.d.ts +6 -0
- package/dist/cli/mcp/analyze-tool.d.ts.map +1 -0
- package/dist/cli/mcp/analyze-tool.js +112 -0
- package/dist/cli/mcp/analyze-tool.js.map +1 -0
- package/dist/cli/mcp/mcp-server.d.ts +6 -0
- package/dist/cli/mcp/mcp-server.d.ts.map +1 -0
- package/dist/cli/mcp/mcp-server.js +165 -0
- package/dist/cli/mcp/mcp-server.js.map +1 -0
- package/dist/cli/processors/arch-json-provider.d.ts +38 -0
- package/dist/cli/processors/arch-json-provider.d.ts.map +1 -0
- package/dist/cli/processors/arch-json-provider.js +295 -0
- package/dist/cli/processors/arch-json-provider.js.map +1 -0
- package/dist/cli/processors/diagram-output-router.d.ts +26 -0
- package/dist/cli/processors/diagram-output-router.d.ts.map +1 -0
- package/dist/cli/processors/diagram-output-router.js +235 -0
- package/dist/cli/processors/diagram-output-router.js.map +1 -0
- package/dist/cli/processors/diagram-processor.d.ts +11 -22
- package/dist/cli/processors/diagram-processor.d.ts.map +1 -1
- package/dist/cli/processors/diagram-processor.js +37 -455
- package/dist/cli/processors/diagram-processor.js.map +1 -1
- package/dist/cli/progress.d.ts +22 -1
- package/dist/cli/progress.d.ts.map +1 -1
- package/dist/cli/progress.js +24 -0
- package/dist/cli/progress.js.map +1 -1
- package/dist/cli/query/arch-index-builder.d.ts +4 -0
- package/dist/cli/query/arch-index-builder.d.ts.map +1 -0
- package/dist/cli/query/arch-index-builder.js +126 -0
- package/dist/cli/query/arch-index-builder.js.map +1 -0
- package/dist/cli/query/arch-index.d.ts +17 -0
- package/dist/cli/query/arch-index.d.ts.map +1 -0
- package/dist/cli/query/arch-index.js +2 -0
- package/dist/cli/query/arch-index.js.map +1 -0
- package/dist/cli/query/engine-loader.d.ts +7 -0
- package/dist/cli/query/engine-loader.d.ts.map +1 -0
- package/dist/cli/query/engine-loader.js +98 -0
- package/dist/cli/query/engine-loader.js.map +1 -0
- package/dist/cli/query/query-artifacts.d.ts +7 -0
- package/dist/cli/query/query-artifacts.d.ts.map +1 -0
- package/dist/cli/query/query-artifacts.js +78 -0
- package/dist/cli/query/query-artifacts.js.map +1 -0
- package/dist/cli/query/query-engine.d.ts +49 -0
- package/dist/cli/query/query-engine.d.ts.map +1 -0
- package/dist/cli/query/query-engine.js +137 -0
- package/dist/cli/query/query-engine.js.map +1 -0
- package/dist/cli/query/query-manifest.d.ts +24 -0
- package/dist/cli/query/query-manifest.d.ts.map +1 -0
- package/dist/cli/query/query-manifest.js +2 -0
- package/dist/cli/query/query-manifest.js.map +1 -0
- package/dist/cli/utils/canonicalize-arch-json.d.ts +3 -0
- package/dist/cli/utils/canonicalize-arch-json.d.ts.map +1 -0
- package/dist/cli/utils/canonicalize-arch-json.js +81 -0
- package/dist/cli/utils/canonicalize-arch-json.js.map +1 -0
- package/dist/cli/utils/diagram-index-generator.d.ts.map +1 -1
- package/dist/cli/utils/diagram-index-generator.js +0 -5
- package/dist/cli/utils/diagram-index-generator.js.map +1 -1
- package/dist/cli/utils/project-structure-detector.d.ts.map +1 -1
- package/dist/cli/utils/project-structure-detector.js +0 -10
- package/dist/cli/utils/project-structure-detector.js.map +1 -1
- package/dist/mermaid/renderer.d.ts.map +1 -1
- package/dist/mermaid/renderer.js +34 -0
- package/dist/mermaid/renderer.js.map +1 -1
- package/dist/plugins/golang/atlas/index.d.ts.map +1 -1
- package/dist/plugins/golang/atlas/index.js +3 -1
- package/dist/plugins/golang/atlas/index.js.map +1 -1
- package/dist/plugins/golang/atlas/types.d.ts +1 -0
- package/dist/plugins/golang/atlas/types.d.ts.map +1 -1
- package/dist/plugins/golang/index.d.ts.map +1 -1
- package/dist/plugins/golang/index.js +15 -6
- package/dist/plugins/golang/index.js.map +1 -1
- package/dist/plugins/golang/source-scope.d.ts +7 -0
- package/dist/plugins/golang/source-scope.d.ts.map +1 -0
- package/dist/plugins/golang/source-scope.js +83 -0
- package/dist/plugins/golang/source-scope.js.map +1 -0
- package/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +95 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +14 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +7033 -0
- package/node_modules/node-addon-api/napi.h +3309 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +480 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/README.md +128 -0
- package/node_modules/tree-sitter/binding.gyp +80 -0
- package/node_modules/tree-sitter/index.js +916 -0
- package/node_modules/tree-sitter/package.json +76 -0
- package/node_modules/tree-sitter/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/node_modules/tree-sitter/src/addon_data.h +47 -0
- package/node_modules/tree-sitter/src/binding.cc +35 -0
- package/node_modules/tree-sitter/src/conversions.cc +140 -0
- package/node_modules/tree-sitter/src/conversions.h +22 -0
- package/node_modules/tree-sitter/src/language.cc +106 -0
- package/node_modules/tree-sitter/src/language.h +17 -0
- package/node_modules/tree-sitter/src/logger.cc +70 -0
- package/node_modules/tree-sitter/src/logger.h +19 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
- package/node_modules/tree-sitter/src/node.cc +1088 -0
- package/node_modules/tree-sitter/src/node.h +30 -0
- package/node_modules/tree-sitter/src/parser.cc +306 -0
- package/node_modules/tree-sitter/src/parser.h +35 -0
- package/node_modules/tree-sitter/src/query.cc +397 -0
- package/node_modules/tree-sitter/src/query.h +40 -0
- package/node_modules/tree-sitter/src/tree.cc +316 -0
- package/node_modules/tree-sitter/src/tree.h +45 -0
- package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
- package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
- package/node_modules/tree-sitter/tree-sitter.d.ts +1042 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1478 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +291 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +523 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +293 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +293 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +483 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +54 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +12 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +875 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2293 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +286 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/portable/endian.h +239 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4350 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +911 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1034 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +399 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +170 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +717 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/ts_assert.h +11 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +75 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +24 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +113 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1314 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1935 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
- package/package.json +9 -2
- package/scripts/postinstall-tree-sitter.mjs +28 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#ifndef TREE_SITTER_WASM_H_
|
|
2
|
+
#define TREE_SITTER_WASM_H_
|
|
3
|
+
|
|
4
|
+
#ifdef __cplusplus
|
|
5
|
+
extern "C" {
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
#include "tree_sitter/api.h"
|
|
9
|
+
#include "./parser.h"
|
|
10
|
+
|
|
11
|
+
bool ts_wasm_store_start(TSWasmStore *self, TSLexer *lexer, const TSLanguage *language);
|
|
12
|
+
void ts_wasm_store_reset(TSWasmStore *self);
|
|
13
|
+
bool ts_wasm_store_has_error(const TSWasmStore *self);
|
|
14
|
+
|
|
15
|
+
bool ts_wasm_store_call_lex_main(TSWasmStore *self, TSStateId state);
|
|
16
|
+
bool ts_wasm_store_call_lex_keyword(TSWasmStore *self, TSStateId state);
|
|
17
|
+
|
|
18
|
+
uint32_t ts_wasm_store_call_scanner_create(TSWasmStore *self);
|
|
19
|
+
void ts_wasm_store_call_scanner_destroy(TSWasmStore *self, uint32_t scanner_address);
|
|
20
|
+
bool ts_wasm_store_call_scanner_scan(TSWasmStore *self, uint32_t scanner_address, uint32_t valid_tokens_ix);
|
|
21
|
+
uint32_t ts_wasm_store_call_scanner_serialize(TSWasmStore *self, uint32_t scanner_address, char *buffer);
|
|
22
|
+
void ts_wasm_store_call_scanner_deserialize(TSWasmStore *self, uint32_t scanner, const char *buffer, unsigned length);
|
|
23
|
+
|
|
24
|
+
void ts_wasm_language_retain(const TSLanguage *self);
|
|
25
|
+
void ts_wasm_language_release(const TSLanguage *self);
|
|
26
|
+
|
|
27
|
+
#ifdef __cplusplus
|
|
28
|
+
}
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#endif // TREE_SITTER_WASM_H_
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yalehwang/archguard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Automated architecture documentation generation tool with AI-powered Mermaid diagrams",
|
|
6
6
|
"keywords": [
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"files": [
|
|
15
15
|
"dist/",
|
|
16
|
+
"scripts/postinstall-tree-sitter.mjs",
|
|
16
17
|
"README.md",
|
|
17
18
|
"LICENSE"
|
|
18
19
|
],
|
|
@@ -22,8 +23,10 @@
|
|
|
22
23
|
"archguard": "dist/cli/index.js"
|
|
23
24
|
},
|
|
24
25
|
"scripts": {
|
|
25
|
-
"build": "tsc && tsc-alias && bash scripts/fix-imports.sh && npx tsc scripts/migrate-to-mermaid.ts --outDir dist/scripts --module ESNext --target ES2022 --moduleResolution node --esModuleInterop --resolveJsonModule --skipLibCheck",
|
|
26
|
+
"build": "tsc && tsc-alias && bash scripts/fix-imports.sh && npx tsc scripts/migrate-to-mermaid.ts --outDir dist/scripts --module ESNext --target ES2022 --moduleResolution node --esModuleInterop --resolveJsonModule --skipLibCheck && chmod +x dist/cli/index.js",
|
|
26
27
|
"dev": "tsc --watch",
|
|
28
|
+
"postinstall": "node scripts/postinstall-tree-sitter.mjs",
|
|
29
|
+
"prepack": "node scripts/stage-tree-sitter-prebuild.mjs",
|
|
27
30
|
"test": "vitest run",
|
|
28
31
|
"test:watch": "vitest",
|
|
29
32
|
"test:coverage": "vitest run --coverage",
|
|
@@ -45,6 +48,7 @@
|
|
|
45
48
|
"node": ">=18.0.0"
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
51
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
48
52
|
"chalk": "^5.6.2",
|
|
49
53
|
"cli-progress": "^3.12.0",
|
|
50
54
|
"commander": "^14.0.3",
|
|
@@ -84,6 +88,9 @@
|
|
|
84
88
|
"typescript": "^5.3.0",
|
|
85
89
|
"vitest": "^3.2.4"
|
|
86
90
|
},
|
|
91
|
+
"bundleDependencies": [
|
|
92
|
+
"tree-sitter"
|
|
93
|
+
],
|
|
87
94
|
"overrides": {
|
|
88
95
|
"tree-sitter": "^0.25.0"
|
|
89
96
|
},
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { createRequire } from 'node:module';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const packageRoot = path.resolve(scriptDir, '..');
|
|
11
|
+
const treeSitterDir = path.join(packageRoot, 'node_modules', 'tree-sitter');
|
|
12
|
+
|
|
13
|
+
if (!existsSync(treeSitterDir)) {
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
require('tree-sitter');
|
|
19
|
+
process.exit(0);
|
|
20
|
+
} catch (error) {
|
|
21
|
+
if (error instanceof Error && error.message) {
|
|
22
|
+
console.error(`[archguard] ${error.message}`);
|
|
23
|
+
}
|
|
24
|
+
console.error('[archguard] tree-sitter prebuilt binding is required.');
|
|
25
|
+
console.error('[archguard] Source rebuilds are intentionally disabled for production installs.');
|
|
26
|
+
console.error('[archguard] Install a release package that bundles the correct tree-sitter binary for this platform/runtime.');
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|