@jpoly1219/context-extractor 0.2.1 → 0.2.2

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/app.js CHANGED
@@ -32,7 +32,8 @@ const fs = __importStar(require("fs"));
32
32
  const child_process_1 = require("child_process");
33
33
  const child_process_2 = require("child_process");
34
34
  const openai_1 = __importDefault(require("openai"));
35
- const main_1 = require("../ts-lsp-client-dist/src/main");
35
+ // import { LspClient, JSONRPCEndpoint } from "../ts-lsp-client-dist/src/main";
36
+ const ts_lsp_client_1 = require("ts-lsp-client");
36
37
  const types_1 = require("./types");
37
38
  // TODO: Bundle the drivers as barrel exports.
38
39
  const typescript_driver_1 = require("./typescript-driver");
@@ -88,8 +89,8 @@ class App {
88
89
  }
89
90
  }
90
91
  })();
91
- const e = new main_1.JSONRPCEndpoint(r.stdin, r.stdout);
92
- const c = new main_1.LspClient(e);
92
+ const e = new ts_lsp_client_1.JSONRPCEndpoint(r.stdin, r.stdout);
93
+ const c = new ts_lsp_client_1.LspClient(e);
93
94
  this.languageServer = r;
94
95
  this.lspClient = c;
95
96
  this.languageServer.on('close', (code) => {
package/dist/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { LspClient } from "../ts-lsp-client-dist/src/main.js";
2
+ import { LspClient } from "ts-lsp-client";
3
3
  import * as fs from "fs";
4
4
  declare const getAnnotatedFunctionHoleContext: (sketchFileContent: string) => {
5
5
  functionName: string;
package/dist/main.js CHANGED
@@ -24,7 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.completeWithLLM = exports.extractContext = exports.extractWithCodeQL = exports.extract = void 0;
27
- const main_js_1 = require("../ts-lsp-client-dist/src/main.js");
27
+ // import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "../ts-lsp-client-dist/src/main.js"
28
+ const ts_lsp_client_1 = require("ts-lsp-client");
28
29
  const child_process_1 = require("child_process");
29
30
  const fs = __importStar(require("fs"));
30
31
  const path = __importStar(require("path"));
@@ -41,8 +42,8 @@ const extract = async (sketchPath) => {
41
42
  const workspaceFolders = [{ 'name': 'context-extractor', 'uri': rootUri }];
42
43
  // initialize LS client and server
43
44
  const r = (0, child_process_1.spawn)('typescript-language-server', ['--stdio']);
44
- const e = new main_js_1.JSONRPCEndpoint(r.stdin, r.stdout);
45
- const c = new main_js_1.LspClient(e);
45
+ const e = new ts_lsp_client_1.JSONRPCEndpoint(r.stdin, r.stdout);
46
+ const c = new ts_lsp_client_1.LspClient(e);
46
47
  console.log(JSON.stringify(c));
47
48
  const capabilities = {
48
49
  'textDocument': {
@@ -1,4 +1,4 @@
1
- import { LspClient, Range } from "../ts-lsp-client-dist/src/main";
1
+ import { LspClient, Range } from "ts-lsp-client";
2
2
  import { LanguageDriver, TypeSpanAndSourceFile } from "./types";
3
3
  import { OcamlTypeChecker } from "./ocaml-type-checker";
4
4
  export declare class OcamlDriver implements LanguageDriver {
package/dist/types.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { LspClient } from "../ts-lsp-client-dist/src/lspClient";
2
- import { Range } from "../ts-lsp-client-dist/src/models";
1
+ import { LspClient, Range } from "ts-lsp-client";
3
2
  interface relevantTypeObject {
4
3
  typeAliasDeclaration: string;
5
4
  typeName: string;
@@ -1,4 +1,4 @@
1
- import { LspClient, Range } from "../ts-lsp-client-dist/src/main";
1
+ import { LspClient, Range } from "ts-lsp-client";
2
2
  import { LanguageDriver, TypeSpanAndSourceFile } from "./types";
3
3
  import { TypeScriptTypeChecker } from "./typescript-type-checker";
4
4
  export declare class TypeScriptDriver implements LanguageDriver {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpoly1219/context-extractor",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Extract relevant context from an incomplete program sketch.",
5
5
  "repository": {
6
6
  "type": "git",