intentumdiff-python 0.0.1__py3-none-macosx_11_0_arm64.whl
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.
- intentumdiff/__init__.py +134 -0
- intentumdiff/_differ_gate.py +210 -0
- intentumdiff/_differ_presentation.py +786 -0
- intentumdiff/_differ_runtime.py +320 -0
- intentumdiff/analysis/__init__.py +1 -0
- intentumdiff/analysis/compile_commands.py +151 -0
- intentumdiff/analysis/cross_file.py +71 -0
- intentumdiff/analysis/diagnostics.py +309 -0
- intentumdiff/analysis/guardrail_reports.py +254 -0
- intentumdiff/analysis/guardrails.py +318 -0
- intentumdiff/analysis/invariances.py +1207 -0
- intentumdiff/analysis/keyed_profiles.py +25 -0
- intentumdiff/analysis/resource_profiles.py +14 -0
- intentumdiff/analysis/schema_resolver.py +816 -0
- intentumdiff/analysis/text_review.py +46 -0
- intentumdiff/analysis/user_schemas.py +430 -0
- intentumdiff/assets.py +45 -0
- intentumdiff/cache/__init__.py +37 -0
- intentumdiff/cache/duckdb_store.py +98 -0
- intentumdiff/cache/sqlite_store.py +149 -0
- intentumdiff/cache/store.py +190 -0
- intentumdiff/cli/__init__.py +199 -0
- intentumdiff/cli/_commands.py +2141 -0
- intentumdiff/cli/_parser.py +1061 -0
- intentumdiff/cli/_shared.py +644 -0
- intentumdiff/content_type.py +59 -0
- intentumdiff/core/__init__.py +1 -0
- intentumdiff/core/commit_differ.py +599 -0
- intentumdiff/core/config.py +51 -0
- intentumdiff/core/cst_serializer.py +101 -0
- intentumdiff/core/diffignore.py +87 -0
- intentumdiff/core/index.py +189 -0
- intentumdiff/core/indexer.py +792 -0
- intentumdiff/core/models.py +837 -0
- intentumdiff/differ.py +2195 -0
- intentumdiff/github_app.py +287 -0
- intentumdiff/intentumdiff_rust_core/__init__.py +7 -0
- intentumdiff/intentumdiff_rust_core/ffi.py +8 -0
- intentumdiff/intentumdiff_rust_core/libintentumdiff_rust_core.dylib +0 -0
- intentumdiff/invariances/__init__.py +2 -0
- intentumdiff/invariances/rules.schema.json +283 -0
- intentumdiff/invariances/rules.yaml +349 -0
- intentumdiff/live_server.py +1314 -0
- intentumdiff/lsp/__init__.py +67 -0
- intentumdiff/lsp/client.py +544 -0
- intentumdiff/lsp/config.py +96 -0
- intentumdiff/lsp/enricher.py +227 -0
- intentumdiff/lsp/exceptions.py +27 -0
- intentumdiff/lsp/launcher.py +273 -0
- intentumdiff/lsp/servers.py +356 -0
- intentumdiff/lsp_server/__init__.py +14 -0
- intentumdiff/lsp_server/_codelens.py +67 -0
- intentumdiff/lsp_server/_diagnostics.py +62 -0
- intentumdiff/lsp_server/_handlers.py +175 -0
- intentumdiff/lsp_server/server.py +205 -0
- intentumdiff/plugins/__init__.py +1 -0
- intentumdiff/plugins/adapter.py +397 -0
- intentumdiff/plugins/builtins.py +323 -0
- intentumdiff/plugins/exceptions.py +93 -0
- intentumdiff/plugins/hub.py +1155 -0
- intentumdiff/plugins/language_metadata.py +250 -0
- intentumdiff/plugins/loader.py +1252 -0
- intentumdiff/plugins/registry.py +1079 -0
- intentumdiff/plugins/registry.schema.json +99 -0
- intentumdiff/plugins/registry_schema.py +280 -0
- intentumdiff/plugins/wit/plugin.wit +351 -0
- intentumdiff/rust_core.py +2370 -0
- intentumdiff/serve/__init__.py +19 -0
- intentumdiff/serve/_app.py +485 -0
- intentumdiff/serve/_static/index.html +326 -0
- intentumdiff/serve/_static/playground.js +567 -0
- intentumdiff/sources/__init__.py +1 -0
- intentumdiff/sources/base.py +28 -0
- intentumdiff/sources/file_source.py +48 -0
- intentumdiff/sources/git_source.py +375 -0
- intentumdiff/sources/live_buffer_source.py +113 -0
- intentumdiff/sources/patch_source.py +126 -0
- intentumdiff/sources/string_source.py +44 -0
- intentumdiff/testing.py +165 -0
- intentumdiff/vcs/__init__.py +37 -0
- intentumdiff/vcs/_safe_path.py +50 -0
- intentumdiff/vcs/base.py +136 -0
- intentumdiff/vcs/git_backend.py +97 -0
- intentumdiff/vcs/git_cli.py +100 -0
- intentumdiff/vcs/hg_backend.py +94 -0
- intentumdiff/vcs/perforce_backend.py +109 -0
- intentumdiff/vcs/svn_backend.py +105 -0
- intentumdiff/wasm/.gitkeep +2 -0
- intentumdiff/wasm/abap_parser.wasm +0 -0
- intentumdiff/wasm/adf_parser.wasm +0 -0
- intentumdiff/wasm/asciidoc_parser.wasm +0 -0
- intentumdiff/wasm/asm_parser.wasm +0 -0
- intentumdiff/wasm/assemblyscript_parser.wasm +0 -0
- intentumdiff/wasm/astro_parser.wasm +0 -0
- intentumdiff/wasm/bash_parser.wasm +0 -0
- intentumdiff/wasm/clojure_parser.wasm +0 -0
- intentumdiff/wasm/cmake_parser.wasm +0 -0
- intentumdiff/wasm/cpp_parser.wasm +0 -0
- intentumdiff/wasm/csharp_parser.wasm +0 -0
- intentumdiff/wasm/css_parser.wasm +0 -0
- intentumdiff/wasm/dart_parser.wasm +0 -0
- intentumdiff/wasm/databricks_parser.wasm +0 -0
- intentumdiff/wasm/dax_parser.wasm +0 -0
- intentumdiff/wasm/delphi_parser.wasm +0 -0
- intentumdiff/wasm/dockerfile_parser.wasm +0 -0
- intentumdiff/wasm/elixir_parser.wasm +0 -0
- intentumdiff/wasm/freebasic_parser.wasm +0 -0
- intentumdiff/wasm/generic_parser.wasm +0 -0
- intentumdiff/wasm/gitignore_parser.wasm +0 -0
- intentumdiff/wasm/go_parser.wasm +0 -0
- intentumdiff/wasm/gomod_parser.wasm +0 -0
- intentumdiff/wasm/graphql_parser.wasm +0 -0
- intentumdiff/wasm/groovy_parser.wasm +0 -0
- intentumdiff/wasm/haskell_parser.wasm +0 -0
- intentumdiff/wasm/html_parser.wasm +0 -0
- intentumdiff/wasm/ini_parser.wasm +0 -0
- intentumdiff/wasm/java_parser.wasm +0 -0
- intentumdiff/wasm/js_ts_parser.wasm +0 -0
- intentumdiff/wasm/json_parser.wasm +0 -0
- intentumdiff/wasm/kotlin_parser.wasm +0 -0
- intentumdiff/wasm/latex_parser.wasm +0 -0
- intentumdiff/wasm/lua_parser.wasm +0 -0
- intentumdiff/wasm/make_parser.wasm +0 -0
- intentumdiff/wasm/markdown_parser.wasm +0 -0
- intentumdiff/wasm/mdx_parser.wasm +0 -0
- intentumdiff/wasm/ocaml_parser.wasm +0 -0
- intentumdiff/wasm/odin_parser.wasm +0 -0
- intentumdiff/wasm/parser_manifest.json +590 -0
- intentumdiff/wasm/perl_parser.wasm +0 -0
- intentumdiff/wasm/php_parser.wasm +0 -0
- intentumdiff/wasm/plsql_parser.wasm +0 -0
- intentumdiff/wasm/po_parser.wasm +0 -0
- intentumdiff/wasm/postscript_parser.wasm +0 -0
- intentumdiff/wasm/powershell_parser.wasm +0 -0
- intentumdiff/wasm/proto_parser.wasm +0 -0
- intentumdiff/wasm/puppet_parser.wasm +0 -0
- intentumdiff/wasm/python_parser.wasm +0 -0
- intentumdiff/wasm/qsharp_parser.wasm +0 -0
- intentumdiff/wasm/r_parser.wasm +0 -0
- intentumdiff/wasm/reasonml_parser.wasm +0 -0
- intentumdiff/wasm/ruby_parser.wasm +0 -0
- intentumdiff/wasm/rust_parser.wasm +0 -0
- intentumdiff/wasm/sas_parser.wasm +0 -0
- intentumdiff/wasm/scala_parser.wasm +0 -0
- intentumdiff/wasm/scss_parser.wasm +0 -0
- intentumdiff/wasm/sql_parser.wasm +0 -0
- intentumdiff/wasm/squirrel_parser.wasm +0 -0
- intentumdiff/wasm/svelte_parser.wasm +0 -0
- intentumdiff/wasm/swift_parser.wasm +0 -0
- intentumdiff/wasm/terraform_parser.wasm +0 -0
- intentumdiff/wasm/toml_parser.wasm +0 -0
- intentumdiff/wasm/tsql_parser.wasm +0 -0
- intentumdiff/wasm/vbnet_parser.wasm +0 -0
- intentumdiff/wasm/vue_parser.wasm +0 -0
- intentumdiff/wasm/wat_parser.wasm +0 -0
- intentumdiff/wasm/xml_parser.wasm +0 -0
- intentumdiff/wasm/yaml_parser.wasm +0 -0
- intentumdiff/wasm/zig_parser.wasm +0 -0
- intentumdiff/watcher.py +259 -0
- intentumdiff_python-0.0.1.dist-info/METADATA +112 -0
- intentumdiff_python-0.0.1.dist-info/RECORD +165 -0
- intentumdiff_python-0.0.1.dist-info/WHEEL +4 -0
- intentumdiff_python-0.0.1.dist-info/entry_points.txt +80 -0
- intentumdiff_python-0.0.1.dist-info/licenses/LICENSE +21 -0
- intentumdiff_python-0.0.1.dist-info/sboms/intentumdiff-rust-core.cyclonedx.json +10968 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"""Fallback language metadata for parser plugins.
|
|
2
|
+
|
|
3
|
+
The primary source of this data is the parser plugin's WIT ``language-info``
|
|
4
|
+
export. These defaults keep older plugins and currently-built Wasm artifacts
|
|
5
|
+
usable while plugin authors adopt the richer contract.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from intentumdiff.core.models import LanguagePluginInfo
|
|
11
|
+
|
|
12
|
+
_BUILTIN_LAST_UPDATED = "2026-05-19"
|
|
13
|
+
|
|
14
|
+
_MONACO: dict[str, str] = {
|
|
15
|
+
"bash": "shell",
|
|
16
|
+
"c": "c",
|
|
17
|
+
"clojure": "clojure",
|
|
18
|
+
"cpp": "cpp",
|
|
19
|
+
"csharp": "csharp",
|
|
20
|
+
"css": "css",
|
|
21
|
+
"dart": "dart",
|
|
22
|
+
"dockerfile": "dockerfile",
|
|
23
|
+
"elixir": "elixir",
|
|
24
|
+
"go": "go",
|
|
25
|
+
"groovy": "groovy",
|
|
26
|
+
"haskell": "haskell",
|
|
27
|
+
"html": "html",
|
|
28
|
+
"java": "java",
|
|
29
|
+
"javascript": "javascript",
|
|
30
|
+
"json": "json",
|
|
31
|
+
"kotlin": "kotlin",
|
|
32
|
+
"lua": "lua",
|
|
33
|
+
"markdown": "markdown",
|
|
34
|
+
"mdx": "markdown",
|
|
35
|
+
"perl": "perl",
|
|
36
|
+
"php": "php",
|
|
37
|
+
"powershell": "powershell",
|
|
38
|
+
"python": "python",
|
|
39
|
+
"py": "python",
|
|
40
|
+
"r": "r",
|
|
41
|
+
"ruby": "ruby",
|
|
42
|
+
"rust": "rust",
|
|
43
|
+
"scala": "scala",
|
|
44
|
+
"scss": "scss",
|
|
45
|
+
"sql": "sql",
|
|
46
|
+
"swift": "swift",
|
|
47
|
+
"terraform": "hcl",
|
|
48
|
+
"typescript": "typescript",
|
|
49
|
+
"tsx": "typescript",
|
|
50
|
+
"xml": "xml",
|
|
51
|
+
"yaml": "yaml",
|
|
52
|
+
"yml": "yaml",
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_DEFAULT_FILENAMES: dict[str, str] = {
|
|
56
|
+
"abap": "code.abap",
|
|
57
|
+
"adf": "pipeline.json",
|
|
58
|
+
"asm": "code.asm",
|
|
59
|
+
"assemblyscript": "code.as",
|
|
60
|
+
"astro": "Page.astro",
|
|
61
|
+
"bash": "code.sh",
|
|
62
|
+
"c": "code.c",
|
|
63
|
+
"clojure": "code.clj",
|
|
64
|
+
"cpp": "code.cpp",
|
|
65
|
+
"csharp": "Code.cs",
|
|
66
|
+
"css": "style.css",
|
|
67
|
+
"dart": "code.dart",
|
|
68
|
+
"databricks-workflow": "workflow.yml",
|
|
69
|
+
"dax": "measure.dax",
|
|
70
|
+
"dbt-sql": "model.sql",
|
|
71
|
+
"dbt-yaml": "schema.yml",
|
|
72
|
+
"delphi": "code.pas",
|
|
73
|
+
"dockerfile": "Dockerfile",
|
|
74
|
+
"elixir": "code.ex",
|
|
75
|
+
"freebasic": "code.bas",
|
|
76
|
+
"generic": "code.txt",
|
|
77
|
+
"gitignore": ".gitignore",
|
|
78
|
+
"graphql": "schema.graphql",
|
|
79
|
+
"go": "code.go",
|
|
80
|
+
"groovy": "code.groovy",
|
|
81
|
+
"haskell": "code.hs",
|
|
82
|
+
"html": "index.html",
|
|
83
|
+
"java": "Code.java",
|
|
84
|
+
"javascript": "code.js",
|
|
85
|
+
"json": "data.json",
|
|
86
|
+
"kotlin": "Code.kt",
|
|
87
|
+
"asciidoc": "README.adoc",
|
|
88
|
+
"latex": "paper.tex",
|
|
89
|
+
"lua": "code.lua",
|
|
90
|
+
"m": "query.m",
|
|
91
|
+
"markdown": "README.md",
|
|
92
|
+
"toml": "config.toml",
|
|
93
|
+
"ini": "settings.ini",
|
|
94
|
+
"gomod": "go.mod",
|
|
95
|
+
"make": "Makefile",
|
|
96
|
+
"proto": "service.proto",
|
|
97
|
+
"cmake": "CMakeLists.txt",
|
|
98
|
+
"mdx": "doc.mdx",
|
|
99
|
+
"ocaml": "code.ml",
|
|
100
|
+
"odin": "code.odin",
|
|
101
|
+
"perl": "code.pl",
|
|
102
|
+
"php": "code.php",
|
|
103
|
+
"plsql": "code.sql",
|
|
104
|
+
"po": "messages.po",
|
|
105
|
+
"postscript": "code.ps",
|
|
106
|
+
"powershell": "code.ps1",
|
|
107
|
+
"puppet": "site.pp",
|
|
108
|
+
"python": "code.py",
|
|
109
|
+
"qsharp": "Program.qs",
|
|
110
|
+
"r": "code.r",
|
|
111
|
+
"reasonml": "component.re",
|
|
112
|
+
"ruby": "code.rb",
|
|
113
|
+
"rust": "code.rs",
|
|
114
|
+
"sas": "code.sas",
|
|
115
|
+
"scala": "Code.scala",
|
|
116
|
+
"scss": "style.scss",
|
|
117
|
+
"sql": "code.sql",
|
|
118
|
+
"squirrel": "code.nut",
|
|
119
|
+
"svelte": "Component.svelte",
|
|
120
|
+
"swift": "code.swift",
|
|
121
|
+
"terraform": "main.tf",
|
|
122
|
+
"tsx": "component.tsx",
|
|
123
|
+
"typescript": "code.ts",
|
|
124
|
+
"vbnet": "Code.vb",
|
|
125
|
+
"vue": "Component.vue",
|
|
126
|
+
"wat": "module.wat",
|
|
127
|
+
"xml": "data.xml",
|
|
128
|
+
"yaml": "data.yaml",
|
|
129
|
+
"zig": "code.zig",
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
_EXTENSIONS: dict[str, list[str]] = {
|
|
133
|
+
"python": [".py", ".pyi"],
|
|
134
|
+
"javascript": [".js", ".mjs", ".cjs", ".jsx"],
|
|
135
|
+
"typescript": [".ts", ".mts", ".cts"],
|
|
136
|
+
"tsx": [".tsx"],
|
|
137
|
+
"sql": [".sql", ".ddl", ".dml"],
|
|
138
|
+
"dbt-sql": [".sql"],
|
|
139
|
+
"dbt-yaml": [".yml", ".yaml"],
|
|
140
|
+
"yaml": [".yml", ".yaml"],
|
|
141
|
+
"json": [".json"],
|
|
142
|
+
"m": [".m"],
|
|
143
|
+
"markdown": [".md", ".markdown", ".mdown", ".mkd", ".mkdn"],
|
|
144
|
+
"toml": [".toml"],
|
|
145
|
+
"ini": [".ini", ".cfg", ".conf", ".editorconfig", ".gitconfig"],
|
|
146
|
+
"gomod": ["go.mod"],
|
|
147
|
+
"make": ["Makefile", "GNUmakefile", ".mk", ".make"],
|
|
148
|
+
"proto": [".proto"],
|
|
149
|
+
"cmake": ["CMakeLists.txt", ".cmake"],
|
|
150
|
+
"html": [".html", ".htm"],
|
|
151
|
+
"graphql": [".graphql", ".gql"],
|
|
152
|
+
"gitignore": [
|
|
153
|
+
".gitignore",
|
|
154
|
+
".dockerignore",
|
|
155
|
+
".npmignore",
|
|
156
|
+
".eslintignore",
|
|
157
|
+
".prettierignore",
|
|
158
|
+
".helmignore",
|
|
159
|
+
".gcloudignore",
|
|
160
|
+
".cursorignore",
|
|
161
|
+
".vscodeignore",
|
|
162
|
+
],
|
|
163
|
+
"latex": [".tex", ".latex"],
|
|
164
|
+
"asciidoc": [".adoc", ".asciidoc", ".asc"],
|
|
165
|
+
"ocaml": [".ml", ".mli"],
|
|
166
|
+
"po": [".po", ".pot"],
|
|
167
|
+
"reasonml": [".re", ".rei"],
|
|
168
|
+
"css": [".css"],
|
|
169
|
+
"scss": [".scss"],
|
|
170
|
+
"xml": [".xml"],
|
|
171
|
+
"terraform": [".tf", ".hcl"],
|
|
172
|
+
"dockerfile": ["Dockerfile"],
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
_DISPLAY_NAMES: dict[str, tuple[str, str]] = {
|
|
176
|
+
"adf": ("Azure Data Factory", "ADF"),
|
|
177
|
+
"asm": ("Assembly", "ASM"),
|
|
178
|
+
"csharp": ("C#", "C#"),
|
|
179
|
+
"cpp": ("C++", "C++"),
|
|
180
|
+
"dbt-sql": ("dbt SQL", "dbt SQL"),
|
|
181
|
+
"dbt-yaml": ("dbt YAML", "dbt YAML"),
|
|
182
|
+
"asciidoc": ("AsciiDoc", "AsciiDoc"),
|
|
183
|
+
"gitignore": ("Ignore file", "Ignore"),
|
|
184
|
+
"graphql": ("GraphQL", "GraphQL"),
|
|
185
|
+
"latex": ("LaTeX", "LaTeX"),
|
|
186
|
+
"ocaml": ("OCaml", "OCaml"),
|
|
187
|
+
"po": ("PO/gettext", "PO"),
|
|
188
|
+
"reasonml": ("ReasonML", "ReasonML"),
|
|
189
|
+
"dax": ("DAX", "DAX"),
|
|
190
|
+
"m": ("Power Query M", "M"),
|
|
191
|
+
"markdown": ("Markdown", "Markdown"),
|
|
192
|
+
"toml": ("TOML", "TOML"),
|
|
193
|
+
"ini": ("INI", "INI"),
|
|
194
|
+
"gomod": ("go.mod", "gomod"),
|
|
195
|
+
"make": ("Makefile", "make"),
|
|
196
|
+
"proto": ("Protocol Buffers", "proto"),
|
|
197
|
+
"cmake": ("CMake", "CMake"),
|
|
198
|
+
"mdx": ("MDX", "MDX"),
|
|
199
|
+
"plsql": ("PL/SQL", "PL/SQL"),
|
|
200
|
+
"qsharp": ("Q#", "Q#"),
|
|
201
|
+
"tsx": ("TSX", "TSX"),
|
|
202
|
+
"tsql": ("T-SQL", "T-SQL"),
|
|
203
|
+
"vbnet": ("VB.NET", "VB.NET"),
|
|
204
|
+
"wat": ("WebAssembly Text", "WAT"),
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def _title(language_id: str) -> tuple[str, str]:
|
|
209
|
+
if language_id in _DISPLAY_NAMES:
|
|
210
|
+
return _DISPLAY_NAMES[language_id]
|
|
211
|
+
words = language_id.replace("_", "-").split("-")
|
|
212
|
+
name = " ".join(word.upper() if len(word) <= 3 else word.title() for word in words)
|
|
213
|
+
return name, name
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def fallback_language_info(
|
|
217
|
+
language_id: str,
|
|
218
|
+
*,
|
|
219
|
+
plugin_id: str,
|
|
220
|
+
grammar_id: str,
|
|
221
|
+
priority: int,
|
|
222
|
+
is_trusted: bool,
|
|
223
|
+
provenance: str,
|
|
224
|
+
author: str = "",
|
|
225
|
+
plugin_version: str = "",
|
|
226
|
+
last_updated: str = "",
|
|
227
|
+
) -> LanguagePluginInfo:
|
|
228
|
+
"""Return best-effort metadata for a language handled by a parser plugin."""
|
|
229
|
+
|
|
230
|
+
language_name, short_name = _title(language_id)
|
|
231
|
+
default_filename = _DEFAULT_FILENAMES.get(language_id, f"code.{language_id}")
|
|
232
|
+
extensions = _EXTENSIONS.get(language_id)
|
|
233
|
+
if extensions is None and "." in default_filename:
|
|
234
|
+
extensions = ["." + default_filename.rsplit(".", 1)[1]]
|
|
235
|
+
return LanguagePluginInfo(
|
|
236
|
+
language_id=language_id,
|
|
237
|
+
language_name=language_name,
|
|
238
|
+
language_short_name=short_name,
|
|
239
|
+
monaco_language=_MONACO.get(language_id, "plaintext"),
|
|
240
|
+
default_filename=default_filename,
|
|
241
|
+
language_file_extensions=extensions or [],
|
|
242
|
+
author=author,
|
|
243
|
+
plugin_version=plugin_version,
|
|
244
|
+
last_updated=last_updated or (_BUILTIN_LAST_UPDATED if is_trusted else ""),
|
|
245
|
+
plugin_id=plugin_id,
|
|
246
|
+
grammar_id=grammar_id,
|
|
247
|
+
priority=priority,
|
|
248
|
+
is_trusted=is_trusted,
|
|
249
|
+
provenance=provenance,
|
|
250
|
+
)
|