@intentius/chant-lexicon-gcp 0.13.0 → 0.14.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/generated/index.d.ts +92 -8
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/integrity.json +4 -4
- package/dist/manifest.json +1 -1
- package/dist/meta.json +1892 -170
- package/dist/spec/fetch.d.ts +1 -1
- package/dist/types/index.d.ts +1434 -236
- package/package.json +2 -2
- package/src/generated/index.d.ts +1434 -236
- package/src/generated/index.ts +92 -8
- package/src/generated/lexicon-gcp.json +1892 -170
- package/src/lsp/completions.test.ts +10 -5
- package/src/spec/fetch.ts +1 -1
|
@@ -25,16 +25,21 @@ describe("gcpCompletions", () => {
|
|
|
25
25
|
expect(items).toHaveLength(0);
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
// Use a resource-specific prefix rather than a single letter: the completion
|
|
29
|
+
// provider caps results at 50 with no ranking (#600), so on a large lexicon a
|
|
30
|
+
// one-letter prefix like "S" can truncate common resources (e.g. Storage*)
|
|
31
|
+
// out of the returned slice. "Storage" isolates the Storage* resources, which
|
|
32
|
+
// is what this test actually cares about.
|
|
28
33
|
test.skipIf(!hasGenerated)(
|
|
29
|
-
"returns completions for 'new
|
|
34
|
+
"returns completions for 'new Storage' prefix including Storage*",
|
|
30
35
|
async () => {
|
|
31
36
|
const { gcpCompletions } = await import("./completions");
|
|
32
37
|
const result = gcpCompletions({
|
|
33
38
|
uri: "file:///test.ts",
|
|
34
|
-
content: "const x = new
|
|
35
|
-
linePrefix: "const x = new
|
|
36
|
-
wordAtCursor: "
|
|
37
|
-
position: { line: 0, character:
|
|
39
|
+
content: "const x = new Storage",
|
|
40
|
+
linePrefix: "const x = new Storage",
|
|
41
|
+
wordAtCursor: "Storage",
|
|
42
|
+
position: { line: 0, character: 21 },
|
|
38
43
|
} as any);
|
|
39
44
|
|
|
40
45
|
expect(result).toBeDefined();
|
package/src/spec/fetch.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { fetchWithCache, clearCacheFile } from "@intentius/chant/codegen/fetch";
|
|
|
11
11
|
/**
|
|
12
12
|
* Pinned Config Connector version for reproducible codegen.
|
|
13
13
|
*/
|
|
14
|
-
export const KCC_VERSION = "v1.
|
|
14
|
+
export const KCC_VERSION = "v1.152.0";
|
|
15
15
|
|
|
16
16
|
const CACHE_DIR = join(homedir(), ".chant");
|
|
17
17
|
|