@jpoly1219/context-extractor 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/dist/{app.js → src/app.js} +1 -2
  2. package/dist/{core.d.ts → src/core.d.ts} +1 -1
  3. package/dist/{core.js → src/core.js} +2 -0
  4. package/dist/{main.js → src/main.js} +4 -4
  5. package/dist/{ocaml-driver.d.ts → src/ocaml-driver.d.ts} +1 -1
  6. package/dist/{types.d.ts → src/types.d.ts} +1 -1
  7. package/dist/{typescript-driver.d.ts → src/typescript-driver.d.ts} +1 -1
  8. package/package.json +5 -6
  9. /package/dist/{app.d.ts → src/app.d.ts} +0 -0
  10. /package/dist/{codeql.d.ts → src/codeql.d.ts} +0 -0
  11. /package/dist/{codeql.js → src/codeql.js} +0 -0
  12. /package/dist/{constants.d.ts → src/constants.d.ts} +0 -0
  13. /package/dist/{constants.js → src/constants.js} +0 -0
  14. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  15. /package/dist/{index.js → src/index.js} +0 -0
  16. /package/dist/{main.d.ts → src/main.d.ts} +0 -0
  17. /package/dist/{ocaml-driver.js → src/ocaml-driver.js} +0 -0
  18. /package/dist/{ocaml-type-checker.d.ts → src/ocaml-type-checker.d.ts} +0 -0
  19. /package/dist/{ocaml-type-checker.js → src/ocaml-type-checker.js} +0 -0
  20. /package/dist/{runner.d.ts → src/runner.d.ts} +0 -0
  21. /package/dist/{runner.js → src/runner.js} +0 -0
  22. /package/dist/{types.js → src/types.js} +0 -0
  23. /package/dist/{typescript-driver.js → src/typescript-driver.js} +0 -0
  24. /package/dist/{typescript-type-checker.d.ts → src/typescript-type-checker.d.ts} +0 -0
  25. /package/dist/{typescript-type-checker.js → src/typescript-type-checker.js} +0 -0
  26. /package/dist/{utils.d.ts → src/utils.d.ts} +0 -0
  27. /package/dist/{utils.js → src/utils.js} +0 -0
@@ -32,9 +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
- // import { LspClient, JSONRPCEndpoint } from "../ts-lsp-client-dist/src/main";
35
+ const main_1 = require("../ts-lsp-client-dist/src/main");
36
36
  // import { LspClient, JSONRPCEndpoint } from "ts-lsp-client";
37
- const main_1 = require("dist/ts-lsp-client-dist/src/main");
38
37
  const types_1 = require("./types");
39
38
  // TODO: Bundle the drivers as barrel exports.
40
39
  const typescript_driver_1 = require("./typescript-driver");
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { LspClient } from "dist/ts-lsp-client-dist/src/main";
2
+ import { LspClient } from "../ts-lsp-client-dist/src/main.js";
3
3
  import * as fs from "fs";
4
4
  declare const getAnnotatedFunctionHoleContext: (sketchFileContent: string) => {
5
5
  functionName: string;
@@ -24,6 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.normalize = exports.extractRelevantHeaders = exports.extractRelevantTypes = exports.getHoleContext = exports.getAnnotatedFunctionHoleContext = void 0;
27
+ // import { LspClient, MarkupContent, Location, SymbolInformation, Range } from "ts-lsp-client"
28
+ // import { LspClient, MarkupContent, Location, SymbolInformation, Range } from "dist/ts-lsp-client-dist/src/main"
27
29
  const utils_js_1 = require("./utils.js");
28
30
  const fs = __importStar(require("fs"));
29
31
  const child_process_1 = require("child_process");
@@ -24,9 +24,9 @@ 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
- // import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "../ts-lsp-client-dist/src/main.js"
27
+ const main_js_1 = require("../ts-lsp-client-dist/src/main.js");
28
28
  // import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "ts-lsp-client"
29
- const main_1 = require("dist/ts-lsp-client-dist/src/main");
29
+ // import { JSONRPCEndpoint, LspClient, ClientCapabilities } from "dist/ts-lsp-client-dist/src/main"
30
30
  const child_process_1 = require("child_process");
31
31
  const fs = __importStar(require("fs"));
32
32
  const path = __importStar(require("path"));
@@ -43,8 +43,8 @@ const extract = async (sketchPath) => {
43
43
  const workspaceFolders = [{ 'name': 'context-extractor', 'uri': rootUri }];
44
44
  // initialize LS client and server
45
45
  const r = (0, child_process_1.spawn)('typescript-language-server', ['--stdio']);
46
- const e = new main_1.JSONRPCEndpoint(r.stdin, r.stdout);
47
- const c = new main_1.LspClient(e);
46
+ const e = new main_js_1.JSONRPCEndpoint(r.stdin, r.stdout);
47
+ const c = new main_js_1.LspClient(e);
48
48
  console.log(JSON.stringify(c));
49
49
  const capabilities = {
50
50
  'textDocument': {
@@ -1,4 +1,4 @@
1
- import { LspClient, Range } from "dist/ts-lsp-client-dist/src/main";
1
+ import { LspClient, Range } from "../ts-lsp-client-dist/src/main";
2
2
  import { LanguageDriver, TypeSpanAndSourceFile } from "./types";
3
3
  import { OcamlTypeChecker } from "./ocaml-type-checker";
4
4
  export declare class OcamlDriver implements LanguageDriver {
@@ -1,4 +1,4 @@
1
- import { LspClient, Range } from "dist/ts-lsp-client-dist/src/main";
1
+ import { LspClient, Range } from "../ts-lsp-client-dist/src/main";
2
2
  interface relevantTypeObject {
3
3
  typeAliasDeclaration: string;
4
4
  typeName: string;
@@ -1,4 +1,4 @@
1
- import { LspClient, Range } from "dist/ts-lsp-client-dist/src/main";
1
+ import { LspClient, Range } from "../ts-lsp-client-dist/src/main";
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,19 +1,18 @@
1
1
  {
2
2
  "name": "@jpoly1219/context-extractor",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Extract relevant context from an incomplete program sketch.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/jpoly1219/context-extractor.git"
8
8
  },
9
- "main": "dist/index.js",
10
- "types": "dist/index.d.ts",
9
+ "main": "dist/src/index.js",
10
+ "types": "dist/src/index.d.ts",
11
11
  "files": [
12
- "dist",
13
- "dist/ts-lsp-client-dist"
12
+ "dist/"
14
13
  ],
15
14
  "scripts": {
16
- "build": "npx tsc",
15
+ "build": "npx tsc && cp -r ts-lsp-client-dist dist/",
17
16
  "test": "echo \"Error: no test specified\" && exit 1"
18
17
  },
19
18
  "author": "",
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