dirsql 0.3.99__tar.gz → 0.3.100__tar.gz
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.
- {dirsql-0.3.99 → dirsql-0.3.100}/Cargo.lock +1 -1
- {dirsql-0.3.99 → dirsql-0.3.100}/PKG-INFO +1 -1
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/_async.py +13 -4
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/_dirsql.pyi +1 -1
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/resolve_config_extensions.py +57 -16
- {dirsql-0.3.99/packages/rust → dirsql-0.3.100}/docs/reference/sdk.md +9 -8
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/Cargo.toml +1 -1
- {dirsql-0.3.99 → dirsql-0.3.100/packages/python}/docs/reference/sdk.md +9 -8
- dirsql-0.3.100/packages/python/e2e-attestations/claude-open-issues-review-le8hm5-588.json +7 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/src/lib.rs +2 -2
- {dirsql-0.3.99/packages/python → dirsql-0.3.100/packages/rust}/docs/reference/sdk.md +9 -8
- dirsql-0.3.99/packages/python/e2e-attestations/claude-open-issues-review-le8hm5-red-570.json +0 -7
- {dirsql-0.3.99 → dirsql-0.3.100}/Cargo.toml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/README.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/cli/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/cli/binary_path.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/cli/is_windows.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/cli/main.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/cli/resolve_config_extensions.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/py.typed +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/dirsql/resolve_extension.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/AGENTS.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/explanation.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/getting-started.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/embed.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/persist.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/index.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/migrations.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/package.json +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/playwright.config.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/reference/cli.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/reference/columns.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/reference/config.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/reference/hooks.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/reference/http-api.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/tests/integration/sidebar.spec.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/docs/vitest.config.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/README.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/conftest.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/.claude/CLAUDE.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/.vitepress/config.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/.vitepress/theme/index.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/.vitepress/theme/lang.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/AGENTS.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/explanation.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/getting-started.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/embed.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/persist.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/index.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/migrations.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/package.json +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/playwright.config.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/pnpm-lock.yaml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/pnpm-workspace.yaml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/reference/cli.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/reference/columns.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/reference/config.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/reference/hooks.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/reference/http-api.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/tests/integration/home.spec.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/tests/integration/language-flag.spec.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/tests/integration/sidebar.spec.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/tests/unit/config.test.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/tests/unit/lang.test.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/vitest.config.ts +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/tests/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/tests/conftest.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/tests/e2e/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/tests/integration/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/tests/integration/binding/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/python/tests/integration/hermetic/__init__.py +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/Cargo.toml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/README.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/benches/db_bench.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/benches/differ_bench.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/benches/matcher_bench.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/benches/scanner_bench.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/explanation.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/getting-started.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/columns-from-paths.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/define-tables.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/embed.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/extract-from-contents.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/load-extension.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/persist.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/react-to-changes.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/search-by-meaning.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/howto/skip-files.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/index.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/migrations.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/reference/cli.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/reference/columns.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/reference/config.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/reference/hooks.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/docs/reference/http-api.md +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/bin/dirsql.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/cli/execute.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/cli/init.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/cli/mod.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/cli/router.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/cli/serialize.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/cli/server.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/command.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/config.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/db.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/default_config.toml +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/differ.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/lib.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/matcher.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/persist.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/scanner.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/packages/rust/src/watcher.rs +0 -0
- {dirsql-0.3.99 → dirsql-0.3.100}/pyproject.toml +0 -0
|
@@ -4,7 +4,7 @@ import asyncio
|
|
|
4
4
|
import os
|
|
5
5
|
|
|
6
6
|
from dirsql._dirsql import DirSQL as _RustDirSQL
|
|
7
|
-
from dirsql.resolve_config_extensions import
|
|
7
|
+
from dirsql.resolve_config_extensions import resolve_configs_extension_specs
|
|
8
8
|
from dirsql.resolve_extension import resolve_extension_path
|
|
9
9
|
|
|
10
10
|
|
|
@@ -85,6 +85,15 @@ class DirSQL:
|
|
|
85
85
|
self._tables = tables
|
|
86
86
|
self._ignore = ignore
|
|
87
87
|
self._config = config
|
|
88
|
+
# A single path or a list of paths; the list merges in order (each
|
|
89
|
+
# config's [[table]] / ignore / [[dirsql.extension]] accumulate).
|
|
90
|
+
self._config_paths = (
|
|
91
|
+
[]
|
|
92
|
+
if config is None
|
|
93
|
+
else [config]
|
|
94
|
+
if isinstance(config, str)
|
|
95
|
+
else list(config)
|
|
96
|
+
)
|
|
88
97
|
self._persist = persist
|
|
89
98
|
self._persist_path = persist_path
|
|
90
99
|
self._extensions = extensions
|
|
@@ -116,8 +125,8 @@ class DirSQL:
|
|
|
116
125
|
"""
|
|
117
126
|
extensions = self._resolved_extensions()
|
|
118
127
|
suppress = False
|
|
119
|
-
if self.
|
|
120
|
-
config_extensions =
|
|
128
|
+
if self._config_paths:
|
|
129
|
+
config_extensions = resolve_configs_extension_specs(self._config_paths)
|
|
121
130
|
if config_extensions is not None:
|
|
122
131
|
extensions = [*(extensions or []), *config_extensions]
|
|
123
132
|
suppress = True
|
|
@@ -125,7 +134,7 @@ class DirSQL:
|
|
|
125
134
|
self._root,
|
|
126
135
|
tables=self._tables,
|
|
127
136
|
ignore=self._ignore,
|
|
128
|
-
config=self.
|
|
137
|
+
config=self._config_paths or None,
|
|
129
138
|
persist=self._persist,
|
|
130
139
|
persist_path=self._persist_path,
|
|
131
140
|
extensions=extensions,
|
|
@@ -65,7 +65,7 @@ class DirSQL:
|
|
|
65
65
|
*,
|
|
66
66
|
tables: list[Table] | None = None,
|
|
67
67
|
ignore: list[str] | None = None,
|
|
68
|
-
config: str | None = None,
|
|
68
|
+
config: list[str] | None = None,
|
|
69
69
|
persist: bool = False,
|
|
70
70
|
persist_path: str | PathLike[str] | None = None,
|
|
71
71
|
extensions: list[ExtensionSpec] | None = None,
|
|
@@ -19,16 +19,11 @@ import tomllib
|
|
|
19
19
|
from .resolve_extension import is_bare_name, resolve_extension_path
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
def
|
|
23
|
-
"""
|
|
22
|
+
def _load_extension_entries(config_path):
|
|
23
|
+
"""Return ``(entries, base_dir)`` for a config's ``[[dirsql.extension]]``.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
directory -- when at least one entry's ``path`` is a bare package name.
|
|
28
|
-
Returns ``None`` when the caller should not intervene: the config is
|
|
29
|
-
missing, malformed, declares no extensions, or uses only literal paths --
|
|
30
|
-
leaving the core's own loading (and error reporting) untouched. Raises if
|
|
31
|
-
a package name cannot be resolved.
|
|
25
|
+
``None`` when the config is missing, unreadable/malformed, or declares no
|
|
26
|
+
extension array -- the caller should leave such configs to the core.
|
|
32
27
|
"""
|
|
33
28
|
if not os.path.isfile(config_path):
|
|
34
29
|
return None
|
|
@@ -39,20 +34,22 @@ def resolve_config_extension_specs(config_path):
|
|
|
39
34
|
# Leave a malformed / unreadable config for the core to report.
|
|
40
35
|
return None
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
entries = cfg.get("extension")
|
|
37
|
+
entries = (doc.get("dirsql") or {}).get("extension")
|
|
44
38
|
if not isinstance(entries, list):
|
|
45
39
|
return None
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
return entries, os.path.dirname(os.path.abspath(config_path))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _has_bare_name(entries):
|
|
44
|
+
return any(
|
|
48
45
|
isinstance(e, dict)
|
|
49
46
|
and isinstance(e.get("path"), str)
|
|
50
47
|
and is_bare_name(e["path"])
|
|
51
48
|
for e in entries
|
|
52
|
-
)
|
|
53
|
-
return None
|
|
49
|
+
)
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
|
|
52
|
+
def _resolve_entries(entries, base):
|
|
56
53
|
specs = []
|
|
57
54
|
for e in entries:
|
|
58
55
|
entrypoint = e.get("entrypoint")
|
|
@@ -65,3 +62,47 @@ def resolve_config_extension_specs(config_path):
|
|
|
65
62
|
}
|
|
66
63
|
)
|
|
67
64
|
return specs
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def resolve_config_extension_specs(config_path):
|
|
68
|
+
"""Resolve a TOML config's ``[[dirsql.extension]]`` entries to literal paths.
|
|
69
|
+
|
|
70
|
+
Returns a list of ``{"path", "entrypoint"}`` dicts -- every entry resolved
|
|
71
|
+
via :func:`resolve_extension_path` against the config file's parent
|
|
72
|
+
directory -- when at least one entry's ``path`` is a bare package name.
|
|
73
|
+
Returns ``None`` when the caller should not intervene: the config is
|
|
74
|
+
missing, malformed, declares no extensions, or uses only literal paths --
|
|
75
|
+
leaving the core's own loading (and error reporting) untouched. Raises if
|
|
76
|
+
a package name cannot be resolved.
|
|
77
|
+
"""
|
|
78
|
+
loaded = _load_extension_entries(config_path)
|
|
79
|
+
if loaded is None:
|
|
80
|
+
return None
|
|
81
|
+
entries, base = loaded
|
|
82
|
+
if not _has_bare_name(entries):
|
|
83
|
+
return None
|
|
84
|
+
return _resolve_entries(entries, base)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def resolve_configs_extension_specs(config_paths):
|
|
88
|
+
"""Resolve the ``[[dirsql.extension]]`` entries of several configs, in order.
|
|
89
|
+
|
|
90
|
+
The SDK intervenes for the whole set only when **some** config names an
|
|
91
|
+
extension by bare package name (the core can resolve neither package names
|
|
92
|
+
nor -- once globally suppressed -- the literal entries of the other
|
|
93
|
+
configs). When it intervenes it resolves **every** config's entries, each
|
|
94
|
+
against that config's own parent directory, concatenated in ``config_paths``
|
|
95
|
+
order; the caller suppresses the core's config-extension loading and passes
|
|
96
|
+
the resolved list. Returns ``None`` when no config uses a package name,
|
|
97
|
+
leaving every config's loading to the core.
|
|
98
|
+
"""
|
|
99
|
+
loaded = [_load_extension_entries(p) for p in config_paths]
|
|
100
|
+
if not any(item is not None and _has_bare_name(item[0]) for item in loaded):
|
|
101
|
+
return None
|
|
102
|
+
specs = []
|
|
103
|
+
for item in loaded:
|
|
104
|
+
if item is None:
|
|
105
|
+
continue
|
|
106
|
+
entries, base = item
|
|
107
|
+
specs.extend(_resolve_entries(entries, base))
|
|
108
|
+
return specs
|
|
@@ -54,7 +54,7 @@ DirSQL(
|
|
|
54
54
|
*,
|
|
55
55
|
tables: list[Table] | None = None,
|
|
56
56
|
ignore: list[str] | None = None,
|
|
57
|
-
config: str | None = None,
|
|
57
|
+
config: str | list[str] | None = None,
|
|
58
58
|
persist: bool = False,
|
|
59
59
|
persist_path: str | None = None,
|
|
60
60
|
extensions: list[dict] | None = None, # [{ "path": str, "entrypoint"?: str }]
|
|
@@ -68,7 +68,7 @@ new DirSQL({
|
|
|
68
68
|
root?: string,
|
|
69
69
|
tables?: TableDef[],
|
|
70
70
|
ignore?: string[],
|
|
71
|
-
config?: string,
|
|
71
|
+
config?: string | string[],
|
|
72
72
|
persist?: boolean,
|
|
73
73
|
persistPath?: string,
|
|
74
74
|
extensions?: ExtensionSpec[], // [{ path: string, entrypoint?: string }]
|
|
@@ -108,12 +108,13 @@ never sets the root.
|
|
|
108
108
|
entries are appended after any programmatic `tables`; its `ignore`
|
|
109
109
|
patterns and `[[dirsql.extension]]` entries are appended likewise. The
|
|
110
110
|
config file does **not** set the index root: with no explicit `root`, the
|
|
111
|
-
index roots at the process cwd.
|
|
112
|
-
**
|
|
113
|
-
(`
|
|
114
|
-
|
|
115
|
-
[
|
|
116
|
-
|
|
111
|
+
index roots at the process cwd. **Multiple configs merge in order** on
|
|
112
|
+
every SDK — **Python** `config` accepts a `str` or a `list[str]`, the
|
|
113
|
+
**Rust** builder's `.config()` is repeatable (call it once per file), and
|
|
114
|
+
**TypeScript** `config` accepts a `string` or a `string[]`; the configs
|
|
115
|
+
merge in call order (`[[table]]` / `ignore` / `[[dirsql.extension]]`
|
|
116
|
+
accumulate; a duplicate table name across configs errors), mirroring the
|
|
117
|
+
CLI's repeatable [`-c/--config`](./cli.md#flags).
|
|
117
118
|
- `persist` — Keep the SQLite index on disk between runs (default off:
|
|
118
119
|
ephemeral, rebuilt every startup). The cache lives at
|
|
119
120
|
`<root>/.dirsql/cache.db` by default; on restart, only files whose stat
|
|
@@ -4,7 +4,7 @@ name = "dirsql-py-ext"
|
|
|
4
4
|
# pypi/maturin handler can rewrite it via `write-version` before
|
|
5
5
|
# `maturin build`. `pyproject.toml` declares `dynamic = ["version"]`
|
|
6
6
|
# and maturin reads this field. Mirrors `packages/rust/Cargo.toml`.
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.100"
|
|
8
8
|
# abi3 note: the `abi3-py311` pyo3 feature (below) builds ONE stable-ABI
|
|
9
9
|
# `cp311-abi3` wheel per platform that loads on every CPython >= 3.11
|
|
10
10
|
# (matching `pyproject.toml`'s `requires-python = ">=3.11"`), instead of
|
|
@@ -54,7 +54,7 @@ DirSQL(
|
|
|
54
54
|
*,
|
|
55
55
|
tables: list[Table] | None = None,
|
|
56
56
|
ignore: list[str] | None = None,
|
|
57
|
-
config: str | None = None,
|
|
57
|
+
config: str | list[str] | None = None,
|
|
58
58
|
persist: bool = False,
|
|
59
59
|
persist_path: str | None = None,
|
|
60
60
|
extensions: list[dict] | None = None, # [{ "path": str, "entrypoint"?: str }]
|
|
@@ -68,7 +68,7 @@ new DirSQL({
|
|
|
68
68
|
root?: string,
|
|
69
69
|
tables?: TableDef[],
|
|
70
70
|
ignore?: string[],
|
|
71
|
-
config?: string,
|
|
71
|
+
config?: string | string[],
|
|
72
72
|
persist?: boolean,
|
|
73
73
|
persistPath?: string,
|
|
74
74
|
extensions?: ExtensionSpec[], // [{ path: string, entrypoint?: string }]
|
|
@@ -108,12 +108,13 @@ never sets the root.
|
|
|
108
108
|
entries are appended after any programmatic `tables`; its `ignore`
|
|
109
109
|
patterns and `[[dirsql.extension]]` entries are appended likewise. The
|
|
110
110
|
config file does **not** set the index root: with no explicit `root`, the
|
|
111
|
-
index roots at the process cwd.
|
|
112
|
-
**
|
|
113
|
-
(`
|
|
114
|
-
|
|
115
|
-
[
|
|
116
|
-
|
|
111
|
+
index roots at the process cwd. **Multiple configs merge in order** on
|
|
112
|
+
every SDK — **Python** `config` accepts a `str` or a `list[str]`, the
|
|
113
|
+
**Rust** builder's `.config()` is repeatable (call it once per file), and
|
|
114
|
+
**TypeScript** `config` accepts a `string` or a `string[]`; the configs
|
|
115
|
+
merge in call order (`[[table]]` / `ignore` / `[[dirsql.extension]]`
|
|
116
|
+
accumulate; a duplicate table name across configs errors), mirroring the
|
|
117
|
+
CLI's repeatable [`-c/--config`](./cli.md#flags).
|
|
117
118
|
- `persist` — Keep the SQLite index on disk between runs (default off:
|
|
118
119
|
ephemeral, rebuilt every startup). The cache lives at
|
|
119
120
|
`<root>/.dirsql/cache.db` by default; on restart, only files whose stat
|
|
@@ -118,7 +118,7 @@ mod python {
|
|
|
118
118
|
root: Option<String>,
|
|
119
119
|
tables: Option<Vec<PyRef<'_, PyTable>>>,
|
|
120
120
|
ignore: Option<Vec<String>>,
|
|
121
|
-
config: Option<String
|
|
121
|
+
config: Option<Vec<String>>,
|
|
122
122
|
persist: bool,
|
|
123
123
|
persist_path: Option<PathBuf>,
|
|
124
124
|
extensions: Option<Vec<PyExtensionSpec>>,
|
|
@@ -150,7 +150,7 @@ mod python {
|
|
|
150
150
|
if let Some(ig) = ignore {
|
|
151
151
|
builder = builder.ignore(ig);
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
for c in config.into_iter().flatten() {
|
|
154
154
|
builder = builder.config(c);
|
|
155
155
|
}
|
|
156
156
|
if persist {
|
|
@@ -54,7 +54,7 @@ DirSQL(
|
|
|
54
54
|
*,
|
|
55
55
|
tables: list[Table] | None = None,
|
|
56
56
|
ignore: list[str] | None = None,
|
|
57
|
-
config: str | None = None,
|
|
57
|
+
config: str | list[str] | None = None,
|
|
58
58
|
persist: bool = False,
|
|
59
59
|
persist_path: str | None = None,
|
|
60
60
|
extensions: list[dict] | None = None, # [{ "path": str, "entrypoint"?: str }]
|
|
@@ -68,7 +68,7 @@ new DirSQL({
|
|
|
68
68
|
root?: string,
|
|
69
69
|
tables?: TableDef[],
|
|
70
70
|
ignore?: string[],
|
|
71
|
-
config?: string,
|
|
71
|
+
config?: string | string[],
|
|
72
72
|
persist?: boolean,
|
|
73
73
|
persistPath?: string,
|
|
74
74
|
extensions?: ExtensionSpec[], // [{ path: string, entrypoint?: string }]
|
|
@@ -108,12 +108,13 @@ never sets the root.
|
|
|
108
108
|
entries are appended after any programmatic `tables`; its `ignore`
|
|
109
109
|
patterns and `[[dirsql.extension]]` entries are appended likewise. The
|
|
110
110
|
config file does **not** set the index root: with no explicit `root`, the
|
|
111
|
-
index roots at the process cwd.
|
|
112
|
-
**
|
|
113
|
-
(`
|
|
114
|
-
|
|
115
|
-
[
|
|
116
|
-
|
|
111
|
+
index roots at the process cwd. **Multiple configs merge in order** on
|
|
112
|
+
every SDK — **Python** `config` accepts a `str` or a `list[str]`, the
|
|
113
|
+
**Rust** builder's `.config()` is repeatable (call it once per file), and
|
|
114
|
+
**TypeScript** `config` accepts a `string` or a `string[]`; the configs
|
|
115
|
+
merge in call order (`[[table]]` / `ignore` / `[[dirsql.extension]]`
|
|
116
|
+
accumulate; a duplicate table name across configs errors), mirroring the
|
|
117
|
+
CLI's repeatable [`-c/--config`](./cli.md#flags).
|
|
117
118
|
- `persist` — Keep the SQLite index on disk between runs (default off:
|
|
118
119
|
ephemeral, rebuilt every startup). The cache lives at
|
|
119
120
|
`<root>/.dirsql/cache.db` by default; on restart, only files whose stat
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirsql-0.3.99 → dirsql-0.3.100}/packages/python/docs/tests/integration/language-flag.spec.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|