@descryy/adapter-python 0.1.0

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/dist/routes.js ADDED
@@ -0,0 +1,511 @@
1
+ /**
2
+ * The HTTP-route framework extractor for Python — FastAPI, Flask and Django.
3
+ *
4
+ * **An `API_ROUTE` is a framework claim, and this file is where it is earned.**
5
+ * Until now the only producer of a route in this project was `adapter-openapi`,
6
+ * reading a published contract. That is the right first move — *if the framework
7
+ * will tell you, never infer it* — but a repository that publishes no contract
8
+ * has no route side of the join at all, and most repositories publish nothing.
9
+ * FastAPI, Flask and Django all *declare* their routes in source: a decorator
10
+ * carrying a method and a path template, or a `urlpatterns` list. Reading a
11
+ * declaration is not inference.
12
+ *
13
+ * ## The rule that does all the precision work
14
+ *
15
+ * **A route is admitted only when its receiver resolves to a router or
16
+ * application constructed from a web framework's own module.** Never because an
17
+ * attribute happens to be spelled like an HTTP verb.
18
+ *
19
+ * That is not a theoretical guard. Matching `@x.get`/`@x.post`/`@x.patch` by
20
+ * name alone, measured before this file was written:
21
+ *
22
+ * | repository | verb-named decorators | actually routes |
23
+ * | --- | --- | --- |
24
+ * | django | 171 `@mock.patch` | **0** |
25
+ * | saleor | 1,150 `@mock.patch` | **0** |
26
+ * | dispatch | 1 `@app.options` on a Slack Bolt app | **0** |
27
+ *
28
+ * `unittest.mock.patch` is spelled exactly like the HTTP verb, and on saleor a
29
+ * name rule would have invented 1,150 routes — every one of them a false claim
30
+ * about a URL that does not exist. Slack Bolt's `app.options()` registers an
31
+ * *action id*, not a path. This is golden pattern 12's lesson and §4 rule 3: a
32
+ * node type comes from provenance — an import, a decorator, a base class — or
33
+ * from nothing.
34
+ *
35
+ * ## Everything below the receiver check is arithmetic on written strings
36
+ *
37
+ * A served path is a router's mount prefix chain plus the path at the decorator.
38
+ * On dispatch that chain is four hops and crosses files under import aliases:
39
+ *
40
+ * app.mount("/api/v1", app=api) # main.py
41
+ * api.include_router(api_router) # main.py
42
+ * api_router.include_router(auth_router, prefix=...) # api.py, aliased
43
+ * @auth_router.get("/me") # auth/views.py
44
+ *
45
+ * **Every hop of that chain must be followed or the answer is wrong in a way
46
+ * that reads as right.** Dropping the outermost hop yields `/{organization}/…`
47
+ * instead of `/api/v1/{organization}/…`: a plausible path, no error, no ledger
48
+ * row — and a caller that resolved its base URL to `/api/v1` (DEC-052 followed
49
+ * exactly that, three symbol hops on the consumer side) mints a different
50
+ * endpoint id and joins nothing. That is DEC-055's failure mode: everything
51
+ * normalises, everything resolves, and the join count is silently zero.
52
+ *
53
+ * ## Where the line is
54
+ *
55
+ * A prefix or path written as anything but a literal is **disclosed, never
56
+ * guessed**. Emitting a route for a path built at runtime attaches a caller to
57
+ * an endpoint that does not exist, and unlike a missing edge nothing downstream
58
+ * can tell that from a correct one.
59
+ *
60
+ * The split with `extract.py` is this adapter's standing one: the Python side
61
+ * records syntactic form and names no framework, and every decision about what
62
+ * a form *means* is taken here.
63
+ */
64
+ /**
65
+ * The constructors that make a receiver a router, and the modules they must
66
+ * come from. The module check is the precision control: a local class called
67
+ * `Blueprint` is not Flask's, and matching the bare name would admit it.
68
+ */
69
+ export const ROUTER_CONSTRUCTORS = {
70
+ fastapi: {
71
+ APIRouter: new Set(["fastapi", "fastapi.routing"]),
72
+ FastAPI: new Set(["fastapi", "fastapi.applications"]),
73
+ },
74
+ flask: {
75
+ Flask: new Set(["flask", "flask.app"]),
76
+ Blueprint: new Set(["flask", "flask.blueprints"]),
77
+ },
78
+ django: {},
79
+ };
80
+ /** `django.urls.path`/`re_path`/`url`, and `include` for a nested urlconf. */
81
+ export const DJANGO_URL_MODULES = new Set([
82
+ "django.urls",
83
+ "django.conf.urls",
84
+ "django.urls.conf",
85
+ ]);
86
+ /** HTTP methods a decorator attribute may name. `trace` is included; `head` is. */
87
+ export const HTTP_METHODS = new Set([
88
+ "get",
89
+ "post",
90
+ "put",
91
+ "patch",
92
+ "delete",
93
+ "head",
94
+ "options",
95
+ "trace",
96
+ ]);
97
+ /**
98
+ * FastAPI and Flask both spell "any method, path given by argument" as
99
+ * `.route(...)`; FastAPI additionally spells it `.api_route(...)`.
100
+ */
101
+ export const GENERIC_ROUTE_ATTRS = new Set([
102
+ "route",
103
+ "api_route",
104
+ "add_url_rule",
105
+ "add_api_route",
106
+ ]);
107
+ /** Attributes that mount one router inside another. */
108
+ export const MOUNT_ATTRS = new Set([
109
+ "include_router",
110
+ "register_blueprint",
111
+ "mount",
112
+ ]);
113
+ /**
114
+ * Is this the application itself rather than a router that must be mounted?
115
+ *
116
+ * The distinction decides whether "nothing mounts this" is a disclosure or a
117
+ * non-event. `FastAPI()` and `Flask()` are roots and serve their routes at the
118
+ * paths written on them. An `APIRouter` or a `Blueprint` that nothing mounts
119
+ * serves nothing at all, and the path it would serve is genuinely unknowable.
120
+ */
121
+ export function isApplicationRouter(router) {
122
+ return router.constructor === "FastAPI" || router.constructor === "Flask";
123
+ }
124
+ /** Which framework, if any, a constructor call belongs to. */
125
+ export function frameworkOfConstructor(callee, moduleOfImport) {
126
+ // `APIRouter(...)` and `fastapi.APIRouter(...)` are the same declaration.
127
+ const leaf = callee.includes(".") ? callee.slice(callee.lastIndexOf(".") + 1) : callee;
128
+ for (const [framework, table] of Object.entries(ROUTER_CONSTRUCTORS)) {
129
+ const modules = table[leaf];
130
+ if (modules === undefined)
131
+ continue;
132
+ // A dotted callee names its module at the call site; a bare one was
133
+ // imported, and the import table says from where. Either way the module is
134
+ // checked — this is the whole precision control and it is never skipped.
135
+ const written = callee.includes(".") ? callee.slice(0, callee.lastIndexOf(".")) : undefined;
136
+ const imported = moduleOfImport(callee.split(".")[0]);
137
+ const module = written !== undefined && written.includes(".") ? written : imported;
138
+ if (module !== undefined && modules.has(module)) {
139
+ return { framework: framework, constructor: leaf };
140
+ }
141
+ // A bare `APIRouter()` whose import resolved to the framework's package
142
+ // rather than to the exact submodule.
143
+ if (imported !== undefined && [...modules].some((m) => imported === m || imported.startsWith(`${m}.`))) {
144
+ return { framework: framework, constructor: leaf };
145
+ }
146
+ }
147
+ return null;
148
+ }
149
+ /** The prefix keyword a framework writes on a constructor or a mount. */
150
+ function prefixOf(call, keys) {
151
+ for (const key of keys) {
152
+ const written = call.keywords[key];
153
+ if (typeof written === "string")
154
+ return written;
155
+ if (call.opaqueKeywords.includes(key))
156
+ return null; // written, unreadable
157
+ }
158
+ return "";
159
+ }
160
+ /**
161
+ * Routers declared in one file, by the local name that holds them.
162
+ *
163
+ * `moduleOfImport` answers "which module did this name come from", which is the
164
+ * only thing separating Flask's `Blueprint` from a class of the same name.
165
+ */
166
+ export function routersIn(file, calls, assignedLocal, moduleOfImport) {
167
+ const out = [];
168
+ for (const call of calls) {
169
+ if (call.callee === null)
170
+ continue;
171
+ const found = frameworkOfConstructor(call.callee, moduleOfImport);
172
+ if (found === null)
173
+ continue;
174
+ const local = assignedLocal(call);
175
+ if (local === undefined)
176
+ continue;
177
+ out.push({
178
+ file,
179
+ local,
180
+ framework: found.framework,
181
+ constructor: found.constructor,
182
+ prefix: prefixOf(call, ["prefix", "url_prefix"]),
183
+ line: call.line,
184
+ });
185
+ }
186
+ return out;
187
+ }
188
+ /** Mounts declared in one file. */
189
+ export function mountsIn(file, calls) {
190
+ const out = [];
191
+ for (const call of calls) {
192
+ if (call.attribute === null || !MOUNT_ATTRS.has(call.attribute))
193
+ continue;
194
+ if (call.receiver === null)
195
+ continue;
196
+ if (call.attribute === "mount") {
197
+ // `app.mount("/api/v1", app=sub)` — Starlette. The prefix is positional
198
+ // and the child is a keyword or the second positional.
199
+ const prefix = typeof call.literals[0] === "string"
200
+ ? call.literals[0]
201
+ : call.args.length > 0
202
+ ? null
203
+ : "";
204
+ const child = call.keywordNames["app"] ?? call.argNames[1] ?? null;
205
+ if (child === null)
206
+ continue;
207
+ out.push({ file, scope: call.scope, parentLocal: call.receiver, childLocal: child, prefix, line: call.line });
208
+ continue;
209
+ }
210
+ // `app.register_blueprint(auth.bp)` is as common as the bare-name form and
211
+ // was invisible while only `argNames` was read — `argNames` is null for an
212
+ // attribute. The dotted text is kept and the caller resolves the module
213
+ // half through its import table; dropping it disclosed real, registered
214
+ // blueprints as never mounted.
215
+ const child = call.argNames[0] ??
216
+ call.keywordNames["router"] ??
217
+ call.keywordNames["blueprint"] ??
218
+ (call.args[0] !== undefined && /^[A-Za-z_][\w.]*$/.test(call.args[0]) ? call.args[0] : null);
219
+ if (child === null || child === undefined)
220
+ continue;
221
+ out.push({
222
+ file,
223
+ scope: call.scope,
224
+ parentLocal: call.receiver,
225
+ childLocal: child,
226
+ prefix: prefixOf(call, ["prefix", "url_prefix"]),
227
+ line: call.line,
228
+ });
229
+ }
230
+ return out;
231
+ }
232
+ /**
233
+ * Route declarations from one decorator call.
234
+ *
235
+ * Returns `null` when the decorator is not a route at all. The receiver is
236
+ * *not* checked here — the caller does that against the resolved router table,
237
+ * because whether `app` is a Flask application or a Slack Bolt one cannot be
238
+ * decided from this file alone.
239
+ */
240
+ export function routeFromDecorator(file, call, handler) {
241
+ if (call.attribute === null || call.receiver === null)
242
+ return null;
243
+ let methods;
244
+ if (HTTP_METHODS.has(call.attribute)) {
245
+ methods = [call.attribute.toUpperCase()];
246
+ }
247
+ else if (GENERIC_ROUTE_ATTRS.has(call.attribute)) {
248
+ const written = call.keywordLists["methods"];
249
+ if (written !== undefined) {
250
+ methods = written.filter((m) => typeof m === "string").map((m) => m.toUpperCase());
251
+ }
252
+ else if (call.opaqueKeywords.includes("methods")) {
253
+ // The verbs are written and this reader cannot read them. Defaulting to
254
+ // GET here would report the opposite of the source as fact — the same
255
+ // mistake `nullable=FLAG` exists to prevent on the ORM side.
256
+ return null;
257
+ }
258
+ else {
259
+ // Flask's documented default, and FastAPI's `api_route` requires the
260
+ // keyword, so an absent one there means this is not a route to read.
261
+ methods = ["GET"];
262
+ }
263
+ }
264
+ else {
265
+ return null;
266
+ }
267
+ if (methods.length === 0)
268
+ return null;
269
+ const raw = call.args[0];
270
+ if (raw === undefined)
271
+ return null;
272
+ const literal = typeof call.literals[0] === "string" ? call.literals[0] : null;
273
+ return {
274
+ file,
275
+ scope: call.scope,
276
+ routerLocal: call.receiver,
277
+ methods,
278
+ path: literal,
279
+ rawPath: raw,
280
+ line: call.line,
281
+ handler,
282
+ responseModel: call.keywordText["response_model"] ?? null,
283
+ };
284
+ }
285
+ // ---------------------------------------------------------------------------
286
+ // Odoo — `@http.route(path, methods=[...])`, always on a `Controller`
287
+ // subclass's own method.
288
+ //
289
+ // **Simpler than FastAPI/Flask, not harder.** There is no router object and
290
+ // no mount chain: Odoo controllers write the full absolute path directly in
291
+ // every `@http.route(...)` call, so once the decorator's provenance is
292
+ // verified against `odoo.http` there is nothing left to resolve — the path
293
+ // on the decorator IS the served path.
294
+ // ---------------------------------------------------------------------------
295
+ const ODOO_HTTP_MODULES = new Set(["odoo.http", "odoo.addons.http"]);
296
+ /** `@http.route(...)` / `@route(...)`, verified against `odoo.http`. */
297
+ export function odooRouteFromDecorator(file, call, handler, moduleOfImport) {
298
+ if (call.callee === null)
299
+ return null;
300
+ const leaf = call.callee.includes(".") ? call.callee.slice(call.callee.lastIndexOf(".") + 1) : call.callee;
301
+ if (leaf !== "route")
302
+ return null;
303
+ const written = call.callee.includes(".") ? call.callee.slice(0, call.callee.lastIndexOf(".")) : undefined;
304
+ const imported = moduleOfImport(call.callee.split(".")[0]);
305
+ const module = written !== undefined && written.includes(".") ? written : imported;
306
+ const fromOdoo = (module !== undefined && ODOO_HTTP_MODULES.has(module)) ||
307
+ (imported !== undefined && [...ODOO_HTTP_MODULES].some((m) => imported === m || imported.startsWith(`${m}.`)));
308
+ if (!fromOdoo)
309
+ return null;
310
+ const raw = call.args[0];
311
+ if (raw === undefined)
312
+ return null;
313
+ const literal = typeof call.literals[0] === "string" ? call.literals[0] : null;
314
+ const writtenMethods = call.keywordLists["methods"];
315
+ const methods = writtenMethods !== undefined
316
+ ? writtenMethods.filter((m) => typeof m === "string").map((m) => m.toUpperCase())
317
+ : call.opaqueKeywords.includes("methods")
318
+ ? null // written, unreadable — a ledger row, not a guessed GET
319
+ : ["GET"]; // Odoo's own documented default when the keyword is absent
320
+ return { file, scope: call.scope, path: literal, rawPath: raw, methods, line: call.line, handler };
321
+ }
322
+ // ---------------------------------------------------------------------------
323
+ // Django's own routing — `urlpatterns`/`path()`/`re_path()`/`url()`, and DRF's
324
+ // `router.register(...)`.
325
+ //
326
+ // **Architecturally different from FastAPI/Flask, which is why it is not a
327
+ // case of `ROUTER_CONSTRUCTORS.django`.** There is no router object: `path()`
328
+ // is a bare function, verified by where it was imported from rather than by
329
+ // what it was constructed from, and a file's `urlpatterns` list is the
330
+ // router — identified by its own module path, not by a local variable name,
331
+ // because `include("myapp.urls")` names a MODULE, never a local. The prefix
332
+ // chain this earns is walked the same way FastAPI's mount chain is (one
333
+ // `include()` hop at a time), just keyed differently.
334
+ // ---------------------------------------------------------------------------
335
+ /** `path`, `re_path` and the pre-2.0 alias `url` — all three read a route the same way. */
336
+ const DJANGO_URL_FUNCTIONS = new Set(["path", "re_path", "url"]);
337
+ /** `include(...)`, always from `django.urls`. */
338
+ const DJANGO_INCLUDE_FUNCTIONS = new Set(["include"]);
339
+ /** DRF's own router constructors — `rest_framework.routers`. */
340
+ export const DRF_ROUTER_CONSTRUCTORS = new Set([
341
+ "DefaultRouter",
342
+ "SimpleRouter",
343
+ ]);
344
+ /**
345
+ * DRF's fixed action table — what `DefaultRouter`/`SimpleRouter` always
346
+ * generate for a registered viewset, unconditionally. This is the router's
347
+ * own documented contract, not an inference about which actions a viewset
348
+ * implements: an unimplemented action still gets the URL, and 405s at
349
+ * request time. Reading the contract rather than the implementation is the
350
+ * same trade this file already makes for Flask's undecorated `.route()`
351
+ * default (`GENERIC_ROUTE_ATTRS`, above).
352
+ */
353
+ export const DRF_ACTIONS = [
354
+ { method: "GET", suffix: "" },
355
+ { method: "POST", suffix: "" },
356
+ { method: "GET", suffix: "{param}" },
357
+ { method: "PUT", suffix: "{param}" },
358
+ { method: "PATCH", suffix: "{param}" },
359
+ { method: "DELETE", suffix: "{param}" },
360
+ ];
361
+ /** Which Django URL-module function a callee names, verified by provenance — mirrors `frameworkOfConstructor`. */
362
+ function djangoModuleFunctionOf(callee, names, moduleOfImport) {
363
+ const leaf = callee.includes(".") ? callee.slice(callee.lastIndexOf(".") + 1) : callee;
364
+ if (!names.has(leaf))
365
+ return null;
366
+ const written = callee.includes(".") ? callee.slice(0, callee.lastIndexOf(".")) : undefined;
367
+ const imported = moduleOfImport(callee.split(".")[0]);
368
+ const module = written !== undefined && written.includes(".") ? written : imported;
369
+ if (module !== undefined && DJANGO_URL_MODULES.has(module))
370
+ return leaf;
371
+ if (imported !== undefined &&
372
+ [...DJANGO_URL_MODULES].some((m) => imported === m || imported.startsWith(`${m}.`))) {
373
+ return leaf;
374
+ }
375
+ return null;
376
+ }
377
+ export function djangoUrlFunctionOf(callee, moduleOfImport) {
378
+ return djangoModuleFunctionOf(callee, DJANGO_URL_FUNCTIONS, moduleOfImport);
379
+ }
380
+ /**
381
+ * `re_path`/`url` write a param as `(?P<name>...)`, not `<type:name>`.
382
+ *
383
+ * Translating an arbitrary regex into a path template is not attempted —
384
+ * that is the same guess `templateOfSource` in `client.ts` refuses to make
385
+ * for a call path, for the same reason. What is read: the anchors (`^`/`$`,
386
+ * which every Django regex route carries and which are not part of the
387
+ * served path), and a named group, which names its own placeholder and
388
+ * needs no interpretation. Anything else regex-shaped left afterwards —
389
+ * an unnamed group, a character class, a quantifier on a literal segment —
390
+ * means the pattern is refused rather than approximated.
391
+ */
392
+ export function djangoRegexPathOf(raw) {
393
+ let pattern = raw;
394
+ if (pattern.startsWith("^"))
395
+ pattern = pattern.slice(1);
396
+ if (pattern.endsWith("$"))
397
+ pattern = pattern.slice(0, -1);
398
+ const withParams = pattern.replace(/\(\?P<[A-Za-z_][A-Za-z0-9_]*>[^)]*\)/g, "{param}");
399
+ if (/[()[\]\\+*?^$|]/.test(withParams))
400
+ return null;
401
+ return withParams.startsWith("/") ? withParams : `/${withParams}`;
402
+ }
403
+ /** Every `path()`/`re_path()`/`url()` call in one file, split into routes and includes. */
404
+ export function djangoUrlEntriesIn(file, calls, moduleOfImport) {
405
+ const routes = [];
406
+ const includes = [];
407
+ for (const call of calls) {
408
+ if (call.callee === null || call.receiver !== null)
409
+ continue;
410
+ const fn = djangoUrlFunctionOf(call.callee, moduleOfImport);
411
+ if (fn === null)
412
+ continue;
413
+ const rawPath = call.args[0];
414
+ if (rawPath === undefined)
415
+ continue;
416
+ const literal = typeof call.literals[0] === "string" ? call.literals[0] : null;
417
+ const path = literal === null ? null : fn === "path" ? literal : djangoRegexPathOf(literal);
418
+ const view = call.args[1];
419
+ const viewCall = call.argCalls[1] ?? null;
420
+ if (viewCall !== null &&
421
+ viewCall.callee !== null &&
422
+ djangoModuleFunctionOf(viewCall.callee, DJANGO_INCLUDE_FUNCTIONS, moduleOfImport) !== null) {
423
+ const targetLiteral = typeof viewCall.literals[0] === "string" ? viewCall.literals[0] : null;
424
+ includes.push({
425
+ file,
426
+ scope: call.scope,
427
+ prefix: path,
428
+ targetModule: targetLiteral,
429
+ rawTarget: viewCall.args[0] ?? "",
430
+ line: call.line,
431
+ });
432
+ continue;
433
+ }
434
+ if (view === undefined)
435
+ continue;
436
+ const viewClassLocal = viewCall !== null && viewCall.attribute === "as_view" && viewCall.receiver !== null
437
+ ? viewCall.receiver
438
+ : null;
439
+ routes.push({
440
+ file,
441
+ scope: call.scope,
442
+ path,
443
+ rawPath,
444
+ line: call.line,
445
+ viewText: view,
446
+ viewClassLocal,
447
+ });
448
+ }
449
+ return { routes, includes };
450
+ }
451
+ /** `router = DefaultRouter()` / `SimpleRouter()`, verified against `rest_framework.routers`. */
452
+ export function drfRouterConstructorOf(callee, moduleOfImport) {
453
+ const leaf = callee.includes(".") ? callee.slice(callee.lastIndexOf(".") + 1) : callee;
454
+ if (!DRF_ROUTER_CONSTRUCTORS.has(leaf))
455
+ return false;
456
+ const written = callee.includes(".") ? callee.slice(0, callee.lastIndexOf(".")) : undefined;
457
+ const imported = moduleOfImport(callee.split(".")[0]);
458
+ const module = written !== undefined && written.includes(".") ? written : imported;
459
+ return module === "rest_framework.routers" || (imported?.startsWith("rest_framework.routers") ?? false);
460
+ }
461
+ /** Locals bound to a DRF router construction — `router = DefaultRouter()`. */
462
+ export function drfRouterLocalsIn(calls, localOfCall, moduleOfImport) {
463
+ const locals = new Set();
464
+ for (const call of calls) {
465
+ if (call.callee === null || !drfRouterConstructorOf(call.callee, moduleOfImport))
466
+ continue;
467
+ const local = localOfCall(call);
468
+ if (local !== undefined)
469
+ locals.add(local);
470
+ }
471
+ return locals;
472
+ }
473
+ /** Every `.register(...)` call on a receiver, whether or not it is a DRF router — the caller filters. */
474
+ export function drfRegisterCallsIn(file, calls) {
475
+ const out = [];
476
+ for (const call of calls) {
477
+ if (call.attribute !== "register" || call.receiver === null)
478
+ continue;
479
+ const rawPrefix = call.args[0];
480
+ const viewSet = call.args[1];
481
+ if (rawPrefix === undefined || viewSet === undefined)
482
+ continue;
483
+ const prefix = typeof call.literals[0] === "string" ? call.literals[0] : null;
484
+ out.push({
485
+ file,
486
+ routerLocal: call.receiver,
487
+ scope: call.scope,
488
+ prefix,
489
+ rawPrefix,
490
+ viewSetText: viewSet,
491
+ line: call.line,
492
+ });
493
+ }
494
+ return out;
495
+ }
496
+ /**
497
+ * Join a mount prefix to a route path.
498
+ *
499
+ * Frameworks are lenient about the slash between the two and repositories write
500
+ * both forms; the served path is the same either way, and two spellings of one
501
+ * path must not become two endpoints.
502
+ */
503
+ export function joinPath(prefix, path) {
504
+ const left = prefix.endsWith("/") ? prefix.slice(0, -1) : prefix;
505
+ const right = path === "" ? "" : path.startsWith("/") ? path : `/${path}`;
506
+ const joined = `${left}${right}`;
507
+ if (joined === "")
508
+ return "/";
509
+ return joined.length > 1 && joined.endsWith("/") ? joined.slice(0, -1) : joined;
510
+ }
511
+ //# sourceMappingURL=routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.js","sourceRoot":"","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,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACjE,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;IAC1E,MAAM,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC;IACjC,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,GAAG,CAAC;IAC9B,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAClF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@descryy/adapter-python",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Python adapter. Parses with Python's own ast in one subprocess (DEC-062) \u2014 no grammar to keep in sync, and annotations arrive as source text.",
6
+ "license": "UNLICENSED",
7
+ "engines": {
8
+ "node": ">=22.5"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src/extract.py"
19
+ ],
20
+ "publishConfig": {
21
+ "registry": "https://registry.npmjs.org",
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "build": "tsc -b && npm run build:assets",
26
+ "build:assets": "node -e \"require('fs').copyFileSync('src/extract.py','dist/extract.py')\""
27
+ },
28
+ "dependencies": {
29
+ "@descryy/adapter-common": "0.1.0",
30
+ "@descryy/ir": "0.3.0",
31
+ "@descryy/adapter-openapi": "0.1.0",
32
+ "@descryy/adapter-sql": "0.1.0"
33
+ }
34
+ }