@loculus/infer 0.0.1 → 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/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/extractor.d.ts
2
1
  /** A named type the extracted text refers to, and where to import it from. */
3
2
  interface TypeImport {
4
3
  /** Name used in the extracted type text. */
@@ -52,11 +51,11 @@ export declare class LoculusTypeExtractor {
52
51
  extract(filePath: string, schemaName: string, options?: Omit<ExtractOptions, 'schemas'>): ExtractedSchema;
53
52
  /** Loads several files before extraction so their dependencies are resolved once, not per file. */
54
53
  addSourceFiles(filePaths: readonly string[]): void;
54
+ dispose(): void;
55
+ [Symbol.dispose](): void;
55
56
  }
56
57
  /** Formats a TSDoc comment at the given indentation, ending with a newline. */
57
58
  export declare function formatDoc(description: string, indent?: string): string;
58
- //#endregion
59
- //#region src/format.d.ts
60
59
  interface FormatOptions {
61
60
  /** Emit only input types. */
62
61
  readonly inputOnly?: boolean;
@@ -92,8 +91,6 @@ interface RenderOptions extends FormatOptions {
92
91
  }
93
92
  /** Renders extracted schemas as a TypeScript module. */
94
93
  export declare function renderModule(schemas: readonly ExtractedSchema[], options?: RenderOptions): string;
95
- //#endregion
96
- //#region src/generate.d.ts
97
94
  interface GenerateOptions extends ExtractorOptions, ExtractOptions, FormatOptions {
98
95
  /** Files or glob patterns to read. */
99
96
  readonly include: readonly string[];
@@ -126,5 +123,4 @@ export declare const GENERATED_HEADER = "// Generated by @loculus/infer. Do not
126
123
  export declare function generate(options: GenerateOptions): Promise<GenerateResult>;
127
124
  /** Returns the generated files whose content differs from what is on disk. */
128
125
  export declare function findOutdated(files: readonly GeneratedFile[]): Promise<GeneratedFile[]>;
129
- //#endregion
130
126
  export type { ExtractOptions, ExtractedSchema, ExtractorOptions, FormatOptions, FormattedType, GenerateOptions, GenerateResult, GeneratedFile, RenderOptions, TypeImport };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { t as GENERATED_HEADER, o as LoculusTypeExtractor, n as findOutdated, s as formatDoc, i as formatTypes, r as generate, a as renderModule } from "./generate-ncDNvye5.js";
1
+ export { t as GENERATED_HEADER, o as LoculusTypeExtractor, n as findOutdated, s as formatDoc, i as formatTypes, r as generate, a as renderModule } from "./generate-B66c6Tig.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loculus/infer",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "Extract input/output types from Loculus schemas as TypeScript source",
5
5
  "keywords": [
6
6
  "loculus",
@@ -35,14 +35,15 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "tinyglobby": "^0.2.15",
39
- "ts-morph": "^28.0.0"
38
+ "glob": "^14.0.6",
39
+ "minimatch": "^11.0.9",
40
+ "typescript": "7.1.0-beta"
40
41
  },
41
42
  "devDependencies": {
42
43
  "knip": "6.39.0",
43
44
  "oxfmt": "0.71.0",
44
45
  "oxlint": "1.86.0",
45
- "tsdown": "^0.23.1"
46
+ "tsdown": "^0.23.7"
46
47
  },
47
48
  "peerDependencies": {
48
49
  "loculus": "^0.4.1"